1 2018-08-27 Martin Liska <mliska@suse.cz>
4 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5 Set default values for x_aarch64_*_string strings.
6 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7 prefix. For -mabi do not print '=ABI' in help and use
8 <option_value> format for -msve-vector-bits and -moverride
11 2018-08-26 Jeff Law <law@redhat.com>
13 * config/mips/frame-header-opt.c: Include "backend.h" rather than
16 2018-08-26 Marek Polacek <polacek@redhat.com>
18 PR c++/87029, Implement -Wredundant-move.
19 * doc/invoke.texi: Document -Wredundant-move.
21 2018-08-25 Martin Sebor <msebor@redhat.com>
23 PR tree-optimization/87059
24 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
25 to the same type as the other.
26 * fold-const.c (fold_binary_loc): Assert expectation.
28 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
30 * config/darwin.c (machopic_legitimize_pic_address): Clean up
31 extraneous parentheses, dead code section and formatting.
33 2018-08-24 David Malcolm <dmalcolm@redhat.com>
36 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
37 wide enough for jumps in the line-numbering to be visible.
38 (layout::print_gap_in_line_numbering): New member function.
39 (layout::calculate_line_spans): When using line numbering, merge
40 line spans that are only 1 line apart.
41 (diagnostic_show_locus): When printing line numbers, show gaps in
42 line numbering directly, rather than printing headers.
43 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
44 line-numbering with multiple line spans.
45 (selftest::test_fixit_insert_containing_newline_2): Add test of
46 line-numbering, in which the spans are close enough to be merged.
48 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
50 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
51 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
52 * tree-vrp.c (range_is_nonnull): Remove.
53 (range_includes_zero_p): Accept value_range instead of min/max.
54 (extract_range_from_binary_expr_1): Do not early bail on
56 Use range_includes_zero_p instead of range_is_nonnull.
57 (extract_range_from_unary_expr): Use range_includes_zero_p instead
59 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
60 special case VR_ANTI_RANGE.
62 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
64 (range_is_nonnull): Remove.
65 * vr-values.c (vrp_stmt_computes_nonzero): Use
66 range_includes_zero_p instead of range_is_nonnull.
67 (extract_range_basic): Pass value_range to range_includes_zero_p
68 instead of range_is_nonnull.
70 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
72 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
73 * emit-rtl.h (rtl_data): Remove return_bnd.
74 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
75 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
76 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
77 (POINTER_BOUNDS_MODE): Remove definition.
78 (make_pointer_bounds_mode): Remove.
79 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
80 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
81 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
82 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
83 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
84 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
85 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
87 * config/i386/i386-modes.def (BND32, BND64): Remove.
88 * config/i386/i386.c (dbx_register_map): Remove bound registers.
89 (dbx64_register_map): Ditto.
90 (svr4_dbx_register_map): Ditto.
91 (indirect_thunk_bnd_needed): Remove.
92 (indirect_thunks_bnd_used): Ditto.
93 (indirect_return_bnd_needed): Ditto.
94 (indirect_return_via_cx_bnd): Ditto.
95 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
96 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
97 (output_indirect_thunk): Ditto. Remove need_prefix argument.
98 (output_indirect_thunk_function): Remove handling of
99 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
100 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
101 (ix86_save_reg): Remove handling of crtl->return_bnd.
102 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
103 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
104 and UNSPEC_BNDLX_ADDR.
105 (ix86_output_indirect_branch_via_reg): Remove handling of
106 indirect_thunk_prefix_bnd.
107 (ix86_output_indirect_branch_via_push): Ditto.
108 (ix86_output_function_return): Ditto.
109 (ix86_output_indirect_function_return): Ditto.
110 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
111 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
112 (CALL_USED_REGISTERS): Ditto.
113 (REG_ALLOC_ORDER): Update for removal of bound registers.
114 (HI_REGISTER_NAMES): Ditto.
115 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
116 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
117 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
118 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
119 (FIRST_PSEUDO_REG): Update.
120 (BND): Remove mode iterator.
121 * config/i386/predicates.md (bnd_mem_operator): Remove.
123 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
125 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
128 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
130 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
131 the case in which the permute needs only a single element and
132 repeats for every vector of the result. Extend that case to
133 handle variable-length vectors.
134 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
136 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
139 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
140 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
142 2018-08-24 Richard Biener <rguenther@suse.de>
144 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
145 bb_flags_allocated members.
146 (auto_flag): New RAII class for allocating flags.
147 (auto_edge_flag): New RAII class for allocating edge flags.
148 (auto_bb_flag): New RAII class for allocating bb flags.
149 * cfgloop.c (verify_loop_structure): Allocate temporary edge
151 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
152 in favor of temporarily allocated BB flag.
153 * hsa-brig.c: Re-order includes.
154 * hsa-dump.c: Likewise.
155 * hsa-regalloc.c: Likewise.
156 * print-rtl.c: Likewise.
157 * profile-count.c: Likewise.
159 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
162 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
165 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
168 * wide-int-range.cc (wide_int_range_div): Do not ignore result
169 from wide_int_range_multiplicative_op.
171 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
173 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
176 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
178 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
181 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
183 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
184 full GENERIC expression used for replacement.
186 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
188 * tree-vrp.c (abs_extent_range): Remove.
189 (extract_range_into_wide_ints): Pass wide ints by reference.
190 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
191 Pass wide ints by reference in all calls to
192 extract_range_into_wide_ints.
193 * wide-int-range.cc (wide_int_range_div): New.
194 * wide-int-range.h (wide_int_range_div): New.
195 (wide_int_range_includes_zero_p): New.
196 (wide_int_range_zero_p): New.
198 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
200 * config/aarch64/aarch64.md (arches): New enum.
201 (arch): New enum attr.
202 (arch_enabled): New attr.
203 (enabled): Now uses arch_enabled only.
204 (simd, sve, fp16): Removed attribute.
205 (fp): Attr now defined in terms of 'arch'.
206 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
207 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
208 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
209 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
210 attributes into 'arch'.
211 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
212 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
213 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
214 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
215 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
216 'simd' attribute into 'arch'.
217 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
218 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
219 Convert use of 'fp' attribute to 'arch'.
220 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
221 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
223 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
224 (different modes) Merge 'fp' and 'simd' into 'arch'.
225 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
228 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
230 PR rtl-optimization/87026
231 * expmed.c (canonicalize_comparison): If we can no longer create
232 pseudoregisters, don't.
234 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
237 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
239 * config/arm/arm.c (speculation_barrier_libfunc): New static
241 (arm_init_libfuncs): Initialize it.
242 (arm_emit_speculation_barrier): New function.
243 * config/arm/arm.md (speculation_barrier): Call
244 arm_emit_speculation_barrier for architectures that do not have
246 (speculation_barrier_insn): Only match on Armv7 or later.
248 2018-08-23 Richard Biener <rguenther@suse.de>
251 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
254 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
256 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
257 of single-vector TBLs.
258 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
261 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
264 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
265 aarch64_evpc_tbl guard.
267 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
269 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
272 2018-08-22 Martin Sebor <msebor@redhat.com>
275 * tree-pretty-print.c (pretty_print_string): Add argument.
276 (dump_generic_node): Call to pretty_print_string with string size.
278 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
280 PR rtl-optimization/86771
281 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
282 of two SETs into those two SETs, one to be placed at i2, if that SETs
283 destination is modified between i2 and i3.
285 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
287 PR tree-optimization/86725
288 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
290 (vect_analyze_scalar_cycles_1): Check it.
292 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
294 PR tree-optimization/86725
295 * tree-vect-loop.c (vect_is_simple_reduction): When treating
296 an outer loop phi as a double reduction, make sure that the
297 single user of the phi result is an inner loop phi.
299 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
301 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
302 grouped stores with gaps to a strided group.
304 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
306 * tree-vect-stmts.c (get_group_load_store_type)
307 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
308 first statement in a group.
310 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
312 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
313 the sequence used in gcc/gcc.c.
315 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
318 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
321 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
323 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
324 Darwin10-specific unwinder-shim.
325 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
326 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
327 New to cater for Darwin10 Rosetta.
329 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
331 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
332 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
334 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
339 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
340 (dwarf2out_switch_text_section): Generate a local label for the
341 second function sub-section and apply it as the second FDE start
343 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
344 second sub-section start.
346 2018-08-22 Richard Biener <rguenther@suse.de>
348 PR tree-optimization/86988
349 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
351 2018-08-22 Richard Biener <rguenther@suse.de>
353 PR tree-optimization/86945
354 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
356 2018-08-22 Alexandre Oliva <oliva@adacore.com>
358 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
359 a comment about how uses of r2 for .sdata2 come about.
361 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
363 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
365 2018-08-21 Marek Polacek <polacek@redhat.com>
367 PR c++/86981, Implement -Wpessimizing-move.
368 * doc/invoke.texi: Document -Wpessimizing-move.
370 2018-08-21 Jan Hubicka <jh@suse.cz>
372 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
373 * tree.h (is_redundant_typedef): Remove.
374 * dwarf2out.c (is_redundant_typedef): Turn into static function.
376 2018-08-21 Jan Hubicka <jh@suse.cz>
378 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
381 2018-08-21 Tamar Christina <tamar.christina@arm.com>
383 * expmed.c (extract_low_bits): Reject invalid subregs early.
385 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
388 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
391 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
393 * config/vxworks.h: Guard vxworks_asm_out_constructor and
394 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
395 * config/vxworks.c: Likewise.
397 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
399 * config/vxworks.c: Set targetm.have_ctors_dtors
400 if HAVE_INITFINI_ARRAY_SUPPORT.
401 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
402 if HAVE_INITFINI_ARRAY_SUPPORT.
404 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
406 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
407 default search path for VxWorks < 7.
409 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
411 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
412 (get_format_string): Refer to c_getstr.
414 2018-08-21 Tom de Vries <tdevries@suse.de>
416 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
417 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
418 (debuginfo_early_stop): Declare.
419 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
420 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
421 (debuginfo_early_stop): New function.
422 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
423 and debuginfo_early_stop.
424 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
425 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
426 (general_init): Call debuginfo_early_init.
427 (finalize): Call debuginfo_fini.
428 (do_compile): Call debuginfo_init.
429 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
431 (@item -fdump-debug, @item -fdump-earlydebug): Add.
433 2018-08-21 Tom de Vries <tdevries@suse.de>
435 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
436 flag_dump_noaddr and flag_dump_unnumbered.
438 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
440 * wide-int-range.cc (wide_int_range_abs): New.
441 (wide_int_range_order_set): Rename from wide_int_range_min_max.
442 * wide-int-range.h (wide_int_range_abs): New.
443 (wide_int_range_min_max): New.
444 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
445 case to call wide_int_range_abs.
446 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
447 (extract_range_from_abs_expr): Delete.
449 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
452 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
453 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
456 2018-08-20 Nathan Sidwell <nathan@acm.org>
457 Jeff Law <law@redhat.com>
459 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
460 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
462 2018-08-20 David Malcolm <dmalcolm@redhat.com>
465 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
466 (decl_attributes): Likewise.
467 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
469 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
470 * diagnostic-core.h (class auto_diagnostic_group): New class.
471 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
472 (diagnostic_report_diagnostic): Handle the first diagnostics within
474 (emit_diagnostic): Add auto_diagnostic_group instance.
476 (inform_n): Likewise.
478 (warning_at): Likewise.
479 (warning_n): Likewise.
481 (permerror): Likewise.
484 (error_at): Likewise.
486 (fatal_error): Likewise.
487 (internal_error): Likewise.
488 (internal_error_no_backtrace): Likewise.
489 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
490 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
491 * diagnostic.h (struct diagnostic_context): Add fields
492 "diagnostic_group_nesting_depth",
493 "diagnostic_group_emission_count", "begin_group_cb",
495 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
496 Add auto_diagnostic_group instance(s).
497 (find_explicit_erroneous_behavior): Likewise.
498 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
499 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
500 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
501 (gimplify_va_arg_expr): Likewise.
502 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
503 (HSA_SORRY_AT): Likewise.
504 * ipa-devirt.c (compare_virtual_tables): Likewise.
505 (warn_odr): Likewise.
506 * multiple_target.c (expand_target_clones): Likewise.
507 * opts-common.c (cmdline_handle_error): Likewise.
508 * reginfo.c (globalize_reg): Likewise.
509 * substring-locations.c (format_warning_n_va): Likewise.
510 * tree-inline.c (expand_call_inline): Likewise.
511 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
512 * tree-ssa-loop-niter.c
513 (do_warn_aggressive_loop_optimizations): Likewise.
514 * tree-ssa-uninit.c (warn_uninit): Likewise.
515 * tree.c (warn_deprecated_use): Likewise.
517 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
520 * config/i386/i386.md (eh_return): Always update EH return
521 address in word_mode.
523 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
525 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
526 TARGET_SPLIT_COMPLEX_ARG is defined.
528 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
530 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
532 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
535 * expr.c (expand_assignment): Assert that bitpos is positive.
536 (store_field): Likewise
537 (expand_expr_real_1): Make sure that bitpos is positive.
538 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
541 2018-08-20 Nathan Sidwell <nathan@acm.org>
543 * Makefile.in (CPP_ID_DATA_H): Delete.
544 (CPP_INTERNAL_H): Don't add it.
545 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
546 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
548 2018-08-20 Richard Biener <rguenther@suse.de>
550 PR tree-optimization/78655
551 * tree-vrp.c (extract_range_from_binary_expr_1): Make
552 pointer + offset nonnull if either operand is nonnull work.
554 2018-08-20 Tom de Vries <tdevries@suse.de>
556 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
557 unless the referenced die describes the added property using
558 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
559 Otherwise, add a DW_AT_location to the referenced die.
561 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
564 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
565 register_operand when calling ix86_set_reg_reg_cost.
566 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
567 Set *total to 0 for operands that satisfy x86_64_immediate_operand
568 predicate and to 1 otherwise.
570 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
572 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
573 emit a diagnostic that it is not supported and reset the option.
574 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
575 supported and consume the option. (ASM_FINAL_SPEC): New.
577 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
579 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
582 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
584 C-SKY port: Documentation
586 * doc/extend.texi (C-SKY Function Attributes): New section.
587 * doc/invoke.texi (Option Summary): Add C-SKY options.
588 (C-SKY Options): New section.
589 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
591 2018-08-17 Jojo <jijie_rong@c-sky.com>
592 Huibin Wang <huibin_wang@c-sky.com>
593 Sandra Loosemore <sandra@codesourcery.com>
594 Chung-Lin Tang <cltang@codesourcery.com>
596 C-SKY port: Backend implementation
598 * config/csky/*: New.
599 * common/config/csky/*: New.
601 2018-08-17 Jojo <jijie_rong@c-sky.com>
602 Huibin Wang <huibin_wang@c-sky.com>
603 Sandra Loosemore <sandra@codesourcery.com>
604 Chung-Lin Tang <cltang@codesourcery.com>
605 Andrew Jenner <andrew@codesourcery.com>
607 C-SKY port: Configury
609 * config.gcc (csky-*-*): New.
610 * configure.ac: Add csky to targets for dwarf2 debug_line support.
611 * configure: Regenerated.
613 2018-08-17 David Malcolm <dmalcolm@redhat.com>
615 * dump-context.h: Include "dumpfile.h".
616 (dump_context::dump_printf_va): Convert final param from va_list
617 to va_list *. Convert from ATTRIBUTE_PRINTF to
618 ATTRIBUTE_GCC_DUMP_PRINTF.
619 (dump_context::dump_printf_loc_va): Likewise.
620 * dumpfile.c: Include "stringpool.h".
621 (make_item_for_dump_printf_va): Delete.
622 (make_item_for_dump_printf): Delete.
623 (class dump_pretty_printer): New class.
624 (dump_pretty_printer::dump_pretty_printer): New ctor.
625 (dump_pretty_printer::emit_items): New member function.
626 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
628 (dump_pretty_printer::emit_item): New member function.
629 (dump_pretty_printer::stash_item): New member function.
630 (dump_pretty_printer::format_decoder_cb): New member function.
631 (dump_pretty_printer::decode_format): New member function.
632 (dump_context::dump_printf_va): Reimplement in terms of
634 (dump_context::dump_printf_loc_va): Convert final param from va_list
636 (dump_context::begin_scope): Reimplement call to
637 make_item_for_dump_printf.
638 (dump_printf): Update for change to dump_printf_va.
639 (dump_printf_loc): Likewise.
640 (selftest::test_capture_of_dump_calls): Convert "stmt" from
641 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
643 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
644 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
645 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
646 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
647 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
648 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
649 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
650 within a dump_printf_loc call to "%wu".
651 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
652 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
653 missing space after "=".
654 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
655 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
656 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
657 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
658 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
659 duplicate "vectorized" from message.
661 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
663 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
664 polyNxK_t element's TYPE_STRING_FLAG.
666 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
668 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
669 (they were unnamed before). Fix comments.
671 2018-08-17 Nathan Sidwell <nathan@acm.org>
673 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
675 2018-08-17 Richard Biener <rguenther@suse.de>
677 PR tree-optimization/86841
678 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
680 2018-08-17 Martin Liska <mliska@suse.cz>
682 * common.opt: Remove Warn, Init and Report for options with
683 Ignore/Deprecated flag. Warning is done automatically for
685 * config/i386/i386.opt: Likewise.
686 * config/ia64/ia64.opt: Likewise.
687 * config/rs6000/rs6000.opt: Likewise.
688 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
689 Remove usage of flag_check_pointer_bounds.
690 * lto-wrapper.c (merge_and_complain): Do not handle
691 OPT_fcheck_pointer_bounds.
692 (append_compiler_options): Likewise.
693 * opt-functions.awk: Do not handle Deprecated.
694 * optc-gen.awk: Check that Var, Report and Init are not
695 used for an option with Ignore/Deprecated flag.
696 * opts-common.c (decode_cmdline_option): Do not report
698 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
700 * opts.h (struct cl_option): Remove cl_deprecated flag.
701 (CL_ERR_DEPRECATED): Remove error enum value.
703 2018-08-17 Richard Biener <rguenther@suse.de>
706 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
707 across a va-arg-pack using call adjust its return value accordingly.
709 2018-08-16 Martin Sebor <msebor@redhat.com>
711 PR tree-optimization/86853
712 * gimple-ssa-sprintf.c (struct format_result): Rename member.
713 (struct fmtresult): Add member and initialize it in ctors.
714 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
715 (format_string): Handle %S the same as %ls. Set MAYFAIL.
716 (format_directive): Set POSUNDER4K when MAYFAIL is set.
717 (parse_directive): Handle %C same as %c.
718 (sprintf_dom_walker::compute_format_length): Adjust.
719 (is_call_safe): Adjust.
721 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
723 * builtins.c (c_strlen): Add new parameter eltsize. Use it
724 for determining how to count the elements.
725 * builtins.h (c_strlen): Adjust prototype.
726 * expr.c (string_constant): Add new parameter mem_size.
727 Set *mem_size appropriately.
728 * expr.h (string_constant): Adjust protoype.
729 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
730 * gimple-fold.h (get_range_strlen): Adjust prototype.
731 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
732 (format_string): Call get_string_length with eltsize.
734 2018-08-16 David Malcolm <dmalcolm@redhat.com>
736 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
737 to emit the span, rather than setting it as the prefix.
739 2018-08-16 David Malcolm <dmalcolm@redhat.com>
741 * diagnostic-show-locus.c (layout::start_annotation_line): Add
742 "margin_char" parameter, defaulting to space. Use it in place
743 of pp_space for the initial part of the margin.
744 (layout::print_leading_fixits): Use '+' when filling the margin
745 of line-insertion fix-it hints.
747 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
749 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
752 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
754 * config/rs6000/altivec.md: Don't set length attribute to the default
756 * config/rs6000/darwin.md: Ditto.
757 * config/rs6000/dfp.md: Ditto.
758 * config/rs6000/htm.md: Ditto.
759 * config/rs6000/rs6000.md: Ditto.
760 * config/rs6000/sync.md: Ditto.
761 * config/rs6000/vsx.md: Ditto.
763 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
765 * config/rs6000/altivec.md: Don't set length attribute to the default
766 value, for branch instructions.
767 * config/rs6000/darwin.md: Ditto.
768 * config/rs6000/rs6000.md: Ditto.
770 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
772 * config/rs6000/rs6000.md (length): Always define as const_int 4.
773 (unnamed conditional branch define_insn): Set length to 4 or 8
775 (<bd>_<mode>): Similar, for alternative 0.
776 (<bd>tf_<mode>): Ditto.
778 2018-08-16 Tamar Christina <tamar.christina@arm.com>
780 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
782 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
784 * doc/rtl.texi: Replace old RTX class names with new names.
787 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
789 * expmed.h (canonicalize_comparison): New declaration.
790 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
791 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
792 * optabs.c (prepare_cmp_insn): Likewise.
793 * rtl.h (unsigned_condition_p): New function which checks if a
794 comparison operator is unsigned.
796 2018-08-16 Nathan Sidwell <nathan@acm.org>
798 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
799 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
801 2018-08-16 Tamar Christina <tamar.christina@arm.com>
804 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
805 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
806 (mov<mov>): ..this and enable unconditionally.
808 2018-08-16 Tamar Christina <tamar.christina@arm.com>
810 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
812 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
814 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
815 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
816 "Common" with "Target".
818 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
820 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
821 * doc/invoke.texi (mmitigate-rop): Remove.
822 * config/i386/i386.c: Do not include "regrename.h".
823 (ix86_rop_should_change_byte_p, reg_encoded_number)
824 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
826 (ix86_reorg): Remove call to ix86_mitigate_rop.
827 * config/i386/i386.md (attr "modrm_class"): Remove.
828 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
829 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
830 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
832 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
834 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
835 allow folding of mergeh() and mergel() for the float and double types.
836 (fold_mergehl_helper): Rework to handle building a permute tree
839 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
841 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
844 2018-08-15 David Malcolm <dmalcolm@redhat.com>
846 * common.opt (fdiagnostics-show-labels): New option.
847 * diagnostic-show-locus.c (class layout_range): Add field
849 (class layout): Add field "m_show_labels_p".
850 (layout_range::layout_range): Add param "label" and use it to
852 (make_range): Pass in NULL for new "label" param of layout_range's
854 (layout::layout): Initialize m_show_labels_p.
855 (layout::maybe_add_location_range): Pass in loc_range->m_label
856 when constructing layout_range instances.
857 (struct line_label): New struct.
858 (layout::print_any_labels): New member function.
859 (layout::print_line): Call it if label-printing is enabled.
860 (selftest::test_one_liner_labels): New test.
861 (selftest::test_diagnostic_show_locus_one_liner): Call it.
862 * diagnostic.c (diagnostic_initialize): Initialize
863 context->show_labels_p.
864 * diagnostic.h (struct diagnostic_context): Add field
866 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
867 -fno-diagnostics-show-labels.
868 * dwarf2out.c (gen_producer_string): Add
869 OPT_fdiagnostics_show_labels to the ignored options.
870 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
872 (gcc_rich_location::maybe_add_expr): Likewise.
873 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
874 label" param, defaulting to NULL.
875 (gcc_rich_location::add_expr): Add "label" param.
876 (gcc_rich_location::maybe_add_expr): Likewise.
877 (class text_range_label): New class.
878 (class range_label_for_type_mismatch): New class.
879 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
880 of format_warning_va.
881 (fmtwarn_n): Likewise for new params of format_warning_n_va.
882 * lto-wrapper.c (merge_and_complain): Add
883 OPT_fdiagnostics_show_labels to the "pick one setting" options.
884 (append_compiler_options): Likewise to the dropped options.
885 (append_diag_options): Likewise to the passed-on options.
886 * opts.c (common_handle_option): Handle the new option.
887 * selftest-diagnostic.c
888 (test_diagnostic_context::test_diagnostic_context): Enable
890 * substring-locations.c: Include "gcc-rich-location.h".
891 (format_warning_n_va): Add "fmt_label" and "param_label" params
892 and use them as appropriate.
893 (format_warning_va): Add "fmt_label" and "param_label" params,
894 passing them on to format_warning_n_va.
895 (format_warning_at_substring): Likewise.
896 (format_warning_at_substring_n): Likewise.
897 * substring-locations.h (format_warning_va): Add "fmt_label" and
898 "param_label" params.
899 (format_warning_n_va): Likewise.
900 (format_warning_at_substring): Likewise.
901 (format_warning_at_substring_n): Likewise.
902 * toplev.c (general_init): Initialize global_dc->show_labels_p.
904 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
907 * builtins.c (expand_builtin_memcmp): Do not expand the call
908 when overflow is detected.
910 2018-08-15 Martin Sebor <msebor@redhat.com>
912 PR tree-optimization/71625
913 * config/aarch64/aarch64-builtins.c
914 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
916 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
918 * config/s390/s390.c (s390_reorg): Remove loop.
920 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
923 (darwin_function_switched_text_sections): Delete.
924 * gcc/config/darwin.h
925 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
927 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
930 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
931 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
932 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
934 2018-08-15 Martin Liska <mliska@suse.cz>
936 PR tree-optimization/86925
937 * predict.c (expr_expected_value_1): When taking
938 later predictor, assign also probability.
939 Use fold_build2_initializer_loc in order to fold
940 the expression in -frounding-math.
942 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
944 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
946 (expand_vec_perm_1): Try the new method.
948 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
951 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
952 Check whether lra_live_max_point is 0 before dividing.
954 2018-08-14 Martin Sebor <msebor@redhat.com>
956 PR tree-optimization/86650
957 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
958 (vrp_prop::check_mem_ref): Same.
960 2018-08-13 Liu Hao <lh_mouse@126.com>
962 * pretty-print.c (eat_esc_sequence): Swap the foreground and
963 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
964 and clear it thereafter, as it only works for DBCS.
966 2018-08-13 Liu Hao <lh_mouse@126.com>
968 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
969 handle returned by _get_osf_handle().
971 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
973 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
974 for folding vec_perm.
976 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
978 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
979 Add support for gimple-folding of vec_pack() and vec_unpack()
982 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
984 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
985 vec_xst variants to the list.
986 (rs6000_gimple_fold_builtin): Add support for folding unaligned
987 vector loads and stores.
989 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
991 * config.gcc (rs6000-ibm-aix4.x): Delete.
992 (rs6000-ibm-aix5.1): Delete.
993 (rs6000-ibm-aix5.2): Delete.
994 (rs6000-ibm-aix5.3): Delete.
995 * config/rs6000/aix43.h: Delete.
996 * config/rs6000/aix51.h: Delete.
997 * config/rs6000/aix52.h: Delete.
998 * config/rs6000/t-aix43: Delete.
1000 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
1002 * config/s390/s390.c (s390_decompose_constant_pool_ref):
1004 (s390_decompose_address): Factor out constant pool ref
1007 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1009 * config/nds32/nds32-predicates.c
1010 (nds32_can_use_bclr_p): Change return type as bool.
1011 (nds32_can_use_bset_p): Ditto.
1012 (nds32_can_use_btgl_p): Ditto.
1013 (nds32_can_use_bitci_p): Ditto.
1014 * config/nds32/nds32-protos.h
1015 (nds32_can_use_bclr_p): Change declaration.
1016 (nds32_can_use_bset_p): Ditto.
1017 (nds32_can_use_btgl_p): Ditto.
1018 (nds32_can_use_bitci_p): Ditto.
1020 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1022 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
1023 Support -msched-prolog-epilog option.
1024 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
1026 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1028 * common/config/nds32/nds32-common.c
1029 (nds32_option_optimization_table): Enalbe -malways-align.
1031 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
1033 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
1035 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
1036 OPT_misr_secure_ case.
1037 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
1038 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
1039 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
1041 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
1042 (nds32_isr_info): New field security_level.
1043 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
1044 * config/nds32/nds32.md (return_internal): Consider critical attribute.
1045 * config/nds32/nds32.opt (misr-secure): New option.
1046 * config/nds32/nds32_init.inc: New file.
1047 * config/nds32/nds32_isr.h: New file.
1049 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
1051 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
1052 Update comment for atomic instructions.
1053 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
1054 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
1056 (atomic_loaddi): Revise fence expansion to only emit fence prior to
1057 load for __ATOMIC_SEQ_CST model.
1058 (atomic_loaddi_1): Remove float register target.
1059 (atomic_storedi): Handle CONST_INT values.
1060 (atomic_storedi_1): Remove float register source. Add special case
1062 (memory_barrier): New expander and insn.
1064 2018-08-11 Jakub Jelinek <jakub@redhat.com>
1066 PR tree-optimization/86835
1067 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
1068 new_stmt after def_gsi, make sure to insert new_square_stmt after
1069 that stmt, not 2 stmts before it.
1071 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
1074 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
1077 2018-08-10 Martin Liska <mliska@suse.cz>
1080 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
1082 * builtins.c (expand_builtin_expect_with_probability):
1084 (expand_builtin_expect_with_probability): New function.
1085 (build_builtin_expect_predicate): Add new argumnet probability
1086 for BUILT_IN_EXPECT_WITH_PROBABILITY.
1087 (fold_builtin_expect):
1090 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
1091 * builtins.h (fold_builtin_expect): Set new argument.
1092 * doc/extend.texi: Document __builtin_expect_with_probability.
1093 * doc/invoke.texi: Likewise.
1094 * gimple-fold.c (gimple_fold_call): Pass new argument.
1095 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
1096 also BUILT_IN_EXPECT_WITH_PROBABILITY.
1097 * predict.c (get_predictor_value): New function.
1098 (expr_expected_value): Add new argument probability. Assume
1099 that predictor and probability are always non-null.
1100 (expr_expected_value_1): Likewise. For __builtin_expect and
1101 __builtin_expect_with_probability set probability. Handle
1102 combination in binary expressions.
1103 (tree_predict_by_opcode): Simplify code by simply calling
1104 get_predictor_value.
1105 (pass_strip_predict_hints::execute): Add handling of
1106 BUILT_IN_EXPECT_WITH_PROBABILITY.
1107 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
1109 * tree.h (DECL_BUILT_IN_P): New function.
1111 2018-08-10 Martin Liska <mliska@suse.cz>
1113 PR tree-optimization/85799
1114 * passes.def: Add argument for pass_strip_predict_hints.
1115 * predict.c (class pass_strip_predict_hints): Add new argument
1117 (strip_predictor_early): New function.
1118 (pass_strip_predict_hints::execute): Call the function to
1120 (strip_predict_hints): New function.
1121 * predict.def: Fix comment.
1123 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1125 * Makefile.in: Clarify which tm.texi to copy over to assert the
1126 right to grant a GFDL license for all.
1128 2018-08-09 Jeff Law <law@redhat.com>
1130 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
1133 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
1135 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
1138 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1140 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
1141 reductions for variable-length vectors.
1143 2018-08-09 David Malcolm <dmalcolm@redhat.com>
1146 * common.opt (fdiagnostics-show-line-numbers): New option.
1147 * diagnostic-show-locus.c (class layout): Add fields
1148 "m_show_line_numbers_p" and "m_linenum_width";
1149 (num_digits): New function.
1150 (test_num_digits): New function.
1151 (layout::layout): Initialize new fields. Update m_x_offset
1152 logic to handle any left margin.
1153 (layout::print_source_line): Print line number when requested.
1154 (layout::start_annotation_line): New member function.
1155 (layout::print_annotation_line): Call it.
1156 (layout::print_leading_fixits): Likewise.
1157 (layout::print_trailing_fixits): Likewise. Update calls to
1158 move_to_column for new parameter.
1159 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
1160 it to potentially call start_annotation_line.
1161 (layout::show_ruler): Call start_annotation_line.
1162 (selftest::test_line_numbers_multiline_range): New selftest.
1163 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
1164 and selftest::test_line_numbers_multiline_range.
1165 * diagnostic.c (diagnostic_initialize): Initialize
1166 show_line_numbers_p.
1167 * diagnostic.h (struct diagnostic_context): Add field
1168 "show_line_numbers_p".
1169 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1170 -fno-diagnostics-show-line-numbers.
1171 * dwarf2out.c (gen_producer_string): Add
1172 OPT_fdiagnostics_show_line_numbers to the ignored options.
1173 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1174 one setting" options.
1175 (append_compiler_options): Likewise to the dropped options.
1176 (append_diag_options): Likewise to the passed-on options.
1177 * opts.c (common_handle_option): Handle the new option.
1178 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1180 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1182 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1183 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1184 third argument of type "const signed char" to descriptions of
1185 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1186 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1187 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1188 __builtin_bcdsub_ov functions.
1190 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1192 PR tree-optimization/86858
1193 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1194 flow_bb_inside_loop_p calls.
1196 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1198 PR tree-optimization/86871
1199 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1200 instead of gimple_assign_lhs.
1202 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1205 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1206 register constraint to operand 0.
1207 (add<mode>3_carryinC): Likewise.
1208 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1210 2018-08-09 Martin Liska <mliska@suse.cz>
1213 * common.opt: Remove extra line.
1215 2018-08-09 Martin Liska <mliska@suse.cz>
1217 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1218 at the end of a line, make first letter capital and end up
1219 a sentence with a dot.
1220 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1221 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1222 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1223 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1224 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1225 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1226 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1227 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1228 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1229 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1230 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1231 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1232 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1233 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1234 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1235 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1236 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1237 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1239 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1242 * config/s390/s390.c (s390_option_override_internal): Reduce the
1243 stack-clash-protection-probe-interval param if it would be too big
1246 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1249 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1250 * config/m68k/m68k.c (handle_move_double): Don't call
1251 m68k_final_prescan_insn.
1252 (m68k_adjust_decorated_operand): Renamed from
1253 m68k_final_prescan_insn, remove first and third operand and
1255 (print_operand): Call it.
1256 (print_operand_address): Call it.
1258 2018-08-08 Nathan Sidwell <nathan@acm.org>
1260 * diagnostic.c (diagnostic_report_current_module): Use
1261 linemap_included_from & linemap_included_from_linemap.
1263 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1265 * config/aarch64/aarch64-cores.def: Add phecda core.
1266 * config/aarch64/aarch64-tune.md: Regenerate.
1267 * doc/invoke.texi: Add phecda core.
1269 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1272 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1274 * config/s390/s390.md ("movti"): Add more alternatives for
1275 constant to GPR copies.
1277 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1279 * config/s390/s390.c: Fix whitespace damage throughout the file.
1280 * config/s390/s390.h: Likewise.
1281 * config/s390/tpf.h: Likewise.
1283 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1285 * config/s390/s390.c (s390_loadrelative_operand_p):
1286 Remove TARGET_CPU_ZARCH usages.
1287 (s390_rtx_costs): Likewise.
1288 (s390_legitimate_constant_p): Likewise.
1289 (s390_cannot_force_const_mem): Likewise.
1290 (legitimate_reload_constant_p): Likewise.
1291 (s390_preferred_reload_class): Likewise.
1292 (legitimize_pic_address): Likewise.
1293 (legitimize_tls_address): Likewise.
1294 (s390_split_branches): Removed.
1295 (s390_add_execute): Removed.
1296 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1297 (s390_mainpool_start): Likewise.
1298 (s390_mainpool_finish): Likewise.
1299 (s390_mainpool_cancel): Removed.
1300 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1301 (s390_chunkify_cancel): Likewise.
1302 (s390_return_addr_rtx): Likewise.
1303 (s390_register_info): Remove split_branches_pending_p uages.
1304 (s390_optimize_register_info): Likewise.
1305 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1306 split_branches_pending_p usages.
1307 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1308 (s390_load_got): Likewise.
1309 (s390_expand_split_stack_prologue): Likewise.
1310 (output_asm_nops): Likewise.
1311 (s390_function_profiler): Likewise.
1312 (s390_emit_call): Likewise.
1313 (s390_conditional_register_usage): Likewise.
1314 (s390_optimize_prologue): Likewise.
1315 (s390_reorg): Remove TARGET_CPU_ZARCH and
1316 split_branches_pending_p usages.
1317 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1319 (s390_output_indirect_thunk_function): Likewise.
1320 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1321 (TARGET_CPU_ZARCH_P): Removed.
1322 (struct machine_function): Remove split_branches_pending_p.
1323 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1325 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1327 * common/config/s390/s390-common.c (processor_flags_table):
1329 * config.gcc: Remove with_arch/with_tune support.
1330 * config/s390/2064.md: Remove cpu attribute comparisons.
1331 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1333 * config/s390/linux.h (ASM_SPEC):
1334 Remove -march support.
1335 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1336 Use a table to get an arch level.
1337 * config/s390/s390-opts.h (enum processor_type):
1339 * config/s390/s390.c
1340 (processor_table): Remove entries, add arch_level values.
1341 (s390_issue_rate): Remove cases.
1342 (s390_option_override): Adjust
1343 s390_option_override_internal() call.
1344 (s390_option_override_internal): Remove deprecation warning.
1345 (s390_valid_target_attribute_tree): Adjust
1346 s390_option_override_internal() call.
1347 * config/s390/s390.h (struct s390_processor):
1348 Share with s390-c.c, add arch_level field.
1349 * config/s390/s390.md:
1350 Remove occurrences in cpu attribute.
1351 * config/s390/s390.opt: Remove -march/-mtune support.
1352 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1353 * doc/invoke.texi: Remove deprecation warning.
1355 2018-08-08 Luis Machado <luis.machado@linaro.org>
1357 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1359 (qdf24xx_tunings): Set vector cost structure to
1360 qdf24xx_vector_cost.
1362 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1363 <register_sextend>: Set to 3.
1365 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1368 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1369 * config/aarch64/aarch64-simd.md
1370 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1371 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1372 (aarch64_frecpx<mode>): ...this new pattern.
1373 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1374 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1376 2018-08-07 Martin Liska <mliska@suse.cz>
1379 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1380 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1381 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1382 * doc/extend.texi: Document that malloc attribute adds
1385 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1388 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1389 Define to speculation_safe_value_not_needed.
1391 2018-08-06 Jeff Law <law@redhat.com>
1393 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1394 the vr_values instance to cprop_into_stmt.
1395 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1396 (cprop_operand): Also query EVRP to determine if OP is a constant.
1398 2018-08-06 Nathan Sidwell <nathan@acm.org>
1400 * diagnostic.c (diagnostic_report_current_module): Reroll
1401 included-at loop. Translate text.
1403 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1405 * function-tests.c (selftest::test_expansion_to_rtl): Call
1406 free_after_compilation.
1408 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1410 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1412 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1414 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1415 loops with memory block operations from getting unrolled.
1417 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1420 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1421 Define to speculation_safe_value_not_needed.
1423 2018-08-06 Jeff Law <law@redhat.com>
1425 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1428 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1431 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1432 with all enabled __intN types.
1434 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1436 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1438 * alias.c (record_set): Check for clobber high.
1439 * cfgexpand.c (expand_gimple_stmt): Likewise.
1440 * combine-stack-adj.c (single_set_for_csa): Likewise.
1441 * combine.c (find_single_use_1): Likewise.
1442 (set_nonzero_bits_and_sign_copies): Likewise.
1443 (get_combine_src_dest): Likewise.
1444 (is_parallel_of_n_reg_sets): Likewise.
1445 (try_combine): Likewise.
1446 (record_dead_and_set_regs_1): Likewise.
1447 (reg_dead_at_p_1): Likewise.
1448 (reg_dead_at_p): Likewise.
1449 * dce.c (deletable_insn_p): Likewise.
1450 (mark_nonreg_stores_1): Likewise.
1451 (mark_nonreg_stores_2): Likewise.
1452 * df-scan.c (df_find_hard_reg_defs): Likewise.
1453 (df_uses_record): Likewise.
1454 (df_get_call_refs): Likewise.
1455 * dwarf2out.c (mem_loc_descriptor): Likewise.
1456 * haifa-sched.c (haifa_classify_rtx): Likewise.
1457 * ira-build.c (create_insn_allocnos): Likewise.
1458 * ira-costs.c (scan_one_insn): Likewise.
1459 * ira.c (equiv_init_movable_p): Likewise.
1460 (rtx_moveable_p): Likewise.
1461 (interesting_dest_for_shprep): Likewise.
1462 * jump.c (mark_jump_label_1): Likewise.
1463 * postreload-gcse.c (record_opr_changes): Likewise.
1464 * postreload.c (reload_cse_simplify): Likewise.
1465 (struct reg_use): Add source expr.
1466 (reload_combine): Check for clobber high.
1467 (reload_combine_note_use): Likewise.
1468 (reload_cse_move2add): Likewise.
1469 (move2add_note_store): Likewise.
1470 * print-rtl.c (print_pattern): Likewise.
1471 * recog.c (decode_asm_operands): Likewise.
1472 (store_data_bypass_p): Likewise.
1473 (if_test_bypass_p): Likewise.
1474 * regcprop.c (kill_clobbered_value): Likewise.
1475 (kill_set_value): Likewise.
1476 * reginfo.c (reg_scan_mark_refs): Likewise.
1477 * reload1.c (maybe_fix_stack_asms): Likewise.
1478 (eliminate_regs_1): Likewise.
1479 (elimination_effects): Likewise.
1480 (mark_not_eliminable): Likewise.
1481 (scan_paradoxical_subregs): Likewise.
1482 (forget_old_reloads_1): Likewise.
1483 * reorg.c (find_end_label): Likewise.
1484 (try_merge_delay_insns): Likewise.
1485 (redundant_insn): Likewise.
1486 (own_thread_p): Likewise.
1487 (fill_simple_delay_slots): Likewise.
1488 (fill_slots_from_thread): Likewise.
1489 (dbr_schedule): Likewise.
1490 * resource.c (update_live_status): Likewise.
1491 (mark_referenced_resources): Likewise.
1492 (mark_set_resources): Likewise.
1493 * rtl.c (copy_rtx): Likewise.
1494 * rtlanal.c (reg_referenced_p): Likewise.
1495 (single_set_2): Likewise.
1496 (noop_move_p): Likewise.
1497 (note_stores): Likewise.
1498 * sched-deps.c (sched_analyze_reg): Likewise.
1499 (sched_analyze_insn): Likewise.
1501 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1503 * cse.c (invalidate_reg): New function extracted from...
1504 (invalidate): ...here.
1505 (canonicalize_insn): Check for clobber high.
1506 (invalidate_from_clobbers): invalidate clobber highs.
1507 (invalidate_from_sets_and_clobbers): Likewise.
1508 (count_reg_usage): Check for clobber high.
1509 (insn_live_p): Likewise.
1510 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1511 (cselib_invalidate_regno): Check for clobber in setter.
1512 (cselib_invalidate_rtx): Pass through setter.
1513 (cselib_invalidate_rtx_note_stores):
1514 (cselib_process_insn): Check for clobber high.
1515 * cselib.h (cselib_invalidate_rtx): Add operand.
1517 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1519 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1520 (mark_not_eliminable): Likewise.
1521 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1522 * lra-lives.c (process_bb_lives): Check for clobber high.
1523 * lra.c (new_insn_reg): Remember clobber highs.
1524 (collect_non_operand_hard_regs): Check for clobber high.
1525 (lra_set_insn_recog_data): Likewise.
1526 (add_regs_to_insn_regno_info): Likewise.
1527 (lra_update_insn_regno_info): Likewise.
1529 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1531 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1532 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1534 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1536 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1537 (copy_insn_1): Likewise.
1538 (gen_hard_reg_clobber_high): New gen function.
1539 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1540 * genemit.c (gen_exp): Likewise.
1541 (gen_emit_seq): Pass through info.
1542 (gen_insn): Check for CLOBBER_HIGH.
1543 (gen_expand): Pass through info.
1544 (gen_split): Likewise.
1545 (output_add_clobbers): Likewise.
1546 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1547 (remove_clobbers): Likewise.
1548 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1550 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1552 * doc/rtl.texi (clobber_high): Add.
1553 (parallel): Add in clobber high
1554 * rtl.c (rtl_check_failed_code3): Add function.
1555 * rtl.def (CLOBBER_HIGH): Add expression.
1556 * rtl.h (RTL_CHECKC3): Add macro.
1557 (rtl_check_failed_code3): Add declaration.
1558 (XC3EXP): Add macro.
1560 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1563 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1564 cfun->machine->max_used_stack_alignment if needed.
1566 2018-08-04 Martin Sebor <msebor@redhat.com>
1568 PR tree-optimization/86571
1569 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1572 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1575 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1578 2018-08-03 Jeff Law <law@redhat.com>
1581 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1582 Define to speculation_safe_value_not_needed.
1584 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1586 * doc/gcov.texi (-x): Remove duplicate "to".
1587 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1588 (-Wif-not-aligned): Remove duplicate "is".
1589 (-flto): Remove duplicate "the".
1590 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1591 duplicate "v5.00.b".
1592 (MSP430 Options): Remove duplicate "and" from the description
1593 of "-mgprel-sec=regexp".
1594 (x86 Options): Remove duplicate copies of "vmldLog102" and
1595 vmlsLog104 from description of "-mveclibabi=type".
1597 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1599 * internal-fn.h (first_commutative_argument): Declare.
1600 * internal-fn.c (first_commutative_argument): New function.
1601 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1602 restrictions for pattern statements. Use first_commutative_argument
1603 to look for commutative operands in calls to internal functions.
1605 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1607 * Makefile.in (wide-int-range.o): New.
1608 * tree-vrp.c: Move all the wide_int_* functions to...
1609 * wide-int-range.cc: ...here.
1610 * tree-vrp.h: Move all the wide_int_* prototypes to...
1611 * wide-int-range.h: ...here.
1613 2018-08-03 Tom de Vries <tdevries@suse.de>
1615 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1617 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1618 * except.c (output_function_exception_table): Do early exit if
1619 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1621 2018-08-03 Martin Liska <mliska@suse.cz>
1623 * predict.c (dump_prediction): Change to 2 digits
1626 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1628 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1630 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1632 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1634 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1635 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1636 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1637 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1638 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1640 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1642 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1643 pp_take_prefix when saving the existing prefix.
1644 * diagnostic.c (diagnostic_append_note): Likewise.
1645 * langhooks.c (lhd_print_error_function): Likewise.
1646 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1647 param's type. Free the existing prefix.
1648 (pp_take_prefix): New function.
1649 (pretty_printer::pretty_printer): Drop the prefix parameter.
1650 Rename the length parameter to match the comment.
1651 (pretty_printer::~pretty_printer): Free the prefix.
1652 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1654 (struct pretty_printer): Drop the "const" from "prefix" field's
1655 type and clarify memory management.
1656 (pp_set_prefix): Drop the "const" from the 2nd param.
1657 (pp_take_prefix): New decl.
1659 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1661 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1662 for word_mode_ok here instead of passing as argument.
1663 (expand_block_compare): Change select_block_compare_mode() call.
1664 (expand_strncmp_gpr_sequence): New function.
1665 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1667 2018-08-02 Jeff Law <law@redhat.com>
1670 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1671 Define to speculation_safe_value_not_needed.
1674 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1675 Define to speculation_safe_value_not_needed.
1677 2018-08-02 Tom de Vries <tdevries@suse.de>
1680 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1681 function. Return UI_TARGET unconditionally.
1682 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1683 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1685 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1687 * genemit.c (print_overload_test): Fix typo.
1689 2018-08-02 Richard Biener <rguenther@suse.de>
1691 PR tree-optimization/86816
1692 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1693 which checks for value availability before querying it.
1694 (gvn_uses_equal): Use it.
1695 (same_succ_hash): Likewise.
1696 (gimple_equal_p): Likewise.
1698 2018-08-02 Nick Clifton <nickc@redhat.com>
1701 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1702 Define to speculation_safe_value_not_needed.
1705 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1706 Define to speculation_safe_value_not_needed.
1709 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1710 Define to speculation_safe_value_not_needed.
1713 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1714 Define to speculation_safe_value_not_needed.
1717 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1718 Define to speculation_safe_value_not_needed.
1721 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1722 Define to speculation_safe_value_not_needed.
1725 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1726 Define to speculation_safe_value_not_needed.
1729 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1730 Define to speculation_safe_value_not_needed.
1733 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1734 speculation_safe_value_not_needed.
1737 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1738 to speculation_safe_value_not_needed.
1740 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1742 * doc/md.texi: Expand the documentation of instruction names
1743 to mention port-local uses. Document '@' in pattern names.
1744 * read-md.h (overloaded_instance, overloaded_name): New structs.
1746 (md_reader::handle_overloaded_name): New member function.
1747 (md_reader::get_overloads): Likewise.
1748 (md_reader::m_first_overload): New member variable.
1749 (md_reader::m_next_overload_ptr): Likewise.
1750 (md_reader::m_overloads_htab): Likewise.
1751 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1752 m_next_overload_ptr and m_overloads_htab.
1753 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1754 (get_mode_token, get_code_token, get_int_token): New functions.
1755 (map_attr_string): Add an optional argument that passes back
1756 the associated iterator.
1757 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1758 (md_reader::handle_overloaded_name, add_overload_instance): New
1760 (apply_iterators): Handle '@' names. Report an error if '@'
1761 is used without iterators.
1762 (initialize_iterators): Initialize the new iterator_group fields.
1763 * genopinit.c (handle_overloaded_code_for)
1764 (handle_overloaded_gen): New functions.
1765 (main): Use them to print declarations of maybe_code_for_* and
1766 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1767 * genemit.c (print_overload_arguments, print_overload_test)
1768 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1769 (main): Use it to print definitions of maybe_code_for_* and
1770 maybe_gen_* functions.
1771 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1772 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1773 instead of explicit mode checks.
1774 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1775 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1776 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1777 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1778 (aarch64_expand_compare_and_swap): Likewise
1779 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1780 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1781 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1782 (aarch64_constant_pool_reload_icode): Delete.
1783 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1784 instead of aarch64_constant_pool_reload_icode. Use
1785 code_for_aarch64_reload_mov instead of explicit mode checks.
1786 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1787 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1788 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1789 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1790 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1791 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1792 (aarch64_atomic_load_op_code): Delete.
1793 (aarch64_emit_atomic_load_op): Likewise.
1794 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1795 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1796 instead of aarch64_emit_atomic_load_op.
1797 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1798 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1799 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1800 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1801 character before the pattern name.
1802 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1803 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1804 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1805 (aarch64_frecps<mode>): Likewise.
1806 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1807 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1808 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1809 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1810 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1812 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1814 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1815 Allow HFmode constants if TARGET_FP_F16INST.
1817 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1820 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1821 No longer check last store for clobber of address register.
1823 2018-08-02 Martin Liska <mliska@suse.cz>
1825 PR gcov-profile/86817
1826 * gcov.c (process_all_functions): New function.
1828 (process_file): Move functions processing to
1829 process_all_functions.
1831 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1833 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1834 "const" to the "gimple *" and "rtx_insn *" parameters.
1835 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1837 (dump_location_t::dump_location_t): Likewise.
1839 2018-08-01 Martin Sebor <msebor@redhat.com>
1841 PR tree-optimization/86650
1842 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1843 rather than a "gcall *". Directly pass the data of interest
1844 to percent_K_format, rather than building a temporary CALL_EXPR
1846 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1847 (gimple_fold_builtin_strncat): Adjust.
1848 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1849 gcall* argument with gimple*.
1850 * gimple-ssa-warn-restrict.c (check_call): Same.
1851 (wrestrict_dom_walker::before_dom_children): Same.
1852 (builtin_access::builtin_access): Same.
1853 (check_bounds_or_overlap): Same
1854 (maybe_diag_overlap): Same.
1855 (maybe_diag_offset_bounds): Same.
1856 * tree-diagnostic.c (default_tree_printer): Move usage of
1857 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1859 * tree-pretty-print.c (percent_K_format): Add argument.
1860 * tree-pretty-print.h: Add argument.
1861 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1862 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1863 (maybe_diag_stxncpy_trunc): Same.
1864 (handle_builtin_stxncpy): Same.
1865 (handle_builtin_strcat): Same.
1867 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1869 * match.pd: Optimise pointer range checks.
1871 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1873 PR tree-optimization/86758
1874 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1875 to remove pattern statements.
1877 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1879 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1880 result of dfs_enumerate_from when constructing stmt_vec_infos,
1881 instead of additionally calling get_loop_body.
1883 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1885 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1887 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1888 When creating an iv, assert that the step is not known to be zero.
1889 (vect_setup_realignment): Update call accordingly.
1890 * tree-vect-stmts.c (vectorizable_store): Likewise.
1891 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
1893 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1895 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1896 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1897 (vectorizable_reduction): Likewise.
1898 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1899 (vect_detect_hybrid_slp_stmts): Likewise.
1900 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1902 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
1904 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1905 (wide_int_set_zero_nonzero_bits): ...this.
1906 (zero_nonzero_bits_from_vr): Rename to...
1907 (vrp_set_zero_nonzero_bits): ...this.
1908 (extract_range_from_multiplicative_op_1): Abstract wide int
1910 (wide_int_range_multiplicative_op): ...here.
1911 (extract_range_from_binary_expr_1): Extract wide int binary
1912 operations into their own functions.
1913 (wide_int_range_lshift): New.
1914 (wide_int_range_can_optimize_bit_op): New.
1915 (wide_int_range_shift_undefined_p): New.
1916 (wide_int_range_bit_xor): New.
1917 (wide_int_range_bit_ior): New.
1918 (wide_int_range_bit_and): New.
1919 (wide_int_range_trunc_mod): New.
1920 (extract_range_into_wide_ints): New.
1921 (vrp_shift_undefined_p): New.
1922 (extract_range_from_multiplicative_op): New.
1923 (vrp_can_optimize_bit_op): New.
1924 * tree-vrp.h (value_range::dump): New.
1925 (wide_int_range_multiplicative_op): New.
1926 (wide_int_range_lshift):New.
1927 (wide_int_range_shift_undefined_p): New.
1928 (wide_int_range_bit_xor): New.
1929 (wide_int_range_bit_ior): New.
1930 (wide_int_range_bit_and): New.
1931 (wide_int_range_trunc_mod): New.
1932 (zero_nonzero_bits_from_bounds): Rename to...
1933 (wide_int_set_zero_nonzero_bits): ...this.
1934 (zero_nonzero_bits_from_vr): Rename to...
1935 (vrp_set_zero_nonzero_bits): ...this.
1936 (range_easy_mask_min_max): Rename to...
1937 (wide_int_range_can_optimize_bit_op): this.
1938 * vr-values.c (simplify_bit_ops_using_ranges): Rename
1939 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1941 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1943 * tree-vectorizer.h (vect_orig_stmt): New function.
1944 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1945 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1946 (vect_create_epilog_for_reduction): Likewise.
1947 (vectorizable_live_operation): Likewise.
1948 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1949 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1950 * tree-vect-stmts.c (vectorizable_call): Likewise.
1951 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1953 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1955 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1957 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1958 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1959 (vect_transform_loop): Likewise.
1960 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1962 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1964 * tree-vectorizer.h (vect_schedule_slp): Return void.
1965 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1966 (vect_schedule_slp): Likewise.
1968 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1970 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1972 (vect_transform_loop): Update calls accordingly. Schedule SLP
1973 instances before the main loop, if any exist.
1975 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1977 PR tree-optimization/86749
1978 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1979 If the lhs is used in a COND_EXPR, check that it is being used
1980 as the "then" or "else" value.
1982 2018-08-01 Tom de Vries <tdevries@suse.de>
1985 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1986 speculation_safe_value_not_needed.
1988 2018-08-01 Richard Biener <rguenther@suse.de>
1990 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1993 2018-08-01 Martin Liska <mliska@suse.cz>
1995 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1996 format how successful transformation is dumped.
1997 (gimple_mod_pow2_value_transform): Likewise.
1998 (gimple_mod_subtract_transform): Likewise.
1999 (gimple_stringops_transform): Likewise.
2001 2018-08-01 Martin Liska <mliska@suse.cz>
2004 * value-prof.c (interesting_stringop_to_profile_p):
2005 Simplify the code and add BUILT_IN_MEMMOVE.
2006 (gimple_stringops_transform): Likewise.
2008 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
2010 * config/aarch64/aarch64-simd.md
2011 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
2012 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
2013 use GPI iterator instead of SI mode.
2015 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2017 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
2018 rs6000_speculation_barrier.
2019 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
2020 new barrier pattern name.
2022 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
2024 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
2025 (speculation_barrier): New insn.
2027 2018-08-01 Richard Biener <rguenther@suse.de>
2030 * graphite.h: Include isl/id.h and isl/space.h to allow build
2033 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
2036 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2037 mode for COFF targets.
2038 * defaults.h (TARGET_COFF): Define.
2039 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
2040 TARGET_COFF): Define.
2041 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
2042 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
2043 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2045 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2047 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
2048 * gimple-streamer-out.c (output_bb): Save it.
2049 * lto-streamer-in.c (input_struct_function_base): Restore
2050 instance discriminator if available. Create map on demand.
2051 * lto-streamer-out.c (output_struct_function_base): Save it if
2053 * final.c (decl_to_instance_map): Document LTO strategy.
2055 2018-07-31 Alexandre Oliva <oliva@adacore.com>
2056 Olivier Hainque <hainque@adacore.com>
2058 * debug.h (decl_to_instance_map_t): New type.
2059 (decl_to_instance_map): Declare.
2060 (maybe_create_decl_to_instance_map): New inline function.
2061 * final.c (bb_discriminator, last_bb_discriminator): New statics,
2062 to track basic block discriminators.
2063 (final_start_function_1): Initialize them.
2064 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
2066 (decl_to_instance_map): New variable.
2067 (map_decl_to_instance, maybe_set_discriminator): New functions.
2068 (notice_source_line): Set discriminator.
2070 2018-07-31 Ian Lance Taylor <iant@golang.org>
2072 * targhooks.c (default_have_speculation_safe_value): Add
2075 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2077 * dump-context.h: Include "pretty-print.h".
2078 (dump_context::refresh_dumps_are_enabled): New decl.
2079 (dump_context::emit_item): New decl.
2080 (class dump_context): Add fields "m_test_pp" and
2082 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2083 (temp_dump_context::get_dumped_text): New decl.
2084 (class temp_dump_context): Add field "m_pp".
2085 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
2086 (dump_context::refresh_dumps_are_enabled): ...and add a test for
2088 (set_dump_file): Update for above change.
2089 (set_alt_dump_file): Likewise.
2090 (dump_loc): New overload, taking a pretty_printer *.
2091 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
2092 to any test pretty-printer.
2093 (make_item_for_dump_gimple_stmt): New function, adapted from
2094 optinfo::add_gimple_stmt.
2095 (dump_context::dump_gimple_stmt): Call it, and use the result,
2096 eliminating the direct usage of dump_file and alt_dump_file in
2097 favor of indirectly using them via emit_item.
2098 (make_item_for_dump_gimple_expr): New function, adapted from
2099 optinfo::add_gimple_expr.
2100 (dump_context::dump_gimple_expr): Call it, and use the result,
2101 eliminating the direct usage of dump_file and alt_dump_file in
2102 favor of indirectly using them via emit_item.
2103 (make_item_for_dump_generic_expr): New function, adapted from
2105 (dump_context::dump_generic_expr): Call it, and use the result,
2106 eliminating the direct usage of dump_file and alt_dump_file in
2107 favor of indirectly using them via emit_item.
2108 (make_item_for_dump_printf_va): New function, adapted from
2109 optinfo::add_printf_va.
2110 (make_item_for_dump_printf): New function.
2111 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
2112 and use the result, eliminating the direct usage of dump_file and
2113 alt_dump_file in favor of indirectly using them via emit_item.
2114 (make_item_for_dump_dec): New function.
2115 (dump_context::dump_dec): Call it, and use the result,
2116 eliminating the direct usage of dump_file and alt_dump_file in
2117 favor of indirectly using them via emit_item.
2118 (make_item_for_dump_symtab_node): New function, adapted from
2119 optinfo::add_symtab_node.
2120 (dump_context::dump_symtab_node): Call it, and use the result,
2121 eliminating the direct usage of dump_file and alt_dump_file in
2122 favor of indirectly using them via emit_item.
2123 (dump_context::begin_scope): Reimplement, avoiding direct usage
2124 of dump_file and alt_dump_file in favor of indirectly using them
2126 (dump_context::emit_item): New member function.
2127 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
2128 Set up test pretty-printer on the underlying context. Call
2129 refresh_dumps_are_enabled.
2130 (temp_dump_context::~temp_dump_context): Call
2131 refresh_dumps_are_enabled.
2132 (temp_dump_context::get_dumped_text): New member function.
2133 (selftest::verify_dumped_text): New function.
2134 (ASSERT_DUMPED_TEXT_EQ): New macro.
2135 (selftest::test_capture_of_dump_calls): Run all tests twice, with
2136 and then without optinfo enabled. Add uses of
2137 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
2138 * dumpfile.h: Update comment for the dump_* API.
2139 * optinfo-emit-json.cc
2140 (selftest::test_building_json_from_dump_calls): Update for new
2141 param for temp_dump_context ctor.
2142 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
2143 and "m_owned" field.
2144 (optinfo_item::~optinfo_item): Likewise.
2145 (optinfo::add_item): New member function.
2146 (optinfo::emit): Update comment.
2147 (optinfo::add_string): Delete.
2148 (optinfo::add_printf): Delete.
2149 (optinfo::add_printf_va): Delete.
2150 (optinfo::add_gimple_stmt): Delete.
2151 (optinfo::add_gimple_expr): Delete.
2152 (optinfo::add_tree): Delete.
2153 (optinfo::add_symtab_node): Delete.
2154 (optinfo::add_dec): Delete.
2155 * optinfo.h (class dump_context): New forward decl.
2156 (optinfo::add_item): New decl.
2157 (optinfo::add_string): Delete.
2158 (optinfo::add_printf): Delete.
2159 (optinfo::add_printf_va): Delete.
2160 (optinfo::add_gimple_stmt): Delete.
2161 (optinfo::add_gimple_expr): Delete.
2162 (optinfo::add_tree): Delete.
2163 (optinfo::add_symtab_node): Delete.
2164 (optinfo::add_dec): Delete.
2165 (optinfo::add_poly_int): Delete.
2166 (optinfo_item::optinfo_item): Remove "owned" param.
2167 (class optinfo_item): Remove field "m_owned".
2169 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2172 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2173 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2174 requested variable alignment.
2175 (expand_one_ssa_partition): Likewise.
2176 (expand_one_var): Likewise.
2178 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2180 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2181 to speculation_safe_value_not_needed.
2183 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2185 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2186 * targhooks.c (speculation_safe_value_not_needed): New function.
2187 * target.def (have_speculation_safe_value): Update documentation.
2188 * doc/tm.texi: Regenerated.
2190 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2192 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2193 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2195 (despeculate_copy<ALLI:mode>_insn): New insn.
2196 (despeculate_copyti_insn): New insn.
2197 (despeculate_simple<ALLI:mode>): New insn
2198 (despeculate_simpleti): New insn.
2199 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2201 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2202 aarch64_speculation_safe_value.
2203 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2205 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2207 * config/aarch64/aarch64-speculation.cc: New file.
2208 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2209 before pass_reorder_blocks.
2210 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2212 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2213 X14 and X15 when tracking speculation.
2214 * config/aarch64/aarch64.md (register name constants): Add
2215 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2216 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2217 (speculation_barrier): New insn attribute.
2218 (cmp<mode>): Allow SP in comparisons.
2219 (speculation_tracker): New insn.
2220 (speculation_barrier): Add speculation_barrier attribute.
2221 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2222 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2223 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2225 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2227 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2228 aarch64_track_speculation is true.
2229 (tb<optab><mode>1): Likewise.
2230 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2231 generate CB[N]Z when tracking speculation.
2232 (aarch64_split_compare_and_swap): Likewise.
2233 (aarch64_split_atomic_op): Likewise.
2235 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2237 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2239 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2241 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2242 (speculation_barrier): New insn.
2244 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2246 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2247 * config/arm/arm.md (speculation_barrier): New expand.
2248 (speculation_barrier_insn): New pattern.
2250 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2252 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2253 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2254 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2255 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2257 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2258 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2259 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2260 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2261 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2262 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2263 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2264 * builtins.c (expand_speculation_safe_value): New function.
2265 (expand_builtin): Call it.
2266 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2267 * doc/extend.texi: Document __builtin_speculation_safe_value.
2268 * doc/md.texi: Document "speculation_barrier" pattern.
2269 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2270 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2271 * doc/tm.texi: Regenerated.
2272 * target.def (have_speculation_safe_value, speculation_safe_value): New
2274 * targhooks.c (default_have_speculation_safe_value): New function.
2275 (default_speculation_safe_value): New function.
2276 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2277 (default_speculation_safe_value): Add prototype.
2279 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2281 * dump-context.h (dump_context::dump_loc): New decl.
2282 * dumpfile.c (dump_context::dump_loc): New member function.
2283 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2284 and dump_gimple_stmt.
2285 (dump_context::dump_gimple_expr_loc): Likewise, using
2287 (dump_context::dump_generic_expr_loc): Likewise, using
2289 (dump_context::dump_printf_loc_va): Likewise, using
2291 (dump_context::begin_scope): Explicitly using the global function
2292 "dump_loc", rather than the member function.
2294 2018-07-31 Martin Sebor <msebor@redhat.com>
2296 PR tree-optimization/86741
2297 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2299 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2301 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2302 depend on whether prefetch instructions will be emitted or not.
2303 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2304 will be emitted or not.
2305 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2306 (TARGET_SETMEM_PFD): New macros.
2308 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2310 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2311 (NULL_STMT_VEC_INFO): Delete.
2312 (stmt_vec_info::operator*): Likewise.
2313 (stmt_vec_info::operator gimple *): Likewise.
2314 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2315 of NULL_STMT_VEC_INFO.
2316 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2317 (vect_reassociating_reduction_p): Likewise.
2318 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2319 (vectorizable_store): Likewise.
2320 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2321 (vec_info::free_stmt_vec_infos): Likewise.
2323 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2325 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2326 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2328 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2330 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2331 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2332 (vec_info::free_stmt_vec_info): New private member functions.
2333 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2334 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2335 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2336 set_stmt_vec_info_vec and free_stmt_vec_infos.
2337 * tree-vect-loop.c (_loop_vec_info): Remove call to
2338 set_stmt_vec_info_vec.
2339 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2340 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2341 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2342 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2343 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2344 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2345 with the clearing in the xcalloc.
2346 (stmt_vec_info_vec): Delete.
2347 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2348 (vectorize_loops): Likewise.
2349 (vec_info::~vec_info): Remove argument from call to
2350 free_stmt_vec_infos.
2351 (vec_info::add_stmt): Remove vinfo argument from call to
2354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2356 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2357 rather than a gimple stmt.
2358 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2359 information for pattern statements when passed the original
2360 statement; instead wait to be passed the pattern statement itself.
2361 Don't call set_vinfo_for_stmt here.
2362 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2363 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2364 stmt_vec_infos here.
2365 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2366 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2367 stmt_vec_infos entry.
2369 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2371 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2372 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2373 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2374 * tree-vect-stmts.c (vectorizable_call): Likewise.
2375 (vectorizable_simd_clone_call): Likewise.
2377 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2379 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2380 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2381 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2382 * tree-vect-loop.c (vect_transform_loop): Likewise.
2383 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2384 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2386 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2388 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2389 (vect_dr_stmt): Delete.
2390 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2391 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2393 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2394 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2395 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2396 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2397 (vect_analyze_data_refs): Likewise.
2398 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2400 (vect_find_same_alignment_drs): Likewise.
2401 (vect_slp_analyze_node_dependences): Update calls accordingly.
2402 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2403 instead of DR_VECT_AUX.
2404 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2405 of a vector data references. Use vec_info::lookup_dr instead of
2407 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2408 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2409 instead of DR_VECT_AUX.
2411 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2413 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2415 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2417 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2418 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2419 (vect_gen_prolog_loop_niters): Likewise.
2421 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2423 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2424 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2425 (vect_known_alignment_in_bytes, vect_dr_behavior)
2426 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2427 instead of data_references. Update calls to other routines for
2428 which the same change has been made.
2429 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2430 dr_vec_infos instead of stmt_vec_infos.
2431 (vect_analyze_data_ref_dependence): Update call accordingly.
2432 (vect_slp_analyze_data_ref_dependence)
2433 (vect_record_base_alignments): Use DR_VECT_AUX.
2434 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2435 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2436 (vector_alignment_reachable_p, vect_get_data_access_cost)
2437 (vect_peeling_supportable, vect_analyze_group_access_1)
2438 (vect_analyze_group_access, vect_analyze_data_ref_access)
2439 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2440 (vect_compile_time_alias, vect_small_gap_p)
2441 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2442 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2443 instead of data_references. Update calls to other routines for
2444 which the same change has been made.
2445 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2446 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2447 (vect_slp_analyze_and_verify_node_alignment)
2448 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2449 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2450 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2452 (_vect_peel_info::dr): Replace with...
2453 (_vect_peel_info::dr_info): ...this new field.
2454 (vect_peeling_hash_get_most_frequent)
2455 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2456 (vect_peeling_hash_get_lowest_cost):
2457 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2458 routines for which the same change has been made.
2459 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2461 * tree-vect-loop-manip.c (get_misalign_in_elems)
2462 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2464 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2465 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2466 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2467 (get_group_load_store_type, get_negative_load_store_type)
2468 (vect_get_data_ptr_increment, vectorizable_store)
2469 (vectorizable_load): Likewise.
2470 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2471 Update calls to other routines for which the same change has been made.
2473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2475 * tree-vectorizer.h (vec_info::move_dr): New member function.
2476 (dataref_aux): Rename to...
2477 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2478 (_stmt_vec_info::dr_aux): Update accordingly.
2479 (_stmt_vec_info::data_ref_info): Delete.
2480 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2481 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2482 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2483 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2485 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2486 (STMT_VINFO_DR_INFO): New macro.
2487 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2488 (set_dr_misalignment): Update after rename of dataref_aux.
2489 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2490 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2491 initialization of STMT_VINFO_DATA_REF.
2492 * tree-vectorizer.c (vec_info::move_dr): New function.
2493 * tree-vect-patterns.c (vect_recog_bool_pattern)
2494 (vect_recog_mask_conversion_pattern)
2495 (vect_recog_gather_scatter_pattern): Use it.
2496 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2497 the "dr" and "stmt" fields of dr_vec_info instead of
2498 STMT_VINFO_DATA_REF.
2500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2502 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2503 (is_pattern_stmt_p): Use it.
2504 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2505 on pattern statements.
2507 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2509 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2510 original stmt as a stmt_vec_info rather than a gimple stmt.
2511 (vect_pattern_recog_1): Take the statement directly as a
2512 stmt_vec_info, rather than via a gimple_stmt_iterator.
2513 Update call to vect_mark_pattern_stmts.
2514 (vect_pattern_recog): Update calls accordingly.
2516 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2518 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2519 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2520 a vect_def_type for the first argument.
2521 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2522 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2523 operand if it isn't defined by a vectorized statement.
2524 (vect_build_gather_load_calls): Remove the mask_dt argument and
2525 update calls to vect_get_vec_def_for_stmt_copy.
2526 (vectorizable_bswap): Likewise the dt argument.
2527 (vectorizable_call): Update calls to vectorizable_bswap and
2528 vect_get_vec_def_for_stmt_copy.
2529 (vectorizable_simd_clone_call, vectorizable_assignment)
2530 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2531 (vectorizable_comparison): Update calls to
2532 vect_get_vec_def_for_stmt_copy.
2533 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2535 (vect_get_loop_based_defs): Remove dt argument and update call
2536 to vect_get_vec_def_for_stmt_copy.
2537 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2538 and vect_get_vec_def_for_stmt_copy.
2539 (vectorizable_load): Update calls to vect_build_gather_load_calls
2540 and vect_get_vec_def_for_stmt_copy.
2541 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2542 (vectorizable_reduction, vectorizable_live_operation): Update calls
2543 to vect_get_vec_def_for_stmt_copy.
2545 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2547 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2548 and gimple stmt arguments with a stmt_vec_info.
2549 (vect_record_base_alignments): Update calls accordingly.
2550 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2551 and gimple stmt arguments with a stmt_vec_info.
2552 (vect_build_slp_tree_1): Remove vinfo argument and update call
2553 to vect_record_max_nunits.
2554 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2555 and vect_record_max_nunits.
2557 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2559 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2560 file and take a stmt_vec_info instead of a gimple stmt.
2561 (supportable_widening_operation, vect_finish_replace_stmt)
2562 (vect_finish_stmt_generation, vect_get_store_rhs)
2563 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2564 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2565 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2566 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2567 (vect_create_data_ref_ptr, bump_vector_ptr)
2568 (vect_permute_store_chain, vect_setup_realignment)
2569 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2570 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2571 (vectorizable_reduction, vectorizable_induction)
2572 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2573 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2574 than gimple stmts as arguments.
2575 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2576 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2577 (can_group_stmts_p, vect_check_gather_scatter)
2578 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2579 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2580 (vect_permute_load_chain, vect_shift_permute_load_chain)
2581 (vect_transform_grouped_load)
2582 (vect_record_grouped_load_vectors): Likewise.
2583 * tree-vect-loop.c (vect_fixup_reduc_chain)
2584 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2585 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2586 (vectorizable_reduction, vectorizable_induction)
2587 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2588 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2589 (vect_get_load_store_mask): Likewise.
2590 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2591 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2592 * tree-vect-stmts.c (vect_mark_relevant)
2593 (is_simple_and_all_uses_invariant)
2594 (exist_non_indexing_operands_for_use_p, process_use)
2595 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2596 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2597 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2598 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2599 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2600 (get_negative_load_store_type, get_load_store_type)
2601 (vect_check_load_store_mask, vect_check_store_rhs)
2602 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2603 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2604 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2605 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2606 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2607 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2608 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2609 (supportable_widening_operation): Likewise.
2611 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2613 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2614 a stmt_vec_info instead of a gcall.
2615 (vect_check_gather_scatter): Update call accordingly.
2616 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2618 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2619 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2620 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2621 instead of a gimple stmt.
2622 (vect_transform_loop): Update calls accordingly.
2623 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2624 stmt_vec_infos instead of gimple stmts.
2625 (vect_analyze_slp_instance): Update use accordingly.
2626 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2627 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2628 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2629 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2630 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2631 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2632 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2633 down to subroutines.
2635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2637 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2638 of the worklist from a vector of gimple stmts to a vector of
2640 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2641 (vect_mark_stmts_to_be_vectorized): Likewise
2643 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2645 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2646 statement before passing it to vect_analyze_stmt.
2647 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2648 the chain of phi vector definitions. Track the exit phi via its
2650 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2651 STMT_VINFO_REDUC_DEF.
2652 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2653 stmt_vec_infos to handle the statement chains.
2654 (vect_get_slp_defs): Record the first statement in the node
2655 using a stmt_vec_info.
2656 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2657 statements here and pass their stmt_vec_info down to subroutines.
2658 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2659 down to vect_finish_stmt_generation.
2660 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2661 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2662 stmt_vec_infos to subroutines.
2663 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2666 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2668 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2669 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2670 (vect_permute_store_chain, vect_setup_realignment)
2671 (vect_permute_load_chain, vect_shift_permute_load_chain)
2672 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2673 stmts internally, and when passing values to other vectorizer routines.
2674 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2675 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2676 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2677 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2678 (vectorizable_reduction, vectorizable_induction)
2679 (vectorizable_live_operation, vect_transform_loop_stmt)
2680 (vect_transform_loop): Likewise.
2681 * tree-vect-patterns.c (vect_reassociating_reduction_p)
2682 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2683 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2684 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2685 (vect_slp_analyze_node_operations_1): Likewise.
2686 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2687 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2688 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2689 (vect_finish_stmt_generation_1, get_group_load_store_type)
2690 (get_load_store_type, vect_build_gather_load_calls)
2691 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2692 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2693 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2694 (vectorizable_store, vectorizable_load, vectorizable_condition)
2695 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2696 (supportable_widening_operation): Likewise.
2697 (vect_get_vector_types_for_stmt): Likewise.
2698 * tree-vectorizer.h (vect_dr_behavior): Likewise.
2700 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2702 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2703 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2704 (vect_permute_store_chain, vect_permute_load_chain)
2705 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2706 repeated stmt_vec_info lookups.
2707 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2708 (vect_update_ivs_after_vectorizer): Likewise.
2709 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2710 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2711 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2712 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2713 (vect_bb_slp_scalar_cost): Likewise.
2714 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2718 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2719 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2720 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2721 to get gassigns and gcalls, rather than operating on generc gimple
2723 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2724 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2725 (vectorizable_load, vect_analyze_stmt): Likewise.
2726 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2728 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2730 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2731 return stmt_vec_infos rather than gimple stmts. Do not accept
2733 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2735 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2736 Update use of get_later_stmt.
2737 (vect_get_constant_vectors): Update call accordingly.
2738 (vect_schedule_slp_instance): Likewise
2739 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2740 (vect_slp_analyze_instance_dependence): Likewise.
2741 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2745 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2746 (stmt_info_for_cost::stmt_info): ...this new field.
2747 (add_stmt_costs): Update accordingly.
2748 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2749 (vect_get_known_peeling_cost): Likewise.
2750 (vect_estimate_min_profitable_iters): Likewise.
2751 * tree-vect-stmts.c (record_stmt_cost): Likewise.
2753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2755 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2756 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2757 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2759 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2763 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2764 a gimple stmt to a stmt_vec_info.
2765 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2769 * tree-vectorizer.h (vec_info::grouped_stores): Change from
2770 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2771 (_loop_vec_info::reduction_chains): Likewise.
2772 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2774 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2778 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2779 a gimple stmt to a stmt_vec_info.
2780 (_stmt_vec_info::next_element): Likewise.
2781 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2782 (vect_slp_analyze_and_verify_node_alignment)
2783 (vect_analyze_group_access_1, vect_analyze_group_access)
2784 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2785 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2786 (vect_supportable_dr_alignment): Update accordingly.
2787 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2788 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2789 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2790 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2791 * tree-vect-slp.c (vect_build_slp_tree_1)
2792 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2793 (vect_split_slp_store_group, vect_analyze_slp_instance)
2794 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2795 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2796 (get_group_load_store_type, get_load_store_type)
2797 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2798 (vect_transform_stmt, vect_remove_stores): Likewise.
2800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2802 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2804 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2805 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2806 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2807 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2808 (vector_alignment_reachable_p, vect_get_data_access_cost)
2809 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2810 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2811 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2812 (vect_analyze_group_access_1, vect_analyze_group_access)
2813 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2814 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2815 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2816 result of vect_dr_stmt and use the stmt_vec_info instead of
2817 the associated gimple stmt.
2818 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2819 (vect_gen_prolog_loop_niters): Likewise.
2820 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2822 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2824 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2825 to a vec<stmt_vec_info>.
2826 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2827 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2829 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2830 to a vec<stmt_vec_info>.
2831 (bst_traits::value_type, bst_traits::value_type): Likewise.
2832 (bst_traits::hash): Update accordingly.
2833 (vect_get_and_check_slp_defs): Change the stmts parameter from
2834 a vec<gimple *> to a vec<stmt_vec_info>.
2835 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2836 (vect_build_slp_tree): Likewise.
2837 (vect_build_slp_tree_2): Likewise. Update uses of
2838 SLP_TREE_SCALAR_STMTS.
2839 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2840 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2841 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2842 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2843 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2844 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2845 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2846 (vect_get_constant_vectors, vect_get_slp_defs)
2847 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2848 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2849 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2850 instead of gimple stmts.
2851 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2852 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2853 (vect_slp_analyze_instance_dependence): Update uses of
2854 SLP_TREE_SCALAR_STMTS.
2855 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2856 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2857 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2858 (get_initial_defs_for_reduction): Likewise.
2859 (vect_create_epilog_for_reduction): Likewise.
2860 (vectorize_fold_left_reduction): Likewise.
2861 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2862 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2863 (can_vectorize_live_stmts): Likewise.
2865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2867 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2868 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2869 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2871 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2873 (gather_scalar_reductions): Update after above interface changes.
2874 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2875 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2877 (vect_force_simple_reduction): Likewise.
2878 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2879 LOOP_VINFO_REDUCTIONS.
2880 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2882 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2884 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2885 a gimple stmt to a stmt_vec_info.
2886 * tree-vect-loop.c (vect_active_double_reduction_p)
2887 (vect_force_simple_reduction, vectorizable_reduction): Update
2890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2892 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2893 vec<gimple *> to a vec<stmt_vec_info>.
2894 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2895 the reduction_phis argument from a vec<gimple *> to a
2897 (vectorizable_reduction): Likewise the phis local variable that
2898 is passed to vect_create_epilog_for_reduction. Update for new type
2899 of SLP_TREE_VEC_STMTS.
2900 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2901 (vectorizable_live_operation): Likewise.
2902 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2903 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2907 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2908 a gimple stmt to a stmt_vec_info.
2909 (vectorizable_condition, vectorizable_live_operation)
2910 (vectorizable_reduction, vectorizable_induction): Pass back the
2911 vectorized statement as a stmt_vec_info.
2912 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2913 use of STMT_VINFO_VEC_STMT.
2914 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2915 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2916 as stmt_vec_infos rather than gimple stmts.
2917 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2919 (vectorizable_live_operation): Likewise.
2920 (vectorizable_reduction, vectorizable_induction): Likewise,
2921 updating use of STMT_VINFO_VEC_STMT.
2922 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2923 of STMT_VINFO_VEC_STMT.
2924 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2925 (vectorizable_simd_clone_call, vectorizable_conversion)
2926 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2927 (vectorizable_store, vectorizable_load, vectorizable_condition)
2928 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2929 from a gimple stmt to a stmt_vec_info.
2930 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
2931 pointer to a stmt_vec_info to the vectorizable_* routines.
2933 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2935 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2936 a gimple stmt to a stmt_vec_info.
2937 (is_pattern_stmt_p): Update accordingly.
2938 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2939 (vect_record_grouped_load_vectors): Likewise.
2940 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2941 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2942 (vect_model_reduction_cost): Likewise.
2943 (vect_create_epilog_for_reduction): Likewise.
2944 (vectorizable_reduction, vectorizable_induction): Likewise.
2945 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2946 Return the stmt_vec_info for the pattern statement.
2947 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2948 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2949 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2950 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2951 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2952 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2953 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2954 (free_stmt_vec_info, vect_is_simple_use): Likewise.
2956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2958 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2959 (vect_finish_stmt_generation): Likewise.
2960 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2961 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2962 (vect_build_gather_load_calls): Use the return value of the above
2963 functions instead of a separate call to vinfo_for_stmt. Use narrow
2964 scopes for the input gimple stmt and wider scopes for the associated
2965 stmt_vec_info. Use vec_info::lookup_def when setting these
2966 stmt_vec_infos from an SSA_NAME definition.
2967 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2968 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2969 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2970 (vectorizable_store, vectorizable_load, vectorizable_condition)
2971 (vectorizable_comparison): Likewise.
2972 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2973 (vectorizable_reduction): Likewise.
2975 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2977 * tree-vectorizer.h (vect_is_simple_use): Add an optional
2978 stmt_vec_info * parameter before the optional gimple **.
2979 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2980 (process_use, vect_get_vec_def_for_operand_1): Update callers.
2981 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2982 * tree-vect-loop.c (vectorizable_reduction): Likewise.
2983 (vectorizable_live_operation): Likewise.
2984 * tree-vect-patterns.c (type_conversion_p): Likewise.
2985 (vect_look_through_possible_promotion): Likewise.
2986 (vect_recog_rotate_pattern): Likewise.
2987 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2989 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2991 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2992 a typedef to a wrapper class.
2993 (NULL_STMT_VEC_INFO): New macro.
2994 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2995 (stmt_vec_info::operator*): New function.
2996 (stmt_vec_info::operator gimple *): Likewise.
2997 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2998 (add_stmt_costs): Likewise.
2999 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
3000 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
3001 (vect_get_known_peeling_cost): Likewise.
3002 (vect_estimate_min_profitable_iters): Likewise.
3003 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3004 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
3005 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3006 (vectorizable_store, free_stmt_vec_infos): Likewise.
3007 (new_stmt_vec_info): Change return type of xcalloc to
3010 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3012 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
3013 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
3014 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
3015 a single_imm_use-based sequence.
3016 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
3018 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3020 * tree-vectorizer.h (vec_info::lookup_def): Declare.
3021 * tree-vectorizer.c (vec_info::lookup_def): New function.
3022 * tree-vect-patterns.c (vect_get_internal_def): Use it.
3023 (vect_widened_op_tree): Likewise.
3024 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3025 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
3026 (vectorizable_reduction): Likewise.
3027 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
3029 (vect_is_slp_reduction): Update calls accordingly. Use
3030 vec_info::lookup_def.
3031 (vect_is_simple_reduction): Likewise
3032 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
3034 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3036 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
3037 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
3038 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
3040 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
3041 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
3042 (vect_update_vf_for_slp, vect_analyze_loop_operations)
3043 (vect_is_slp_reduction, vectorizable_induction)
3044 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
3045 * tree-vect-patterns.c (vect_init_pattern_stmt):
3046 (vect_determine_min_output_precision_1, vect_determine_precisions)
3047 (vect_pattern_recog): Likewise.
3048 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
3049 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
3050 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
3051 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
3052 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
3053 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
3054 info field from a loop to a loop_vec_info.
3056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3058 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
3059 (vec_info::add_stmt): Declare.
3060 * tree-vectorizer.c (vec_info::add_stmt): New function.
3061 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
3062 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
3063 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
3064 (vectorizable_induction): Likewise.
3065 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
3066 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3067 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
3068 (vectorizable_load): Likewise.
3069 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3070 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
3071 (vect_recog_gather_scatter_pattern): Likewise.
3072 (append_pattern_def_seq): Likewise. Remove a check that is
3073 performed by add_stmt itself.
3075 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3077 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
3078 which make_ssa_name was called with new_stmt before new_stmt
3081 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3083 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
3085 (vect_is_slp_reduction): ...here...
3086 (vect_is_simple_reduction): ...and here. Remove repetition of tests
3087 that are already known to be false.
3089 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3091 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
3092 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
3093 STMT_VINFO_NUM_SLP_USES when it's true.
3094 (vect_free_slp_instance): Add a final_p parameter and pass it to
3096 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
3097 (vect_analyze_slp_instance): Likewise.
3098 (vect_slp_analyze_operations): Likewise.
3099 (vect_slp_analyze_bb_1): Likewise.
3100 * tree-vectorizer.c (vec_info): Likewise.
3101 * tree-vect-loop.c (vect_transform_loop): Likewise.
3103 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3105 * tree-vect-loop.c (vectorizable_reduction): Assert that the
3106 function is not called for second and subsequent members of
3109 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
3111 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
3112 cases for nested loops from here to ...
3113 (vect_create_epilog_for_reduction): ...here. Only call
3114 vect_is_simple_use for inner-loop reductions.
3116 2018-07-31 Martin Liska <mliska@suse.cz>
3118 PR gcov-profile/85338
3119 PR gcov-profile/85350
3120 PR gcov-profile/85372
3121 * profile.c (struct location_triplet): New.
3122 (struct location_triplet_hash): Likewise.
3123 (output_location): Do not output a BB that
3124 is already recorded for a line.
3125 (branch_prob): Use streamed_locations.
3127 2018-07-31 Martin Liska <mliska@suse.cz>
3129 PR gcov-profile/85370
3130 * coverage.c (coverage_begin_function): Do not mark target
3131 clones as artificial functions.
3133 2018-07-31 Martin Liska <mliska@suse.cz>
3135 PR gcov-profile/83813
3136 PR gcov-profile/84758
3137 PR gcov-profile/85217
3138 PR gcov-profile/85332
3139 * profile.c (branch_prob): Do not record GOTO expressions
3140 for GIMPLE statements which locations are already streamed.
3142 2018-07-31 Olivier Hainque <hainque@adacore.com>
3144 * gcc.c (handle_spec_function): Accept a soft_matched_part
3145 argument, as do_spec_1. Pass it down to ...
3146 (eval_spec_function): Accept a soft_matched_part argument,
3147 and pass it down to ...
3148 (do_spec_2): Accept a soft_matched_part argument, and pass
3149 it down to do_spec_1.
3150 (do_spec_1): Pass soft_matched_part to handle_spec_function.
3151 (handle_braces): Update call to handle_spec_function.
3152 (driver::set_up_specs): Update calls to do_spec_2.
3153 (compare_debug_dump_opt_spec_function): Likewise.
3154 (compare_debug_self_opt_spec_function): Likewise.
3156 2018-07-31 Olivier Hainque <hainque@adacore.com>
3158 * common.opt (nolibc): New option.
3159 * doc/invoke.texi (Link Options): Document it.
3160 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
3161 * config/alpha/linux.h: Likewise.
3162 * config/arc/elf.h: Likewise.
3163 * config/arm/uclinux-elf.h: Likewise.
3164 * config/arm/unknown-elf.h: Likewise.
3165 * config/avr/avrlibc.h: Likewise.
3166 * config/bfin/bfin.h: Likewise.
3167 * config/bfin/linux.h: Likewise.
3168 * config/bfin/uclinux.h: Likewise.
3169 * config/darwin.h: Likewise.
3170 * config/darwin10.h: Likewise.
3171 * config/darwin12.h: Likewise.
3172 * config/gnu-user.h: Likewise.
3173 * config/lm32/uclinux-elf.h: Likewise.
3174 * config/pa/pa-hpux11.h: Likewise.
3175 * config/pa/pa64-hpux.h: Likewise.
3176 * config/sparc/sparc.h: Likewise.
3178 2018-07-31 Olivier Hainque <hainque@adacore.com>
3180 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3181 undefined variables.
3183 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3186 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3189 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3191 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3192 terminated string literal.
3194 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3196 PR rtl-optimization/85160
3197 * combine.c (is_just_move): New function.
3198 (try_combine): Allow combining two instructions into two if neither of
3199 the original instructions was a move.
3201 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3204 * doc/extend.texi (Global Register Variables): Discourage use of type
3206 (Local Register Variables): Likewise.
3208 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3210 PR tree-optimization/86506
3211 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3213 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3216 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3217 hard_regno, make sure no insn between `from` and `to` clobbers it.
3219 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3220 Tom de Vries <tdevries@suse.de>
3222 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3223 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3224 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3225 PTX_DEFAULT_RUNTIME_DIM.
3226 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3228 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3230 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3231 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3232 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3234 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3236 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3238 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3239 predicate to reflect toc fusion has been deleted.
3240 (toc_fusion_mem_raw): Delete, no longer used.
3241 (toc_fusion_mem_wrapped): Likewise.
3242 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3244 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3245 Delete, no longer used.
3246 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3247 meant to be used for toc fusion.
3248 (rs6000_debug_print_mode): Delete toc fusion debugging.
3249 (rs6000_debug_reg_global): Likewise.
3250 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3251 fusion and secondary reload support that were never used.
3252 (rs6000_option_override_internal): Delete TOC fusion, that was only
3253 partially defined, and it did not work unless you also used the
3255 (rs6000_legitimate_address_p): Delete TOC fusion support.
3256 (rs6000_opt_masks): Likewise.
3257 (fusion_wrap_memory_address): Delete function, no longer used.
3258 (fusion_split_address); Delete TOC fusion support.
3259 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3260 longer used with toc fusion being deleted.
3261 (TARGET_TOC_FUSION_FP): Likewise.
3262 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3264 (toc fusion spliter): Delete TOC fusion support.
3265 (toc_fusionload_<mode>): Likewise.
3266 (toc_fusionload_di): Likewise.
3267 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3268 longer needs to be named. Rename predicate to delete TOC fusion.
3269 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3270 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3271 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3272 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3273 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3275 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3277 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3278 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3279 __int128 in built-in function prototypes.
3280 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3281 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3283 2018-07-27 Martin Sebor <msebor@redhat.com>
3285 PR tree-optimization/86696
3286 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3287 types, including enums.
3288 (handle_char_store): Be prepared for the above function to fail.
3290 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3292 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3293 when optimization level is lower than 2 or optimize for size.
3295 2018-07-26 Martin Sebor <msebor@redhat.com>
3297 PR tree-optimization/86043
3298 PR tree-optimization/86042
3299 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3300 (get_string_cst_length): Rename...
3301 (get_min_string_length): ...to this. Add argument.
3302 (handle_char_store): Extend to handle multi-character stores by
3304 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3305 * tree.h (initializer_zerop): Add argument.
3307 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3310 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3311 declare target to variables if they have always,{to,from,tofrom} map
3314 2018-07-26 Martin Liska <mliska@suse.cz>
3317 * lto-wrapper.c: Add linker_output as prefix
3318 for ltrans_output_file.
3320 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3322 PR rtl-optimization/85805
3323 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3324 value for hard registers if that was written in the same mode.
3326 2018-07-26 Martin Liska <mliska@suse.cz>
3328 PR gcov-profile/86536
3329 * gcov.c (format_gcov): Use printf format %.*f directly
3330 and do not handle special values.
3332 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3334 * common/config/arc/arc-common.c (arc_option_optimization_table):
3335 Update default optimizations for size.
3337 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3339 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3340 * config/arc/constraints.md (CfZ): New constraint.
3341 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3342 (subsf3_fpu): Likewise.
3343 (cmpsf_fpu): Likewise.
3344 (cmpsf_fpu_uneq): Likewise.
3346 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3348 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3350 (arc_is_uncached_mem_p): uncached applies to both the variable and
3353 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3355 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3358 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3360 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3361 field "m_scopes" from vec to auto_vec.
3363 2018-07-25 Martin Liska <mliska@suse.cz>
3365 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3368 2018-07-25 Richard Biener <rguenther@suse.de>
3371 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3372 special wrt context_die late.
3373 (gen_subprogram_die): Re-use DIEs in local scope.
3375 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3377 PR tree-optimization/86644
3378 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3380 2018-07-25 Martin Liska <mliska@suse.cz>
3383 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3384 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3386 2018-07-25 Martin Liska <mliska@suse.cz>
3389 * params.def: Explain ASan abbreviation and provide
3390 a documentation link.
3392 2018-07-24 Martin Sebor <msebor@redhat.com>
3394 PR tree-optimization/86622
3395 PR tree-optimization/86532
3396 * builtins.h (string_length): Declare.
3397 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3398 (check_access): Be prepared for non-constant length ranges.
3399 (string_length): Make extern.
3400 * expr.c (string_constant): Only handle the minor non-constant
3401 array index. Use string_constant to compute the length of
3402 a generic string constant.
3404 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3406 PR tree-optimization/86618
3407 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3408 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3410 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3412 PR tree-optimization/86636
3413 * json.cc (json::object::set): Fix comment. Add assertions.
3414 (json::array::append): Move here from json.h. Add comment and an
3416 (json::string::string): Likewise.
3417 * json.h (json::array::append): Move to json.cc.
3418 (json::string::string): Likewise.
3419 * optinfo-emit-json.cc
3420 (optrecord_json_writer::impl_location_to_json): Assert that we
3421 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3422 wrapper around it. Expand the location once, rather than three
3424 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3425 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3427 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3428 places. Fix some overlong lines.
3430 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3432 * config/aarch64/aarch64-simd.md
3433 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3434 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3435 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3436 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3437 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3438 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3439 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3440 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3441 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3443 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3446 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3447 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3448 and abs_d == d, do the power of two handling if profitable.
3450 2018-07-24 Richard Biener <rguenther@suse.de>
3452 * match.pd: Add BIT_FIELD_REF canonicalizations.
3454 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3457 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3459 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3461 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3462 terminated STRING_CST object.
3464 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3466 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3468 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3470 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3471 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3472 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3473 the elements into a register.
3474 (rs6000_split_v4si_init_di_reg): Delete.
3475 (rs6000_split_v4si_init): Delete.
3476 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3477 (vsx_init_v4si): Rewrite as a define_expand.
3479 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3481 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3482 zero_extend argument from memory): New.
3484 2018-07-22 Martin Sebor <msebor@redhat.com>
3487 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3488 diagnosing calls with unknown arguments unless -Walloca-larger-than
3489 is restricted to less than PTRDIFF_MAX bytes.
3491 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3493 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3495 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3497 * pretty-print.c (text_info::set_location): Remove redundant
3498 "line_table" parameter from call to rich_location::set_range.
3500 2018-07-20 Martin Sebor <msebor@redhat.com>
3503 * builtins.c (expand_builtin_alloca): Adjust.
3504 * calls.c (alloc_max_size): Simplify.
3505 * cgraphunit.c (cgraph_node::expand): Adjust.
3506 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3508 (frame_larger_than_size): Same.
3509 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3510 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3512 * doc/invoke.texi (GCC Command Options): Document option arguments.
3513 Explain byte-size arguments and suffixes.
3514 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3515 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3516 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3517 * doc/options.texi (UInteger): Expand.
3518 (Host_Wide_Int, ByteSize): Document new properties.
3519 * final.c (final_start_function_1): Include sizes in an error message.
3520 * function.c (frame_offset_overflow): Same.
3521 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3522 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3523 Diagnose unbounded alloca calls only for limits of less than
3525 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3526 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3528 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3529 only for limits of less than PTRDIFF_MAX.
3530 * langhooks-def.h (lhd_handle_option): Change function argument
3532 * langhooks.c (lhd_handle_option): Same.
3533 * langhooks.h (handle_option): Same.
3534 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3536 (var_type, var_type_struct): Same.
3537 (var_set): Handle ByteSize flag.
3538 * optc-gen.awk: Add comments to output to ease debugging. Make
3539 use of HOST_WIDE_INT where appropriate.
3540 * opts-gen-save.awk: Use %lx to format unsigned long.
3541 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3542 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3543 arguments. Parse bytes-size suffixes.
3544 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3545 (enum_value_to_arg): Same.
3546 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3547 (handle_option): Adjust.
3548 (generate_option): Change function argument to HOST_WIDE_INT.
3549 (cmdline_handle_error): Adjust.
3550 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3551 (set_option): Change function argument to HOST_WIDE_INT.
3552 (option_enabled): Handle cl_host_wide_int.
3553 (get_option_state): Handle CLVC_SIZE.
3554 (control_warning_option): Same.
3555 * opts.c (common_handle_option): Change function argument to
3556 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3557 OPT_Wvla_larger_than_.
3558 * opts.h (enum cl_var_type): Add an enumerator.
3559 * stor-layout.c (layout_decl): Print a more meaningful warning.
3560 * toplev.c (output_stack_usage): Adjust.
3562 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3564 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3565 call to inline_expand_builtin_string_cmp.
3566 (expand_builtin_strcmp): Likewise.
3567 (expand_builtin_strncmp): Likewise.
3568 (inline_string_cmp): Delete the last parameter, change char_type_node
3569 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3571 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3572 the inlining expansion on target where the type of the call has same or
3573 narrower precision than unsigned char.
3575 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3577 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3578 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3579 * common.opt (fsave-optimization-record): New option.
3580 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3581 * doc/invoke.texi (-fsave-optimization-record): New option.
3582 * dumpfile.c: Include "optinfo-emit-json.h".
3583 (struct kv_pair): Move to coretypes.h.
3584 (optgroup_options): Make non-static.
3585 (dump_context::end_scope): Call
3586 optimization_records_maybe_pop_dump_scope.
3587 * dumpfile.h (optgroup_options): New decl.
3588 * json.cc: New file.
3590 * optinfo-emit-json.cc: New file.
3591 * optinfo-emit-json.h: New file.
3592 * optinfo.cc: Include "optinfo-emit-json.h".
3593 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3594 (optinfo_enabled_p): Check optimization_records_enabled_p.
3595 (optinfo_wants_inlining_info_p): Likewise.
3596 * optinfo.h: Update comment.
3597 * profile-count.c (profile_quality_as_string): New function.
3598 * profile-count.h (profile_quality_as_string): New decl.
3599 (profile_count::quality): New accessor.
3600 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3601 and optinfo_emit_json_cc_tests.
3602 * selftest.h (selftest::json_cc_tests): New decl.
3603 (selftest::optinfo_emit_json_cc_tests): New decl.
3604 * toplev.c: Include "optinfo-emit-json.h".
3605 (compile_file): Call optimization_records_finish.
3606 (do_compile): Call optimization_records_start.
3607 * tree-ssa-live.c: Include optinfo.h.
3608 (remove_unused_scope_block_p): Retain inlining information if
3609 optinfo_wants_inlining_info_p returns true.
3611 2018-07-20 Richard Biener <rguenther@suse.de>
3614 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3615 to cover -flto-partition=none.
3617 2018-07-20 Martin Liska <mliska@suse.cz>
3619 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3620 (get_decl_source_range): Remove unused function.
3622 2018-07-20 Richard Biener <rguenther@suse.de>
3624 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3625 (struct vn_phi_s): Likewise.
3626 (struct vn_reference_s): Likewise.
3627 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3628 for searching the slot of an entry known to be in the hash itself.
3629 (vn_phi_hasher::equal): Likewise.
3630 (vn_reference_hasher::equal): Likewise.
3631 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3633 (optimistic_info, current_info): Remove, keeping only valid_info.
3634 (vn_reference_lookup_1): Remove fallback lookup.
3635 (vn_reference_lookup_2): Likewise.
3636 (vn_nary_op_lookup_1): Likewise.
3637 (vn_phi_lookup): Likewise.
3638 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3640 (vn_reference_insert): Adjust, chain the inserted hash element
3641 at last_inserted_ref.
3642 (vn_reference_insert_pieces): Likewise.
3643 (visit_reference_op_call): Likewise.
3644 (vn_nary_op_insert_into): Chain the inserted hash element at
3646 (vn_nary_op_insert_pieces): Adjust.
3647 (vn_nary_op_insert): Likewise.
3648 (vn_nary_op_insert_stmt): Likewise.
3649 (vn_phi_insert): Adjust, chain the inserted hash element at
3651 (process_scc): Remove clearing and copying the optimistic
3652 table. Instead remove elements inserted during an optimistic
3653 iteration from the single table we maintain.
3654 (init_scc_vn): Adjust.
3655 (free_scc_vn): Likewise.
3656 (sccvn_dom_walker::record_cond): Likewise.
3657 (sccvn_dom_walker::after_dom_children): Likewise.
3659 2018-07-19 Martin Sebor <msebor@redhat.com>
3661 PR tree-optimization/84047
3662 PR tree-optimization/83776
3663 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3664 (check_array_bounds): Call it.
3666 2018-07-19 Martin Sebor <msebor@redhat.com>
3668 * align.h (align_flags): Use member initialization.
3670 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3672 * Makefile.in (OBJS): Add optinfo.o.
3673 * coretypes.h (class symtab_node): New forward decl.
3674 (struct cgraph_node): New forward decl.
3675 (class varpool_node): New forward decl.
3676 * dump-context.h: New file.
3677 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3679 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3680 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3681 (set_alt_dump_file): Likewise.
3682 (dump_context::~dump_context): New dtor.
3683 (dump_gimple_stmt): Move implementation to...
3684 (dump_context::dump_gimple_stmt): ...this new member function.
3685 Add the stmt to any pending optinfo, creating one if need be.
3686 (dump_gimple_stmt_loc): Move implementation to...
3687 (dump_context::dump_gimple_stmt_loc): ...this new member function.
3688 Start a new optinfo and add the stmt to it.
3689 (dump_gimple_expr): Move implementation to...
3690 (dump_context::dump_gimple_expr): ...this new member function.
3691 Add the stmt to any pending optinfo, creating one if need be.
3692 (dump_gimple_expr_loc): Move implementation to...
3693 (dump_context::dump_gimple_expr_loc): ...this new member function.
3694 Start a new optinfo and add the stmt to it.
3695 (dump_generic_expr): Move implementation to...
3696 (dump_context::dump_generic_expr): ...this new member function.
3697 Add the tree to any pending optinfo, creating one if need be.
3698 (dump_generic_expr_loc): Move implementation to...
3699 (dump_context::dump_generic_expr_loc): ...this new member
3700 function. Add the tree to any pending optinfo, creating one if
3702 (dump_printf): Move implementation to...
3703 (dump_context::dump_printf_va): ...this new member function. Add
3704 the text to any pending optinfo, creating one if need be.
3705 (dump_printf_loc): Move implementation to...
3706 (dump_context::dump_printf_loc_va): ...this new member function.
3707 Start a new optinfo and add the stmt to it.
3708 (dump_dec): Move implementation to...
3709 (dump_context::dump_dec): ...this new member function. Add the
3710 value to any pending optinfo, creating one if need be.
3711 (dump_context::dump_symtab_node): New member function.
3712 (dump_context::get_scope_depth): New member function.
3713 (dump_context::begin_scope): New member function.
3714 (dump_context::end_scope): New member function.
3715 (dump_context::ensure_pending_optinfo): New member function.
3716 (dump_context::begin_next_optinfo): New member function.
3717 (dump_context::end_any_optinfo): New member function.
3718 (dump_context::s_current): New global.
3719 (dump_context::s_default): New global.
3720 (dump_scope_depth): Delete global.
3721 (dumpfile_ensure_any_optinfo_are_flushed): New function.
3722 (dump_symtab_node): New function.
3723 (get_dump_scope_depth): Reimplement in terms of dump_context.
3724 (dump_begin_scope): Likewise.
3725 (dump_end_scope): Likewise.
3726 (selftest::temp_dump_context::temp_dump_context): New ctor.
3727 (selftest::temp_dump_context::~temp_dump_context): New dtor.
3728 (selftest::verify_item): New function.
3729 (ASSERT_IS_TEXT): New macro.
3730 (ASSERT_IS_TREE): New macro.
3731 (ASSERT_IS_GIMPLE): New macro.
3732 (selftest::test_capture_of_dump_calls): New test.
3733 (selftest::dumpfile_c_tests): Call it.
3734 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3735 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3736 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3737 descriptive comment.
3738 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3739 (dump_node, dump_bb): Move these unrelated decls.
3740 (class dump_manager): Add leading comment.
3741 * optinfo.cc: New file.
3742 * optinfo.h: New file.
3744 2018-07-19 Michael Collison <michael.collison@arm.com>
3745 Richard Henderson <rth@redhat.com>
3747 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3748 (subti): Handle op1 zero.
3749 (subvti4, usub4ti4): New.
3750 (*sub<GPI>3_compare1_imm): New.
3751 (sub<GPI>3_carryinCV): New.
3752 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3753 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3755 2018-07-19 Michael Collison <michael.collison@arm.com>
3756 Richard Henderson <rth@redhat.com>
3758 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3759 (addti3): Create simpler code if low part is already known to be 0.
3760 (addvti4, uaddvti4): New.
3761 (*add<GPI>3_compareC_cconly_imm): New.
3762 (*add<GPI>3_compareC_cconly): New.
3763 (*add<GPI>3_compareC_imm): New.
3764 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3765 handle constants within this pattern..
3766 (*add<GPI>3_compareV_cconly_imm): New.
3767 (*add<GPI>3_compareV_cconly): New.
3768 (*add<GPI>3_compareV_imm): New.
3769 (add<GPI>3_compareV): New.
3770 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3771 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3772 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3773 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3774 with 'comparison' operator.
3775 (*add<GPI>3_compareV_cconly_imm): Ditto.
3776 (*add<GPI>3_compareV_cconly): Ditto.
3777 (*add<GPI>3_compareV_imm): Ditto.
3778 (add<GPI>3_compareV): Ditto.
3779 (add<mode>3_carryinC): Ditto.
3780 (*add<mode>3_carryinC_zero): Ditto.
3781 (*add<mode>3_carryinC): Ditto.
3782 (add<mode>3_carryinV): Ditto.
3783 (*add<mode>3_carryinV_zero): Ditto.
3784 (*add<mode>3_carryinV): Ditto.
3786 2018-07-19 Michael Collison <michael.collison@arm.com>
3787 Richard Henderson <rth@redhat.com>
3789 * config/aarch64/aarch64-modes.def (CC_V): New.
3790 * config/aarch64/aarch64-protos.h
3791 (aarch64_addti_scratch_regs): Declare
3792 (aarch64_subvti_scratch_regs): Declare.
3793 (aarch64_expand_subvti): Declare.
3794 (aarch64_gen_unlikely_cbranch): Declare
3795 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3796 for signed overflow using CC_Vmode.
3797 (aarch64_get_condition_code_1): Handle CC_Vmode.
3798 (aarch64_gen_unlikely_cbranch): New function.
3799 (aarch64_addti_scratch_regs): New function.
3800 (aarch64_subvti_scratch_regs): New function.
3801 (aarch64_expand_subvti): New function.
3803 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3805 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3807 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3808 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3811 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3814 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3815 address check not strict.
3817 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3819 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3821 (store_pair_lanes<mode>): Likewise.
3822 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3823 enum value 'ADDR_QUERY_LDP_STP_N'.
3824 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3825 (aarch64_print_address_internal): Add declaration.
3826 (aarch64_print_ldpstp_address): Remove.
3827 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3828 (aarch64_print_operand): Change printing of 'y'.
3829 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3830 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3831 'true' rather than '1'.
3832 * config/aarch64/constraints.md (Uml): Likewise.
3833 (Uml): Rename to Umn.
3836 2018-07-19 Richard Biener <rguenther@suse.de>
3838 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3840 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3841 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3842 (vn_reference_hasher): Likewise.
3843 (struct vn_tables_s): Remove obstack and alloc-pool members.
3844 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3845 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3846 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3847 (vn_reference_insert_pieces): Likewise.
3848 (alloc_vn_nary_op_noinit): Adjust.
3849 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3850 (vn_phi_eq): Adjust.
3851 (shared_lookup_phiargs): Remove.
3852 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3853 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3854 (visit_reference_op_call): Likewise.
3855 (copy_nary, copy_phi, copy_reference): Remove.
3856 (process_scc): Rewind the obstack when iterating. Do not
3857 copy the elements to valid_info but just move them from one
3858 hashtable to the other.
3859 (allocate_vn_table): Adjust.
3860 (free_vn_table): Likewise.
3861 (init_scc_vn): Likewise.
3862 (free_scc_vn): Likewise.
3864 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
3867 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3868 indirect_return as function type attribute.
3869 (ix86_attribute_table): Change indirect_return to function
3871 * doc/extend.texi: Update indirect_return attribute.
3873 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
3875 * wide-int.h (widest2_int): New.
3876 * gimple-fold.c (arith_overflowed_p): Use it.
3877 * tree.h (widest2_int_cst): New.
3878 * tree-vrp.c (wide_int_binop_overflow): Rename from
3879 vrp_int_const_binop.
3880 Rewrite to work on trees.
3881 (extract_range_from_multiplicative_op_1): Abstract code to...
3882 (wide_int_range_min_max): ...here.
3883 (wide_int_range_cross_product): ...and here.
3884 (extract_range_from_binary_expr_1): Abstract overflow code to...
3885 (wide_int_range_mult_wrapping): ...here.
3886 * tree-vrp.h (wide_int_range_cross_product): New.
3887 (wide_int_range_mult_wrapping): New.
3889 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
3890 Julia Koval <julia.koval@intel.com>
3892 * config/i386/x86-tune-costs.h (skylake_memcpy,
3893 skylake_memset): Replace rep_prefix with unrolling for size 512.
3895 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
3898 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3899 comparision with EQ_EXPR in last stmt.
3901 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
3903 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3904 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3905 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3906 previously known as "PowerPC AltiVec Built-in Functions". Move
3907 some material to new subsubsections "PowerPC AltiVec Built-in
3908 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3910 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3911 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3912 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3913 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3915 2018-07-18 Richard Biener <rguenther@suse.de>
3917 PR tree-optimization/86557
3918 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3921 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
3923 * config/s390/s390.c (s390_function_profiler): Generate CFI.
3925 2018-07-17 Jeff Law <law@redhat.com>
3927 * config/arm/arm.c (get_label_padding): Update for recent
3928 changes to label_to_alignment.
3930 PR tree-optimization/86010
3931 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3933 * config/mips/mips.c (vr4130_align_insns): Update for recent
3934 changes to label_to_alignment.
3936 * config/frv/frv.c (frv_label_align): Update for recent changes
3937 to label_to_alignment.
3939 * config/nios2/nios2.c (nios2_label_align): Update for recent
3940 changes which dropped ALIGN_LABELS_LOG.
3942 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3944 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3945 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3947 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
3949 * config/arc/arc.c (arc_label_align): Use align_labels instead of
3950 deprecated align_labels_log.
3952 2018-07-17 Richard Biener <rguenther@suse.de>
3955 * dwarf2out.c (init_sections_and_labels): Always generate
3956 a debug_line_str_section for early LTO debug.
3957 (dwarf2out_finish): Reset debug_line_str_hash output early.
3958 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3960 (dwarf2out_early_finish): Output debug_line_str.
3962 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3964 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3965 index register on z196 or later.
3967 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3969 * config/s390/s390.c (s390_default_align): Set default function
3971 (s390_override_options_after_change): Call s390_default align.
3972 (s390_option_override_internal): Call s390_default_align.
3973 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3975 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3978 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3979 to _looptemp_ clauses, other than the first two.
3981 2018-07-17 Martin Liska <mliska@suse.cz>
3983 * opts.c: Do not enable OPT_falign_* for -Os.
3985 2018-07-17 Martin Liska <mliska@suse.cz>
3987 * align.h (MAX_CODE_ALIGN): New.
3988 (MAX_CODE_ALIGN_VALUE): New.
3989 * common/config/i386/i386-common.c (ix86_handle_option):
3990 (MAX_CODE_ALIGN): Moved to align.h.
3991 * final.c (MAX_CODE_ALIGN): Likewise.
3992 * opts.c (parse_and_check_align_values):
3993 (MAX_CODE_ALIGN): Likewise.
3994 (MAX_CODE_ALIGN_VALUE): Likewise.
3996 2018-07-17 Martin Liska <mliska@suse.cz>
3998 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3999 in order to fulfil coding style.
4000 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
4001 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4002 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4003 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
4004 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
4005 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
4006 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
4007 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
4008 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4010 2018-07-17 Martin Liska <mliska@suse.cz>
4012 * align.h: New file.
4013 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
4015 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
4016 align_flags of label_to_alignment.
4017 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
4019 * config/m68k/m68k.c: Do not use removed align_labels_value and
4021 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
4022 (LOOP_ALIGN): Likewise.
4023 (LABEL_ALIGN): Likewise.
4024 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4025 Remove not used macro.
4026 (rs6000_loop_align): Change return type to align_flags.
4027 (rs6000_loop_align_max_skip): Remove.
4028 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
4029 Change return type to align_flags.
4030 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
4031 Remove not used macro.
4032 (rs6000_loop_align): Change return type to align_flags.
4033 (rs6000_loop_align_max_skip): Remove.
4034 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
4035 * config/rx/rx-protos.h (rx_align_for_label): Make it
4037 * config/rx/rx.c (rx_align_for_label): Change return type
4039 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
4041 into align_flags class.
4042 (LABEL_ALIGN): Likewise.
4043 (LOOP_ALIGN): Likewise.
4044 * config/s390/s390.c (s390_label_align): Use align_flags
4046 (s390_asm_output_function_label): Likewise.
4047 * config/sh/sh.c (sh_override_options_after_change):
4048 Use align_flags class directly without macros.
4049 (find_barrier): Likewise.
4050 (barrier_align): Likewise.
4051 (sh_loop_align): Likewise.
4052 * config/spu/spu.c (spu_option_override):
4053 Use align_flags_tuple::get_value instead of removed macros.
4054 (spu_sched_init): Likewise.
4055 * config/spu/spu.h (GTY): Likewise.
4056 * config/visium/visium.c (visium_option_override):
4057 Set "8" as default secondary alignment.
4058 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
4059 in order to guarantee secondary alignment of 8.
4060 * coretypes.h: Include align.h header file.
4061 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
4062 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
4063 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
4064 * doc/tm.texi.in: Likewise.
4065 * final.c (struct label_alignment): Remove not used structure.
4066 (LABEL_ALIGN): Change type to align_flags.
4067 (LOOP_ALIGN): Likewise.
4068 (JUMP_ALIGN): Likewise.
4069 (default_loop_align_max_skip): Remove.
4070 (default_label_align_max_skip): Likewise.
4071 (default_jump_align_max_skip): Likewise.
4072 (default_label_align_after_barrier_max_skip):
4073 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
4074 (LABEL_TO_MAX_SKIP): Remove.
4075 (label_to_alignment): Return align_flags type instead of integer.
4076 (label_to_max_skip): Remove.
4077 (align_fuzz): Use align_flags type.
4078 (compute_alignments): Use align_flags type and use align_flags::max
4079 to combine multiple alignments.
4080 (grow_label_align): Grow vec instead of C array.
4081 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
4082 (shorten_branches): Use align_flags type and use align_flags::max
4083 to combine multiple alignments.
4084 (final_scan_insn_1): Remove usage of secondary alignment that comes
4085 from label alignment, but instead use proper secondary alignment
4086 which is computed in grow_label_align.
4087 * flags.h (struct align_flags_tuple): Move to align.h.
4088 (struct align_flags): Likewise.
4089 (state_align_loops): Rename to align_loops.
4090 (state_align_jumps): Rename to align_jumps.
4091 (state_align_labels): Rename to align_labels.
4092 (state_align_functions): Rename to align_functions.
4093 (align_loops_log): Remove.
4094 (align_jumps_log): Remove.
4095 (align_labels_log): Remove.
4096 (align_functions_log): Remove.
4097 (align_loops_max_skip): Remove.
4098 (align_jumps_max_skip): Remove.
4099 (align_labels_max_skip): Remove.
4100 (align_functions_max_skip): Remove.
4101 (align_loops_value): Remove.
4102 (align_jumps_value): Remove.
4103 (align_labels_value): Remove.
4104 (align_functions_value): Remove.
4105 * output.h (label_to_alignment): Change return type to align_flags.
4106 (label_to_max_skip): Remove.
4107 * target.def: Remove loop_align_max_skip, label_align_max_skip,
4108 jump_align_max_skip macros.
4109 * targhooks.h (default_loop_align_max_skip): Remove.
4110 (default_label_align_max_skip): Likewise.
4111 (default_jump_align_max_skip): Likewise.
4112 (default_label_align_after_barrier_max_skip): Remove.
4113 * toplev.c (read_log_maxskip): Use ::normalize function.
4114 (parse_N_M): Remove not used argument and also call ::normalize.
4115 (parse_alignment_opts): Do not pass unused arguments.
4116 * varasm.c (assemble_start_function): Use directly align_functions
4117 instead of removed macros.
4118 * system.h: Do not poison removed macros.
4120 2018-07-17 Jakub Jelinek <jakub@redhat.com>
4123 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
4124 and cond temporaries don't have reference type if iterator has
4125 pointer type. For init use &for_pre_body instead of pre_p if
4126 for_pre_body is non-empty.
4128 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4130 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
4131 double-double modes to SFmode directly directly.
4132 (trunc<mode>sf2_fprs): Delete.
4134 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4136 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
4137 for conversions between IFmode and the decimal floating point modes.
4138 (init_float128_ieee): Use the correct names for conversions between
4139 KFmode and the decimal floating point modes.
4141 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
4143 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
4144 for the conversions between TDmode and IFmode.
4145 (init_float128_ieee): Use more correct names for the conversions
4146 between TDmode and KFmode.
4148 2018-07-16 Jakub Jelinek <jakub@redhat.com>
4150 PR tree-optimization/86526
4151 * builtins.c (expand_builtin_memcmp): Formatting fixes.
4152 (inline_expand_builtin_string_cmp): Likewise.
4153 (inline_string_cmp): Likewise. Use c_readstr instead of
4154 builtin_memcpy_read_str. Add unit_mode temporary.
4156 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4159 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
4160 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
4162 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
4164 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
4165 Alphabetize prototypes of built-in functions, separating out
4166 built-in functions that are listed in this section but should be
4167 described elsewhere.
4169 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4172 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4173 conditional move when trapping comparison was split to a
4174 non-trapping one (and vice versa).
4176 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4178 * config/s390/s390.c (s390_function_profiler): Generate nops
4179 instead of profiler call sequences.
4180 * config/s390/s390.opt: Add the new option.
4182 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4184 * config/s390/s390.c (s390_function_profiler): Generate
4185 __mcount_loc section.
4186 * config/s390/s390.opt: Add the new option.
4188 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4190 * common.opt: Add the new warning.
4191 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4192 %r0,__fentry__" when -mfentry is specified.
4193 (s390_option_override_internal): Disallow -mfentry for 31-bit
4195 * config/s390/s390.opt: Add the new option.
4197 2018-07-16 Richard Biener <rguenther@suse.de>
4200 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4201 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4203 2018-07-16 Martin Liska <mliska@suse.cz>
4206 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4209 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4211 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4213 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4215 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4217 * config/arc/arc-cpus.def (hs4x): New cpu.
4219 * config/arc/arc-tables.opt: Regenerate.
4220 * config/arc/arc.c (arc_sched_issue_rate): New function.
4221 (TARGET_SCHED_ISSUE_RATE): Define.
4222 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4223 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4225 (attr tune): Add ARCHS4x tune values.
4226 (attr tune_dspmpy): Define.
4227 (*tst): Correct instruction type.
4228 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4229 * config/arc/arcHS4x.md: New file.
4230 * config/arc/fpu.md: Update instruction type attributes.
4231 * config/arc/t-multilib: Regenerate.
4233 2018-07-16 Tom de Vries <tdevries@suse.de>
4236 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4238 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4240 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4243 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4245 PR tree-optimization/86514
4246 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4247 conversion to a boolean type from a type with greater precision.
4249 2018-07-16 Tom de Vries <tdevries@suse.de>
4251 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4252 dump_flags request TDF_SLIM.
4254 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4256 * fold-const.c (int_const_binop_1): Abstract...
4257 (wide_int_binop): ...wide int code here.
4258 (poly_int_binop): ...poly int code here.
4259 Abstract the rest of int_const_binop_1 into int_const_binop.
4260 * fold-const.h (wide_int_binop): New.
4261 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4262 Remove useless PLUS/MINUS_EXPR case.
4263 (zero_nonzero_bits_from_vr): Move wide int code...
4264 (zero_nonzero_bits_from_bounds): ...here.
4265 (extract_range_from_binary_expr_1): Move mask optimization code...
4266 (range_easy_mask_min_max): ...here.
4267 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4268 (range_easy_mask_min_max): New.
4270 2018-07-15 Jeff Law <law@redhat.com>
4273 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4276 2018-07-14 Jim Wilson <jimw@sifive.com>
4278 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4280 2018-07-14 Paul Koning <ni1d@arrl.net>
4282 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4284 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4286 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4289 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4290 Steve Munroe <munroesj52@gmail.com>
4292 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4293 (_mm_andnot_si128): Likewise.
4294 (_mm_or_si128): Likewise.
4295 (_mm_xor_si128): Likewise.
4297 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4300 * builtins.c (expand_builtin_memcmp): Inline the calls first
4301 when result_eq is false.
4302 (expand_builtin_strcmp): Inline the calls first.
4303 (expand_builtin_strncmp): Likewise.
4304 (inline_string_cmp): New routine. Expand a string compare
4305 call by using a sequence of char comparison.
4306 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4307 a call to str(n)cmp/memcmp.
4308 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4310 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4312 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4314 * config/arm/driver-arm.c: Include arm-native.h.
4315 (host_detect_local_cpu): Use auto-generated data tables.
4316 (vendors, arm_cpu_table): Delete. Move part information to ...
4317 * config/arm/arm-cpus.in: ... here.
4318 * config/arm/parsecpu.awk (gen_native): New function.
4319 (vendor, part): New CPU fields.
4320 (END): Add support for building the native CPU detection tables.
4321 * config/arm/t-arm (arm-native.h): Add build rule.
4322 (driver-arm.o): Add dependency on arm-native.h.
4324 2018-07-13 Richard Biener <rguenther@suse.de>
4327 * match.pd (addr1 - addr2): Allow either of the operand to
4330 2018-07-13 Tom de Vries <tdevries@suse.de>
4332 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4335 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4337 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4338 arrays instead of numbered variables.
4340 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4342 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4343 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4345 2018-07-13 Richard Biener <rguenther@suse.de>
4348 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4349 instead of get_context_die.
4351 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4352 Richard Biener <rguenther@suse.de>
4355 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4356 that the loop latch destination where phi is defined.
4358 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4360 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4361 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4362 (riscv_set_current_function): Extract getting interrupt type to new
4364 (riscv_get_interrupt_type): New function.
4365 (riscv_merge_decl_attributes): New function, checking interrupt type is
4367 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4369 2018-07-12 Paul Koning <ni1d@arrl.net>
4371 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4374 2018-07-12 Paul Koning <ni1d@arrl.net>
4376 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4377 zero reference, add doloop_end instead.
4378 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4379 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4380 detail for doloop_end.
4382 2018-07-12 Martin Sebor <msebor@redhat.com>
4385 * attribs.c (decl_attributes): Reject conflicting attributes before
4386 calling attribute handlers.
4388 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4390 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4392 (gcc::dump_manager::get_dump_file_name): likewise.
4393 (dump_begin): Likewise.
4394 * dumpfile.h (dump_begin): Update prototype.
4395 (gcc::dump_manager::get_dump_file_name,
4396 gcc::dump_manager::get_dump_file_name): Update prototype.
4398 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4400 * internal-fn.h (vectorizable_internal_fn_p): New function.
4401 * tree-vect-slp.c (compatible_calls_p): Likewise.
4402 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4403 to internal functions.
4404 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4406 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4408 * fold-const.h (inverse_conditions_p): Declare.
4409 * fold-const.c (inverse_conditions_p): New function.
4410 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4411 that test the inverse condition of a conditional internal function.
4412 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4413 * internal-fn.c (internal_fn_mask_index): Handle conditional
4415 (vectorized_internal_fn_supported_p): New function.
4416 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4417 (any_pred_load_store): Replace with...
4418 (need_to_predicate): ...this new variable.
4419 (redundant_ssa_names): New variable.
4420 (ifcvt_can_use_mask_load_store): Move initial checks to...
4421 (ifcvt_can_predicate): ...this new function. Handle tree codes
4422 for which a conditional internal function exists.
4423 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4424 instead of ifcvt_can_use_mask_load_store. Update after variable
4426 (predicate_load_or_store): New function, split out from
4427 predicate_mem_writes.
4428 (check_redundant_cond_expr): New function.
4429 (value_available_p): Likewise.
4430 (predicate_rhs_code): Likewise.
4431 (predicate_mem_writes): Rename to...
4432 (predicate_statements): ...this. Use predicate_load_or_store
4433 and predicate_rhs_code.
4434 (combine_blocks, tree_if_conversion): Update after above name changes.
4435 (ifcvt_local_dce): Handle redundant_ssa_names.
4436 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4437 general conditional functions.
4438 * tree-vect-stmts.c (vectorizable_call): Likewise.
4440 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4441 Alan Hayward <alan.hayward@arm.com>
4442 David Sherwood <david.sherwood@arm.com>
4444 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4445 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4446 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4447 plus and minus and convert them into IFN_COND_FMA-based sequences.
4448 (convert_mult_to_fma): Handle conditional plus and minus.
4450 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4452 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4453 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4454 (cond_fnms_optab): New optabs.
4455 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4457 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4458 * internal-fn.h (get_conditional_internal_fn): Declare.
4459 (get_unconditional_internal_fn): Likewise.
4460 * internal-fn.c (cond_ternary_direct): New macro.
4461 (expand_cond_ternary_optab_fn): Likewise.
4462 (direct_cond_ternary_optab_supported_p): Likewise.
4463 (FOR_EACH_COND_FN_PAIR): Likewise.
4464 (get_conditional_internal_fn): New function.
4465 (get_unconditional_internal_fn): Likewise.
4466 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4467 (gimple_match_op::gimple_match_op): Add a new overload for 5
4469 (gimple_match_op::set_op): Likewise.
4470 (gimple_resimplify5): Declare.
4471 * genmatch.c (decision_tree::gen): Generate simplifications for
4473 * gimple-match-head.c (gimple_simplify): Define an overload for
4474 5 operands. Handle calls with 5 arguments in the top-level overload.
4475 (convert_conditional_op): Handle conversions from unconditional
4476 internal functions to conditional ones.
4477 (gimple_resimplify5): New function.
4478 (build_call_internal): Pass a fifth operand.
4479 (maybe_push_res_to_seq): Likewise.
4480 (try_conditional_simplification): Try converting conditional
4481 internal functions to unconditional internal functions.
4482 Handle 3-operand unconditional forms.
4483 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4484 Define ternary equivalents of the current rules for binary conditional
4486 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4488 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4489 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4490 (optab): Handle them.
4491 (SVE_COND_FP_TERNARY): New int iterator.
4492 (sve_fmla_op, sve_fmad_op): New int attributes.
4493 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4494 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4495 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4497 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4499 * target.def (preferred_else_value): New target hook.
4500 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4501 * doc/tm.texi: Regenerate.
4502 * targhooks.h (default_preferred_else_value): Declare.
4503 * targhooks.c (default_preferred_else_value): New function.
4504 * internal-fn.h (conditional_internal_fn_code): Declare.
4505 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4506 (get_conditional_internal_fn): Use it.
4507 (conditional_internal_fn_code): New function.
4508 * gimple-match.h (gimple_match_cond): New struct.
4509 (gimple_match_op): Add a cond member function.
4510 (gimple_match_op::gimple_match_op): Update all forms to take a
4512 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4513 for the suboperation, but don't specify a particular else_value.
4514 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4515 (visit_nary_op, visit_reference_op_load): Pass
4516 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4517 * gimple-match-head.c: Include tree-eh.h
4518 (convert_conditional_op): New function.
4519 (maybe_resimplify_conditional_op): Likewise.
4520 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4521 (gimple_resimplify2): Likewise.
4522 (gimple_resimplify3): Likewise.
4523 (gimple_resimplify4): Likewise.
4524 (maybe_push_res_to_seq): Return null for conditional operations.
4525 (try_conditional_simplification): New function.
4526 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4528 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4530 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4532 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4534 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4536 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4538 (hash_tree): Do not hash DECL_FCONTEXT
4539 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4540 Do not stream DECL_FCONTEXT.
4541 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4542 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4544 2018-07-12 Richard Biener <rguenther@suse.de>
4547 * dwarf2out.c (gen_block_die): Only output blocks when they have
4548 at least one !DECL_IGNORED_P variable.
4550 2018-07-12 Richard Biener <rguenther@suse.de>
4553 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4554 Remove -mieee-fp handling.
4556 2018-07-12 Richard Biener <rguenther@suse.de>
4558 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4559 left-over from last patch.
4561 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4563 PR tree-optimization/86492
4564 * gimple-ssa-store-merging.c
4565 (imm_store_chain_info::coalesce_immediate_stores): Call
4566 check_no_overlap even for the merge_overlapping case. Formatting fix.
4568 2018-07-12 Richard Biener <rguenther@suse.de>
4571 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4572 move possibly trapping operations into the conditional.
4574 2018-07-12 Richard Biener <rguenther@suse.de>
4576 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4577 (vn_lookup_simplify_result): Remove recursion limit applied
4579 (vn_nary_build_or_lookup_1): Adjust.
4580 (try_to_simplify): Likewise.
4581 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4583 (gimple_resimplify2): Likewise.
4584 (gimple_resimplify3): Likewise.
4585 (gimple_resimplify4): Likewise.
4587 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4589 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4590 Use __mmask64 type instead of __mmask8 for __M argument.
4591 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4592 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4594 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4595 __mmask16 for __M argument.
4596 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4597 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4598 to __mmask16 instead of __mmask8.
4599 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4600 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4601 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4602 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4603 instead of __mmask16 for __U argument.
4604 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4605 __mmask16 instead of __mmask8 for __U argument.
4606 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4608 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4610 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4612 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4614 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4616 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4618 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4620 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4622 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4624 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4626 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4627 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4628 return type as well as __M argument type and all casts from __mmask8
4630 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4631 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4632 return type as well as __M argument type and all casts from __mmask8
4634 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4635 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4636 return type as well as __M argument type and all casts from __mmask8
4638 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4639 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4640 return type as well as __M argument type and all casts from __mmask8
4642 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4643 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4646 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4648 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4649 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4652 2018-07-11 Paul Koning <ni1d@arrl.net>
4654 * doc/md.texi (define_subst): Document how multiple occurrences of
4655 the same argument in the replacement pattern are handled.
4657 2018-07-11 Paul Koning <ni1d@arrl.net>
4659 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4661 (Common Type Attributes): Add "mode" attribute.
4663 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4665 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4666 stream DECL_ORIGINAL_TYPE.
4667 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4668 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4669 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4670 Do not walk original type.
4671 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4673 (write_ts_decl_non_common_tree_pointers): Do not stream
4675 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4676 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4678 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4680 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4681 thread twice from the same starting edge.
4683 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4685 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4686 * gimple.c (gimple_call_nonnull_result_p): ...here...
4687 (gimple_call_nonnull_arg): ...and here.
4688 * gimple.h (gimple_call_nonnull_result_p): New.
4689 (gimple_call_nonnull_arg): New.
4691 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
4693 * config/arm/arm-cpus.in: Move information from fpu field of each
4694 cpu definition to the isa field.
4695 * config/arm/parsecpu.awk (fpu): Delete match rule.
4696 (gen_comm_data): Don't add bits from the CPU's FPU entry.
4698 2018-07-11 Richard Biener <rguenther@suse.de>
4701 * dwarf2out.c (init_sections_and_labels): Use
4702 output_asm_line_debug_info consistently.
4703 (dwarf2out_early_finish): Likewise.
4704 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4707 2018-07-11 Richard Biener <rguenther@suse.de>
4709 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4710 Rework father_bb setting in a way to avoid propagating constants
4711 multiple times on a loop body.
4713 2018-07-10 Mark Wielaard <mark@klomp.org>
4716 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4718 2018-07-10 Richard Biener <rguenther@suse.de>
4720 * hash-map.h (hash_map::iterator::operator*): Return
4721 references to key and value.
4723 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4726 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4727 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4728 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4729 (gimplify_omp_for): For composite loops, move outer
4730 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4731 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
4732 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
4733 TREE_LIST for both the original class iterator and the "last" helper
4734 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
4735 loop, remember has_decl_expr from outer composite loops for the
4736 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4738 2018-07-09 Martin Sebor <msebor@redhat.com>
4742 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4743 accessing implicitly initialized array elements.
4744 * expr.c (string_constant): Handle string initializers of
4745 character arrays within aggregates.
4746 * gimple-fold.c (fold_array_ctor_reference): Add argument.
4747 Store element offset. As a special case, handle zero size.
4748 (fold_nonarray_ctor_reference): Same.
4749 (fold_ctor_reference): Add argument. Store subobject offset.
4750 * gimple-fold.h (fold_ctor_reference): Add argument.
4752 2018-07-09 Paul Koning <ni1d@arrl.net>
4754 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4755 (pdp11_insn_cost): New function.
4756 (pdp11_md_asm_adjust): New function.
4757 (TARGET_INVALID_WITHIN_DOLOOP): Define.
4758 (pdp11_rtx_costs): Update to match machine better.
4759 (output_addr_const_pdp11): Correct format mismatch warnings.
4760 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4761 * config/pdp11/pdp11.md: General change to add base_cost and/or
4762 length attributes for use by new pdp11_insn_cost function.
4763 (MIN_BRANCH): Correct definition.
4765 (doloop_end): Use standard pattern name for looping pattern.
4766 (doloop_end_nocc): New.
4767 (movsf): Add another constraint alternative.
4768 (zero_extendqihi2): Add constraint alternatives for not in place
4770 (zero_extendhisi2): Remove.
4771 (shift patterns): Add CC handling variants.
4775 (define_peephole2): New peephole to recognize mov that sets CC for
4778 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4780 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4781 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4784 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4787 * real.c (real_nextafter): Return true if result is denormal.
4789 2018-07-09 Martin Liska <mliska@suse.cz>
4791 * common.opt: Add back wrongly removed attribute.
4793 2018-07-09 Richard Biener <rguenther@suse.de>
4796 * dwarf2out.c (gen_block_die): For an early generated DIE
4797 always output high/low PC attributes.
4799 2018-07-09 Tom de Vries <tdevries@suse.de>
4801 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4802 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4803 onto VAR_DECL with abstract origin.
4805 2018-07-07 Jim Wilson <jimw@sifive.com>
4807 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4809 2018-07-07 Tom de Vries <tdevries@suse.de>
4811 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4813 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4815 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4817 (combine_bound): Use wide-int overflow calculation instead of
4819 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4821 * fold-const.c (int_const_binop_2): Same.
4822 (extract_muldiv_1): Same.
4823 (fold_div_compare): Same.
4824 (fold_abs_const): Same.
4826 * poly-int.h (add): Same.
4830 * predict.c (predict_iv_comparison): Same.
4831 * profile-count.c (slow_safe_scale_64bit): Same.
4832 * simplify-rtx.c (simplify_const_binary_operation): Same.
4833 * tree-chrec.c (tree_fold_binomial): Same.
4834 * tree-data-ref.c (split_constant_offset_1): Same.
4835 * tree-if-conv.c (idx_within_array_bound): Same.
4836 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4837 * tree-ssa-phiopt.c (minmax_replacement): Same.
4838 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4839 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4840 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4841 * wide-int.cc (wi::add_large): Same.
4842 (wi::mul_internal): Same.
4843 (wi::sub_large): Same.
4844 (wi::divmod_internal): Same.
4845 * wide-int.h: Change overflow type to overflow_type for neg, add,
4846 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4847 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4848 mul_internal, divmod_internal.
4849 (overflow_type): New enum.
4850 (accumulate_overflow): New.
4852 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4854 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4855 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4857 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4859 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4860 argument is checked for zero before entering loop, avoid checking again.
4862 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4864 * gimplify.h (generic_expr_could_trap_p): Set as global function.
4865 * gimplify.h (generic_expr_could_trap_p): Likwise.
4866 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4868 2018-07-06 Jakub Jelinek <jakub@redhat.com>
4870 PR tree-optimization/86401
4871 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4872 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4873 (fold_bit_and_mask): ... here. New helper function for match.pd.
4874 * fold-const.h (fold_bit_and_mask): Declare.
4875 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4877 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4880 * target.def (translate_mode_attribute): New hook.
4881 * targhooks.h (default_translate_mode_attribute): Declare.
4882 * targhooks.c (default_translate_mode_attribute): New function.
4883 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4884 * doc/tm.texi: Regenerate.
4885 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4886 (rs6000_translate_mode_attribute): New function.
4888 2018-07-06 Paul Koning <ni1d@arrl.net>
4890 * doc/md.texi (define_split): Document DONE and FAIL.
4891 (define_peephole2): Ditto.
4893 2018-07-05 Jeff Law <law@redhat.com>
4895 PR tree-optimization/86010
4896 * tree-ssa-dse.c (compute_trims): More aggressively trim at
4897 both the head and tail of mem* and str* calls.
4899 2018-07-05 Jim Wilson <jimw@sifive.com>
4901 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4903 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
4905 * config/aarch64/aarch64-simd.md: correct flags text for
4906 MIN_EXPR replacement.
4908 2018-07-05 James Clarke <jrtc27@jrtc27.com>
4910 * configure: Regenerated.
4912 2018-07-05 Carl Love <cel@us.ibm.com>
4914 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4915 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4916 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4917 VSX_BUILTIN_DOUBLEL_V4SF.
4919 2018-07-05 Martin Sebor <msebor@redhat.com>
4922 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4923 than its domain to compute its the upper bound of a char array.
4925 2018-07-05 Nathan Sidwell <nathan@acm.org>
4927 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4928 * doc/cpp.texi: Update comment.
4929 * doc/tm.texi: Rebuilt.
4930 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4931 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4932 * doc/extend.texi (Backwards Compatibility): Clarify it is system
4933 headers affected by extern "C".
4934 * system.h: Poison NO_IMPLICIT_EXTERN_C.
4935 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4936 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4937 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4938 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4939 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4940 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4941 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4942 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4943 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4944 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4945 config/sparc/sp64-elf.h, config/spu/spu.h,
4946 config/stormy16/stormy16.h, config/v850/v850.h,
4947 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4948 define NO_IMPLICIT_EXTERN_C.
4949 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4951 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4954 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4955 instead of GET_MODE_SIZE when comparing Units.
4957 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4960 * rtlanal.c (set_noop_p): Constrain on mode change,
4961 include hard-reg-set.h
4963 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4965 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4967 2018-07-05 Jakub Jelinek <jakub@redhat.com>
4970 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4973 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4975 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4977 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4980 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4982 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4984 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
4987 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4989 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
4991 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4992 neg_*_op* variables.
4994 2018-07-04 Martin Liska <mliska@suse.cz>
4996 * tree-switch-conversion.c: Define
4997 max_ratio_for_speed and max_ratio_for_size constants.
4999 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5000 Martin Liska <mliska@suse.cz>
5005 * common.opt: Rename align options with 'str_' prefix.
5006 * common/config/i386/i386-common.c (set_malign_value): New
5008 (ix86_handle_option): Use it to set -falign-* options/
5009 * config/aarch64/aarch64-protos.h (struct tune_params): Change
5010 type from int to string.
5011 * config/aarch64/aarch64.c: Update default values from int
5013 * config/alpha/alpha.c (alpha_override_options_after_change):
5015 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
5016 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5017 max skip conditionally.
5018 * config/i386/freebsd.h (SUBALIGN_LOG): New.
5019 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5020 max skip conditionally.
5021 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5022 max skip conditionally.
5023 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
5024 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5025 max skip conditionally.
5026 * config/i386/i386.c (struct ptt): Change type from int to
5028 (ix86_default_align): Set default values.
5029 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
5030 max skip conditionally.
5031 * config/i386/iamcu.h (SUBALIGN_LOG): New.
5032 (ASM_OUTPUT_MAX_SKIP_ALIGN):
5033 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
5034 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5035 max skip conditionally.
5036 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
5037 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
5038 * config/i386/x86-64.h (SUBALIGN_LOG): New.
5039 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
5040 max skip conditionally.
5041 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5042 * config/ia64/ia64.c (ia64_option_override): Set default values
5043 for alignment options.
5044 * config/m68k/m68k.c: Handle new str_align_* options.
5045 * config/mips/mips.c (mips_set_compression_mode): Change
5047 (mips_option_override): Set default values for options.
5048 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5050 * config/rs6000/rs6000.c (rs6000_option_override_internal):
5052 * config/rx/rx.c (rx_option_override): Likewise.
5053 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
5054 (LABEL_ALIGN): Use align_labels_log.
5055 (LOOP_ALIGN): Use align_loops_align.
5056 * config/s390/s390.c (s390_asm_output_function_label): Use new
5058 * config/sh/sh.c (sh_override_options_after_change):
5059 Change type of constants.
5060 * config/spu/spu.c (spu_sched_init): Likewise.
5061 * config/sparc/sparc.c (sparc_option_override): Set default
5063 * config/visium/visium.c (visium_option_override): Likewise.
5064 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
5065 emit p2align format with last argument if it's not needed.
5066 * doc/invoke.texi: Document extended format of -falign-*.
5067 * final.c: Use align_labels alignment.
5068 * flags.h (struct target_flag_state): Change type to use
5070 (struct align_flags_tuple): New.
5071 (struct align_flags): Likewise.
5072 (align_loops_log): Redefine macro to use new types.
5073 (align_loops_max_skip): Redefine macro to use new types.
5074 (align_jumps_log): Redefine macro to use new types.
5075 (align_jumps_max_skip): Redefine macro to use new types.
5076 (align_labels_log): Redefine macro to use new types.
5077 (align_labels_max_skip): Redefine macro to use new types.
5078 (align_functions_log): Redefine macro to use new types.
5079 (align_loops): Redefine macro to use new types.
5080 (align_jumps): Redefine macro to use new types.
5081 (align_labels): Redefine macro to use new types.
5082 (align_functions): Redefine macro to use new types.
5083 (align_functions_max_skip): Redefine macro to use new types.
5084 (align_loops_value): New macro.
5085 (align_jumps_value): New macro.
5086 (align_labels_value): New macro.
5087 (align_functions_value): New macro.
5088 * function.c (invoke_set_current_function_hook): Propagate
5089 alignment values from flags to global variables default in
5091 * ipa-icf.c (sem_function::equals_wpa): Use
5092 cl_optimization_option_eq instead of memcmp.
5093 * lto-streamer.h (cl_optimization_stream_out): Support streaming
5095 (cl_optimization_stream_in): Likewise.
5096 * optc-save-gen.awk: Support strings in cl_optimization.
5097 * opth-gen.awk: Likewise.
5098 * opts.c (finish_options): Remove error checking of invalid
5100 (MAX_CODE_ALIGN): Remove.
5101 (MAX_CODE_ALIGN_VALUE): Likewise.
5102 (parse_and_check_align_values): New function.
5103 (check_alignment_argument): Likewise.
5104 (common_handle_option): Use check_alignment_argument.
5105 * opts.h (parse_and_check_align_values): Declare.
5106 * toplev.c (init_alignments): Remove.
5107 (read_log_maxskip): New.
5108 (parse_N_M): Likewise.
5109 (parse_alignment_opts): Likewise.
5110 (backend_init_target): Remove usage of init_alignments.
5111 * toplev.h (parse_alignment_opts): Declare.
5112 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
5114 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
5115 * tree.c (cl_option_hasher::equal): New.
5116 * varasm.c: Use new global macros.
5118 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
5120 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
5121 Use a simpler align directive also if MAXSKIP = ALIGN-1.
5122 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5123 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5124 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5125 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5126 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
5127 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
5128 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
5129 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5130 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5131 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5132 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5134 2018-07-04 Martin Liska <mliska@suse.cz>
5135 Jonathan Wakely <jwakely@redhat.com>
5137 * coverage.c: Use correct type.
5138 * doc/invoke.texi: Language correction.
5140 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
5143 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
5144 ENDBRANCH for non-tail call which may return via indirect branch.
5145 * doc/extend.texi: Document indirect_return attribute.
5147 2018-07-03 Martin Sebor <msebor@redhat.com>
5149 PR tree-optimization/86274
5150 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
5152 (format_floating): Correct handling of infinities and NaNs.
5154 2018-07-03 Martin Sebor <msebor@redhat.com>
5156 * print-tree.c (print_real_cst): New function.
5157 (print_node_brief): Call it.
5158 (print_node): Ditto.
5160 2018-07-03 Jeff Law <law@redhat.com>
5162 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
5163 into a single pattern.
5165 * config/h8300/h8300.md (ors code_iterator): New.
5166 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
5167 a single pattern and single splitter.
5168 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
5169 (iorqi3_1, xorqi3_1): Likewise.
5170 (iorqi3, xorqi3 expanders): Similarly.
5172 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5173 (movmd_internal) into a single pattern using the P mode iterator.
5174 (movmd splitters): Similarly.
5175 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5176 (movsd splitters): Similarly.
5178 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5179 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5180 right table based on the size of the operand.
5181 * config/h8300/h8300.md (length_table): Corresponding changes. All
5182 references to "addb", "addw" and "addl" changed to "add".
5183 (btst patterns): Merge two variants into a single pattern.
5184 (tstqi, tsthi): Likewise.
5185 (addhi3_incdec, addsi3_incdec): Likewise.
5186 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5187 (mulhi3, mulsi3): Likewise.
5188 (udivhi3, udivsi3): Likewise.
5189 (divhi3, divsi3): Likewise.
5190 (andorqi3, andorhi3, andorsi3): Likewise.
5192 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5195 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5196 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5198 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5200 PR tree-optimization/85694
5201 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5202 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5204 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5205 (<u>avg<mode>3_ceil): New patterns.
5207 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5209 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5210 scan-tree-dump directive.
5211 * gcc.dg/vect/slp-perm-2.c: Likewise.
5212 * gcc.dg/vect/slp-perm-3.c: Likewise.
5213 * gcc.dg/vect/slp-perm-5.c: Likewise.
5214 * gcc.dg/vect/slp-perm-6.c: Likewise.
5215 * gcc.dg/vect/slp-perm-7.c: Likewise.
5216 * gcc.dg/vect/slp-perm-8.c: Likewise.
5218 2018-07-03 Marek Polacek <polacek@redhat.com>
5221 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5223 2018-07-03 Richard Biener <rguenther@suse.de>
5226 * tree-ssa-structalias.c (find_func_clobbers): Properly
5227 handle indirect calls.
5229 2018-07-03 Jeff Law <law@redhat.com>
5231 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5232 (shifts): New code iterator.
5233 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5234 expander. Fix HImode handling on H8/SX.
5235 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5236 (subqi3, subhi3, subsi3 expanders): Likewise.
5237 (andqi3, andhi3, andsi3 expanders): Likewise.
5238 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5239 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5240 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5241 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5242 (zero_extendqihi2, zero_extendqisi2): Likewise.
5243 (extendqihi2, extendqisi2): Likewise.
5244 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5245 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5246 (rotlqi3_1, rotlhi3_1): Likewise.
5247 (logicalhi3_sn, logicalsi3_sn): Likewise.
5248 (logicalhi3, logicalsi3): Likewise.
5250 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5252 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5253 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5254 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5255 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5256 type to append_pattern_def_seq instead of creating a stmt_vec_info
5258 (build_mask_conversion): Likewise. Remove vinfo argument.
5259 (vect_add_conversion_to_patterm): Likewise, renaming to...
5260 (vect_add_conversion_to_pattern): ...this.
5261 (vect_recog_mask_conversion_pattern): Update call to
5262 build_mask_conversion. Pass the vector type to
5263 append_pattern_def_seq here too.
5264 (vect_recog_gather_scatter_pattern): Update call to
5265 vect_add_conversion_to_pattern.
5267 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5269 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5270 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5271 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5272 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5273 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5274 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5275 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5276 append_pattern_def_seq instead of new_pattern_def_seq.
5277 (vect_recog_divmod_pattern): Do both of the above.
5278 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5281 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5283 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5284 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5285 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5286 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5287 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5288 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5289 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5290 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5291 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5292 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5293 parameter with a single stmt_vec_info.
5294 (vect_recog_func_ptr): Likewise.
5295 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5296 (vect_try_gather_scatter_pattern): ...this.
5297 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5298 the stmt_vec_info of the statement to be matched. Don't clear
5299 STMT_VINFO_RELATED_STMT.
5300 (vect_pattern_recog): Update call accordingly.
5302 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5304 PR tree-optimization/85694
5305 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5306 (uavgM3_ceil): Document new optabs.
5307 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5308 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5310 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5311 (savg_ceil_optab): New optabs.
5312 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5313 (vect_vect_recog_func_ptrs): Add it.
5314 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5315 constant directly from the associated lhs.
5317 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5319 * tree-vect-patterns.c (vect_split_statement): New function.
5320 (vect_convert_input): Use it to try to split an existing cast.
5322 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5324 * poly-int.h (print_hex): New function.
5325 * dumpfile.h (dump_dec, dump_hex): Declare.
5326 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5327 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5328 min_input_precision, operation_precision and operation_sign.
5329 * tree-vect-patterns.c (vect_get_range_info): New function.
5330 (vect_same_loop_or_bb_p, vect_single_imm_use)
5331 (vect_operation_fits_smaller_type): Delete.
5332 (vect_look_through_possible_promotion): Add an optional
5333 single_use_p parameter.
5334 (vect_recog_over_widening_pattern): Rewrite to use new
5335 stmt_vec_info infomration. Handle one operation at a time.
5336 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5337 (vect_truncatable_operation_p, vect_set_operation_type)
5338 (vect_set_min_input_precision): New functions.
5339 (vect_determine_min_output_precision_1): Likewise.
5340 (vect_determine_min_output_precision): Likewise.
5341 (vect_determine_precisions_from_range): Likewise.
5342 (vect_determine_precisions_from_users): Likewise.
5343 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5344 (vect_vect_recog_func_ptrs): Put over_widening first.
5346 (vect_pattern_recog): Call vect_determine_precisions.
5348 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5350 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5351 statements that have been replaced by further pattern statements.
5352 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5354 2018-07-03 Richard Biener <rguenther@suse.de>
5356 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5357 always set *dt. Dump vectype in vectype overload.
5358 * dumpfile.h (dump_gimple_expr): New function.
5359 (dump_gimple_expr_loc): Likewise.
5360 * dumpfile.c (dump_gimple_expr): New function.
5361 (dump_gimple_expr_loc): Likewise.
5363 2018-07-02 Jeff Law <law@redhat.com>
5365 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5366 the H8/300, H8/300H and H8/S variants into a single pattern.
5367 (movhi_h8300, movqi_h8300hs): Similarly.
5368 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5369 (QHI mode iterator): New.
5371 * config/h8300/h8300.md: Remove trailing whitespace.
5373 2018-07-02 Jim Wilson <jimw@sifive.com>
5375 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5376 instead of emit_insn for interrupt returns.
5377 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5378 (riscv_sret, riscv_uret): Likewise.
5380 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5382 * pretty-print.c (selftest::test_pp_format): Move save and restore
5383 of quotes to class auto_fix_quotes, and add an instance.
5384 * selftest.c: Include "intl.h".
5385 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5386 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5387 * selftest.h (selftest::auto_fix_quotes): New class.
5389 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5391 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5392 (aarch64_sve_prepare_conditional_op): Remove.
5393 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5394 Allow aarch64_simd_reg_or_zero as select operand; remove
5395 the aarch64_sve_prepare_conditional_op call.
5396 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5397 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5398 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5399 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5400 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5401 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5402 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5403 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5404 and a splitters to match all of the *_any patterns.
5405 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5407 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5408 (SVE_COND_FP_BINARY_REV): Remove.
5409 (sve_int_op_rev, sve_fp_op_rev): New.
5410 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5411 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5412 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5413 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5414 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5415 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5416 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5417 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5418 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5420 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5421 Remove match_dup 1 from the inner unspec.
5422 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5424 * config/aarch64/aarch64.md (movprfx): New attr.
5425 (length): Default movprfx to 8.
5426 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5427 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5428 (*<su>mul<SVE_I>3_highpart): Likewise.
5429 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5430 (*v<ASHIFT><SVE_I>3): Likewise.
5431 (*<su><MAXMIN><SVE_I>3): Likewise.
5432 (*<su><MAXMIN><SVE_F>3): Likewise.
5433 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5434 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5435 (*div<SVE_F>4): Likewise.
5437 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5439 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5442 2018-07-02 Richard Biener <rguenther@suse.de>
5444 PR tree-optimization/86363
5445 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5446 memset argument refers to a non-variable address.
5448 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5450 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5451 {PLUS,MINUS}_EXPR code to...
5452 (adjust_symbolic_bound): ...here,
5453 (combine_bound): ...here,
5454 (set_value_range_with_overflow): ...and here.
5456 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5458 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5460 (extract_range_from_abs_expr): ...here.
5462 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5464 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5465 -fno-omit-frame-pointer when not optimizing.
5467 2018-07-02 Martin Liska <mliska@suse.cz>
5470 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5471 (propagate_nothrow): Likewise.
5473 2018-07-02 Martin Liska <mliska@suse.cz>
5476 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5478 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5480 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5481 function in r262149, changing "loc" param from source_location to
5482 const dump_location_t &.
5483 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5484 declaration, as above.
5486 2018-07-01 Paul Koning <ni1d@arrl.net>
5488 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5489 -munit-asm, -mgnu-asm, -mdec-asm.
5490 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5491 (pdp11_output_labelref): New.
5492 (pdp11_output_def): New.
5493 (pdp11_output_addr_vec_elt): New.
5494 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5495 %# and %@ format codes.
5496 (pdp11_option_override): New.
5497 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5498 (pdp11_output_ident): New.
5499 (pdp11_asm_named_section): New.
5500 (pdp11_asm_init_sections): New.
5501 (pdp11_file_start): New.
5502 (pdp11_file_end): New.
5503 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5504 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5505 %o, like %c but octal.
5506 (pdp11_option_override): New.
5507 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5509 (DATA_SECTION_ASM_OP): Ditto.
5510 (READONLY_DATA_SECTION_ASM_OP): New.
5511 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5512 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5513 (ASM_OUTPUT_LABELREF): Ditto.
5514 (ASM_OUTPUT_DEF): Ditto.
5515 (ASM_OUTPUT_EXTERNAL): New.
5516 (ASM_OUTPUT_SOURCE_FILENAME): New.
5517 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5518 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5519 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5520 %# and %@ format codes.
5521 * config/pdp11/pdp11.opt (mgnu-asm): New.
5522 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5523 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5524 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5526 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5528 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5529 dereferencing path[] beyond its length.
5531 (debug_all_paths): New.
5532 (rewire_first_differing_edge): New.
5533 (adjust_paths_after_duplication): New.
5534 (duplicate_thread_path): Call adjust_paths_after_duplication.
5536 (thread_through_all_blocks): Add new argument to
5537 duplicate_thread_path.
5539 2018-06-30 Jim Wilson <jimw@sifive.com>
5541 * config/riscv/predicates.md (p2m1_shift_operand): New.
5542 (high_mask_shift_operand): New.
5543 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5544 pattern using p2m1_shift_operand.
5545 (lshsi3_zero_extend_3+2): New combiner pattern using
5546 high_mask_shift_operand.
5548 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5550 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5552 (vect_recog_rotate_pattern): ...here.
5553 (vect_convert_input): Try to insert casts of invariants in the
5555 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5556 preheader to be empty.
5558 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5560 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5561 vector type. If given, install it in the new statement's
5563 (vect_element_precision): New function.
5564 (vect_unpromoted_value): New struct.
5565 (vect_unpromoted_value::vect_unpromoted_value): New function.
5566 (vect_unpromoted_value::set_op): Likewise.
5567 (vect_look_through_possible_promotion): Likewise.
5568 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5569 (vect_widened_op_tree, vect_convert_input): Likewise.
5570 (vect_convert_inputs, vect_convert_output): Likewise.
5571 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5572 to handle the optional cast of the multiplication result and
5573 vect_widened_op_tree to detect the widened multiplication itself.
5574 Do not require the input and output of promotion casts to have
5575 the same sign, but base the signedness of the operation on the
5576 input rather than the result. If the pattern includes two
5577 promotions, check that those promotions have the same sign.
5578 Do not restrict the MULT_EXPR handling to a double-width result;
5579 handle quadruple-width results and wider. Use vect_convert_inputs
5580 to convert the inputs to the common type.
5581 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5582 to handle the optional cast of the ABS result. Also allow a sign
5583 change or a sign extension between the ABS and MINUS.
5584 Use vect_widened_op_tree to detect the widened subtraction and use
5585 vect_convert_inputs to convert the inputs to the common type.
5586 (vect_handle_widen_op_by_const): Delete.
5587 (vect_recog_widen_op_pattern): New function.
5588 (vect_recog_widen_mult_pattern): Use it.
5589 (vect_recog_widen_shift_pattern): Likewise.
5590 (vect_recog_widen_sum_pattern): Use
5591 vect_look_through_possible_promotion to handle the promoted
5594 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5596 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5597 the containing gimple_seq *.
5598 * gimple-iterator.h (gsi_for_stmt): Declare it.
5599 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5600 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5601 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5602 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5603 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5605 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5607 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5608 statement being replaced is part of an existing pattern
5609 definition sequence, inserting the new pattern statements before
5611 (vect_pattern_recog_1): Don't return a bool. If the statement
5612 is already part of a pattern, instead apply pattern matching
5613 to the pattern definition statements. Don't clear the
5614 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5615 (vect_pattern_recog): Don't break after the first match;
5616 continue processing the pattern definition statements instead.
5617 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5619 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5621 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5622 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5623 (vect_recog_widen_sum_pattern): Use it.
5625 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5627 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5628 phi is not a pattern statement and has not been replaced by
5629 a pattern statement.
5630 * tree-vect-patterns.c (type_conversion_p): Don't check
5631 STMT_VINFO_IN_PATTERN_P.
5632 (vect_recog_vector_vector_shift_pattern): Likewise.
5633 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5634 the pattern statement rather than the original statement; check
5635 directly for a WIDEN_MULT_EXPR here.
5636 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5637 vect_is_simple_use to return the pattern statement rather
5638 than the original statement; use is_pattern_stmt_p to check
5639 for such a pattern statement.
5640 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5641 to return the pattern statement rather than the original statement;
5642 don't do the same transformation here.
5643 (vect_is_simple_use): If the defining statement has been replaced
5644 by a pattern statement, return the pattern statement instead.
5645 Remove the corresponding (local) transformation from the vectype
5648 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5650 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5651 end and default to null.
5652 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5653 (vectorizable_reduction): Update calls accordingly, dropping the
5654 gimple ** argument if the passed-back statement isn't needed.
5655 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5656 (vect_recog_rotate_pattern): Likewise.
5657 (vect_recog_mask_conversion_pattern): Likewise.
5658 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5659 (vect_mask_constant_operand_p): Likewise.
5660 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5661 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5662 (get_group_load_store_type, get_load_store_type): Likewise.
5663 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5664 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5665 (vectorizable_conversion, vectorizable_assignment): Likewise.
5666 (vectorizable_shift, vectorizable_operation): Likewise.
5667 (vectorizable_store, vect_is_simple_cond): Likewise.
5668 (vectorizable_condition, vectorizable_comparison): Likewise.
5669 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5670 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5671 and move it to the end. Cope with null def_stmt_outs.
5673 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5675 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5677 2018-06-29 Jeff Law <law@redhat.com>
5679 * config/v850/v850.c (v850_legitimate_address_p): Handle large
5680 displacements for TARGET_V850E2V3 and newer.
5681 (TARGET_LRA_P): Remove. Defaults to LRA now.
5682 * config/v850/v850.md (sign23byte_load): Remove.
5683 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5684 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5686 2018-06-29 Martin Liska <mliska@suse.cz>
5689 * coverage.c (coverage_init): Mangle full path name.
5690 * doc/invoke.texi: Document the change.
5691 * gcov-io.c (mangle_path): New.
5692 * gcov-io.h (mangle_path): Likewise.
5693 * gcov.c (mangle_name): Use mangle_path for path mangling.
5695 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5697 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5698 if starting source register is not even.
5700 2018-06-29 Martin Liska <mliska@suse.cz>
5702 PR tree-optimization/86263
5703 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5704 Make edge redirection.
5706 2018-06-29 David Malcolm <dmalcolm@redhat.com>
5708 * dumpfile.c (dump_loc): Add indentation based on scope depth.
5709 (dump_scope_depth): New variable.
5710 (get_dump_scope_depth): New function.
5711 (dump_begin_scope): New function.
5712 (dump_end_scope): New function.
5713 * dumpfile.h (get_dump_scope_depth): New declaration.
5714 (dump_begin_scope): New declaration.
5715 (dump_end_scope): New declaration.
5716 (class auto_dump_scope): New class.
5717 (AUTO_DUMP_SCOPE): New macro.
5718 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5721 2018-06-29 Richard Biener <rguenther@suse.de>
5723 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5724 compute_all_dependences succeeds.
5725 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5726 exceed --param loop-max-datarefs-for-datadeps.
5728 2018-06-29 Jakub Jelinek <jakub@redhat.com>
5730 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5732 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
5735 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5736 alternative 0 in preferred_for_speed attribute.
5738 2018-06-28 Paul Koning <ni1d@arrl.net>
5740 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5741 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5742 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5743 * config/pdp11/pdp11.md: Correct "length" attribute calculation
5744 for shift insn patterns.
5746 2018-06-28 David Malcolm <dmalcolm@redhat.com>
5748 * cgraph.c (cgraph_node::get_body): Replace assignments to
5749 "dump_file" with calls to set_dump_file.
5750 * dumpfile.c (alt_dump_file): Make static, and group with...
5751 (alt_flags): ...this definition.
5752 (dumps_are_enabled): New variable.
5753 (refresh_dumps_are_enabled): New function.
5754 (set_dump_file): New function.
5755 (set_alt_dump_file): New function.
5756 (gcc::dump_manager::dump_start): Replace assignments to
5757 "dump_file" and "alt_dump_file" with calls to set_dump_file and
5759 (gcc::dump_manager::dump_finish): Likewise.
5760 * dumpfile.h (alt_dump_file): Delete decl.
5761 (dumps_are_enabled): New variable decl.
5762 (set_dump_file): New function decl.
5763 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5765 * tree-nested.c (lower_nested_functions): Replace assignments to
5766 "dump_file" with calls to set_dump_file.
5768 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5770 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5771 goto_locus of each outgoing edge of each basic block.
5773 2018-06-28 Richard Biener <rguenther@suse.de>
5775 * dwarf2out.c (decl_scope_table): Remove.
5776 (push_decl_scope): Likewise.
5777 (pop_decl_scope): Likewise.
5778 (gen_type_die_for_member): Do not call push/pop_decl_scope.
5779 (gen_struct_or_union_type_die): Likewise.
5780 (gen_tagged_type_die): Likewise.
5781 (dwarf2out_init): Do not initialize decl_scope_table.
5782 (dwarf2out_c_finalize): Do not free it.
5784 2018-06-28 Richard Biener <rguenther@suse.de>
5786 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5787 deciding whether to not re-use a DIE.
5789 2018-06-28 Richard Biener <rguenther@suse.de>
5791 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5792 DW_AT_abstract_origin attribute.
5794 2018-06-28 Martin Liska <mliska@suse.cz>
5796 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5797 Use newly introduced constants.
5798 * tree-switch-conversion.h (struct jump_table_cluster):
5799 Define max_ratio_for_size and max_ratio_for_speed.
5801 2018-06-28 Martin Liska <mliska@suse.cz>
5803 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5804 Add new checking assert to catch invalid state.
5805 (jump_table_cluster::can_be_handled): Handle single case
5807 (jump_table_cluster::is_beneficial): Bail out for such case.
5808 (bit_test_cluster::find_bit_tests):
5809 Add new checking assert to catch invalid state.
5810 (bit_test_cluster::can_be_handled): Handle single case
5812 (bit_test_cluster::is_beneficial): Bail out for such case.
5813 (switch_decision_tree::analyze_switch_statement):
5816 2018-06-28 Martin Liska <mliska@suse.cz>
5818 * common.opt: Introduce -completion option.
5819 * gcc.c (driver_handle_option): Handle it.
5820 (driver::main): Print completions if completion
5822 * opt-suggestions.c (option_proposer::get_completions):
5824 (option_proposer::suggest_completion): Likewise.
5825 (option_proposer::find_param_completions): Likewise.
5826 (verify_autocompletions): Likewise.
5827 (test_completion_valid_options): Likewise.
5828 (test_completion_valid_params): Likewise.
5829 (in_completion_p): Likewise.
5830 (empty_completion_p): Likewise.
5831 (test_completion_partial_match): Likewise.
5832 (test_completion_garbage): Likewise.
5833 (opt_proposer_c_tests): Likewise.
5834 * opt-suggestions.h: Declare new functions.
5835 * opts.c (common_handle_option): Handle OPT__completion_.
5836 * selftest-run-tests.c (selftest::run_tests): Add
5837 opt_proposer_c_tests.
5838 * selftest.c (assert_str_startswith): New.
5839 * selftest.h (assert_str_startswith): Likewise.
5840 (opt_proposer_c_tests): New.
5841 (ASSERT_STR_STARTSWITH): Likewise.
5843 2018-06-28 Martin Liska <mliska@suse.cz>
5845 * Makefile.in: Add opt-suggestions.o.
5846 * gcc-main.c: Include opt-suggestions.h.
5847 * gcc.c (driver::driver): Likewise.
5848 (driver::~driver): Remove m_option_suggestions.
5849 (driver::build_option_suggestions): Moved to option_proposer.
5850 (driver::suggest_option): Likewise.
5851 (driver::handle_unrecognized_options): Use option_proposer.
5852 * gcc.h (class driver): Add new memver m_option_proposer.
5853 * opt-suggestions.c: New file.
5854 * opt-suggestions.h: New file.
5856 2018-06-28 Martin Liska <mliska@suse.cz>
5858 * vec.h (class auto_string_vec): New (moved from auto_argvec).
5859 (auto_string_vec::~auto_string_vec): Likewise.
5861 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5863 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5864 prevent_decl_creation_for_types fields up and add reset_location field.
5865 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5866 statement if id->reset_location is true.
5867 (copy_edges_for_bb): Do not set goto_locus on the new edges if
5868 id->reset_location is true.
5869 (copy_phis_for_bb): Force input_location on the arguments if
5870 id->reset_location is true.
5871 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5872 is set on the function to be inlined.
5874 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
5876 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5878 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
5880 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5881 registers for Pmode.
5882 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5883 hard registers for the clobbered pseudo.
5885 2018-06-27 Paul Koning <ni1d@arrl.net>
5887 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5888 mutually exclusive options.
5889 * config/pdp11/constraints.md (h): New constraint.
5890 (O): Update definition to match shift code generation.
5891 (D): New constraint.
5892 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5894 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5896 (output_jump): Change arguments.
5897 (pdp11_fixed_cc_regs): New function.
5898 (pdp11_cc_mode): Ditto.
5899 (pdp11_expand_shift): Ditto.
5900 (pdp11_assemble_shift): Ditto.
5901 (pdp11_small_shift): Ditto.
5902 (pdp11_branch_cost): Remove.
5903 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5905 (pdp11_register_move_cost): Update for CC registers.
5906 (pdp11_rtx_costs): Add case for LSHIFTRT.
5907 (pdp11_output_jump): Add CCNZ mode conditional branches.
5908 (notice_update_cc_on_set): Remove.
5909 (pdp11_cc_mode): New function.
5910 (simple_memory_operand): Correct pre/post decrement case.
5911 (no_side_effect_operand): New function.
5912 (pdp11_regno_reg_class): Add CC_REGS class.
5913 (pdp11_fixed_cc_regs): New function.
5914 (pdp11_small_shift): New function.
5915 (pdp11_expand_shift): New function to expand shift insns.
5916 (pdp11_assemble_shift): New function to output shifts.
5917 (pdp11_branch_cost): Remove.
5918 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5919 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5920 (WCHAR_TYPE): Ditto.
5921 (PTRDIFF_TYPE): Ditto.
5922 (ADJUST_INSN_LENGTH): New macro.
5923 (FIXED_REGISTERS): Add CC registers.
5924 (CALL_USED_REGISTERS): Ditto.
5926 (REG_CLASS_NAMES): Ditto.
5927 (REG_CLASS_CONTENTS): Ditto.
5928 (SELECT_CC_MODE): Use new function.
5929 (TARGET_FLAGS_REGNUM): New macro.
5930 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5931 (cc0_reg_rtx): Remove.
5932 (CC_STATUS_MDEP): Remove.
5933 (CC_STATUS_MDEFP_INIT): Remove.
5934 (CC_IN_FPU): Remove.
5935 (NOTICE_UPDATE_CC): Remove.
5936 (REGISTER_NAMES): Add CC registers.
5937 (BRANCH_COST): Change to constant 1.
5938 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5940 * config/pdp11/pdp11.opt (mbcopy): Remove.
5941 (mbcopy-builtin): Remove.
5942 (mbranch-cheap): Remove.
5943 (mbranch-expensive): Remove.
5944 * config/pdp11/predicates.md (expand_shift_operand): Update to
5945 match shift code generation.
5946 (ccnz_operator): New predicate.
5947 * doc/invoke.texi (PDP-11 Options): Remove deleted options
5948 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5949 Remove non-existent option -mabshi, -mno-abshi. Document mutually
5951 * doc/md.texi (PDP-11): Document new D and h constraints. Update
5952 description of O constraint.
5954 2018-06-27 Jeff Law <law@redhat.com>
5955 Austin Law <austinklaw@gmail.com>
5957 * config/v850/v850.md (addsi3_set_flags): New pattern.
5958 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5959 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5960 (zero_extendhisi2_v850_set_flags): Likewise.
5961 (zero_extendqisi2_v850_set_flags): Likewise.
5962 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5963 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5964 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5966 * config/v850/v850-protos.h (notice_update_cc): Remove.
5967 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5968 (v850_print_operand): Handle 'D' and "d".
5969 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5970 Add handling of arithmetic/logical operations compared against zero.
5971 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5972 Do not look at v850_compare_op, instead get mode from last argument.
5973 (v850_gen_compare): Remove
5974 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5975 after reload for prologue insns.
5976 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5978 (construct_save_jarl): Likewise.
5979 (TARGET_FLAGS_REGNUM): Define.
5980 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5981 (NOTICE_UPDATE_CC): Remove.
5982 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5983 than cc0. Conditionalize on reload_completed.
5984 (cmpsi_insn, setfcc_insn): Likewise.
5985 (tst1 splitter): Turn into define_and_split which sets the flags
5987 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5988 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5989 (cstoresf4, cstoredf4): Clobber the flags.
5990 (cmpsi, cmpsf, cmpdf): Remove expanders.
5991 (setf_insn): Remove pattern.
5992 (addsi3): Turn into define_and_split which clobbers the flags after
5993 reload and a suitable pattern (addsi3_clobber_flags) for use after
5995 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5996 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5997 (ashrsi3, ashrsi3_v850e2): Likewise.
5998 (bins): Clobber the flags.
5999 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
6000 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
6001 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
6002 (call_value_internal_short, call_value_internal_long): Likewise.
6003 (callt_save_interrupt, callt_return_interrupt): Likewise.
6004 (save_interrupt, return_interrupt): Likewise.
6005 (callt_save_all_interrupt, save_all_interrupt): Likewise.
6006 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
6007 (restore_all_interrupt, _restore_all_interrupt): Likewise.
6008 (All FP comparisons): Only allow after reload has completed.
6010 (divh, divhu): Tweak output template.
6011 (branch_z_normal, branch_z_invert): Remove
6012 (branch_nz_normal, branch_nz_invert): Likewise.
6013 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
6015 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
6016 * config/v850/v850.c (notice_update_cc): Remove.
6017 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
6018 (CC_NO_CARRY): Likewise.
6019 (NOTICE_UPDATE_CC): Define to nothing.
6020 * config/v850/v850.md: Remove block comment on cc0 handling
6021 Remove "cc" attribute from all patterns. Remove cc_status handling
6022 from all patterns. Minor formatting fixes.
6024 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6026 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
6027 (cortex-a76.cortex-a55): Likewise.
6028 * config/aarch64/aarch64-tune.md: Regenerate.
6029 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
6030 cortex-a76.cortex-a55.
6032 2018-06-27 Jeff Law <law@redhat.com>
6034 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
6035 (MULTILIB_DIRNAMES): Similarly.
6037 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
6039 * gimple.h (gimple_return_retbnd): Delete.
6040 (gimple_return_set_retbnd): Likewise.
6041 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
6042 gimple_return_set_retbnd.
6043 * gimple-pretty-print.c (dump_gimple_return): Remove call to
6044 gimple_return_retbnd and adjust.
6045 * tree-inline.h (struct copy_body_data): Remove retbnd field.
6046 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
6047 Explicitly return NULL in a couple more cases. Move assertion
6048 on debug statements and remove unreachable code.
6049 (reset_debug_binding): Do not test id->retbnd.
6050 (expand_call_inline): Do not set it.
6052 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6054 * configure.ac: Add --disable-gcov option.
6055 * configure: Regenerate.
6056 * Makefile.in: Honour @enable_gcov@.
6057 * doc/install.texi: Document --disable-gcov.
6059 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6061 * config/arm/arm-cpus.in (cortex-a76): New entry.
6062 (cortex-a76.cortex-a55): Likewise.
6063 * config/arm/arm-tables.opt: Regenerate.
6064 * config/arm/arm-tune.md: Likewise.
6065 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
6066 * doc/invoke.texi (ARM Options): Document cortex-a76 and
6067 cortex-a76.cortex-a55.
6069 2018-06-27 Tamar Christina <tamar.christina@arm.com>
6072 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
6074 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
6076 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
6078 (EPILOGUE_USES): Likewise.
6080 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
6082 * tree-inline.c (remap_location): New function extracted from...
6083 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
6084 (copy_phis_for_bb): ...here. Call remap_location.
6085 (copy_cfg_body): Adjust call to copy_edges_for_bb.
6087 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
6089 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
6090 unaligned vsx for 16B memset.
6092 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
6095 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
6096 ieee128_float_type_node to long_double_type_node unless
6097 TARGET_LONG_DOUBLE_128 is set.
6099 2018-06-26 David Malcolm <dmalcolm@redhat.com>
6101 * cfgloop.c (get_loop_location): Convert return type from
6102 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
6103 by implicit construction from rtx_insn *, and using
6104 dump_user_location_t::from_function_decl for the fallback case.
6105 * cfgloop.h (get_loop_location): Convert return type from
6106 location_t to dump_user_location_t.
6107 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
6108 dump_printf_loc to pass in a dump_location_t rather than a
6109 location_t, via the gimple stmt.
6110 * coverage.c (get_coverage_counts): Update calls to
6111 dump_printf_loc to pass in dump_location_t rather than a
6113 * doc/optinfo.texi (Dump types): Convert example of
6114 dump_printf_loc from taking "locus" to taking "insn". Update
6115 description of the "_loc" calls to cover dump_location_t.
6116 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
6118 (dump_user_location_t::dump_user_location_t): New constructors,
6119 from gimple *stmt and rtx_insn *.
6120 (dump_user_location_t::from_function_decl): New function.
6121 (dump_loc): Make static.
6122 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
6123 const dump_location_t &.
6124 (dump_generic_expr_loc): Delete.
6125 (dump_printf_loc): Convert param "loc" from location_t to
6126 const dump_location_t &.
6127 (selftest::test_impl_location): New function.
6128 (selftest::dumpfile_c_tests): New function.
6129 * dumpfile.h: Include "profile-count.h".
6130 (class dump_user_location_t): New class.
6131 (struct dump_impl_location_t): New struct.
6132 (class dump_location_t): New class.
6133 (dump_printf_loc): Convert 2nd param from source_location to
6134 const dump_location_t &.
6135 (dump_generic_expr_loc): Delete.
6136 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
6137 const dump_location_t &.
6138 * gimple-fold.c (fold_gimple_assign): Update call to
6139 dump_printf_loc to pass in a dump_location_t rather than a
6140 location_t, via the gimple stmt.
6141 (gimple_fold_call): Likewise.
6142 * gimple-loop-interchange.cc
6143 (loop_cand::analyze_iloop_reduction_var): Update for change to
6144 check_reduction_path.
6145 (tree_loop_interchange::interchange): Update for change to
6147 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
6148 change in return-type of find_loop_location.
6149 (graphite_regenerate_ast_isl): Likewise.
6150 * graphite-optimize-isl.c (optimize_isl): Likewise.
6151 * graphite.c (graphite_transform_loops): Likewise.
6152 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
6153 pass in a dump_location_t rather than a location_t, via the
6155 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6156 * ipa.c (walk_polymorphic_call_targets): Likewise.
6157 * loop-unroll.c (report_unroll): Convert "locus" param from
6158 location_t to dump_location_t.
6159 (decide_unrolling): Update for change to get_loop_location's
6161 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
6162 location_t to dump_user_location_t.
6163 (grid_find_single_omp_among_assignments_1): Updates calls to
6164 dump_printf_loc to pass in a dump_location_t rather than a
6165 location_t, via the gimple stmt.
6166 (grid_parallel_clauses_gridifiable): Convert "tloc" from
6167 location_t to dump_location_t. Updates calls to dump_printf_loc
6168 to pass in a dump_location_t rather than a location_t, via the
6170 (grid_inner_loop_gridifiable_p): Likewise.
6171 (grid_dist_follows_simple_pattern): Likewise.
6172 (grid_gfor_follows_tiling_pattern): Likewise.
6173 (grid_target_follows_gridifiable_pattern): Likewise.
6174 (grid_attempt_target_gridification): Convert initialization
6175 of local "grid" from memset to zero-initialization; FIXME: does
6176 this require C++11? Update call to dump_printf_loc to pass in a
6177 optinfo_location rather than a location_t, via the gimple stmt.
6178 * profile.c (read_profile_edge_counts): Updates call to
6179 dump_printf_loc to pass in a dump_location_t rather than a
6181 (compute_branch_probabilities): Likewise.
6182 * selftest-run-tests.c (selftest::run_tests): Call
6184 * selftest.h (dumpfile_c_tests): New decl.
6185 * tree-loop-distribution.c (pass_loop_distribution::execute):
6186 Update for change in return type of find_loop_location.
6187 * tree-parloops.c (parallelize_loops): Likewise.
6188 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6189 "locus" from location_t to dump_user_location_t.
6190 (canonicalize_loop_induction_variables): Likewise.
6191 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6192 for change in return type of find_loop_location.
6193 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6194 to dump_printf_loc to pass in a dump_location_t rather than a
6195 location_t, via the stmt.
6196 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6198 * tree-vect-loop-manip.c (find_loop_location): Convert return
6199 type from source_location to dump_user_location_t.
6200 (vect_do_peeling): Update for above change.
6201 (vect_loop_versioning): Update for change in type of
6203 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6204 from location_t to dump_user_location_t.
6205 (vect_estimate_min_profitable_iters): Update for change in type
6207 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6208 location_t to dump_location_t.
6209 (vect_slp_bb): Update for change in type of vect_location.
6210 * tree-vectorizer.c (vect_location): Convert from source_location
6211 to dump_user_location_t.
6212 (try_vectorize_loop_1): Update for change in vect_location's type.
6213 (vectorize_loops): Likewise.
6214 (increase_alignment): Likewise.
6215 * tree-vectorizer.h (vect_location): Convert from source_location
6216 to dump_user_location_t.
6217 (find_loop_location): Convert return type from source_location to
6218 dump_user_location_t.
6219 (check_reduction_path): Convert 1st param from location_t to
6220 dump_user_location_t.
6221 * value-prof.c (check_counter): Update call to dump_printf_loc to
6222 pass in a dump_user_location_t rather than a location_t; update
6223 call to error_at for change in type of "locus".
6224 (check_ic_target): Update call to dump_printf_loc to
6225 pass in a dump_user_location_t rather than a location_t, via the
6228 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6230 * config/s390/s390.h (enum processor_flags): Do not use
6231 default tune parameter when -march was specified.
6233 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6236 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6237 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6240 2018-06-26 Richard Biener <rguenther@suse.de>
6242 PR tree-optimization/86287
6244 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6245 (vect_analyze_loop): Initialize n_stmts.
6247 2018-06-26 Richard Biener <rguenther@suse.de>
6250 * fold-const.c (fold_convertible_p): Pointer extension
6253 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6256 * dwarf2out.c (loc_list_has_views): Adjust comments.
6257 (dw_loc_list): Split single cross-partition range with
6260 2018-06-25 Jeff Law <law@redhat.com>
6262 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6263 on -mbig-switch by default.
6265 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6267 (const_float_0_operand): Remove unused predicate.
6268 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6269 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6270 (recipsf2): New expander. Original pattern now called
6272 (recipdf2, recipdf2_insn): Similarly.
6273 (rsqrtsf2, rsqrtsf2_insn): Similarly
6274 (rsqrtdf2, rsqrtdf2_insn): Similarly
6276 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6278 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6279 Simplify logic for FreeBSD (twice).
6281 2018-06-25 Martin Sebor <msebor@redhat.com>
6283 PR tree-optimization/86204
6284 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6285 a strnlen result if it's less than the length of the string.
6287 2018-06-25 Martin Sebor <msebor@redhat.com>
6289 PR tree-optimization/85700
6290 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6291 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6292 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6294 2018-06-25 Martin Sebor <msebor@redhat.com>
6296 * doc/extend.texi (Zero-length arrays): Update and clarify.
6298 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6300 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6301 added IEEE/IBM long double multilib support on PowerPC little
6302 endian Linux systems.
6303 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6304 (MULTILIB_DEFAULTS): Likewise.
6305 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6307 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6308 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6309 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6311 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6314 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6315 (REORDER_45): Likewise.
6317 2018-06-25 Jeff Law <law@redhat.com>
6319 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6320 dividend to 32 bits. Adjust length.
6321 (udivmodhi4): Cleanup output template. Fix length.
6323 2018-06-25 Carl Love <cel@us.ibm.com>
6325 * config/rs6000/vsx.md: Change word selector to prefered location.
6327 2018-06-25 Richard Biener <rguenther@suse.de>
6329 PR tree-optimization/86304
6330 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6331 epilogue-if-converted loops as well.
6333 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6335 * lto-section-out.c (lto_begin_section): Do not print section
6336 name for noaddr and unnumbered dumps.
6338 2018-06-25 Richard Biener <rguenther@suse.de>
6340 * tree-vectorizer.h (struct vec_info_shared): New structure
6341 with parts split out from struct vec_info and loop_nest from
6342 struct _loop_vec_info.
6343 (struct vec_info): Adjust accordingly.
6344 (struct _loop_vec_info): Likewise.
6345 (LOOP_VINFO_LOOP_NEST): Adjust.
6346 (LOOP_VINFO_DATAREFS): Likewise.
6347 (LOOP_VINFO_DDRS): Likewise.
6348 (struct _bb_vec_info): Likewise.
6349 (BB_VINFO_DATAREFS): Likewise.
6350 (BB_VINFO_DDRS): Likewise.
6351 (struct _stmt_vec_info): Add dr_aux member.
6352 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6353 (DR_MISALIGNMENT_UNINITIALIZED): New.
6354 (set_dr_misalignment): Adjust.
6355 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6356 (vect_analyze_loop): Adjust prototype.
6357 (vect_analyze_loop_form): Likewise.
6358 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6359 Compute dependences lazily.
6360 (vect_record_base_alignments): Use shared datarefs/ddrs.
6361 (vect_verify_datarefs_alignment): Likewise.
6362 (vect_analyze_data_refs_alignment): Likewise.
6363 (vect_analyze_data_ref_accesses): Likewise.
6364 (vect_analyze_data_refs): Likewise.
6365 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6366 constructor parameter for shared part.
6367 (vect_analyze_loop_form): Pass in shared part and adjust.
6368 (vect_analyze_loop_2): Pass in storage for the number of
6369 stmts. Move loop nest finding to the caller. Compute
6371 (vect_analyze_loop): Pass in shared part.
6372 (vect_transform_loop): Verify shared datarefs are unchanged.
6373 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6374 constructor parameter for shared part.
6375 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6376 (vect_slp_bb): Verify shared datarefs are unchanged before
6378 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6380 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6381 DR_MISALIGNMENT_UNINITIALIZED.
6382 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6383 parameter for shared part.
6384 (vec_info::~vec_info): Adjust.
6385 (vec_info_shared::vec_info_shared): New.
6386 (vec_info_shared::~vec_info_shared): Likewise.
6387 (vec_info_shared::save_datarefs): Likewise.
6388 (vec_info_shared::check_datarefs): Likewise.
6389 (try_vectorize_loop_1): Construct shared part live for analyses
6390 of a single loop for multiple vector sizes.
6391 * tree-parloops.c (gather_scalar_reductions): Adjust.
6393 2018-06-25 Richard Biener <rguenther@suse.de>
6395 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6396 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6397 (vect_analyze_data_refs): Remove similar code from here and
6398 simplify accordingly.
6400 2018-06-25 Richard Biener <rguenther@suse.de>
6402 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6403 for reverse storage order accesses rather than asserting
6404 they cannot happen here.
6406 2018-06-25 Tom de Vries <tdevries@suse.de>
6409 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6410 Use data16 instead of .byte for insn prefix.
6412 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6415 * parser.c (make_char_string_pack): Pass this literal chars
6416 through cpp_interpret_string.
6417 (cp_parser_userdef_numeric_literal): Check the result of
6418 make_char_string_pack.
6420 2018-06-24 Maya Rashish <coypu@sdf.org>
6422 * ginclude/stddef.h: Simplify conditions around avoiding
6423 re-definition of __size_t.
6425 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6427 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6428 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6430 2018-06-22 Maya Rashish <coypu@sdf.org>
6432 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6433 made to OpenBSD and NetBSD through the years.
6435 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6437 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6438 behavior of vec_pack (vector double, vector double) to match
6439 behavior of vec_float2 (vector double, vector double).
6441 2018-06-22 Olivier Hainque <hainque@adacore.com>
6443 * gimplify.c (gimplify_function_tree): Prevent creation
6444 of a trampoline for the address of the current function
6445 passed to entry/exit instrumentation hooks.
6447 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6450 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6453 2018-06-22 Martin Liska <mliska@suse.cz>
6455 PR tree-optimization/86263
6456 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6457 Bail out if is_enabled is false.
6458 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6460 (jump_table_cluster::is_enabled): New function.
6462 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6464 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6465 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6466 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6467 (lto_input_ts_binfo_tree_pointers): Likewise.
6468 * tree-streamer-out.c (streamer_write_tree_bitfields,
6469 write_ts_binfo_tree_pointers): Likewise.
6470 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6472 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6474 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6476 2018-06-22 Martin Liska <mliska@suse.cz>
6478 * symbol-summary.h (get): Make it pure and inline move
6479 functionality from ::get function.
6480 (get): Remove and inline into ::get and ::get_create.
6481 (get_create): Move code from ::get function.
6483 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6486 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6487 -x assembler-with-cpp.
6489 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6491 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6492 _FILE_OFFSET_BITS=64 for C++.
6494 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6496 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6497 conversion insn that shows up when pr85657-3.c is compiled using
6498 IEEE 128-bit long double.
6499 (neg<mode>2_internal): Use the correct mode to check whether the
6500 mode is IBM extended.
6501 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6502 multiply and divide external functions from being created more
6505 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6507 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6509 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6510 the edge can be forwarded.
6511 (cfg_layout_merge_blocks): Likewise.
6513 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6515 * except.c (finish_eh_generation): Commit edge insertions only after
6516 the EH edges have been redirected from post-landing to landing pads.
6518 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6520 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6521 create_tmp_var_for to create the FRAME decl.
6522 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6524 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6526 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6527 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6528 debug statement when resetting its value.
6529 (expand_call_inline): Copy the locus of the call onto the assignment
6530 of the return value, if any. Use local variable in more cases.
6532 2018-06-21 Martin Liska <mliska@suse.cz>
6534 * ipa-pure-const.c (propagate_nothrow): Use
6535 funct_state_summaries->get.
6536 (dump_malloc_lattice): Likewise.
6537 (propagate_malloc): Likewise.
6539 2018-06-21 Richard Biener <rguenther@suse.de>
6541 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6542 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6543 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6545 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6546 BLOCK_ABSTRACT_ORIGIN unconditionally.
6548 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6550 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6552 * ipa-reference.c (ipa_reference_c_finalize): Delete
6553 ipa_ref_opt_sum_summaries and set it to NULL.
6555 2018-06-21 Tom de Vries <tdevries@suse.de>
6557 PR tree-optimization/85859
6558 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6559 test with comment from bb_no_side_effects_p.
6561 2018-06-21 Richard Biener <rguenther@suse.de>
6563 PR tree-optimization/86232
6564 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6565 max for constant niter.
6567 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6569 * config/aarch64/aarch64-simd.md
6570 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6572 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6574 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6575 Make opernads of the unspec commutative.
6577 2018-06-21 Richard Biener <rguenther@suse.de>
6579 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6580 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6581 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6582 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6584 (vect_record_base_alignments): Do not record base alignment
6585 for gathers or scatters.
6586 (vect_compute_data_ref_alignment): Drop return value that is always
6587 true. Bail out early for gathers or scatters.
6588 (vect_enhance_data_refs_alignment): Bail out early for gathers
6590 (vect_find_same_alignment_drs): Likewise.
6591 (vect_analyze_data_refs_alignment): Remove dead code.
6592 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6593 (vect_analyze_data_refs): For possible gathers or scatters do
6594 not create an alternate DR, just check their possible validity
6595 and mark them. Adjust DECL_NONALIASED handling to not rely
6597 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6598 update inits of gathers or scatters.
6599 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6600 Also copy gather/scatter flag to pattern vinfo.
6602 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6604 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6605 behavior of vec_packsu (vector unsigned long long, vector unsigned
6606 long long) to match behavior of vec_packs with same signature.
6608 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6609 Thomas Schwinge <thomas@codesourcery.com>
6610 Cesar Philippidis <cesar@codesourcery.com>
6612 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6613 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6614 (gimplify_adjust_omp_clauses): Likewise.
6615 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6616 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6617 (gimplify_omp_target_update): Update handling of acc update and
6619 * omp-low.c (install_var_field): Remove unused parameter
6620 base_pointers_restrict.
6621 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6622 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6624 (omp_target_base_pointers_restrict_p): Delete.
6625 (scan_omp_target): Update call to scan_sharing_clauses.
6626 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6628 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6629 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6630 (convert_local_omp_clauses): Likewise.
6631 * tree-pretty-print.c (dump_omp_clause): Likewise.
6632 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6634 (omp_clause_code_name): Likewise.
6636 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6639 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6642 PR tree-optimization/86231
6643 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6644 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6646 2018-06-20 Tom de Vries <tdevries@suse.de>
6648 PR tree-optimization/86097
6649 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6650 iv type if signedness of iv type is not the same as that of *nit.
6652 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6654 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6655 EDGE_EH edges, verify they are all EDGE_EH.
6657 2018-06-20 Maya Rashish <coypu@sdf.org>
6659 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6661 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6663 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6664 * config/aarch64/aarch64.c (xgene1_tunings): Add
6665 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6666 (aarch64_mode_valid_for_sched_fusion_p):
6667 Allow 16-byte modes.
6668 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6669 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6671 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6673 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6674 * config/aarch64/iterators.md (VQ2): New mode iterator.
6676 2018-06-20 Martin Liska <mliska@suse.cz>
6678 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6679 Change default ratio from 10 to 8.
6681 2018-06-20 Martin Liska <mliska@suse.cz>
6683 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6685 (bit_test_cluster::find_bit_tests): Likewise.
6686 (switch_decision_tree::analyze_switch_statement): Find clusters.
6687 * tree-switch-conversion.h (struct jump_table_cluster): Document
6690 2018-06-20 Martin Liska <mliska@suse.cz>
6692 * tree-switch-conversion.c (switch_conversion::collect):
6693 Record m_uniq property.
6694 (switch_conversion::expand): Bail out for special conditions.
6695 (group_cluster::~group_cluster): New.
6696 (group_cluster::group_cluster): Likewise.
6697 (group_cluster::dump): Likewise.
6698 (jump_table_cluster::emit): New.
6699 (switch_decision_tree::fix_phi_operands_for_edges): New.
6700 (struct case_node): Remove struct.
6701 (jump_table_cluster::can_be_handled): New.
6702 (case_values_threshold): Moved to header.
6703 (reset_out_edges_aux): Likewise.
6704 (jump_table_cluster::is_beneficial): New.
6705 (bit_test_cluster::can_be_handled): Likewise.
6706 (add_case_node): Remove.
6707 (bit_test_cluster::is_beneficial): New.
6708 (case_bit_test::cmp): New.
6709 (bit_test_cluster::emit): New.
6710 (expand_switch_as_decision_tree_p): Remove.
6711 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6712 (fix_phi_operands_for_edge): Likewise.
6713 (switch_decision_tree::analyze_switch_statement): New.
6714 (compute_cases_per_edge): Move ...
6715 (switch_decision_tree::compute_cases_per_edge): ... here.
6716 (try_switch_expansion): Likewise.
6717 (switch_decision_tree::try_switch_expansion): Likewise.
6718 (record_phi_operand_mapping): Likewise.
6719 (switch_decision_tree::record_phi_operand_mapping): Likewise.
6720 (emit_case_decision_tree): Likewise.
6721 (switch_decision_tree::emit): Likewise.
6722 (balance_case_nodes): Likewise.
6723 (switch_decision_tree::balance_case_nodes): Likewise.
6724 (dump_case_nodes): Likewise.
6725 (switch_decision_tree::dump_case_nodes): Likewise.
6726 (emit_jump): Likewise.
6727 (switch_decision_tree::emit_jump): Likewise.
6728 (emit_cmp_and_jump_insns): Likewise.
6729 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6730 (emit_case_nodes): Likewise.
6731 (switch_decision_tree::emit_case_nodes): Likewise.
6732 (conditional_probability): Remove.
6733 * tree-switch-conversion.h (enum cluster_type): New.
6735 (struct cluster): Likewise.
6736 (cluster::cluster): Likewise.
6737 (struct simple_cluster): Likewise.
6738 (simple_cluster::simple_cluster): Likewise.
6739 (struct group_cluster): Likewise.
6740 (struct jump_table_cluster): Likewise.
6741 (struct bit_test_cluster): Likewise.
6742 (struct min_cluster_item): Likewise.
6743 (struct case_tree_node): Likewise.
6744 (case_tree_node::case_tree_node): Likewise.
6745 (jump_table_cluster::case_values_threshold): Likewise.
6746 (struct case_bit_test): Likewise.
6747 (struct switch_decision_tree): Likewise.
6748 (struct switch_conversion): Likewise.
6749 (switch_decision_tree::reset_out_edges_aux): Likewise.
6751 2018-06-20 Martin Liska <mliska@suse.cz>
6753 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6754 (hoist_edge_and_branch_if_true): Likewise.
6755 (expand_switch_using_bit_tests_p): Likewise.
6756 (struct case_bit_test): Likewise.
6757 (case_bit_test_cmp): Likewise.
6758 (emit_case_bit_tests): Likewise.
6759 (switch_conversion::switch_conversion): New class.
6760 (struct switch_conv_info): Remove old struct.
6761 (collect_switch_conv_info): More to ...
6762 (switch_conversion::collect): ... this.
6763 (check_range): Likewise.
6764 (switch_conversion::check_range): Likewise.
6765 (check_all_empty_except_final): Likewise.
6766 (switch_conversion::check_all_empty_except_final): Likewise.
6767 (check_final_bb): Likewise.
6768 (switch_conversion::check_final_bb): Likewise.
6769 (create_temp_arrays): Likewise.
6770 (switch_conversion::create_temp_arrays): Likewise.
6771 (free_temp_arrays): Likewise.
6772 (gather_default_values): Likewise.
6773 (switch_conversion::gather_default_values): Likewise.
6774 (build_constructors): Likewise.
6775 (switch_conversion::build_constructors): Likewise.
6776 (constructor_contains_same_values_p): Likewise.
6777 (switch_conversion::contains_same_values_p): Likewise.
6778 (array_value_type): Likewise.
6779 (switch_conversion::array_value_type): Likewise.
6780 (build_one_array): Likewise.
6781 (switch_conversion::build_one_array): Likewise.
6782 (build_arrays): Likewise.
6783 (switch_conversion::build_arrays): Likewise.
6784 (gen_def_assigns): Likewise.
6785 (switch_conversion::gen_def_assigns): Likewise.
6786 (prune_bbs): Likewise.
6787 (switch_conversion::prune_bbs): Likewise.
6788 (fix_phi_nodes): Likewise.
6789 (switch_conversion::fix_phi_nodes): Likewise.
6790 (gen_inbound_check): Likewise.
6791 (switch_conversion::gen_inbound_check): Likewise.
6792 (process_switch): Use the newly created class.
6793 (switch_conversion::expand): New.
6794 (switch_conversion::~switch_conversion): New.
6795 * tree-switch-conversion.h: New file.
6797 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6799 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6800 tree-vect-patterns.c.
6801 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6802 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6803 (vect_recog_sad_pattern): Likewise.
6804 (vect_recog_widen_sum_pattern): Likewise.
6805 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6806 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6807 (vect_recog_rotate_pattern): Likewise.
6808 (vect_recog_mult_pattern): Likewise.
6809 (vect_recog_vector_vector_shift_pattern): Likewise.
6810 (vect_recog_divmod_pattern): Likewise.
6811 (vect_recog_mixed_size_cond_pattern): Likewise.
6812 (vect_recog_bool_pattern): Likewise.
6813 (vect_recog_mask_conversion_pattern): Likewise.
6814 (vect_try_gather_scatter_pattern): Likewise.
6815 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6816 (vect_recog_over_widening_pattern): Likewise.
6817 (vect_recog_gather_scatter_pattern): Likewise.
6818 (vect_recog_func_ptr): Move from tree-vectorizer.h
6819 (vect_vect_recog_func_ptrs): Move further down the file.
6820 (vect_recog_func): Likewise. Remove the third argument.
6821 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6822 (vect_pattern_recog_1): Expect the pattern function to do any
6823 necessary target tests. Also expect it to provide a vector type.
6824 Remove the type_in handling.
6826 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6828 * tree-vect-patterns.c (vect_pattern_detected): New function.
6829 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6830 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6831 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6832 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6833 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6834 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6835 (vect_recog_mask_conversion_pattern)
6836 (vect_try_gather_scatter_pattern): Likewise.
6838 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6840 * tree-vect-patterns.c (vect_get_internal_def): New function.
6841 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6842 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6843 (search_type_for_mask_1): Use it.
6845 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6847 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6848 redundant WIDEN_SUM_EXPR handling.
6849 (vect_recog_sad_pattern): Likewise.
6851 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6853 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6854 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6855 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6856 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6857 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6859 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6861 * tree-vect-stmts.c (vectorizable_call): Make sure that we
6862 use the stmt_vec_info of the original bb statement for the
6863 new zero assignment, even if the call is part of a pattern.
6865 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6867 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6868 that the sequence is attached to the original statement rather
6869 than the pattern statement.
6870 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6871 PATTERN_DEF_SEQ from the original statement rather than
6872 the main pattern statement.
6873 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6874 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6875 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6877 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6879 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6880 definition statements before the early exit for statements that aren't
6882 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6884 (vect_transform_loop): ...here. Process pattern definition
6885 statements without first checking whether the main pattern
6886 statement is live or relevant.
6888 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6890 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6891 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6893 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
6895 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6896 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6897 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6898 (expand_block_compare): Change select_block_compare_mode call.
6899 (expand_strncmp_align_check): Use new functions, fix comment.
6900 (emit_final_str_compare_gpr): New function.
6901 (expand_strn_compare): Refactor and clean up code.
6902 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6904 2018-06-19 Tony Reix <tony.reix@atos.com>
6905 Damien Bergamini <damien.bergamini@atos.com>
6906 David Edelsohn <dje.gcc@gmail.com>
6908 * collect2.c (static_obj): New variable.
6909 (static_libs): New variable.
6910 (is_in_list): Uncomment declaration.
6911 (main): Track AIX libraries linked statically.
6912 (is_in_list): Uncomment definition.
6913 (scan_prog_file): Don't add AIX shared libraries initializer
6914 to constructor list if linking statically.
6916 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
6918 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6920 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6922 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
6924 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6927 2018-06-19 Martin Liska <mliska@suse.cz>
6929 * config/i386/i386.c (ix86_can_inline_p): Do not use
6930 ipa_fn_summaries::get_create.
6931 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6933 (devirtualization_time_bonus): Likewise.
6934 (ipcp_propagate_stage): Likewise.
6935 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6936 (edge_set_predicate): Likewise.
6937 (evaluate_conditions_for_known_args): Likewise.
6938 (evaluate_properties_for_edge): Likewise.
6939 (ipa_call_summary::reset): Tranform to ...
6940 (ipa_call_summary::~ipa_call_summary): ... this.
6941 (ipa_fn_summary::reset): Transform to ...
6942 (ipa_fn_summary::~ipa_fn_summary): ... this.
6943 (ipa_fn_summary_t::remove): Rename to ...
6944 (ipa_fn_summary_t::remove_callees): ... this.
6945 (ipa_fn_summary_t::duplicate): Use placement new
6946 instead of memory copy.
6947 (ipa_call_summary_t::duplicate): Likewise.
6948 (ipa_call_summary_t::remove): Remove.
6949 (dump_ipa_call_summary): Change get_create to get.
6950 (ipa_dump_fn_summary): Dump only when summary exists.
6951 (analyze_function_body): Use symbol_summary::get instead
6953 (compute_fn_summary): Likewise.
6954 (estimate_edge_devirt_benefit): Likewise.
6955 (estimate_edge_size_and_time): Likewise.
6956 (inline_update_callee_summaries): Likewise.
6957 (remap_edge_change_prob): Likewise.
6958 (remap_edge_summaries): Likewise.
6959 (ipa_merge_fn_summary_after_inlining): Likewise.
6960 (write_ipa_call_summary): Likewise.
6961 (ipa_fn_summary_write): Likewise.
6962 (ipa_free_fn_summary): Likewise.
6963 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6964 (struct ipa_call_summary): Likewise.
6965 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6967 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6968 (estimate_size_after_inlining): Likewise.
6969 (estimate_growth): Likewise.
6970 (growth_likely_positive): Likewise.
6971 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6972 (inline_call): Likewise.
6973 * ipa-inline.c (caller_growth_limits): Likewise.
6974 (can_inline_edge_p): Likewise.
6975 (can_inline_edge_by_limits_p): Likewise.
6976 (compute_uninlined_call_time): Likewise.
6977 (compute_inlined_call_time): Likewise.
6978 (want_inline_small_function_p): Likewise.
6979 (edge_badness): Likewise.
6980 (update_caller_keys): Likewise.
6981 (update_callee_keys): Likewise.
6982 (inline_small_functions): Likewise.
6983 (inline_to_all_callers_1): Likewise.
6984 (dump_overall_stats): Likewise.
6985 (early_inline_small_functions): Likewise.
6986 (early_inliner): Likewise.
6987 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6988 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6989 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6990 * ipa-split.c (execute_split_functions): Likewise.
6991 * symbol-summary.h: Likewise.
6992 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6994 2018-06-19 Richard Biener <rguenther@suse.de>
6996 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6997 (vectorize_loops): ... here. Fix dbgcnt handling.
6998 (try_vectorize_loop): Wrap try_vectorize_loop_1.
7000 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
7003 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
7004 ieee128 argument takes up only one (vector) register, not two (floating
7007 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
7009 * gimplify.c (gimplify_init_constructor): Really never clear for an
7010 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
7012 2018-06-19 Richard Biener <rguenther@suse.de>
7014 PR tree-optimization/86179
7015 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
7016 after failed recognition.
7018 2018-06-18 Martin Sebor <msebor@redhat.com>
7021 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
7022 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
7023 Handle integer subtraction.
7024 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
7025 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
7027 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7029 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
7030 param from rtx to rtx_insn *.
7031 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
7033 (frv_ifcvt_modify_insn): Likwise.
7034 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
7035 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
7036 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
7037 as_a <rtx_insn *> cast to local "unprotected_region" once
7038 it's been established that it's not NULL or pc_rtx.
7039 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
7040 param "sethi" from rtx to rtx_insn *.
7041 (nds32_group_float_insns): Likewise for param "insn".
7042 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
7044 (vax_output_int_subtract): Likewise.
7045 * config/vax/vax.c (vax_output_int_add): Likewise for param
7047 (vax_output_int_subtract): Likewise.
7048 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
7049 (emit_pattern_after): Likewise for param "after".
7050 (emit_insn_after): Likewise.
7051 (emit_jump_insn_after): Likewise.
7052 (emit_call_insn_after): Likewise.
7053 (emit_debug_insn_after): Likewise.
7054 (emit_pattern_before): Likewise for param "before".
7055 (emit_insn_before): Likewise.
7056 (emit_jump_insn_before): Likewise.
7057 * final.c (get_insn_template): Likewise for param "insn", removing
7059 * output.h (get_insn_template): Likewise for 2nd param.
7060 * rtl.h (emit_insn_before): Likewise.
7061 (emit_jump_insn_before): Likewise.
7062 (emit_debug_insn_before_noloc): Likewise.
7063 (emit_insn_after): Likewise.
7064 (emit_jump_insn_after): Likewise.
7065 (emit_call_insn_after): Likewise.
7066 (emit_debug_insn_after): Likewise.
7067 (set_insn_deleted): Likewise for param.
7069 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
7072 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
7073 floating point modes, so that IFmode is numerically greater than
7074 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
7075 to declare the ordering. This prevents IFmode from being
7076 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
7077 machine. Include rs6000-modes.h to share the fractional values
7078 between genmodes* and the rest of the compiler.
7082 * config/rs6000/rs6000-modes.h: New file.
7083 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
7084 meaning of rs6000_long_double_size so that 126..128 selects an
7085 appropriate 128-bit floating point type.
7086 (rs6000_option_override_internal): Likewise.
7087 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
7088 (TARGET_LONG_DOUBLE_128): Change the meaning of
7089 rs6000_long_double_size so that 126..128 selects an appropriate
7090 128-bit floating point type.
7091 (LONG_DOUBLE_TYPE_SIZE): Update comment.
7092 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
7093 source and destination to match the standard usage.
7094 (truncifkf2): Likewise.
7095 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
7096 ISA 2.07 to use an explicit clobber, instead of passing in a
7098 (copysign<mode>3_soft): Likewise.
7100 2018-06-18 David Malcolm <dmalcolm@redhat.com>
7102 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7103 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
7104 (vect_slp_analyze_instance_dependence): Likewise.
7105 (vect_enhance_data_refs_alignment): Likewise.
7106 (vect_analyze_data_refs_alignment): Likewise.
7107 (vect_slp_analyze_and_verify_instance_alignment
7108 (vect_analyze_data_ref_accesses): Likewise.
7109 (vect_prune_runtime_alias_test_list): Likewise.
7110 (vect_analyze_data_refs): Likewise.
7111 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
7112 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
7113 (vect_analyze_scalar_cycles_1): Likewise.
7114 (vect_get_loop_niters): Likewise.
7115 (vect_analyze_loop_form_1): Likewise.
7116 (vect_update_vf_for_slp): Likewise.
7117 (vect_analyze_loop_operations): Likewise.
7118 (vect_analyze_loop): Likewise.
7119 (vectorizable_induction): Likewise.
7120 (vect_transform_loop): Likewise.
7121 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
7122 * tree-vect-slp.c (vect_analyze_slp): Likewise.
7123 (vect_make_slp_decision): Likewise.
7124 (vect_detect_hybrid_slp): Likewise.
7125 (vect_slp_analyze_operations): Likewise.
7126 (vect_slp_bb): Likewise.
7127 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
7128 (vectorizable_bswap): Likewise.
7129 (vectorizable_call): Likewise.
7130 (vectorizable_simd_clone_call): Likewise.
7131 (vectorizable_conversion): Likewise.
7132 (vectorizable_assignment): Likewise.
7133 (vectorizable_shift): Likewise.
7134 (vectorizable_operation): Likewise.
7135 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
7137 2018-06-18 Martin Sebor <msebor@redhat.com>
7139 PR tree-optimization/81384
7140 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
7141 * builtins.c (expand_builtin_strnlen): New function.
7142 (expand_builtin): Call it.
7143 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
7144 * builtins.def (BUILT_IN_STRNLEN): New.
7145 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
7146 Warn for bounds in excess of maximum object size.
7147 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
7148 single-value ranges. Handle strnlen.
7149 (handle_builtin_strlen): Handle strnlen.
7150 (strlen_check_and_optimize_stmt): Same.
7151 * doc/extend.texi (Other Builtins): Document strnlen.
7153 2018-06-18 Maya Rashish <coypu@sdf.org>
7155 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
7156 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
7157 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
7159 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
7161 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
7163 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7165 * tree.c (escaped_string::escape): Replace cast to char * by
7166 const_cast<char *> (unescaped).
7168 2018-06-18 Nick Clifton <nickc@redhat.com>
7171 * tree.c (escaped_string): New class. Converts an unescaped
7172 string into its escaped equivalent.
7173 (warn_deprecated_use): Use the new class to convert the
7174 deprecation message, if present.
7175 (test_escaped_strings): New self test.
7176 (test_c_tests): Add test_escaped_strings.
7177 * doc/extend.texi (deprecated): Add a note that the
7178 deprecation message is affected by the -fmessage-length
7179 option, and that control characters will be escaped.
7180 (#pragma GCC error): Document this pragma.
7181 (#pragma GCC warning): Likewise.
7182 * doc/invoke.texi (-fmessage-length): Document this option's
7183 effect on the #warning and #error preprocessor directives and
7184 the deprecated attribute.
7186 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7188 * tree.c (decl_value_expr_lookup): Revert latest change.
7189 (decl_value_expr_insert): Likewise.
7191 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7193 * gimplify.c (nonlocal_vlas): Delete.
7194 (nonlocal_vla_vars): Likewise.
7195 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7197 (gimplify_body): Do not create and destroy nonlocal_vlas.
7198 * tree-nested.c: Include diagnostic.h.
7199 (use_pointer_in_frame): Tweak.
7200 (lookup_field_for_decl): Add assertion and declare the transformation.
7201 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7202 internal error when the reference is in a wrong context. Do not
7203 create a debug decl by default.
7204 (note_nonlocal_block_vlas): Delete.
7205 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7206 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7207 create a debug decl by default.
7208 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7209 call is in a wrong context.
7210 (fixup_vla_decls): New function.
7211 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7212 debug variables were created.
7213 * tree.c (decl_value_expr_lookup): Add checking assertion.
7214 (decl_value_expr_insert): Likewise.
7216 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7219 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7220 * tree-scalar-evolution.c (interpret_expr): Likewise.
7221 (expression_expensive_p): Likewise.
7222 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7223 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7224 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7225 (ssa_defined_by_minus_one_stmt_p): New.
7227 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7230 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7231 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7232 * dojump.c (do_jump): Likewise.
7233 * expr.c (expand_expr_real_2): Check operand type's sign.
7234 * fold-const.c (const_unop): Handle ABSU_EXPR.
7235 (fold_abs_const): Likewise.
7236 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7237 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7238 (strip_sign_op_1): Likesise.
7239 * match.pd: Add new pattern to generate ABSU_EXPR.
7240 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7241 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7242 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7243 * tree-inline.c (estimate_operator_cost): Likewise.
7244 * tree-pretty-print.c (dump_generic_node): Likewise.
7245 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7246 * tree.def (ABSU_EXPR): New.
7248 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7251 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7252 documented as preserved for backward compatibility only.
7253 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7255 PR rtl-optimization/86108
7256 * bb-reorder.c (create_forwarder_block): Renamed to ...
7257 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7258 jump from new landing pad to the second part.
7259 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7262 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7265 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7266 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7267 Only call store_expr for halves if the mode is the same.
7270 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7271 Fix up comment formatting.
7273 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7275 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7276 (typed_splay_tree::closure,
7277 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7278 (typed_splay_tree::typed_splay_tree,
7279 typed_splay_tree::operator =): Declared private.
7280 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7281 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7282 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7283 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7284 typed_splay_tree::splay_tree_splay,
7285 typed_splay_tree::splay_tree_foreach_helper,
7286 typed_splay_tree::splay_tree_insert,
7287 typed_splay_tree::splay_tree_remove,
7288 typed_splay_tree::splay_tree_lookup,
7289 typed_splay_tree::splay_tree_predecessor,
7290 typed_splay_tree::splay_tree_successor,
7291 typed_splay_tree::splay_tree_min,
7292 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7293 (typed_splay_tree::root, typed_splay_tree::comp,
7294 typed_splay_tree::delete_key,
7295 typed_splay_tree::delete_value): New data members.
7296 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7297 typed_splay_tree::remove.
7299 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7301 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7302 -mginv and -mno-ginv to the assembler.
7303 * config/mips/mips.opt (-mcrc): New option.
7305 * doc/invoke.text (-mcrc): Document.
7308 2018-06-15 Nick Clifton <nickc@redhat.com>
7311 * tree.c (escaped_string): New class. Converts an unescaped
7312 string into its escaped equivalent.
7313 (warn_deprecated_use): Use the new class to convert the
7314 deprecation message, if present.
7315 (test_escaped_strings): New self test.
7316 (test_c_tests): Add test_escaped_strings.
7317 * doc/extend.texi (deprecated): Add a note that the
7318 deprecation message is affected by the -fmessage-length
7319 option, and that control characters will be escaped.
7320 (#pragma GCC error): Document this pragma.
7321 (#pragma GCC warning): Likewise.
7322 * doc/invoke.texi (-fmessage-length): Document this option's
7323 effect on the #warning and #error preprocessor directives and
7324 the deprecated attribute.
7326 2018-06-15 Richard Biener <rguenther@suse.de>
7328 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7329 here, also noting vector size used.
7330 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7331 size used in MSG_OPTIMIZED_LOCATIONS dump.
7332 (pass_slp_vectorize::execute): Adjust.
7334 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7337 * config/arc/arc.c (arc_return_address_register): Fix
7340 2018-06-15 Richard Biener <rguenther@suse.de>
7343 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7344 leave useless conversion stripping to force_gimple_operand_gsi.
7345 (gimplify_build2): Likewise.
7346 (gimplify_build1): Likewise.
7348 2018-06-15 Richard Biener <rguenther@suse.de>
7351 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7352 before adjusting their block.
7354 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7356 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7357 multilibs for *-*-rtems*.
7358 * config/riscv/t-rtems: New file.
7360 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7363 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7364 unsigned_type_for returns NULL.
7367 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7368 subregs of multi-word pseudos unless the float mode has word size.
7370 2018-06-14 Richard Biener <rguenther@suse.de>
7373 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7374 duplicate and harmful type_hash_canon.
7375 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7377 2018-06-14 Richard Biener <rguenther@suse.de>
7380 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7383 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7385 * config/rtems.h (STDINT_LONG32): Define.
7387 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7388 Prachi Godbole <prachi.godbole@imgtec.com>
7390 * config/mips/mips-cpus.def: Define P6600.
7391 * config/mips/mips-tables.opt: Regenerate.
7392 * config/mips/mips.c (mips_ucbranch_type): New enum.
7393 (mips_rtx_cost_data): Add support for P6600.
7394 (mips_issue_rate): Likewise.
7395 (mips_multipass_dfa_lookahead): Likewise.
7396 (mips_avoid_hazard): Likewise.
7397 (mips_reorg_process_insns): Likewise.
7398 (mips_classify_branch_p6600): New function.
7399 * config/mips/mips.h (TUNE_P6600): New define.
7400 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7401 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7402 * config/mips/mips.md: Include p6600.md.
7403 (processor): Add p6600.
7404 * config/mips/p6600.md: New file.
7405 * doc/invoke.texi: Add p6600 to supported architectures.
7407 2018-06-13 Martin Sebor <msebor@redhat.com>
7409 PR tree-optimization/86114
7410 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7412 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7414 2018-06-13 Richard Biener <rguenther@suse.de>
7416 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7417 Properly set vector type of the intermediate stmt.
7418 * tree-vect-stmts.c (vectorizable_operation): The destination
7419 var always has vectype_out type.
7421 2018-06-13 Jeff Law <law@redhat.com>
7423 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7424 integer 0 for argument to print_rtl_with_bb.
7425 (rl78_reorg): Likewise.
7427 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7429 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7430 from rtx to rtx_insn *.
7431 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7433 (add_sched_insns_for_speculation): Likewise for local "target",
7434 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7435 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7436 from rtx_insn ** to rtx_code_label **.
7437 (reorg_emit_nops): Likewise.
7438 (c6x_reorg): Likewise for local "call_labels".
7439 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7441 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7442 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7443 the loops over LABEL_REFS.
7444 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7446 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7447 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7448 (split_branches): Strengthen local "olabel" from rtx to
7449 rtx_insn *, adding a safe_as_a cast.
7450 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7452 (add_insn_after): Likewise for first two params.
7453 (add_insn_before): Likewise.
7454 (remove_insn): Likewise for param.
7455 (emit_pattern_before_noloc): Likewise for second and third params.
7456 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7457 (emit_call_insn_before_noloc): Likewise.
7458 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7460 (emit_barrier_before): Likewise.
7461 (emit_label_before): Strengthen "label" param from "rtx" to
7462 "rtx_code_label *". Strengthen "before" param from "rtx" to
7464 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7466 (emit_pattern_after_noloc): Likewise.
7467 (emit_insn_after_noloc): Likewise.
7468 (emit_jump_insn_after_noloc): Likewise.
7469 (emit_call_insn_after_noloc): Likewise.
7470 (emit_debug_insn_after_noloc): Likewise.
7471 (emit_barrier_after): Likewise.
7472 (emit_label_after): Likewise for both params.
7473 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7474 "loc" param from "int" to "location_t".
7475 (emit_insn_after_setloc): Likewise.
7476 (emit_jump_insn_after_setloc): Likewise.
7477 (emit_call_insn_after_setloc): Likewise.
7478 (emit_debug_insn_after_setloc): Likewise.
7479 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7480 "loc" param from "int" to "location_t".
7481 (emit_pattern_before): Convert NULL_RTX to NULL.
7482 (emit_insn_before_setloc): Convert "loc" param from "int" to
7484 (emit_jump_insn_before_setloc): Likewise.
7485 (emit_call_insn_before_setloc): Likewise.
7486 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7487 rtx_insn *. Convert "loc" param from "int" to "location_t".
7488 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7489 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7490 Convert 3rd param from "int" to "location_t".
7491 (emit_barrier_before, emit_barrier_after, next_real_insn):
7492 Strengthen param from rtx to rtx_insn *.
7493 (emit_label_before): Strengthen 1st param from "rtx" to
7494 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7496 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7497 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7498 Strengthen 2nd param from "rtx" to "rtx_insn *".
7499 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7500 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7501 Likewise. Convert 3rd param from "int" to "location_t".
7502 (emit_label_after): Strengthen 1st param from "rtx" to
7504 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7506 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7507 from "rtx" to "rtx_insn *".
7509 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7511 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7512 bodies streamed in with -Q.
7513 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7514 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7515 * gimple-streamer-out.c: Include gimple-pretty-print.h
7516 (output_bb): Dump stmts streamed.
7517 * lto-section-out.c: Include print-tree.h
7518 (lto_begin_section): Dump sections created.
7519 (lto_output_decl_index): Dump decl encoded.
7520 * lto-streamer-out.c: Include print-tree.h
7521 (create_output_block): Dump output block created.
7522 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7523 (output_function): Dump function output.
7524 (output_constructor): Dump constructor streamed.
7525 (write_global_stream): Output indexes encoded.
7526 (produce_asm_for_decls): Dump streams encoded.
7527 * lto-streamer.c (streamer_dump_file): New global var.
7528 * lto-streamer.h (streamer_dump_file): Declare.
7529 * passes.c (ipa_write_summaries): Initialize streamer dump.
7530 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7533 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7536 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7537 offsets for register save directives. Emit a second batch of save
7538 directives, if need be, when the function accesses prior frames.
7540 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7542 * config/arc/fpu.md (fmasf4): Force operand to register.
7543 (fnmasf4): Likewise.
7545 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7547 * config/arc/arc-protos.h (arc_pad_return): Remove.
7548 * config/arc/arc.c (machine_function): Remove force_short_suffix
7550 (arc_print_operand): Adjust printing of '&'.
7551 (arc_verify_short): Remove conditional printing of short suffix.
7552 (arc_final_prescan_insn): Remove reference to size_reason.
7553 (pad_return): New function.
7554 (arc_reorg): Call pad_return.
7555 (arc_pad_return): Remove.
7556 (arc_init_machine_status): Remove reference to force_short_suffix.
7557 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7558 (attr length): When attribute iscompact is true force to 2
7559 regardless; in the case of maybe check if we want to force the
7560 instruction to have 4 bytes length.
7561 (nopv): Change it to generate 4 byte long nop as well.
7562 (blockage): New pattern.
7563 (simple_return): Remove call to arc_pad_return.
7564 (p_return_i): Likewise.
7566 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7568 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7570 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7572 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7575 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7577 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7578 for ARC700 and ARCv2.
7580 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7583 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7584 operands[2] instead of operands[1].
7587 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7589 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7590 case, check whether the outer register overlaps an unallocatable
7591 register, not just whether it fits the required class.
7593 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7595 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7597 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7598 (memrefs_conflict_p): Likewise.
7599 (init_alias_analysis): Likewise.
7600 * cfgexpand.c (expand_debug_expr): Likewise.
7601 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7602 * cse.c (fold_rtx): Likewise.
7603 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7604 * expr.c (emit_block_move_hints): Likewise.
7605 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7606 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7607 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7608 (emit_group_store): Likewise.
7609 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7610 to read the PRE/POST_MODIFY increment.
7611 * calls.c (store_one_arg): Use strip_offset.
7612 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7614 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7616 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7617 (simplify_binary_operation_1): Extend CONST_INT handling to
7619 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7620 than a HOST_WIDE_INT.
7621 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7623 (adjust_mems, add_stores): Update accodingly.
7624 (vt_canonicalize_addr): Track polynomial offsets.
7625 (emit_note_insn_var_location): Likewise.
7626 (vt_add_function_parameter): Likewise.
7627 (vt_initialize): Likewise.
7629 2018-06-12 Jeff Law <law@redhat.com>
7631 * config.gcc (alpha*-*-freebsd*): Remove.
7632 * config/alpha/freebsd.h: Remove.
7634 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7637 * spellcheck-tree.c (levenshtein_distance): Rename to...
7638 (get_edit_distance): ...this, and update for underlying renaming.
7639 * spellcheck-tree.h (levenshtein_distance): Rename to...
7640 (get_edit_distance): ...this.
7641 * spellcheck.c (levenshtein_distance): Rename to...
7642 (get_edit_distance): ...this. Convert from Levenshtein distance
7643 to Damerau-Levenshtein distance by supporting transpositions of
7644 adjacent characters. Rename "v1" to "v_next" and "v0" to
7646 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7647 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7648 update for underlying renaming.
7649 (selftest::levenshtein_distance_unit_test): Rename to...
7650 (selftest::test_get_edit_distance_unit): ...this, and update for
7651 underlying renaming.
7652 (selftest::test_find_closest_string): Add example from PR 69968
7653 where transposition helps
7654 (selftest::test_metric_conditions): Update for renaming.
7655 (selftest::test_metric_conditions): Likewise.
7656 (selftest::spellcheck_c_tests): Likewise.
7657 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7658 (get_edit_distance): ...this.
7659 (best_match::consider): Update for renaming.
7661 2018-06-12 Martin Sebor <msebor@redhat.com>
7663 PR tree-optimization/85259
7664 * builtins.c (compute_objsize): Handle constant offsets.
7665 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7666 true iff a warning has been issued.
7667 * gimple.h (gimple_nonartificial_location): New function.
7668 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7669 gimple_nonartificial_location and handle -Wno-system-headers.
7670 (handle_builtin_stxncpy): Same.
7672 2018-06-12 Martin Sebor <msebor@redhat.com>
7675 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7677 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
7679 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7680 BUILTIN_VEC_XST entries for pointer to double and long long.
7682 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
7685 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7687 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7690 2018-06-12 Martin Liska <mliska@suse.cz>
7692 * doc/options.texi: Document IntegerRange.
7694 2018-06-12 Martin Liska <mliska@suse.cz>
7696 * config/i386/i386.opt: Make MPX-related options as Deprecated.
7697 * opt-functions.awk: Handle Deprecated flag.
7698 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7700 (read_cmdline_option): Report warning for a deprecated option.
7701 * opts.h (struct cl_option): Add new field cl_deprecated.
7702 (CL_ERR_DEPRECATED): New.
7704 2018-06-12 Martin Liska <mliska@suse.cz>
7706 * doc/options.texi: Document Deprecated option flag.
7708 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7710 * config/arc/arc-arch.h (arc_extras): New enum.
7711 (arc_cpu_t):Add field extra.
7712 (arc_cpu_types): Consider the extras.
7713 * config/arc/arc-cpus.def: Add extras info.
7714 * config/arc/arc-opts.h (processor_type): Consider extra field.
7715 * config/arc/arc.c (arc_override_options): Handle extra field.
7717 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7719 * config/arc/arc-arch.h: Update ARC_OPTX macro.
7720 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7722 * config/arc/arc.c (arc_init): Update pic warning.
7723 (irq_range): Update irq range parsing warnings.
7724 (arc_override_options): Update various warning messages.
7725 (arc_handle_aux_attribute): Likewise.
7727 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
7729 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7731 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7733 * doc/sourcebuild.texi: Document usage of line number 0 in verify
7734 compiler messages directives.
7736 2018-06-12 Matthew Fortune <mfortune@gmail.com>
7738 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7739 * config/mips/mips-tables.opt: Regenerate.
7740 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7742 * doc/invoke.texi: Document -march=i6500.
7744 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
7746 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7747 (i6400_gpmul): Add cpu_unit.
7748 (i6400_gpdiv): Likewise.
7749 (i6400_msa_add_d): Update reservations.
7750 (i6400_msa_int_add) Likewise.
7751 (i6400_msa_short_logic3) Likewise.
7752 (i6400_msa_short_logic2) Likewise.
7753 (i6400_msa_short_logic) Likewise.
7754 (i6400_msa_move) Likewise.
7755 (i6400_msa_cmp) Likewise.
7756 (i6400_msa_short_float2) Likewise.
7757 (i6400_msa_div_d) Likewise.
7758 (i6400_msa_long_logic1) Likewise.
7759 (i6400_msa_long_logic2) Likewise.
7760 (i6400_msa_mult) Likewise.
7761 (i6400_msa_long_float2) Likewise.
7762 (i6400_msa_long_float4) Likewise.
7763 (i6400_msa_long_float5) Likewise.
7764 (i6400_msa_long_float8) Likewise.
7765 (i6400_fpu_fadd): Include frint type.
7766 (i6400_fpu_store): New define_insn_reservation.
7767 (i6400_fpu_load): Likewise.
7768 (i6400_fpu_move): Likewise.
7769 (i6400_fpu_fcmp): Likewise.
7770 (i6400_fpu_fmadd): Likewise.
7771 (i6400_int_mult): Include imul3nc type and update reservation.
7772 (i6400_int_div): Include idiv3 type and update reservation.
7773 (i6400_int_load): Update to check type not move_type.
7774 (i6400_int_store): Likewise.
7775 (i6400_int_prefetch): Set zero latency.
7777 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
7779 * gcc.c: Document new %@{...} sequence.
7780 (LINK_COMMAND_SPEC): Use it for the -L switches.
7781 (cpp_unique_options): Use it for the -I switches.
7782 (at_file_argbuf): New global variable.
7783 (in_at_file): Likewise.
7784 (alloc_args): Create at_file_argbuf.
7785 (clear_args): Truncate at_file_argbuf.
7786 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7787 (open_at_file): New function.
7788 (close_at_file): Likewise.
7789 (create_at_file): Delete.
7790 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7793 (validate_switches_from_spec): Deal with %@{...} sequence.
7794 (validate_switches): Likewise.
7795 (driver::finalize): Call clear_args.
7797 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7799 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7801 2018-06-11 Martin Sebor <msebor@redhat.com>
7803 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7804 (Wno-class-memaccess): Add @opindex.
7805 (Wno-templates, Wno-multiple-inheritance): Same.
7806 (Wno-virtual-inheritance, Wno-namespaces): Same.
7807 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7808 (Wno-format-overflow, Wno-format-truncation): Same.
7809 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7810 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7811 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7812 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7813 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7814 (Wno-misspelled-isr): Same.
7816 2018-06-11 Martin Sebor <msebor@redhat.com>
7818 * PR tree-optimization/86083
7819 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7821 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7823 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7825 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7828 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7829 on the correct operand.
7830 (*movdi_internal64): Ditto.
7832 2018-06-11 Martin Liska <mliska@suse.cz>
7834 PR tree-optimization/86089
7835 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7837 2018-06-11 Julia Koval <julia.koval@intel.com>
7839 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7840 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7841 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7843 2018-06-11 Olivier Hainque <hainque@adacore.com>
7845 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7846 for Ada with strict dwarf2.
7848 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
7851 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7854 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
7856 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7858 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
7860 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7863 2018-06-08 Martin Liska <mliska@suse.cz>
7865 * tree-cfg.h (debug_function): Fix argument type to match
7868 2018-06-08 Martin Liska <mliska@suse.cz>
7870 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7871 Remove usage of MPX-related (and removed) fields.
7872 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7874 2018-06-08 David Malcolm <dmalcolm@redhat.com>
7876 * cfg.c (debug): Use TDF_NONE rather than 0.
7877 * cfghooks.c (debug): Likewise.
7878 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7879 (struct dump_option_value_info): Convert to...
7880 (struct kv_pair): ...this template type.
7881 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7883 (optinfo_verbosity_options): Likewise.
7884 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7886 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7887 than int for "optgroup_flags" param.
7888 (dump_generic_expr_loc): Use dump_flags_t rather than int for
7890 (dump_dec): Likewise.
7891 (dump_finish): Use TDF_NONE rather than 0.
7892 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7893 rather than int for "optgroup_flags" param. Use TDF_NONE rather
7894 than 0. Update for change to option_ptr.
7895 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7896 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
7897 0. Update for changes to optinfo_verbosity_options and
7899 (opt_info_switch_p): Convert optgroup_flags from int to
7901 (dump_basic_block): Use dump_flags_t rather than int
7902 for "dump_kind" param.
7903 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7904 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7905 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7906 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7907 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7908 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7909 TDF_NONE): Convert from macros to...
7910 (enum dump_flag): ...this new enum.
7911 (dump_flags_t): Update to use enum.
7912 (operator|, operator&, operator~, operator|=, operator&=):
7913 Implement for dump_flags_t.
7914 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7915 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7916 Convert from macros to...
7917 (enum optgroup_flag): ...this new enum.
7918 (optgroup_flags_t): New typedef.
7919 (operator|, operator|=): Implement for optgroup_flags_t.
7920 (struct dump_file_info): Convert field "alt_flags" to
7921 dump_flags_t. Convert field "optgroup_flags" to
7923 (dump_basic_block): Use dump_flags_t rather than int for param.
7924 (dump_generic_expr_loc): Likewise.
7925 (dump_dec): Likewise.
7926 (dump_register): Convert param "optgroup_flags" to
7928 (opt_info_enable_passes): Likewise.
7929 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7931 * gimple-pretty-print.c (debug): Likewise.
7932 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7933 (merged_store_group::apply_stores): Likewise.
7934 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7935 * gimple.c (verify_gimple_pp): Likewise.
7936 * graphite-poly.c (print_pbb_body): Likewise.
7937 * passes.c (pass_manager::register_one_dump_file): Convert
7938 local "optgroup_flags" to optgroup_flags_t.
7939 * print-tree.c (print_node): Use TDF_NONE rather than 0.
7941 (debug_body): Likewise.
7942 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7943 to optgroup_flags_t.
7944 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7946 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7947 (convert_mult_to_fma): Likewise.
7948 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7949 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7950 * tree-vect-data-refs.c (dump_lower_bound): Convert param
7951 "dump_kind" to dump_flags_t.
7953 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7955 * config/rs6000/rs6000.c (min, max): Delete.
7957 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7959 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7960 -mabi=spe and -mabi=no-spe.
7962 2018-06-08 Martin Liska <mliska@suse.cz>
7964 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7965 where we expect an existing summary.
7967 2018-06-08 Martin Liska <mliska@suse.cz>
7969 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7970 * ipa-inline.h (estimate_edge_growth): Likewise.
7972 2018-06-08 Martin Liska <mliska@suse.cz>
7974 * cgraph.c (function_version_hasher::hash): Use
7975 cgraph_node::get_uid ().
7976 (function_version_hasher::equal):
7977 * cgraph.h (cgraph_node::get_uid): New method.
7978 * ipa-inline.c (update_caller_keys): Use
7979 cgraph_node::get_uid ().
7980 (update_callee_keys): Likewise.
7981 * ipa-utils.c (searchc): Likewise.
7982 (ipa_reduced_postorder): Likewise.
7983 * lto-cgraph.c (input_node): Likewise.
7984 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7985 * symbol-summary.h (symtab_insertion): Likewise.
7986 (symtab_removal): Likewise.
7987 (symtab_duplication): Likewise.
7988 * tree-pretty-print.c (dump_function_header): Likewise.
7989 * tree-sra.c (convert_callers_for_node): Likewise.
7991 2018-06-08 Martin Liska <mliska@suse.cz>
7993 * cgraph.c (symbol_table::create_edge): Always assign a new
7995 (symbol_table::free_edge): Do not recycle numbers.
7996 * cgraph.h (cgraph_edge::get): New method.
7997 * symbol-summary.h (symtab_removal): Use it.
7998 (symtab_duplication): Likewise.
7999 (call_summary::hashable_uid): Remove.
8001 2018-06-08 Martin Liska <mliska@suse.cz>
8003 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
8004 (initialize_growth_caches): Remove.
8005 (free_growth_caches): Likewise.
8006 (do_estimate_edge_time): Use edge_growth_cache.
8007 (do_estimate_edge_size): Likewise.
8008 (do_estimate_edge_hints): Likewise.
8009 * ipa-inline.c (reset_edge_caches): Likewise.
8010 (recursive_inlining): Likewise.
8011 (inline_small_functions): Likewise.
8012 * ipa-inline.h (initialize_growth_caches): Remove.
8013 (estimate_edge_size): Likewise.
8014 (estimate_edge_time): Likewise.
8015 (estimate_edge_hints): Likewise.
8016 (reset_edge_growth_cache): Likewise.
8017 * symbol-summary.h (call_summary::remove): New method.
8019 2018-06-08 Martin Liska <mliska@suse.cz>
8021 * ipa-cp.c (class edge_clone_summary): New summary.
8022 (grow_edge_clone_vectors): Remove.
8023 (ipcp_edge_duplication_hook): Remove.
8024 (class edge_clone_summary_t): New call_summary class.
8025 (ipcp_edge_removal_hook): Remove.
8026 (edge_clone_summary_t::duplicate): New function.
8027 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
8028 (create_specialized_node): Likewise.
8029 (ipcp_driver): Initialize edge_clone_summaries and do not
8032 2018-06-08 Martin Liska <mliska@suse.cz>
8034 * symbol-summary.h (get): New function.
8035 (call_summary::m_initialize_when_cloning): New class member.
8037 2018-06-08 Martin Liska <mliska@suse.cz>
8039 * cgraph.c (cgraph_node::remove): Do not recycle uid.
8040 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
8041 (symbol_table::allocate_cgraph_symbol): Do not set uid.
8042 * passes.c (uid_hash_t): Record removed_nodes by their uids.
8043 (remove_cgraph_node_from_order): Use the removed_nodes set.
8044 (do_per_function_toporder): Likwise.
8045 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
8046 instead of summary_uid.
8047 (symtab_removal): Likewise.
8048 (symtab_duplication): Likewise.
8050 2018-06-08 Martin Liska <mliska@suse.cz>
8052 * ipa-cp.c (ipcp_store_bits_results): Use
8053 ipcp_transformation_sum.
8054 (ipcp_store_vr_results): Likewise.
8055 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
8057 (ipcp_transformation_initialize): ... this.
8058 (ipa_set_node_agg_value_chain):
8059 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
8060 (write_ipcp_transformation_info): Likewise.
8061 (read_ipcp_transformation_info): Likewise.
8062 (ipcp_update_bits): Likewise.
8063 (ipcp_update_vr): Likewise.
8064 (ipcp_transform_function): Likewise.
8065 * ipa-prop.h: Rename ipcp_transformation_summary to
8066 ipcp_transformation.
8067 (class ipcp_transformation_t): New function summary.
8068 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
8069 (ipa_get_agg_replacements_for_node): Likewise.
8071 2018-06-08 Martin Liska <mliska@suse.cz>
8073 * ipa-pure-const.c (struct funct_state_d): Do it class instead
8075 (class funct_state_summary_t): New function_summary class.
8076 (has_function_state): Remove.
8077 (get_function_state): Likewise.
8078 (set_function_state): Likewise.
8079 (add_new_function): Likewise.
8080 (funct_state_summary_t::insert): New function.
8081 (duplicate_node_data): Remove.
8082 (remove_node_data): Remove.
8083 (funct_state_summary_t::duplicate): New function.
8084 (register_hooks): Create new funct_state_summaries.
8085 (pure_const_generate_summary): Use it.
8086 (pure_const_write_summary): Likewise.
8087 (pure_const_read_summary): Likewise.
8088 (propagate_pure_const): Likewise.
8089 (propagate_nothrow): Likewise.
8090 (dump_malloc_lattice): Likewise.
8091 (propagate_malloc): Likewise.
8092 (execute): Do not register hooks, just remove summary
8094 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
8097 2018-06-08 Martin Liska <mliska@suse.cz>
8099 * ipa-reference.c (remove_node_data): Remove.
8100 (duplicate_node_data): Likewise.
8101 (class ipa_ref_var_info_summary_t): New class.
8102 (class ipa_ref_opt_summary_t): Likewise.
8103 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
8104 (get_reference_optimization_summary): Use
8105 ipa_ref_opt_sum_summaries.
8106 (set_reference_vars_info): Remove.
8107 (set_reference_optimization_summary): Likewise.
8108 (ipa_init): Create summaries.
8109 (init_function_info): Use function summary.
8110 (ipa_ref_opt_summary_t::duplicate): New function.
8111 (ipa_ref_opt_summary_t::remove): New function.
8112 (get_read_write_all_from_node): Fix GNU coding style.
8113 (propagate): Use function summary.
8114 (write_node_summary_p): Fix GNU coding style.
8115 (stream_out_bitmap): Likewise.
8116 (ipa_reference_read_optimization_summary): Use function summary.
8117 (ipa_reference_c_finalize): Do not release hooks.
8119 2018-06-08 Martin Liska <mliska@suse.cz>
8121 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
8122 (analyze_function_body): Extract multiple calls of get_create.
8123 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8124 * ipa-inline.c (recursive_inlining): Use ::get method.
8125 * ipa-inline.h (estimate_edge_growth): Likewise.
8127 2018-06-08 Martin Liska <mliska@suse.cz>
8129 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
8131 (hsa_function_summary::hsa_function_summary): Use the new enum
8133 (hsa_gpu_implementation_p): Use hsa_summaries::get.
8134 * hsa-gen.c (hsa_get_host_function): Likewise.
8135 (get_brig_function_name): Likewise.
8136 * ipa-hsa.c (process_hsa_functions): Likewise.
8137 (ipa_hsa_write_summary): Likewise.
8138 * symbol-summary.h (symtab_duplication): Use ::get function/
8139 (get): New function.
8141 2018-06-08 Martin Liska <mliska@suse.cz>
8143 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
8145 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
8146 (hsa_register_kernel): Likewise.
8147 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
8148 * hsa-gen.c (hsa_get_host_function): Likewise.
8149 (get_brig_function_name): Likewise.
8150 (generate_hsa): Likewise.
8151 (pass_gen_hsail::execute): Likewise.
8152 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
8153 (devirtualization_time_bonus): Likewise.
8154 (ipcp_propagate_stage): Likewise.
8155 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8156 (edge_set_predicate): Likewise.
8157 (evaluate_conditions_for_known_args): Likewise.
8158 (evaluate_properties_for_edge): Likewise.
8159 (ipa_fn_summary::reset): Likewise.
8160 (ipa_fn_summary_t::duplicate): Likewise.
8161 (dump_ipa_call_summary): Likewise.
8162 (ipa_dump_fn_summary): Likewise.
8163 (analyze_function_body): Likewise.
8164 (compute_fn_summary): Likewise.
8165 (estimate_edge_devirt_benefit): Likewise.
8166 (estimate_edge_size_and_time): Likewise.
8167 (estimate_calls_size_and_time): Likewise.
8168 (estimate_node_size_and_time): Likewise.
8169 (inline_update_callee_summaries): Likewise.
8170 (remap_edge_change_prob): Likewise.
8171 (remap_edge_summaries): Likewise.
8172 (ipa_merge_fn_summary_after_inlining): Likewise.
8173 (ipa_update_overall_fn_summary): Likewise.
8174 (read_ipa_call_summary): Likewise.
8175 (inline_read_section): Likewise.
8176 (write_ipa_call_summary): Likewise.
8177 (ipa_fn_summary_write): Likewise.
8178 (ipa_free_fn_summary): Likewise.
8179 * ipa-hsa.c (process_hsa_functions): Likewise.
8180 (ipa_hsa_write_summary): Likewise.
8181 (ipa_hsa_read_section): Likewise.
8182 * ipa-icf.c (sem_function::merge): Likewise.
8183 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8184 (do_estimate_edge_time): Likewise.
8185 (estimate_size_after_inlining): Likewise.
8186 (estimate_growth): Likewise.
8187 (growth_likely_positive): Likewise.
8188 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8189 (inline_call): Likewise.
8190 * ipa-inline.c (caller_growth_limits): Likewise.
8191 (can_inline_edge_p): Likewise.
8192 (can_inline_edge_by_limits_p): Likewise.
8193 (compute_uninlined_call_time): Likewise.
8194 (compute_inlined_call_time): Likewise.
8195 (want_inline_small_function_p): Likewise.
8196 (edge_badness): Likewise.
8197 (update_caller_keys): Likewise.
8198 (update_callee_keys): Likewise.
8199 (recursive_inlining): Likewise.
8200 (inline_small_functions): Likewise.
8201 (inline_to_all_callers_1): Likewise.
8202 (dump_overall_stats): Likewise.
8203 (early_inline_small_functions): Likewise.
8204 (early_inliner): Likewise.
8205 * ipa-inline.h (estimate_edge_growth): Likewise.
8206 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8207 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8208 * ipa-prop.h (IPA_NODE_REF): Likewise.
8209 (IPA_EDGE_REF): Likewise.
8210 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8211 (propagate_malloc): Likewise.
8212 * ipa-split.c (execute_split_functions): Likewise.
8213 * symbol-summary.h: Rename get to get_create.
8215 (get_create): Likewise.
8216 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8218 2018-06-08 Martin Liska <mliska@suse.cz>
8220 * symbol-summary.h (release): Move definition out of class
8222 (symtab_removal): Likewise.
8223 (symtab_duplication): Likewise.
8225 2018-06-08 Martin Liska <mliska@suse.cz>
8227 * symbol-summary.h (function_summary): Move constructor
8228 implementation out of class declaration.
8229 (release): Likewise.
8230 (symtab_insertion): Likewise.
8231 (symtab_removal): Likewise.
8232 (symtab_duplication): Likewise.
8235 2018-06-08 Martin Liska <mliska@suse.cz>
8237 * Makefile.in: Remove support for MPX (macros, related functions,
8238 fields in cgraph_node, ...).
8239 * builtin-types.def (BT_BND): Likewise.
8240 (BT_FN_BND_CONST_PTR): Likewise.
8241 (BT_FN_CONST_PTR_BND): Likewise.
8242 (BT_FN_VOID_PTR_BND): Likewise.
8243 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8244 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8245 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8246 (expand_builtin_mempcpy_with_bounds): Likewise.
8247 (expand_builtin_memset_with_bounds): Likewise.
8248 (expand_builtin_memset_args): Likewise.
8249 (std_expand_builtin_va_start): Likewise.
8250 (expand_builtin): Likewise.
8251 (expand_builtin_with_bounds): Likewise.
8252 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8253 (DEF_LIB_BUILTIN_CHKP): Likewise.
8254 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8255 (DEF_CHKP_BUILTIN): Likewise.
8256 (BUILT_IN_MEMCPY): Likewise.
8257 (BUILT_IN_MEMMOVE): Likewise.
8258 (BUILT_IN_MEMPCPY): Likewise.
8259 (BUILT_IN_MEMSET): Likewise.
8260 (BUILT_IN_STPCPY): Likewise.
8261 (BUILT_IN_STRCAT): Likewise.
8262 (BUILT_IN_STRCHR): Likewise.
8263 (BUILT_IN_STRCPY): Likewise.
8264 (BUILT_IN_STRLEN): Likewise.
8265 (BUILT_IN_MEMCPY_CHK): Likewise.
8266 (BUILT_IN_MEMMOVE_CHK): Likewise.
8267 (BUILT_IN_MEMPCPY_CHK): Likewise.
8268 (BUILT_IN_MEMSET_CHK): Likewise.
8269 (BUILT_IN_STPCPY_CHK): Likewise.
8270 (BUILT_IN_STRCAT_CHK): Likewise.
8271 (BUILT_IN_STRCPY_CHK): Likewise.
8272 * calls.c (store_bounds): Likewise.
8273 (emit_call_1): Likewise.
8274 (special_function_p): Likewise.
8275 (maybe_warn_nonstring_arg): Likewise.
8276 (initialize_argument_information): Likewise.
8277 (finalize_must_preallocate): Likewise.
8278 (compute_argument_addresses): Likewise.
8279 (expand_call): Likewise.
8280 * cfgexpand.c (expand_call_stmt): Likewise.
8281 (expand_return): Likewise.
8282 (expand_gimple_stmt_1): Likewise.
8283 (pass_expand::execute): Likewise.
8284 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8285 (cgraph_node::remove): Likewise.
8286 (cgraph_node::dump): Likewise.
8287 (cgraph_node::verify_node): Likewise.
8288 * cgraph.h (chkp_function_instrumented_p): Likewise.
8289 (symtab_node::get_alias_target): Likewise.
8290 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8291 (cgraph_local_p): Likewise.
8292 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8293 (cgraph_edge::rebuild_references): Likewise.
8294 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8295 (walk_polymorphic_call_targets): Likewise.
8296 (cgraph_node::expand_thunk): Likewise.
8297 (symbol_table::output_weakrefs): Likewise.
8298 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8299 (ix86_handle_option): Likewise.
8300 * config/i386/constraints.md: Likewise.
8301 * config/i386/i386-builtin-types.def (BND): Likewise.
8305 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8306 (BDESC_FIRST): Likewise.
8308 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8309 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8310 * config/i386/i386.c (enum reg_class): Likewise.
8311 (ix86_target_string): Likewise.
8312 (ix86_option_override_internal): Likewise.
8313 (ix86_conditional_register_usage): Likewise.
8314 (ix86_valid_target_attribute_inner_p): Likewise.
8315 (ix86_set_indirect_branch_type): Likewise.
8316 (ix86_set_current_function): Likewise.
8317 (ix86_function_arg_regno_p): Likewise.
8318 (init_cumulative_args): Likewise.
8319 (ix86_function_arg_advance): Likewise.
8320 (ix86_function_arg): Likewise.
8321 (ix86_pass_by_reference): Likewise.
8322 (ix86_function_value_regno_p): Likewise.
8323 (ix86_function_value_1): Likewise.
8324 (ix86_function_value_bounds): Likewise.
8325 (ix86_return_in_memory): Likewise.
8326 (ix86_setup_incoming_vararg_bounds): Likewise.
8327 (ix86_va_start): Likewise.
8328 (indirect_thunk_need_prefix): Likewise.
8329 (print_reg): Likewise.
8330 (ix86_print_operand): Likewise.
8331 (ix86_expand_call): Likewise.
8332 (ix86_output_function_return): Likewise.
8333 (reg_encoded_number): Likewise.
8334 (BDESC_VERIFYS): Likewise.
8335 (ix86_init_mpx_builtins): Likewise.
8336 (ix86_init_builtins): Likewise.
8337 (ix86_emit_cmove): Likewise.
8338 (ix86_emit_move_max): Likewise.
8339 (ix86_expand_builtin): Likewise.
8340 (ix86_builtin_mpx_function): Likewise.
8341 (ix86_get_arg_address_for_bt): Likewise.
8342 (ix86_load_bounds): Likewise.
8343 (ix86_store_bounds): Likewise.
8344 (ix86_load_returned_bounds): Likewise.
8345 (ix86_store_returned_bounds): Likewise.
8346 (ix86_class_likely_spilled_p): Likewise.
8347 (ix86_hard_regno_mode_ok): Likewise.
8348 (x86_order_regs_for_local_alloc): Likewise.
8349 (ix86_mitigate_rop): Likewise.
8350 (ix86_bnd_prefixed_insn_p): Likewise.
8351 (ix86_mpx_bound_mode): Likewise.
8352 (ix86_make_bounds_constant): Likewise.
8353 (ix86_initialize_bounds): Likewise.
8354 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8355 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8356 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8357 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8358 (TARGET_CHKP_BOUND_MODE): Likewise.
8359 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8360 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8361 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8362 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8363 * config/i386/i386.h (TARGET_MPX): Likewise.
8364 (TARGET_MPX_P): Likewise.
8365 (VALID_BND_REG_MODE): Likewise.
8366 (FIRST_BND_REG): Likewise.
8367 (LAST_BND_REG): Likewise.
8368 (enum reg_class): Likewise.
8369 (BND_REG_P): Likewise.
8370 (BND_REGNO_P): Likewise.
8371 (BNDmode): Likewise.
8372 (ADJUST_INSN_LENGTH): Likewise.
8373 * config/i386/i386.md: Likewise.
8374 * config/i386/i386.opt: Likewise.
8375 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8376 (defined): Likewise.
8377 (LINK_MPX): Likewise.
8378 (MPX_SPEC): Likewise.
8379 (LIBMPX_SPEC): Likewise.
8380 (LIBMPXWRAPPERS_SPEC): Likewise.
8381 (CHKP_SPEC): Likewise.
8382 * config/i386/predicates.md: Likewise.
8383 * dbxout.c (dbxout_type): Likewise.
8384 * doc/extend.texi: Likewise.
8385 * doc/invoke.texi: Likewise.
8386 * doc/md.texi: Likewise.
8387 * doc/tm.texi: Likewise.
8388 * doc/tm.texi.in: Likewise.
8389 * dwarf2out.c (is_base_type): Likewise.
8390 (gen_formal_types_die): Likewise.
8391 (gen_subprogram_die): Likewise.
8392 (gen_type_die_with_usage): Likewise.
8393 (gen_decl_die): Likewise.
8394 (dwarf2out_late_global_decl): Likewise.
8395 * expr.c (expand_assignment): Likewise.
8396 (emit_storent_insn): Likewise.
8397 (store_expr_with_bounds): Likewise.
8398 (store_expr): Likewise.
8399 (expand_expr_real_1): Likewise.
8400 * expr.h (store_expr_with_bounds): Likewise.
8401 * function.c (use_register_for_decl): Likewise.
8402 (struct bounds_parm_data): Likewise.
8403 (assign_parms_augmented_arg_list): Likewise.
8404 (assign_parm_find_entry_rtl): Likewise.
8405 (assign_parm_is_stack_parm): Likewise.
8406 (assign_parm_load_bounds): Likewise.
8407 (assign_bounds): Likewise.
8408 (assign_parms): Likewise.
8409 (expand_function_start): Likewise.
8410 * gcc.c (CHKP_SPEC): Likewise.
8411 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8412 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8413 (wrestrict_dom_walker::check_call): Likewise.
8414 * gimple.c (gimple_build_call_from_tree): Likewise.
8415 * gimple.h (enum gf_mask): Likewise.
8416 (gimple_call_with_bounds_p): Likewise.
8417 (gimple_call_set_with_bounds): Likewise.
8418 * gimplify.c (gimplify_init_constructor): Likewise.
8419 * ipa-cp.c (initialize_node_lattices): Likewise.
8420 (propagate_constants_across_call): Likewise.
8421 (find_more_scalar_values_for_callers_subset): Likewise.
8422 * ipa-hsa.c (process_hsa_functions): Likewise.
8423 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8424 * ipa-icf.c (sem_function::merge): Likewise.
8425 * ipa-inline.c (early_inliner): Likewise.
8426 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8427 (warn_function_cold): Likewise.
8428 (propagate_pure_const): Likewise.
8429 * ipa-ref.h (enum GTY): Likewise.
8430 * ipa-split.c (find_retbnd): Likewise.
8431 (consider_split): Likewise.
8432 (split_function): Likewise.
8433 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8434 * ipa.c (walk_polymorphic_call_targets): Likewise.
8435 (symbol_table::remove_unreachable_nodes): Likewise.
8436 (process_references): Likewise.
8437 (cgraph_build_static_cdtor_1): Likewise.
8438 * lto-cgraph.c (lto_output_node): Likewise.
8439 (output_refs): Likewise.
8440 (compute_ltrans_boundary): Likewise.
8441 (input_overwrite_node): Likewise.
8442 (input_node): Likewise.
8443 (input_cgraph_1): Likewise.
8444 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8445 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8446 (class pass_chkp_instrumentation_passes): Likewise.
8447 (make_pass_chkp_instrumentation_passes): Likewise.
8448 * passes.def: Likewise.
8449 * rtl.h (struct GTY): Likewise.
8450 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8451 * stor-layout.c (layout_type): Likewise.
8452 * symtab.c: Likewise.
8453 * target.def: Likewise.
8454 * targhooks.c (default_chkp_bound_type): Likewise.
8455 (default_chkp_bound_mode): Likewise.
8456 (default_builtin_chkp_function): Likewise.
8457 (default_chkp_function_value_bounds): Likewise.
8458 (default_chkp_make_bounds_constant): Likewise.
8459 (default_chkp_initialize_bounds): Likewise.
8460 * targhooks.h (default_chkp_bound_type): Likewise.
8461 (default_chkp_bound_mode): Likewise.
8462 (default_builtin_chkp_function): Likewise.
8463 (default_chkp_function_value_bounds): Likewise.
8464 (default_chkp_make_bounds_constant): Likewise.
8465 (default_chkp_initialize_bounds): Likewise.
8466 * toplev.c (compile_file): Likewise.
8467 (process_options): Likewise.
8468 * tree-core.h (DEF_BUILTIN): Likewise.
8469 (DEF_BUILTIN_CHKP): Likewise.
8470 * tree-inline.c (declare_return_variable): Likewise.
8471 (remap_gimple_stmt): Likewise.
8472 (copy_bb): Likewise.
8473 (initialize_inlined_parameters): Likewise.
8474 (expand_call_inline): Likewise.
8475 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8476 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8477 (make_pass_ipa_chkp_produce_thunks): Likewise.
8478 (make_pass_chkp): Likewise.
8479 (make_pass_chkp_opt): Likewise.
8480 (make_pass_chkp_instrumentation_passes): Likewise.
8481 * tree-pretty-print.c (dump_generic_node): Likewise.
8482 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8483 * tree-ssa-dce.c (propagate_necessity): Likewise.
8484 (eliminate_unnecessary_stmts): Likewise.
8485 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8486 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8487 * tree-ssa-sccvn.h: Likewise.
8488 * tree-ssa-strlen.c (get_string_length): Likewise.
8489 (valid_builtin_call): Likewise.
8490 (adjust_last_stmt): Likewise.
8491 (handle_builtin_strchr): Likewise.
8492 (handle_builtin_strcpy): Likewise.
8493 (handle_builtin_stxncpy): Likewise.
8494 (handle_builtin_memcpy): Likewise.
8495 (handle_builtin_strcat): Likewise.
8496 (strlen_check_and_optimize_stmt): Likewise.
8497 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8498 * tree-streamer-in.c: Likewise.
8499 * tree-streamer.c (record_common_node): Likewise.
8500 * tree.c (tree_code_size): Likewise.
8501 (wide_int_to_tree_1): Likewise.
8502 (type_contains_placeholder_1): Likewise.
8503 (build_common_tree_nodes): Likewise.
8504 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8505 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8506 (POINTER_BOUNDS_P): Likewise.
8507 (BOUNDED_TYPE_P): Likewise.
8508 (BOUNDED_P): Likewise.
8509 (CALL_WITH_BOUNDS_P): Likewise.
8510 (pointer_bounds_type_node): Likewise.
8511 * value-prof.c (gimple_ic): Likewise.
8512 * var-tracking.c (vt_add_function_parameters): Likewise.
8513 * varasm.c (make_decl_rtl): Likewise.
8514 (assemble_start_function): Likewise.
8515 (output_constant): Likewise.
8516 (maybe_assemble_visibility): Likewise.
8517 * varpool.c (ctor_for_folding): Likewise.
8518 * chkp-builtins.def: Remove.
8519 * ipa-chkp.c: Remove.
8520 * ipa-chkp.h: Remove.
8521 * rtl-chkp.c: Remove.
8522 * rtl-chkp.h: Remove.
8523 * tree-chkp-opt.c: Remove.
8524 * tree-chkp.c: Remove.
8525 * tree-chkp.h: Remove.
8527 2018-06-07 Carl Love <cel@us.ibm.com>
8529 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8530 vextract_fp_from_shortl): Add BE support.
8532 2018-06-07 Paul Koning <ni1d@arrl.net>
8534 * compare-elim.c (try_merge_compare): Don't merge compare if
8535 address contains a side effect.
8536 (try_eliminate_compare): Likewise.
8538 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8540 * config.gcc: Support "tremont".
8541 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8542 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8544 * config/i386/i386.c (m_TREMONT): Define.
8545 (processor_target_table): Add "tremont".
8546 (PTA_TREMONT): Define.
8547 (ix86_lea_outperforms): Add TARGET_TREMONT.
8548 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8549 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8550 and M_INTEL_GOLDMONT_PLUS.
8551 (fold_builtin_cpu): Add "tremont".
8552 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8553 (ix86_option_override_internal): Add "tremont".
8554 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8555 (processor_type): Add PROCESSOR_TREMONT.
8556 * config/i386/x86-tune.def: Add m_TREMONT.
8557 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8559 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8561 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8562 symbol defined for msp430i* devices to be lower case.
8564 2018-06-07 Richard Biener <rguenther@suse.de>
8566 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8567 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8568 Properly wrap signed arithmetic if overflow wraps.
8570 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8572 PR tree-optimization/69615
8573 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8574 of a cast from a same precision integral SSA_NAME in a bb dominated
8575 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8576 cast to utype if rhs2 has already a compatible type.
8578 2018-06-07 Richard Biener <rguenther@suse.de>
8580 PR tree-optimization/85935
8581 * graphite-scop-detection.c (find_params_in_bb): Analyze
8582 condition operands with respect to the correct loop. Assert
8583 the analysis doesn't fail.
8585 2018-06-04 Carl Love <cel@us.ibm.com>
8587 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8588 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8589 as it is slightly cheaper.
8590 (first_match_or_eos_index_<mode>):
8591 Calculate index using natural element order.
8592 (first_match_index_<mode>):
8593 Calculate index using natural element order.
8594 (first_match_or_eos_index_<mode>):
8595 Calculate index using natural order.
8596 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8597 for BE and LE modes.
8598 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8599 P9V_BUILTIN_VCLZLSBB_V16QI.
8600 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8603 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8605 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8606 indentation and line wrap for many prototypes. Add missing
8607 @smallexample directives around block of prototypes for vec_xl and
8610 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8612 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8613 track if we pass or return IEEE 128-bit floating point.
8614 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8615 C++ mangling that is compatible with GCC 8.1.
8616 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8617 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8618 floating point types.
8619 (rs6000_function_arg_advance_1): Likewise.
8620 (rs6000_mangle_type): Optionally generate mangled names that match
8621 what GCC 8.1 generated for IEEE 128-bit floating point types.
8622 (rs6000_globalize_decl_name): If we have an external function that
8623 passes or returns IEEE 128-bit types, generate a weak reference
8624 from the mangled name used in GCC 8.1 to the current mangled
8626 (rs6000_init_builtins): Make __ibm128 use the long double type if
8627 long double is IBM extended double. Make __float128 use the long
8628 double type if long double is IEEE 128-bit.
8631 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8632 macro for __ibm128 built-in functions.
8633 (PACK_IF): Add __ibm128 pack/unpack functions.
8634 (UNPACK_IF): Likewise.
8635 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8636 enable long double built-in functions if long double is IEEE
8637 128-bit floating point.
8638 (rs6000_invalid_builtin): Update long double built-in function
8640 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8641 functions, adjust the built-in function to use the long double
8642 built-in function if __ibm128 and long double are the same type.
8643 * doc/extend.texi (PowerPC builtins): Update documention for
8644 __builtin_{,un}pack_longdouble. Add documentation for
8645 __builtin_{,un}pack_ibm128.
8647 2018-06-06 Jim Wilson <jimw@sifive.com>
8649 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8650 (struct machine_function): New field interrupt_mode.
8651 (riscv_handle_type_attribute): New function. Add forward declaration.
8652 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8653 (riscv_expand_epilogue): Check interrupt_mode field.
8654 (riscv_set_current_function): Check interrupt attribute args and
8655 set interrupt_mode field.
8656 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8657 (riscv_sret, riscv_uret): New.
8658 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8659 new arguments to interrupt attribute.
8661 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8664 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8665 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8667 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8669 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8670 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8671 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8672 several redundant entries.
8674 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8676 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8677 type from "rtx" to "rtx_insn *".
8678 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8679 for local "call_insn", removing cast.
8680 (ix86_expand_call): Likewise, introducing a "call_insn" local.
8682 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
8684 PR tree-optimization/86066
8685 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8686 for BIT_INSERT_EXPR stores.
8688 2018-06-06 Richard Biener <rguenther@suse.de>
8690 PR tree-optimization/86062
8691 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8692 component refs ontop
8693 of to be offsetted base.
8695 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8697 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8698 to be static and remove check on interrupt attribute name.
8700 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
8702 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8703 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8705 2018-06-05 Steve Ellcey <sellcey@cavium.com>
8708 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8710 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8711 Remove second argument, change how error is called.
8712 (aarch64_layout_arg): Remove second argument from
8713 aarch64_err_no_fpadvsimd call.
8714 (aarch64_init_cumulative_args): Ditto.
8715 (aarch64_gimplify_va_arg_expr): Ditto.
8716 * config/aarch64/aarch64.md (mov<mode>): Ditto.
8718 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
8720 * config/i386/i386.md (simple_return_indirect_internal): New expander.
8721 (*simple_return_indirect_internal<mode>): Rename from
8722 simple_return_indirect_internal. Use W mode iterator.
8723 (rstorssp): New expander.
8724 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
8725 (clrssbsy): New expander.
8726 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
8728 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
8730 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8732 (cmse_check_pointed_object): Likewise.
8734 2018-06-05 Martin Liska <mliska@suse.cz>
8736 PR gcov-profile/47618
8737 * doc/invoke.texi: Document how -fprofile-dir format
8740 2018-06-05 Richard Biener <rguenther@suse.de>
8742 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8743 removal pretend DOM info isn't available so we do not update
8744 it and only remove edges, not dominated blocks. Actually free
8745 DOM info in case we removed something. Remove unreachable blocks.
8746 (mfb_keep_latches): Work with either DOM info or marked backedges.
8747 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8748 first. Mark backedges if DOM info isn't available.
8749 (Re-)compute DOM info after cleanup_control_flow_pre.
8751 2018-06-05 Richard Biener <rguenther@suse.de>
8753 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8754 (locus_discrim_hasher::hash): Adjust.
8755 (locus_discrim_hasher::equal): Likewise.
8756 (next_discriminator_for_locus): Work on line directly.
8757 (same_line_p): Pass in expanded locus1 as well.
8758 (assign_discriminators): Avoid redundant location expansions.
8760 2018-06-05 Richard Biener <rguenther@suse.de>
8762 PR tree-optimization/86046
8763 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8764 if required after clearing TREE_ADDRESSABLE.
8766 2018-06-05 Richard Biener <rguenther@suse.de>
8768 PR tree-optimization/86047
8769 * tree-ssa-loop.c (for_each_index): Glob handling of all
8770 decls and constants and really handle all of them.
8772 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8775 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8776 qualifier_void_pointer and qualifier_const_void_pointer.
8777 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8778 (arm_init_builtins): Handle the above.
8779 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8780 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8781 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8784 2018-06-05 Martin Liska <mliska@suse.cz>
8786 * auto-profile.c (read_autofdo_file): Do not use
8787 gcov_ctr_summary struct.
8788 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8789 * coverage.c (struct counts_entry): Likewise.
8790 (read_counts_file): Read just single summary entry.
8791 (get_coverage_counts): Use gcov_summary struct.
8792 * coverage.h (get_coverage_counts): Likewise.
8793 * gcov-dump.c (dump_working_sets): Likewise.
8794 (tag_summary): Dump just single summary.
8795 * gcov-io.c (gcov_write_summary): Write just histogram
8797 (gcov_read_summary): Read just single summary.
8798 (compute_working_sets): Use gcov_summary struct.
8799 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8800 of GCOV_COUNTERS_SUMMABLE.
8801 (GCOV_COUNTERS_SUMMABLE): Remove.
8802 (GCOV_FIRST_VALUE_COUNTER): Replace with
8803 GCOV_COUNTER_V_INTERVAL.
8804 (struct gcov_ctr_summary): Remove.
8805 (struct gcov_summary): Directly use fields of former
8807 (compute_working_sets): Use gcov_summary struct.
8808 * gcov.c (read_count_file): Do not use ctrs fields.
8809 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8811 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8813 * profile.c: Likewise.
8814 * profile.h: Likewise.
8816 2018-06-05 Martin Liska <mliska@suse.cz>
8818 PR gcov-profile/84846
8819 * gcov.c (output_lines): Print working directory only
8820 in intermediate format.
8822 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8824 * config/s390/s390-builtin-types.def: Add void function type.
8825 * config/s390/s390-builtins.def: Use the function type for the
8828 2018-06-04 Jim Wilson <jimw@sifive.com>
8830 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8832 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8833 and maybe_eh_return. Change regno to unsigned int. Use new args to
8834 handle EH_RETURN_DATA_REGNO registers properly.
8835 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8836 (riscv_expand_epilogue): Update comment. Change argument name and
8837 type. Update code to use new name and type. Pass new args to
8838 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8840 * config/riscv/riscv.md (NORMAL_RETURN): New.
8841 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8842 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8843 (eh_return): Call gen_eh_return_internal and emit barrier.
8844 (eh_return_internal): Call riscv_expand_epilogue.
8846 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8848 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8849 bit_insertion field and declare can_be_merged_into method.
8850 (merged_store_group::can_be_merged_into): New method.
8851 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8852 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
8853 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8855 2018-06-04 Richard Biener <rguenther@suse.de>
8857 PR tree-optimization/85955
8858 * builtins.c (fold_builtin_sincos): Convert pointers to
8859 destination to appropriate type before dereferencing.
8861 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
8863 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8865 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
8867 * expr.c (expand_expr_real_1): Force the operand into memory if
8868 its TYPE_MODE is BLKmode and if there is no integer mode for
8869 the number of bits being extracted.
8871 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8875 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8876 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8878 2018-06-04 Richard Biener <rguenther@suse.de>
8880 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8881 (cleanup_tree_cfg_noloop): ... single caller. Do
8882 start_recording_case_labels later.
8884 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
8886 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8887 to _IMMINTRIN_H_INCLUDED.
8888 * config/i386/pconfigintrin.h: Ditto.
8889 * config/i386/waitpkgintrin.h: Ditto.
8890 * config/i386/immintrin.h: Add includes for sgxintrin.h,
8891 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8892 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8893 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8894 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8895 waitpkgintrin.h and cldemoteintrin.h.
8897 2018-06-04 Richard Biener <rguenther@suse.de>
8899 PR tree-optimization/86038
8900 * tracer.c (find_best_successor): Check probability for
8901 being initialized, bail out if not.
8903 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
8906 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8907 of bits to ignore when comparing architectures.
8909 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8911 PR tree-optimization/69615
8912 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8913 maximum or minimum of the type, try to merge it also as if
8914 range1 is + [-, x - 1] or + [x + 1, -].
8917 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8919 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
8921 PR tree-optimization/86034
8922 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8923 the unsigned bitfield type in a bit insertion sequence if it does not
8924 have a larger precision than the bitfield size.
8925 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8927 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
8929 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8931 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8933 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8934 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8935 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8936 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8938 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8940 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8941 Disable -fdelete-null-pointer-checks for ELF toolchain.
8943 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8944 Kito Cheng <kito.cheng@gmail.com>
8946 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8947 (nds32le-*-*, nds32be-*-*): Integrate checking process.
8948 (nds32*-*-*): Add glibc and uclibc conditions.
8949 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8950 (TARGET_EXCEPT_UNWIND_INFO): Define.
8951 * config/nds32/elf.h: New file.
8952 * config/nds32/linux.h: New file.
8953 * config/nds32/nds32-elf.opt: New file.
8954 * config/nds32/nds32-linux.opt: New file.
8955 * config/nds32/nds32-fp-as-gp.c
8956 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8957 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8959 (nds32_asm_file_end): Ditto.
8960 (nds32_print_operand): Ditto.
8961 (nds32_insert_attributes): Ditto.
8962 (nds32_init_libfuncs): New function.
8963 (TARGET_HAVE_TLS): Define.
8964 (TARGET_INIT_LIBFUNCS): Define.
8965 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8967 (TARGET_ELF): Apply different mcmodel setting.
8968 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8969 been migrated into elf.h and linux.h files.
8970 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8971 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8972 (mcmodel): The content has been migrated into nds32-elf.opt and
8973 nds32-linux.opt files.
8974 * config/nds32/t-elf: New file.
8975 * config/nds32/t-linux: New file.
8977 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8978 Shiva Chen <shiva0217@gmail.com>
8980 * config/nds32/constants.md (unspec_volatile_element): Add
8981 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8982 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8984 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8985 (make_pass_nds32_fp_as_gp): Declare.
8986 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8988 (nds32_asm_function_end_prologue): Remove unused asm output.
8989 (nds32_asm_function_begin_epilogue): Remove unused asm output.
8990 (nds32_asm_file_start): Output necessary fp_as_gp information.
8991 (nds32_option_override): Adjust register usage.
8992 (nds32_expand_prologue): Consider fp_as_gp situation.
8993 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8994 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8997 (simple_return): Ditto.
8998 (omit_fp_begin): Output special directive for fp_as_gp.
8999 (omit_fp_end): Output special directive for fp_as_gp.
9000 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
9001 mforbid-fp-as-gp): New options.
9003 2018-06-01 Mark Wielaard <mark@klomp.org>
9005 * dwarf2out.c (dwarf2out_finish): Remove generation of
9006 DW_AT_loclists_base.
9008 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
9010 * gimple-ssa-store-merging.c: Include gimple-fold.h.
9011 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
9012 (struct merged_store_group): Add bit_insertion field.
9013 (dump_char_array): Use standard hexadecimal format.
9014 (merged_store_group::merged_store_group): Set bit_insertion to false.
9015 (merged_store_group::apply_stores): Use optimal buffer size. Deal
9016 with BIT_INSERT_EXPR stores. Move up code updating the mask and
9017 also print the mask in the dump file.
9018 (pass_store_merging::gate): Minor tweak.
9019 (imm_store_chain_info::coalesce_immediate): Fix wrong association
9020 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
9021 stores with INTEGER_CST stores.
9022 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
9023 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
9024 and use it throughout. Generate bit insertion sequences if need be.
9025 (pass_store_merging::process_store): Remove redundant condition.
9026 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
9028 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
9030 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
9031 the 128-bit floating point types. Fix function comment.
9033 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9035 * config/aarch64/aarch64-simd.md
9036 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
9038 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
9041 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9043 PR tree-optimization/85989
9044 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
9046 (backprop::intersect_uses): Check it when deciding whether this
9047 is a backedge reference.
9048 (backprop::process_block): Add each phi to m_visited_phis
9049 after visiting it, then clear it at the end.
9051 2018-06-01 Richard Biener <rguenther@suse.de>
9053 * tree-vectorizer.h (vect_dr_stmt): New function.
9054 (vect_get_load_cost): Adjust.
9055 (vect_get_store_cost): Likewise.
9056 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
9057 Use vect_dr_stmt instead of DR_SMTT.
9058 (vect_record_base_alignments): Likewise.
9059 (vect_calculate_target_alignment): Likewise.
9060 (vect_compute_data_ref_alignment): Likewise and make static.
9061 (vect_update_misalignment_for_peel): Likewise.
9062 (vect_verify_datarefs_alignment): Likewise.
9063 (vector_alignment_reachable_p): Likewise.
9064 (vect_get_data_access_cost): Likewise. Pass down
9065 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
9066 (vect_get_peeling_costs_all_drs): Likewise.
9067 (vect_peeling_hash_get_lowest_cost): Likewise.
9068 (vect_enhance_data_refs_alignment): Likewise.
9069 (vect_find_same_alignment_drs): Likewise.
9070 (vect_analyze_data_refs_alignment): Likewise.
9071 (vect_analyze_group_access_1): Likewise.
9072 (vect_analyze_group_access): Likewise.
9073 (vect_analyze_data_ref_access): Likewise.
9074 (vect_analyze_data_ref_accesses): Likewise.
9075 (vect_vfa_segment_size): Likewise.
9076 (vect_small_gap_p): Likewise.
9077 (vectorizable_with_step_bound_p): Likewise.
9078 (vect_prune_runtime_alias_test_list): Likewise.
9079 (vect_analyze_data_refs): Likewise.
9080 (vect_supportable_dr_alignment): Likewise.
9081 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9082 (vect_gen_prolog_loop_niters): Likewise.
9083 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9084 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
9086 (vect_recog_mask_conversion_pattern): Likewise.
9087 (vect_try_gather_scatter_pattern): Likewise.
9088 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
9089 to vect_get_store_cost.
9090 (vect_get_store_cost): Get stmt_info instead of DR.
9091 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
9092 (vect_get_load_cost): Get stmt_info instead of DR.
9094 2018-06-01 Richard Biener <rguenther@suse.de>
9097 * gimple-fold.c (var_decl_component_p): Also allow offsetted
9098 vars wrapped in MEM_REFs.
9100 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
9102 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9103 Fix subreg tests so that we only return a choice between
9104 GENERAL_REGS and FP_REGS if the original classes included both.
9106 2018-06-01 Richard Biener <rguenther@suse.de>
9109 * tree-ssa-structalias.c (get_function_part_constraint):
9110 Handle NULL fi->decl.
9111 (find_func_aliases_for_call): Properly handle indirect
9112 fi from direct call.
9113 (find_func_clobbers): Likewise.
9114 (ipa_pta_execute): Likewise.
9115 (create_variable_info_for): For functions that are ifunc_resolver
9116 resolve to a varinfo that contains the result of the resolver call.
9117 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
9120 2018-05-31 Michael Collison <michael.collison@arm.com>
9122 * config/aarch64/aarch64.md:
9123 (*fix_to_zero_extenddfdi2): New pattern.
9124 * gcc.target/aarch64/fix_extend1.c: New testcase.
9126 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
9130 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
9131 and BUILT_IN_STRNCMP_EQ.
9132 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
9133 BUILT_IN_STRNCMP_EQ.
9134 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
9135 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9136 (gimple_fold_builtin): Likewise.
9137 * tree-ssa-strlen.c (compute_string_length): New function.
9138 (determine_min_obsize): New function.
9139 (handle_builtin_string_cmp): New function to handle calls to
9140 string compare functions.
9141 (strlen_optimize_stmt): Add handling to builtin string compare
9143 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
9144 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
9145 * tree.c (build_common_builtin_nodes): Add new defines of
9146 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
9148 2018-05-31 Jakub Jelinek <jakub@redhat.com>
9151 * bb-reorder.c (pass_partition_blocks::gate): Return false for
9152 functions with naked attribute.
9154 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9156 * config/i386/sse.md (avx_vec_concat<mode>):
9157 Substitute concat_tg_mode mode attribute with xtg_mode.
9158 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
9159 (concat_tg_mode): Remove mode attribute.
9161 2018-05-31 Martin Sebor <msebor@redhat.com>
9164 * calls.c (alloc_max_size): Correct a logic error/typo.
9165 Treat excessive arguments as infinite. Warn for invalid arguments.
9166 * doc/invoke.texi (-Walloc-size-larger-than): Update.
9168 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9171 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9172 and movx for Haswell.
9174 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9175 Cesar Philippidis <cesar@codesourcery.com>
9178 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9179 when emitting error on private/firstprivate reductions.
9180 * omp-low.c (lower_omp_target): Avoid reference-type processing
9181 on pointers for firstprivate clause.
9183 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9185 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9188 * config/aarch64/aarch64-simd.md
9189 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9190 (aarch64_ld1_x3_<mode>): Likewise
9191 (aarch64_st1x2<VALLDIF:mode>): Likewise
9192 (aarch64_st1_x2_<mode>): Likewise
9193 (aarch64_st1x3<VALLDIF:mode>): Likewise
9194 (aarch64_st1_x3_<mode>): Likewise
9195 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9196 (vld1_s8_x3): Likewise.
9197 (vld1_u16_x3): Likewise.
9198 (vld1_s16_x3): Likewise.
9199 (vld1_u32_x3): Likewise.
9200 (vld1_s32_x3): Likewise.
9201 (vld1_u64_x3): Likewise.
9202 (vld1_s64_x3): Likewise.
9203 (vld1_f16_x3): Likewise.
9204 (vld1_f32_x3): Likewise.
9205 (vld1_f64_x3): Likewise.
9206 (vld1_p8_x3): Likewise.
9207 (vld1_p16_x3): Likewise.
9208 (vld1_p64_x3): Likewise.
9209 (vld1q_u8_x3): Likewise.
9210 (vld1q_s8_x3): Likewise.
9211 (vld1q_u16_x3): Likewise.
9212 (vld1q_s16_x3): Likewise.
9213 (vld1q_u32_x3): Likewise.
9214 (vld1q_s32_x3): Likewise.
9215 (vld1q_u64_x3): Likewise.
9216 (vld1q_s64_x3): Likewise.
9217 (vld1q_f16_x3): Likewise.
9218 (vld1q_f32_x3): Likewise.
9219 (vld1q_f64_x3): Likewise.
9220 (vld1q_p8_x3): Likewise.
9221 (vld1q_p16_x3): Likewise.
9222 (vld1q_p64_x3): Likewise.
9223 (vst1_s64_x2): Likewise.
9224 (vst1_u64_x2): Likewise.
9225 (vst1_f64_x2): Likewise.
9226 (vst1_s8_x2): Likewise.
9227 (vst1_p8_x2): Likewise.
9228 (vst1_s16_x2): Likewise.
9229 (vst1_p16_x2): Likewise.
9230 (vst1_s32_x2): Likewise.
9231 (vst1_u8_x2): Likewise.
9232 (vst1_u16_x2): Likewise.
9233 (vst1_u32_x2): Likewise.
9234 (vst1_f16_x2): Likewise.
9235 (vst1_f32_x2): Likewise.
9236 (vst1_p64_x2): Likewise.
9237 (vst1q_s8_x2): Likewise.
9238 (vst1q_p8_x2): Likewise.
9239 (vst1q_s16_x2): Likewise.
9240 (vst1q_p16_x2): Likewise.
9241 (vst1q_s32_x2): Likewise.
9242 (vst1q_s64_x2): Likewise.
9243 (vst1q_u8_x2): Likewise.
9244 (vst1q_u16_x2): Likewise.
9245 (vst1q_u32_x2): Likewise.
9246 (vst1q_u64_x2): Likewise.
9247 (vst1q_f16_x2): Likewise.
9248 (vst1q_f32_x2): Likewise.
9249 (vst1q_f64_x2): Likewise.
9250 (vst1q_p64_x2): Likewise.
9251 (vst1_s64_x3): Likewise.
9252 (vst1_u64_x3): Likewise.
9253 (vst1_f64_x3): Likewise.
9254 (vst1_s8_x3): Likewise.
9255 (vst1_p8_x3): Likewise.
9256 (vst1_s16_x3): Likewise.
9257 (vst1_p16_x3): Likewise.
9258 (vst1_s32_x3): Likewise.
9259 (vst1_u8_x3): Likewise.
9260 (vst1_u16_x3): Likewise.
9261 (vst1_u32_x3): Likewise.
9262 (vst1_f16_x3): Likewise.
9263 (vst1_f32_x3): Likewise.
9264 (vst1_p64_x3): Likewise.
9265 (vst1q_s8_x3): Likewise.
9266 (vst1q_p8_x3): Likewise.
9267 (vst1q_s16_x3): Likewise.
9268 (vst1q_p16_x3): Likewise.
9269 (vst1q_s32_x3): Likewise.
9270 (vst1q_s64_x3): Likewise.
9271 (vst1q_u8_x3): Likewise.
9272 (vst1q_u16_x3): Likewise.
9273 (vst1q_u32_x3): Likewise.
9274 (vst1q_u64_x3): Likewise.
9275 (vst1q_f16_x3): Likewise.
9276 (vst1q_f32_x3): Likewise.
9277 (vst1q_f64_x3): Likewise.
9278 (vst1q_p64_x3): Likewise.
9280 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9282 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9283 user_label_prefix to name.
9285 * tree-core.h: Update comment about the format of NAME string
9286 passed to handler in attribute_spec.
9288 * config/msp430/msp430.md: Remove erroneous subreg expression from
9289 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9290 zero_extend{q,h}isi2.
9292 2018-05-30 Borislav Petkov <bp@suse.de>
9294 * doc/extend.texi: Document some architecture specific
9295 constraints and sort entries.
9297 2018-05-30 Martin Sebor <msebor@redhat.com>
9300 * builtins.c (expand_builtin_stpcpy_1): New function.
9301 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9302 only if the former succeeds.
9304 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9306 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9309 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9311 * doc/invoke.texi (-flinker-output): Document
9313 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9315 * passes.c (ipa_write_summaries): Only modify statements if body
9317 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9318 incrementally linking.
9319 (ipa_passes): Likewise.
9320 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9321 pass down resolution info.
9322 * common.opt (flag_incremental_link): Update info.
9323 * gcc.c (plugin specs): Turn flinker-output=* to
9324 -plugin-opt=-linker-output-known
9325 * toplev.c (compile_file): Also cut compilation when doing incremental
9327 * flag-types. (enum lto_partition_model): Add
9328 LTO_LINKER_OUTPUT_NOLTOREL.
9329 (invoke.texi): Add -flinker-output docs.
9330 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9331 link same way as WPA; do not stream in dead initializers.
9333 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9334 darf2out_register_external_decl): Support incremental link.
9336 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9338 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9340 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9342 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9343 it down to simple_object_copy_lto_debug_sections.
9344 (run_gcc): Determine incremental LTO link time and configure
9345 lto1 into non-wpa mode, disable renaming of debug sections.
9347 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9349 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9350 descriptions of various incorrectly documented functions.
9352 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9355 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9356 address check not strict.
9358 2018-05-30 Richard Biener <rguenther@suse.de>
9360 PR tree-optimization/85964
9361 * tracer.c (better_p): Drop initialized count check, we only
9362 call the function with initialized counts now.
9363 (find_best_successor): Do find a best edge if one
9364 has uninitialized count.
9365 (find_best_predecessor): Likewise. Do BB frequency check only
9366 if count is initialized.
9368 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9370 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9371 (aarch64_ldrstr_offset_compare): New.
9372 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9373 load/store orderings.
9374 (aarch64_gen_adjusted_ldpstp): Likewise.
9376 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9378 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9379 Check for subset of GENERAL_REGS and FP_REGS.
9380 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9383 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9385 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9386 and wi::to_poly_offset. Add the current offset and then check
9387 whether the sum fits, rather than using an unchecked addition of
9388 a checked term. Check for a shwi rather than a uhwi.
9389 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9390 (store_constructor): Use poly_int_tree_p.
9391 (expand_expr_real_1): Likewise.
9392 * function.c (assign_temp): Likewise.
9393 * fold-const.c (const_binop): Use poly_int_tree_p and
9395 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9397 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9398 to_poly_offset for MEM offsets.
9399 * ipa-icf.c (sem_variable::equals): Likewise.
9400 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9401 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9402 wi::to_poly_offset for BIT_FIELD_REF offsets.
9403 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9405 * var-tracking.c (emit_note_insn_var_location): Use
9406 tree_to_poly_uint64.
9408 2018-05-29 Jim Wilson <jimw@sifive.com>
9410 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9412 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9415 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9416 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9418 (sse4_1_round<mode>2): Use nonimmediate_operand
9419 for operand 1 predicate.
9421 2018-05-29 Martin Sebor <msebor@redhat.com>
9422 Richard Biener <rguenther@suse.de>
9425 * calls.c (get_size_range): Call determine_value_range instead
9426 of get_value_range..
9427 * tree-vrp.h (determine_value_range): Declared new function.
9428 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9430 2018-05-29 Richard Biener <rguenther@suse.de>
9432 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9433 sure to use non-pattern stmts for get_earlier_stmt arguments.
9434 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9435 called on pattern stmts.
9436 (get_later_stmt): Likewise.
9438 2018-05-29 Martin Liska <mliska@suse.cz>
9440 PR gcov-profile/85759
9441 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9444 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9446 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9448 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9452 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9453 VEC_PACK_FLOAT_EXPR): New tree codes.
9454 * tree-pretty-print.c (op_code_prio): Handle
9455 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9456 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9457 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9458 * tree-inline.c (estimate_operator_cost): Likewise.
9459 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9460 * fold-const.c (const_binop): Likewise.
9461 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9462 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9463 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9464 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9465 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9466 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9467 * expr.c (expand_expr_real_2): Likewise.
9468 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9469 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9470 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9472 * optabs.c (expand_widen_pattern_expr): For
9473 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9474 sign from result type rather than operand's type.
9475 (expand_binop_directly): For vec_packu_float_optab and
9476 vec_packs_float_optab allow result type to be different from operand's
9478 * optabs-tree.c (optab_for_tree_code): Handle
9479 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9480 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9481 * tree-vect-generic.c (expand_vector_operations_1): Handle
9482 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9483 VEC_PACK_FLOAT_EXPR.
9484 * tree-vect-stmts.c (supportable_widening_operation): Handle
9486 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9487 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9488 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9489 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9490 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9492 (vec_pack<floatprefix>_float_<mode>): New expander.
9493 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9495 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9496 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9497 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9498 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9499 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9501 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9502 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9503 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9504 VEC_PACK_FLOAT_EXPR): Document.
9506 2018-05-29 Richard Biener <rguenther@suse.de>
9508 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9510 (stmt_vec_info_vec): Make pointer.
9511 (init_stmt_vec_info_vec): Remove.
9512 (free_stmt_vec_info_vec): Likewise.
9513 (set_stmt_vec_info_vec): New function.
9514 (free_stmt_vec_infos): Likewise.
9515 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9516 (set_vinfo_for_stmt): Likewise.
9517 (get_earlier_stmt): Likewise.
9518 (get_later_stmt): Likewise.
9519 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9520 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9521 (vec_info::~vec_info): Free stmt_vec_infos.
9522 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9523 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9524 (pass_slp_vectorize::execute): Likewise.
9525 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9526 (free_stmt_vec_info_vec): Likewise.
9527 (set_stmt_vec_info_vec): New function.
9528 (free_stmt_vec_infos): Likewise.
9529 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9530 the global stmt_vec_info_vec.
9531 * tree-parloops.c (gather_scalar_reductions): Use
9532 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9535 2018-05-29 Richard Biener <rguenther@suse.de>
9537 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9539 2018-05-29 Martin Liska <mliska@suse.cz>
9540 David Malcolm <dmalcolm@redhat.com>
9542 * vec.c (test_reverse): New.
9543 (vec_c_tests): Add new test.
9544 * vec.h (vl_ptr>::reverse): New function.
9546 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9548 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9550 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9553 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9555 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9557 2018-05-28 Richard Biener <rguenther@suse.de>
9559 PR tree-optimization/85933
9560 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9561 look at stmts marked as vectorizable.
9563 2018-05-28 Richard Biener <rguenther@suse.de>
9565 PR tree-optimization/85934
9566 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9567 vector boolean check before scalar optimization.
9569 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9571 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9574 2018-05-28 Mark Wielaard <mark@klomp.org>
9576 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9577 if it is an expression containing a minus sign.
9579 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9581 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9583 2018-05-27 Paul Koning <ni1d@arrl.net>
9585 * config/pdp11/pdp11.md (truncsihi2): Remove.
9587 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9588 Chung-Ju Wu <jasonwucj@gmail.com>
9590 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9592 (unaligned_store_dw): Ditto.
9593 * config/nds32/nds32-memory-manipulation.c
9594 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9595 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9596 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9597 (emit_setmem_word_loop): Rename to ...
9598 (emit_setmem_doubleword_loop): ... this.
9599 (nds32_gen_dup_4_byte_to_word_value): New function.
9600 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9601 (nds32_expand_setmem_loop): Refine implementation.
9602 (nds32_expand_setmem_loop_v3m): Ditto.
9603 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9606 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9608 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9610 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9612 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9613 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9614 machine->attr_no_prologue_p.
9615 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9616 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9617 (nds32_expand_epilogue): Consider attr_naked_p.
9618 (nds32_expand_epilogue_v3pop): Likewise.
9619 (nds32_can_use_return_insn): Likewise.
9620 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9621 attr_no_prologue_p fields.
9622 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9624 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9627 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9629 * config/i386/sse.md
9630 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9632 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9634 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9636 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9638 (*<floatsuffix>floatv2div2sf2): Rename to ...
9639 (*float<floatunssuffix>v2div2sf2): ... this.
9640 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9641 (float<floatunssuffix>v2div2sf2_mask): ... this.
9642 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9643 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9644 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9646 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9648 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9650 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9652 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9654 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9656 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9657 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9658 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9659 gen_ufix_truncv8dfv8si2.
9660 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9661 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9662 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9663 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9664 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9665 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9666 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9667 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9669 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9673 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9675 2018-05-25 Jim Wilson <jimw@sifive.com>
9677 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9678 * config/riscv/riscv.c (struct machine_function): Add
9679 interrupt_handler_p and attribute_checked_p fields.
9680 (riscv_attribute_table): Add interrupt.
9681 (riscv_interrupt_type_p): New.
9682 (riscv_save_reg_p): Save extra regs for interrupt handler.
9683 (riscv_use_save_libcall): Return false for interrupt handler.
9684 (riscv_first_stack_step): Add forward declaration.
9685 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
9686 for interrupt handler with large frame. Use it for saved reg list.
9687 (riscv_expand_prologue): Move flag_stack_usage_info support to
9688 eliminate duplication.
9689 (riscv_expand_epilogue): Generate mret for interrupt handler.
9690 (riscv_epilogue_uses): New.
9691 (riscv_can_use_return_insn): Return false for interrupt handler.
9692 (riscv_function_ok_for_sibcall): Likewise.
9693 (riscv_set_current_function): Add interrupt handler support.
9694 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9695 * config/riscv/riscv.md (UNSPECV_MRET): New.
9697 (riscv_frflags, riscv_fsflags): Use tab after opcode.
9699 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9701 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
9703 PR tree-optimization/85712
9704 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9705 this candidate has already been replaced in-situ by a copy.
9707 2018-05-25 Jason Merrill <jason@redhat.com>
9709 PR c++/80485 - inline function non-zero address.
9710 * symtab.c (nonzero_address): Check DECL_COMDAT.
9712 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
9715 * config/alpha/alpha.md (ashlsi3): New insn pattern.
9716 (*ashlsi_se): Rename from *ashldi_se. Define as sign
9717 extension of SImode operation. Use const123_operand predicate.
9718 (*saddsi_1): Remove.
9719 (*saddl_se_1): Ditto.
9721 (*ssubl_se_1): Ditto.
9722 * config/alpha/predicates.md (const123_operand): New predicate.
9723 * config/alpha/constraints.md (P): Use IN_RANGE.
9725 2018-05-25 Richard Biener <rguenther@suse.de>
9727 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9729 (ref_maybe_used_by_stmt_p): Likewise.
9730 (stmt_may_clobber_ref_p): Likewise.
9731 (stmt_may_clobber_ref_p_1): Likewise.
9732 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9734 (ref_maybe_used_by_stmt_p): Likewise.
9735 (stmt_may_clobber_ref_p): Likewise.
9736 (stmt_may_clobber_ref_p_1): Likewise.
9737 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9738 the alias oracle to disambiguate DRs with stmts DR analysis
9740 (vect_analyze_data_refs): Do not give up on not analyzable
9741 DRs for BB vectorization. Remove code truncating the dataref
9744 2018-05-25 Jakub Jelinek <jakub@redhat.com>
9747 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9748 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
9749 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9751 2018-05-25 Richard Biener <rguenther@suse.de>
9753 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9754 function, combining stmt data ref gathering and fatal analysis
9756 (vect_analyze_data_refs): Remove now redudnant code and simplify.
9757 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9758 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9759 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9760 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9762 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9764 PR tree-optimization/85720
9765 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9766 SCC if all partitions are builtins.
9767 (version_loop_by_alias_check): New parameter. Generate cancelable
9768 runtime alias check if all partitions are builtins.
9769 (distribute_loop): Update call to above function.
9771 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9773 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9774 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9775 (parm_default_def_partition_arg): Ditto.
9776 (set_parm_default_def_partition): Ditto.
9777 (get_parm_default_def_partitions): Ditto and make it static.
9778 (get_undefined_value_partitions): Ditto and make it static.
9779 (remove_ssa_form): Refactor call to init_var_map here.
9780 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9781 computation for loop region.
9782 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9783 (register_default_def): Delete.
9784 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9785 (parm_default_def_partition_arg): Ditto.
9786 (set_parm_default_def_partition): Ditto.
9787 (get_parm_default_def_partitions): Ditto and make it static.
9788 (get_undefined_value_partitions): Ditto and make it static.
9789 (coalesce_with_default, coalesce_with_default): Update comment.
9790 (create_coalesce_list_for_region): New func factored out from
9791 create_outofssa_var_map.
9792 (populate_coalesce_list_for_outofssa): New func factored out from
9793 create_outofssa_var_map and coalesce_ssa_name.
9794 (create_outofssa_var_map): Delete.
9795 (coalesce_ssa_name): Refactor to support live range computation.
9796 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9797 (get_parm_default_def_partitions): Delete.
9798 (get_undefined_value_partitions): Ditto.
9799 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9800 computation for loop region.
9801 (new_tree_live_info, loe_visit_block): Ditto.
9802 (live_worklist, set_var_live_on_entry): Ditto.
9803 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9804 * tree-ssa-live.h (struct _var_map): New fields.
9805 (init_var_map): Change decl.
9806 (region_contains_p): New.
9808 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9810 * tree-ssa-live.h (live_merge_and_clear): Delete.
9812 2018-05-25 Richard Biener <rguenther@suse.de>
9815 * tree-dump.c (dequeue_and_dump): Remove access to removed
9816 operand 2 of a SWITCH_EXPR.
9818 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9820 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9821 multiplication and division.
9822 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9823 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9824 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9825 (cond_udiv_optab, cond_umod_optab): New optabs.
9826 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9827 (IFN_COND_RDIV): New internal functions.
9828 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9829 TRUNC_MOD_EXPR and RDIV_EXPR.
9830 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9831 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9833 (SVE_INT_BINARY): Include mult.
9834 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9835 (optab, sve_int_op): Handle mult.
9836 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9838 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9839 for SVE_INT_BINARY_SD.
9841 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9843 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9844 (optab, sve_int_op): Handle div and udiv.
9845 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9846 for SVE_INT_BINARY_SD.
9847 (*<optab><mode>3): New insn for the same.
9849 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9851 * tree-vect-patterns.c: Include predict.h.
9852 (vect_recog_divmod_pattern): Restrict check for division support
9853 to when optimizing for size.
9855 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9857 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9858 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9859 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9860 (gimple_match_op::set_op): Likewise.
9861 (gimple_resimplify4): Declare.
9862 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9863 (expr::gen_transform): Likewise.
9864 (decision_tree::gen): Generate a simplification routine for 4 operands.
9865 * gimple-match-head.c (gimple_simplify): Add an overload for
9866 4 operands. In the top-level function, handle up to 4 call
9867 arguments and call gimple_resimplify4.
9868 (gimple_resimplify4): New function.
9869 (build_call_internal): Pass a fourth operand.
9870 (maybe_push_to_seq): Likewise.
9871 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9872 Fold VEC_COND_EXPRs of an operation and a default value into
9873 an IFN_COND_* function if possible.
9874 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9876 (SVE_COND_FP_BINARY): Include them.
9877 (optab, sve_fp_op): Handle them.
9878 (SVE_INT_BINARY_REV): New code iterator.
9879 (SVE_COND_FP_BINARY_REV): New int iterator.
9880 (commutative): New int attribute.
9881 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9883 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9885 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9886 (*cond_<optab><mode>): New patterns for reversed operands.
9888 2018-05-25 Richard Biener <rguenther@suse.de>
9890 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9891 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9892 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9893 (STMT_VINFO_GROUPED_ACCESS): Adjust.
9894 * tree-vect-data-refs.c (everywhere): Adjust users.
9895 * tree-vect-loop.c (everywhere): Likewise.
9896 * tree-vect-slp.c (everywhere): Likewise.
9897 * tree-vect-stmts.c (everywhere): Likewise.
9898 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9900 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9902 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9904 (gcc_cv_as_section_exclude): ... this.
9905 Try Solaris as #exclude syntax.
9906 * configure: Regenerate.
9907 * config.in: Regenerate.
9908 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9910 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9911 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9913 * varasm.c (default_elf_asm_named_section): Don't check if
9914 HAVE_GAS_SECTION_EXCLUDE is defined.
9916 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9918 * doc/md.texi: Update the documentation of the cond_* optabs
9919 to mention the new final operand. Fix GET_MODE_NUNITS call.
9920 Describe the scalar case too.
9921 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9922 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9924 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9925 (get_conditional_internal_fn): Update comment.
9926 * tree-vect-loop.c (vectorizable_reduction): Pass the original
9927 accumulator value as a final argument to conditional functions.
9928 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9929 a define_expand and add an "else" operand. Assert for now that
9930 the else operand is equal to operand 2. Use SVE_INT_BINARY and
9931 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9932 (*cond_<optab><mode>): New patterns.
9933 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9934 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9935 (UNSPEC_COND_EOR): Delete.
9936 (optab): Remove associated mappings.
9937 (SVE_INT_BINARY): New code iterator.
9938 (sve_int_op): Remove int attribute and add "minus" to the code
9940 (SVE_COND_INT_OP): Delete.
9941 (SVE_COND_FP_OP): Rename to...
9942 (SVE_COND_FP_BINARY): ...this.
9944 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9946 * optabs.c (can_reuse_operands_p): New function.
9947 (maybe_legitimize_operands): Try to reuse the results for
9950 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9952 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9953 Add {q} suffix to insn mnemonic.
9955 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9957 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9958 (msp430_warn_func_return): New.
9960 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
9962 * fold-const.c (tree_nonzero_bits): New function.
9963 * fold-const.h (tree_nonzero_bits): Likewise.
9964 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9965 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9967 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9971 * varasm.c (assemble_alias): Check ifunc_resolver only on
9974 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9977 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9978 when memory input operand is handled.
9980 2018-05-24 Luis Machado <luis.machado@linaro.org>
9982 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9984 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9986 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9988 * match.pd: Delay FMA folds until after vectorization.
9990 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
9993 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9994 address check not strict.
9996 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9998 * gimple-match.h (gimple_match_op): New class.
9999 (mprts_hook): Replace parameters with a gimple_match_op *.
10000 (maybe_build_generic_op): Likewise.
10001 (gimple_simplified_result_is_gimple_val): Replace parameters with
10002 a const gimple_match_op *.
10003 (gimple_simplify): Replace code_helper * and tree * parameters with
10004 a gimple_match_op * parameter.
10005 (gimple_resimplify1): Replace code_helper *, tree and tree *
10006 parameters with a gimple_match_op * parameter.
10007 (gimple_resimplify2): Likewise.
10008 (gimple_resimplify3): Likewise.
10009 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
10010 parameters with a gimple_match_op * parameter.
10011 * gimple-match-head.c (gimple_simplify): Change prototypes of
10012 auto-generated functions to take a gimple_match_op * instead of
10013 separate code_helper * and tree * parameters. Make the same
10014 change in the top-level overload and update calls to the
10015 gimple_resimplify routines. Update calls to the auto-generated
10016 functions and to maybe_push_res_to_seq in the publicly-facing
10017 operation-specific gimple_simplify overloads.
10018 (gimple_match_op::MAX_NUM_OPS): Define.
10019 (gimple_resimplify1): Replace rcode and ops with a single res_op
10020 parameter. Update call to gimple_simplify.
10021 (gimple_resimplify2): Likewise.
10022 (gimple_resimplify3): Likewise.
10023 (mprts_hook): Replace parameters with a gimple_match_op *.
10024 (maybe_build_generic_op): Likewise.
10025 (build_call_internal): Replace type, nargs and ops with
10026 a gimple_match_op *.
10027 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
10028 with a single gimple_match_op *. Update calls to mprts_hook,
10029 build_call_internal and gimple_simplified_result_is_gimple_val.
10030 Factor out code that is common to the tree_code and combined_fn cases.
10031 * genmatch.c (expr::gen_transform): Replace tem_code and
10032 tem_ops with a gimple_match_op called tem_op. Update calls
10033 to the gimple_resimplify functions and maybe_push_res_to_seq.
10034 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
10035 res_ops. Update call to the gimple_resimplify functions.
10036 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
10037 (decision_tree::gen): Make the functions take a gimple_match_op *
10038 called res_op instead of separate res_code and res_ops parameters.
10039 Update call accordingly.
10040 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
10041 and ops with a single res_op parameter. Update calls to
10042 maybe_build_generic_op and maybe_push_res_to_seq.
10043 (fold_stmt_1): Update calls to gimple_simplify and
10044 replace_stmt_with_simplification.
10045 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
10046 and gimple_simplified_result_is_gimple_val.
10047 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
10049 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
10050 with a gimple_match_op *.
10051 (vn_nary_build_or_lookup): Likewise. Update call to
10052 vn_nary_build_or_lookup_1.
10053 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
10054 gimple_match_op *. Update calls to the gimple_resimplify routines
10055 and to gimple_simplified_result_is_gimple_val.
10056 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
10057 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
10058 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
10059 (visit_nary_op): Likewise.
10060 (visit_reference_op_load): Likewise.
10062 2018-05-23 Luis Machado <luis.machado@linaro.org>
10064 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
10065 modifier for printing the step amount.
10067 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
10070 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
10073 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
10075 * doc/sourcebuild.texi (Endianness): New subsubsection.
10077 2018-05-23 Luis Machado <luis.machado@linaro.org>
10079 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10080 <prefetch_dynamic_strides>: New const bool field.
10081 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10082 prefetch_dynamic_strides.
10083 (exynosm1_prefetch_tune): Likewise.
10084 (thunderxt88_prefetch_tune): Likewise.
10085 (thunderx_prefetch_tune): Likewise.
10086 (thunderx2t99_prefetch_tune): Likewise.
10087 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
10089 (aarch64_override_options_internal): Update to set
10090 PARAM_PREFETCH_DYNAMIC_STRIDES.
10091 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
10092 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
10093 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
10094 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
10095 prefetch-dynamic-strides setting.
10097 2018-05-23 Luis Machado <luis.machado@linaro.org>
10099 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
10100 <minimum_stride>: New const int field.
10101 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
10102 minimum_stride field defaulting to -1.
10103 (exynosm1_prefetch_tune): Likewise.
10104 (thunderxt88_prefetch_tune): Likewise.
10105 (thunderx_prefetch_tune): Likewise.
10106 (thunderx2t99_prefetch_tune): Likewise.
10107 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
10108 <default_opt_level>: Set to 3.
10109 (aarch64_override_options_internal): Update to set
10110 PARAM_PREFETCH_MINIMUM_STRIDE.
10111 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
10112 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
10113 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
10114 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
10115 stride is constant and is below the minimum stride threshold.
10117 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10119 * config/arm/arm-cpus.in (mode26): Delete.
10120 (armv4): Delete mode26 reference.
10121 * config/arm/arm.c (arm_configure_build_target): Delete use of
10124 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10126 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
10128 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
10129 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
10131 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
10132 (floatunsdidf2): Ditto.
10134 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
10136 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
10137 (fixuns_trunc<mode>si2_avx512f): Ditto.
10138 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
10139 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
10140 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
10142 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10144 PR rtl-optimization/79985
10145 * df-scan.c (df_insn_refs_collect): Remove special case for
10146 global registers and asm statements.
10148 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
10150 * extend.texi (Global Register Variables): Rewrite the bullet list.
10151 Note that the register is available for allocation. Note that access
10152 via inline asm must use constraints. Add note about async-signal
10153 handlers. Remove paragraph about automagic register selection.
10155 2018-05-23 Richard Biener <rguenther@suse.de>
10157 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
10158 of fixed offset from memset VN.
10160 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
10162 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
10163 first_interp field.
10164 (alloc_cand_and_find_basis): Initialize first_interp field.
10165 (slsr_process_mul): Modify first_interp field.
10166 (slsr_process_add): Likewise.
10167 (slsr_process_cast): Modify first_interp field for each new
10169 (slsr_process_copy): Likewise.
10170 (dump_candidate): Dump first_interp field.
10171 (replace_mult_candidate): Process all interpretations, not just
10173 (replace_rhs_if_not_dup): Likewise.
10174 (replace_one_candidate): Likewise.
10176 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10178 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10180 (aarch64_needs_frame_chain): New function.
10181 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10183 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10186 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10187 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10188 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10189 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10190 as true for strict-align.
10191 (aarch64_can_inline_p): Perform checks even when callee has no
10192 attributes to check for strict alignment.
10193 * doc/extend.texi (AArch64 Function Attributes): Document
10195 * doc/invoke.texi: (AArch64 Options): Likewise.
10197 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10199 PR tree-optimization/85853
10200 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10201 the handling of the root of the node to...
10202 (vect_slp_analyze_node_operations_1): ...this new function,
10203 and run the whole thing with the child nodes' def types
10204 set according to their SLP node's def type.
10206 2018-05-23 Richard Biener <rguenther@suse.de>
10208 PR middle-end/85874
10209 * tree-data-ref.c (create_runtime_alias_checks): Defer
10210 and ignore overflow warnings.
10212 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10214 PR tree-optimization/85822
10215 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10218 2018-05-23 Richard Biener <rguenther@suse.de>
10220 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10221 memset constants via native_interpret_expr.
10223 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10226 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10228 (cgraph_node::create_alias): Likewise.
10229 (cgraph_node::get_availability): Check ifunc_resolver instead
10230 of looking up ifunc attribute.
10231 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10232 * varasm.c (do_assemble_alias): Likewise.
10233 (assemble_alias): Likewise.
10234 (default_binds_local_p_3): Likewise.
10235 * cgraph.h (cgraph_node): Add ifunc_resolver.
10236 (cgraph_node::only_called_directly_or_aliased_p): Return false
10237 for IFUNC resolver.
10238 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10240 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10241 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10242 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10243 instead of looking up ifunc attribute.
10245 2018-05-22 Luis Machado <luis.machado@linaro.org>
10247 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10249 2018-05-22 Martin Sebor <msebor@redhat.com>
10251 PR middle-end/85359
10252 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10253 only when expasion succeeds.
10254 (expand_builtin_strcmp): Same.
10255 (expand_builtin_strncmp): Same.
10257 2018-05-22 Martin Sebor <msebor@redhat.com>
10259 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10261 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10262 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10264 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10265 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10267 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10268 Add check for legitimate_address.
10269 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10270 (aarch64_swap_ldrstr_operands): New.
10271 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10274 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10275 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10277 * config/aarch64/aarch64.md: New patterns to generate stp
10279 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10280 single words and double words.
10281 (load_pair_sw, load_pair_dw): Likewise.
10282 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10284 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10286 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10287 for different mode ldpstp and add peephole for merged zero stores.
10288 Likewise for loads.
10289 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10291 (aarch64_gen_store_pair): Rename calls to match new patterns.
10292 (aarch64_gen_load_pair): Rename calls to match new patterns.
10293 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10294 (load_pair<DREG:mode><DREG2:mode>): ... This.
10295 (store_pair<mode>): Rename to...
10296 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10297 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10298 New mode iterators.
10299 (V_INT_EQUIV): Handle SImode.
10300 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10303 2018-05-22 Martin Sebor <msebor@redhat.com>
10306 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10307 or ajust the presumed bound on an operation to avoid unnecessary
10310 2018-05-22 Martin Sebor <msebor@redhat.com>
10312 PR tree-optimization/85826
10313 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10314 assuming that a DECL necesarily has a constant size.
10316 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10318 PR middle-end/85862
10319 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10321 2018-05-22 Richard Biener <rguenther@suse.de>
10323 PR tree-optimization/85834
10324 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10325 non-constant and non-zero memset arguments.
10327 2018-05-22 Martin Liska <mliska@suse.cz>
10330 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10332 2018-05-22 Richard Biener <rguenther@suse.de>
10334 PR tree-optimization/85863
10335 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10336 comparisons when vectype is specified.
10337 (vectorizable_condition): Do not specify vectype for
10338 vect_is_simple_cond when SLP vectorizing.
10340 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10343 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10344 define __ibm128 as long double.
10345 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10346 as a distinct type when IEEE 128-bit support is enabled.
10347 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10348 128-bit types to use the correct functions.
10349 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10350 convert between 128-bit floating point types that have different
10351 modes but the same representation, instead of using gen_lowpart to
10353 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10355 (IFKF_reg): New attributes to give the register constraints for
10357 (extend<mode>tf2_internal): New insns to mark an explicit
10358 conversion between 128-bit floating point types that have a
10359 different mode but share the same representation.
10361 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10363 PR tree-optimization/85814
10364 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10365 a null return from get_strinfo when unsharing the next
10366 strinfo in the chain.
10368 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10371 * varasm.c (weak_finish): Clean up weak_decls.
10373 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10375 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10376 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10377 UNSPEC_UADALP values.
10378 * config/aarch64/iterators.md (ABAL): New int iterator.
10381 (sur): Add mappings for the above.
10382 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10384 (aarch64_<sur>abal<mode>_4): Likewise.
10385 (aarch64_<sur>adalp<mode>_3): Likewise.
10386 (<sur>sadv16qi): New define_expand.
10388 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10390 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10391 (*movdf_internal): Ditto.
10392 (*rcpsf2_sse): Ditto.
10393 (*rsqrtsf2_sse): Ditto.
10394 (*sqrt<mode>2_sse): Ditto.
10396 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10398 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10400 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10401 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10402 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10403 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10405 * config/aarch64/arm_neon.h: Likewise.
10406 * config/aarch64/iterators.md (VQ_I): New.
10408 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10410 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10412 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10415 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10417 * config/nds32/constraints.md (S): New constraint.
10418 * config/nds32/nds32.md (call_internal): Use constraint S.
10419 (call_value_internal): Likewise.
10420 (sibcall_internal): Likewise.
10421 (sibcall_value_internal): Likewise.
10423 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10424 Chung-Ju Wu <jasonwucj@gmail.com>
10426 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10427 into consideration.
10429 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10430 Chung-Ju Wu <jasonwucj@gmail.com>
10432 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10433 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10434 (nds32_rtx_costs_impl): Simplify.
10435 (nds32_address_cost_impl): Simplify.
10436 (nds32_init_rtx_costs): New function.
10437 (nds32_rtx_costs_speed_prefer): Likewise.
10438 (nds32_rtx_costs_size_prefer): Likewise.
10439 (nds32_address_cost_speed_prefer): Likewise.
10440 (nds32_address_cost_speed_fwprop): Likewise.
10441 (nds32_address_cost_size_prefer): Likewise.
10442 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10443 * config/nds32/nds32.c (nds32_option_override): Use
10444 nds32_init_rtx_costs function.
10446 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10448 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10449 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10450 (TARGET_PIPELINE_N8): Likewise.
10451 (TARGET_PIPELINE_N10): Likewise.
10452 (TARGET_PIPELINE_N13): Likewise.
10453 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10455 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10457 * config/nds32/nds32-fpu.md: Update copyright year.
10459 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10461 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10463 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10465 * config/nds32/nds32.c
10466 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10467 * config/nds32/nds32.opt (minline-asm-r15): New option.
10469 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10471 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10473 * config/nds32/nds32.md (abssi2): New pattern.
10475 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10477 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10478 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10479 Merge insn pattern from sse_cvtsi2ss<round_name> and
10480 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10481 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10482 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10483 using SWI48 mode iterator.
10484 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10485 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10486 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10487 pattern from sse_cvttss2si<round_saeonly_name>
10488 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10489 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10490 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10491 using SWI48 mode iterator.
10492 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10493 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10494 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10495 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10496 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10497 using SWI48 mode iterator.
10498 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10499 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10500 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10501 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10502 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10503 SWI48 mode iterator.
10504 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10505 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10506 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10507 pattern from sse_cvttsd2si<round_saeonly_name>
10508 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10510 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10512 * config/nds32/nds32-md-auxiliary.c
10513 (nds32_valid_smw_lwm_base_p): Refine.
10514 (nds32_output_smw_single_word): Refine.
10515 (nds32_output_smw_double_word): New.
10516 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10518 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10520 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10521 (nds32_output_stack_pop): Refine.
10522 (nds32_expand_unaligned_load): Refine.
10523 (nds32_expand_unaligned_store): Refine.
10525 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10526 Chung-Ju Wu <jasonwucj@gmail.com>
10528 * config/nds32/constants.md: Add TP_REGNUM constant.
10529 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10530 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10532 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10533 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10534 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10535 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10536 and PIC code generation.
10537 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10539 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10541 * config/nds32/nds32.md: Support TLS and PIC.
10542 * config/nds32/nds32.c: Support TLS and PIC.
10543 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10544 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10547 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10549 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10550 mode with E_ prefix.
10552 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10553 Chung-Ju Wu <jasonwucj@gmail.com>
10555 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10556 * config/nds32/nds32-md-auxiliary.c
10557 (symbolic_reference_mentioned_p): New.
10558 (nds32_legitimize_ict_address): New.
10559 (nds32_expand_ict_move): New.
10560 (nds32_indirect_call_referenced_p): New.
10561 (nds32_symbol_binds_local_p): Delete.
10562 (nds32_long_call_p): Modify.
10563 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10564 * config/nds32/nds32-protos.h
10565 (symbolic_reference_mentioned_p): Declare.
10566 (nds32_legitimize_ict_address): Declare.
10567 (nds32_expand_ict_move): Declare.
10568 (nds32_indirect_call_referenced_p): Declare.
10569 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10570 (nds32_relax_group): Use nds32_ict_const_p as condition.
10571 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10572 (nds32_asm_file_start): Output ict_model directive in asm code.
10573 (nds32_legitimate_address_p): Consider indirect call.
10574 (nds32_print_operand): Consider indirect call.
10575 (nds32_print_operand_address): Consider indirect call.
10576 (nds32_insert_attributes): Handle "indirect_call" attribute.
10577 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10578 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10579 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10580 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10581 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10582 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10583 (TARGET_ICT_MODEL_SMALL): Define.
10584 (TARGET_ICT_MODEL_LARGE): Define.
10585 * config/nds32/nds32.md (movsi): Consider ict model.
10586 (call, call_value): Consider ict model.
10587 (sibcall, sibcall_value): Consider ict model.
10588 * config/nds32/nds32.opt (mict-model): New option.
10589 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10592 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10593 Monk Chiang <sh.chiang04@gmail.com>
10594 Jim Wilson <jimw@sifive.com>
10596 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10597 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10598 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10599 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10600 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10601 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10602 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10603 compute save_libcall_adjustment properly.
10604 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10605 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10606 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10607 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10608 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10609 (ABI_SPEC): Handle mabi=ilp32e.
10610 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10611 (RVE): Add RVE mask.
10612 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10613 <-march>: Add rv32e as an example.
10615 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10618 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10619 (intra_create_variable_infos): Handle C++ constructors.
10621 2018-05-18 Martin Liska <mliska@suse.cz>
10623 * passes.def: Remove a redundant pass.
10625 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10628 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10630 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10632 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10634 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10636 (armv2, armv2a, armv3, armv3m): Delete architectures.
10637 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10638 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10639 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10641 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10642 (*mulsidi3adddi): Likewise.
10643 (mulsidi3): Likewise.
10644 (*mulsidi3_nov6): Likewise.
10645 (umulsidi3): Likewise.
10646 (umulsidi3_nov6): Likewise.
10647 (umaddsidi4): Likewise.
10648 (*umulsidi3adddi): Likewise.
10649 (smulsi3_highpart): Likewise.
10650 (*smulsi3_highpart_nov6): Likewise.
10651 (umulsi3_highpart): Likewise.
10652 (*umulsi3_highpart_nov6): Likewise.
10653 * config/arm/arm.h (arm_arch3m): Delete.
10654 * config/arm/arm.c (arm_arch3m): Delete.
10655 (arm_option_override_internal): Update armv3-related comment.
10656 (arm_configure_build_target): Delete use of isa_bit_mode32.
10657 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10658 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10659 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10660 (mulsa3): Likewise.
10661 (mulusa3): Likewise.
10662 * config/arm/arm-protos.h (arm_arch3m): Delete.
10663 * config/arm/arm-tables.opt: Regenerate.
10664 * config/arm/arm-tune.md: Likewise.
10665 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10666 deleted architectures.
10668 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10670 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10671 (armv5t, armv5te): New features.
10672 (ARMv5, ARMv5e): Delete fgroups.
10673 (ARMv5t, ARMv5te): Adjust for above changes.
10674 (ARMv6m): Likewise.
10675 (armv5, armv5e): Delete arches.
10676 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10678 (*call_reg_arm): Likewise.
10679 (*call_value_reg_armv5): Likewise.
10680 (*call_value_reg_arm): Likewise.
10681 (*call_symbol): Likewise.
10682 (*call_value_symbol): Likewise.
10683 (*sibcall_insn): Likewise.
10684 (*sibcall_value_insn): Likewise.
10685 (clzsi2): Likewise.
10686 (prefetch): Likewise.
10687 (define_split and define_peephole2 dependent on arm_arch5):
10689 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10691 (TARGET_ARM_QBIT): Likewise.
10692 (TARGET_DSP_MULTIPLY): Likewise.
10693 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10694 (arm_arch5, arm_arch5e): Delete.
10695 (arm_arch5t, arm_arch5te): Declare.
10696 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10697 (arm_arch5t): Declare.
10698 (arm_option_reconfigure_globals): Update for the above.
10699 (arm_options_perform_arch_sanity_checks): Update comment, replace
10700 use of arm_arch5 with arm_arch5t.
10701 (use_return_insn): Likewise.
10702 (arm_emit_call_insn): Likewise.
10703 (output_return_instruction): Likewise.
10704 (arm_final_prescan_insn): Likewise.
10705 (arm_coproc_builtin_available): Likewise.
10706 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10707 arm_arch5e with arm_arch5t and arm_arch5te.
10708 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10709 (arm_arch5t, arm_arch5te): Declare.
10710 * config/arm/arm-tables.opt: Regenerate.
10711 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10712 * config/arm/t-multilib: Likewise.
10713 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10714 instead of arm_arch5.
10715 (*call_reg_thumb1): Likewise.
10716 (*call_value_reg_thumb1_v5): Likewise.
10717 (*call_value_reg_thumb1): Likewise.
10718 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10720 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10722 2018-05-18 Martin Liska <mliska@suse.cz>
10724 PR gcov-profile/84846
10725 * doc/gcov.texi: Document -t option of gcov tool.
10727 2018-05-18 Martin Liska <mliska@suse.cz>
10729 PR gcov-profile/84846
10730 * gcov.c (print_usage): Add new -t option.
10731 (process_args): Handle the option.
10732 (generate_results): Use stdout as output when requested by
10735 2018-05-18 Martin Liska <mliska@suse.cz>
10737 PR gcov-profile/84846
10738 * coverage.c (coverage_init): Write PWD to .gcno file.
10739 * doc/gcov.texi: Document how working directory is printed.
10740 * gcov-dump.c (dump_gcov_file): Print PWD.
10741 * gcov.c (output_intermediate_file): Likewise.
10742 (read_graph_file): Read PWD string.
10743 (output_lines): Print PWD.
10745 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10747 PR middle-end/85817
10748 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10749 for retval and return false if all args to phi are zero.
10751 2018-05-18 Richard Biener <rguenther@suse.de>
10753 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10755 (evrp_dom_walker::before_dom_children): Call it.
10757 2018-05-18 Richard Biener <rguenther@suse.de>
10759 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10760 results when processing array refs with variable index.
10762 2018-05-18 Toon Moene <toon@moene.org>
10764 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10765 directly after that of -floop-interchange. Indicate that both
10766 options are enabled by default when specifying -O3.
10768 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10770 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10771 iterator. Delete separate integer-mode vec_set<mode> expander.
10772 (aarch64_simd_vec_setv2di): Delete.
10773 (vec_setv2di): Delete.
10774 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10775 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
10776 the "w, r" alternative.
10778 2018-05-18 Martin Liska <mliska@suse.cz>
10780 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10781 * tree-pass.h (make_pass_lower_switch_O0): New function.
10782 * tree-switch-conversion.c (node_has_low_bound): Remove.
10783 (node_has_high_bound): Likewise.
10784 (node_is_bounded): Likewise.
10785 (class pass_lower_switch): Make it a template type and create
10787 (pass_lower_switch::execute): Add template argument.
10788 (make_pass_lower_switch): New function.
10789 (make_pass_lower_switch_O0): New function.
10790 (do_jump_if_equal): Remove.
10791 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10792 all the hard work to tree optimization passes.
10794 2018-05-18 Martin Liska <mliska@suse.cz>
10796 * dbgcnt.c (limit_low): Renamed from limit.
10797 (limit_high): New variable.
10798 (dbg_cnt_is_enabled): Check for upper limit.
10799 (dbg_cnt): Adjust dumping.
10800 (dbg_cnt_set_limit_by_index): Add new argument for high
10802 (dbg_cnt_set_limit_by_name): Likewise.
10803 (dbg_cnt_process_single_pair): Parse new format.
10804 (dbg_cnt_process_opt): Use strtok.
10805 (dbg_cnt_list_all_counters): Remove 'value' and add
10807 * doc/invoke.texi: Document changes.
10809 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10811 * doc/sourcebuild.texi (scalar_all_fma): Document.
10812 * tree.def (FMA_EXPR): Delete.
10813 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10814 * internal-fn.c (ternary_direct): New macro.
10815 (expand_ternary_optab_fn): Likewise.
10816 (direct_ternary_optab_supported_p): Likewise.
10817 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10818 * builtins.c (fold_builtin_fma): Delete.
10819 (fold_builtin_3): Don't call it.
10820 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10821 * expr.c (expand_expr_real_2): Likewise.
10822 * fold-const.c (operand_equal_p): Likewise.
10823 (fold_ternary_loc): Likewise.
10824 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10825 * gimple.c (DEFTREECODE): Likewise.
10826 * gimplify.c (gimplify_expr): Likewise.
10827 * optabs-tree.c (optab_for_tree_code): Likewise.
10828 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10829 * tree-eh.c (operation_could_trap_p): Likewise.
10830 (stmt_could_throw_1_p): Likewise.
10831 * tree-inline.c (estimate_operator_cost): Likewise.
10832 * tree-pretty-print.c (dump_generic_node): Likewise.
10833 (op_code_prio): Likewise.
10834 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10835 * tree-ssa-operands.c (get_expr_operands): Likewise.
10836 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10837 * fold-const-call.h (fold_fma): Delete.
10838 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10839 CFN_FNMA and CFN_FNMS.
10840 (fold_fma): Delete.
10841 * genmatch.c (combined_fn): New enum.
10842 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10843 (commutative_op): New function.
10844 (commutate): Use it. Handle more than 2 operands.
10845 (dt_operand::gen_gimple_expr): Use commutative_op.
10846 (parser::parse_expr): Allow :c to be used with non-binary
10847 operators if the commutative operand is known.
10848 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10849 CFN_FMS, CFN_FNMA and CFN_FNMS.
10850 (backprop::process_assign_use): Remove FMA_EXPR handling.
10851 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10852 (gen_hsa_fma): New function.
10853 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10854 IFN_FNMA and IFN_FNMS.
10855 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10856 * gimple-fold.h (follow_all_ssa_edges): Declare.
10857 * gimple-fold.c (follow_all_ssa_edges): New function.
10858 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10859 gimple_build interface and use follow_all_ssa_edges to fold the result.
10860 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10861 instead of checking for optabs directly.
10862 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10863 rather than FMA_EXPRs.
10864 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10865 call to IFN_FMA instead of an FMA_EXPR.
10867 2018-05-17 Jim Wilson <jimw@sifive.com>
10869 * expr.c (do_tablejump): When converting index to Pmode, if we have a
10870 sign extended promoted subreg, and the range does not have the sign bit
10871 set, then do a sign extend.
10873 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10874 test, check for sign extended subreg and/or constant operands, and
10875 do a sign extend in that case.
10877 2018-05-17 Steve Ellcey <sellcey@cavium.com>
10879 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10880 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10882 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10883 Change logics_shift_reg to logics_shift_imm.
10884 (thunderx2t99_fp_loadpair_basic): Delete.
10885 (thunderx2t99_fp_storepair_basic): Delete.
10886 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10887 (thunderx2t99_asimd_polynomial): Delete.
10888 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10889 and neon_fp_mul_d_scalar_q.
10890 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10891 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10892 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10893 (thunderx2t99_asimd_lut): Add missing tbl types.
10894 (thunderx2t99_asimd_ext): Delete.
10895 (thunderx2t99_asimd_load1_1_mult): Delete.
10896 (thunderx2t99_asimd_load1_2_mult): Delete.
10897 (thunderx2t99_asimd_load1_ldp): New.
10898 (thunderx2t99_asimd_load1): New.
10899 (thunderx2t99_asimd_load2): Add missing *load2* types.
10900 (thunderx2t99_asimd_load3): New.
10901 (thunderx2t99_asimd_load4): New.
10902 (thunderx2t99_asimd_store1_1_mult): Delete.
10903 (thunderx2t99_asimd_store1_2_mult): Delete.
10904 (thunderx2t99_asimd_store2_mult): Delete.
10905 (thunderx2t99_asimd_store2_onelane): Delete.
10906 (thunderx2t99_asimd_store_stp): New.
10907 (thunderx2t99_asimd_store1): New.
10908 (thunderx2t99_asimd_store2): New.
10909 (thunderx2t99_asimd_store3): New.
10910 (thunderx2t99_asimd_store4): New.
10912 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
10914 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10915 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
10917 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
10918 Segher Boessenkool <segher@kernel.crashing.org>
10921 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10924 2018-05-17 Richard Biener <rguenther@suse.de>
10926 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10927 for pruning loop and prune defs feeding only already visited PHIs.
10929 2018-05-17 Richard Biener <rguenther@suse.de>
10931 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10933 2018-05-17 Bin Cheng <bin.cheng@arm.com>
10934 Richard Biener <rguenther@suse.de>
10936 PR tree-optimization/85793
10937 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10938 for VMAT_ELEMENTWISE.
10940 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10942 * internal-fn.h (lookup_internal_fn): Declare
10943 * internal-fn.c (lookup_internal_fn): New function.
10944 * gimple.c (gimple_build_call_from_tree): Handle calls to
10945 internal functions.
10946 * gimple-pretty-print.c (dump_gimple_call): Print "." before
10947 internal function names.
10948 * tree-pretty-print.c (dump_generic_node): Likewise.
10949 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10951 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10953 * gimple-fold.h (gimple_build): Make the function forms take
10954 combined_fn rather than built_in_function.
10955 (gimple_simplify): Likewise.
10956 * gimple-match-head.c (gimple_simplify): Likewise.
10957 * gimple-fold.c (gimple_build): Likewise.
10958 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10959 rather than gimple_build_call_internal.
10960 (get_initial_defs_for_reduction): Likewise.
10961 (vect_create_epilog_for_reduction): Likewise.
10962 (vectorizable_live_operation): Likewise.
10964 2018-05-17 Martin Liska <mliska@suse.cz>
10966 * gimple-ssa-sprintf.c (format_directive): Do not use
10967 space in between 'G_' and '('.
10969 2018-05-17 Jakub Jelinek <jakub@redhat.com>
10972 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10973 even if the mask is not all ones.
10976 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10978 (ix86_gimple_fold_builtin): Likewise.
10981 * config/i386/i386.c: Include tree-vector-builder.h.
10982 (ix86_vector_shift_count): New function.
10983 (ix86_fold_builtin): Fold shift builtins by scalar count.
10984 (ix86_gimple_fold_builtin): Likewise.
10986 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10987 _mm512_setzero): New intrinsics.
10989 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
10990 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10992 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10993 code generation for cases where splatting a value is not useful.
10994 * simplify-rtx.c (simplify_ternary_operation): Simplify
10995 vec_merge across a vec_duplicate and a paradoxical subreg forming
10996 a vector mode to a vec_concat.
10998 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
11000 * config.gcc: Support "goldmont-plus".
11001 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11003 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11004 PROCESSOR_GOLDMONT_PLUS.
11005 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
11006 (processor_target_table): Add "goldmont-plus".
11007 (PTA_GOLDMONT_PLUS): Define.
11008 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
11009 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
11010 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
11011 (fold_builtin_cpu): Add "goldmont-plus".
11012 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
11013 (ix86_option_override_internal): Add "goldmont-plus".
11014 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
11015 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
11016 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
11017 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
11019 2018-05-17 Richard Biener <rguenther@suse.de>
11021 PR tree-optimization/85757
11022 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
11023 remove defs that only feed that PHI from further processing.
11025 2018-05-16 Jim Wilson <jimw@sifive.com>
11027 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
11029 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
11031 2018-05-16 Mark Wielaard <mark@klomp.org>
11033 * dwarf2out.c (count_index_strings): New function.
11034 (output_indirect_strings): Call count_index_strings and generate
11035 header for dwarf_version >= 5.
11037 2018-05-16 Mark Wielaard <mark@klomp.org>
11039 * dwarf2out.c (dwarf_FORM): New function.
11040 (set_indirect_string): Use dwarf_FORM.
11041 (reset_indirect_string): Likewise.
11042 (size_of_die): Likewise.
11043 (value_format): Likewise.
11044 (output_die): Likewise.
11045 (add_skeleton_AT_string): Likewise.
11046 (output_macinfo_op): Likewise.
11047 (index_string): Likewise.
11048 (output_index_string_offset): Likewise.
11049 (output_index_string): Likewise.
11050 (count_index_strings): Likewise.
11052 2018-05-16 Carl Love <cel@us.ibm.com>
11054 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11055 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
11057 2018-05-16 Martin Jambor <mjambor@suse.cz>
11059 * ipa-prop.c (ipa_free_all_edge_args): Remove.
11060 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
11062 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
11064 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
11065 (fnma<mode>4): Likewise.
11066 (fms<mode>4): Likewise.
11067 (fnms<mode>4): Likewise.
11068 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
11069 (aarch64_fnma<mode>4): Likewise.
11070 (aarch64_fms<mode>4): Likewise.
11071 (aarch64_fnms<mode>4): Likewise.
11072 (aarch64_fnmadd<mode>4): Likewise.
11074 2018-05-16 Jason Merrill <jason@redhat.com>
11076 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
11078 2018-05-16 Richard Biener <rguenther@suse.de>
11080 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
11081 (dump_stmt_cost): Declare.
11082 (add_stmt_cost): Dump cost we add.
11083 (add_stmt_costs): New function.
11084 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
11085 No longer exported.
11086 (vect_analyze_stmt): Adjust prototype.
11087 (vectorizable_condition): Likewise.
11088 (vectorizable_live_operation): Likewise.
11089 (vectorizable_reduction): Likewise.
11090 (vectorizable_induction): Likewise.
11091 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
11092 cost vector to pass to vectorizable_ and record afterwards.
11093 (vect_model_reduction_cost): Take cost vector argument and adjust.
11094 (vect_model_induction_cost): Likewise.
11095 (vectorizable_reduction): Likewise.
11096 (vectorizable_induction): Likewise.
11097 (vectorizable_live_operation): Likewise.
11098 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
11099 SLP_TREE_NUMBER_OF_VEC_STMTS.
11100 (vect_analyze_slp_cost_1): Remove.
11101 (vect_analyze_slp_cost): Likewise.
11102 (vect_slp_analyze_node_operations): Take visited args and
11103 a target cost vector. Avoid processing already visited stmt sets.
11104 (vect_slp_analyze_operations): Use a local cost vector to gather
11105 costs and register those of non-discarded instances.
11106 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
11107 (vect_schedule_slp_instance): Remove copying of
11108 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
11110 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
11111 adding cost. Record cost entry location.
11112 (vect_prologue_cost_for_slp_op): Function to compute cost of
11113 a constant or invariant generated for SLP vect in the prologue,
11114 split out from vect_analyze_slp_cost_1.
11115 (vect_model_simple_cost): Make static. Adjust for SLP costing.
11116 (vect_model_promotion_demotion_cost): Likewise.
11117 (vect_model_store_cost): Likewise, make static.
11118 (vect_model_load_cost): Likewise.
11119 (vectorizable_bswap): Add cost vector arg and adjust.
11120 (vectorizable_call): Likewise.
11121 (vectorizable_simd_clone_call): Likewise.
11122 (vectorizable_conversion): Likewise.
11123 (vectorizable_assignment): Likewise.
11124 (vectorizable_shift): Likewise.
11125 (vectorizable_operation): Likewise.
11126 (vectorizable_store): Likewise.
11127 (vectorizable_load): Likewise.
11128 (vectorizable_condition): Likewise.
11129 (vectorizable_comparison): Likewise.
11130 (can_vectorize_live_stmts): Likewise.
11131 (vect_analyze_stmt): Likewise.
11132 (vect_transform_stmt): Adjust calls to vectorizable_*.
11133 * tree-vectorizer.c: Include gimple-pretty-print.h.
11134 (dump_stmt_cost): New function.
11136 2018-05-16 Richard Biener <rguenther@suse.de>
11138 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
11139 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
11140 * tree-ssa-dse.c: Include tree-ssa-loop.h.
11141 (check_name): New callback.
11142 (dse_classify_store): Track cycles via a visited bitmap of PHI
11143 defs and simplify handling of in-loop and across loop dead stores
11144 and properly fail for loop-variant refs. Handle byte-tracking with
11145 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
11148 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
11150 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
11151 (vect_get_mask_type_for_stmt): Likewise.
11152 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
11154 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
11155 to determine the statement's vector type and the vector type that
11156 should be used for calculating nunits. Deal with cases in which
11157 the type has to be deferred.
11158 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
11159 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
11160 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
11161 (vect_determine_vf_for_stmt): New functions, split out from...
11162 (vect_determine_vectorization_factor): ...here.
11163 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
11164 (vect_get_mask_type_for_stmt): New functions, split out from
11165 vect_determine_vectorization_factor.
11167 2018-05-16 Richard Biener <rguenther@suse.de>
11169 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11170 verify the [VEC_]COND_EXPR embedded comparison.
11172 2018-05-15 Martin Sebor <msebor@redhat.com>
11174 PR tree-optimization/85753
11175 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11176 RECORD_TYPE in addition to ARRAY_TYPE.
11178 2018-05-15 Martin Sebor <msebor@redhat.com>
11180 PR middle-end/85643
11181 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11183 2018-05-15 Richard Biener <rguenther@suse.de>
11185 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11186 add by_clobber_p one. Change algorithm to collect all defs
11187 representing uses we need to walk and try reducing them to
11188 a single one before failing.
11189 (dse_dom_walker::dse_optimize_stmt): Adjust.
11191 2018-05-13 Mark Wielaard <mark@klomp.org>
11193 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11194 (size_of_loc_descr): Likewise.
11195 (output_loc_operands): Likewise.
11196 (output_loc_operands_raw): Likewise.
11197 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11198 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11199 (hash_loc_operands): Likewise.
11200 (compare_loc_operands): Likewise.
11202 2018-05-14 Mark Wielaard <mark@klomp.org>
11204 * dwarf2out.c (count_index_addrs): New function.
11205 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11207 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11209 PR tree-optimization/83648
11210 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11211 return value as malloc candidate.
11213 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11216 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11217 param as true in call to suggest_attribute.
11219 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11221 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11222 -mreadonly-in-sdata.
11224 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11226 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11228 (aarch64_crypto_aesd_fused): Likewise.
11230 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11232 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11233 (movsi_aarch64): Likewise.
11234 (load_pairsi): Likewise.
11235 (load_pairdi): Likewise.
11236 (store_pairsi): Likewise.
11237 (store_pairdi): Likewise.
11238 (load_pairsf): Likewise.
11239 (load_pairdf): Likewise.
11240 (store_pairsf): Likewise.
11241 (store_pairdf): Likewise.
11242 (zero_extend): Likewise.
11243 (trunc): Swap alternatives.
11244 (fcvt_target): Add '?' to prefer w over r.
11246 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11249 * config/i386/i386.md: Disallow non-commutative arithmetics in
11250 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11251 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11252 in the peephole2 before it.
11254 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11256 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11257 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11258 (ix86_handle_option): Handle -mcldemote.
11259 * config.gcc: New header.
11260 * config/i386/cldemoteintrin.h: New file.
11261 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11262 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11264 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11265 OPTION_MASK_ISA_CLDEMOTE.
11266 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11267 (ix86_valid_target_attribute_inner_p): Ditto.
11268 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11269 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11270 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11271 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11272 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11274 * config/i386/i386.opt: Add -mcldemote.
11275 * config/i386/x86intrin.h: New header.
11276 * doc/invoke.texi: Add -mcldemote.
11278 2018-05-14 Richard Biener <rguenther@suse.de>
11280 * doc/match-and-simplify.texi: Adjust :s documentation.
11282 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11284 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11285 intended memcpy size.
11286 (REORDER_45): Likewise.
11288 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11290 * sort.cc: New file.
11291 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11292 * vec.c (qsort_chk): Use gcc_qsort.
11293 * Makefile.in (OBJS-libcommon): Add sort.o.
11294 (build/sort.o): New target. Use it...
11295 (BUILD_RTL): ... here, and...
11296 (build/gencfn-macros): ... here, and...
11297 (build/genmatch): ... here.
11299 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11300 Chung-Ju Wu <jasonwucj@gmail.com>
11302 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11303 * config/nds32/nds32-graywolf.md: New file.
11304 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11305 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11307 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11308 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11309 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11310 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11311 * config/nds32/pipelines.md: Include n15 settings.
11313 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11314 Chung-Ju Wu <jasonwucj@gmail.com>
11316 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11317 * config/nds32/nds32-n13.md: New file.
11318 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11319 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11321 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11322 * config/nds32/nds32.md (pipeline_model): Add n13.
11323 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11324 * config/nds32/pipelines.md: Include n13 settings.
11326 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11327 Chung-Ju Wu <jasonwucj@gmail.com>
11329 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11330 * config/nds32/nds32-n10.md: New file.
11331 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11332 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11334 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11335 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11336 * config/nds32/nds32.md (pipeline_model): Add n10.
11337 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11338 * config/nds32/pipelines.md: Include n10 settings.
11340 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11341 Kito Cheng <kito.cheng@gmail.com>
11342 Chung-Ju Wu <jasonwucj@gmail.com>
11344 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11345 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11346 Add enum values for DSP extension instructions.
11347 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11349 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11350 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11351 New code iterators.
11352 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11353 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11354 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11355 * config/nds32/nds32-intrinsic.md: Likewise.
11356 * config/nds32/nds32_intrinsic.h: Likewise.
11357 * config/nds32/nds32-md-auxiliary.c: Likewise.
11358 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11359 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11360 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11361 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11362 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11363 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11364 TYPE_DMAC in switch statement.
11365 * config/nds32/nds32.c: New checking and implementation for DSP
11366 extension instructions.
11367 * config/nds32/nds32.h: Likewise.
11368 * config/nds32/nds32.md: Likewise.
11369 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11370 * config/nds32/predicates.md: Implement new predicates for DSP
11373 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11375 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11376 Reformat alternatives and attributes so it is easier to identify
11377 which constraints/attributes go with which instruction.
11378 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11379 (mov<mode>_softfloat32, FMOVE64): Likewise.
11380 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11381 (mov<mode>_softfloat64, FMOVE64): Likewise.
11383 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11385 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11387 (Basic PowerPC Built-in Functions): The new name of the
11388 subsection previously known as "PowerPC Built-in Functions".
11389 (Basic PowerPC Built-in Functions Available on all Configurations):
11391 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11392 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11393 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11394 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11396 2018-05-11 Martin Jambor <mjambor@suse.cz>
11399 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11402 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11405 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11407 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11409 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11410 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11411 (ix86_handle_option): Handle -mwaitpkg.
11412 * config.gcc: New header.
11413 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11414 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11415 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11417 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11418 OPTION_MASK_ISA_WAITPKG.
11419 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11420 (ix86_option_override_internal): Add PTA_WAITPKG.
11421 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11422 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11423 IX86_BUILTIN_TPAUSE.
11424 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11425 __builtin_ia32_umwait and __builtin_ia32_tpause.
11426 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11427 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11428 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11429 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11430 UNSPECV_TPAUSE): New.
11431 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11432 * config/i386/i386.opt: Add -mwaitpkg.
11433 * config/i386/waitpkgintrin.h: New file.
11434 * config/i386/x86intrin.h: New header.
11435 * doc/invoke.texi: Add -mwaitpkg.
11437 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11440 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11442 (cortex-m0): Use armv6s-m isa.
11443 (cortex-m0plus): Likewise.
11444 (cortex-m1): Likewise.
11445 (cortex-m0.small-multiply): Likewise.
11446 (cortex-m0plus.small-multiply): Likewise.
11447 (cortex-m1.small-multiply): Likewise.
11449 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11450 Jakub Jelinek <jakub@redhat.com>
11452 PR tree-optimization/85692
11453 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11454 source permute as well.
11456 2018-05-11 Martin Liska <mliska@suse.cz>
11459 * doc/extend.texi: Document LLVM style format for no_sanitize
11462 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11464 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11465 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11466 (mode_supports_vsx_dform_quad): Likewise.
11467 (mode_supports_vmx_dform): Move these functions to be next to the
11468 other mode_supports functions.
11469 (mode_supports_dq_form): Likewise.
11470 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11471 mode_supports_dq_form.
11472 (reg_offset_addressing_ok_p): Likewise.
11473 (offsettable_ok_by_alignment): Likewise.
11474 (rs6000_legitimate_offset_address_p): Likewise.
11475 (legitimate_lo_sum_address_p): Likewise.
11476 (rs6000_legitimize_address): Likewise.
11477 (rs6000_legitimize_reload_address): Likewise.
11478 (rs6000_secondary_reload_inner): Likewise.
11479 (rs6000_preferred_reload_class): Likewise.
11480 (rs6000_output_move_128bit): Likewise.
11482 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11484 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11485 Generate SImode target register for null target.
11486 <case IX86_BUILTIN_XGETBV>: Ditto.
11487 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11488 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11490 2018-05-10 Carl Love <cel@us.ibm.com>
11492 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11493 dcbtt and dcbtstt if operands[2] is 0.
11495 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11498 * config/i386/sse.md (usadv64qi): New expander.
11500 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11502 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11503 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11504 -maltivec=be support.
11505 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11506 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11507 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11508 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11509 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11510 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11511 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11512 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11513 altivec_vsumsws): Adjust.
11514 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11515 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11516 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11518 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11519 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11520 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11521 (altivec_lve<VI_char>x): Delete expand.
11522 (*altivec_lve<VI_char>x_internal): Rename to...
11523 (altivec_lve<VI_char>x): ... this.
11524 (altivec_lvxl_<mode>): Delete expand.
11525 (*altivec_lvxl_<mode>_internal): Rename to ...
11526 (altivec_lvxl_<mode>): ... this.
11527 (altivec_stvxl_<mode>): Delete expand.
11528 (*altivec_stvxl_<mode>_internal): Rename to ...
11529 (altivec_stvxl_<mode>): ... this.
11530 (altivec_stve<VI_char>x): Delete expand.
11531 (*altivec_stve<VI_char>x_internal): Rename to ...
11532 (altivec_stve<VI_char>x): ... this.
11533 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11534 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11535 reduc_plus_scal_<mode>): Adjust.
11536 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11538 (rs6000_cpu_cpp_builtins): Adjust.
11539 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11540 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11541 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11542 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11543 -maltivec=be support.
11544 (rs6000_split_vec_extract_var): Adjust.
11545 (rs6000_split_v4si_init): Adjust.
11546 (swap_selector_for_mode): Delete.
11547 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11548 altivec_expand_stvex_be): Delete.
11549 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11550 -maltivec=be support.
11551 (rs6000_gimple_fold_builtin): Ditto.
11552 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11554 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11555 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11556 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11557 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11558 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11559 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11560 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11561 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11562 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11563 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11564 anonymous split): Adjust.
11565 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11566 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11568 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11570 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11571 when --with-gxx-include-dir is also specified.
11572 * configure: Regenerate.
11574 2018-05-09 Jim Wilson <jimw@sifive.com>
11577 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11578 * config/riscv/t-withmultilib: New.
11579 * config/riscv/withmultilib.h: New.
11580 * doc/install.texi: Document RISC-V --with-multilib-list support.
11582 2018-05-09 Richard Biener <rguenther@suse.de>
11584 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11586 (vect_bb_vectorization_profitable_p): Adjust. Compute
11587 actual scalar cost using the cost vector and the add_stmt_cost
11590 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11592 PR rtl-optimization/85645
11593 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11594 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11596 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11598 PR rtl-optimization/85645
11599 * shrink-wrap.c (spread_components): Return a boolean saying if
11600 anything was changed.
11601 (try_shrink_wrapping_separate): Iterate spread_components until
11602 nothing changes anymore.
11604 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11606 PR rtl-optimization/85645
11607 * regrename.c (build_def_use): Also kill the chains that include the
11608 destination of a REG_CFA_REGISTER note.
11610 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11612 PR rtl-optimization/85645
11613 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11614 insn that has a REG_CFA_REGISTER note.
11616 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11618 * cfgexpand.c (expand_clobber): New function.
11619 (expand_gimple_stmt_1): Use it.
11620 * tree-vect-stmts.c (vect_clobber_variable): New function,
11622 (vectorizable_simd_clone_call): ...here.
11623 (vectorizable_store): Emit a clobber either side of an
11624 IFN_STORE_LANES sequence.
11625 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11627 2018-05-09 Tom de Vries <tom@codesourcery.com>
11630 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11631 (define_insn "trap_if_false"): Add exit after trap.
11633 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11635 PR rtl-optimization/85638
11636 * bb-reorder.c: Include common/common-target.h.
11637 (create_forwarder_block): New function extracted from...
11638 (fix_up_crossing_landing_pad): ...here. Rename into...
11639 (dw2_fix_up_crossing_landing_pad): ...this.
11640 (sjlj_fix_up_crossing_landing_pad): New function.
11641 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11642 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11643 from both partitions and exit the loop after one iteration.
11645 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11648 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11650 (Basic PowerPC Built-in Functions): The new name of the
11651 subsection previously known as "PowerPC Built-in Functions".
11652 (Basic PowerPC Built-in Functions Available on all Configurations):
11654 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11656 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11658 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11660 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11663 2018-05-08 Jim Wilson <jimw@sifive.com>
11665 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11666 (LD_EMUL_SUFFIX): New.
11667 (LINK_SPEC): Use it.
11669 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11671 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11673 (Basic PowerPC Built-in Functions): The new name of the
11674 subsection previously known as "PowerPC Built-in Functions".
11675 (Basic PowerPC Built-in Functions Available on all Configurations):
11677 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11679 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11681 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11683 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11686 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11689 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11690 after cmpelim optimization.
11692 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
11694 * config.gcc: Support "goldmont".
11695 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11696 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11697 PROCESSOR_GOLDMONT.
11698 * config/i386/i386.c (m_GOLDMONT): Define.
11699 (processor_target_table): Add "goldmont".
11700 (PTA_GOLDMONT): Define.
11701 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11702 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11703 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11704 (fold_builtin_cpu): Add "goldmont".
11705 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11706 (ix86_option_override_internal): Add "goldmont".
11707 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11708 (processor_type): Add PROCESSOR_GOLDMONT.
11709 * config/i386/i386.md: Add CPU "glm".
11710 * config/i386/glm.md: New file.
11711 * config/i386/x86-tune.def: Add m_GOLDMONT.
11712 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11714 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11717 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11719 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11720 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
11721 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
11724 * config/i386/i386.c (ix86_fold_builtin): Handle
11725 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11728 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11729 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11731 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
11734 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11735 (check_arch): Likewise.
11736 (check_fpu): Return the result rather than printing it.
11737 (end arch): Fix operator precedence.
11738 (end cpu): Likewise.
11739 (END): Print the result from check_fpu.
11741 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11742 Alan Hayward <alan.hayward@arm.com>
11743 David Sherwood <david.sherwood@arm.com>
11745 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11746 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11747 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11748 (*fcmuo<mode>_and): New patterns.
11750 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11752 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11753 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11754 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11755 (cmp_op, sve_imm_con): New code attributes.
11756 (SVE_COND_INT_CMP, imm_con): Delete.
11757 (cmp_op): Remove above unspecs from int attribute.
11758 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11760 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
11761 comparison-specific unspecs.
11762 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11763 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11764 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11765 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11766 (*vec_fcm<cmp_op><mode>): Rename to...
11767 (*fcm<cmp_op><mode>): ...this and adjust likewise.
11768 (*vec_fcmuo<mode>): Rename to...
11769 (*fcmuo<mode>): ...this and adjust likewise.
11770 (*pred_fcm<cmp_op><mode>): New pattern.
11771 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11772 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11774 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11776 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11777 (aarch64_emit_sve_predicated_cond): New function.
11778 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11779 (aarch64_emit_unspec_cond_or): Replace with...
11780 (aarch64_emit_sve_or_conds): ...this new function. Use
11781 aarch64_emit_sve_ptrue_op for the individual comparisons and
11782 aarch64_emit_binop to OR them together.
11783 (aarch64_emit_inverted_unspec_cond): Replace with...
11784 (aarch64_emit_sve_inverted_cond): ...this new function. Use
11785 aarch64_emit_sve_ptrue_op for the comparison and
11786 aarch64_emit_unop to invert the result.
11787 (aarch64_expand_sve_vec_cmp_float): Update after the above
11788 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11790 2018-05-07 Nathan Sidwell <nathan@acm.org>
11792 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11793 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11794 (Backwards Compatibility): Likewise.
11796 2018-05-07 Luis Machado <luis.machado@linaro.org>
11800 2018-05-07 Luis Machado <luis.machado@linaro.org>
11802 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11803 <prefetch_dynamic_strides>: New const bool field.
11804 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11805 prefetch_dynamic_strides.
11806 (exynosm1_prefetch_tune): Likewise.
11807 (thunderxt88_prefetch_tune): Likewise.
11808 (thunderx_prefetch_tune): Likewise.
11809 (thunderx2t99_prefetch_tune): Likewise.
11810 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11812 (aarch64_override_options_internal): Update to set
11813 PARAM_PREFETCH_DYNAMIC_STRIDES.
11814 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11815 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11816 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11817 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11818 prefetch-dynamic-strides setting.
11820 2018-05-07 Luis Machado <luis.machado@linaro.org>
11822 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11823 <minimum_stride>: New const int field.
11824 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11825 minimum_stride field.
11826 (exynosm1_prefetch_tune): Likewise.
11827 (thunderxt88_prefetch_tune): Likewise.
11828 (thunderx_prefetch_tune): Likewise.
11829 (thunderx2t99_prefetch_tune): Likewise.
11830 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11831 (aarch64_override_options_internal): Update to set
11832 PARAM_PREFETCH_MINIMUM_STRIDE.
11833 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11834 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11835 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11836 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11837 stride is constant and is below the minimum stride threshold.
11839 2018-05-07 Luis Machado <luis.machado@linaro.org>
11841 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11844 2018-05-07 Luis Machado <luis.machado@linaro.org>
11846 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11847 <prefetch_dynamic_strides>: New const bool field.
11848 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11849 prefetch_dynamic_strides.
11850 (exynosm1_prefetch_tune): Likewise.
11851 (thunderxt88_prefetch_tune): Likewise.
11852 (thunderx_prefetch_tune): Likewise.
11853 (thunderx2t99_prefetch_tune): Likewise.
11854 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11856 (aarch64_override_options_internal): Update to set
11857 PARAM_PREFETCH_DYNAMIC_STRIDES.
11858 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11859 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11860 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11861 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11862 prefetch-dynamic-strides setting.
11864 2018-05-07 Luis Machado <luis.machado@linaro.org>
11866 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11867 <minimum_stride>: New const int field.
11868 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11869 minimum_stride field.
11870 (exynosm1_prefetch_tune): Likewise.
11871 (thunderxt88_prefetch_tune): Likewise.
11872 (thunderx_prefetch_tune): Likewise.
11873 (thunderx2t99_prefetch_tune): Likewise.
11874 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11875 (aarch64_override_options_internal): Update to set
11876 PARAM_PREFETCH_MINIMUM_STRIDE.
11877 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11878 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11879 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11880 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11881 stride is constant and is below the minimum stride threshold.
11883 2018-05-06 Jakub Jelinek <jakub@redhat.com>
11886 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11887 the type is addressable. Don't force op into register if it has
11890 2018-05-05 Roland McGrath <mcgrathr@google.com>
11893 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11894 any section for which we don't know a specific type it should have,
11895 regardless of name. Previously this was done only for the exact
11896 names ".init_array", ".fini_array", and ".preinit_array".
11897 (default_elf_asm_named_section): Add comment about
11898 relationship with default_section_type_flags and SECTION_NOTYPE.
11899 (get_section): Don't consider it a type conflict if one side has
11900 SECTION_NOTYPE and the other doesn't, as long as neither has the
11901 SECTION_BSS et al used in the default_section_type_flags logic.
11903 2018-05-05 Tom de Vries <tom@codesourcery.com>
11906 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11907 (workaround_barsyncs): New function.
11908 (nvptx_reorg): Use workaround_barsyncs.
11909 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11910 (define_expand "nvptx_membar_cta"): New define_expand.
11911 (define_insn "*nvptx_membar_cta"): New insn.
11913 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
11915 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11916 To improve optimization opportunities.
11917 * builtin-types.def: The new needed builtin types for the above.
11919 2018-05-04 Richard Biener <rguenther@suse.de>
11921 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11922 * gimple-ssa-store-merging.c
11923 (imm_store_chain_info::output_merged_store): Remove redundant create,
11924 release split_store vector contents on failure.
11925 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11926 scalar stmt vector on cache hit.
11928 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
11930 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11932 * config.gcc (powerpc-xilinx-eabi*): Remove.
11933 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11935 (fusion_addis_mem_combo_load): Ditto.
11936 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11938 (rs6000_cpu_cpp_builtins): Ditto.
11939 * config/rs6000/rs6000-linux.c
11940 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11941 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11942 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11944 (rs6000_setup_reg_addr_masks): Ditto.
11945 (rs6000_init_hard_regno_mode_ok): Ditto.
11946 (rs6000_option_override_internal): Ditto.
11947 (legitimate_lo_sum_address_p): Ditto.
11948 (rs6000_legitimize_address): Ditto.
11949 (rs6000_legitimize_reload_address): Ditto.
11950 (rs6000_legitimate_address_p): Ditto.
11951 (abi_v4_pass_in_fpr): Ditto.
11952 (setup_incoming_varargs): Ditto.
11953 (rs6000_gimplify_va_arg): Ditto.
11954 (rs6000_split_multireg_move): Ditto.
11955 (rs6000_savres_strategy): Ditto.
11956 (rs6000_emit_prologue_components): Ditto.
11957 (rs6000_emit_epilogue_components): Ditto.
11958 (rs6000_emit_prologue): Ditto.
11959 (rs6000_emit_epilogue): Ditto.
11960 (rs6000_elf_file_end): Ditto.
11961 (rs6000_function_value): Ditto.
11962 (rs6000_libcall_value): Ditto.
11963 * config/rs6000/rs6000.h: Ditto.
11964 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11965 (TARGET_MINMAX): ... this. New.
11966 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11967 * config/rs6000/rs6000.md: Remove Xilinx FP support.
11968 (*movsi_internal1_single): Delete.
11969 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11970 mfpu=, mxilinx-fpu): Delete.
11971 * config/rs6000/singlefp.h: Delete.
11972 * config/rs6000/sysv4.h: Remove Xilinx FP support.
11973 * config/rs6000/t-rs6000: Ditto.
11974 * config/rs6000/t-xilinx: Delete.
11975 * config/rs6000/titan.md: Adjust for fp_type removal.
11976 * config/rs6000/vsx.md: Remove Xilinx FP support.
11977 (VStype_simple): Delete.
11978 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11979 * config/rs6000/xfpu.h: Delete.
11980 * config/rs6000/xfpu.md: Delete.
11981 * config/rs6000/xilinx.h: Delete.
11982 * config/rs6000/xilinx.opt: Delete.
11983 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11984 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11986 2018-05-04 Tom de Vries <tom@codesourcery.com>
11989 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11992 2018-05-04 Richard Biener <rguenther@suse.de>
11994 PR middle-end/85627
11995 * tree-complex.c (update_complex_assignment): We are always in SSA form.
11996 (expand_complex_div_wide): Likewise.
11997 (expand_complex_operations_1): Likewise.
11998 (expand_complex_libcall): Preserve EH info of the original stmt.
11999 (tree_lower_complex): Handle removed blocks.
12000 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
12001 on complex multiplication and division libcall builtins.
12003 2018-05-04 Richard Biener <rguenther@suse.de>
12005 PR middle-end/85574
12006 * fold-const.c (negate_expr_p): Restrict negation of operand
12007 zero of a division to when we know that can happen without
12009 (fold_negate_expr_1): Likewise.
12011 2018-05-04 Jakub Jelinek <jakub@redhat.com>
12014 * real.h (real_nextafter): Declare.
12015 * real.c (real_nextafter): New function.
12016 * fold-const-call.c (fold_const_nextafter): New function.
12017 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
12018 CASE_CFN_NEXTTOWARD.
12019 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
12020 even when arg1_mode is different from arg0_mode.
12022 2018-05-03 Nathan Sidwell <nathan@acm.org>
12024 * doc/extend.texi (Deprecated Features): Remove
12025 -ffriend-injection.
12026 (Backwards Compatibility): Likewise.
12027 * doc/invoke.texi (C++ Language Options): Likewise.
12028 (C++ Dialect Options): Likewise.
12030 2018-05-03 Jakub Jelinek <jakub@redhat.com>
12033 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
12034 _mm512_mask_mullox_epi64): New intrinsics.
12036 2018-05-03 Tom de Vries <tom@codesourcery.com>
12039 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12040 dump files): Add offload-tree.
12042 2018-05-03 Richard Biener <rguenther@suse.de>
12044 PR tree-optimization/85615
12045 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
12046 to loops not nested in BBs loop father to avoid creating multi-entry
12049 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12051 PR tree-optimization/70291
12052 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
12053 arguments. Change return type to tree. Emit libcall as a new
12054 statement rather than replacing existing one when inplace_p is true.
12055 (expand_complex_multiplication_components): New function.
12056 (expand_complex_multiplication): Expand floating-point complex
12057 multiplication using the above.
12058 (expand_complex_division): Rename inner_type parameter to type.
12059 Update expand_complex_libcall call-site.
12060 (expand_complex_operations_1): Update expand_complex_multiplication
12061 and expand_complex_division call-sites.
12063 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12066 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12067 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12068 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
12069 the highest significant bit of the shift count mask is clear. In
12070 check whether and[sq]i3 is needed verify that all significant bits
12071 of the shift count other than the highest are set.
12073 2018-05-02 Tom de Vries <tom@codesourcery.com>
12076 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
12077 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
12078 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
12079 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
12080 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
12081 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
12082 __builtin_goacc_parlevel_size.
12084 2018-05-02 Richard Biener <rguenther@suse.de>
12086 PR tree-optimization/85597
12087 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
12088 do not use split vect_get_vec_defs call but call vect_get_slp_defs
12091 2018-05-02 Tom de Vries <tom@codesourcery.com>
12094 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12095 dump files): Add ltrans-tree.
12097 2018-05-02 Tom de Vries <tom@codesourcery.com>
12100 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
12101 dump files): Add wpa-ipa.
12103 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
12105 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
12106 powerpc*-*-linux*paired* target.
12107 * config/rs6000/750cl.h: Delete.
12108 * config/rs6000/paired.h: Delete.
12109 * config/rs6000/paired.md: Delete.
12110 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
12112 * config/rs6000/rs6000-builtin.def: Remove paired float support.
12113 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
12114 comment. Remove paired float support.
12115 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
12116 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
12118 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
12119 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
12121 * config/rs6000/rs6000.c: Remove paired float support.
12122 (paired_expand_vector_init, paired_expand_vector_move,
12123 paired_emit_vector_compare, paired_emit_vector_cond_expr,
12124 (paired_expand_lv_builtin, paired_expand_stv_builtin,
12125 paired_expand_builtin, paired_expand_predicate_builtin,
12126 paired_init_builtins): Delete.
12127 * config/rs6000/rs6000.h: Remove paired float support.
12128 * config/rs6000/rs6000.md: Remove paired float support.
12129 (move_from_CR_ov_bit): Delete.
12130 * config/rs6000/rs6000.opt (mpaired): Delete.
12131 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
12132 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
12134 2018-05-02 Richard Biener <rguenther@suse.de>
12136 PR middle-end/85567
12137 * gimplify.c (gimplify_save_expr): When in SSA form allow
12138 SAVE_EXPRs to compute to SSA vars.
12140 2018-05-02 Jakub Jelinek <jakub@redhat.com>
12143 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
12144 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
12145 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
12146 clobber operands[2], instead use a new pseudo. Formatting fixes.
12148 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
12150 PR tree-optimization/85586
12151 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
12152 exit early for statements in the same group if the accesses are
12155 2018-05-02 Tom de Vries <tom@codesourcery.com>
12158 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
12161 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
12163 PR tree-optimization/85143
12164 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
12166 2018-05-01 Tom de Vries <tom@codesourcery.com>
12169 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12170 not found" error message.
12172 2018-05-01 Tom de Vries <tom@codesourcery.com>
12175 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12176 * vec.c (test_ordered_remove_if): New function.
12177 (vec_c_tests): Call test_ordered_remove_if.
12178 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12179 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12180 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12181 VEC_ORDERED_REMOVE_IF.
12183 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12185 PR tree-optimization/82665
12186 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12187 pointer subtraction where arguments come from a memchr call.
12189 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12191 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12192 --push-state --as-needed and --pop-state instead of --as-needed and
12193 --no-as-needed if ld supports it.
12194 * configure: Regenerated.
12197 * doc/install.texi2html: Replace _002d with - and _002a with * in
12198 generated html files using sed.
12200 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12203 * gcc-rich-location.c (blank_line_before_p): New function.
12204 (use_new_line): New function.
12205 (gcc_rich_location::add_fixit_insert_formatted): New function.
12206 * gcc-rich-location.h
12207 (gcc_rich_location::add_fixit_insert_formatted): New function.
12209 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12211 * selftest.c (assert_streq): Rename "expected" and "actual" to
12212 "val1" and "val2". Extend NULL-handling to cover both inputs
12213 symmetrically, while still requiring both to be non-NULL for a pass.
12214 * selftest.h (assert_streq): Rename "expected" and "actual" to
12216 (ASSERT_EQ): Likewise.
12217 (ASSERT_EQ_AT): Likewise.
12218 (ASSERT_KNOWN_EQ): Likewise.
12219 (ASSERT_KNOWN_EQ_AT): Likewise.
12220 (ASSERT_NE): Likewise.
12221 (ASSERT_MAYBE_NE): Likewise.
12222 (ASSERT_MAYBE_NE_AT): Likewise.
12223 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12224 the assertion to pass.
12225 (ASSERT_STREQ_AT): Likewise.
12227 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12229 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12230 interaction with -pie.
12232 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12234 * selftest.h: Fix alphabetization of per-source-file selftest
12237 2018-04-30 Jason Merrill <jason@redhat.com>
12239 PR c++/61982 - dead stores to destroyed objects.
12240 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12243 2018-04-30 Jason Merrill <jason@redhat.com>
12245 * tree.c (build_clobber): New.
12246 * tree.h: Declare it.
12247 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12249 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12251 * diagnostic-show-locus.c (layout::layout): Update for
12252 location_get_source_line returning a char_span.
12253 (struct char_span): Move to input.h.
12254 (struct correction): Update for fields in char_span becoming
12256 (struct source_line): Update for location_get_source_line
12257 returning a char_span.
12258 (layout::print_line): Likewise.
12259 * edit-context.c (edited_file::print_content): Likewise.
12260 (edited_file::print_diff_hunk): Likewise.
12261 (edited_file::print_run_of_changed_lines): Likewise.
12262 (edited_file::get_num_lines): Likewise.
12263 (edited_line::edited_line): Likewise.
12264 * final.c (asm_show_source): Likewise.
12265 * input.c (location_get_source_line): Convert return type
12266 from const char * to char_span, losing the final "line_len"
12268 (dump_location_info): Update for the above.
12269 (get_substring_ranges_for_loc): Likewise. Use a char_span
12270 when handling the literal within the line.
12271 (test_reading_source_line): Update for location_get_source_line
12272 returning a char_span.
12273 * input.h (class char_span): Move here from
12274 diagnostic-show-locus.c, converting from a struct to a class.
12275 Make data members private.
12276 (char_span::operator bool): New.
12277 (char_span::length): New.
12278 (char_span::get_buffer): New.
12279 (char_span::operator[]): New.
12280 (char_span::subspan): Make const.
12281 (char_span::xstrdup): New.
12282 (location_get_source_line): Convert return type from const char *
12283 to char_span, losing the final "line_size" param.
12285 2018-04-30 Jan Hubicka <jh@suse.cz>
12287 * lto-wrapper.c (ltrans_priorities): New static var.
12288 (cmp_priority): New.
12289 (run_gcc): Read priorities and if doing parallel build order
12290 the Makefile by them.
12292 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12294 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12296 2018-04-30 Richard Biener <rguenther@suse.de>
12298 * tree-cfg.c (verify_address): Remove base argument, add
12299 flag whether to check TREE_ADDRESSABLE and do that.
12300 (verify_expr): Remove.
12301 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12302 (verify_gimple_assign_single): Likewise.
12303 (verify_gimple_switch): Likewise.
12304 (verify_expr_location_1): Dereference tp once. Add (disabled)
12305 piece from verify_expr.
12306 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12308 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12310 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12312 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12314 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12315 (small_data_pattern): Likewise.
12316 (arc_rewrite_small_data): Likewise.
12317 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12318 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12319 (get_symbol_alignment): New function.
12320 (legitimate_small_data_address_p): Likewise.
12321 (legitimate_scaled_address): Update, call
12322 legitimate_small_data_address_p.
12323 (output_sdata): New static variable.
12324 (arc_print_operand): Update how we handle small data operands.
12325 (arc_print_operand_address): Likewise.
12326 (arc_legitimate_address_p): Update, use
12327 legitimate_small_data_address_p.
12328 (arc_rewrite_small_data_p): Remove.
12329 (arc_rewrite_small_data_1): Likewise.
12330 (arc_rewrite_small_data): Likewise.
12331 (small_data_pattern): Likewise.
12332 (compact_sda_memory_operand): Update to use
12333 legitimate_small_data_address_p and get_symbol_alignment.
12334 (prepare_move_operands): Don't rewite sdata pattern.
12335 (prepare_extend_operands): Remove.
12336 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12338 (zero_extendqisi2): Likewise.
12339 (zero_extendhisi2): Likewise.
12340 (extendqihi2): Likewise.
12341 (extendqisi2): Likewise.
12342 (extendhisi2): Likewise.
12343 (addsi3): Likewise.
12344 (subsi3): Likewise.
12345 (andsi3): Likewise.
12346 * config/arc/constraints.md (Usd): Change it to memory constraint.
12348 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12350 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12351 as source of std instructions.
12352 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12353 allow 6-bit constants as source for store instructions.
12354 (movdi_insn): Update instruction pattern to allow 6-bit constants
12355 as source for store instructions.
12357 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12359 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12361 2018-04-30 Nathan Sidwell <nathan@acm.org>
12362 Sandra Loosemore <sandra@codesourcery.com>
12364 * dumpfile.c (dump_open): Allow '-' for stdout.
12365 * doc/invoke.texi (Developer Options): Document dump filename
12366 determination early. Document stdin/stdout selection.
12368 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12370 Microblaze Target: PIC data text relative
12372 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12373 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12375 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12376 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12377 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12378 New addressing mode for data-text relative position indepenedent code.
12379 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12380 'ADDRESS_SYMBOLIC_TXT_REL'.
12381 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12382 (microblaze_legitimate_pic_operand): Exclude function calls from
12383 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12384 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12386 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12387 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12388 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12389 for 'address + offset'.
12390 (microblaze_expand_prologue): Add new function prologue call for
12392 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12393 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12394 table in case of TARGET_PIC_DATA_TEXT_REL.
12395 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12396 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12397 Add new macros 'UNSPEC_TEXT',
12398 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12399 + exclude function calls from 'UNSPEC_PLT' in case of data text
12401 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12402 new target hook for generating address diff vector tables in case of
12404 * doc/tm.texi : Regenerate.
12405 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12406 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12407 of addr diff vector generation.
12408 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12409 target hook definition.
12410 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12411 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12412 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12413 option for data text relative.
12415 2018-04-30 Richard Biener <rguenther@suse.de>
12417 * tree-chrec.h (evolution_function_is_constant_p): Remove
12419 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12421 2018-04-30 Richard Biener <rguenther@suse.de>
12424 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12426 2018-04-30 Richard Biener <rguenther@suse.de>
12428 PR tree-optimization/28364
12429 PR tree-optimization/85275
12430 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12431 copying first exit test.
12433 2018-04-28 Mark Wielaard <mark@klomp.org>
12435 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12436 dwarf_version >= 5.
12437 (dwarf_AT): Handle DW_AT_addr_base.
12438 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12440 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12443 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12444 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12445 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12446 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12448 2018-04-28 Richard Biener <rguenther@suse.de>
12450 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12451 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12452 to reflect use. Only add interesting stmts.
12454 2018-04-27 Martin Jambor <mjambor@suse.cz>
12457 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12458 the jump function allows for passing through aggregate values.
12460 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12462 * input.h (in_system_header_at): Convert from macro to inline
12464 (from_macro_expansion_at): Likewise.
12465 (from_macro_definition_at): Likewise.
12467 2018-04-27 Jeff Law <law@redhat.com>
12469 * config.gcc: Mark tile* targets as deprecated/obsolete.
12471 2018-04-27 Richard Biener <rguenther@suse.de>
12473 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12476 2018-04-27 Richard Biener <rguenther@suse.de>
12478 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12480 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12482 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12483 with Yd constraint. Set "preferred_for_speed" attribute from
12484 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12485 with Yd constraint.
12486 (*movdi_internal): Ditto.
12487 (movti_interunit splitters): Remove
12488 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12489 (movdi_interunit splitters): Ditto.
12490 * config/i386/constraints.md (Ye): Remove.
12491 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12493 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12496 * config/aarch64/constraints.md (Usg): Limit to 31.
12497 (Usj): Limit to 63.
12499 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12501 PR tree-optimization/85529
12502 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12503 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12504 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12505 zero extension or masking of the MSB bit.
12506 (optimize_range_tests): Add FIRST_BB argument, pass it through
12507 to optimize_range_tests_var_bound.
12508 (maybe_optimize_range_tests, reassociate_bb): Adjust
12509 optimize_range_tests callers.
12511 2018-04-26 Richard Biener <rguenther@suse.de>
12512 Jakub Jelinek <jakub@redhat.com>
12514 * cgraph.h (symbol_table): Just declare debug method here.
12515 * symtab.c (symbol_table::debug): Define.
12517 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12519 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12521 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12523 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12524 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12525 (*movdi_internal): Substitute Yi and Yj constraint with x
12526 and Ym and Yn constraint with y constraint. Update "isa"
12527 attribute and set "preferred_for_speed" attribute from
12528 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12529 (*movsi_internal): Ditto.
12530 (*movdf_internal): Ditto.
12531 (*movsf_internal): Ditto.
12532 (*zero_extendsidi2): Ditto.
12533 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12534 (sse2_loadld): Ditto.
12535 (*vec_extract<ssevecmodelower>_0): Ditto.
12536 (*vec_extractv4si_0_zext_sse4): Ditto.
12537 (vec_concatv2di): Ditto.
12538 (*vec_dup<mode>): Ditto.
12539 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12540 * config/i386/constraints.md (Yi): Remove.
12545 2018-04-26 Nathan Sidwell <nathan@acm.org>
12547 * dumpfile.c (dump_open): New.
12548 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12549 (dump_finish): Detect stdio/stderr by value not name.
12551 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12553 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12555 2018-04-26 Tom de Vries <tom@codesourcery.com>
12558 * config/nvptx/nvptx.c (verify_neutering_jumps)
12559 (verify_neutering_labels): New function
12560 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12562 2018-04-26 Tom de Vries <tom@codesourcery.com>
12565 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12566 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12569 2018-04-26 Richard Biener <rguenther@suse.de>
12570 Tom de Vries <tom@codesourcery.com>
12573 * lto-streamer-out.c (output_function): Fixup loops if required to match
12574 discovery done in the reader.
12576 2018-04-26 Richard Biener <rguenther@suse.de>
12578 PR tree-optimization/85116
12579 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12580 have a loop exit from the single latch predecessor. Remove
12581 case of header with just condition.
12582 (ch_base::copy_headers): Exclude infinite loops from any
12584 (pass_ch::execute): Record exits.
12586 2018-04-26 Richard Biener <rguenther@suse.de>
12588 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12589 prologue cost vector and pass it to vect_get_load_cost.
12590 (vect_get_peeling_costs_all_drs): Likewise.
12591 (vect_peeling_hash_get_lowest_cost): Likewise.
12592 (vect_enhance_data_refs_alignment): Likewise.
12594 2018-04-26 Richard Biener <rguenther@suse.de>
12596 PR middle-end/85450
12597 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12598 checking of integer<->pointer conversions.
12599 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12600 sign-/zero-extending pointer types.
12601 (expand_omp_for_static_chunk): Likewise.
12603 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12604 Jean Lee <xiaoyur347@gmail.com>
12606 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12607 (TARGET_ASAN_SHADOW_OFFSET): Define.
12608 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12609 true for -fsanitize=address.
12611 2018-04-25 Mark Wielaard <mark@klomp.org>
12613 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12616 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12618 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12619 than "alu", remove explicit "memory" and "imm_disp" attributes.
12620 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12622 PR middle-end/85414
12623 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12624 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12625 gen_lowpart_no_emit.
12627 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12630 * config/i386/i386.c (ix86_expand_builtin): Change memory
12631 operand to XI, extend p0 to Pmode.
12632 * config/i386/i386.md: Change unspec volatile and operand
12633 1 mode to XI, change operand 0 mode to P.
12635 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12637 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12638 GET_MODE_MASK before any checking.
12639 (nds32_can_use_bset_p): Likewise.
12640 (nds32_can_use_btgl_p): Likewise.
12642 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12644 * config/nds32/nds32-doubleword.md: New define_split pattern for
12645 illegal register number.
12647 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12649 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12651 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12653 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12655 2018-04-25 Richard Biener <rguenther@suse.de>
12657 * lto-streamer.h (LTO_major_version): Bump to 8.
12659 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12661 * BASE-VER: Set to 9.0.0.
12663 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12665 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12666 in __abskf2 and __powikf2.
12668 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12671 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12672 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12673 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12674 Use the above on operand 2. Reindent.
12675 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12677 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12680 * common/config/i386/i386-common.c (ix86_handle_option): Don't
12682 * config/i386/i386.opt (mcet): Removed.
12683 * doc/install.texi: Remove -mcet documentation.
12684 * doc/invoke.texi: Likewise.
12686 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12689 * doc/install.texi: Remove -mcet from bootstrap-cet.
12691 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12694 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12695 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12699 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12700 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12701 containing a CONST_VECTOR.
12703 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
12705 * doc/install.texi: Update newlib dependency for nvptx.
12707 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12710 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12711 instead of INTVAL when shifting x left.
12713 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
12715 PR tree-optimization/85478
12716 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12717 vect_grouped_store_supported for single element vectors.
12719 2018-04-24 Richard Biener <rguenther@suse.de>
12722 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12723 load cost increase to the case of non-constant step.
12725 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12728 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12729 destination if any_malformed_asm.
12731 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
12733 PR middle-end/85496
12734 * expr.c (store_field): In the bitfield case, if the value comes from
12735 a function call and is returned in registers by means of a PARALLEL,
12736 do not change the mode of the temporary unless BLKmode and VOIDmode.
12738 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
12740 PR rtl-optimization/85423
12741 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12742 dependencies to debug insns when the previous insn is non-debug.
12744 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12746 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12747 enums into a single definition.
12748 (fls): Fix predicates and printing.
12751 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12753 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12754 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12755 and short u6 immediate.
12756 (check_if_valid_sleep_operand): Remove.
12757 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12759 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12761 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12762 flag_always_save_lp condition.
12763 * config/nds32/nds32.opt (malways-save-lp): New option.
12765 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12767 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12768 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12769 * config/nds32/nds32.h
12770 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12771 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12773 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12775 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12776 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12778 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12779 Chung-Ju Wu <jasonwucj@gmail.com>
12781 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12783 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12784 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12786 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12788 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12790 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12792 * config/nds32/nds32-protos.h (nds32_data_alignment,
12793 nds32_local_alignment): Declare.
12794 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12795 nds32_local_alignment): New functions.
12796 (TARGET_CONSTANT_ALIGNMENT): Define.
12797 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12799 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12801 * config/nds32/nds32.c
12802 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12803 (TARGET_MODES_TIEABLE_P): Likewise.
12805 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12807 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12808 level Ofast and Og.
12810 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12811 Chung-Ju Wu <jasonwucj@gmail.com>
12813 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12814 for unaligned access.
12815 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12817 * config/nds32/nds32-intrinsic.md: Likewise.
12818 * config/nds32/nds32_intrinsic.h: Likewise.
12819 * config/nds32/nds32.h (nds32_builtins): Likewise.
12820 * config/nds32/nds32.opt (munaligned-access): New option.
12821 * config/nds32/nds32.c (nds32_asm_file_start): Display
12822 flag_unaligned_access status.
12824 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12826 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12827 -mno-relax is present.
12828 * config/riscv/linux.h (LINK_SPEC): Ditto.
12830 2018-04-20 Martin Sebor <msebor@redhat.com>
12833 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12835 (gimple_fold_builtin_stxcpy_chk): Same.
12836 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12838 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12841 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12842 __powikf2 when long double is IEEE 128-bit.
12844 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12846 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12847 step to make sure stack always aligned.
12849 2018-04-20 Carl Love <cel@us.ibm.com>
12852 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12853 size check for arg0.
12855 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
12856 Tom de Vries <tom@codesourcery.com>
12859 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12860 Emit insns for calls too.
12861 (nvptx_find_par): Always look for worker-level predecessor insn.
12862 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
12864 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12865 (nvptx_process_pars): Propagate frames for calls.
12867 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
12870 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12872 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12873 (ix86_handle_option): Don't handle OPT_mibt.
12874 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12876 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12878 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12879 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12880 (ix86_target_macros): Define __CET__ with flag_cf_protection
12881 for -fcf-protection.
12882 * config/i386/i386.c (isa2_opts): Remove -mibt.
12883 * config/i386/i386.h (TARGET_IBT): Removed.
12884 (TARGET_IBT_P): Likewise.
12885 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12886 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12887 * config/i386/i386.opt (mcet): Update help message.
12888 (mshstk): Likewise.
12890 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
12891 -mcet as an alias for -mshstk.
12893 2018-04-20 Richard Biener <rguenther@suse.de>
12895 PR middle-end/85475
12896 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12897 complexity by forcing a single use of the multiply operand.
12899 2018-04-20 Martin Jambor <mjambor@suse.cz>
12902 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12903 recursion dependency to only apply to non-clones.
12905 2018-04-20 Martin Jambor <mjambor@suse.cz>
12908 * ipa-cp.c (create_specialized_node): Check that clones of
12909 self-recursive edges exist during IPA-CP.
12911 2018-04-19 Toon Moene <toon@moene.org>
12913 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12916 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12918 PR tree-optimization/85467
12919 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12920 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
12921 VECTOR_CST element to type.
12923 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12926 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12927 * config/i386/i386.md (builtin_setjmp_setup): Removed.
12928 (builtin_longjmp): Likewise.
12929 (save_stack_nonlocal): New pattern.
12930 (restore_stack_nonlocal): Likewise.
12932 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12935 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12936 Replace ASM_OUTPUT_LABEL with fprintf.
12938 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12941 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12942 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12943 * config/i386/i386-c.c (ix86_target_macros_internal): Also
12944 define __IBT__ and __SHSTK__ for -fcf-protection.
12945 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12947 (ix86_trampoline_init): Likewise.
12948 (x86_output_mi_thunk): Likewise.
12949 (ix86_notrack_prefixed_insn_p): Likewise.
12950 (ix86_option_override_internal): Don't disallow -fcf-protection.
12951 * config/i386/i386.md (rdssp<mode>): Also enable for
12953 (incssp<mode>): Likewise.
12954 (nop_endbr): Likewise.
12955 * config/i386/i386.opt (mcet): Change help message to built-in
12958 (mshstk): Likewise.
12959 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12960 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
12961 enable CET built-in functions.
12963 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
12965 * common/config/i386/i386-common.c
12966 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12967 OPTION_MASK_ISA_MOVDIRI_UNSET,
12968 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12969 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12970 * config.gcc (movdirintrin.h): New header.
12971 * config/i386/cpuid.h (bit_MOVDIRI,
12972 bit_MOVDIR64B): New bits.
12973 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12975 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12976 (VOID, PVOID, PCVOID)): New function types.
12977 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12978 __builtin_ia32_directstoreu_u64,
12979 __builtin_ia32_movdir64b): New builtins.
12980 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12981 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12983 (ix86_valid_target_attribute_inner_p): Ditto.
12984 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12985 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12986 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12987 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12988 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12989 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12990 (movdiri<mode>, movdir64b_<mode>): New.
12991 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12992 * config/i386/immintrin.h: Include movdirintrin.h.
12993 * config/i386/movdirintrin.h: New file.
12994 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12996 2018-04-19 Richard Biener <rguenther@suse.de>
12998 PR middle-end/85455
12999 * cfg.c (clear_bb_flags): When loop state says we have
13000 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
13002 2018-04-19 Richard Biener <rguenther@suse.de>
13004 PR tree-optimization/84737
13005 * tree-vect-data-refs.c (vect_copy_ref_info): New function
13006 copying restrict info.
13007 (vect_setup_realignment): Use it.
13008 * tree-vectorizer.h (vect_copy_ref_info): Declare.
13009 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
13010 the first DR to all generated stores.
13011 (vectorizable_load): Likewise for loads.
13013 2018-04-19 Jakub Jelinek <jakub@redhat.com>
13015 PR tree-optimization/85446
13016 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
13017 the integral and pointer types to have the same precision.
13019 * doc/install.texi: Document --disable-cet being the default and
13022 2018-04-18 Martin Liska <mliska@suse.cz>
13024 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
13027 2018-04-18 Martin Liska <mliska@suse.cz>
13030 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
13033 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
13034 arguments if they are comparable.
13036 2018-04-18 Martin Liska <mliska@suse.cz>
13039 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
13042 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
13045 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
13048 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
13049 ENDBR after calling __morestack.
13051 2018-04-18 David Malcolm <dmalcolm@redhat.com>
13054 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
13055 by using gcc_base_ver to generate a gcc_driver_version, and use
13056 it when generating GCC_DRIVER_NAME.
13057 * configure: Regenerate.
13059 2018-04-18 Jakub Jelinek <jakub@redhat.com>
13062 * config.gcc: Obsolete powerpc*-*-*spe*.
13064 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13067 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
13068 (stabstr_D): Change type of unum from unsigned int to
13069 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
13072 2018-04-17 Jim Wilson <jimw@sifive.com>
13075 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
13076 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
13077 Set arg_pointer_offset after using pretend_args_size.
13079 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13081 PR rtl-optimization/85431
13082 * dse.c (record_store): Ignore zero width stores.
13085 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
13086 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
13087 __builtin_stack_restore rather than after it.
13088 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
13089 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
13090 argument instead of virtual_dynamic_stack_rtx.
13092 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
13094 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
13096 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13097 Add note to error message to explain internal mapping of overloaded
13098 built-in function name to non-overloaded built-in function name.
13099 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
13102 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
13105 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
13106 where the inputs overlap with the output.
13108 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13110 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
13111 (=v, v) alternative and explicit "memory" attribute.
13112 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
13113 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13115 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
13116 "sselog1" type instead of "sselog".
13117 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
13118 "sselog". Remove explicit "memory" attribute.
13119 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
13120 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13122 (vec_extract_hi_v32hi): Merge all alternatives into one, use
13123 "sselog1" type instead of "sselog". Remove explicit "memory"
13125 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
13126 use "sselog1" type instead of "sselog". Remove explicit "memory"
13128 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
13129 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
13131 (vec_extract_hi_v64qi): Merge all alternatives into one, use
13132 "sselog1" type instead of "sselog". Remove explicit "memory"
13134 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
13135 use "sselog1" type instead of "sselog". Remove explicit "memory"
13139 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
13141 PR middle-end/85414
13142 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
13145 2018-04-17 Martin Jambor <mjambor@suse.cz>
13148 * ipa-cp.c (create_specialized_node): Call
13149 expand_all_artificial_thunks if necessary.
13151 2018-04-17 Martin Liska <mliska@suse.cz>
13154 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
13155 in message, remote space in between '_G' and '('.
13157 2018-04-17 Jakub Jelinek <jakub@redhat.com>
13160 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
13161 avx512f_vmcmp<mode>3<round_saeonly_name>,
13162 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
13163 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
13164 avx512f_rndscale<mode><round_saeonly_name>,
13165 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
13166 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
13167 Use %<iptr>2 instead of %2 for -masm=intel.
13168 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
13169 avx512f_vcvttss2usi<round_saeonly_name>,
13170 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13172 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13173 avx512f_vcvttsd2usi<round_saeonly_name>,
13174 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13175 Use %q1 instead of %1 for -masm=intel.
13176 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13177 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13178 of %3 for -masm=intel.
13179 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13181 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13183 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13185 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13186 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13188 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13190 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13191 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13192 %g1 and one with %0 and %1.
13193 (avx512er_vmrcp28<mode><round_saeonly_name>,
13194 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13195 %1 for -masm=intel.
13196 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13197 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13198 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13199 of %0 and %{%4%} for -masm=intel.
13200 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13201 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13202 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13203 order of %0 and %{%5%}%{z%} for -masm=intel.
13205 2018-04-17 Jan Hubicka <jh@suse.cz>
13208 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13210 2018-04-17 Martin Liska <mliska@suse.cz>
13213 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13214 for target_clone error message. Make default implementation
13215 clone to be a local declaration.
13216 (separate_attrs): Add new argument and check for an empty
13218 (expand_target_clones): Handle it.
13219 (ipa_target_clone): Make redirection just for target_clones
13222 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13223 Tom de Vries <tom@codesourcery.com>
13225 PR middle-end/84955
13226 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13227 tiled basic blocks without omp continue statements.
13229 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13232 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13233 vec_extract expression as having side effects to make sure it gets
13236 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13239 * config/i386/i386.c (get_builtin_code_for_version): Check
13242 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13245 * config.gcc: Support "skylake".
13246 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13248 * config/i386/i386.c (m_SKYLAKE): Define.
13249 (processor_target_table): Add "skylake".
13250 (ix86_option_override_internal): Add "skylake".
13251 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13252 PROCESSOR_CANNONLAKE.
13253 (get_builtin_code_for_version): Fix priority for
13254 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13255 PROCESSOR_SKYLAKE-AVX512.
13256 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13257 (processor_type): Add PROCESSOR_SKYLAKE.
13259 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13260 Jason Merrill <jason@redhat.com>
13263 * convert.c (convert_to_integer_1): Use direct recursion for
13264 enumeral types and types with a precision less than the number
13265 of bits in their mode.
13267 2018-04-16 Julia Koval <julia.koval@intel.com>
13270 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13271 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13273 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13276 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13277 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13278 and -mno-direct-move.
13280 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13283 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13284 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13285 Ensure negative shifts result in {0}.
13287 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13289 PR rtl-optimization/79916
13290 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13291 regs (if any) to define how to gnerate SD moves when LRA is in
13294 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13296 PR rtl-optimization/85393
13297 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13298 * except.c (expand_dw2_landing_pad_for_region): Make static.
13299 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13300 a label and unconditional jump to old_bb, rather than
13301 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13304 PR rtl-optimization/85376
13305 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13306 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13307 instead of a specific value.
13309 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13310 Bin Cheng <bin.cheng@arm.com>
13312 PR tree-optimization/82965
13313 PR tree-optimization/83991
13314 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13315 by_profile_only parameter.
13316 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13317 information if the loop was predicted to iterate too many times.
13318 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13320 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13323 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13326 2018-04-13 Martin Liska <mliska@suse.cz>
13327 Jakub Jelinek <jakub@redhat.com>
13329 PR middle-end/81657
13330 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13331 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13332 * builtins.c (expand_builtin_memory_copy_args): Use
13333 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13334 handle dest_addr == pc_rtx.
13336 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13339 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13340 asked to not generate direct moves.
13341 (fix_trunc<mode>si2_stfiwx): Similar.
13342 (fix_trunc<mode>si2_internal): Similar.
13344 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13347 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13348 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13349 lookup if dest in some wider mode is known to be const0_rtx and
13350 if so, record permanent equivalence for it to be ZERO_EXTEND of
13351 the narrower mode destination.
13353 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13355 * lto-streamer-out.c (output_function): Revert 259346.
13356 * omp-expand.c (expand_oacc_for): Likewise.
13358 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13360 PR rtl-optimization/85354
13361 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13362 * sel-sched.c (sel_global_init): ... here.
13364 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13367 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13368 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13369 mode for PE-COFF targets.
13370 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13371 (i386_pe_asm_lto_end): Likewise.
13372 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13373 (TARGET_ASM_LTO_END): Likewise.
13374 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13375 (i386_pe_asm_lto_start): New function.
13376 (i386_pe_asm_lto_end): Likewise.
13378 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13379 Richard Biener <rguenther@suse.de>
13381 PR middle-end/84955
13382 * lto-streamer-out.c (output_function): Fix CFG loop state before
13384 * omp-expand.c (expand_oacc_for): Handle calls to internal
13385 functions like regular functions.
13387 2018-04-12 Richard Biener <rguenther@suse.de>
13390 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13391 for the early LTO debug to properly generate references to it
13392 during DIE emission. Do not re-use that for the skeleton for
13394 (dwarf2out_early_finish): Likewise.
13396 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13399 * config/i386/sse.md
13400 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13401 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13402 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13403 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13404 and output is a reg, avoid creating invalid lowpart subreg, but
13405 instead split into a 512-bit move. Don't split if not AVX512VL,
13406 input is xmm16+ reg and output is a mem.
13407 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13408 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13409 xmm16+ reg and output is a mem.
13411 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13413 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13414 also for flag_dwarf2_cfi_asm.
13416 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13418 PR rtl-optimization/85342
13419 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13420 a bool scalar var inside of the loop instead. Don't try to update
13421 recog_data.operand after failed apply_change_group.
13423 2018-04-12 Tom de Vries <tom@codesourcery.com>
13426 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13427 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13428 array with flexible array member as array without given dimension.
13429 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13430 argument for undefined param to true.
13432 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13435 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13436 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13437 from PowerPC section.
13438 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13439 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13440 help text that is too long.
13441 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13442 help text that is too long.
13443 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13444 help text that is too long.
13446 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13448 * config/alpha/alpha.md (stack_probe_internal): Rename
13449 from "probe_stack". Update all callers.
13451 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13453 PR rtl-optimization/84566
13454 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13455 sched_macro_fuse_insns.
13457 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13460 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13461 (compute_block_dependences): ... from here.
13463 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13465 PR tree-optimization/85331
13466 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13467 from int to HOST_WIDE_INT.
13469 2018-04-11 Martin Jambor <mjambor@suse.cz>
13472 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13473 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13474 not the same as the source val.
13475 (cgraph_edge_brings_value_p): New parameter.
13476 (gather_edges_for_value): Pass destination value to
13477 cgraph_edge_brings_value_p.
13478 (perhaps_add_new_callers): Likewise.
13479 (get_info_about_necessary_edges): Likewise and exclude values brought
13480 only by self-recursive edges.
13481 (create_specialized_node): Redirect only clones of self-calling edges.
13482 (+self_recursive_pass_through_p): New function.
13483 (find_more_scalar_values_for_callers_subset): Use it.
13484 (find_aggregate_values_for_callers_subset): Likewise.
13485 (known_aggs_to_agg_replacement_list): Removed.
13486 (decide_whether_version_node): Re-calculate known constants for all
13487 remaining context clones.
13489 2018-04-11 Richard Biener <rguenther@suse.de>
13492 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13493 from early DWARF output.
13494 (dwarf2out_early_finish): Output line info unconditionally into
13495 early DWARF and add reference to it.
13497 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13500 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13501 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13502 other than V2DFmode using iptr mode attribute.
13503 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13505 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13507 PR rtl-optimization/84659
13508 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13510 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13513 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13515 (output_loc_list): Pass address of a dummy size variable even in the
13516 locview handling loop.
13517 (index_location_lists): Add comment on why skip_loc_list_entry can't
13520 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13523 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13526 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13529 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13530 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13531 and -mstring-compare-inline-limit.
13533 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13536 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13537 for stack clash protection in a register whenever we need it to be in
13540 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13542 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13543 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13545 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13548 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13550 (mlong-double-): Ditto.
13551 * config/rs6000/sysv4.opt (msdata=): Ditto.
13552 (mtls-size=): Ditto.
13554 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13556 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13557 erroneous entries for
13558 "vector int vec_ldl (int, long int *)", and
13559 "vector unsigned int vec_ldl (int, unsigned long int *)".
13560 Add comments and entries for
13561 "vector bool char vec_ldl (int, bool char *)",
13562 "vector bool short vec_ldl (int, bool short *)",
13563 "vector bool int vec_ldl (int, bool int *)",
13564 "vector bool long long vec_ldl (int, bool long long *)",
13565 "vector pixel vec_ldl (int, pixel *)",
13566 "vector long long vec_ldl (int, long long *)",
13567 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13568 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13569 type tree bool_long_long_type_node and correct definition of
13570 bool_V2DI_type_node to make reference to this new type tree.
13571 (rs6000_mangle_type): Replace erroneous reference to
13572 bool_long_type_node with bool_long_long_type_node.
13573 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13574 comments to emphasize sign distinctions for char and int types and
13575 replace RS6000_BTI_bool_long constant with
13576 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13577 use of RS6000_BTI_pixel.
13578 (bool_long_type_node): Remove this macro definition.
13579 (bool_long_long_type_node): New macro definition
13581 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13583 PR rtl-optimization/85300
13584 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13585 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13586 simplify_unary_operation fails.
13588 2018-04-10 Martin Liska <mliska@suse.cz>
13590 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13591 cgraph_edge and ipa_ref.
13593 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13597 * config/i386/sse.md
13598 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13599 computation of the VEC_MERGE selector from mask.
13600 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13601 Fix decoding of the VEC_MERGE selector into mask.
13603 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13605 PR tree-optimization/85286
13606 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13608 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13610 * final.c (final_1): Set insn_last_address as well as
13611 insn_current_address.
13613 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13616 * explow.c (emit_stack_probe): Call validize_mem on memory location
13617 before passing it to gen_probe_stack. Create address operand and
13618 legitimize it for the probe_stack_address case.
13620 2018-04-09 Jan Hubicka <jh@suse.cz>
13623 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13624 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13625 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13627 (free_lang_data): Rebuild type inheritance graph.
13629 2018-04-09 Martin Sebor <msebor@redhat.com>
13631 * invoke.texi (-finline-small-functions): Mention other optimization
13633 (-findirect-inlining, -fpartial-inlining): Same.
13634 (-finline-functions-called-once): Same.
13635 (-freorder-blocks-and-partition): Same.
13637 2018-04-09 Jan Hubicka <jh@suse.cz>
13640 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13641 jumps; choose last target that matches the criteria (i.e.
13642 no partition changes for non-crossing jumps).
13643 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13644 support for redirecting crossing jumps to non-crossing.
13646 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13648 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13649 also for naked functions.
13651 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13653 * config/arc/arc.md (add_shift): New pattern.
13654 (add_shift2): Likewise.
13655 (sub_shift): Likewise.
13656 (sub_shift_cmp0_noout): Likewise.
13657 (compare_si_ashiftsi): Likewise.
13658 (xbfu_cmp0_noout): New combine pattern.
13659 (xbfu_cmp0"): Likewise.
13660 (movsi_set_cc_insn): Place the predicable variant first.
13661 (commutative_binary_cmp0_noout): Remove clobber.
13662 (commutative_binary_cmp0): New pattern.
13663 (noncommutative_binary_cmp0): Likewise.
13664 (noncommutative_binary_cmp0_noout): Likewise.
13665 (noncommutative_binary_comparison_result_used): Removed.
13666 (rsub_cmp0): New pattern.
13667 (rsub_cmp0_noout): Likewise.
13668 (extzvsi): Changed, keep only meaningful variants.
13669 (SQH, SEZ): New iterators.
13670 (SQH_postfix): New mode attribute.
13671 (SEZ_prefix): New code attribute.
13672 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13673 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13674 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13675 of numerical value.
13676 (noncommutative_operator): Check the availability of barrel
13679 2018-04-09 Richard Biener <rguenther@suse.de>
13681 PR tree-optimization/85284
13682 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13683 Only use the niter constraining form of simple_iv when the exit
13684 is always executed.
13686 2018-04-09 Tom de Vries <tom@codesourcery.com>
13689 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13690 (define_expand "*memory_barrier"): New define_expand.
13691 (define_insn "memory_barrier"): New insn.
13693 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13695 PR rtl-optimization/80463
13696 PR rtl-optimization/83972
13697 PR rtl-optimization/83480
13699 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13700 correct producer for the insn.
13701 (tidy_control_flow): Fixup seqnos in case of debug insns.
13703 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13705 PR rtl-optimization/83913
13707 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13708 different sched-times when merging exprs.
13710 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13712 PR rtl-optimization/83962
13714 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13715 tidy_fallthru_edge and tidy_control_flow.
13717 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13719 PR rtl-optimization/83530
13721 * sel-sched.c (force_next_insn): New global variable.
13722 (remove_insn_for_debug): When force_next_insn is true, also leave only
13723 next insn in the ready list.
13724 (sel_sched_region): When the region wasn't scheduled, make another pass
13725 over it with force_next_insn set to 1.
13727 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13729 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13731 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13732 for interrupt control.
13733 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13734 functions for interrupt control.
13735 * config/nds32/nds32-intrinsic.md: Likewise.
13736 * config/nds32/nds32_intrinsic.h: Likewise.
13737 * config/nds32/nds32.h (nds32_builtins): Likewise.
13739 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13741 * config/nds32/nds32.c (nds32_init_machine_status,
13742 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13743 strict_aligned_p field.
13744 (nds32_expand_to_rtl_hook): New function.
13745 (TARGET_EXPAND_TO_RTL_HOOK): Define.
13746 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13748 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13749 Chung-Ju Wu <jasonwucj@gmail.com>
13751 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13752 * config/nds32/nds32-n7.md: New file.
13753 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13754 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13756 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13757 * config/nds32/nds32.md (pipeline_model): Add n7.
13758 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13759 * config/nds32/pipelines.md: Include n7 settings.
13761 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13762 Chung-Ju Wu <jasonwucj@gmail.com>
13764 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13765 * config/nds32/nds32-e8.md: New file.
13766 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13767 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13769 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13770 * config/nds32/nds32.md (pipeline_model): Add e8.
13771 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13772 * config/nds32/pipelines.md: Include e8 settings.
13774 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13775 Chung-Ju Wu <jasonwucj@gmail.com>
13777 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13778 * config/nds32/nds32-n8.md: New file.
13779 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13780 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13782 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13783 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13784 * config/nds32/nds32.md (pipeline_model): Add n8.
13785 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13786 * config/nds32/pipelines.md: Include n8 settings.
13788 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13789 Chung-Ju Wu <jasonwucj@gmail.com>
13791 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13792 * config/nds32/nds32-n9-2r1w.md: New file.
13793 * config/nds32/nds32-n9-3r2w.md: New file.
13794 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13795 nds32_register_ports): New or modify for cpu n9.
13796 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13798 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13799 * config/nds32/nds32-utils.c: New file.
13800 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13801 TARGET_MUL_SLOW): Define.
13802 * config/nds32/nds32.md (pipeline_model): New attribute.
13803 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13804 New options that support cpu n9.
13805 * config/nds32/pipelines.md: Include n9 settings.
13806 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13808 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13810 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13811 information if necessary.
13812 (output_cond_branch_compare_zero): Likewise.
13813 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13814 (nds32_target_alignment): Refine for alignment.
13815 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13816 (FUNCTION_BOUNDARY): Modify.
13817 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13819 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13821 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13823 * config/nds32/constants.md (unspec_volatile_element): Add values for
13824 TLB operation and data prefetch.
13825 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13826 functions for TLB operation and data prefetch.
13827 * config/nds32/nds32-intrinsic.md: Likewise.
13828 * config/nds32/nds32_intrinsic.h: Likewise.
13829 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13830 (nds32_print_operand): Likewise.
13831 * config/nds32/nds32.h (nds32_builtins): Likewise.
13833 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13834 Andrew Pinski <pinsika@gcc.gnu.org>
13836 PR middle-end/82976
13837 * match.pd: Use constant_boolean_node of correct type instead of
13838 boolean_true_node or boolean_false_node for simplifying
13839 pointer comparisons to zero.
13841 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13843 PR tree-optimization/80021
13844 * tree.c (verify_type_variant): Make error call in verify_variant_match
13845 translatable and remove final full stop.
13847 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13849 * config/nds32/constants.md (unspec_volatile_element): Add
13850 UNSPEC_VOLATILE_EH_RETURN.
13851 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13852 nds32_output_stack_pop): Support dwarf exception handling process.
13853 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13854 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13855 exception handling process.
13856 (nds32_compute_stack_frame): Likewise.
13857 (nds32_return_addr_rtx): Likewise.
13858 (nds32_initial_elimination_offset): Likewise.
13859 (nds32_expand_prologue): Likewise.
13860 (nds32_expand_epilogue): Likewise.
13861 (nds32_dynamic_chain_address): New function.
13862 * config/nds32/nds32.h (machine_function): Add fields for dwarf
13863 exception handling.
13864 (DYNAMIC_CHAIN_ADDRESS): Define.
13865 (EH_RETURN_DATA_REGNO): Define.
13866 (EH_RETURN_STACKADJ_RTX): Define.
13867 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13868 patterns for dwarf exception handling.
13870 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13872 * config/nds32/nds32.h: Clean up obsolete macros.
13874 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13876 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13877 Add enum values for particular instructions.
13878 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13879 particular intrinsic functions.
13880 * config/nds32/nds32-intrinsic.md: Likewise.
13881 * config/nds32/nds32_intrinsic.h: Likewise.
13882 * config/nds32/nds32.h (nds32_builtins): Likewise.
13883 * config/nds32/nds32.md (type): Add pbsad and pbsada.
13884 (btst, ave): New patterns for particular instructions.
13886 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13888 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13889 Add enum values for atomic load/store and memory sync.
13890 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13892 * config/nds32/nds32-intrinsic.md: Likewise.
13893 * config/nds32/nds32_intrinsic.h: Likewise.
13894 * config/nds32/nds32.h (nds32_builtins): Likewise.
13896 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13898 PR tree-optimization/85257
13899 * fold-const.c (native_encode_vector): If not all elts could fit
13900 and off is -1, return 0 rather than offset.
13901 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13902 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13903 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
13904 adjust buffer in native_interpret_expr call.
13906 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13908 * config/nds32/constants.md (unspec_volatile_element): Add cache
13909 control enum values.
13910 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13911 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13912 * config/nds32/nds32.c (nds32_cctl_names): New.
13913 (nds32_print_operand): Handle cache control register names.
13914 * config/nds32/nds32.h (nds32_builtins): New enum values.
13915 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13917 * config/nds32/nds32.md (type): Add mmu.
13918 * config/nds32/pipelines.md (simple_insn): Add mmu.
13920 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13922 * config/nds32/nds32.md (type): Remove call.
13923 * config/nds32/pipelines.md (simple_insn): Likewise.
13925 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13927 * config/nds32/constants.md (unspec_volatile_element): Add
13928 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13929 UNSPEC_VOLATILE_FMFCFG.
13930 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13931 description for fmfcfg and fmfcsr.
13932 (bdesc_1arg): Add fmtcsr.
13933 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13934 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13935 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13936 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13937 unspec_fmfcfg): New patterns.
13938 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13939 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13940 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13941 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13942 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13943 __nds32__fmfcfg): Define.
13945 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13947 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13948 intrinsic register names.
13949 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13950 intrinsic register enum values and macros.
13952 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13954 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13955 for load/store addressing form.
13956 (nds32_print_operand_address): Likewise.
13958 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
13961 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13962 based on LABEL_REF. Remove useless assertion.
13963 (pic_address_needs_scratch): Fix formatting.
13964 (sparc_legitimize_pic_address): Minor tweaks.
13965 (sparc_delegitimize_address): Adjust assertion accordingly.
13966 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13967 into symbolic_operand.
13968 (movsi_high_pic_label_ref): Likewise.
13969 (movsi_lo_sum_pic_label_ref): Likewise.
13970 (movdi_pic_label_ref): Likewise.
13971 (movdi_high_pic_label_ref): Likewise.
13972 (movdi_lo_sum_pic_label_ref): Likewise.
13974 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
13976 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13977 custom LIB_SPEC setup.
13979 2018-04-06 Ruslan Bukin <br@bsdpad.com>
13980 Kito Cheng <kito.cheng@gmail.com>
13982 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13983 * config/riscv/freebsd.h: New.
13985 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13987 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13988 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13991 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13992 Kito Cheng <kito.cheng@gmail.com>
13994 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13995 nds32_output_call, nds32_symbol_binds_local_p): New functions.
13996 * config/nds32/nds32-protos.h (nds32_output_call,
13997 nds32_output_return): Declare.
13998 * config/nds32/nds32.md: Refine all the call and return patterns.
14000 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14003 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
14004 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
14006 PR rtl-optimization/84872
14007 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
14008 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
14009 EDGE_CROSSING edge.
14011 2018-04-06 Tamar Christina <tamar.christina@arm.com>
14013 * expr.c (copy_blkmode_to_reg): Revert 254862.
14014 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
14016 2018-04-06 Richard Biener <rguenther@suse.de>
14018 PR middle-end/85244
14019 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
14020 after seeing a component reference with an adjacent field. Treat
14021 refs to arrays at struct end of external decls similar to
14022 refs to unconstrained commons.
14024 2018-04-06 Jakub Jelinek <jakub@redhat.com>
14027 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
14028 look through SAVE_EXPRs with non-side-effects argument. Adjust
14030 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
14033 2018-04-06 Richard Biener <rguenther@suse.de>
14035 PR middle-end/85180
14036 * alias.c (find_base_term): New wrapper around find_base_term
14037 unwinding CSELIB_VAL_PTR changes.
14038 (find_base_term): Do not restore CSELIB_VAL_PTR during the
14041 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14043 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
14045 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
14046 constant definitions.
14047 ("nop"): lr 0,0 -> nopr r0
14048 ("nop_lr0", "nop_lr1"): New insn definitions.
14050 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
14052 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
14053 NDS32_V3PUSH_AVAILABLE_P macro.
14055 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
14056 Chung-Ju Wu <jasonwucj@gmail.com>
14058 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
14059 (nds32*-*-*): Add float and fpu_config into supported_defaults.
14060 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
14061 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
14062 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
14063 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
14064 * config/nds32/constraints.md: New constraints and checking for hard
14065 float configuration.
14066 * config/nds32/iterators.md: New mode iterator and attribute for hard
14067 float configuration.
14068 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
14070 * config/nds32/nds32-fpu.md: New file.
14071 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
14072 deal with hard float code generation.
14073 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
14075 (abi_type, float_reg_number): New enum type.
14076 * config/nds32/nds32-predicates.c: New predicates for hard float.
14077 * config/nds32/nds32-protos.h: Declare functions for hard float.
14078 * config/nds32/nds32.c: Implementation for hard float configuration.
14079 * config/nds32/nds32.h: Definitions for hard float configuration.
14080 * config/nds32/nds32.md: Include hard float machine description and
14081 modify patterns for hard float configuration.
14082 * config/nds32/nds32.opt: New options for hard float configuration.
14083 * config/nds32/predicates.md: New predicates for hard float
14086 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14088 * common/config/nds32/nds32-common.c
14089 (nds32_option_optimization_table): Enable -mreleax-hint by default.
14091 2018-04-05 Jakub Jelinek <jakub@redhat.com>
14093 PR middle-end/85195
14094 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
14095 CONSTRUCTOR_ELT (ctor, ...)->value.
14097 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
14100 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
14102 2018-04-05 Tom de Vries <tom@codesourcery.com>
14105 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
14108 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14109 Kito Cheng <kito.cheng@gmail.com>
14111 * config/nds32/constraints.md (U33): Fine-tune checking condition.
14112 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
14113 * config/nds32/nds32.h (nds32_16bit_address_type): Add
14114 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
14116 2018-04-05 Shiva Chen <shiva0217@gmail.com>
14117 Kito Cheng <kito.cheng@gmail.com>
14119 * config/nds32/constraints.md (Ufe): New memory constraint.
14120 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
14121 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
14122 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
14124 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
14125 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
14127 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14129 * config/nds32/nds32.md: Use optimize_size in the condition for
14130 alu-shift instructions.
14132 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14134 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
14136 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14138 * config/nds32/nds32.md (negsi2): Refine pattern.
14140 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14141 Chung-Ju Wu <jasonwucj@gmail.com>
14143 * config/nds32/iterators.md (shift_rotate): New code iterator.
14144 (shift): New code attribute.
14145 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
14146 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
14147 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
14148 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
14149 bit-wise operations.
14150 (andsi3, *andsi3): Ditto.
14151 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
14152 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
14153 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
14154 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
14155 nds32_ior_operand, nds32_xor_operand): New predicates.
14157 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14159 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
14160 (addsi3, subsi3): ... this.
14162 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14164 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
14166 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14168 * config/nds32/nds32.md: Adjust indention.
14170 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14172 * config/nds32/nds32.md (feature): New attribute.
14174 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14176 * config/nds32/nds32.md (subtype): New attribute.
14178 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14181 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14182 expansion to perform a bitwise AND of the argument followed by a
14183 boolean negation of the result.
14185 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14187 PR rtl-optimization/84878
14188 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14189 the basic block. Assert the use reference is not artificial and that
14190 it has an associated insn.
14192 2018-04-04 Michael Matz <matz@suse.de>
14194 * builtins.c (compute_objsize): Pass correct operand
14195 to array_at_struct_end_p.
14197 2018-04-04 Richard Biener <rguenther@suse.de>
14200 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14201 from contexts for DINFO_LEVEL_TERSE and below.
14203 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14205 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14206 resiter_operand condition.
14207 * config/nds32/nds32.md (*move<mode>): Ditto.
14209 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14210 Monk Chiang <sh.chiang04@gmail.com>
14212 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14214 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14216 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14218 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14219 Kito Cheng <kito.cheng@gmail.com>
14221 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14222 nds32_cond_code_str, output_cond_branch,
14223 output_cond_branch_compare_zero, nds32_expand_cbranch,
14224 nds32_expand_cstore, nds32_expand_movcc,
14225 nds32_output_cbranchsi4_equality_zero,
14226 nds32_output_cbranchsi4_equality_reg,
14227 nds32_output_cbranchsi4_equality_reg_or_const_int,
14228 nds32_output_cbranchsi4_greater_less_zero: New functions.
14229 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14230 nds32_expand_cstore, nds32_expand_movcc,
14231 nds32_output_cbranchsi4_equality_zero,
14232 nds32_output_cbranchsi4_equality_reg,
14233 nds32_output_cbranchsi4_equality_reg_or_const_int,
14234 nds32_output_cbranchsi4_greater_less_zero): Declare.
14235 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14236 nds32_rimm11s_operand): New predicates.
14237 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14238 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14241 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14243 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14244 * config/nds32/nds32.md: Ditto.
14245 * config/nds32/pipelines.md: Ditto.
14247 2018-04-04 Richard Biener <rguenther@suse.de>
14249 PR tree-optimization/85168
14250 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14251 propagating abnormals.
14253 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14255 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14257 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14258 Kito Cheng <kito.cheng@gmail.com>
14260 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14261 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14262 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14263 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14264 * config/nds32/nds32.md (sibcall_internal): New.
14265 (sibcall_register): Remove.
14266 (sibcall_immediate): Remove.
14267 (sibcall_value_internal): New.
14268 (sibcall_value_register): Remove.
14269 (sibcall_value_immediate): Remove.
14270 * config/nds32/predicates.md (nds32_general_register_operand): New.
14271 (nds32_call_address_operand): New.
14273 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14275 PR rtl-optimization/85167
14276 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14277 bb_defs if *split_p, instead preinitialize it to NULL.
14279 PR tree-optimization/85156
14280 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14281 evaluating the argument multiple times.
14283 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14285 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14287 (_mm_cvtpd_ps): Likewise.
14288 (_mm_cvttpd_epi32): Likewise.
14289 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14290 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14291 vector, pixel, and bool following altivec.h include.
14293 2018-04-03 Martin Sebor <msebor@redhat.com>
14295 * doc/extend.texi (Common Function Attributes): Clarify.
14296 (const attribute): Likewise.
14297 (pure attribute): Likewise.
14299 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14302 * config/i386/i386.c (ix86_expand_vector_set): Use
14303 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14305 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14307 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14308 instructions when changing rounding bits to preserve precision bits
14309 in the x87 control word.
14311 2018-04-03 Martin Liska <mliska@suse.cz>
14313 PR tree-optimization/82491
14314 * rtl.h (strip_offset_and_add): Replace += suboffset with
14315 poly_uint64 () + suboffset.
14317 2018-03-29 Martin Liska <mliska@suse.cz>
14318 Martin Jambor <mjambor@suse.cz>
14321 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14322 param_type is not an integral or pointer type.
14324 2018-04-03 Richard Biener <rguenther@suse.de>
14326 * sese.h (recompute_all_dominators): Remove.
14328 2018-04-02 Martin Sebor <msebor@redhat.com>
14330 * doc/invoke.texi (-Wrestrict): Fix typos.
14332 2018-04-02 Jim Wilson <jimw@sifive.com>
14334 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14335 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14336 (<optab>di3, <optab>si3_extend): Likewise.
14337 (<optab>si3_mask, <optab>si3_mask_1): New.
14338 (<optab>di3_mask, <optab>di3_mask_1): New.
14339 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14340 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14341 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14343 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14345 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14348 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14350 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14351 (nds32_canonicalize_comparison): New function.
14353 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14354 Kito Cheng <kito.cheng@gmail.com>
14355 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14357 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14358 * config/nds32/constants.md (unspec_volatile_element): Add
14359 UNSPEC_VOLATILE_RELAX_GROUP.
14360 * config/nds32/nds32-relax-opt.c: New file.
14361 * config/nds32/nds32-predicates.c
14362 (nds32_symbol_load_store_p): New function.
14363 * config/nds32/nds32-protos.h
14364 (nds32_symbol_load_store_p): Declare function.
14365 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14366 * config/nds32/nds32.c
14367 (nds32_register_pass): New function to register pass.
14368 (nds32_register_passes): New function to register passes.
14369 * config/nds32/nds32.md (relax_group): New pattern.
14370 * config/nds32/nds32.opt (mrelax-hint): New option.
14371 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14373 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14375 * config/nds32/t-nds32: Modify files dependency.
14377 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14379 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14380 (PROFILE_HOOK): Define its implementation.
14382 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14384 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14385 type and 32-bit size.
14387 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14389 PR middle-end/85090
14390 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14391 (V_128_256): New mode iterator.
14392 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14393 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14394 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14396 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14397 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14399 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14402 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14403 NaN inputs correctly.
14405 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14408 * config/rs6000/vsx.md (??r): New mode attribute.
14409 (*vsx_mov<mode>_64bit): Use it.
14410 (*vsx_mov<mode>_32bit): Likewise.
14412 2018-03-30 Martin Sebor <msebor@redhat.com>
14414 PR tree-optimization/84818
14415 * builtins.c (check_access): Use warning_n.
14417 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14420 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14422 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14425 2018-03-30 Julia Koval <julia.koval@intel.com>
14428 * x86-tune.def (movx, partial_reg_dependency): Enable for
14431 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14433 PR inline-asm/84985
14434 * lra-constraints.c (process_alt_operands): Move setting
14435 this_alternative_matches below.
14437 2018-03-29 Martin Liska <mliska@suse.cz>
14440 * doc/invoke.texi: Document how LTO works with debug info.
14441 Describe auto-load support of binutils. Mention 'x86-64'
14442 as valid option value of -march option.
14444 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14446 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14449 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14450 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14451 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14454 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14457 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14458 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14459 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14460 for RS6000_BTM_POWERPC64.
14461 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14462 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14463 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14466 (DIVDEU): Likewise.
14468 2018-03-28 Carl Love <cel@us.ibm.com>
14471 2017-09-27 Carl Love <cel@us.ibm.com>
14473 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14474 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14475 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14478 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14480 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14481 instead of __vector bool.
14482 (_mm_max_pu8): Likewise.
14483 (_mm_min_pi16): Likewise.
14485 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14488 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14489 (DIVWEUO): Likewise.
14490 (DIVDEO): Likewise.
14491 (DIVDEUO): Likewise.
14492 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14493 DIVWEUO and DIVDEUO.
14494 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14495 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14496 (div_extend): Likewise.
14497 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14499 (__builtin_divweuo): Likewise.
14500 (__builtin_divdeo): Likewise.
14501 (__builtin_divdeuo): Likewise.
14503 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14506 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14507 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14509 PR tree-optimization/82004
14510 * gimple-match-head.c (optimize_pow_to_exp): New function.
14511 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14512 Don't fold to exp if optimize_pow_to_exp is false.
14514 2018-03-28 Martin Liska <mliska@suse.cz>
14517 * calls.c (initialize_argument_information): Fix trailing space.
14518 * common.opt: Fix typo and provide better explanation for
14519 -fsanitize-coverage option.
14520 * config/i386/i386.opt: Fix typo.
14522 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14523 Martin Liska <mliska@suse.cz>
14526 * gimplify.c (asan_poison_variable): Don't do the check for
14527 gimplify_omp_ctxp here.
14528 (gimplify_decl_expr): Do it here.
14529 (gimplify_target_expr): Likewise.
14531 2018-03-28 Martin Liska <mliska@suse.cz>
14534 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14535 chkp_type_bounds_count if MPX is not enabled.
14537 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14539 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14541 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14544 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14545 function to create the function decl for complex long double
14546 multiply and divide for -mabi=ieeelongdouble.
14547 (init_float128_ieee): Call it.
14549 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14552 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14553 -fcf-protection=branch -mibt.
14554 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14556 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14559 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14560 arm_word_relocations.
14562 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14565 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14566 extern array declarations.
14568 2018-03-27 Richard Biener <rguenther@suse.de>
14570 PR middle-end/84067
14571 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14572 explicit single_use checks.
14574 2018-03-27 Richard Biener <rguenther@suse.de>
14576 PR tree-optimization/85082
14577 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14580 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14582 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14583 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14584 Turn on fasynchronous-unwind-tables and funwind-tables.
14586 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14589 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14590 (*bmi_blsr_<mode>_ccz): Ditto.
14592 2018-03-26 Tom de Vries <tom@codesourcery.com>
14594 PR tree-optimization/85063
14595 * omp-general.c (offloading_function_p): New function. Factor out
14597 * omp-offload.c (pass_omp_target_link::gate): ... here.
14598 * omp-general.h (offloading_function_p): Declare.
14599 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14600 with attribute omp declare target for offloading functions.
14602 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14604 PR tree-optimization/84005
14605 * tree-data-ref.h (get_base_for_alignment): Declare.
14606 * tree-data-ref.c (get_base_for_alignment_1): New function.
14607 (get_base_for_alignment): Likewise.
14608 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14609 get_base_for_alignment to find a suitable base object, instead
14610 of always using drb->base_address.
14612 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14614 PR inline-asm/85022
14615 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14616 known size by default.
14618 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14620 PR inline-asm/85030
14621 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14622 and non BLKmode operands.
14624 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14627 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14628 Clean up attributes.
14630 2018-03-23 Richard Biener <rguenther@suse.de>
14633 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14634 we are going to emit early debug for LTO.
14636 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14638 PR inline-asm/85034
14639 * function.c (match_asm_constraints_1): Don't optimize if input
14640 doesn't satisfy general_operand predicate for output's mode.
14642 PR inline-asm/85022
14643 * alias.c (write_dependence_p): Don't require for x_canonicalized
14644 non-VOIDmode if x has VOIDmode.
14647 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14648 just don't try to optimize it rather than assert it never happens.
14650 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14652 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14653 macro expansions for definition of ST_INTERNAL_<mode> and
14654 LD_INTERNAL_<mode> builtins.
14655 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14657 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14659 (altivec_expand_st_builtin): Likewise.
14660 (altivec_expand_builtin): Remove calls to deleted functions.
14661 (rs6000_address_for_altivec): Delete this function.
14662 * config/rs6000/vector.md: Remove expands for
14663 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14665 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14668 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14669 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14670 re-computing once computed.
14671 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14672 (arm_init_machine_status): Initialize
14673 machine->static_chain_stack_bytes.
14675 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14678 * doc/extend.texi: Add four new prototypes for vec_ld.
14679 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14680 definitions for more logical presentation.
14681 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14682 entries for V1TI variants of __builtin_altivec_ld builtin.
14683 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14684 handling of V1TI variant of LVX icode pattern.
14685 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14686 (rs6000_gimple_fold_builtin): Likewise.
14687 (altivec_init_builtins): Add code to define
14688 __builtin_altivec_lvx_v1ti function.
14690 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14692 PR inline-asm/84941
14693 * function.c (match_asm_constraints_1): Don't do the optimization
14694 if input isn't a REG, SUBREG, MEM or constant.
14696 2018-03-22 Tom de Vries <tom@codesourcery.com>
14698 PR tree-optimization/84956
14699 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14700 bb_has_abnormal_pred.
14702 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14705 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14706 DECL_INITIAL (decl) to decl at the end.
14707 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14708 adjust the comment.
14710 2018-03-21 Joseph Myers <joseph@codesourcery.com>
14712 * doc/extend.texi (__builtin_tgmath): Document when complex
14713 integer types are treated as _Complex _Float64.
14715 2018-03-21 Tom de Vries <tom@codesourcery.com>
14717 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14719 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14721 PR tree-optimization/84960
14722 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14723 if it is ENTRY block, move them into single succ of ENTRY in that case.
14725 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
14727 PR tree-optimization/84811
14728 * poly-int.h (poly_span_traits): Remove the T3 parameter and
14729 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14730 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14731 (known_subrange_p): Update accordingly. Cast each value involved
14732 in the size comparison, rather than casting the result of the
14735 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14737 PR tree-optimization/84982
14738 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14739 by flipping the least significant bit rather than all bits from
14740 bitpos to bitpos + bitsize - 1.
14742 2018-03-21 Nathan Sidwell <nathan@acm.org>
14744 * doc/extend.texi (Deprecated Features): Remove mention of
14745 long-deleted deprecations.
14747 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14750 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14751 * configure: Regenerate.
14753 2018-03-21 Tom de Vries <tom@codesourcery.com>
14755 PR tree-optimization/83126
14756 * tree-parloops.c (num_phis): New function.
14757 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14759 2018-03-21 Nathan Sidwell <nathan@acm.org>
14761 * doc/extend.texi (Deprecated Features): Update deprecated flags,
14762 mention anon-struct/union members and trailing attributes.
14764 2018-03-21 Bin Cheng <bin.cheng@arm.com>
14766 PR tree-optimization/84969
14767 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14768 builtin memset partitions if they set different rhs values.
14770 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14772 PR rtl-optimization/84989
14773 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14774 VEC_DUPLICATE with scalar result mode.
14776 2018-03-21 Martin Liska <mliska@suse.cz>
14779 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14780 not intended return statement.
14782 2018-03-21 Martin Liska <mliska@suse.cz>
14785 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14786 (chkp_find_bound_slots_1): Limit number of iterations.
14788 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14791 * Minor grammar fixes for x86 options.
14793 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14796 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14797 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14799 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14802 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14803 (altivec_lvx_<mode>_1op): Likewise.
14804 (altivec_stvx_<mode>_2op): Likewise.
14805 (altivec_stvx_<mode>_1op): Likewise.
14806 (altivec_lvx_<VM2:mode>): New define_expand.
14807 (altivec_stvx_<VM2:mode>): Likewise.
14808 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14809 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14810 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14811 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14812 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14813 (rs6000_gen_lvx): Likewise.
14814 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14815 (altivec_expand_stv_builtin): Likewise.
14816 (altivec_expand_builtin): Likewise.
14817 * config/rs6000/vector.md: Likewise.
14819 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14822 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14825 2018-03-20 Richard Biener <rguenther@suse.de>
14828 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14829 sign-conversions as zero, fall back to standard scalar_stmt
14832 2018-03-20 Martin Liska <mliska@suse.cz>
14835 * predict.c (rebuild_frequencies): Handle case when we have
14836 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14838 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14841 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14842 flag_section_anchors.
14843 * varasm.c (use_blocks_for_decl_p): Remove hack for
14844 dw2_force_const_mem.
14847 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14849 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
14850 be created, use lowpart_subreg of operands[0] rather than operands[0]
14852 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14853 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14854 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14855 and n constraint instead of aarch64_shift_imm_di and Usd.
14856 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14857 (*aarch64_<optab>_reg_minus<mode>3): ... this.
14859 2018-03-20 Sudakshina Das <sudi.das@arm.com>
14862 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14863 to favor GPR over NEON registers.
14864 (<shift>di3_neon): Likewise.
14866 2018-03-20 Tom de Vries <tom@codesourcery.com>
14869 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14870 (nvptx_process_pars): Emit bar.sync asap and alap.
14872 2018-03-20 Tom de Vries <tom@codesourcery.com>
14875 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14876 seen_label if seen_label is already set.
14878 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14881 * config/i386/i386.c (fold_builtin_cpu): For features above 31
14882 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14883 Use 1U instead of 1. Formatting fixes.
14886 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14887 instead of TREE_TYPE (s1) for the return value.
14889 2018-03-19 Jakub Jelinek <jakub@redhat.com>
14891 PR tree-optimization/84946
14892 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14893 bitsize + bitsize in poly_uint64 rather than poly_int64.
14896 * dwarf2asm.c: Include fold-const.c.
14897 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14898 of decl rather than decl itself.
14900 PR rtl-optimization/84643
14901 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14903 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
14906 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14907 calling assemble_variable.
14909 2018-03-19 Sudakshina Das <sudi.das@arm.com>
14912 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14913 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14915 2018-03-19 Jim Wilson <jimw@sifive.com>
14918 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14919 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14920 (riscv_first_stack_step): Likewise.
14921 (riscv_option_override): Use STACK_BOUNDARY instead of
14922 MIN_STACK_BOUNDARY.
14923 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14924 MIN_STACK_BOUNDARY.
14925 (BIGGEST_ALIGNMENT): Set to 128.
14926 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14927 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14930 2018-03-19 Richard Biener <rguenther@suse.de>
14932 PR tree-optimization/84933
14933 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14934 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14936 2018-03-19 Richard Biener <rguenther@suse.de>
14938 PR tree-optimization/84859
14939 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14940 (cond_if_else_store_replacement): Perform sinking operation on
14941 single-store BBs regardless of MAX_STORES_TO_SINK setting.
14942 Generalize what a BB with a single eligible store is.
14944 2018-03-19 Richard Biener <rguenther@suse.de>
14946 PR tree-optimization/84929
14947 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14948 chrec_is_positive against non-chrec arg.
14950 2018-03-19 Tamar Christina <tamar.christina@arm.com>
14953 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14955 2018-03-18 Martin Liska <mliska@suse.cz>
14957 PR rtl-optimization/84635
14958 * regrename.c (build_def_use): Use matches_mode only when
14961 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
14963 PR tree-optimization/84913
14964 * tree-vect-loop.c (vectorizable_reduction): Don't try to
14965 vectorize chains of COND_EXPRs.
14967 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14969 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14971 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14973 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14975 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14977 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14979 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14980 Kito Cheng <kito.cheng@gmail.com>
14982 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14983 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14984 (nds32_adjust_reg_alloc_order): New function.
14985 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14987 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
14989 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14990 nds32_print_operand, nds32_print_operand_address): Use
14991 HOST_WIDE_INT_PRINT_DEC instead.
14993 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14995 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14997 2018-03-17 Jakub Jelinek <jakub@redhat.com>
15000 * config/i386/i386.c (initial_ix86_tune_features,
15001 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
15002 unsigned long long.
15003 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
15004 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
15005 rather than 1u << ix86_tune. Formatting fix.
15006 (ix86_option_override_internal): Change ix86_arch_mask from
15007 unsigned int to unsigned HOST_WIDE_INT, initialize to
15008 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
15009 (ix86_function_specific_restore): Likewise.
15011 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15014 * postreload.c (reload_combine_recognize_pattern): Perform
15015 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
15016 truncate_int_for_mode the result for the destination's mode.
15019 * hsa-gen.c (mem_type_for_type): Fix comment typo.
15020 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
15022 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15025 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
15028 * lra-assigns.c (lra_split_hard_reg_for): Don't use
15029 regno_allocno_class_array and sorted_pseudos.
15030 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
15031 insns where regno is used.
15033 2018-03-16 Martin Liska <mliska@suse.cz>
15036 * multiple_target.c (create_dispatcher_calls): Redirect
15037 reference in the symbol table.
15039 2018-03-16 Martin Liska <mliska@suse.cz>
15042 * multiple_target.c (create_dispatcher_calls): Redirect also
15045 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15049 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
15050 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
15051 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
15053 2018-03-16 Julia Koval <julia.koval@intel.com>
15055 * doc/invoke.texi (Skylake Server): Add CLWB.
15056 Cannonlake): Remove CLWB.
15058 2018-03-16 Jakub Jelinek <jakub@redhat.com>
15060 PR tree-optimization/84841
15061 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
15063 (FLOAT_ONE_CONST_TYPE): Define.
15064 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
15065 (sort_by_operand_rank): Put entries with higher constant_type last
15066 rather than first to match comments.
15068 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
15070 * config/nios2/nios2.md (movsi_internal): Fix thinko in
15073 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15076 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
15077 check and use address of target always.
15079 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
15082 * config/i386/i386.c (indirect_thunk_needed): Update comments.
15083 (indirect_thunk_bnd_needed): Likewise.
15084 (indirect_thunks_used): Likewise.
15085 (indirect_thunks_bnd_used): Likewise.
15086 (indirect_return_needed): New.
15087 (indirect_return_bnd_needed): Likewise.
15088 (output_indirect_thunk_function): Add a bool argument for
15090 (output_indirect_thunk_function): Don't generate alias for
15091 function return thunk.
15092 (ix86_code_end): Call output_indirect_thunk_function to generate
15093 function return thunks.
15094 (ix86_output_function_return): Set indirect_return_bnd_needed
15095 and indirect_return_needed instead of indirect_thunk_bnd_needed
15096 and indirect_thunk_needed.
15098 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
15100 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
15101 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
15102 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
15104 2018-03-15 David Malcolm <dmalcolm@redhat.com>
15105 Paul Hua <paul.hua.gm@gmail.com>
15108 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
15110 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
15112 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
15113 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
15114 resp. SFmode cases.
15116 2018-03-15 Tamar Christina <tamar.christina@arm.com>
15119 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15120 instead of GET_MODE_SIZE when comparing Units.
15122 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
15125 * varasm.c (hash_section): Return an unchangeble hash value
15126 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
15127 Return !aarch64_can_use_per_function_literal_pools_p ().
15129 2018-03-15 Jakub Jelinek <jakub@redhat.com>
15132 * optabs.c (emit_conditional_move): Pass address of cmode's copy
15133 rather than address of cmode as last argument to prepare_cmp_insn.
15135 2018-03-15 Julia Koval <julia.koval@intel.com>
15137 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
15138 F_AVX512VNNI, F_AVX512BITALG): New.
15140 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
15143 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
15144 insn for floating-point loads and stores.
15146 2018-03-14 Carl Love <cel@us.ibm.com>
15148 * config/rs6000/rs6000-c.c: Add macro definitions for
15149 ALTIVEC_BUILTIN_VEC_PERMXOR.
15150 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
15151 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
15152 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
15153 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
15155 * config/doc/extend.texi: Add prototypes for vec_permxor.
15157 2018-03-14 David Malcolm <dmalcolm@redhat.com>
15160 * diagnostic-show-locus.c (class layout_point): Convert m_line
15161 from int to linenum_type.
15162 (line_span::comparator): Use linenum "compare" function when
15163 comparing line numbers.
15164 (test_line_span): New function.
15165 (layout_range::contains_point): Convert param "row" from int to
15167 (layout_range::intersects_line_p): Likewise.
15168 (layout::will_show_line_p): Likewise.
15169 (layout::print_source_line): Likewise.
15170 (layout::should_print_annotation_line_p): Likewise.
15171 (layout::print_annotation_line): Likewise.
15172 (layout::print_leading_fixits): Likewise.
15173 (layout::annotation_line_showed_range_p): Likewise.
15174 (struct line_corrections): Likewise for field m_row.
15175 (line_corrections::line_corrections): Likewise for param "row".
15176 (layout::print_trailing_fixits): Likewise.
15177 (layout::get_state_at_point): Likewise.
15178 (layout::get_x_bound_for_row): Likewise.
15179 (layout::print_line): Likewise.
15180 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15181 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15182 * input.c (selftest::test_linenum_comparisons): New function.
15183 (selftest::input_c_tests): Call it.
15184 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15185 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15186 * selftest.h (ASSERT_GT): New macro.
15187 (ASSERT_GT_AT): New macro.
15188 (ASSERT_LT): New macro.
15189 (ASSERT_LT_AT): New macro.
15191 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15193 PR rtl-optimization/84780
15194 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15196 2018-03-14 Martin Liska <mliska@suse.cz>
15198 * tree.c (record_node_allocation_statistics): Use
15199 get_stats_node_kind.
15200 (get_stats_node_kind): New function extracted from
15201 record_node_allocation_statistics.
15202 (free_node): Use get_stats_node_kind.
15204 2018-03-14 Richard Biener <rguenther@suse.de>
15206 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15207 that the value-set of ANTIC_IN doesn't grow.
15210 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15212 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15213 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15215 2018-03-14 Julia Koval <julia.koval@intel.com>
15217 * config.gcc (icelake-client, icelake-server): New.
15219 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15220 (initial_ix86_arch_features): Ditto.
15221 (PTA_SKYLAKE): Add SGX.
15222 (PTA_ICELAKE): Remove.
15223 (PTA_ICELAKE_CLIENT): New.
15224 (PTA_ICELAKE_SERVER): New.
15225 (ix86_option_override_internal): Split up icelake on icelake client and
15227 (get_builtin_code_for_version): Ditto.
15228 (fold_builtin_cpu): Ditto.
15229 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15230 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15231 * config/i386/i386.h (processor_type): Ditto.
15232 * doc/invoke.texi: Ditto.
15234 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15237 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15238 INTEGER_CST offset, add it together with bitpos / 8 and
15239 sign extend based on POINTER_SIZE.
15243 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15246 * config/i386/constraints.md (Yc): New register constraint.
15247 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15248 Use Yc constraint for alternative 2 of operand 0. Remove
15249 preferred_for_speed attribute.
15251 2018-03-14 Richard Biener <rguenther@suse.de>
15253 PR tree-optimization/84830
15254 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15255 with the old one to avoid oscillations.
15257 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15260 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15262 (assign_by_spills): Return a flag of reload assignment failure.
15263 Do not process the reload assignment failures. Do not spill other
15264 reload pseudos if they has the same reg class. Update n if
15266 (lra_assign): Add a return arg. Set up from the result of
15267 assign_by_spills call.
15268 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15269 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15270 usage_insns if it is not NULL.
15271 (spill_hard_reg_in_range): New function.
15272 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15273 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15274 function prototypes.
15275 (lra_assign): Change prototype.
15276 * lra.c (lra): Add code to deal with fails by splitting hard reg
15279 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15281 * config/riscv/riscv.opt (mrelax): New option.
15282 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15283 "norelax" when riscv_mrelax is disabled.
15284 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15286 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15289 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15290 reassociation for int modes.
15292 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15294 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15295 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15297 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15298 * config/aarch64/aarch64-sve.md
15299 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15300 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15301 (*extend<mode><Vwide>2): Rename to...
15302 (aarch64_sve_extend<mode><Vwide>2): ...this.
15303 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15304 renaming the old pattern to...
15305 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15307 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15308 define_expand, renaming the old pattern to...
15309 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15310 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15311 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15312 account when deciding which SVE instruction the optab should use.
15313 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15315 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15317 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15318 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15319 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15320 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15321 (tlsdesc_small_<mode>): Turn a define_expand and use
15322 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15323 (tlsdesc_small_advsimd_<mode>): ...this.
15324 (tlsdesc_small_sve_<mode>): New pattern.
15326 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15328 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15329 (UNSPEC_UMUL_HIGHPART): New constants.
15330 (MUL_HIGHPART): New int iteraor.
15331 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15332 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15334 (*<su>mul<mode>3_highpart): New define_insn.
15336 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15339 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15342 2018-03-13 Martin Liska <mliska@suse.cz>
15345 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15347 (sem_item_optimizer::~sem_item_optimizer): Release it.
15348 (sem_item_optimizer::merge_classes): Register variable aliases.
15349 (sem_item_optimizer::fixup_pt_set): New function.
15350 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15351 * ipa-icf.h: Declare new variables and functions.
15353 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15355 PR middle-end/84834
15356 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15357 integer_pow2p@2 and test integer_pow2p in condition.
15358 (A < 0 ? C : 0): Similarly for @1.
15360 PR middle-end/84831
15361 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15362 characters starting at p contain '\0' character, don't look beyond
15366 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15367 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15370 * reg-stack.c (change_stack): Change update_end var from int to
15371 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15372 also call set_block_for_insn on the newly added insns and rescan.
15375 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15376 on the last operand.
15379 * tree.c (stabilize_reference_1): Return save_expr (e) for
15380 STATEMENT_LIST even if it doesn't have side-effects.
15382 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15384 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15386 2018-03-12 Renlin Li <renlin.li@arm.com>
15388 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15389 aarch64_output_scalar_simd_mov_immediate.
15391 2018-03-12 Martin Sebor <msebor@redhat.com>
15393 PR tree-optimization/83456
15394 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15395 for perfectly overlapping calls to memcpy.
15396 (gimple_fold_builtin_memory_chk): Same.
15397 (gimple_fold_builtin_strcpy): Handle no-warning.
15398 (gimple_fold_builtin_stxcpy_chk): Same.
15399 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15401 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15403 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15404 parameter. Use it for SFmode.
15405 (rs6000_function_arg_advance_1): Adjust.
15406 (rs6000_function_arg): Adjust.
15407 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15409 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15411 PR rtl-optimization/84169
15412 PR rtl-optimization/84780
15413 * combine.c (can_combine_p): Check for a 2-insn combination whether
15414 the destination register is used between the two insns, too.
15416 2018-03-12 Richard Biener <rguenther@suse.de>
15418 PR tree-optimization/84803
15419 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15420 for refs DR analysis didn't process.
15422 2018-03-12 Richard Biener <rguenther@suse.de>
15424 PR tree-optimization/84777
15425 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15426 force-vectorize loops ignore whether we are optimizing for size.
15428 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15430 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15431 (TARGET_MD_ASM_ADJUST): Define.
15433 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15434 Kito Cheng <kito.cheng@gmail.com>
15435 Chung-Ju Wu <jasonwucj@gmail.com>
15437 * config/nds32/nds32.c (nds32_compute_stack_frame,
15438 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15439 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15440 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15441 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15442 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15443 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15444 * config/nds32/nds32.md (prologue, epilogue): Use macro
15445 NDS32_V3PUSH_AVAILABLE_P to do checking.
15447 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15450 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15451 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15452 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15453 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15454 addition of most attributes on !orig_type_die or the attribute not
15455 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15457 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15458 Chung-Ju Wu <jasonwucj@gmail.com>
15460 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15461 __NDS32_VH__ macro.
15462 * config/nds32/nds32.opt (mvh): New option.
15464 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15465 Chung-Ju Wu <jasonwucj@gmail.com>
15467 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15469 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15470 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15473 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15474 Chung-Ju Wu <jasonwucj@gmail.com>
15476 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15478 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15479 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15481 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15482 Kito Cheng <kito.cheng@gmail.com>
15483 Chung-Ju Wu <jasonwucj@gmail.com>
15485 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15486 UNSPEC_FFMISM and UNSPEC_FLMISM.
15487 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15488 for ffb, ffmism and flmism.
15489 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15490 (unspec_ffmism): Ditto.
15491 (unspec_flmism): Ditto.
15492 (nds32_expand_builtin_impl): Check if string extension is available.
15493 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15494 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15496 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15499 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15502 * lra-assigns.c (assign_by_spills): Return a flag of reload
15503 assignment failure. Do not process the reload assignment
15504 failures. Do not spill other reload pseudos if they has the same
15506 (lra_assign): Add a return arg. Set up from the result of
15507 assign_by_spills call.
15508 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15509 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15510 usage_insns if it is not NULL.
15511 (spill_hard_reg_in_range): New function.
15512 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15513 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15514 function prototypes.
15515 (lra_assign): Change prototype.
15516 * lra.c (lra): Add code to deal with fails by splitting hard reg
15519 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15522 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15524 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15527 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15528 (dw_val_node): Add val_symbolic_view.
15529 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15530 (symview_upper_bound): New.
15531 (new_line_info_table): Initialize symviews_since_reset.
15532 (dwarf2out_source_line): Count symviews_since_reset and set
15533 symview_upper_bound.
15534 (dw_val_equal_p): Handle symview.
15535 (add_AT_symview): New.
15536 (print_dw_val): Handle symview.
15537 (attr_checksum, attr_checksum_ordered): Likewise.
15538 (same_dw_val_p, size_of_die): Likewise.
15539 (value_format, output_die): Likewise.
15540 (add_high_low_attributes): Use add_AT_symview for entry_view.
15541 (dwarf2out_finish): Reset symview_upper_bound, clear
15544 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15547 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15548 Add strict argument and use it.
15549 (rs6000_split_multireg_move): Update for new strict argument.
15550 (mem_operand_gpr): Disallow all non-offsettable addresses.
15551 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15553 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15556 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15557 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15558 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15561 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15562 decl, use remap_type if we want to use the type.
15564 2018-03-09 Martin Sebor <msebor@redhat.com>
15566 PR tree-optimization/84526
15567 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15569 (builtin_access::generic_overlap): Be prepared to handle non-array
15572 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15574 PR rtl-optimization/84682
15575 * lra-constraints.c (process_address_1): Check is_address flag
15576 for address constraints.
15577 (process_alt_operands): Likewise.
15578 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15579 preprocess_constraints.
15580 * recog.h (preprocess_constraints): Add oploc parameter.
15582 * recog.c (preprocess_constraints): Test address_operand for
15583 CT_ADDRESS constraints.
15585 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15588 * lra-assigns.c (assign_by_spills): Return a flag of reload
15589 assignment failure. Do not process the reload assignment
15590 failures. Do not spill other reload pseudos if they has the same
15592 (lra_assign): Add a return arg. Set up from the result of
15593 assign_by_spills call.
15594 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15595 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15596 usage_insns if it is not NULL.
15597 (spill_hard_reg_in_range): New function.
15598 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15599 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15600 function prototypes.
15601 (lra_assign): Change prototype.
15602 * lra.c (lra): Add code to deal with fails by splitting hard reg
15605 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15608 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15609 Accept complain bool parameter. Only emit errors if it is true.
15610 (arm_parse_cpu_option_name): Likewise.
15611 (arm_target_thumb_only): Adjust callers of the above.
15612 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15613 prototype to take a default true bool parameter.
15614 (arm_parse_arch_option_name): Likewise.
15616 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15617 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15621 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15622 * configure: Regenerate.
15623 * configure.ac ("linker --version-script option"): New.
15624 ("linker soname option"): New.
15626 2018-03-09 Richard Biener <rguenther@suse.de>
15628 PR tree-optimization/84775
15629 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15630 immediate uses of predicate stmts and mark them modified.
15633 PR tree-optimization/84178
15634 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15636 (version_loop_for_if_conversion): Delay update_ssa call.
15637 (tree_if_conversion): Delay update_ssa until after predicate
15640 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15643 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15644 when the function accesses prior frames.
15646 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15649 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15650 gen_llsym, otherwise call maybe_gen_llsym.
15652 PR inline-asm/84742
15653 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15654 has ',' character inside of it.
15656 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15659 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15660 as clobbering CC_REGNUM.
15662 2018-03-08 Richard Biener <rguenther@suse.de>
15664 PR middle-end/84552
15665 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15666 (follow_copies_to_constant): Do not follow SSA names registered
15669 2018-03-08 Richard Biener <rguenther@suse.de>
15671 PR tree-optimization/84178
15672 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15674 (version_loop_for_if_conversion): Delay update_ssa call.
15675 (tree_if_conversion): Delay update_ssa until after predicate
15678 2018-03-08 David Malcolm <dmalcolm@redhat.com>
15680 PR tree-optimization/84178
15681 * tree-if-conv.c (release_bb_predicate): Remove the
15682 the assertion that the stmts have NULL use_ops.
15683 Discard the statements, asserting that they haven't
15684 yet been added to a BB.
15686 2018-03-08 Richard Biener <rguenther@suse.de>
15688 PR tree-optimization/84746
15689 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15690 (phi_translate): Pass in destination ANTIC_OUT set.
15691 (phi_translate_1): Likewise. For a simplified result lookup
15692 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15693 (phi_translate_set): Adjust.
15694 (do_pre_regular_insertion): Likewise.
15695 (do_pre_partial_partial_insertion): Likewise.
15697 2018-03-08 Martin Liska <mliska@suse.cz>
15699 PR gcov-profile/84735
15700 * doc/gcov.texi: Document usage of profile files.
15701 * gcov-io.h: Document changes in the format.
15703 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
15707 * dwarf2out.c (struct dw_line_info_table): Update comments for
15709 (FORCE_RESET_NEXT_VIEW): New.
15710 (FORCE_RESETTING_VIEW_P): New.
15711 (RESETTING_VIEW_P): Check for -1 too.
15712 (ZERO_VIEW_P): Likewise.
15713 (new_line_info_table): Force-reset next view.
15714 (dwarf2out_begin_function): Likewise.
15715 (dwarf2out_source_line): Simplify zero_view_p initialization.
15716 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15717 view directly. Omit view when omitting .loc at line 0.
15719 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15721 PR tree-optimization/84740
15722 * tree-switch-conversion.c (process_switch): Call build_constructors
15723 only if info.phi_count is non-zero.
15725 PR tree-optimization/84739
15726 * tree-tailcall.c (find_tail_calls): Check call arguments against
15727 DECL_ARGUMENTS (current_function_decl) rather than
15728 DECL_ARGUMENTS (func) when checking for tail recursion.
15730 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15732 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15733 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15734 Volker Reichelt's entry and add entries for people that perform
15735 GCC fuzzy testing and report numerous bugs.
15737 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
15740 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15741 readonly data in sdata, if that is disabled.
15742 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15743 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15744 -mreadonly-in-sdata option.
15746 2018-03-07 Martin Sebor <msebor@redhat.com>
15748 PR tree-optimization/84468
15749 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15750 basic block when looking for nul assignment.
15752 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
15755 * except.h (output_function_exception_table): Adjust prototype.
15756 * except.c (output_function_exception_table): Remove FNNAME parameter
15757 and add SECTION parameter. Ouput one part of the table at a time.
15758 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15759 the first part of the exception table and emit unwind directives.
15760 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15761 (i386_pe_seh_cold_init): Likewise.
15762 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15763 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15764 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15765 (ix86_output_call_insn): Emit a nop in one more case for SEH.
15766 * config/i386/winnt.c: Include except.h.
15767 (struct seh_frame_state): Add reg_offset, after_prologue and
15768 in_cold_section fields.
15769 (i386_pe_seh_end_prologue): Set seh->after_prologue.
15770 (i386_pe_seh_cold_init): New function.
15771 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15772 to seh->in_cold_section.
15773 (seh_emit_push): Record the offset of the push.
15774 (seh_emit_save): Record the offet of the save.
15775 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15776 Test seh->after_prologue to disregard the epilogue.
15777 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15778 (i386_pe_end_cold_function): New function.
15780 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15783 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15784 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15787 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15789 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15790 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15792 PR middle-end/84723
15793 * multiple_target.c: Include tree-inline.h and intl.h.
15794 (expand_target_clones): Diagnose and fail if node->definition and
15795 !tree_versionable_function_p (node->decl).
15797 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15799 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15801 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15802 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15803 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15805 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15808 * combine.c (try_combine): Use reg_or_subregno instead of handling
15809 just paradoxical SUBREGs and REGs.
15811 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15813 * config/arc/arc.c (arc_finalize_pic): Remove function.
15814 (arc_must_save_register): We use single base PIC register, remove
15815 checks to save/restore the PIC register.
15816 (arc_expand_prologue): Likewise.
15817 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15819 (arc_verify_short): Likewise.
15820 (arc_attr_type): Likewise.
15821 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15822 (walk_stores): Likewise.
15823 (arc_address_cost): Make it static.
15824 (arc_verify_short): Likewise.
15825 (branch_dest): Likewise.
15826 (arc_attr_type): Likewise.
15827 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15828 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15829 (arc_final_prescan_insn): Remove inserting the nops due to
15830 hardware hazards. It is done in reorg step.
15831 (insn_length_variant_t): Remove.
15832 (insn_length_parameters_t): Likewise.
15833 (arc_insn_length_parameters): Likewise.
15834 (arc_get_insn_variants): Likewise.
15835 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15837 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15839 PR inline-asm/84683
15840 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15843 PR tree-optimization/84687
15844 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15846 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15848 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15850 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15851 Rename to ppc_speculation_barrier.
15852 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15853 __builtin_ppc_speculation_barrier.
15855 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15858 * combine.c (combine_simplify_rtx): Don't try to simplify if
15859 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15862 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
15864 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15865 to 32 bytes when compiling for POWER9.
15867 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15870 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15871 regparm >= 3 with no arg reg available also for calls with
15872 flag_force_indirect_call. Pass decl to ix86_function_regparm.
15875 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15877 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
15879 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
15882 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15884 2018-03-05 Richard Biener <rguenther@suse.de>
15886 PR tree-optimization/84486
15887 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15888 When inserting a __builtin_assume_aligned call set the LHS
15889 SSA name alignment info accordingly.
15891 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
15893 PR tree-optimization/84114
15894 * config/aarch64/aarch64.c (aarch64_reassociation_width)
15895 Avoid reassociation of FLOAT_MODE addition.
15897 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
15899 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15900 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15901 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15902 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15903 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15904 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15905 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15907 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15908 __builtin_ia32_wbinvd): New builtins.
15909 (SPECIAL_ARGS2): New.
15910 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15911 (SPECIAL_ARGS2): New.
15912 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15913 (ix86_valid_target_attribute_inner_p): Ditto.
15914 (ix86_init_mmx_sse_builtins): Add special_args2.
15915 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15916 TARGET_WBNOINVD_P): New.
15917 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15918 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15919 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15920 * config/i386/immintrin.h (_wbinvd): New intrinsic.
15921 * config/i386/pconfigintrin.h: New file.
15922 * config/i386/wbnoinvdintrin.h: Ditto.
15923 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15925 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15927 2018-03-05 Richard Biener <rguenther@suse.de>
15929 PR tree-optimization/84670
15930 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15932 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15933 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15934 (compute_antic_aux): Only assert the number of values in ANTIC_IN
15935 doesn't grow if all successors (recursively) were visited at least
15938 2018-03-05 Richard Biener <rguenther@suse.de>
15940 PR tree-optimization/84650
15941 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15942 if executed in the loop pipeline.
15944 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
15946 * doc/configfiles.texi (Configuration Files): Move info about
15947 conditionalizing $target-protos.h to...
15948 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
15949 differs from $target-protos.h.
15951 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
15952 Chung-Ju Wu <jasonwucj@gmail.com>
15954 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15955 * config/nds32/nds32-multiple.md (setmemsi): Define.
15956 * config/nds32/nds32-memory-manipulation.c
15957 (nds32_gen_dup_4_byte_to_word_value): New.
15958 (emit_setmem_word_loop): New.
15959 (emit_setmem_byte_loop): New.
15960 (nds32_expand_setmem_loop): New.
15961 (nds32_expand_setmem_loop_v3m): New.
15962 (nds32_expand_setmem_unroll): New.
15963 (nds32_expand_setmem): New.
15965 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15966 Chung-Ju Wu <jasonwucj@gmail.com>
15968 * config/nds32/nds32-memory-manipulation.c
15969 (nds32_emit_load_store): New.
15970 (nds32_emit_post_inc_load_store): New.
15971 (nds32_emit_mem_move): New.
15972 (nds32_emit_mem_move_block): New.
15973 (nds32_expand_movmemsi_loop_unknown_size): New.
15974 (nds32_expand_movmemsi_loop_known_size): New.
15975 (nds32_expand_movmemsi_loop): New.
15976 (nds32_expand_movmemsi_unroll): New.
15977 (nds32_expand_movmemqi): Rename ...
15978 (nds32_expand_movmemsi): ... to this.
15979 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15980 (movmemsi): ... to this.
15981 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15982 (nds32_expand_movmemsi): ... to this.
15984 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15985 Monk Chiang <sh.chiang04@gmail.com>
15986 Chung-Ju Wu <jasonwucj@gmail.com>
15988 * config/nds32/nds32-protos.h
15989 (nds32_expand_load_multiple): New arguments.
15990 (nds32_expand_store_multiple): Ditto.
15991 (nds32_valid_multiple_load_store): Rename ...
15992 (nds32_valid_multiple_load_store_p): ... to this.
15993 * config/nds32/nds32-memory-manipulation.c
15994 (nds32_expand_load_multiple): Refine implementation.
15995 (nds32_expand_store_multiple): Ditto.
15996 * config/nds32/nds32-multiple.md
15997 (load_multiple): Update nds32_expand_load_multiple interface.
15998 (store_multiple): Update nds32_expand_store_multiple interface.
15999 * config/nds32/nds32-predicates.c
16000 (nds32_valid_multiple_load_store): Rename ...
16001 (nds32_valid_multiple_load_store_p): ... to this and refine
16003 * config/nds32/predicates.md
16004 (nds32_load_multiple_and_update_address_operation): New predicate.
16005 (nds32_store_multiple_and_update_address_operation): New predicate.
16007 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
16008 Chung-Ju Wu <jasonwucj@gmail.com>
16010 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
16011 (combo): New attribute.
16012 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
16014 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
16016 * config/nds32/nds32.opt: Change -mcmodel= default value.
16018 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
16019 Monk Chiang <sh.chiang04@gmail.com>
16020 Chung-Ju Wu <jasonwucj@gmail.com>
16022 * config/nds32/constants.md (unspec_element): New enum.
16023 * config/nds32/constraints.md (Umw): New constraint.
16024 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
16025 * config/nds32/nds32-intrinsic.md: Likewise.
16026 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
16027 (nds32_valid_smw_lwm_base_p): New.
16028 (nds32_output_smw_single_word): New.
16029 (nds32_output_lmw_single_word): New.
16030 (nds32_expand_unaligned_load): New.
16031 (nds32_expand_unaligned_store): New.
16032 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
16033 (nds32_output_smw_single_word): Declare.
16034 (nds32_output_lmw_single_word): Declare.
16035 (nds32_expand_unaligned_load): Declare.
16036 (nds32_expand_unaligned_store): Declare.
16037 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
16038 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
16039 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
16040 NDS32_BUILTIN_UASTORE_DW.
16041 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
16044 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
16045 Kito Cheng <kito.cheng@gmail.com>
16046 Chung-Ju Wu <jasonwucj@gmail.com>
16048 * config/nds32/nds32-intrinsic.c
16049 (nds32_expand_builtin_null_ftype_reg): Delete.
16050 (nds32_expand_builtin_reg_ftype_imm): Ditto.
16051 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
16052 (nds32_read_argument): New.
16053 (nds32_legitimize_target): Ditto.
16054 (nds32_legitimize_argument): Ditto.
16055 (nds32_check_constant_argument): Ditto.
16056 (nds32_expand_unop_builtin): Ditto.
16057 (nds32_expand_unopimm_builtin): Ditto.
16058 (nds32_expand_binop_builtin): Ditto.
16059 (nds32_builtin_decl_impl): Ditto.
16060 (builtin_description): Ditto.
16061 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
16062 (nds32_init_builtins_impl): Ditto.
16063 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
16064 (nds32_builtin_decl): New.
16065 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
16066 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
16068 2018-03-02 Jeff Law <law@redhat.com>
16070 * reorg.c (stop_search_p): Handle DEBUG_INSN.
16071 (redundant_insn, fill_simple_delay_slots): Likewise.
16072 (fill_slots_from_thread): Likewise.
16073 * resource.c (mark_referenced_resources): Likewise.
16074 (mark_set_resources, find_dead_or_set_registers): Likewise.
16076 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16078 * substring-locations.h (format_warning_va): Formatting fix for
16079 ATTRIBUTE_GCC_DIAG.
16080 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
16082 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
16083 * substring-locations.c: Include intl.h.
16084 (format_warning_va): Turned into small wrapper around
16085 format_warning_n_va, renamed to ...
16086 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
16087 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
16089 (format_warning_at_substring_n): New function.
16090 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
16091 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
16092 format_warning_at_substring with just a shorter name instead of
16093 const function pointer.
16094 (fmtwarn_n): New function.
16095 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
16096 appropriate, get rid of all the fmtstr temporaries, move conditionals
16097 with G_() wrapped string literals directly into fmtwarn arguments,
16098 cast dir.len to (int), formatting fixes.
16100 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
16102 * doc/invoke.texi: Remove "Cilk Plus" references.
16104 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16105 Richard Biener <rguenther@suse.de>
16108 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
16109 for error or warning attributes if CALL_FROM_THUNK_P is set.
16112 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16115 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
16116 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
16119 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
16120 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
16122 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
16123 instead of -1U in last predictors element's probability member.
16125 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16128 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16129 arguments if they are comparable.
16131 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16133 PR tree-optimization/84634
16134 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
16135 masks and masked_loop_p with a single loop_masks, making sure it's
16136 null for bb vectorization.
16138 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
16140 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
16141 (vect_analyze_data_ref_access): Use loop->safe_len rather than
16142 loop->force_vectorize to check whether there is no alias.
16144 2018-03-02 Jakub Jelinek <jakub@redhat.com>
16147 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
16149 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
16151 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
16152 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
16153 instead of a loop around prev_real_insn.
16154 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
16157 PR inline-asm/84625
16158 * config/i386/i386.c (ix86_print_operand): Use conditional
16159 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
16162 2018-03-02 Richard Biener <rguenther@suse.de>
16164 PR tree-optimization/84427
16165 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
16166 (bitmap_set_subtract_values): Rewrite to handle multiple
16169 (prune_clobbered_mems): Likewise.
16170 (phi_translate): Take edge instead of pred/phiblock.
16171 (phi_translate_1): Likewise.
16172 (phi_translate_set): Likewise. Insert all translated
16173 exprs for a value into the set, keeping possibly multiple
16174 expressions per value.
16175 (compute_antic_aux): Adjust for phi_translate changes.
16176 When intersecting union the expressions and prune those
16177 not in the final value set, keeping possibly multiple
16178 expressions per value. Do not use value-insertion
16179 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16180 all expressions. Add verification that the value-sets
16181 only shrink during iteration.
16182 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16183 (do_pre_regular_insertion): Likewise.
16184 (do_pre_partial_partial_insertion): Likewise.
16186 2018-03-02 Richard Biener <rguenther@suse.de>
16189 * config/darwin.c (saved_debug_info_level): New static global.
16190 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16191 (darwin_asm_lto_end): Restore debug info generation settings.
16193 2018-03-01 Martin Liska <mliska@suse.cz>
16196 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16197 volatile arguments.
16199 2018-03-01 Richard Biener <rguenther@suse.de>
16202 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16203 type annotation with LTO when debug was disabled at compile-time.
16205 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16207 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16209 (mips_final_postscan_insn): Likewise.
16211 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16213 PR rtl-optimization/84528
16214 * alias.c (init_alias_target): Add commentary.
16215 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16216 a unique base value if the frame pointer is not eliminated
16217 to the stack pointer.
16219 2018-03-01 Tom de Vries <tom@codesourcery.com>
16221 PR rtl-optimization/83327
16222 * lra-int.h (hard_regs_spilled_into): Declare.
16223 * lra.c (hard_regs_spilled_into): Define.
16224 (init_reg_info): Init hard_regs_spilled_into.
16225 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16226 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16227 (process_bb_lives): Handle hard_regs_spilled_into.
16228 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16229 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16231 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16233 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16234 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16235 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16236 * config/rs6000/aix72.h: New file.
16238 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16240 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16241 instead of warning_at with conditional singular and plural messages
16245 * stor-layout.c (update_alignment_for_field): For
16246 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16247 && !DECL_PACKED (field), do the alignment update, just use
16248 only desired_align instead of MAX (type_align, desired_align)
16250 (place_field): Don't do known_align < desired_align handling
16251 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16252 is non-NULL, instead do it after rli->prev_field handling and
16253 only if not within a bitfield word. For DECL_PACKED (field)
16254 use type_align of BITS_PER_UNIT.
16256 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16258 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16259 superfluous parentheses and trailing spaces.
16261 2018-02-28 Richard Biener <rguenther@suse.de>
16263 PR tree-optimization/84584
16264 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16265 SCoPs with fake exit edge.
16267 2018-02-28 Martin Liska <mliska@suse.cz>
16270 * timevar.c (timer::print): Fix format to properly print 100%
16273 2018-02-28 Richard Biener <rguenther@suse.de>
16275 PR middle-end/84607
16276 * genmatch.c (capture_info::walk_match): Do not mark
16277 captured expressions without operands as expr_p given
16278 they act more like predicates and should be subject to
16279 "lost tail" side-effect preserving.
16281 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16283 PR rtl-optimization/81611
16284 * auto-inc-dec.c (attempt_change): Move dead note from
16285 mem_insn if it's the next use of regno
16286 (find_address): Take address use of reg holding
16287 non-incremented value. Add parm to limit search to the named
16289 (merge_in_block): Attempt to use a mem insn that is the next
16290 use of the original regno.
16292 2018-02-27 Martin Sebor <msebor@redhat.com>
16295 * doc/invoke.texi (-Wmissing-attributes): New option.
16296 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16298 2018-02-27 Martin Sebor <msebor@redhat.com>
16300 PR translation/84207
16301 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16302 n argument to unsigned HOST_WIDE_INT.
16303 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16304 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16305 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16306 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16308 2018-02-27 Richard Biener <rguenther@suse.de>
16310 PR tree-optimization/84512
16311 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16312 Do not use the estimate returned from record_stmt_cost for
16313 the scalar iteration cost but sum properly using add_stmt_cost.
16315 2018-02-27 Richard Biener <rguenther@suse.de>
16317 PR tree-optimization/84466
16318 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16319 Adjust last change to less strictly validate use operands.
16321 2018-02-27 Martin Liska <mliska@suse.cz>
16323 PR gcov-profile/84548
16324 * gcov.c (process_file): Allow partial overlap and consider it
16325 also as group functions.
16326 (output_lines): Properly calculate range of lines for a group.
16328 2018-02-27 Martin Liska <mliska@suse.cz>
16330 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16331 'ggc' suffixes. Change first column width.
16332 (timer::print): Fix formatting of the column.
16334 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16336 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16337 preserve inline entry blocks for the sake of debug inline
16338 entry point markers alone.
16339 (remove_unused_locals): Suggest in comments a better place to
16340 force the preservation of inline entry blocks that are
16341 otherwise unused, but do not preserve them.
16343 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16345 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16347 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16350 * config/i386/constraints.md (Bs): Replace
16351 ix86_indirect_branch_register with
16352 TARGET_INDIRECT_BRANCH_REGISTER.
16354 * config/i386/i386.md (indirect_jump): Likewise.
16355 (tablejump): Likewise.
16356 (*sibcall_memory): Likewise.
16357 (*sibcall_value_memory): Likewise.
16358 Peepholes of indirect call and jump via memory: Likewise.
16359 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16360 (*sibcall_value_GOT_32): Likewise.
16361 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16362 (GOT_memory_operand): Likewise.
16363 (call_insn_operand): Likewise.
16364 (sibcall_insn_operand): Likewise.
16365 (GOT32_symbol_operand): Likewise.
16366 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16368 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16370 PR rtl-optimization/83496
16371 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16372 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16373 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16374 redundant insn, if any.
16375 (relax_delay_slots): Likewise.
16376 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16378 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16380 PR tree-optimization/83965
16381 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16382 that grouped statements are part of a reduction chain. Return
16383 true if the statement is not marked as a reduction itself but
16384 is part of a group.
16385 (vect_recog_dot_prod_pattern): Don't check whether the statement
16386 is part of a group here.
16387 (vect_recog_sad_pattern): Likewise.
16388 (vect_recog_widen_sum_pattern): Likewise.
16390 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16393 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16395 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16398 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16400 (ix86_output_indirect_function_return): New prototype.
16401 (ix86_split_simple_return_pop_internal): Likewise.
16402 * config/i386/i386.c (indirect_return_via_cx): New.
16403 (indirect_return_via_cx_bnd): Likewise.
16404 (indirect_thunk_name): Handle return va CX_REG.
16405 (output_indirect_thunk_function): Create alias for
16406 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16407 (ix86_output_indirect_jmp): Remove the bool argument.
16408 (ix86_output_indirect_function_return): New function.
16409 (ix86_split_simple_return_pop_internal): Likewise.
16410 * config/i386/i386.md (*indirect_jump): Don't pass false
16411 to ix86_output_indirect_jmp.
16412 (*tablejump_1): Likewise.
16413 (simple_return_pop_internal): Change it to define_insn_and_split.
16414 Call ix86_split_simple_return_pop_internal to split it for
16415 -mfunction-return=.
16416 (simple_return_indirect_internal): Call
16417 ix86_output_indirect_function_return instead of
16418 ix86_output_indirect_jmp.
16420 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16423 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16424 memset and value initialization afterwards.
16426 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16428 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16430 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16433 * common/config/aarch64/aarch64-common.c
16434 (aarch_option_optimization_table[]): Switch
16435 off fomit-frame-pointer
16437 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16438 Chung-Ju Wu <jasonwucj@gmail.com>
16440 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16442 (store_multiple): Ditto.
16444 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16446 * config.gcc: Add --with-cpu support for nds32 target.
16447 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16448 * config/nds32/nds32.opt: Add -mcpu= option.
16450 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16452 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16453 isel=yes): Warn for these deprecated options.
16455 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16457 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16458 ISA_2_5_MASKS_EMBEDDED.
16460 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16462 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16463 p->max as pointers rather than using iterative_hash_expr.
16465 2018-02-23 Carl Love <cel@us.ibm.com>
16467 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16468 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16470 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16471 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16472 P8V_BUILTIN_VEC_VUNSIGNED2.
16474 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16477 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16478 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16480 * lra-constraints.c (curr_insn_transform): Set up
16481 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16483 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16484 * lra-eliminations.c (spill_pseudos): Ditto.
16485 (process_insn_for_elimination): Ditto.
16486 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16487 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16488 LRA_NON_CLOBBERED_ALT.
16490 2018-02-22 Martin Sebor <msebor@redhat.com>
16492 PR tree-optimization/84480
16493 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16494 to maybe_diag_stxncpy_trunc. Call it.
16495 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16496 from gimple_fold_builtin_strcpy. Print inlining stack.
16497 (handle_builtin_stxncpy): Print inlining stack.
16498 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16500 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16503 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16504 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16505 and -fcheck-pointer-bounds are used together.
16506 (indirect_thunk_prefix): New enum.
16507 (indirect_thunk_need_prefix): New function.
16508 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16509 "_nt" instead of "_bnd" for NOTRACK prefix.
16510 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16511 (output_indirect_thunk_function): Likewise.
16513 (ix86_code_end): Update output_indirect_thunk_function calls.
16514 (ix86_output_indirect_branch_via_reg): Replace
16515 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16516 (ix86_output_indirect_branch_via_push): Likewise.
16517 (ix86_output_function_return): Likewise.
16518 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16519 incompatible with -fcf-protection=branch and
16520 -fcheck-pointer-bounds.
16522 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16525 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16526 Change gcc_assert call to output_operand_lossage.
16528 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16530 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16532 2018-02-22 DJ Delorie <dj@redhat.com>
16533 Sebastian Perta <sebastian.perta@renesas.com>
16534 Oleg Endo <olegendo@gcc.gnu.org>
16536 * config/rx/rx.c (rx_rtx_costs): New function.
16537 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16539 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16541 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16543 2018-02-22 Martin Liska <mliska@suse.cz>
16546 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16547 Add "native" as a possible value.
16549 2018-02-22 Martin Liska <mliska@suse.cz>
16552 * config/i386/i386.c (ix86_option_override_internal):
16553 Add "native" as a possible value for -march and -mtune.
16555 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16558 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16559 to all type variants.
16561 PR tree-optimization/84503
16562 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16563 width as info->bitpos + info->bitsize - start.
16564 (merged_store_group::merge_overlapping): Simplify width computation.
16565 (check_no_overlap): New function.
16566 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16567 start + width and last_order of the group, fail if check_no_overlap
16569 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16570 to group if check_no_overlap fails.
16572 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16574 * config/rs6000/altivec.md: Delete contraint arguments to
16575 define_expand, define_split, and define_peephole2, and in
16576 define_insn_and_split if always unused.
16577 * config/rs6000/darwin.md: Ditto.
16578 * config/rs6000/dfp.md: Ditto.
16579 * config/rs6000/rs6000.md: Ditto.
16580 * config/rs6000/sync.md: Ditto.
16581 * config/rs6000/vector.md: Ditto.
16582 * config/rs6000/vsx.md: Ditto.
16584 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16586 * config/rs6000/altivec.md: Write output control strings as braced
16587 blocks instead of double-quoted strings.
16588 * config/rs6000/darwin.md: Ditto.
16589 * config/rs6000/rs6000.md: Ditto.
16590 * config/rs6000/vector.md: Ditto.
16591 * config/rs6000/vsx.md: Ditto.
16593 2018-02-21 Jason Merrill <jason@redhat.com>
16595 PR c++/84314 - ICE with templates and fastcall attribute.
16596 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16598 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16600 * ipa-cp.c (determine_versionability): Fix comment typos.
16602 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16605 * ipa-cp.c (determine_versionability): Do not version functions caling
16608 2018-02-21 Martin Liska <mliska@suse.cz>
16611 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16612 Add "native" as a possible value.
16613 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16614 the macro when native cpu detection is available.
16616 2018-02-21 Martin Liska <mliska@suse.cz>
16619 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16620 Add "native" as a possible value.
16621 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16622 when native cpu detection is available.
16624 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16625 Martin Sebor <msebor@redhat.com>
16627 PR tree-optimization/84478
16628 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16630 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16631 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16632 support which is conservatively correct, for 2 only stay conservative
16633 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16634 argument to the 2 argument get_range_strlen, adjust 6 arg
16635 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16637 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16638 (gimple_fold_builtin_strlen): Pass true as last argument to
16641 2018-02-20 Martin Sebor <msebor@redhat.com>
16643 PR middle-end/84095
16644 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16645 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16646 (builtin_memref::builtin_memref): Factor out parts into
16647 set_base_and_offset and call it.
16649 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16651 PR middle-end/84406
16652 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16653 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16654 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16655 search at the associated MODE_INT.
16657 2018-02-20 Jeff Law <law@redhat.com>
16659 PR middle-end/82123
16660 PR tree-optimization/81592
16661 PR middle-end/79257
16662 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16663 for range data rather than using global data.
16664 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16665 range data rather than using global data.
16666 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16667 pass it to children as needed.
16668 (struct directive::fmtresult): Similarly.
16669 (struct directive::set_width): Similarly.
16670 (struct directive::set_precision): Similarly.
16671 (format_integer, format_directive, parse_directive): Similarly.
16672 (format_none): Accept unnamed vr_values parameter.
16673 (format_percent, format_floating, format_character): Similarly.
16674 (format_string, format_plain): Similarly.
16675 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16676 the EVRP range analyzer for range data rather than using global data.
16677 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16678 gimple-ssa-evrp-analyze.h
16679 (class sprintf_dom_walker): Add after_dom_children member function.
16680 Add evrp_range_analyzer member.
16681 (sprintf_dom_walker::before_dom_children): Call into the EVRP
16682 range analyzer as needed.
16683 (sprintf_dom_walker::after_dom_children): New member function.
16684 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16686 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16687 (evrp_range_analyzer::pop_to_marker): Likewise.
16689 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16691 PR tree-optimization/84419
16692 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16693 with the required type if its current type is compatible but
16696 2018-02-20 Jakub Jelinek <jakub@redhat.com>
16698 PR middle-end/82004
16699 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16700 after vectorization.
16702 2018-02-20 Martin Liska <mliska@suse.cz>
16705 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16706 possible values if we don't have a hint.
16708 2018-02-20 Martin Liska <mliska@suse.cz>
16712 * final.c (shorten_branches): Build align_tab array with one
16714 * opts.c (finish_options): Add alignment option limit check.
16715 (MAX_CODE_ALIGN): Likewise.
16716 (MAX_CODE_ALIGN_VALUE): Likewise.
16717 * doc/invoke.texi: Document maximum allowed option value for
16718 all -falign-* options.
16720 2018-02-19 Jakub Jelinek <jakub@redhat.com>
16723 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16724 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16725 * var-tracking.c (emit_note_insn_var_location): Remove all references
16726 to NOTE_INSN_CALL_ARG_LOCATION.
16727 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16728 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16729 Use copy_rtx_if_shared.
16730 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16731 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16732 (dwarf2out_var_location): Remove handling of
16733 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16735 * final.c (final_scan_insn): Remove all references to
16736 NOTE_INSN_CALL_ARG_LOCATION.
16737 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
16738 before dumping final insns.
16739 * except.c (emit_note_eh_region_end): Remove all references to
16740 NOTE_INSN_CALL_ARG_LOCATION.
16741 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16742 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16743 * config/arc/arc.c (hwloop_optimize): Likewise.
16744 * config/arm/arm.c (create_fix_barrier): Likewise.
16745 * config/s390/s390.c (s390_chunkify_start): Likewise.
16746 * config/sh/sh.c (find_barrier): Likewise.
16747 * config/i386/i386.c (rest_of_insert_endbranch,
16748 ix86_seh_fixup_eh_fallthru): Likewise.
16749 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16750 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16751 * config/frv/frv.c (frv_function_prologue): Likewise.
16752 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
16754 (note_outside_basic_block_p): Remove all references to
16755 NOTE_INSN_CALL_ARG_LOCATION.
16756 * gengtype.c (adjust_field_rtx_def): Likewise.
16757 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16759 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16760 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16763 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16766 PR tree-optimization/84452
16767 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16768 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16771 2018-02-19 Martin Liska <mliska@suse.cz>
16774 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16776 2018-02-19 Martin Liska <mliska@suse.cz>
16777 Richard Sandiford <richard.sandiford@linaro.org>
16779 PR tree-optimization/82491
16780 * gimple-fold.c (get_base_constructor): Make earlier bail out
16783 2018-02-19 Carl Love <cel@us.ibm.com>
16785 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16786 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16788 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16789 P8V_BUILTIN_VEC_NEG.
16791 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16793 * config/rl78/rl78.md (movdf): New define expand.
16795 2018-02-19 Martin Liska <mliska@suse.cz>
16798 * doc/invoke.texi: Fix typo.
16799 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16801 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16803 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16804 handle rs6000_single_float and rs6000_double_float specially for
16807 2018-02-16 Jeff Law <law@redhat.com>
16809 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16810 (pop_regs): Use it.
16812 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16815 * ipa-inline.c (inline_small_functions): Fix a typo.
16817 2018-02-16 Nathan Sidwell <nathan@acm.org>
16819 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16821 2018-02-16 Carl Love <cel@us.ibm.com>
16823 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16824 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16825 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16826 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16827 expansion to P8V_BUILTIN_VEC_FLOAT2.
16829 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16831 PR rtl-optimization/70023
16832 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16833 src_regno into account.
16835 2018-02-16 Carl Love <cel@us.ibm.com>
16837 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16838 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16839 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16840 * config/rs6000/rs6000.c: Remove case statements for
16841 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16842 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16843 and P9V_BUILTIN_VEC_VINSERT4B.
16844 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16845 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16846 * config/rs6000/vsx.md:
16847 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16850 2018-02-16 Carl Love <cel@us.ibm.com>
16852 * config/rs6000/altivec.h: Add builtin names vec_extract4b
16854 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16856 * config/rs6000/rs6000-c.c: Add the definitions for
16857 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16858 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16859 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16860 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
16861 definition for insert4b and define insn *insert3b_internal.
16862 * doc/extend.texi: Add documentation for vec_extract4b.
16864 2018-02-16 Nathan Sidwell <nathan@acm.org>
16866 * doc/extend.texi (Backwards Compatibility): Mention friend
16867 injection. Note for-scope is deprecated.
16868 * doc/invoke.texi (-ffriend-injection): Deprecate.
16870 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
16872 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16873 that moved to I2, also allow destinations that are a paradoxical
16874 subreg (instead of a normal reg).
16876 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
16879 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16882 2018-02-16 Richard Biener <rguenther@suse.de>
16884 PR tree-optimization/84037
16885 PR tree-optimization/84016
16887 * config/i386/i386.c (ix86_builtin_vectorization_cost):
16888 Adjust vec_construct for the fact we need additional higher latency
16889 128bit inserts for AVX256 and AVX512 vector builds.
16890 (ix86_add_stmt_cost): Scale vector construction cost for
16893 2018-02-16 Richard Biener <rguenther@suse.de>
16895 PR tree-optimization/84417
16896 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16897 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16898 (non_rewritable_lvalue_p): Likewise, use poly-ints.
16900 2018-02-16 Martin Liska <mliska@suse.cz>
16903 * internal-fn.def (ASAN_CHECK): Set proper flags.
16904 (ASAN_MARK): Likewise.
16906 2018-02-16 Julia Koval <julia.koval@intel.com>
16908 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16909 from PTA_CANNONLAKE.
16911 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16914 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16915 Use ++iter rather than iter++ for std::list iterators.
16916 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
16917 defer deleting them until all nodes in the forest are processed. Do
16918 free even leaf nodes. Change to_process into auto_vec.
16921 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16922 * vec.h (vec_default_construct): Use memset instead of placement new
16923 if BROKEN_VALUE_INITIALIZATION is defined.
16924 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16925 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16928 PR rtl-optimization/83723
16929 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16930 * lra.c (lra_substitute_pseudo): Likewise. If true, use
16931 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
16933 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16935 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16937 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
16939 PR rtl-optimization/81443
16940 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16941 from inner REGs to paradoxical SUBREGs.
16943 2018-02-16 Richard Biener <rguenther@suse.de>
16945 PR tree-optimization/84399
16946 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16947 For operands we can analyze at their definition make sure we can
16948 analyze them at each use as well.
16950 2018-02-16 Richard Biener <rguenther@suse.de>
16952 PR tree-optimization/84190
16953 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16954 volatile accesses if the decl isn't volatile.
16956 2018-02-15 Jason Merrill <jason@redhat.com>
16958 PR c++/84314 - ICE with templates and fastcall attribute.
16959 * attribs.c (build_type_attribute_qual_variant): Don't clobber
16960 TYPE_CANONICAL on an existing type.
16962 2018-02-15 Jakub Jelinek <jakub@redhat.com>
16964 PR tree-optimization/84383
16965 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16966 dstoff nor call operand_equal_p if dstbase is NULL.
16968 PR tree-optimization/84334
16969 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16970 also a CONSTANT_CLASS_P, punt.
16972 2018-02-14 Jim Wilson <jimw@sifive.com>
16974 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16975 first SMALL_OPERAND check. New local min_second_step. Move assert
16976 to where locals are set. Add TARGET_RVC support.
16977 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16979 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
16981 * doc/invoke.texi: Correct -Wformat-overflow code sample.
16983 2018-02-14 Martin Sebor <msebor@redhat.com>
16985 PR tree-optimization/83698
16986 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16987 arrays constrain the offset range to their bounds.
16988 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16989 (builtin_access::overlap): Avoid setting the size of overlap if it's
16991 (maybe_diag_overlap): Also consider arrays when deciding what values
16992 of offsets to include in diagnostics.
16994 2018-02-14 Martin Sebor <msebor@redhat.com>
16997 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16998 that correspond to the kind of a declaration.
17000 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
17003 * config/pa/pa.md: Load address of PIC label using the linkage table
17004 if the label is nonlocal.
17006 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
17008 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
17009 warning message if user requests -maltivec=be.
17010 * doc/invoke.texi: Document deprecation of -maltivec=be.
17012 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
17015 * config/rs6000/rs6000-c.c: Update definitions for
17016 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
17017 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
17019 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17022 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
17023 add _get_ssp intrinsics. Remove argument from
17024 __builtin_ia32_rdssp[d|q].
17025 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
17026 * config/i386/i386-builtin.def: Remove argument from
17027 __builtin_ia32_rdssp[d|q].
17028 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
17029 ix86_expand_special_args_builtin for _rdssp[d|q].
17030 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
17031 Clear register before usage.
17032 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
17033 Add documentation for new _get_ssp and _inc_ssp intrinsics.
17035 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
17037 PR tree-optimization/84357
17038 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
17039 operand 1 of an ARRAY_REF too.
17041 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
17044 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
17045 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17047 (set_of_reg): New struct.
17048 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
17049 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
17050 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
17052 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
17053 Split into bitclr, bitset, bitinvert patterns if appropriate.
17054 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
17055 use rx_fuse_in_memory_bitop.
17056 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
17057 to named insn, correct maximum insn length.
17059 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
17062 * machmode.def: Define a complex mode for PARTIAL_INT.
17063 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
17065 * doc/rtl.texi: Document CSPImode.
17066 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
17068 (msp430_hard_regno_nregs_with_padding): Likewise.
17070 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
17073 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
17075 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
17077 PR rtl-optimization/84169
17078 * combine.c (try_combine): New variable split_i2i3. Set it to true if
17079 we generated a parallel as new i3 and we split that to new i2 and i3
17080 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
17081 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
17082 those to i2, not i1. Partially rewrite this scan code.
17084 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17087 * stor-layout.c (place_field): For variable length fields, adjust
17088 offset_align afterwards not just based on the field's alignment,
17089 but also on the size.
17091 PR middle-end/84309
17092 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
17093 of exps and logs in the use_exp2 case.
17095 2018-02-13 Jeff Law <law@redhat.com>
17097 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
17098 entry for "vector".
17100 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
17103 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
17107 * common.opt (gas-loc-support, gas-locview-support): New.
17108 (ginline-points, ginternal-reset-location-views): New.
17109 * doc/invoke.texi: Document them. Use @itemx where intended.
17110 (gvariable-location-views): Adjust.
17111 * target.def (reset_location_view): New.
17112 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
17113 (TARGET_RESET_LOCATION_VIEW): New.
17114 * doc/tm.texi: Rebuilt.
17115 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
17116 (dwarf2out_default_as_locview_support): New.
17117 (output_asm_line_debug_info): Use option variables.
17118 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
17119 (output_loc_list): Likewise.
17120 (add_high_low_attributes): Check option variables.
17121 Don't output entry view attribute in strict mode.
17122 (gen_inlined_subroutine_die): Check option variables.
17123 (dwarf2out_inline_entry): Likewise.
17124 (init_sections_and_labels): Likewise.
17125 (dwarf2out_early_finish): Likewise.
17126 (maybe_reset_location_view): New, from...
17127 (dwarf2out_var_location): ... here. Call it.
17128 * debug.h (dwarf2out_default_as_loc_support): Declare.
17129 (dwarf2out_default_as_locview_support): Declare.
17130 * hooks.c (hook_int_rtx_insn_0): New.
17131 * hooks.h (hook_int_rtx_insn_0): Declare.
17132 * toplev.c (process_options): Take -gas-loc-support and
17133 -gas-locview-support from dwarf2out. Enable
17134 -gvariable-location-views by default only with locview
17135 assembler support. Enable -ginternal-reset-location-views by
17136 default only if the target defines the corresponding hook.
17137 Enable -ginline-points by default if location views are
17138 enabled; force it disabled if statement frontiers are
17140 * tree-inline.c (expand_call_inline): Check option variables.
17141 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
17143 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
17145 PR tree-optimization/84321
17146 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
17147 handling. Also check whether the anti-range contains any values
17148 that satisfy the mask; switch to a VR_RANGE if not.
17150 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
17153 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
17155 2018-02-13 Martin Jambor <mjambor@suse.cz>
17158 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
17159 of call statements, also set location of a load to a temporary.
17161 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
17163 * config/rl78/rl78.c (add_vector_labels): New function.
17164 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
17165 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
17166 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
17167 which checks that no arguments are passed.
17168 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
17169 * doc/extend.texi: Documentation for the new attribute.
17171 2018-02-13 Andreas Schwab <schwab@suse.de>
17173 * config/riscv/linux.h (CPP_SPEC): Define.
17175 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17178 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17179 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17180 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17181 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17182 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17183 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17184 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17185 temporarily for AES and PCLMUL builtins.
17187 PR tree-optimization/84339
17188 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17189 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17192 PR middle-end/84309
17193 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17194 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17195 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17197 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17199 * omp-simd-clone.h: New file.
17200 * omp-simd-clone.c: Include omp-simd-clone.h.
17201 (expand_simd_clones): No longer static.
17202 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17203 cgraph.h and omp-simd-clone.h.
17204 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17205 (vect_recog_widen_shift_pattern): Formatting fix.
17206 (vect_pattern_recog_1): Don't check optab for calls.
17209 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17210 operands[2] into a REG before using gen_lowpart on it.
17212 2018-02-12 Jeff Law <law@redhat.com>
17215 * config/sh/sh.c (find_barrier): Consider a sibling call
17218 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17219 successfully back substituting a reg.
17221 2018-02-12 Richard Biener <rguenther@suse.de>
17223 PR tree-optimization/84037
17224 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17225 parameter, move visited init to caller.
17226 (vect_slp_analyze_operations): Separate cost from validity
17227 check, initialize visited once for all instances.
17228 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17230 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17232 (vect_model_promotion_demotion_cost): Likewise.
17233 (vectorizable_bswap): Guard cost modeling with !slp_node
17234 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17236 (vectorizable_call): Likewise.
17237 (vectorizable_conversion): Likewise.
17238 (vectorizable_assignment): Likewise.
17239 (vectorizable_shift): Likewise.
17240 (vectorizable_operation): Likewise.
17241 (vectorizable_store): Likewise.
17242 (vectorizable_load): Likewise.
17243 (vectorizable_condition): Likewise.
17244 (vectorizable_comparison): Likewise.
17246 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17249 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17250 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17251 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17253 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17255 PR middle-end/83665
17256 * params.def (inline-min-speedup): Increase from 8 to 15.
17257 (max-inline-insns-auto): Decrease from 40 to 30.
17258 * ipa-split.c (consider_split): Add some buffer for function to
17259 be considered inlining candidate.
17260 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17263 2018-02-12 Richard Biener <rguenther@suse.de>
17265 PR tree-optimization/84037
17266 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17267 matched stmts if we cannot swap the non-matched ones.
17269 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17271 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17272 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17273 _mm_maskz_scalef_round_ss): New intrinsics.
17274 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17275 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17276 __builtin_ia32_scalefss_round): Remove.
17277 (__builtin_ia32_scalefsd_mask_round,
17278 __builtin_ia32_scalefss_mask_round): New intrinsics.
17279 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17280 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17281 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17282 "<round_constraint>")): Changed to ...
17283 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17284 "<round_scalar_constraint>")): ... this.
17285 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17286 %0, %1, %2<round_op3>}"): Changed to ...
17287 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17288 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17289 %2<round_scalar_mask_op3>}"): ... this.
17290 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17292 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17294 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17295 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17296 (_mm_maskz_sqrt_round_ss): New intrinsics.
17297 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17298 (__builtin_ia32_sqrtsd_mask_round)
17299 (__builtin_ia32_sqrtss_mask_round): New builtins.
17300 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17301 (__builtin_ia32_sqrtss_round): Remove.
17302 (__builtin_ia32_sqrtsd_mask_round)
17303 (__builtin_ia32_sqrtss_mask_round): New builtins.
17304 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17305 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17306 ((match_operand:VF_128 1 "vector_operand"
17307 "xBm,<round_constraint>")): Changed to ...
17308 ((match_operand:VF_128 1 "vector_operand"
17309 "xBm,<round_scalar_constraint>")): ... this.
17310 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17311 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17312 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17313 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17314 %<iptr>1<round_scalar_mask_op3>}): ... this.
17315 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17316 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17318 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17321 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17322 Cast vec_cmpeq result to correct type.
17323 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17324 Cast vec_cmpgt result to correct type.
17326 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17328 * final.c (final_scan_insn_1): Renamed from...
17329 (final_scan_insn): ... this. New wrapper, to recover
17330 seen from the outermost call in recursive ones.
17331 * config/sparc/sparc.c (output_return): Drop seen from call.
17332 (output_sibcall): Likewise.
17333 * config/visium/visium.c (output_branch): Likewise.
17335 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17337 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17340 2018-02-10 Alan Modra <amodra@gmail.com>
17343 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17344 Specify LR as an input.
17346 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17349 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17350 remove_member_access_dummy_vars): New functions.
17351 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17352 lower_omp_1, execute_lower_omp): Use them.
17354 PR rtl-optimization/84308
17355 * shrink-wrap.c (spread_components): Release todo vector.
17357 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17359 PR rtl-optimization/57193
17360 * ira-color.c (struct allocno_color_data): Add member
17361 conflict_allocno_hard_prefs.
17362 (update_conflict_allocno_hard_prefs): New.
17363 (bucket_allocno_compare_func): Add a preference based on
17364 conflict_allocno_hard_prefs.
17365 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17366 (color_allocnos): Remove a dead code. Initiate
17367 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17369 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17372 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17373 constraint from =wa to wa. Avoid a subreg on the output operand,
17374 instead use a pseudo and subreg it in a move.
17375 (p9_xxbrd_<mode>): Changed to ...
17376 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17377 (p9_xxbrd_v2df): New expander.
17378 (p9_xxbrw_<mode>): Changed to ...
17379 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17380 (p9_xxbrw_v4sf): New expander.
17382 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17384 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17386 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17389 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17390 multiply in 32-bit mode.
17391 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17392 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17395 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17397 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17398 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17399 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17400 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17402 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17405 * dwarf2out.c (is_trivial_indirect_ref): New function.
17406 (dwarf2out_late_global_decl): Do not generate a location
17407 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17408 and that are not defined in the current unit.
17410 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17412 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17413 instead of a libcall for UNORDERED.
17415 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17418 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17419 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17421 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17424 * config/s390/s390.c (s390_set_current_function): Invoke
17425 s390_indirect_branch_settings also if fndecl didn't change.
17427 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17429 * config/rs6000/rs6000.md (blockage): Set length to zero.
17431 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17433 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17435 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17438 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17439 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17443 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17444 PARALLEL incoming that failed vt_get_decl_and_offset check.
17446 PR middle-end/84237
17447 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17448 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17450 (get_variable_section): For decls in named .bss* sections pass true as
17451 second argument to bss_initializer_p.
17453 2018-02-09 Marek Polacek <polacek@redhat.com>
17454 Jakub Jelinek <jakub@redhat.com>
17457 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17458 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17459 Sync some changes from cxx_fold_indirect_ref.
17461 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17463 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17465 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17466 (BLOCK_INLINE_ENTRY_LABEL): New.
17467 (dwarf2out_var_location): Disregard inline entry markers.
17468 (inline_entry_data): New struct.
17469 (inline_entry_data_hasher): New hashtable type.
17470 (inline_entry_data_hasher::hash): New.
17471 (inline_entry_data_hasher::equal): New.
17472 (inline_entry_data_table): New variable.
17473 (add_high_low_attributes): Add DW_AT_entry_pc and
17474 DW_AT_GNU_entry_view attributes if a pending entry is found
17475 in inline_entry_data_table. Add old entry_pc attribute only
17476 if debug nonbinding markers are disabled.
17477 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17478 markers are enabled.
17479 (block_within_block_p, dwarf2out_inline_entry): New.
17480 (dwarf2out_finish): Check that no entries remained in
17481 inline_entry_data_table.
17482 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17483 (final_scan_insn, notice_source_line): Likewise.
17484 (rest_of_clean_state): Skip inline entry markers.
17485 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17487 * gimple.c (gimple_build_debug_inline_entry): New.
17488 * gimple.h (enum gimple_debug_subcode): Add
17489 GIMPLE_DEBUG_INLINE_ENTRY.
17490 (gimple_build_debug_inline_entry): Declare.
17491 (gimple_debug_inline_entry_p): New.
17492 (gimple_debug_nonbind_marker_p): Adjust.
17493 * insn-notes.def (INLINE_ENTRY): New.
17494 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17495 inline entry marker notes.
17496 (print_insn): Likewise.
17497 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17498 (INSN_DEBUG_MARKER_KIND): Likewise.
17499 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17500 * tree-inline.c (expand_call_inline): Build and insert
17501 debug_inline_entry stmt.
17502 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17503 inline entry blocks early, if nonbind markers are enabled.
17504 (dump_scope_block): Dump fragment info.
17505 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17506 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17507 (gimple_build_debug_inline_entry): New.
17508 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17509 Enable/disable inline entry points too.
17510 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17511 (DEBUG_INSN): Describe inline entry markers.
17513 * common.opt (gvariable-location-views): New.
17514 (gvariable-location-views=incompat5): New.
17515 * config.in: Rebuilt.
17516 * configure: Rebuilt.
17517 * configure.ac: Test assembler for view support.
17518 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17519 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17520 * dwarf2out.c (var_loc_view): New typedef.
17521 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17522 (dwarf2out_locviews_in_attribute): New.
17523 (dwarf2out_locviews_in_loclist): New.
17524 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17525 (enum dw_line_info_opcode): Add LI_adv_address.
17526 (struct dw_line_info_table): Add view.
17527 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17528 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17529 (zero_view_p): New variable.
17530 (ZERO_VIEW_P): New macro.
17531 (output_asm_line_debug_info): New.
17532 (struct var_loc_node): Add view.
17533 (add_AT_view_list, AT_loc_list): New.
17534 (add_var_loc_to_decl): Add view param. Test it against last.
17535 (new_loc_list): Add view params. Record them.
17536 (AT_loc_list_ptr): Handle loc and view lists.
17537 (view_list_to_loc_list_val_node): New.
17538 (print_dw_val): Handle dw_val_class_view_list.
17539 (size_of_die): Likewise.
17540 (value_format): Likewise.
17541 (loc_list_has_views): New.
17542 (gen_llsym): Set vl_symbol too.
17543 (maybe_gen_llsym, skip_loc_list_entry): New.
17544 (dwarf2out_maybe_output_loclist_view_pair): New.
17545 (output_loc_list): Output view list or entries too.
17546 (output_view_list_offset): New.
17547 (output_die): Handle dw_val_class_view_list.
17548 (output_dwarf_version): New.
17549 (output_compilation_unit_header): Use it.
17550 (output_skeleton_debug_sections): Likewise.
17551 (output_rnglists, output_line_info): Likewise.
17552 (output_pubnames, output_aranges): Update version comments.
17553 (output_one_line_info_table): Output view numbers in asm comments.
17554 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17555 Call maybe_gen_llsym.
17556 (loc_list_from_tree_1): Adjust.
17557 (add_AT_location_description): Create view list attribute if
17558 needed, check it's absent otherwise.
17559 (convert_cfa_to_fb_loc_list): Adjust.
17560 (maybe_emit_file): Call output_asm_line_debug_info for test.
17561 (dwarf2out_var_location): Reset views as needed. Precompute
17562 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17563 attribute. Set view.
17564 (new_line_info_table): Reset next view.
17565 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17566 (dwarf2out_source_line): Likewise. Output view resets and labels to
17567 the assembler, or select appropriate line info opcodes.
17568 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17569 (optimize_string_length): Catch it. Adjust.
17570 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17571 dw_val_class_view_list, and remove it if no longer needed.
17572 (hash_loc_list): Hash view numbers.
17573 (loc_list_hasher::equal): Compare them.
17574 (optimize_location_lists): Check whether a view list symbol is
17575 needed, and whether the locview attribute is present, and
17576 whether they match. Remove the locview attribute if no longer
17578 (index_location_lists): Call skip_loc_list_entry for test.
17579 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17580 Use output_dwarf_version.
17581 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17582 (struct dw_val_node): Add val_view_list.
17583 * final.c (SEEN_NEXT_VIEW): New.
17584 (set_next_view_needed): New.
17585 (clear_next_view_needed): New.
17586 (maybe_output_next_view): New.
17587 (final_start_function): Rename to...
17588 (final_start_function_1): ... this. Take pointer to FIRST,
17589 add SEEN parameter. Emit param bindings in the initial view.
17590 (final_start_function): Reintroduce SEEN-less interface.
17591 (final): Rename to...
17592 (final_1): ... this. Take SEEN parameter. Output final pending
17593 next view at the end.
17594 (final): Reintroduce seen-less interface.
17595 (final_scan_insn): Output pending next view before switching
17596 sections or ending a block. Mark the next view as needed when
17597 outputting variable locations. Notify debug backend of section
17598 changes, and of location view changes.
17599 (rest_of_handle_final): Adjust.
17600 * toplev.c (process_options): Autodetect value for debug variable
17601 location views option. Warn on incompat5 without -gdwarf-5.
17602 * doc/invoke.texi (gvariable-location-views): New.
17603 (gvariable-location-views=incompat5): New.
17604 (gno-variable-location-views): New.
17606 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17608 PR tree-optimization/84136
17609 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17610 that the result of find_edge is non-NULL.
17612 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17615 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17616 storing integer register in SImode. Fix cost of 256 and 512
17617 byte aligned SSE register store.
17619 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17621 * config/i386/i386.c (ix86_multiplication_cost): Fix
17622 multiplication cost for TARGET_AVX512DQ.
17624 2018-02-08 Marek Polacek <polacek@redhat.com>
17626 PR tree-optimization/84238
17627 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17630 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17632 PR tree-optimization/84265
17633 * tree-vect-stmts.c (vectorizable_store): Don't treat
17634 VMAT_CONTIGUOUS accesses as grouped.
17635 (vectorizable_load): Likewise.
17637 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17639 PR tree-optimization/81635
17640 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17641 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17642 (test_round_for_mask): New functions.
17643 (wide_int_cc_tests): Call test_round_for_mask.
17644 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17645 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17646 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17647 range returned by get_range_info.
17649 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17652 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17653 * symtab.c: Include builtins.h
17654 (symtab_node::output_to_lto_symbol_table_p): Move here
17655 from lto-streamer-out.c:output_symbol_p.
17656 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17657 (output_symbol_p): Move all logic to symtab.c
17658 (produce_symtab): Update.
17660 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17662 * config/s390/s390-opts.h (enum indirect_branch): Define.
17663 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17664 (s390_indirect_branch_via_thunk)
17665 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17666 (enum s390_indirect_branch_type): Define.
17667 * config/s390/s390.c (struct s390_frame_layout, struct
17668 machine_function): Remove.
17669 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17670 (indirect_branch_table_label_no, indirect_branch_table_name):
17672 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17673 (enum s390_indirect_branch_option): Define.
17674 (s390_return_addr_from_memory): New function.
17675 (s390_handle_string_attribute): New function.
17676 (s390_attribute_table): Add new attribute handler.
17677 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17678 (s390_indirect_branch_via_thunk): New function.
17679 (s390_indirect_branch_via_inline_thunk): New function.
17680 (s390_function_ok_for_sibcall): When jumping via thunk disallow
17681 sibling call optimization for non z10 compiles.
17682 (s390_emit_call): Force indirect branch target to be a single
17683 register. Add r1 clobber for non-z10 compiles.
17684 (s390_emit_epilogue): Emit return jump via return_use expander.
17685 (s390_reorg): Handle JUMP_INSNs as execute targets.
17686 (s390_option_override_internal): Perform validity checks for the
17687 new command line options.
17688 (s390_indirect_branch_attrvalue): New function.
17689 (s390_indirect_branch_settings): New function.
17690 (s390_set_current_function): Invoke s390_indirect_branch_settings.
17691 (s390_output_indirect_thunk_function): New function.
17692 (s390_code_end): Implement target hook.
17693 (s390_case_values_threshold): Implement target hook.
17694 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17696 * config/s390/s390.h (struct s390_frame_layout)
17697 (struct machine_function): Move here from s390.c.
17698 (TARGET_INDIRECT_BRANCH_NOBP_RET)
17699 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17700 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17701 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17702 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17703 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17704 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17705 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17706 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17707 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17708 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17709 (mnemonic attribute): Add values which aren't recognized
17711 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17712 pattern for branch conversion. Fix mnemonic attribute.
17713 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17714 indirect branch via thunk if requested.
17715 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17716 ("*indirect_jump"): Disable for branch conversion using out of
17718 ("indirect_jump_via_thunk<mode>_z10")
17719 ("indirect_jump_via_thunk<mode>")
17720 ("indirect_jump_via_inlinethunk<mode>_z10")
17721 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17722 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17723 ("casesi_jump_via_inlinethunk<mode>_z10")
17724 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17725 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17726 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17727 ("*indirect2_jump"): Disable for branch conversion.
17728 ("casesi_jump"): Turn into expander and expand patterns for branch
17730 ("return_use"): New expander.
17731 ("*return"): Emit return via thunk and rename it to ...
17732 ("*return<mode>"): ... this one.
17733 * config/s390/s390.opt: Add new options and and enum for the
17736 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17738 * lra-constraints.c (match_reload): Unconditionally use
17739 gen_lowpart_SUBREG, rather than selecting between that
17740 and equivalent gen_rtx_SUBREG code.
17742 2018-02-08 Richard Biener <rguenther@suse.de>
17744 PR tree-optimization/84233
17745 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17746 changed flag instead of boguously re-using phi_inserted.
17748 2018-02-08 Martin Jambor <mjambor@suse.cz>
17750 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17751 static local variables.
17753 2018-02-08 Richard Biener <rguenther@suse.de>
17755 PR tree-optimization/84278
17756 * tree-vect-stmts.c (vectorizable_store): When looking for
17757 smaller vector types to perform grouped strided loads/stores
17758 make sure the mode is supported by the target.
17759 (vectorizable_load): Likewise.
17761 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17763 * config/aarch64/aarch64.c (aarch64_components_for_bb):
17764 Increase LDP/STP opportunities by adding adjacent callee-saves.
17766 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17768 PR rtl-optimization/84068
17769 PR rtl-optimization/83459
17770 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17772 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
17774 PR tree-optimization/84224
17775 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17776 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17777 non-zero arguments.
17779 2018-02-07 Iain Sandoe <iain@codesourcery.com>
17782 * config/rs6000/altivec.md (*restore_world): Remove LR use.
17783 * config/rs6000/predicates.md (restore_world_operation): Adjust op
17784 count, remove one USE.
17786 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17788 * doc/install.texi (Configuration): Document the
17789 --with-long-double-format={ibm,ieee} PowerPC configuration
17793 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17794 Convert from define_expand to be define_insn_and_split. Rework
17795 float/double/_Float128 conversions to QI/HI/SImode to work with
17796 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17797 conversions to QI/HImode types did a store and then a load to
17798 truncate the value. For conversions to VSX registers, don't split
17799 the insn, instead emit the code directly. Use the code iterator
17800 any_fix to combine signed and unsigned conversions.
17801 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17802 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17803 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17804 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17805 (fix_<mode>di2_hw): Likewise.
17806 (fixuns_<mode>di2_hw): Likewise.
17807 (fix_<mode>si2_hw): Likewise.
17808 (fixuns_<mode>si2_hw): Likewise.
17809 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17810 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17811 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17812 fix<uns>_trunc<SFDF:mode>si2_p8.
17813 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17814 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17815 (fix<uns>_<mode>_mem): Likewise.
17816 (fctiw<u>z_<mode>_mem): Likewise.
17817 (fix<uns>_<mode>_mem): Likewise.
17818 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17819 the register allocator from doing a direct move to the GPRs to do
17820 a store, and instead use the ISA 3.0 store byte/half-word from
17821 vector register instruction. For IEEE 128-bit floating point,
17822 also optimize stores of 32-bit ints.
17823 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17825 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17827 * genextract.c (push_pathstr_operand): New function to support
17829 (walk_rtx): Call push_pathstr_operand.
17830 (print_path): Support [a-zA-Z].
17832 2018-02-07 Richard Biener <rguenther@suse.de>
17834 PR tree-optimization/84037
17835 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17836 (cse_and_gimplify_to_preheader): Declare.
17837 (vect_get_place_in_interleaving_chain): Likewise.
17838 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17840 (_loop_vec_info::~_loop_vec_info): Delete it.
17841 (cse_and_gimplify_to_preheader): New function.
17842 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17843 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17844 (vectorizable_load): Likewise. For grouped stores always base
17845 the IV on the first element.
17846 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17847 condition before gimplifying.
17849 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17851 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17852 *DIV_EXPR and *MOD_EXPR.
17854 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
17857 * config/i386/i386.c (ix86_option_override_internal): Mask out
17858 the CF_SET bit when checking -fcf-protection.
17860 2018-02-07 Tom de Vries <tom@codesourcery.com>
17863 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17866 2018-02-07 Richard Biener <rguenther@suse.de>
17868 PR tree-optimization/84204
17869 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17872 PR tree-optimization/84205
17873 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17874 special-case isl_ast_op_zdiv_r.
17876 PR tree-optimization/84223
17877 * graphite-scop-detection.c (gather_bbs::before_dom_children):
17878 Only add conditions from within the region.
17879 (gather_bbs::after_dom_children): Adjust.
17881 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
17884 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17885 * config/avr/avr.md: Only post-reload split REG-REG moves if
17886 either register is GENERAL_REG_P.
17888 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17890 PR tree-optimization/84235
17891 * tree-ssa-scopedtables.c
17892 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17893 if the subtraction is performed in floating point type where NaNs are
17894 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17895 build 1. Formatting fix.
17897 2018-02-06 Jakub Jelinek <jakub@redhat.com>
17900 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17901 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17902 and skip it regardless of bb boundaries. Use CALL_P macro,
17903 don't test INSN_P (insn) together with CALL_P or JUMP_P check
17904 unnecessarily, formatting fix.
17906 2018-02-06 Michael Collison <michael.collison@arm.com>
17908 * config/arm/thumb2.md:
17909 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17910 (*thumb_mov_notscc): Ditto.
17912 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
17915 * config/rs6000/rs6000.md (su code attribute): Use "u" for
17916 unsigned_fix, not "s".
17918 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17920 * configure.ac (gcc_fn_eh_frame_ro): New function.
17921 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17922 correct .eh_frame permissions.
17923 * configure: Regenerate.
17925 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
17927 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17928 irrelevant options.
17930 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17932 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17933 Display warning message for -mno-speculate-indirect-jumps.
17935 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
17937 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17939 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17941 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
17943 PR tree-optimization/84225
17944 * tree-eh.c (find_trapping_overflow): Only call
17945 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17947 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17950 * config/i386/i386.c: Reimplement the check of possible options
17951 -mibt/-mshstk conbination. Change error messages.
17952 * doc/invoke.texi: Fix a typo: remove extra '='.
17954 2018-02-06 Marek Polacek <polacek@redhat.com>
17956 PR tree-optimization/84228
17957 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17959 2018-02-06 Tamar Christina <tamar.christina@arm.com>
17962 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17963 emitted arch directives.
17964 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17965 __ARM_FEATURE_COPROC before changing architectures.
17967 2018-02-06 Richard Biener <rguenther@suse.de>
17969 * config/i386/i386.c (print_reg): Fix typo.
17970 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17972 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17974 * configure: Regenerate.
17976 2018-02-05 Martin Sebor <msebor@redhat.com>
17978 PR tree-optimization/83369
17979 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17982 2018-02-05 Martin Liska <mliska@suse.cz>
17984 * doc/invoke.texi: Cherry-pick upstream r323995.
17986 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
17988 * ira.c (ira_init_register_move_cost): Adjust comment.
17990 2018-02-05 Martin Liska <mliska@suse.cz>
17992 PR gcov-profile/84137
17993 * doc/gcov.texi: Fix typo in documentation.
17995 2018-02-05 Martin Liska <mliska@suse.cz>
17997 PR gcov-profile/83879
17998 * doc/gcov.texi: Document necessity of --dynamic-list-data when
17999 using dlopen functionality.
18001 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
18003 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
18004 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
18005 _mm_maskz_range_ss, _mm_mask_range_round_ss,
18006 _mm_maskz_range_round_ss): New intrinsics.
18007 (__builtin_ia32_rangesd128_round)
18008 (__builtin_ia32_rangess128_round): Remove.
18009 (__builtin_ia32_rangesd128_mask_round,
18010 __builtin_ia32_rangess128_mask_round): New builtins.
18011 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
18012 __builtin_ia32_rangess128_round): Remove.
18013 (__builtin_ia32_rangesd128_mask_round,
18014 __builtin_ia32_rangess128_mask_round): New builtins.
18015 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
18016 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
18017 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
18018 "<round_saeonly_constraint>")): Changed to ...
18019 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
18020 "<round_saeonly_scalar_constraint>")): ... this.
18021 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
18022 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
18023 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
18024 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
18025 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
18027 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
18029 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
18031 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
18032 Remove all values except native, 8540 and 8548.
18034 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
18036 * config/i386/i386.c (ix86_output_function_return): Pass
18037 INVALID_REGNUM, instead of -1, as invalid register number to
18038 indirect_thunk_name and output_indirect_thunk.
18040 2018-02-02 Julia Koval <julia.koval@intel.com>
18042 * config.gcc: Add -march=icelake.
18043 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
18044 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
18045 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
18046 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
18047 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
18048 (processor_target_table): Add icelake.
18049 (ix86_option_override_internal): Handle new PTAs.
18050 (get_builtin_code_for_version): Handle icelake.
18051 (M_INTEL_COREI7_ICELAKE): New.
18052 (fold_builtin_cpu): Handle icelake.
18053 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
18054 * doc/invoke.texi: Add -march=icelake.
18056 2018-02-02 Julia Koval <julia.koval@intel.com>
18058 * config/i386/i386.c (ix86_option_override_internal): Change flags type
18059 to wide_int_bitmask.
18060 * wide-int-bitmask.h: New.
18062 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
18065 * config/i386/i386.md: Replace Pmode with word_mode in
18066 builtin_setjmp_setup and builtin_longjmp to support x32.
18068 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
18072 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
18074 (rs6000_supported_cpu_names): New static variable.
18075 (linux_cpu_translation_table): Likewise.
18076 (elf_platform) <cpu>: Define new static variable and use it.
18077 Translate kernel AT_PLATFORM name to canonical name if needed.
18078 Error if platform name is unknown.
18080 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
18083 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
18085 2018-02-01 Jeff Law <law@redhat.com>
18088 * config/i386/i386.c (release_scratch_register_on_entry): Add new
18089 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
18090 the scratch if RELEASE_VIA_POP is false.
18091 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
18092 If we have to save a temporary register, decrement SIZE appropriately.
18093 Pass new arguments to release_scratch_register_on_entry.
18094 (ix86_adjust_stack_and_probe): Likewise.
18095 (ix86_emit_probe_stack_range): Pass new arguments to
18096 release_scratch_register_on_entry.
18098 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
18100 PR rtl-optimization/84157
18101 * combine.c (change_zero_ext): Use REG_P predicate in
18102 front of HARD_REGISTER_P predicate.
18104 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
18106 * config/avr/avr.c (avr_option_override): Move disabling of
18107 -fdelete-null-pointer-checks to...
18108 * common/config/avr/avr-common.c (avr_option_optimization_table):
18111 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18113 PR tree-optimization/81635
18114 * tree-data-ref.c (split_constant_offset_1): For types that
18115 wrap on overflow, try to use range info to prove that wrapping
18118 2018-02-01 Renlin Li <renlin.li@arm.com>
18121 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
18122 TAILCALL_ADDR_REGS.
18123 (aarch64_register_move_cost): Likewise.
18124 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
18125 TAILCALL_ADDR_REGS.
18126 (REG_CLASS_NAMES): Likewise.
18127 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
18128 TAILCALL_ADDR_REGS. Remove IP registers.
18129 * config/aarch64/aarch64.md (Ucs): Update register constraint.
18131 2018-02-01 Richard Biener <rguenther@suse.de>
18133 * domwalk.h (dom_walker::dom_walker): Add additional constructor
18134 for specifying RPO order and allow NULL for that.
18135 * domwalk.c (dom_walker::dom_walker): Likewise.
18136 (dom_walker::walk): Handle NULL RPO order.
18137 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
18139 (rewrite_update_dom_walker): Likewise.
18140 (mark_def_dom_walker): Likewise.
18142 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18144 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
18145 (aarch64_maybe_expand_sve_subreg_move): Declare.
18146 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
18147 * config/aarch64/predicates.md (aarch64_any_register_operand): New
18149 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
18150 that are semantically a reverse operation.
18151 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
18152 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
18153 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
18155 (aarch64_can_change_mode_class): For big-endian, forbid changes
18156 between two SVE modes if they have different element sizes.
18158 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18160 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
18161 the TImode handling for big-endian targets.
18163 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18165 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
18166 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
18168 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
18169 Remove BSWAP handing for big-endian targets and use the form of
18170 LD1RQ appropariate for the mode.
18172 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18174 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18175 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18176 duplicated element.
18178 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18181 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18182 check for operands that need to go through aarch64_sve_reload_be.
18184 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18186 PR tree-optimization/81661
18187 PR tree-optimization/84117
18188 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18189 * tree-eh.c: Include gimplify.h.
18190 (find_trapping_overflow, replace_trapping_overflow,
18191 rewrite_to_non_trapping_overflow): New functions.
18192 * tree-vect-loop.c: Include tree-eh.h.
18193 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18194 * tree-data-ref.c: Include tree-eh.h.
18195 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18197 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18199 PR rtl-optimization/84123
18200 * combine.c (change_zero_ext): Check if hard register satisfies
18201 can_change_dest_mode before calling gen_lowpart_SUBREG.
18203 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18206 * ira.c (ira_init_register_move_cost): Remove assert.
18208 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18210 PR rtl-optimization/84071
18211 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18212 * doc/tm.texi: Regenerate.
18214 2018-01-31 Richard Biener <rguenther@suse.de>
18216 PR tree-optimization/84132
18217 * tree-data-ref.c (analyze_miv_subscript): Properly
18218 check whether evolution_function_is_affine_multivariate_p
18219 before calling gcd_of_steps_may_divide_p.
18221 2018-01-31 Julia Koval <julia.koval@intel.com>
18224 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18225 * config/i386/i386.md (rdpid_rex64) New.
18226 (rdpid): Make 32bit only.
18228 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18231 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18232 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18234 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18237 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18239 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18241 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18243 PR rtl-optimization/84071
18244 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18245 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18247 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18249 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18250 (arc_attribute_table): Add 'aux' attribute.
18251 (arc_in_small_data_p): Consider aux like variables.
18252 (arc_is_aux_reg_p): New function.
18253 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18254 (arc_get_aux_arg): New function.
18255 (prepare_move_operands): Handle aux-register access.
18256 (arc_handle_aux_attribute): New function.
18257 * doc/extend.texi (ARC Variable attributes): Add subsection.
18259 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18261 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18262 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18263 (arc_attribute_table): Add 'uncached' attribute.
18264 (arc_print_operand): Print '.di' flag for uncached memory
18266 (arc_in_small_data_p): Do not consider for small data the uncached
18268 (arc_is_uncached_mem_p): New function.
18269 * config/arc/predicates.md (compact_store_memory_operand): Check
18270 for uncached memory accesses.
18271 (nonvol_nonimm_operand): Likewise.
18272 * doc/extend.texi (ARC Type Attribute): New subsection.
18274 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18277 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18278 falign-loops=): Add Optimization flag.
18280 2018-01-30 Jeff Law <law@redhat.com>
18283 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18284 INT_REGISTERS_SAVED. Check it prior to calling
18285 get_scratch_register_on_entry.
18286 (ix86_adjust_stack_and_probe): Similarly.
18287 (ix86_emit_probe_stack_range): Similarly.
18288 (ix86_expand_prologue): Corresponding changes.
18290 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18293 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18294 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18296 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18299 * lra-constraints.c (curr_insn_transform): Process AND in the
18302 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18304 PR rtl-optimization/83986
18305 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18306 dependence against last_pending_memory_flush in addition to
18307 pending_jump_insns.
18309 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18311 PR tree-optimization/81611
18312 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18315 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18318 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18321 2018-01-30 Richard Biener <rguenther@suse.de>
18322 Jakub Jelinek <jakub@redhat.com>
18324 PR tree-optimization/84111
18325 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18326 inner loops added during recursion, as they don't have up-to-date
18329 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18332 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18333 (can_inline_edge_by_limits_p): ... here.
18334 (can_early_inline_edge_p, check_callers,
18335 update_caller_keys, update_callee_keys, recursive_inlining,
18336 add_new_edges_to_heap, speculation_useful_p,
18337 inline_small_functions,
18338 inline_small_functions, flatten_function,
18339 inline_to_all_callers_1): Update.
18341 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18343 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18346 2018-01-30 Richard Biener <rguenther@suse.de>
18348 PR tree-optimization/83008
18349 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18350 invariant and constant vector uses in stmts when they need
18351 more than one stmt.
18353 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18356 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18357 * configure: Regenerate.
18359 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18361 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18363 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18364 Use gen_rtx_REG rather than gen_lowpart.
18366 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18368 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18369 rather than 0 when creating partial subregs.
18371 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18373 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18376 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18379 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18380 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18381 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18382 flags. This restores the settings used before the 2017-07-24.
18383 Turning off pre increment/decrement/modify allows IVOPTS to
18384 optimize DF/SF loops where the index is an int.
18386 2018-01-29 Richard Biener <rguenther@suse.de>
18387 Kelvin Nilsen <kelvin@gcc.gnu.org>
18390 * tree-vect-stmts.c (vectorizable_call): Don't call
18391 targetm.vectorize_builtin_md_vectorized_function if callee is
18394 2018-01-22 Carl Love <cel@us.ibm.com>
18396 * doc/extend.tex: Fix typo in second arg in
18397 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18399 2018-01-29 Richard Biener <rguenther@suse.de>
18401 PR tree-optimization/84086
18402 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18403 (flush_ssaname_freelist): When SSA names were released reset
18404 the SCEV hash table.
18406 2018-01-29 Richard Biener <rguenther@suse.de>
18408 PR tree-optimization/84057
18409 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18410 removed paths when removing edges.
18412 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18414 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18415 -mfunction-return=@var{choice}.
18417 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18419 PR diagnostic/84034
18420 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18421 Handle CR like TAB.
18422 (layout::print_source_line): Likewise.
18423 (test_get_line_width_without_trailing_whitespace): Add test cases.
18425 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18427 PR middle-end/84040
18428 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18431 2018-01-26 Jim Wilson <jimw@sifive.com>
18433 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18435 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18438 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18440 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18441 and CMP + SUB-immediate -> SUBS.
18443 2018-01-26 Martin Sebor <msebor@redhat.com>
18445 PR tree-optimization/83896
18446 * tree-ssa-strlen.c (get_string_len): Rename...
18447 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18448 Avoid assuming length is constant.
18449 (handle_char_store): Use HOST_WIDE_INT for string length.
18451 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18454 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18455 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18457 2018-01-26 Richard Biener <rguenther@suse.de>
18459 PR rtl-optimization/84003
18460 * dse.c (record_store): Only record redundant stores when
18461 the earlier store aliases at least all accesses the later one does.
18463 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18465 PR rtl-optimization/83985
18466 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18467 REG_CFA_RESTORE insns.
18468 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18469 REG_CFA_RESTORE insns here.
18472 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18473 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18475 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18477 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18478 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18479 (arc_init): Likewise.
18480 (arc_override_options): Likewise.
18481 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18483 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18485 * config/arc/arc.h (TARGET_DBNZ): Define.
18486 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18487 properly set the tune attribute.
18488 (dbnz): Use TARGET_DBNZ guard.
18489 * config/arc/arc.opt (mtune): Add core3 option.
18491 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18493 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18494 recognize new pic like addresses.
18495 (arc_delegitimize_address): Clean up.
18497 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18499 * config/arc/arc-arches.def: Option mrf16 valid for all
18501 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18502 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18503 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18504 * config/arc/arc-tables.opt: Regenerate.
18505 * config/arc/arc.c (arc_conditional_register_usage): Handle
18506 reduced register file case.
18507 (arc_file_start): Set must have build attributes.
18508 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18509 mrf16 option value.
18510 * config/arc/arc.opt (mrf16): Add new option.
18511 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18512 * config/arc/genmultilib.awk: Handle new mrf16 option.
18513 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18514 * config/arc/t-multilib: Regenerate.
18515 * doc/invoke.texi (ARC Options): Document mrf16 option.
18517 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18519 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18520 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18521 (arc_attribute_table): Add 'secure_call' attribute.
18522 (arc_print_operand): Print secure call operand.
18523 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18525 (arc_is_secure_call_p): New function. * config/arc/arc.md
18526 (call_i): Add support for sjli instruction.
18527 (call_value_i): Likewise.
18528 * config/arc/constraints.md (Csc): New constraint.
18530 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18531 John Eric Martin <John.Martin@emmicro-us.com>
18533 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18534 * config/arc/arc.c (_arc_jli_section): New struct.
18535 (arc_jli_section): New type.
18536 (rc_jli_sections): New static variable.
18537 (arc_handle_jli_attribute): New function.
18538 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18539 (arc_file_end): New function.
18540 (TARGET_ASM_FILE_END): Define.
18541 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18542 (arc_add_jli_section): New function.
18543 (jli_call_scan): Likewise.
18544 (arc_reorg): Call jli_call_scan.
18545 (arc_output_addsi): Remove 'S' from printing asm operand.
18546 (arc_is_jli_call_p): New function.
18547 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18549 (movhi_insn): Likewise.
18550 (movsi_insn): Likewise.
18551 (movsi_set_cc_insn): Likewise.
18552 (loadqi_update): Likewise.
18553 (load_zeroextendqisi_update): Likewise.
18554 (load_signextendqisi_update): Likewise.
18555 (loadhi_update): Likewise.
18556 (load_zeroextendhisi_update): Likewise.
18557 (load_signextendhisi_update): Likewise.
18558 (loadsi_update): Likewise.
18559 (loadsf_update): Likewise.
18560 (movsicc_insn): Likewise.
18561 (bset_insn): Likewise.
18562 (bxor_insn): Likewise.
18563 (bclr_insn): Likewise.
18564 (bmsk_insn): Likewise.
18565 (bicsi3_insn): Likewise.
18566 (cmpsi_cc_c_insn): Likewise.
18567 (movsi_ne): Likewise.
18568 (movsi_cond_exec): Likewise.
18569 (clrsbsi2): Likewise.
18570 (norm_f): Likewise.
18580 (call_i): Remove 'S' asm letter, add jli instruction.
18581 (call_value_i): Likewise.
18582 * config/arc/arc.op (mjli-always): New option.
18583 * config/arc/constraints.md (Cji): New constraint.
18584 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18586 (subsf3_fpx): Likewise.
18587 (mulsf3_fpx): Likewise.
18588 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18590 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18591 function attrbutes.
18592 * doc/invoke.texi (ARC): Document mjli-always option.
18594 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18596 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18597 avoid addition with 0 and use incw and decw where possible.
18599 2018-01-26 Richard Biener <rguenther@suse.de>
18601 PR tree-optimization/81082
18602 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18603 association if it requires casting to unsigned.
18604 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18605 from fold_plusminus_mult_expr to catch important cases late when
18606 range info is available.
18608 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18610 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18611 * configure.ac (hidden_linkonce): New test.
18612 * configure: Regenerate.
18613 * config.in: Regenerate.
18615 2018-01-26 Julia Koval <julia.koval@intel.com>
18617 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18618 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18619 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18620 _mm_mask_bitshuffle_epi64_mask): Fix type.
18621 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18622 USI_FTYPE_V4DI_V4DI_USI): Remove.
18623 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18624 __builtin_ia32_vpshufbitqmb256_mask,
18625 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18626 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18627 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18629 2018-01-26 Alan Modra <amodra@gmail.com>
18632 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18633 UNSPEC_VBPERMQ. Sort other unspecs.
18635 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18637 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18639 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18641 PR middle-end/83055
18642 * predict.c (drop_profile): Do not push/pop cfun; update also
18644 (handle_missing_profiles): Fix logic looking for zero profiles.
18646 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18648 PR middle-end/83977
18649 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18650 on functions with #pragma omp declare simd or functions with simd
18652 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18653 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18654 Remove trailing \n from warning_at calls.
18656 2018-01-25 Tom de Vries <tom@codesourcery.com>
18659 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18660 for neutered workers.
18662 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18665 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18666 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18668 2018-01-24 Jeff Law <law@redhat.com>
18671 * i386.c (get_probe_interval): Move to earlier point.
18672 (ix86_compute_frame_layout): If -fstack-clash-protection and
18673 the frame is larger than the probe interval, then use pushes
18674 to save registers rather than reg->mem moves.
18675 (ix86_expand_prologue): Remove conditional for int_registers_saved
18678 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
18681 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18682 min/max for never referenced object.
18684 2018-01-24 Jakub Jelinek <jakub@redhat.com>
18686 PR middle-end/83977
18687 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18689 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18690 attributes from DECL_ATTRIBUTES (decl) without affecting
18691 DECL_ATTRIBUTES (current_function_decl).
18692 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18693 functions with non-NULL DECL_ABSTRACT_ORIGIN.
18695 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
18697 PR tree-optimization/83979
18698 * fold-const.c (fold_comparison): Use constant_boolean_node
18699 instead of boolean_{true,false}_node.
18701 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
18703 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18706 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18708 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18709 Simplify the clause that sets the length attribute.
18710 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18711 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18712 clause that sets the length attribute.
18713 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18715 2018-01-24 Tom de Vries <tom@codesourcery.com>
18718 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18719 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18720 Add strict parameter.
18721 (prevent_branch_around_nothing): Insert dummy insn between branch to
18722 label and label with no ptx insn inbetween.
18723 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18725 2018-01-24 Tom de Vries <tom@codesourcery.com>
18728 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18729 for neutered threads in warp.
18730 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18732 2018-01-24 Richard Biener <rguenther@suse.de>
18734 PR tree-optimization/83176
18735 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18738 2018-01-24 Richard Biener <rguenther@suse.de>
18740 PR tree-optimization/82819
18741 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18742 code generating pluses that are no-ops in the target precision.
18744 2018-01-24 Richard Biener <rguenther@suse.de>
18746 PR middle-end/84000
18747 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18749 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18751 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18752 to merge probabilities.
18753 * predict.c (probably_never_executed): Also mark as cold functions
18754 with global 0 profile and guessed local profile.
18755 * profile-count.c (profile_probability::combine_with_count): New
18757 * profile-count.h (profile_probability::operator*,
18758 profile_probability::operator*=, profile_probability::operator/,
18759 profile_probability::operator/=): Reduce precision to adjusted
18760 and set value to guessed on contradictory divisions.
18761 (profile_probability::combine_with_freq): Remove.
18762 (profile_probability::combine_wiht_count): Declare.
18763 (profile_count::force_nonzero):: Set to adjusted.
18764 (profile_count::probability_in):: Set quality to adjusted.
18765 * tree-ssa-tail-merge.c (replace_block_by): Use
18766 combine_with_count.
18768 2018-01-23 Andrew Waterman <andrew@sifive.com>
18769 Jim Wilson <jimw@sifive.com>
18771 * config/riscv/riscv.c (riscv_stack_boundary): New.
18772 (riscv_option_override): Set riscv_stack_boundary. Handle
18773 riscv_preferred_stack_boundary_arg.
18774 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18775 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18776 (STACK_BOUNDARY): Set to riscv_stack_boundary.
18777 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18778 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18779 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18781 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
18784 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18785 of struct ix86_frame.
18786 (ix86_expand_epilogue): Likewise. Add a local variable for
18787 the reg_save_offset field in struct ix86_frame.
18789 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18791 PR tree-optimization/82604
18792 * tree-loop-distribution.c (enum partition_kind): New enum item
18793 PKIND_PARTIAL_MEMSET.
18794 (partition_builtin_p): Support above new enum item.
18795 (generate_code_for_partition): Ditto.
18796 (compute_access_range): Differentiate cases that equality can be
18797 proven at all loops, the innermost loops or no loops.
18798 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18799 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18800 (finalize_partitions, distribute_loop): Don't fuse partition of
18801 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18802 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18803 parloop is enabled.
18805 2018-01-23 Martin Liska <mliska@suse.cz>
18807 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18808 order to ignore the predictor.
18809 (PRED_POLYMORPHIC_CALL): Likewise.
18810 (PRED_RECURSIVE_CALL): Likewise.
18812 2018-01-23 Martin Liska <mliska@suse.cz>
18814 * tree-profile.c (tree_profiling): Print function header to
18815 aware reader which function we are working on.
18816 * value-prof.c (gimple_find_values_to_profile): Do not print
18817 not interesting value histograms.
18819 2018-01-23 Martin Liska <mliska@suse.cz>
18821 * profile-count.h (enum profile_quality): Add
18822 profile_uninitialized as the first value. Do not number values
18823 as they are zero based.
18824 (profile_count::verify): Update sanity check.
18825 (profile_probability::verify): Likewise.
18827 2018-01-23 Nathan Sidwell <nathan@acm.org>
18829 * doc/invoke.texi (ffor-scope): Deprecate.
18831 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18833 PR tree-optimization/83510
18834 * domwalk.c (set_all_edges_as_executable): New function.
18835 (dom_walker::dom_walker): Convert bool param
18836 "skip_unreachable_blocks" to enum reachability. Move setup of
18837 edge flags to set_all_edges_as_executable and only do it when
18838 reachability is REACHABLE_BLOCKS.
18839 * domwalk.h (enum dom_walker::reachability): New enum.
18840 (dom_walker::dom_walker): Convert bool param
18841 "skip_unreachable_blocks" to enum reachability.
18842 (set_all_edges_as_executable): New decl.
18843 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18844 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18846 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18847 but converting true to REACHABLE_BLOCKS.
18848 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18850 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18851 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18852 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18854 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18855 if check_all_array_refs will be called.
18857 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18859 * tree.c (selftest::test_location_wrappers): Add more test
18862 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18864 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18865 (selftest::test_bit_in_range): Likewise.
18867 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18870 * doc/sourcebuild.texi (vect_float): Say that the selector
18871 only describes the situation when -funsafe-math-optimizations is on.
18872 (vect_float_strict): Document.
18874 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18876 PR tree-optimization/83965
18877 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18878 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18879 instead of checking only for a reduction.
18880 (vect_recog_widen_sum_pattern): Likewise.
18882 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18884 * predict.c (probably_never_executed): Only use precise profile info.
18885 (compute_function_frequency): Skip after inlining hack since we now
18886 have quality checking.
18888 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18890 * profile-count.h (profile_probability::very_unlikely,
18891 profile_probability::unlikely, profile_probability::even): Set
18892 precision to guessed.
18894 2018-01-23 Richard Biener <rguenther@suse.de>
18896 PR tree-optimization/83963
18897 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18898 Properly terminate dominator walk when crossing the exit edge not
18899 when visiting its source block.
18901 2018-01-23 Jakub Jelinek <jakub@redhat.com>
18904 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18905 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18907 2018-01-22 Jakub Jelinek <jakub@redhat.com>
18909 PR tree-optimization/83957
18910 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
18911 semicolon after for body surrounded by braces.
18913 PR tree-optimization/83081
18914 * profile-count.h (profile_probability::split): New method.
18915 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18916 Use profile_probability::split.
18917 (do_compare_rtx_and_jump): Fix adjustment of probabilities
18918 when splitting a single conditional jump into 2.
18920 2018-01-22 David Malcolm <dmalcolm@redhat.com>
18922 PR tree-optimization/69452
18923 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18926 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18928 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18929 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18930 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18932 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18934 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18936 * config/rl78/rl78.md (movdi): New define_expand.
18937 * config/rl78/rl78.c (rl78_split_movdi): New function.
18939 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
18942 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18944 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18945 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18946 128-bit to produce an UNSPEC move to get the double word with the
18947 signbit and then a shift directly to do signbit.
18948 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18949 implementation with a new version that just does either a direct
18950 move or a regular move. Move memory interface to separate insns.
18951 Move insns so they are next to the expander.
18952 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18953 with signbit move. Split big and little endian case.
18954 (signbit<mode>2_dm_mem_le): Likewise.
18955 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18956 (signbit<mode>2_dm2): Likewise.
18958 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18960 * config/rl78/rl78.md (anddi3): New define_expand.
18962 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18964 * config/rl78/rl78.md (umindi3): New define_expand.
18966 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18968 * config/rl78/rl78.md (smindi3): New define_expand.
18970 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18972 * config/rl78/rl78.md (smaxdi3): New define_expand.
18974 2018-01-22 Carl Love <cel@us.ibm.com>
18976 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18977 LVX_V1TI): Add macro expansion.
18978 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18979 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18980 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18981 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18982 Change check to determine if the instruction is a byte reversing
18983 entry. Fix typo in comment.
18984 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18985 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18986 Add def_builtin calls for new builtins.
18987 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18988 Add define_insn expansion.
18990 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18992 * config/rl78/rl78.md (umaxdi3): New define_expand.
18994 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18996 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18997 for non-QImode registers.
18999 2018-01-22 Richard Biener <rguenther@suse.de>
19001 PR tree-optimization/83963
19002 * graphite-scop-detection.c (scop_detection::get_sese): Delay
19003 including the loop exit block.
19004 (scop_detection::merge_sese): Likewise.
19005 (scop_detection::add_scop): Do it here instead.
19007 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19009 * doc/sourcebuild.texi (arm_softfloat): Document.
19011 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
19014 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
19015 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
19016 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
19018 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19019 David Edelsohn <dje.gcc@gmail.com>
19022 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19023 Change "crset eq" to "crset 2".
19024 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19025 (*call_indirect_aix<mode>_nospec): Likewise.
19026 (*call_value_indirect_aix<mode>_nospec): Likewise.
19027 (*call_indirect_elfv2<mode>_nospec): Likewise.
19028 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
19029 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
19030 change assembly output from . to $.
19031 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19032 (indirect_jump<mode>_nospec): Change assembly output from . to $.
19033 (*tablejump<mode>_internal1_nospec): Likewise.
19035 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
19038 * config/sh/sh_optimize_sett_clrt.cc:
19039 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
19041 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
19043 PR tree-optimization/83940
19044 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
19045 offset_dt to vect_constant_def rather than vect_unknown_def_type.
19046 (vect_check_load_store_mask): Add a mask_dt_out parameter and
19047 use it to pass back the definition type.
19048 (vect_check_store_rhs): Likewise rhs_dt_out.
19049 (vect_build_gather_load_calls): Add a mask_dt argument and use
19050 it instead of a call to vect_is_simple_use.
19051 (vectorizable_store): Update calls to vect_check_load_store_mask
19052 and vect_check_store_rhs. Use the dt returned by the latter instead
19053 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
19054 instead of calls to vect_is_simple_use. Pass the scalar rather
19055 than the vector operand to vect_is_simple_use when handling
19056 second and subsequent copies of an rhs value.
19057 (vectorizable_load): Update calls to vect_check_load_store_mask
19058 and vect_build_gather_load_calls. Use the cached mask_dt and
19059 gs_info.offset_dt instead of calls to vect_is_simple_use.
19061 2018-01-20 Jakub Jelinek <jakub@redhat.com>
19063 PR middle-end/83945
19064 * tree-emutls.c: Include gimplify.h.
19065 (lower_emutls_2): New function.
19066 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
19067 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
19068 it before further processing.
19071 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
19072 UINTVAL (trueop1) instead of INTVAL (op1).
19074 2018-01-19 Jakub Jelinek <jakub@redhat.com>
19078 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
19079 INCOMING_FRAME_SP_OFFSET if not defined.
19080 (scan_trace): Add ENTRY argument. If true and
19081 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
19082 emit a note to adjust the CFA offset.
19083 (create_cfi_notes): Adjust scan_trace callers.
19084 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
19085 INCOMING_FRAME_SP_OFFSET in the CIE.
19086 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
19087 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
19089 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
19090 * doc/tm.texi: Regenerated.
19092 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19094 PR rtl-optimization/83147
19095 * lra-constraints.c (remove_inheritance_pseudos): Use
19096 lra_substitute_pseudo_within_insn.
19098 2018-01-19 Tom de Vries <tom@codesourcery.com>
19099 Cesar Philippidis <cesar@codesourcery.com>
19102 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
19104 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
19107 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
19108 spaces for function labels.
19110 2018-01-19 Martin Liska <mliska@suse.cz>
19112 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
19113 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
19114 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
19115 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
19116 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
19117 (PRED_CONST_RETURN): Change from 69 to 65.
19118 (PRED_NULL_RETURN): Change from 91 to 71.
19119 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
19120 (PRED_LOOP_GUARD): Change from 66 to 73.
19122 2018-01-19 Martin Liska <mliska@suse.cz>
19124 * predict.c (predict_insn_def): Add new assert.
19125 (struct branch_predictor): Change type to signed integer.
19126 (test_prediction_value_range): Amend test to cover
19127 PROB_UNINITIALIZED.
19128 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
19129 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
19130 (PRED_LOOP_ITERATIONS_MAX): Likewise.
19131 (PRED_LOOP_IV_COMPARE): Likewise.
19132 * predict.h (PROB_UNINITIALIZED): Define new constant.
19134 2018-01-19 Martin Liska <mliska@suse.cz>
19136 * predict.c (dump_prediction): Add new format for
19137 analyze_brprob.py script which is enabled with -details
19139 * profile-count.h (precise_p): New function.
19141 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19143 PR tree-optimization/83922
19144 * tree-vect-loop.c (vect_verify_full_masking): Return false if
19145 there are no statements that need masking.
19146 (vect_active_double_reduction_p): New function.
19147 (vect_analyze_loop_operations): Use it when handling phis that
19148 are not in the loop header.
19150 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
19152 PR tree-optimization/83914
19153 * tree-vect-loop.c (vectorizable_induction): Don't convert
19154 init_expr or apply the peeling adjustment for inductions
19155 that are nested within the vectorized loop.
19157 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19159 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
19162 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19166 * function.h (gimplify_parameters): Add gimple_seq * argument.
19167 * function.c: Include gimple.h and options.h.
19168 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
19169 for the added local temporaries if needed.
19170 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19171 if there are any parameter cleanups, wrap whole body into a
19172 try/finally with the cleanups.
19174 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19177 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19178 Use GET_MODE_CLASS for scalar floating point.
19180 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19184 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19185 Fix call of call_cgraph_insertion_hooks.
19187 2018-01-18 Martin Sebor <msebor@redhat.com>
19189 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19191 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19194 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19197 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19200 * common.opt: (-ffile-prefix-map): New option.
19201 * opts.c (common_handle_option): Defer it.
19202 * opts-global.c (handle_common_deferred_options): Handle it.
19203 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19204 * file-prefix-map.h: New file.
19205 (remap_debug_filename, add_debug_prefix_map): ...here.
19206 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19207 * final.c (debug_prefix_map, add_debug_prefix_map
19208 remap_debug_filename): Move to...
19209 * file-prefix-map.c: New file.
19210 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19211 generalize, get rid of alloca(), use strrchr() instead of strchr().
19212 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19213 Implement in terms of add_prefix_map().
19214 (remap_macro_filename, remap_debug_filename): Implement in term of
19216 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19217 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19218 * dbxout.c: Include file-prefix-map.h.
19219 * varasm.c: Likewise.
19220 * vmsdbgout.c: Likewise.
19221 * xcoffout.c: Likewise.
19222 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19223 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19224 * doc/invoke.texi (-ffile-prefix-map): Document.
19225 (-fdebug-prefix-map): Update description.
19227 2018-01-18 Martin Liska <mliska@suse.cz>
19229 * config/i386/i386.c (indirect_thunk_name): Document that also
19231 (output_indirect_thunk): Document why both instructions
19232 (pause and lfence) are generated.
19234 2018-01-18 Richard Biener <rguenther@suse.de>
19236 PR tree-optimization/83887
19237 * graphite-scop-detection.c
19238 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19239 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19240 (scop_detection::merge_sese): Re-implement with a flood-fill
19241 algorithm that properly finds a SESE region if it exists.
19243 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19246 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19247 pointer_diff optimizations use view_convert instead of convert.
19249 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19251 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19252 Generate different code for -mno-speculate-indirect-jumps.
19253 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19254 (*call_indirect_aix<mode>): Disable for
19255 -mno-speculate-indirect-jumps.
19256 (*call_indirect_aix<mode>_nospec): New define_insn.
19257 (*call_value_indirect_aix<mode>): Disable for
19258 -mno-speculate-indirect-jumps.
19259 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19260 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19261 -mno-speculate-indirect-jumps.
19262 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19264 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19266 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19267 long double type, set the flags for noting the default long double
19268 type, even if we don't pass or return a long double type.
19270 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19273 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19276 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19278 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19279 support for merge[hl].
19280 (fold_mergehl_helper): New helper function.
19281 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19282 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19283 (altivec_vmrglw_direct): Add xxmrglw insn.
19285 2018-01-17 Andrew Waterman <andrew@sifive.com>
19287 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19288 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19290 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19293 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19294 call the lto_location_cache before reading the
19295 DECL_SOURCE_LOCATION of the types.
19297 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19298 Richard Sandiford <richard.sandiford@linaro.org>
19300 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19301 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19302 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19303 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19304 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19306 * config/aarch64/constraints.md (aarch64_movti_operand):
19308 * config/aarch64/predicates.md (Uti): Add new constraint.
19310 2018-01-17 Carl Love <cel@us.ibm.com>
19312 * config/rs6000/vsx.md (define_expand xl_len_r,
19313 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19314 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19316 (define_expand, define_insn): Move the shift left from the
19317 define_insn to the define_expand for lxvl and stxvl instructions.
19318 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19319 and XL_LEN_R definitions to PURE.
19321 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19323 * config/i386/i386.c (indirect_thunk_name): Declare regno
19324 as unsigned int. Compare regno with INVALID_REGNUM.
19325 (output_indirect_thunk): Ditto.
19326 (output_indirect_thunk_function): Ditto.
19327 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19328 in the call to output_indirect_thunk_function.
19330 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19332 PR middle-end/83884
19333 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19334 rather than the size of inner_type to determine the stack slot size
19335 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19337 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19340 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19343 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19345 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19346 endian Linux systems to optionally enable multilibs for selecting
19347 the long double type if the user configured an explicit type.
19348 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19349 have no long double multilibs if not defined.
19350 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19351 warn if the user used -mabi={ieee,ibm}longdouble and we built
19352 multilibs for long double.
19353 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19354 appropriate multilib option.
19355 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19357 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19358 for building long double multilibs.
19359 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19361 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19363 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19366 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19368 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19371 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19374 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19377 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19379 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19380 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19382 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19384 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19385 different rtl trees depending on TARGET_64BIT.
19386 (rs6000_gen_lvx): Likewise.
19388 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19390 * config/visium/visium.md (nop): Tweak comment.
19391 (hazard_nop): Likewise.
19393 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19395 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19396 -mspeculate-indirect-jumps.
19397 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19398 for -mno-speculate-indirect-jumps.
19399 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19400 (*call_value_indirect_elfv2<mode>): Disable for
19401 -mno-speculate-indirect-jumps.
19402 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19403 (indirect_jump): Emit different RTL for
19404 -mno-speculate-indirect-jumps.
19405 (*indirect_jump<mode>): Disable for
19406 -mno-speculate-indirect-jumps.
19407 (*indirect_jump<mode>_nospec): New define_insn.
19408 (tablejump): Emit different RTL for
19409 -mno-speculate-indirect-jumps.
19410 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19411 (tablejumpsi_nospec): New define_expand.
19412 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19413 (tablejumpdi_nospec): New define_expand.
19414 (*tablejump<mode>_internal1): Disable for
19415 -mno-speculate-indirect-jumps.
19416 (*tablejump<mode>_internal1_nospec): New define_insn.
19417 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19420 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19422 * caller-save.c (insert_save): Drop unnecessary parameter. All
19425 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19426 Richard Biener <rguenth@suse.de>
19429 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19430 return early, inline manually is_gimple_sizepos. Make sure if we
19431 call gimplify_expr we don't end up with a gimple constant.
19432 * tree.c (variably_modified_type_p): Don't return true for
19433 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19434 * gimplify.h (is_gimple_sizepos): Remove.
19436 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19438 PR tree-optimization/83857
19439 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19440 vectorizable_live_operation for pure SLP statements.
19441 (vectorizable_live_operation): Handle PHIs.
19443 2018-01-16 Richard Biener <rguenther@suse.de>
19445 PR tree-optimization/83867
19446 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19447 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19449 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19452 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19453 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19454 If off is not INTEGER_CST, issue a may not be aligned warning
19455 rather than isn't aligned. Use isn%'t rather than isn't.
19456 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19458 <case MULT_EXPR>: Improve the case when bottom and one of the
19459 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19460 operand, in that case check if the other operand is multiple of
19461 bottom divided by the INTEGER_CST operand.
19463 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19466 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19467 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19468 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19469 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19470 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19471 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19472 (pa_function_arg_size): New function.
19474 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19476 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19477 in a separate statement.
19479 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19481 PR tree-optimization/83847
19482 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19483 group gathers and scatters.
19485 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19487 PR rtl-optimization/86620
19488 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19490 PR rtl-optimization/83213
19491 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19492 to last if both are JUMP_INSNs.
19494 PR tree-optimization/83843
19495 * gimple-ssa-store-merging.c
19496 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19497 store_immediate_info for bswap/nop orig_stores.
19499 2018-01-15 Andrew Waterman <andrew@sifive.com>
19501 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19503 <UDIV>: Increase cost if !TARGET_DIV.
19505 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19507 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19508 (define_attr "cr_logical_3op"): New.
19509 (cceq_ior_compare): Adjust.
19510 (cceq_ior_compare_complement): Adjust.
19511 (*cceq_rev_compare): Adjust.
19512 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19513 (is_cracked_insn): Adjust.
19514 (insn_must_be_first_in_group): Adjust.
19515 * config/rs6000/40x.md: Adjust.
19516 * config/rs6000/440.md: Adjust.
19517 * config/rs6000/476.md: Adjust.
19518 * config/rs6000/601.md: Adjust.
19519 * config/rs6000/603.md: Adjust.
19520 * config/rs6000/6xx.md: Adjust.
19521 * config/rs6000/7450.md: Adjust.
19522 * config/rs6000/7xx.md: Adjust.
19523 * config/rs6000/8540.md: Adjust.
19524 * config/rs6000/cell.md: Adjust.
19525 * config/rs6000/e300c2c3.md: Adjust.
19526 * config/rs6000/e500mc.md: Adjust.
19527 * config/rs6000/e500mc64.md: Adjust.
19528 * config/rs6000/e5500.md: Adjust.
19529 * config/rs6000/e6500.md: Adjust.
19530 * config/rs6000/mpc.md: Adjust.
19531 * config/rs6000/power4.md: Adjust.
19532 * config/rs6000/power5.md: Adjust.
19533 * config/rs6000/power6.md: Adjust.
19534 * config/rs6000/power7.md: Adjust.
19535 * config/rs6000/power8.md: Adjust.
19536 * config/rs6000/power9.md: Adjust.
19537 * config/rs6000/rs64.md: Adjust.
19538 * config/rs6000/titan.md: Adjust.
19540 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19542 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19543 ix86_indirect_branch_register logic.
19545 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19547 * config/i386/constraints.md (Bs): Update
19548 ix86_indirect_branch_register check. Don't check
19549 ix86_indirect_branch_register with GOT_memory_operand.
19551 * config/i386/predicates.md (GOT_memory_operand): Don't check
19552 ix86_indirect_branch_register here.
19553 (GOT32_symbol_operand): Likewise.
19555 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19557 * config/i386/predicates.md (constant_call_address_operand):
19558 Rewrite ix86_indirect_branch_register logic.
19559 (sibcall_insn_operand): Likewise.
19561 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19563 * config/i386/constraints.md (Bs): Replace
19564 ix86_indirect_branch_thunk_register with
19565 ix86_indirect_branch_register.
19567 * config/i386/i386.md (indirect_jump): Likewise.
19568 (tablejump): Likewise.
19569 (*sibcall_memory): Likewise.
19570 (*sibcall_value_memory): Likewise.
19571 Peepholes of indirect call and jump via memory: Likewise.
19572 * config/i386/i386.opt: Likewise.
19573 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19574 (GOT_memory_operand): Likewise.
19575 (call_insn_operand): Likewise.
19576 (sibcall_insn_operand): Likewise.
19577 (GOT32_symbol_operand): Likewise.
19579 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19581 PR middle-end/83837
19582 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19583 type rather than type addr's type points to.
19584 (expand_omp_atomic_mutex): Likewise.
19585 (expand_omp_atomic): Likewise.
19587 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19590 * config/i386/i386.c (output_indirect_thunk_function): Use
19591 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19592 for __x86_return_thunk.
19594 2018-01-15 Richard Biener <rguenther@suse.de>
19596 PR middle-end/83850
19597 * expmed.c (extract_bit_field_1): Fix typo.
19599 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19602 * config/arm/iterators.md (VF): New mode iterator.
19603 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19604 Remove integer-related logic from pattern.
19605 (neon_vabd<mode>_3): Likewise.
19607 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19609 PR middle-end/82694
19610 * common.opt (fstrict-overflow): No longer an alias.
19611 (fwrapv-pointer): New option.
19612 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19613 also for pointer types based on flag_wrapv_pointer.
19614 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19615 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19616 opts->x_flag_wrapv got set.
19617 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19618 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19619 POINTER_TYPE_OVERFLOW_UNDEFINED.
19620 * match.pd: Likewise in address comparison pattern.
19621 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19623 2018-01-15 Richard Biener <rguenther@suse.de>
19626 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19627 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19628 Reset type names to their identifier if their TYPE_DECL doesn't
19629 have linkage (and thus is used for ODR and devirt).
19630 (save_debug_info_for_decl): Remove.
19631 (save_debug_info_for_type): Likewise.
19632 (add_tree_to_fld_list): Adjust.
19633 * tree-pretty-print.c (dump_generic_node): Make dumping of
19634 type names more robust.
19636 2018-01-15 Richard Biener <rguenther@suse.de>
19638 * BASE-VER: Bump to 8.0.1.
19640 2018-01-14 Martin Sebor <msebor@redhat.com>
19643 * builtins.c (check_access): Avoid warning when the no-warning bit
19646 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19648 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19649 * ira-color (allocno_hard_regs_compare): Likewise.
19651 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19654 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19655 Use .pushsection/.popsection.
19657 2018-01-14 Martin Sebor <msebor@redhat.com>
19660 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19662 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19664 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19665 entry from extra_headers.
19666 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19667 extra_headers, make the list bitwise identical to the i?86-*-* one.
19669 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19671 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19672 -mcmodel=large with -mindirect-branch=thunk,
19673 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19674 -mfunction-return=thunk-extern.
19675 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19676 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19677 -mfunction-return=thunk and -mfunction-return=thunk-extern.
19679 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19681 * config/i386/i386.c (print_reg): Print the name of the full
19682 integer register without '%'.
19683 (ix86_print_operand): Handle 'V'.
19684 * doc/extend.texi: Document 'V' modifier.
19686 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19688 * config/i386/constraints.md (Bs): Disallow memory operand for
19689 -mindirect-branch-register.
19691 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19692 (GOT_memory_operand): Likewise.
19693 (call_insn_operand): Likewise.
19694 (sibcall_insn_operand): Likewise.
19695 (GOT32_symbol_operand): Likewise.
19696 * config/i386/i386.md (indirect_jump): Call convert_memory_address
19697 for -mindirect-branch-register.
19698 (tablejump): Likewise.
19699 (*sibcall_memory): Likewise.
19700 (*sibcall_value_memory): Likewise.
19701 Disallow peepholes of indirect call and jump via memory for
19702 -mindirect-branch-register.
19703 (*call_pop): Replace m with Bw.
19704 (*call_value_pop): Likewise.
19705 (*sibcall_pop_memory): Replace m with Bs.
19706 * config/i386/i386.opt (mindirect-branch-register): New option.
19707 * doc/invoke.texi: Document -mindirect-branch-register option.
19709 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19711 * config/i386/i386-protos.h (ix86_output_function_return): New.
19712 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19713 set function_return_type.
19714 (indirect_thunk_name): Add ret_p to indicate thunk for function
19716 (output_indirect_thunk_function): Pass false to
19717 indirect_thunk_name.
19718 (ix86_output_indirect_branch_via_reg): Likewise.
19719 (ix86_output_indirect_branch_via_push): Likewise.
19720 (output_indirect_thunk_function): Create alias for function
19721 return thunk if regno < 0.
19722 (ix86_output_function_return): New function.
19723 (ix86_handle_fndecl_attribute): Handle function_return.
19724 (ix86_attribute_table): Add function_return.
19725 * config/i386/i386.h (machine_function): Add
19726 function_return_type.
19727 * config/i386/i386.md (simple_return_internal): Use
19728 ix86_output_function_return.
19729 (simple_return_internal_long): Likewise.
19730 * config/i386/i386.opt (mfunction-return=): New option.
19731 (indirect_branch): Mention -mfunction-return=.
19732 * doc/extend.texi: Document function_return function attribute.
19733 * doc/invoke.texi: Document -mfunction-return= option.
19735 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19737 * config/i386/i386-opts.h (indirect_branch): New.
19738 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19739 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19740 with local indirect jump when converting indirect call and jump.
19741 (ix86_set_indirect_branch_type): New.
19742 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19743 (indirectlabelno): New.
19744 (indirect_thunk_needed): Likewise.
19745 (indirect_thunk_bnd_needed): Likewise.
19746 (indirect_thunks_used): Likewise.
19747 (indirect_thunks_bnd_used): Likewise.
19748 (INDIRECT_LABEL): Likewise.
19749 (indirect_thunk_name): Likewise.
19750 (output_indirect_thunk): Likewise.
19751 (output_indirect_thunk_function): Likewise.
19752 (ix86_output_indirect_branch_via_reg): Likewise.
19753 (ix86_output_indirect_branch_via_push): Likewise.
19754 (ix86_output_indirect_branch): Likewise.
19755 (ix86_output_indirect_jmp): Likewise.
19756 (ix86_code_end): Call output_indirect_thunk_function if needed.
19757 (ix86_output_call_insn): Call ix86_output_indirect_branch if
19759 (ix86_handle_fndecl_attribute): Handle indirect_branch.
19760 (ix86_attribute_table): Add indirect_branch.
19761 * config/i386/i386.h (machine_function): Add indirect_branch_type
19762 and has_local_indirect_jump.
19763 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19765 (tablejump): Likewise.
19766 (*indirect_jump): Use ix86_output_indirect_jmp.
19767 (*tablejump_1): Likewise.
19768 (simple_return_indirect_internal): Likewise.
19769 * config/i386/i386.opt (mindirect-branch=): New option.
19770 (indirect_branch): New.
19773 (thunk-inline): Likewise.
19774 (thunk-extern): Likewise.
19775 * doc/extend.texi: Document indirect_branch function attribute.
19776 * doc/invoke.texi: Document -mindirect-branch= option.
19778 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
19781 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19783 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
19785 * ipa-inline.c (want_inline_small_function_p): Return false if
19786 inlining has already failed with CIF_FINAL_ERROR.
19787 (update_caller_keys): Call want_inline_small_function_p before
19789 (update_callee_keys): Likewise.
19791 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19793 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19795 (rs6000_quadword_masked_address_p): Likewise.
19796 (quad_aligned_load_p): Likewise.
19797 (quad_aligned_store_p): Likewise.
19798 (const_load_sequence_p): Add comment to describe the outer-most loop.
19799 (mimic_memory_attributes_and_flags): New function.
19800 (rs6000_gen_stvx): Likewise.
19801 (replace_swapped_aligned_store): Likewise.
19802 (rs6000_gen_lvx): Likewise.
19803 (replace_swapped_aligned_load): Likewise.
19804 (replace_swapped_load_constant): Capitalize argument name in
19805 comment describing this function.
19806 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19807 and stores that access quad-word aligned addresses and replace
19808 with stvx or lvx instructions when appropriate.
19809 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19810 New function prototype.
19811 (rs6000_quadword_masked_address_p): Likewise.
19812 (rs6000_gen_lvx): Likewise.
19813 (rs6000_gen_stvx): Likewise.
19814 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19815 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19816 when memory address is aligned.
19817 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19818 this split to select lvx instruction when memory address is aligned.
19819 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19820 instruction when memory address is aligned.
19821 (*vsx_le_perm_load_v16qi): Likewise.
19822 (four unnamed splitters): Modify to select the stvx instruction
19823 when memory is aligned.
19825 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19827 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19828 which appears in the queue multiple times.
19830 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19831 Alan Hayward <alan.hayward@arm.com>
19832 David Sherwood <david.sherwood@arm.com>
19834 * tree-vectorizer.h (vec_lower_bound): New structure.
19835 (_loop_vec_info): Add check_nonzero and lower_bounds.
19836 (LOOP_VINFO_CHECK_NONZERO): New macro.
19837 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19838 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19839 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19840 fields. Make seg_len the distance travelled, not including the
19842 (dr_direction_indicator): Declare.
19843 (dr_zero_step_indicator): Likewise.
19844 (dr_known_forward_stride_p): Likewise.
19845 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19847 (runtime_alias_check_p): Allow runtime alias checks with
19849 (operator ==): Compare access_size and align.
19850 (prune_runtime_alias_test_list): Rework for new distinction between
19851 the access_size and seg_len.
19852 (create_intersect_range_checks_index): Likewise. Cope with polynomial
19854 (get_segment_min_max): New function.
19855 (create_intersect_range_checks): Use it.
19856 (dr_step_indicator): New function.
19857 (dr_direction_indicator): Likewise.
19858 (dr_zero_step_indicator): Likewise.
19859 (dr_known_forward_stride_p): Likewise.
19860 * tree-loop-distribution.c (data_ref_segment_size): Return
19861 DR_STEP * (niters - 1).
19862 (compute_alias_check_pairs): Update call to the dr_with_seg_len
19864 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19865 (vect_preserves_scalar_order_p): New function, split out from...
19866 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
19867 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19868 (vect_vfa_access_size): New function.
19869 (vect_vfa_align): Likewise.
19870 (vect_compile_time_alias): Take access_size_a and access_b arguments.
19871 (dump_lower_bound): New function.
19872 (vect_check_lower_bound): Likewise.
19873 (vect_small_gap_p): Likewise.
19874 (vectorizable_with_step_bound_p): Likewise.
19875 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19876 depencies if the vectorization factor is 1. Convert the checks
19877 for nonzero steps into checks on the bounds of DR_STEP. Try using
19878 a bunds check for variable steps if the minimum required step is
19879 relatively small. Update calls to the dr_with_seg_len
19880 constructor and to vect_compile_time_alias.
19881 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19883 (vect_loop_versioning): Call it.
19884 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19886 (vect_estimate_min_profitable_iters): Account for any bounds checks.
19888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19889 Alan Hayward <alan.hayward@arm.com>
19890 David Sherwood <david.sherwood@arm.com>
19892 * doc/sourcebuild.texi (vect_scatter_store): Document.
19893 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19895 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19897 * genopinit.c (main): Add supports_vec_scatter_store and
19898 supports_vec_scatter_store_cached to target_optabs.
19899 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19900 IFN_MASK_SCATTER_STORE.
19901 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19903 * internal-fn.h (internal_store_fn_p): Declare.
19904 (internal_fn_stored_value_index): Likewise.
19905 * internal-fn.c (scatter_store_direct): New macro.
19906 (expand_scatter_store_optab_fn): New function.
19907 (direct_scatter_store_optab_supported_p): New macro.
19908 (internal_store_fn_p): New function.
19909 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19910 IFN_MASK_SCATTER_STORE.
19911 (internal_fn_mask_index): Likewise.
19912 (internal_fn_stored_value_index): New function.
19913 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19914 for scatter stores.
19915 * optabs-query.h (supports_vec_scatter_store_p): Declare.
19916 * optabs-query.c (supports_vec_scatter_store_p): New function.
19917 * tree-vectorizer.h (vect_get_store_rhs): Declare.
19918 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19919 true for scatter stores.
19920 (vect_gather_scatter_fn_p): Handle scatter stores too.
19921 (vect_check_gather_scatter): Consider using scatter stores if
19922 supports_vec_scatter_store_p.
19923 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19924 scatter stores too.
19925 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19926 internal_fn_stored_value_index.
19927 (check_load_store_masking): Handle scatter stores too.
19928 (vect_get_store_rhs): Make public.
19929 (vectorizable_call): Use internal_store_fn_p.
19930 (vectorizable_store): Handle scatter store internal functions.
19931 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19932 when deciding whether the end of the group has been reached.
19933 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19934 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19935 (mask_scatter_store<mode>): New insns.
19937 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19938 Alan Hayward <alan.hayward@arm.com>
19939 David Sherwood <david.sherwood@arm.com>
19941 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19942 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19943 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19945 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19946 Use vect_truncate_gather_scatter_offset if we can't treat the
19947 operation as a normal gather load or scatter store.
19948 (get_group_load_store_type): Take the gather_scatter_info
19949 as argument. Try using a gather load or scatter store for
19950 single-element groups.
19951 (get_load_store_type): Update calls to get_group_load_store_type
19952 and vect_use_strided_gather_scatters_p.
19954 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19955 Alan Hayward <alan.hayward@arm.com>
19956 David Sherwood <david.sherwood@arm.com>
19958 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19959 optional tree argument.
19960 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19962 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19963 but continue to use the current value as a fallback.
19964 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19965 to compare the updates.
19966 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19967 (get_load_store_type): Use it when handling a strided access.
19968 (vect_get_strided_load_store_ops): New function.
19969 (vect_get_data_ptr_increment): Likewise.
19970 (vectorizable_load): Handle strided gather loads. Always pass
19971 a step to vect_create_data_ref_ptr and bump_vector_ptr.
19973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19974 Alan Hayward <alan.hayward@arm.com>
19975 David Sherwood <david.sherwood@arm.com>
19977 * doc/md.texi (gather_load@var{m}): Document.
19978 (mask_gather_load@var{m}): Likewise.
19979 * genopinit.c (main): Add supports_vec_gather_load and
19980 supports_vec_gather_load_cached to target_optabs.
19981 * optabs-tree.c (init_tree_optimization_optabs): Use
19982 ggc_cleared_alloc to allocate target_optabs.
19983 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19984 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19986 * internal-fn.h (internal_load_fn_p): Declare.
19987 (internal_gather_scatter_fn_p): Likewise.
19988 (internal_fn_mask_index): Likewise.
19989 (internal_gather_scatter_fn_supported_p): Likewise.
19990 * internal-fn.c (gather_load_direct): New macro.
19991 (expand_gather_load_optab_fn): New function.
19992 (direct_gather_load_optab_supported_p): New macro.
19993 (direct_internal_fn_optab): New function.
19994 (internal_load_fn_p): Likewise.
19995 (internal_gather_scatter_fn_p): Likewise.
19996 (internal_fn_mask_index): Likewise.
19997 (internal_gather_scatter_fn_supported_p): Likewise.
19998 * optabs-query.c (supports_at_least_one_mode_p): New function.
19999 (supports_vec_gather_load_p): Likewise.
20000 * optabs-query.h (supports_vec_gather_load_p): Declare.
20001 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
20002 and memory_type field.
20003 (NUM_PATTERNS): Bump to 15.
20004 * tree-vect-data-refs.c: Include internal-fn.h.
20005 (vect_gather_scatter_fn_p): New function.
20006 (vect_describe_gather_scatter_call): Likewise.
20007 (vect_check_gather_scatter): Try using internal functions for
20008 gather loads. Recognize existing calls to a gather load function.
20009 (vect_analyze_data_refs): Consider using gather loads if
20010 supports_vec_gather_load_p.
20011 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
20012 (vect_get_gather_scatter_offset_type): Likewise.
20013 (vect_convert_mask_for_vectype): Likewise.
20014 (vect_add_conversion_to_patterm): Likewise.
20015 (vect_try_gather_scatter_pattern): Likewise.
20016 (vect_recog_gather_scatter_pattern): New pattern recognizer.
20017 (vect_vect_recog_func_ptrs): Add it.
20018 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
20019 internal_fn_mask_index and internal_gather_scatter_fn_p.
20020 (check_load_store_masking): Take the gather_scatter_info as an
20021 argument and handle gather loads.
20022 (vect_get_gather_scatter_ops): New function.
20023 (vectorizable_call): Check internal_load_fn_p.
20024 (vectorizable_load): Likewise. Handle gather load internal
20026 (vectorizable_store): Update call to check_load_store_masking.
20027 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
20028 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
20029 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
20030 (aarch64_gather_scale_operand_d): New predicates.
20031 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
20032 (mask_gather_load<mode>): New insns.
20034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20035 Alan Hayward <alan.hayward@arm.com>
20036 David Sherwood <david.sherwood@arm.com>
20038 * optabs.def (fold_left_plus_optab): New optab.
20039 * doc/md.texi (fold_left_plus_@var{m}): Document.
20040 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
20041 * internal-fn.c (fold_left_direct): Define.
20042 (expand_fold_left_optab_fn): Likewise.
20043 (direct_fold_left_optab_supported_p): Likewise.
20044 * fold-const-call.c (fold_const_fold_left): New function.
20045 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
20046 * tree-parloops.c (valid_reduction_p): New function.
20047 (gather_scalar_reductions): Use it.
20048 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
20049 (vect_finish_replace_stmt): Declare.
20050 * tree-vect-loop.c (fold_left_reduction_fn): New function.
20051 (needs_fold_left_reduction_p): New function, split out from...
20052 (vect_is_simple_reduction): ...here. Accept reductions that
20053 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
20054 (vect_force_simple_reduction): Also store the reduction type in
20055 the assignment's STMT_VINFO_REDUC_TYPE.
20056 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
20057 (merge_with_identity): New function.
20058 (vect_expand_fold_left): Likewise.
20059 (vectorize_fold_left_reduction): Likewise.
20060 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
20061 scalar phi in place for it. Check for target support and reject
20062 cases that would reassociate the operation. Defer the transform
20063 phase to vectorize_fold_left_reduction.
20064 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
20065 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
20066 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
20068 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20070 * tree-if-conv.c (predicate_mem_writes): Remove redundant
20071 call to ifc_temp_var.
20073 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20074 Alan Hayward <alan.hayward@arm.com>
20075 David Sherwood <david.sherwood@arm.com>
20077 * target.def (legitimize_address_displacement): Take the original
20078 offset as a poly_int.
20079 * targhooks.h (default_legitimize_address_displacement): Update
20081 * targhooks.c (default_legitimize_address_displacement): Likewise.
20082 * doc/tm.texi: Regenerate.
20083 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
20084 as an argument, moving assert of ad->disp == ad->disp_term to...
20085 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
20086 Try calling targetm.legitimize_address_displacement before expanding
20087 the address rather than afterwards, and adjust for the new interface.
20088 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
20089 Match the new hook interface. Handle SVE addresses.
20090 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
20091 new hook interface.
20093 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20095 * Makefile.in (OBJS): Add early-remat.o.
20096 * target.def (select_early_remat_modes): New hook.
20097 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
20098 * doc/tm.texi: Regenerate.
20099 * targhooks.h (default_select_early_remat_modes): Declare.
20100 * targhooks.c (default_select_early_remat_modes): New function.
20101 * timevar.def (TV_EARLY_REMAT): New timevar.
20102 * passes.def (pass_early_remat): New pass.
20103 * tree-pass.h (make_pass_early_remat): Declare.
20104 * early-remat.c: New file.
20105 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
20107 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
20109 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20110 Alan Hayward <alan.hayward@arm.com>
20111 David Sherwood <david.sherwood@arm.com>
20113 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
20114 vfm1 with a bound_epilog parameter.
20115 (vect_do_peeling): Update calls accordingly, and move the prologue
20116 call earlier in the function. Treat the base bound_epilog as 0 for
20117 fully-masked loops and retain vf - 1 for other loops. Add 1 to
20118 this base when peeling for gaps.
20119 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
20120 with fully-masked loops.
20121 (vect_estimate_min_profitable_iters): Handle the single peeled
20122 iteration in that case.
20124 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20125 Alan Hayward <alan.hayward@arm.com>
20126 David Sherwood <david.sherwood@arm.com>
20128 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
20129 single-element interleaving even if the size is not a power of 2.
20130 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
20131 accesses for single-element interleaving if the group size is
20134 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20135 Alan Hayward <alan.hayward@arm.com>
20136 David Sherwood <david.sherwood@arm.com>
20138 * doc/md.texi (fold_extract_last_@var{m}): Document.
20139 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
20140 * optabs.def (fold_extract_last_optab): New optab.
20141 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
20142 * internal-fn.c (fold_extract_direct): New macro.
20143 (expand_fold_extract_optab_fn): Likewise.
20144 (direct_fold_extract_optab_supported_p): Likewise.
20145 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
20146 * tree-vect-loop.c (vect_model_reduction_cost): Handle
20147 EXTRACT_LAST_REDUCTION.
20148 (get_initial_def_for_reduction): Do not create an initial vector
20149 for EXTRACT_LAST_REDUCTION reductions.
20150 (vectorizable_reduction): Leave the scalar phi in place for
20151 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
20152 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
20153 epilogue code for EXTRACT_LAST_REDUCTION and defer the
20154 transform phase to vectorizable_condition.
20155 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
20157 (vect_finish_stmt_generation): ...here.
20158 (vect_finish_replace_stmt): New function.
20159 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
20160 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
20162 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
20164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20165 Alan Hayward <alan.hayward@arm.com>
20166 David Sherwood <david.sherwood@arm.com>
20168 * doc/md.texi (extract_last_@var{m}): Document.
20169 * optabs.def (extract_last_optab): New optab.
20170 * internal-fn.def (EXTRACT_LAST): New internal function.
20171 * internal-fn.c (cond_unary_direct): New macro.
20172 (expand_cond_unary_optab_fn): Likewise.
20173 (direct_cond_unary_optab_supported_p): Likewise.
20174 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20175 loops using EXTRACT_LAST.
20176 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20177 (extract_last_<mode>): ...this optab.
20178 (vec_extract<mode><Vel>): Update accordingly.
20180 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20181 Alan Hayward <alan.hayward@arm.com>
20182 David Sherwood <david.sherwood@arm.com>
20184 * target.def (empty_mask_is_expensive): New hook.
20185 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20186 * doc/tm.texi: Regenerate.
20187 * targhooks.h (default_empty_mask_is_expensive): Declare.
20188 * targhooks.c (default_empty_mask_is_expensive): New function.
20189 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20190 if the target says that empty masks are expensive.
20191 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20193 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20195 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20196 Alan Hayward <alan.hayward@arm.com>
20197 David Sherwood <david.sherwood@arm.com>
20199 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20200 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20201 (vect_use_loop_mask_for_alignment_p): New function.
20202 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20203 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20204 niters_skip argument. Make sure that the first niters_skip elements
20205 of the first iteration are inactive.
20206 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20207 Update call to vect_set_loop_masks_directly.
20208 (get_misalign_in_elems): New function, split out from...
20209 (vect_gen_prolog_loop_niters): ...here.
20210 (vect_update_init_of_dr): Take a code argument that specifies whether
20211 the adjustment should be added or subtracted.
20212 (vect_update_init_of_drs): Likewise.
20213 (vect_prepare_for_masked_peels): New function.
20214 (vect_do_peeling): Skip prologue peeling if we're using a mask
20215 instead. Update call to vect_update_inits_of_drs.
20216 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20218 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20219 alignment. Do not include the number of peeled iterations in
20220 the minimum threshold in that case.
20221 (vectorizable_induction): Adjust the start value down by
20222 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20223 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20224 Take the number of skipped iterations into account when calculating
20226 * tree-vect-stmts.c (vect_gen_while_not): New function.
20228 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20229 Alan Hayward <alan.hayward@arm.com>
20230 David Sherwood <david.sherwood@arm.com>
20232 * doc/sourcebuild.texi (vect_fully_masked): Document.
20233 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20234 default value to 0.
20235 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20237 (vect_analyze_loop_2): ...here. Don't check the vectorization
20238 factor against the number of loop iterations if the loop is
20241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20242 Alan Hayward <alan.hayward@arm.com>
20243 David Sherwood <david.sherwood@arm.com>
20245 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20246 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20247 (dump_groups): Update accordingly.
20248 (iv_use::mem_type): New member variable.
20249 (address_p): New function.
20250 (record_use): Add a mem_type argument and initialize the new
20252 (record_group_use): Add a mem_type argument. Use address_p.
20253 Remove obsolete null checks of base_object. Update call to record_use.
20254 (find_interesting_uses_op): Update call to record_group_use.
20255 (find_interesting_uses_cond): Likewise.
20256 (find_interesting_uses_address): Likewise.
20257 (get_mem_type_for_internal_fn): New function.
20258 (find_address_like_use): Likewise.
20259 (find_interesting_uses_stmt): Try find_address_like_use before
20260 calling find_interesting_uses_op.
20261 (addr_offset_valid_p): Use the iv mem_type field as the type
20262 of the addressed memory.
20263 (add_autoinc_candidates): Likewise.
20264 (get_address_cost): Likewise.
20265 (split_small_address_groups_p): Use address_p.
20266 (split_address_groups): Likewise.
20267 (add_iv_candidate_for_use): Likewise.
20268 (autoinc_possible_for_pair): Likewise.
20269 (rewrite_groups): Likewise.
20270 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20271 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20272 (get_alias_ptr_type_for_ptr_address): New function.
20273 (rewrite_use_address): Rewrite address uses in calls that were
20274 identified by find_address_like_use.
20276 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20277 Alan Hayward <alan.hayward@arm.com>
20278 David Sherwood <david.sherwood@arm.com>
20280 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20282 * gimple-expr.h (is_gimple_addressable: Likewise.
20283 * gimple-expr.c (is_gimple_address): Likewise.
20284 * internal-fn.c (expand_call_mem_ref): New function.
20285 (expand_mask_load_optab_fn): Use it.
20286 (expand_mask_store_optab_fn): Likewise.
20288 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20289 Alan Hayward <alan.hayward@arm.com>
20290 David Sherwood <david.sherwood@arm.com>
20292 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20293 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20294 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20295 (cond_umax@var{mode}): Document.
20296 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20297 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20298 (cond_umin_optab, cond_umax_optab): New optabs.
20299 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20300 (COND_IOR, COND_XOR): New internal functions.
20301 * internal-fn.h (get_conditional_internal_fn): Declare.
20302 * internal-fn.c (cond_binary_direct): New macro.
20303 (expand_cond_binary_optab_fn): Likewise.
20304 (direct_cond_binary_optab_supported_p): Likewise.
20305 (get_conditional_internal_fn): New function.
20306 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20307 Cope with reduction statements that are vectorized as calls rather
20309 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20310 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20311 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20312 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20313 (UNSPEC_COND_EOR): New unspecs.
20314 (optab): Add mappings for them.
20315 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20316 (sve_int_op, sve_fp_op): New int attributes.
20318 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20319 Alan Hayward <alan.hayward@arm.com>
20320 David Sherwood <david.sherwood@arm.com>
20322 * optabs.def (while_ult_optab): New optab.
20323 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20324 * internal-fn.def (WHILE_ULT): New internal function.
20325 * internal-fn.h (direct_internal_fn_supported_p): New override
20326 that takes two types as argument.
20327 * internal-fn.c (while_direct): New macro.
20328 (expand_while_optab_fn): New function.
20329 (convert_optab_supported_p): Likewise.
20330 (direct_while_optab_supported_p): New macro.
20331 * wide-int.h (wi::udiv_ceil): New function.
20332 * tree-vectorizer.h (rgroup_masks): New structure.
20333 (vec_loop_masks): New typedef.
20334 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20335 and fully_masked_p.
20336 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20337 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20338 (vect_max_vf): New function.
20339 (slpeel_make_loop_iterate_ntimes): Delete.
20340 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20341 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20342 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20343 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20344 internal-fn.h, stor-layout.h and optabs-query.h.
20345 (vect_set_loop_mask): New function.
20346 (add_preheader_seq): Likewise.
20347 (add_header_seq): Likewise.
20348 (interleave_supported_p): Likewise.
20349 (vect_maybe_permute_loop_masks): Likewise.
20350 (vect_set_loop_masks_directly): Likewise.
20351 (vect_set_loop_condition_masked): Likewise.
20352 (vect_set_loop_condition_unmasked): New function, split out from
20353 slpeel_make_loop_iterate_ntimes.
20354 (slpeel_make_loop_iterate_ntimes): Rename to..
20355 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20356 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20357 (vect_do_peeling): Update call accordingly.
20358 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20360 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20361 mask_compare_type, can_fully_mask_p and fully_masked_p.
20362 (release_vec_loop_masks): New function.
20363 (_loop_vec_info): Use it to free the loop masks.
20364 (can_produce_all_loop_masks_p): New function.
20365 (vect_get_max_nscalars_per_iter): Likewise.
20366 (vect_verify_full_masking): Likewise.
20367 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20368 retries, and free the mask rgroups before retrying. Check loop-wide
20369 reasons for disallowing fully-masked loops. Make the final decision
20370 about whether use a fully-masked loop or not.
20371 (vect_estimate_min_profitable_iters): Do not assume that peeling
20372 for the number of iterations will be needed for fully-masked loops.
20373 (vectorizable_reduction): Disable fully-masked loops.
20374 (vectorizable_live_operation): Likewise.
20375 (vect_halve_mask_nunits): New function.
20376 (vect_double_mask_nunits): Likewise.
20377 (vect_record_loop_mask): Likewise.
20378 (vect_get_loop_mask): Likewise.
20379 (vect_transform_loop): Handle the case in which the final loop
20380 iteration might handle a partial vector. Call vect_set_loop_condition
20381 instead of slpeel_make_loop_iterate_ntimes.
20382 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20383 (check_load_store_masking): New function.
20384 (prepare_load_store_mask): Likewise.
20385 (vectorizable_store): Handle fully-masked loops.
20386 (vectorizable_load): Likewise.
20387 (supportable_widening_operation): Use vect_halve_mask_nunits for
20389 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20390 (vect_gen_while): New function.
20391 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20392 (aarch64_uqdec<mode>): New insn.
20394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20395 Alan Hayward <alan.hayward@arm.com>
20396 David Sherwood <david.sherwood@arm.com>
20398 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20399 (reduc_xor_scal_optab): New optabs.
20400 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20401 (reduc_xor_scal_@var{m}): Document.
20402 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20403 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20404 internal functions.
20405 * fold-const-call.c (fold_const_call): Handle them.
20406 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20407 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20408 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20409 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20410 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20411 (UNSPEC_XORV): New unspecs.
20412 (optab): Add entries for them.
20413 (BITWISEV): New int iterator.
20414 (bit_reduc_op): New int attributes.
20416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20417 Alan Hayward <alan.hayward@arm.com>
20418 David Sherwood <david.sherwood@arm.com>
20420 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20421 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20422 * optabs.def (vec_shl_insert_optab): New optab.
20423 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20424 (duplicate_and_interleave): Likewise.
20425 * tree-vect-loop.c: Include internal-fn.h.
20426 (neutral_op_for_slp_reduction): New function, split out from
20427 get_initial_defs_for_reduction.
20428 (get_initial_def_for_reduction): Handle option 2 for variable-length
20429 vectors by loading the neutral value into a vector and then shifting
20430 the initial value into element 0.
20431 (get_initial_defs_for_reduction): Replace the code argument with
20432 the neutral value calculated by neutral_op_for_slp_reduction.
20433 Use gimple_build_vector for constant-length vectors.
20434 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20435 but the first group_size elements have a neutral value.
20436 Use duplicate_and_interleave otherwise.
20437 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20438 Update call to get_initial_defs_for_reduction. Handle SLP
20439 reductions for variable-length vectors by creating one vector
20440 result for each scalar result, with the elements associated
20441 with other scalar results stubbed out with the neutral value.
20442 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20443 Require IFN_VEC_SHL_INSERT for double reductions on
20444 variable-length vectors, or SLP reductions that have
20445 a neutral value. Require can_duplicate_and_interleave_p
20446 support for variable-length unchained SLP reductions if there
20447 is no neutral value, such as for MIN/MAX reductions. Also require
20448 the number of vector elements to be a multiple of the number of
20449 SLP statements when doing variable-length unchained SLP reductions.
20450 Update call to vect_create_epilog_for_reduction.
20451 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20452 and remove initial values.
20453 (duplicate_and_interleave): Make public.
20454 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20455 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20458 Alan Hayward <alan.hayward@arm.com>
20459 David Sherwood <david.sherwood@arm.com>
20461 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20462 (can_duplicate_and_interleave_p): New function.
20463 (vect_get_and_check_slp_defs): Take the vector of statements
20464 rather than just the current one. Remove excess parentheses.
20465 Restriction rejectinon of vect_constant_def and vect_external_def
20466 for variable-length vectors to boolean types, or types for which
20467 can_duplicate_and_interleave_p is false.
20468 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20469 (duplicate_and_interleave): New function.
20470 (vect_get_constant_vectors): Use gimple_build_vector for
20471 constant-length vectors and suitable variable-length constant
20472 vectors. Use duplicate_and_interleave for other variable-length
20473 vectors. Don't defer the update when inserting new statements.
20475 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20476 Alan Hayward <alan.hayward@arm.com>
20477 David Sherwood <david.sherwood@arm.com>
20479 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20480 min_profitable_iters doesn't go negative.
20482 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20483 Alan Hayward <alan.hayward@arm.com>
20484 David Sherwood <david.sherwood@arm.com>
20486 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20487 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20488 * optabs.def (vec_mask_load_lanes_optab): New optab.
20489 (vec_mask_store_lanes_optab): Likewise.
20490 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20491 (MASK_STORE_LANES): Likewise.
20492 * internal-fn.c (mask_load_lanes_direct): New macro.
20493 (mask_store_lanes_direct): Likewise.
20494 (expand_mask_load_optab_fn): Handle masked operations.
20495 (expand_mask_load_lanes_optab_fn): New macro.
20496 (expand_mask_store_optab_fn): Handle masked operations.
20497 (expand_mask_store_lanes_optab_fn): New macro.
20498 (direct_mask_load_lanes_optab_supported_p): Likewise.
20499 (direct_mask_store_lanes_optab_supported_p): Likewise.
20500 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20502 (vect_load_lanes_supported): Likewise.
20503 * tree-vect-data-refs.c (strip_conversion): New function.
20504 (can_group_stmts_p): Likewise.
20505 (vect_analyze_data_ref_accesses): Use it instead of checking
20506 for a pair of assignments.
20507 (vect_store_lanes_supported): Take a masked_p parameter.
20508 (vect_load_lanes_supported): Likewise.
20509 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20510 vect_store_lanes_supported and vect_load_lanes_supported.
20511 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20512 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20513 parameter. Don't allow gaps for masked accesses.
20514 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20515 and vect_load_lanes_supported.
20516 (get_load_store_type): Take a masked_p parameter and update
20517 call to get_group_load_store_type.
20518 (vectorizable_store): Update call to get_load_store_type.
20519 Handle IFN_MASK_STORE_LANES.
20520 (vectorizable_load): Update call to get_load_store_type.
20521 Handle IFN_MASK_LOAD_LANES.
20523 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20524 Alan Hayward <alan.hayward@arm.com>
20525 David Sherwood <david.sherwood@arm.com>
20527 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20529 * config/aarch64/aarch64-protos.h
20530 (aarch64_sve_struct_memory_operand_p): Declare.
20531 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20532 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20533 (VPRED, vpred): Handle SVE structure modes.
20534 * config/aarch64/constraints.md (Utx): New constraint.
20535 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20536 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20537 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20538 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20539 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20540 structure modes. Split into pieces after RA.
20541 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20542 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20544 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20545 SVE structure modes.
20546 (aarch64_classify_address): Likewise.
20547 (sizetochar): Move earlier in file.
20548 (aarch64_print_operand): Handle SVE register lists.
20549 (aarch64_array_mode): New function.
20550 (aarch64_sve_struct_memory_operand_p): Likewise.
20551 (TARGET_ARRAY_MODE): Redefine.
20553 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20554 Alan Hayward <alan.hayward@arm.com>
20555 David Sherwood <david.sherwood@arm.com>
20557 * target.def (array_mode): New target hook.
20558 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20559 * doc/tm.texi: Regenerate.
20560 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20561 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20562 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20563 targetm.array_mode.
20564 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20567 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20568 Alan Hayward <alan.hayward@arm.com>
20569 David Sherwood <david.sherwood@arm.com>
20571 * fold-const.c (fold_binary_loc): Check the argument types
20572 rather than the result type when testing for a vector operation.
20574 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20576 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20577 * doc/tm.texi: Regenerate.
20579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20580 Alan Hayward <alan.hayward@arm.com>
20581 David Sherwood <david.sherwood@arm.com>
20583 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20584 (sve): Document new AArch64 extension.
20585 * doc/md.texi (w): Extend the description of the AArch64
20586 constraint to include SVE vectors.
20587 (Upl, Upa): Document new AArch64 predicate constraints.
20588 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20590 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20591 (msve-vector-bits=): New option.
20592 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20593 SVE when these are disabled.
20594 (sve): New extension.
20595 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20596 modes. Adjust their number of units based on aarch64_sve_vg.
20597 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20598 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20599 aarch64_addr_query_type.
20600 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20601 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20602 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20603 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20604 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20605 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20606 (aarch64_simd_imm_zero_p): Delete.
20607 (aarch64_check_zero_based_sve_index_immediate): Declare.
20608 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20609 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20610 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20611 (aarch64_sve_float_mul_immediate_p): Likewise.
20612 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20613 rather than an rtx.
20614 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20615 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20616 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20617 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20618 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20619 (aarch64_regmode_natural_size): Likewise.
20620 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20621 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20623 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20624 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20625 for VG and the SVE predicate registers.
20626 (V_ALIASES): Add a "z"-prefixed alias.
20627 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20628 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20629 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20630 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20631 (REG_CLASS_NAMES): Add entries for them.
20632 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20633 and the predicate registers.
20634 (aarch64_sve_vg): Declare.
20635 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20636 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20637 (REGMODE_NATURAL_SIZE): Define.
20638 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20640 * config/aarch64/aarch64.c: Include cfgrtl.h.
20641 (simd_immediate_info): Add a constructor for series vectors,
20642 and an associated step field.
20643 (aarch64_sve_vg): New variable.
20644 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20645 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20646 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20647 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20648 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20649 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20650 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20651 (aarch64_get_mask_mode): New functions.
20652 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20653 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20654 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20655 predicate modes and predicate registers. Explicitly restrict
20656 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20657 to store a vector mode if it is recognized by
20658 aarch64_classify_vector_mode.
20659 (aarch64_regmode_natural_size): New function.
20660 (aarch64_hard_regno_caller_save_mode): Return the original mode
20662 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20663 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20664 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20665 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20667 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20668 does not overlap dest if the function is frame-related. Handle
20670 (aarch64_split_add_offset): New function.
20671 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20672 them aarch64_add_offset.
20673 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20674 and update call to aarch64_sub_sp.
20675 (aarch64_add_cfa_expression): New function.
20676 (aarch64_expand_prologue): Pass extra temporary registers to the
20677 functions above. Handle the case in which we need to emit new
20678 DW_CFA_expressions for registers that were originally saved
20679 relative to the stack pointer, but now have to be expressed
20680 relative to the frame pointer.
20681 (aarch64_output_mi_thunk): Pass extra temporary registers to the
20683 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
20684 IP0 and IP1 values for SVE frames.
20685 (aarch64_expand_vec_series): New function.
20686 (aarch64_expand_sve_widened_duplicate): Likewise.
20687 (aarch64_expand_sve_const_vector): Likewise.
20688 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20689 Handle SVE constants. Use emit_move_insn to move a force_const_mem
20690 into the register, rather than emitting a SET directly.
20691 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20692 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20693 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20694 (offset_9bit_signed_scaled_p): New functions.
20695 (aarch64_replicate_bitmask_imm): New function.
20696 (aarch64_bitmask_imm): Use it.
20697 (aarch64_cannot_force_const_mem): Reject expressions involving
20698 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
20699 (aarch64_classify_index): Handle SVE indices, by requiring
20700 a plain register index with a scale that matches the element size.
20701 (aarch64_classify_address): Handle SVE addresses. Assert that
20702 the mode of the address is VOIDmode or an integer mode.
20703 Update call to aarch64_classify_symbol.
20704 (aarch64_classify_symbolic_expression): Update call to
20705 aarch64_classify_symbol.
20706 (aarch64_const_vec_all_in_range_p): New function.
20707 (aarch64_print_vector_float_operand): Likewise.
20708 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
20709 "vN" for FP registers with SVE modes. Handle (const ...) vectors
20710 and the FP immediates 1.0 and 0.5.
20711 (aarch64_print_address_internal): Handle SVE addresses.
20712 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20713 (aarch64_regno_regclass): Handle predicate registers.
20714 (aarch64_secondary_reload): Handle big-endian reloads of SVE
20716 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20717 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20718 (aarch64_convert_sve_vector_bits): New function.
20719 (aarch64_override_options): Use it to handle -msve-vector-bits=.
20720 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20721 rather than an rtx.
20722 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20723 Handle SVE vector and predicate modes. Accept VL-based constants
20724 that need only one temporary register, and VL offsets that require
20725 no temporary registers.
20726 (aarch64_conditional_register_usage): Mark the predicate registers
20727 as fixed if SVE isn't available.
20728 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20729 Return true for SVE vector and predicate modes.
20730 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20731 rather than an unsigned int. Handle SVE modes.
20732 (aarch64_preferred_simd_mode): Update call accordingly. Handle
20734 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20736 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20737 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20738 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20739 (aarch64_sve_float_mul_immediate_p): New functions.
20740 (aarch64_sve_valid_immediate): New function.
20741 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20742 Explicitly reject structure modes. Check for INDEX constants.
20743 Handle PTRUE and PFALSE constants.
20744 (aarch64_check_zero_based_sve_index_immediate): New function.
20745 (aarch64_simd_imm_zero_p): Delete.
20746 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20747 vector modes. Accept constants in the range of CNT[BHWD].
20748 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20749 ask for an Advanced SIMD mode.
20750 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20751 (aarch64_simd_vector_alignment): Handle SVE predicates.
20752 (aarch64_vectorize_preferred_vector_alignment): New function.
20753 (aarch64_simd_vector_alignment_reachable): Use it instead of
20755 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20756 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20758 (MAX_VECT_LEN): Delete.
20759 (expand_vec_perm_d): Add a vec_flags field.
20760 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20761 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20762 (aarch64_evpc_ext): Don't apply a big-endian lane correction
20764 (aarch64_evpc_rev): Rename to...
20765 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
20766 (aarch64_evpc_rev_global): New function.
20767 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20768 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20770 (aarch64_evpc_sve_tbl): New function.
20771 (aarch64_expand_vec_perm_const_1): Update after rename of
20772 aarch64_evpc_rev. Handle SVE permutes too, trying
20773 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20774 than aarch64_evpc_tbl.
20775 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20776 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20777 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20778 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20779 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20780 (aarch64_expand_sve_vcond): New functions.
20781 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20782 of aarch64_vector_mode_p.
20783 (aarch64_dwarf_poly_indeterminate_value): New function.
20784 (aarch64_compute_pressure_classes): Likewise.
20785 (aarch64_can_change_mode_class): Likewise.
20786 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20787 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20788 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20789 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20790 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20791 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20792 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20793 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20795 (Dn, Dl, Dr): Accept const as well as const_vector.
20796 (Dz): Likewise. Compare against CONST0_RTX.
20797 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20798 of "vector" where appropriate.
20799 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20800 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20801 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20802 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20803 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20804 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20805 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20806 (v_int_equiv): Extend to SVE modes.
20807 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20809 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20810 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20811 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20812 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20813 (SVE_COND_FP_CMP): New int iterators.
20814 (perm_hilo): Handle the new unpack unspecs.
20815 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20817 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20818 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20819 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20820 (aarch64_equality_operator, aarch64_constant_vector_operand)
20821 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20822 (aarch64_sve_nonimmediate_operand): Likewise.
20823 (aarch64_sve_general_operand): Likewise.
20824 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20825 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20826 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20827 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20828 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20829 (aarch64_sve_float_arith_immediate): Likewise.
20830 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20831 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20832 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20833 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20834 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20835 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20836 (aarch64_sve_float_arith_operand): Likewise.
20837 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20838 (aarch64_sve_float_mul_operand): Likewise.
20839 (aarch64_sve_vec_perm_operand): Likewise.
20840 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20841 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20842 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20843 as well as const_vector.
20844 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20845 in file. Use CONST0_RTX and CONSTM1_RTX.
20846 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20847 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20848 Use aarch64_simd_imm_zero.
20849 * config/aarch64/aarch64-sve.md: New file.
20850 * config/aarch64/aarch64.md: Include it.
20851 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20852 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20853 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20854 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20855 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20856 (sve): New attribute.
20857 (enabled): Disable instructions with the sve attribute unless
20859 (movqi, movhi): Pass CONST_POLY_INT operaneds through
20860 aarch64_expand_mov_immediate.
20861 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20862 CNT[BHSD] immediates.
20863 (movti): Split CONST_POLY_INT moves into two halves.
20864 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20865 Split additions that need a temporary here if the destination
20866 is the stack pointer.
20867 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20868 (*add<mode>3_poly_1): New instruction.
20869 (set_clobber_cc): New expander.
20871 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20873 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20874 parameter and use it instead of GET_MODE_SIZE (innermode). Use
20875 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20876 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20877 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
20878 Change innermode from fixed_mode_size to machine_mode.
20879 (simplify_subreg): Update call accordingly. Handle a constant-sized
20880 subreg of a variable-length CONST_VECTOR.
20882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20883 Alan Hayward <alan.hayward@arm.com>
20884 David Sherwood <david.sherwood@arm.com>
20886 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20887 (add_offset_to_base): New function, split out from...
20888 (create_mem_ref): ...here. When handling a scale other than 1,
20889 check first whether the address is valid without the offset.
20890 Add it into the base if so, leaving the index and scale as-is.
20892 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20895 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20896 fold_for_warn before checking if arg2 is INTEGER_CST.
20898 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
20900 * config/rs6000/predicates.md (load_multiple_operation): Delete.
20901 (store_multiple_operation): Delete.
20902 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20903 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20904 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20905 guarded by TARGET_STRING.
20906 (rs6000_output_load_multiple): Delete.
20907 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20908 OPTION_MASK_STRING / TARGET_STRING handling.
20909 (print_operand) <'N', 'O'>: Add comment that these are unused now.
20910 (const rs6000_opt_masks) <"string">: Change mask to 0.
20911 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20912 (MASK_STRING): Delete.
20913 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20915 (load_multiple): Delete.
20922 (store_multiple): Delete.
20929 (movmemsi_8reg): Delete.
20930 (corresponding unnamed define_insn): Delete.
20931 (movmemsi_6reg): Delete.
20932 (corresponding unnamed define_insn): Delete.
20933 (movmemsi_4reg): Delete.
20934 (corresponding unnamed define_insn): Delete.
20935 (movmemsi_2reg): Delete.
20936 (corresponding unnamed define_insn): Delete.
20937 (movmemsi_1reg): Delete.
20938 (corresponding unnamed define_insn): Delete.
20939 * config/rs6000/rs6000.opt (mno-string): New.
20940 (mstring): Replace by deprecation warning stub.
20941 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20943 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20945 * regrename.c (regrename_do_replace): If replacing the same
20946 reg multiple times, try to reuse last created gen_raw_REG.
20949 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20950 main to workaround a bug in GDB.
20952 2018-01-12 Tom de Vries <tom@codesourcery.com>
20955 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20957 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
20959 PR rtl-optimization/80481
20960 * ira-color.c (get_cap_member): New function.
20961 (allocnos_conflict_by_live_ranges_p): Use it.
20962 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20963 (setup_slot_coalesced_allocno_live_ranges): Ditto.
20965 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
20968 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20969 (*saddl_se_1): Ditto.
20970 (*ssubsi_1): Ditto.
20971 (*ssubl_se_1): Ditto.
20973 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20975 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20976 rather than wi::to_widest for DR_INITs.
20977 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20978 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20979 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20981 (vect_analyze_group_access_1): Note that here.
20983 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20985 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20986 polynomial type sizes.
20988 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20990 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20991 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20992 (gimple_add_tmp_var): Likewise.
20994 2018-01-12 Martin Liska <mliska@suse.cz>
20996 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20997 (gimple_alloc_sizes): Likewise.
20998 (dump_gimple_statistics): Use PRIu64 in printf format.
20999 * gimple.h: Change uint64_t to int.
21001 2018-01-12 Martin Liska <mliska@suse.cz>
21003 * tree-core.h: Use uint64_t instead of int.
21004 * tree.c (tree_node_counts): Likewise.
21005 (tree_node_sizes): Likewise.
21006 (dump_tree_statistics): Use PRIu64 in printf format.
21008 2018-01-12 Martin Liska <mliska@suse.cz>
21010 * Makefile.in: As qsort_chk is implemented in vec.c, add
21011 vec.o to linkage of gencfn-macros.
21012 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
21013 passing the info to record_node_allocation_statistics.
21014 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
21016 * ggc-common.c (struct ggc_usage): Add operator== and use
21017 it in operator< and compare function.
21018 * mem-stats.h (struct mem_usage): Likewise.
21019 * vec.c (struct vec_usage): Remove operator< and compare
21020 function. Can be simply inherited.
21022 2018-01-12 Martin Jambor <mjambor@suse.cz>
21025 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
21026 * tree-ssa-math-opts.c: Include domwalk.h.
21027 (convert_mult_to_fma_1): New function.
21028 (fma_transformation_info): New type.
21029 (fma_deferring_state): Likewise.
21030 (cancel_fma_deferring): New function.
21031 (result_of_phi): Likewise.
21032 (last_fma_candidate_feeds_initial_phi): Likewise.
21033 (convert_mult_to_fma): Added deferring logic, split actual
21034 transformation to convert_mult_to_fma_1.
21035 (math_opts_dom_walker): New type.
21036 (math_opts_dom_walker::after_dom_children): New method, body moved
21037 here from pass_optimize_widening_mul::execute, added deferring logic
21039 (pass_optimize_widening_mul::execute): Moved most of code to
21040 math_opts_dom_walker::after_dom_children.
21041 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
21042 * config/i386/i386.c (ix86_option_override_internal): Added
21043 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
21045 2018-01-12 Richard Biener <rguenther@suse.de>
21048 * dwarf2out.c (gen_variable_die): Do not reset old_die for
21049 inline instance vars.
21051 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
21054 * config/rx/rx.c (rx_is_restricted_memory_address):
21055 Handle SUBREG case.
21057 2018-01-12 Richard Biener <rguenther@suse.de>
21059 PR tree-optimization/80846
21060 * target.def (split_reduction): New target hook.
21061 * targhooks.c (default_split_reduction): New function.
21062 * targhooks.h (default_split_reduction): Declare.
21063 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
21064 target requests first reduce vectors by combining low and high
21066 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
21067 (get_vectype_for_scalar_type_and_size): Export.
21068 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
21069 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
21070 * doc/tm.texi: Regenerate.
21071 * config/i386/i386.c (ix86_split_reduction): Implement
21072 TARGET_VECTORIZE_SPLIT_REDUCTION.
21074 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21077 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
21078 in PIC mode except for TARGET_VXWORKS_RTP.
21079 * config/sparc/sparc.c: Include cfgrtl.h.
21080 (TARGET_INIT_PIC_REG): Define.
21081 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
21082 (sparc_pic_register_p): New predicate.
21083 (sparc_legitimate_address_p): Use it.
21084 (sparc_legitimize_pic_address): Likewise.
21085 (sparc_delegitimize_address): Likewise.
21086 (sparc_mode_dependent_address_p): Likewise.
21087 (gen_load_pcrel_sym): Remove 4th parameter.
21088 (load_got_register): Adjust call to above. Remove obsolete stuff.
21089 (sparc_expand_prologue): Do not call load_got_register here.
21090 (sparc_flat_expand_prologue): Likewise.
21091 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
21092 (sparc_use_pseudo_pic_reg): New function.
21093 (sparc_init_pic_reg): Likewise.
21094 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
21095 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
21097 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
21099 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
21100 Add item for branch_cost.
21102 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
21104 PR rtl-optimization/83565
21105 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
21106 not extend the result to a larger mode for rotate operations.
21107 (num_sign_bit_copies1): Likewise.
21109 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21112 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
21114 Use values-Xc.o for -pedantic.
21115 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
21117 2018-01-12 Martin Liska <mliska@suse.cz>
21120 * ipa-devirt.c (final_warning_record::grow_type_warnings):
21122 (possible_polymorphic_call_targets): Use it.
21123 (ipa_devirt): Likewise.
21125 2018-01-12 Martin Liska <mliska@suse.cz>
21127 * profile-count.h (enum profile_quality): Use 0 as invalid
21128 enum value of profile_quality.
21130 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
21132 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
21133 -mext-string options.
21135 2018-01-12 Richard Biener <rguenther@suse.de>
21137 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
21138 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
21139 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
21141 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
21143 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21145 * configure.ac (--with-long-double-format): Add support for the
21146 configuration option to change the default long double format on
21148 * config.gcc (powerpc*-linux*-*): Likewise.
21149 * configure: Regenerate.
21150 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
21151 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
21152 used without modification.
21154 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21156 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
21157 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
21158 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
21159 MISC_BUILTIN_SPEC_BARRIER.
21160 (rs6000_init_builtins): Likewise.
21161 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
21163 (speculation_barrier): New define_insn.
21164 * doc/extend.texi: Document __builtin_speculation_barrier.
21166 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21169 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21170 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21171 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21173 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21174 integral modes instead of "ss" and "sd".
21175 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21176 vectors with 32-bit and 64-bit elements.
21177 (vecdupssescalarmodesuffix): New mode attribute.
21178 (vec_dup<mode>): Use it.
21180 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21183 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21184 frame if argument is passed on stack.
21186 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21189 * ree.c (combine_reaching_defs): Optimize also
21190 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21191 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21193 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21195 PR middle-end/83189
21196 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21198 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21200 PR middle-end/83718
21201 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21202 after they are computed.
21204 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21206 PR tree-optimization/83695
21207 * gimple-loop-linterchange.cc
21208 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21209 reset cached scev information after interchange.
21210 (pass_linterchange::execute): Remove call to scev_reset_htab.
21212 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21214 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21215 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21216 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21217 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21218 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21219 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21220 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21221 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21222 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21223 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21224 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21225 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21226 (V_lane_reg): Likewise.
21227 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21229 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21230 (vfmal_lane_low<mode>_intrinsic,
21231 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21232 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21233 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21234 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21235 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21236 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21238 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21240 * config/arm/arm-cpus.in (fp16fml): New feature.
21241 (ALL_SIMD): Add fp16fml.
21242 (armv8.2-a): Add fp16fml as an option.
21243 (armv8.3-a): Likewise.
21244 (armv8.4-a): Add fp16fml as part of fp16.
21245 * config/arm/arm.h (TARGET_FP16FML): Define.
21246 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21248 * config/arm/arm-modes.def (V2HF): Define.
21249 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21250 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21251 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21252 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21253 vfmsl_low, vfmsl_high): New set of builtins.
21254 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21255 (vfml_op): New code attribute.
21256 (VFMLHALVES): New int iterator.
21257 (VFML, VFMLSEL): New mode attributes.
21258 (V_reg): Define mapping for V2HF.
21259 (V_hi, V_lo): New mode attributes.
21260 (VF_constraint): Likewise.
21261 (vfml_half, vfml_half_selector): New int attributes.
21262 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21264 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21265 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21267 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21268 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21269 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21270 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21272 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21273 Document new effective target and option set.
21275 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21277 * config/arm/arm-cpus.in (armv8_4): New feature.
21278 (ARMv8_4a): New fgroup.
21279 (armv8.4-a): New arch.
21280 * config/arm/arm-tables.opt: Regenerate.
21281 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21282 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21283 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21284 Add matching rules for -march=armv8.4-a and extensions.
21285 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21287 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21290 * config/rx/rx.md (BW): New mode attribute.
21291 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21293 2018-01-11 Richard Biener <rguenther@suse.de>
21295 PR tree-optimization/83435
21296 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21297 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21298 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21300 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21301 Alan Hayward <alan.hayward@arm.com>
21302 David Sherwood <david.sherwood@arm.com>
21304 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21306 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21307 (aarch64_print_address_internal): Use it to check for a zero offset.
21309 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21310 Alan Hayward <alan.hayward@arm.com>
21311 David Sherwood <david.sherwood@arm.com>
21313 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21314 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21315 Return a poly_int64 rather than a HOST_WIDE_INT.
21316 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21317 rather than a HOST_WIDE_INT.
21318 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21319 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21320 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21321 final_offset from HOST_WIDE_INT to poly_int64.
21322 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21323 to_constant when getting the number of units in an Advanced SIMD
21325 (aarch64_builtin_vectorized_function): Check for a constant number
21327 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21329 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21330 attribute instead of GET_MODE_NUNITS.
21331 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21332 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21333 GET_MODE_SIZE for fixed-size registers.
21334 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21335 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21336 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21337 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21338 (aarch64_print_operand, aarch64_print_address_internal)
21339 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21340 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21341 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21342 Handle polynomial GET_MODE_SIZE.
21343 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21344 wider than SImode without modification.
21345 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21346 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21347 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21348 passing and returning SVE modes.
21349 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21350 rather than GEN_INT.
21351 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21352 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21353 (aarch64_allocate_and_probe_stack_space): Likewise.
21354 (aarch64_layout_frame): Cope with polynomial offsets.
21355 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21356 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21357 polynomial offsets.
21358 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21359 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21360 poly_int64 rather than a HOST_WIDE_INT.
21361 (aarch64_get_separate_components, aarch64_process_components)
21362 (aarch64_expand_prologue, aarch64_expand_epilogue)
21363 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21364 (aarch64_anchor_offset): New function, split out from...
21365 (aarch64_legitimize_address): ...here.
21366 (aarch64_builtin_vectorization_cost): Handle polynomial
21367 TYPE_VECTOR_SUBPARTS.
21368 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21370 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21371 number of elements from the PARALLEL rather than the mode.
21372 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21373 rather than GET_MODE_BITSIZE.
21374 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21375 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21376 (aarch64_expand_vec_perm_const_1): Handle polynomial
21377 d->perm.length () and d->perm elements.
21378 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21379 Apply to_constant to d->perm elements.
21380 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21381 polynomial CONST_VECTOR_NUNITS.
21382 (aarch64_move_pointer): Take amount as a poly_int64 rather
21384 (aarch64_progress_pointer): Avoid temporary variable.
21385 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21386 the mode attribute instead of GET_MODE.
21388 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21389 Alan Hayward <alan.hayward@arm.com>
21390 David Sherwood <david.sherwood@arm.com>
21392 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21393 x exists before using it.
21394 (aarch64_add_constant_internal): Rename to...
21395 (aarch64_add_offset_1): ...this. Replace regnum with separate
21396 src and dest rtxes. Handle the case in which they're different,
21397 including when the offset is zero. Replace scratchreg with an rtx.
21398 Use 2 additions if there is no spare register into which we can
21399 move a 16-bit constant.
21400 (aarch64_add_constant): Delete.
21401 (aarch64_add_offset): Replace reg with separate src and dest
21402 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21403 Use aarch64_add_offset_1.
21404 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21405 an rtx rather than an int. Take the delta as a poly_int64
21406 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21407 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21408 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21409 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21410 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21411 and aarch64_add_sp.
21412 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21413 aarch64_add_constant.
21415 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21417 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21418 Use scalar_float_mode.
21420 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21422 * config/aarch64/aarch64-simd.md
21423 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21424 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21425 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21426 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21427 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21428 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21429 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21430 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21431 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21432 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21434 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21437 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21438 targ_options->x_arm_arch_string is non NULL.
21440 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21442 * config/aarch64/aarch64.h
21443 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21445 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21448 * expmed.c (emit_store_flag_force): Swap if const op0
21449 and change VOIDmode to mode of op0.
21451 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21453 PR rtl-optimization/83761
21454 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21455 than bytes to mode_for_size.
21457 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21459 PR middle-end/83189
21460 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21461 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21464 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21466 PR middle-end/83575
21467 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21468 when in layout mode.
21469 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21470 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21473 2018-01-10 Michael Collison <michael.collison@arm.com>
21475 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21476 * config/aarch64/aarch64-option-extension.def: Add
21477 AARCH64_OPT_EXTENSION of 'fp16fml'.
21478 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21479 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21480 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21481 * config/aarch64/constraints.md (Ui7): New constraint.
21482 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21483 (VFMLA_SEL_W): Ditto.
21486 (VFMLA16_LOW): New int iterator.
21487 (VFMLA16_HIGH): Ditto.
21488 (UNSPEC_FMLAL): New unspec.
21489 (UNSPEC_FMLSL): Ditto.
21490 (UNSPEC_FMLAL2): Ditto.
21491 (UNSPEC_FMLSL2): Ditto.
21492 (f16mac): New code attribute.
21493 * config/aarch64/aarch64-simd-builtins.def
21494 (aarch64_fmlal_lowv2sf): Ditto.
21495 (aarch64_fmlsl_lowv2sf): Ditto.
21496 (aarch64_fmlalq_lowv4sf): Ditto.
21497 (aarch64_fmlslq_lowv4sf): Ditto.
21498 (aarch64_fmlal_highv2sf): Ditto.
21499 (aarch64_fmlsl_highv2sf): Ditto.
21500 (aarch64_fmlalq_highv4sf): Ditto.
21501 (aarch64_fmlslq_highv4sf): Ditto.
21502 (aarch64_fmlal_lane_lowv2sf): Ditto.
21503 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21504 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21505 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21506 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21507 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21508 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21509 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21510 (aarch64_fmlal_lane_highv2sf): Ditto.
21511 (aarch64_fmlsl_lane_highv2sf): Ditto.
21512 (aarch64_fmlal_laneq_highv2sf): Ditto.
21513 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21514 (aarch64_fmlalq_lane_highv4sf): Ditto.
21515 (aarch64_fmlsl_lane_highv4sf): Ditto.
21516 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21517 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21518 * config/aarch64/aarch64-simd.md:
21519 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21520 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21521 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21522 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21523 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21524 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21525 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21526 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21527 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21528 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21529 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21530 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21531 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21532 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21533 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21534 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21535 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21536 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21537 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21538 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21539 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21540 (vfmlsl_low_u32): Ditto.
21541 (vfmlalq_low_u32): Ditto.
21542 (vfmlslq_low_u32): Ditto.
21543 (vfmlal_high_u32): Ditto.
21544 (vfmlsl_high_u32): Ditto.
21545 (vfmlalq_high_u32): Ditto.
21546 (vfmlslq_high_u32): Ditto.
21547 (vfmlal_lane_low_u32): Ditto.
21548 (vfmlsl_lane_low_u32): Ditto.
21549 (vfmlal_laneq_low_u32): Ditto.
21550 (vfmlsl_laneq_low_u32): Ditto.
21551 (vfmlalq_lane_low_u32): Ditto.
21552 (vfmlslq_lane_low_u32): Ditto.
21553 (vfmlalq_laneq_low_u32): Ditto.
21554 (vfmlslq_laneq_low_u32): Ditto.
21555 (vfmlal_lane_high_u32): Ditto.
21556 (vfmlsl_lane_high_u32): Ditto.
21557 (vfmlal_laneq_high_u32): Ditto.
21558 (vfmlsl_laneq_high_u32): Ditto.
21559 (vfmlalq_lane_high_u32): Ditto.
21560 (vfmlslq_lane_high_u32): Ditto.
21561 (vfmlalq_laneq_high_u32): Ditto.
21562 (vfmlslq_laneq_high_u32): Ditto.
21563 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21564 (AARCH64_FL_FOR_ARCH8_4): New.
21565 (AARCH64_ISA_F16FML): New ISA flag.
21566 (TARGET_F16FML): New feature flag for fp16fml.
21567 (doc/invoke.texi): Document new fp16fml option.
21569 2018-01-10 Michael Collison <michael.collison@arm.com>
21571 * config/aarch64/aarch64-builtins.c:
21572 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21573 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21574 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21575 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21576 (AARCH64_ISA_SHA3): New ISA flag.
21577 (TARGET_SHA3): New feature flag for sha3.
21578 * config/aarch64/iterators.md (sha512_op): New int attribute.
21579 (CRYPTO_SHA512): New int iterator.
21580 (UNSPEC_SHA512H): New unspec.
21581 (UNSPEC_SHA512H2): Ditto.
21582 (UNSPEC_SHA512SU0): Ditto.
21583 (UNSPEC_SHA512SU1): Ditto.
21584 * config/aarch64/aarch64-simd-builtins.def
21585 (aarch64_crypto_sha512hqv2di): New builtin.
21586 (aarch64_crypto_sha512h2qv2di): Ditto.
21587 (aarch64_crypto_sha512su0qv2di): Ditto.
21588 (aarch64_crypto_sha512su1qv2di): Ditto.
21589 (aarch64_eor3qv8hi): Ditto.
21590 (aarch64_rax1qv2di): Ditto.
21591 (aarch64_xarqv2di): Ditto.
21592 (aarch64_bcaxqv8hi): Ditto.
21593 * config/aarch64/aarch64-simd.md:
21594 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21595 (aarch64_crypto_sha512su0qv2di): Ditto.
21596 (aarch64_crypto_sha512su1qv2di): Ditto.
21597 (aarch64_eor3qv8hi): Ditto.
21598 (aarch64_rax1qv2di): Ditto.
21599 (aarch64_xarqv2di): Ditto.
21600 (aarch64_bcaxqv8hi): Ditto.
21601 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21602 (vsha512h2q_u64): Ditto.
21603 (vsha512su0q_u64): Ditto.
21604 (vsha512su1q_u64): Ditto.
21605 (veor3q_u16): Ditto.
21606 (vrax1q_u64): Ditto.
21607 (vxarq_u64): Ditto.
21608 (vbcaxq_u16): Ditto.
21609 * config/arm/types.md (crypto_sha512): New type attribute.
21610 (crypto_sha3): Ditto.
21611 (doc/invoke.texi): Document new sha3 option.
21613 2018-01-10 Michael Collison <michael.collison@arm.com>
21615 * config/aarch64/aarch64-builtins.c:
21616 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21617 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21618 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21619 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21620 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21621 (AARCH64_ISA_SM4): New ISA flag.
21622 (TARGET_SM4): New feature flag for sm4.
21623 * config/aarch64/aarch64-simd-builtins.def
21624 (aarch64_sm3ss1qv4si): Ditto.
21625 (aarch64_sm3tt1aq4si): Ditto.
21626 (aarch64_sm3tt1bq4si): Ditto.
21627 (aarch64_sm3tt2aq4si): Ditto.
21628 (aarch64_sm3tt2bq4si): Ditto.
21629 (aarch64_sm3partw1qv4si): Ditto.
21630 (aarch64_sm3partw2qv4si): Ditto.
21631 (aarch64_sm4eqv4si): Ditto.
21632 (aarch64_sm4ekeyqv4si): Ditto.
21633 * config/aarch64/aarch64-simd.md:
21634 (aarch64_sm3ss1qv4si): Ditto.
21635 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21636 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21637 (aarch64_sm4eqv4si): Ditto.
21638 (aarch64_sm4ekeyqv4si): Ditto.
21639 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21640 (sm3part_op): Ditto.
21641 (CRYPTO_SM3TT): Ditto.
21642 (CRYPTO_SM3PART): Ditto.
21643 (UNSPEC_SM3SS1): New unspec.
21644 (UNSPEC_SM3TT1A): Ditto.
21645 (UNSPEC_SM3TT1B): Ditto.
21646 (UNSPEC_SM3TT2A): Ditto.
21647 (UNSPEC_SM3TT2B): Ditto.
21648 (UNSPEC_SM3PARTW1): Ditto.
21649 (UNSPEC_SM3PARTW2): Ditto.
21650 (UNSPEC_SM4E): Ditto.
21651 (UNSPEC_SM4EKEY): Ditto.
21652 * config/aarch64/constraints.md (Ui2): New constraint.
21653 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21654 * config/arm/types.md (crypto_sm3): New type attribute.
21655 (crypto_sm4): Ditto.
21656 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21657 (vsm3tt1aq_u32): Ditto.
21658 (vsm3tt1bq_u32): Ditto.
21659 (vsm3tt2aq_u32): Ditto.
21660 (vsm3tt2bq_u32): Ditto.
21661 (vsm3partw1q_u32): Ditto.
21662 (vsm3partw2q_u32): Ditto.
21663 (vsm4eq_u32): Ditto.
21664 (vsm4ekeyq_u32): Ditto.
21665 (doc/invoke.texi): Document new sm4 option.
21667 2018-01-10 Michael Collison <michael.collison@arm.com>
21669 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21670 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21671 (AARCH64_FL_FOR_ARCH8_4): New.
21672 (AARCH64_FL_V8_4): New flag.
21673 (doc/invoke.texi): Document new armv8.4-a option.
21675 2018-01-10 Michael Collison <michael.collison@arm.com>
21677 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21678 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21679 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21680 * config/aarch64/aarch64-option-extension.def: Add
21681 AARCH64_OPT_EXTENSION of 'sha2'.
21682 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21683 (crypto): Disable sha2 and aes if crypto disabled.
21684 (crypto): Enable aes and sha2 if enabled.
21685 (simd): Disable sha2 and aes if simd disabled.
21686 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21688 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21689 (TARGET_SHA2): New feature flag for sha2.
21690 (TARGET_AES): New feature flag for aes.
21691 * config/aarch64/aarch64-simd.md:
21692 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21693 conditional on TARGET_AES.
21694 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21695 (aarch64_crypto_sha1hsi): Make pattern conditional
21697 (aarch64_crypto_sha1hv4si): Ditto.
21698 (aarch64_be_crypto_sha1hv4si): Ditto.
21699 (aarch64_crypto_sha1su1v4si): Ditto.
21700 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21701 (aarch64_crypto_sha1su0v4si): Ditto.
21702 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21703 (aarch64_crypto_sha256su0v4si): Ditto.
21704 (aarch64_crypto_sha256su1v4si): Ditto.
21705 (doc/invoke.texi): Document new aes and sha2 options.
21707 2018-01-10 Martin Sebor <msebor@redhat.com>
21709 PR tree-optimization/83781
21710 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21713 2018-01-11 Martin Sebor <msebor@gmail.com>
21714 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21716 PR tree-optimization/83501
21717 PR tree-optimization/81703
21719 * tree-ssa-strlen.c (get_string_cst): Rename...
21720 (get_string_len): ...to this. Handle global constants.
21721 (handle_char_store): Adjust.
21723 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
21724 Jim Wilson <jimw@sifive.com>
21726 * config/riscv/riscv-protos.h (riscv_output_return): New.
21727 * config/riscv/riscv.c (struct machine_function): New naked_p field.
21728 (riscv_attribute_table, riscv_output_return),
21729 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21730 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21731 (riscv_compute_frame_info): Only compute frame->mask if not a naked
21733 (riscv_expand_prologue): Add early return for naked function.
21734 (riscv_expand_epilogue): Likewise.
21735 (riscv_function_ok_for_sibcall): Return false for naked function.
21736 (riscv_set_current_function): New.
21737 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21738 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21739 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21740 * doc/extend.texi (RISC-V Function Attributes): New.
21742 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21744 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21745 check for 128-bit long double before checking TCmode.
21746 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21747 128-bit long doubles before checking TFmode or TCmode.
21748 (FLOAT128_IBM_P): Likewise.
21750 2018-01-10 Martin Sebor <msebor@redhat.com>
21752 PR tree-optimization/83671
21753 * builtins.c (c_strlen): Unconditionally return zero for the empty
21755 Use -Warray-bounds for warnings.
21756 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21757 for non-constant array indices with COMPONENT_REF, arrays of
21758 arrays, and pointers to arrays.
21759 (gimple_fold_builtin_strlen): Determine and set length range for
21760 non-constant character arrays.
21762 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
21764 PR middle-end/81897
21765 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21768 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
21770 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21772 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21775 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21776 VECTOR_MEM_ALTIVEC_OR_VSX_P.
21777 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21778 indexed_or_indirect_operand predicate.
21779 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21780 (*vsx_le_perm_load_v8hi): Likewise.
21781 (*vsx_le_perm_load_v16qi): Likewise.
21782 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21783 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21784 (*vsx_le_perm_store_v8hi): Likewise.
21785 (*vsx_le_perm_store_v16qi): Likewise.
21786 (eight unnamed splitters): Likewise.
21788 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21790 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21791 * config/rs6000/emmintrin.h: Likewise.
21792 * config/rs6000/mmintrin.h: Likewise.
21793 * config/rs6000/xmmintrin.h: Likewise.
21795 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21798 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21800 * tree.c (tree_nop_conversion): Return true for location wrapper
21802 (maybe_wrap_with_location): New function.
21803 (selftest::check_strip_nops): New function.
21804 (selftest::test_location_wrappers): New function.
21805 (selftest::tree_c_tests): Call it.
21806 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21807 (maybe_wrap_with_location): New decl.
21808 (EXPR_LOCATION_WRAPPER_P): New macro.
21809 (location_wrapper_p): New inline function.
21810 (tree_strip_any_location_wrapper): New inline function.
21812 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21815 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21816 stack_realign_offset for the largest alignment of stack slot
21818 (ix86_find_max_used_stack_alignment): New function.
21819 (ix86_finalize_stack_frame_flags): Use it. Set
21820 max_used_stack_alignment if we don't realign stack.
21821 * config/i386/i386.h (machine_function): Add
21822 max_used_stack_alignment.
21824 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21826 * config/arm/arm.opt (-mbranch-cost): New option.
21827 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21830 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21833 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21834 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21836 2018-01-10 Richard Biener <rguenther@suse.de>
21839 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21840 early out so it also covers the case where we have a non-NULL
21843 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21845 PR tree-optimization/83753
21846 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21847 for non-strided grouped accesses if the number of elements is 1.
21849 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21852 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21853 * i386.h (TARGET_USE_GATHER): Define.
21854 * x86-tune.def (X86_TUNE_USE_GATHER): New.
21856 2018-01-10 Martin Liska <mliska@suse.cz>
21859 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21860 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21862 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21863 CLEANUP_NO_PARTITIONING is not set.
21865 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21867 * doc/rtl.texi: Remove documentation of (const ...) wrappers
21868 for vectors, as a partial revert of r254296.
21869 * rtl.h (const_vec_p): Delete.
21870 (const_vec_duplicate_p): Don't test for vector CONSTs.
21871 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21872 * expmed.c (make_tree): Likewise.
21875 * common.md (E, F): Use CONSTANT_P instead of checking for
21877 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21878 checking for CONST_VECTOR.
21880 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21882 PR middle-end/83575
21883 * predict.c (force_edge_cold): Handle in more sane way edges
21884 with no prediction.
21886 2018-01-09 Carl Love <cel@us.ibm.com>
21888 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21890 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21891 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21892 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21893 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
21894 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21895 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
21896 * config/rs6000/rs6000-protos.h: Add extern defition for
21897 rs6000_generate_float2_double_code.
21898 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21900 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21901 (float2_v2df): Add define_expand.
21903 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
21906 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21907 op_mode in the force_to_mode call.
21909 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21911 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21912 instead of checking each element individually.
21913 (aarch64_evpc_uzp): Likewise.
21914 (aarch64_evpc_zip): Likewise.
21915 (aarch64_evpc_ext): Likewise.
21916 (aarch64_evpc_rev): Likewise.
21917 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21918 instead of checking each element individually. Return true without
21920 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21921 whether all selected elements come from the same input, instead of
21922 checking each element individually. Remove calls to gen_rtx_REG,
21923 start_sequence and end_sequence and instead assert that no rtl is
21926 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21928 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21929 order of HIGH and CONST checks.
21931 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21933 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21934 if the destination isn't an SSA_NAME.
21936 2018-01-09 Richard Biener <rguenther@suse.de>
21938 PR tree-optimization/83668
21939 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21941 (canonicalize_loop_form): ... here, renamed from ...
21942 (canonicalize_loop_closed_ssa_form): ... this and amended to
21943 swap successor edges for loop exit blocks to make us use
21944 the RPO order we need for initial schedule generation.
21946 2018-01-09 Joseph Myers <joseph@codesourcery.com>
21948 PR tree-optimization/64811
21949 * match.pd: When optimizing comparisons with Inf, avoid
21950 introducing or losing exceptions from comparisons with NaN.
21952 2018-01-09 Martin Liska <mliska@suse.cz>
21955 * asan.c (shadow_mem_size): Add gcc_assert.
21957 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
21959 Don't save registers in main().
21962 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21963 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21964 * config/avr/avr.c (avr_set_current_function): Don't error if
21965 naked, OS_task or OS_main are specified at the same time.
21966 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21968 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21970 * common/config/avr/avr-common.c (avr_option_optimization_table):
21971 Switch on -mmain-is-OS_task for optimizing compilations.
21973 2018-01-09 Richard Biener <rguenther@suse.de>
21975 PR tree-optimization/83572
21976 * graphite.c: Include cfganal.h.
21977 (graphite_transform_loops): Connect infinite loops to exit
21978 and remove fake edges at the end.
21980 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21982 * ipa-inline.c (edge_badness): Revert accidental checkin.
21984 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21987 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21988 symbols; not inline clones.
21990 2018-01-09 Jakub Jelinek <jakub@redhat.com>
21993 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21994 hard registers. Formatting fixes.
21996 PR preprocessor/83722
21997 * gcc.c (try_generate_repro): Pass
21998 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21999 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
22002 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
22003 Kito Cheng <kito.cheng@gmail.com>
22005 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
22006 (riscv_leaf_function_p): Delete.
22007 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
22009 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22011 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
22013 (do_ifelse): New function.
22014 (do_isel): New function.
22015 (do_sub3): New function.
22016 (do_add3): New function.
22017 (do_load_mask_compare): New function.
22018 (do_overlap_load_compare): New function.
22019 (expand_compare_loop): New function.
22020 (expand_block_compare): Call expand_compare_loop() when appropriate.
22021 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
22022 option description.
22023 (-mblock-compare-inline-loop-limit): New option.
22025 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22028 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
22029 Reverse order of second and third operands in first alternative.
22030 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
22031 of first and second elements in UNSPEC_VPERMR vector.
22032 (altivec_expand_vec_perm_le): Likewise.
22034 2018-01-08 Jeff Law <law@redhat.com>
22036 PR rtl-optimizatin/81308
22037 * tree-switch-conversion.c (cfg_altered): New file scoped static.
22038 (process_switch): If group_case_labels makes a change, then set
22040 (pass_convert_switch::execute): If a switch is converted, then
22041 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
22043 PR rtl-optimization/81308
22044 * recog.c (split_all_insns): Conditionally cleanup the CFG after
22047 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
22049 PR target/83663 - Revert r255946
22050 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
22051 generation for cases where splatting a value is not useful.
22052 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
22053 across a vec_duplicate and a paradoxical subreg forming a vector
22054 mode to a vec_concat.
22056 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22058 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
22059 -march=armv8.3-a variants.
22060 * config/arm/t-multilib: Likewise.
22061 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
22063 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22065 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
22067 (cceq_ior_compare_complement): Give it a name so I can use it, and
22068 change boolean_or_operator predicate to boolean_operator so it can
22069 be used to generate a crand.
22070 (eqne): New code iterator.
22071 (bd/bd_neg): New code_attrs.
22072 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
22073 a single define_insn.
22074 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
22075 decrement (bdnzt/bdnzf/bdzt/bdzf).
22076 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
22077 with the new names of the branch decrement patterns, and added the
22078 names of the branch decrement conditional patterns.
22080 2018-01-08 Richard Biener <rguenther@suse.de>
22082 PR tree-optimization/83563
22083 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
22086 2018-01-08 Richard Biener <rguenther@suse.de>
22088 PR middle-end/83713
22089 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
22091 2018-01-08 Richard Biener <rguenther@suse.de>
22093 PR tree-optimization/83685
22094 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
22095 references to abnormals.
22097 2018-01-08 Richard Biener <rguenther@suse.de>
22100 * dwarf2out.c (output_indirect_strings): Handle empty
22101 skeleton_debug_str_hash.
22102 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
22104 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22106 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
22107 (emit_store_direct): Likewise.
22108 (arc_trampoline_adjust_address): Likewise.
22109 (arc_asm_trampoline_template): New function.
22110 (arc_initialize_trampoline): Use asm_trampoline_template.
22111 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
22112 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
22113 * config/arc/arc.md (flush_icache): Delete pattern.
22115 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
22117 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
22118 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
22121 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22124 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
22125 by not USED_FOR_TARGET.
22126 (make_pass_resolve_sw_modes): Likewise.
22128 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
22130 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
22133 2018-01-08 Richard Biener <rguenther@suse.de>
22135 PR middle-end/83580
22136 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
22138 2018-01-08 Richard Biener <rguenther@suse.de>
22140 PR middle-end/83517
22141 * match.pd ((t * 2) / 2) -> t): Add missing :c.
22143 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
22145 PR middle-end/81897
22146 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
22147 basic blocks with a small number of successors.
22148 (convert_control_dep_chain_into_preds): Improve handling of
22150 (dump_predicates): Split apart into...
22151 (dump_pred_chain): ...here...
22152 (dump_pred_info): ...and here.
22153 (can_one_predicate_be_invalidated_p): Add debugging printfs.
22154 (can_chain_union_be_invalidated_p): Improve check for invalidation
22156 (uninit_uses_cannot_happen): Avoid unnecessary if
22157 convert_control_dep_chain_into_preds yielded nothing.
22159 2018-01-06 Martin Sebor <msebor@redhat.com>
22161 PR tree-optimization/83640
22162 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
22163 subtracting negative offset from size.
22164 (builtin_access::overlap): Adjust offset bounds of the access to fall
22165 within the size of the object if possible.
22167 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
22169 PR rtl-optimization/83699
22170 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22171 extract_bit_field_as_subreg to cases in which the extracted
22172 value is also a vector.
22174 * lra-constraints.c (process_alt_operands): Test for the equivalence
22175 substitutions when detecting a possible reload cycle.
22177 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22180 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22181 by default if flag_selective_schedling{,2}. Formatting fixes.
22183 PR rtl-optimization/83682
22184 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22185 if it has non-VECTOR_MODE element mode.
22186 (vec_duplicate_p): Likewise.
22188 PR middle-end/83694
22189 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22190 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22192 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22195 * config/i386/i386-builtin.def
22196 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22197 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22198 Require also OPTION_MASK_ISA_AVX512F in addition to
22199 OPTION_MASK_ISA_GFNI.
22200 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22201 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22202 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22203 to OPTION_MASK_ISA_GFNI.
22204 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22205 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22206 OPTION_MASK_ISA_AVX512BW.
22207 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22208 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22209 addition to OPTION_MASK_ISA_GFNI.
22210 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22211 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22212 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22213 to OPTION_MASK_ISA_GFNI.
22214 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22215 a requirement for all ISAs rather than any of them with a few
22217 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22219 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22220 bitmasks to be enabled with 3 exceptions, instead of requiring any
22221 enabled ISA with lots of exceptions.
22222 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22223 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22224 Change avx512bw in isa attribute to avx512f.
22225 * config/i386/sgxintrin.h: Add license boilerplate.
22226 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22227 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22228 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22229 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22231 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22232 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22233 temporarily sse2 rather than sse if not enabled already.
22236 * config/i386/sse.md (VI248_VLBW): Rename to ...
22237 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22238 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22239 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22240 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22241 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22242 mode iterator instead of VI248_VLBW.
22244 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22246 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22247 (record_modified): Skip clobbers; add debug output.
22248 (param_change_prob): Use sreal frequencies.
22250 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22252 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22253 punt for user-aligned variables.
22255 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22257 * tree-chrec.c (chrec_contains_symbols): Return true for
22260 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22263 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22264 of (x|y) == x for BICS pattern.
22266 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22268 PR tree-optimization/83605
22269 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22270 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22273 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22275 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22276 * config/epiphany/rtems.h: New file.
22278 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22279 Uros Bizjak <ubizjak@gmail.com>
22282 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22283 QIreg_operand instead of register_operand predicate.
22284 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22285 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22286 comments instead of -fmitigate[-_]rop.
22288 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22291 * cgraphunit.c (symbol_table::compile): Switch to text_section
22292 before calling assembly_start debug hook.
22293 * run-rtl-passes.c (run_rtl_passes): Likewise.
22296 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22298 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22299 range_int_cst_p rather than !symbolic_range_p before calling
22300 extract_range_from_multiplicative_op_1.
22302 2018-01-04 Jeff Law <law@redhat.com>
22304 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22305 redundant test in assertion.
22307 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22309 * doc/rtl.texi: Document machine_mode wrapper classes.
22311 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22313 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22314 using tree_to_uhwi.
22316 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22318 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22319 the VEC_PERM_EXPR fold to fail.
22321 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22324 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22325 to switched_sections.
22327 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22330 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22331 test for d.testing.
22333 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22336 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22337 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22339 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22342 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22343 is BLKmode and bitpos not zero or mode change is needed.
22345 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22348 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22351 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22354 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22355 instead of MULT rtx. Update all corresponding splitters.
22356 (*saddl_se): Ditto.
22357 (*ssub<modesuffix>): Ditto.
22358 (*ssubl_se): Ditto.
22359 (*cmp_sadd_di): Update split patterns.
22360 (*cmp_sadd_si): Ditto.
22361 (*cmp_sadd_sidi): Ditto.
22362 (*cmp_ssub_di): Ditto.
22363 (*cmp_ssub_si): Ditto.
22364 (*cmp_ssub_sidi): Ditto.
22365 * config/alpha/predicates.md (const23_operand): New predicate.
22366 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22367 Look for ASHIFT, not MULT inner operand.
22368 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22370 2018-01-04 Martin Liska <mliska@suse.cz>
22372 PR gcov-profile/83669
22373 * gcov.c (output_intermediate_file): Add version to intermediate
22375 * doc/gcov.texi: Document new field 'version' in intermediate
22376 file format. Fix location of '-k' option of gcov command.
22378 2018-01-04 Martin Liska <mliska@suse.cz>
22381 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22383 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22385 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22387 2018-01-03 Martin Sebor <msebor@redhat.com>
22389 PR tree-optimization/83655
22390 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22391 checking calls with invalid arguments.
22393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22395 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22396 (vectorizable_mask_load_store): Delete.
22397 (vectorizable_call): Return false for masked loads and stores.
22398 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22399 instead of gimple_assign_rhs1.
22400 (vectorizable_load): Handle IFN_MASK_LOAD.
22401 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22405 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22407 (vectorizable_mask_load_store): ...here.
22408 (vectorizable_load): ...and here.
22410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22412 * tree-vect-stmts.c (vect_build_all_ones_mask)
22413 (vect_build_zero_merge_argument): New functions, split out from...
22414 (vectorizable_load): ...here.
22416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22418 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22420 (vectorizable_mask_load_store): ...here.
22421 (vectorizable_store): ...and here.
22423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22425 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22427 (vectorizable_mask_load_store): ...here.
22429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22431 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22432 (vect_model_store_cost): Take a vec_load_store_type instead of a
22434 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22435 (vect_model_store_cost): Take a vec_load_store_type instead of a
22437 (vectorizable_mask_load_store): Update accordingly.
22438 (vectorizable_store): Likewise.
22439 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22443 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22444 IFN_MASK_LOAD calls here rather than...
22445 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22448 Alan Hayward <alan.hayward@arm.com>
22449 David Sherwood <david.sherwood@arm.com>
22451 * expmed.c (extract_bit_field_1): For vector extracts,
22452 fall back to extract_bit_field_as_subreg if vec_extract
22455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22456 Alan Hayward <alan.hayward@arm.com>
22457 David Sherwood <david.sherwood@arm.com>
22459 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22460 they are variable or constant sized.
22461 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22462 slots for constant-sized data.
22464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22465 Alan Hayward <alan.hayward@arm.com>
22466 David Sherwood <david.sherwood@arm.com>
22468 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22469 handling COND_EXPRs with boolean comparisons, try to find a better
22470 basis for the mask type than the boolean itself.
22472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22474 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22475 is calculated and how it can be overridden.
22476 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22477 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22479 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22483 Alan Hayward <alan.hayward@arm.com>
22484 David Sherwood <david.sherwood@arm.com>
22486 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22487 Remove the mode argument.
22488 (aarch64_simd_valid_immediate): Remove the mode and inverse
22490 * config/aarch64/iterators.md (bitsize): New iterator.
22491 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22492 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22493 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22494 aarch64_simd_valid_immediate.
22495 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22496 (aarch64_reg_or_bic_imm): Likewise.
22497 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22498 with an insn_type enum and msl with a modifier_type enum.
22499 Replace element_width with a scalar_mode. Change the shift
22500 to unsigned int. Add constructors for scalar_float_mode and
22501 scalar_int_mode elements.
22502 (aarch64_vect_float_const_representable_p): Delete.
22503 (aarch64_can_const_movi_rtx_p)
22504 (aarch64_simd_scalar_immediate_valid_for_move)
22505 (aarch64_simd_make_constant): Update call to
22506 aarch64_simd_valid_immediate.
22507 (aarch64_advsimd_valid_immediate_hs): New function.
22508 (aarch64_advsimd_valid_immediate): Likewise.
22509 (aarch64_simd_valid_immediate): Remove mode and inverse
22510 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22511 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22512 and aarch64_float_const_representable_p on the result.
22513 (aarch64_output_simd_mov_immediate): Remove mode argument.
22514 Update call to aarch64_simd_valid_immediate and use of
22515 simd_immediate_info.
22516 (aarch64_output_scalar_simd_mov_immediate): Update call
22519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22520 Alan Hayward <alan.hayward@arm.com>
22521 David Sherwood <david.sherwood@arm.com>
22523 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22524 (mode_nunits): Likewise CONST_MODE_NUNITS.
22525 * machmode.def (ADJUST_NUNITS): Document.
22526 * genmodes.c (mode_data::need_nunits_adj): New field.
22527 (blank_mode): Update accordingly.
22528 (adj_nunits): New variable.
22529 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22531 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22532 listed in adj_nunits.
22533 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22534 listed in adj_nunits. Don't emit case statements for such modes.
22535 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22536 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22537 nothing if adj_nunits is nonnull.
22538 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22539 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22540 (emit_mode_fbit): Update use of print_maybe_const_decl.
22541 (emit_move_size): Likewise. Treat the array as non-const
22543 (emit_mode_adjustments): Handle adj_nunits.
22545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22547 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22548 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22549 (VECTOR_MODES): Use it.
22550 (make_vector_modes): Take the prefix as an argument.
22552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22553 Alan Hayward <alan.hayward@arm.com>
22554 David Sherwood <david.sherwood@arm.com>
22556 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22557 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22558 for MODE_VECTOR_BOOL.
22559 * machmode.def (VECTOR_BOOL_MODE): Document.
22560 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22561 (make_vector_bool_mode): New function.
22562 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22564 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22565 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22567 * stor-layout.c (int_mode_for_mode): Likewise.
22568 * tree.c (build_vector_type_for_mode): Likewise.
22569 * varasm.c (output_constant_pool_2): Likewise.
22570 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22571 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22572 for MODE_VECTOR_BOOL.
22573 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22574 of mode class checks.
22575 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22576 instead of a list of mode class checks.
22577 (expand_vector_scalar_condition): Likewise.
22578 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22580 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22581 Alan Hayward <alan.hayward@arm.com>
22582 David Sherwood <david.sherwood@arm.com>
22584 * machmode.h (mode_size): Change from unsigned short to
22586 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22587 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22588 or if measurement_type is not polynomial.
22589 (fixed_size_mode::includes_p): Check for constant-sized modes.
22590 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22591 return a poly_uint16 rather than an unsigned short.
22592 (emit_mode_size): Change the type of mode_size from unsigned short
22593 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22594 (emit_mode_adjustments): Cope with polynomial vector sizes.
22595 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22597 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22599 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22600 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22601 * caller-save.c (setup_save_areas): Likewise.
22602 (replace_reg_with_saved_mem): Likewise.
22603 * calls.c (emit_library_call_value_1): Likewise.
22604 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22605 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22606 (gen_lowpart_for_combine): Likewise.
22607 * convert.c (convert_to_integer_1): Likewise.
22608 * cse.c (equiv_constant, cse_insn): Likewise.
22609 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22610 (cselib_subst_to_values): Likewise.
22611 * dce.c (word_dce_process_block): Likewise.
22612 * df-problems.c (df_word_lr_mark_ref): Likewise.
22613 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22614 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22615 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22616 (rtl_for_decl_location): Likewise.
22617 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22618 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22619 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22620 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22621 (expand_expr_real_1): Likewise.
22622 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22623 (pad_below): Likewise.
22624 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22625 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22626 * ira.c (get_subreg_tracking_sizes): Likewise.
22627 * ira-build.c (ira_create_allocno_objects): Likewise.
22628 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22629 (ira_sort_regnos_for_alter_reg): Likewise.
22630 * ira-costs.c (record_operand_costs): Likewise.
22631 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22632 (resolve_simple_move): Likewise.
22633 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22634 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22635 (lra_constraints): Likewise.
22636 (CONST_POOL_OK_P): Reject variable-sized modes.
22637 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22638 (add_pseudo_to_slot, lra_spill): Likewise.
22639 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22640 * optabs-query.c (get_best_extraction_insn): Likewise.
22641 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22642 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22643 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22644 * recog.c (offsettable_address_addr_space_p): Likewise.
22645 * regcprop.c (maybe_mode_change): Likewise.
22646 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22647 * regrename.c (build_def_use): Likewise.
22648 * regstat.c (dump_reg_info): Likewise.
22649 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22650 (find_reloads, find_reloads_subreg_address): Likewise.
22651 * reload1.c (eliminate_regs_1): Likewise.
22652 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22653 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22654 (simplify_binary_operation_1, simplify_subreg): Likewise.
22655 * targhooks.c (default_function_arg_padding): Likewise.
22656 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22657 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22658 (verify_gimple_assign_ternary): Likewise.
22659 * tree-inline.c (estimate_move_cost): Likewise.
22660 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22661 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22662 (get_address_cost_ainc): Likewise.
22663 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22664 (vect_supportable_dr_alignment): Likewise.
22665 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22666 (vectorizable_reduction): Likewise.
22667 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22668 (vectorizable_operation, vectorizable_load): Likewise.
22669 * tree.c (build_same_sized_truth_vector_type): Likewise.
22670 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22671 * var-tracking.c (emit_note_insn_var_location): Likewise.
22672 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22673 (ADDR_VEC_ALIGN): Likewise.
22675 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22676 Alan Hayward <alan.hayward@arm.com>
22677 David Sherwood <david.sherwood@arm.com>
22679 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22681 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22682 or if measurement_type is polynomial.
22683 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22684 * combine.c (make_extraction): Likewise.
22685 * dse.c (find_shift_sequence): Likewise.
22686 * dwarf2out.c (mem_loc_descriptor): Likewise.
22687 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22688 (extract_bit_field, extract_low_bits): Likewise.
22689 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22690 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22691 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22692 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22693 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22694 * reload.c (find_reloads): Likewise.
22695 * reload1.c (alter_reg): Likewise.
22696 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22697 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22698 * tree-if-conv.c (predicate_mem_writes): Likewise.
22699 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22700 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22701 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22702 * valtrack.c (dead_debug_insert_temp): Likewise.
22703 * varasm.c (mergeable_constant_section): Likewise.
22704 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22707 Alan Hayward <alan.hayward@arm.com>
22708 David Sherwood <david.sherwood@arm.com>
22710 * expr.c (expand_assignment): Cope with polynomial mode sizes
22711 when assigning to a CONCAT.
22713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22714 Alan Hayward <alan.hayward@arm.com>
22715 David Sherwood <david.sherwood@arm.com>
22717 * machmode.h (mode_precision): Change from unsigned short to
22719 (mode_to_precision): Return a poly_uint16 rather than an unsigned
22721 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22722 or if measurement_type is not polynomial.
22723 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
22724 in which the mode is already known to be a scalar_int_mode.
22725 * genmodes.c (emit_mode_precision): Change the type of mode_precision
22726 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
22728 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22729 for GET_MODE_PRECISION.
22730 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22731 for GET_MODE_PRECISION.
22732 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22734 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22735 (expand_field_assignment, make_extraction): Likewise.
22736 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22737 (get_last_value): Likewise.
22738 * convert.c (convert_to_integer_1): Likewise.
22739 * cse.c (cse_insn): Likewise.
22740 * expr.c (expand_expr_real_1): Likewise.
22741 * lra-constraints.c (simplify_operand_subreg): Likewise.
22742 * optabs-query.c (can_atomic_load_p): Likewise.
22743 * optabs.c (expand_atomic_load): Likewise.
22744 (expand_atomic_store): Likewise.
22745 * ree.c (combine_reaching_defs): Likewise.
22746 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22747 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22748 * tree.h (type_has_mode_precision_p): Likewise.
22749 * ubsan.c (instrument_si_overflow): Likewise.
22751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22752 Alan Hayward <alan.hayward@arm.com>
22753 David Sherwood <david.sherwood@arm.com>
22755 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22756 polynomial numbers of units.
22757 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22758 (valid_vector_subparts_p): New function.
22759 (build_vector_type): Remove temporary shim and take the number
22760 of units as a poly_uint64 rather than an int.
22761 (build_opaque_vector_type): Take the number of units as a
22762 poly_uint64 rather than an int.
22763 * tree.c (build_vector_from_ctor): Handle polynomial
22764 TYPE_VECTOR_SUBPARTS.
22765 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22766 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22767 (build_vector_from_val): If the number of units is variable,
22768 use build_vec_duplicate_cst for constant operands and
22769 VEC_DUPLICATE_EXPR otherwise.
22770 (make_vector_type): Remove temporary is_constant ().
22771 (build_vector_type, build_opaque_vector_type): Take the number of
22772 units as a poly_uint64 rather than an int.
22773 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22775 * cfgexpand.c (expand_debug_expr): Likewise.
22776 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22777 (store_constructor, expand_expr_real_1): Likewise.
22778 (const_scalar_mask_from_tree): Likewise.
22779 * fold-const-call.c (fold_const_reduction): Likewise.
22780 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22781 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22782 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22783 (fold_relational_const): Likewise.
22784 (native_interpret_vector): Likewise. Change the size from an
22785 int to an unsigned int.
22786 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22787 TYPE_VECTOR_SUBPARTS.
22788 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22789 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22790 duplicating a non-constant operand into a variable-length vector.
22791 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22792 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22793 * ipa-icf.c (sem_variable::equals): Likewise.
22794 * match.pd: Likewise.
22795 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22796 * print-tree.c (print_node): Likewise.
22797 * stor-layout.c (layout_type): Likewise.
22798 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22799 * tree-cfg.c (verify_gimple_comparison): Likewise.
22800 (verify_gimple_assign_binary): Likewise.
22801 (verify_gimple_assign_ternary): Likewise.
22802 (verify_gimple_assign_single): Likewise.
22803 * tree-pretty-print.c (dump_generic_node): Likewise.
22804 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22805 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22806 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22807 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22808 (vect_shift_permute_load_chain): Likewise.
22809 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22810 (expand_vector_condition, optimize_vector_constructor): Likewise.
22811 (lower_vec_perm, get_compute_type): Likewise.
22812 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22813 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22814 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22815 (vect_recog_mask_conversion_pattern): Likewise.
22816 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22817 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22818 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22819 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22820 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22821 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22822 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22823 (supportable_widening_operation): Likewise.
22824 (supportable_narrowing_operation): Likewise.
22825 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22827 * varasm.c (output_constant): Likewise.
22829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22830 Alan Hayward <alan.hayward@arm.com>
22831 David Sherwood <david.sherwood@arm.com>
22833 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22834 so that both the length == 3 and length != 3 cases set up their
22835 own permute vectors. Add comments explaining why we know the
22836 number of elements is constant.
22837 (vect_permute_load_chain): Likewise.
22839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22840 Alan Hayward <alan.hayward@arm.com>
22841 David Sherwood <david.sherwood@arm.com>
22843 * machmode.h (mode_nunits): Change from unsigned char to
22845 (ONLY_FIXED_SIZE_MODES): New macro.
22846 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22847 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22848 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22850 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22851 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22852 or if measurement_type is not polynomial.
22853 * genmodes.c (ZERO_COEFFS): New macro.
22854 (emit_mode_nunits_inline): Make mode_nunits_inline return a
22856 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22857 Use ZERO_COEFFS when emitting initializers.
22858 * data-streamer.h (bp_pack_poly_value): New function.
22859 (bp_unpack_poly_value): Likewise.
22860 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22861 for GET_MODE_NUNITS.
22862 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22863 for GET_MODE_NUNITS.
22864 * tree.c (make_vector_type): Remove temporary shim and make
22865 the real function take the number of units as a poly_uint64
22866 rather than an int.
22867 (build_vector_type_for_mode): Handle polynomial nunits.
22868 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22869 * emit-rtl.c (const_vec_series_p_1): Likewise.
22870 (gen_rtx_CONST_VECTOR): Likewise.
22871 * fold-const.c (test_vec_duplicate_folding): Likewise.
22872 * genrecog.c (validate_pattern): Likewise.
22873 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22874 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22875 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22876 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22877 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22878 * rtlanal.c (subreg_get_info): Likewise.
22879 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22880 (vect_grouped_load_supported): Likewise.
22881 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22882 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22883 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22884 (simplify_const_unary_operation, simplify_binary_operation_1)
22885 (simplify_const_binary_operation, simplify_ternary_operation)
22886 (test_vector_ops_duplicate, test_vector_ops): Likewise.
22887 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22888 instead of CONST_VECTOR_NUNITS.
22889 * varasm.c (output_constant_pool_2): Likewise.
22890 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22891 explicit-encoded elements in the XVEC for variable-length vectors.
22893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22895 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22897 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22898 Alan Hayward <alan.hayward@arm.com>
22899 David Sherwood <david.sherwood@arm.com>
22901 * coretypes.h (fixed_size_mode): Declare.
22902 (fixed_size_mode_pod): New typedef.
22903 * builtins.h (target_builtins::x_apply_args_mode)
22904 (target_builtins::x_apply_result_mode): Change type to
22905 fixed_size_mode_pod.
22906 * builtins.c (apply_args_size, apply_result_size, result_vector)
22907 (expand_builtin_apply_args_1, expand_builtin_apply)
22908 (expand_builtin_return): Update accordingly.
22910 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22912 * cse.c (hash_rtx_cb): Hash only the encoded elements.
22913 * cselib.c (cselib_hash_rtx): Likewise.
22914 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22915 CONST_VECTOR encoding.
22917 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22918 Jeff Law <law@redhat.com>
22921 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22922 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22923 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22924 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22927 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22928 explicitly probe *sp in a noreturn function if there were any callee
22929 register saves or frame pointer is needed.
22931 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22934 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22935 BLKmode for ternary, binary or unary expressions.
22938 * var-tracking.c (delete_vta_debug_insn): New inline function.
22939 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22940 insns from get_insns () to NULL instead of each bb separately.
22941 Use delete_vta_debug_insn. No longer static.
22942 (vt_debug_insns_local, variable_tracking_main_1): Adjust
22943 delete_vta_debug_insns callers.
22944 * rtl.h (delete_vta_debug_insns): Declare.
22945 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22946 instead of variable_tracking_main.
22948 2018-01-03 Martin Sebor <msebor@redhat.com>
22950 PR tree-optimization/83603
22951 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22952 arguments past the endof the argument list in functions declared
22953 without a prototype.
22954 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22955 Avoid checking when arguments are null.
22957 2018-01-03 Martin Sebor <msebor@redhat.com>
22960 * doc/extend.texi (attribute const): Fix a typo.
22961 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22962 issuing -Wsuggest-attribute for void functions.
22964 2018-01-03 Martin Sebor <msebor@redhat.com>
22966 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22967 offset_int::from instead of wide_int::to_shwi.
22968 (maybe_diag_overlap): Remove assertion.
22969 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22970 * gimple-ssa-sprintf.c (format_directive): Same.
22971 (parse_directive): Same.
22972 (sprintf_dom_walker::compute_format_length): Same.
22973 (try_substitute_return_value): Same.
22975 2018-01-03 Jeff Law <law@redhat.com>
22977 PR middle-end/83654
22978 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22979 non-constant residual for zero at runtime and avoid probing in
22980 that case. Reorganize code for trailing problem to mirror handling
22983 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22985 PR tree-optimization/83501
22986 * tree-ssa-strlen.c (get_string_cst): New.
22987 (handle_char_store): Call get_string_cst.
22989 2018-01-03 Martin Liska <mliska@suse.cz>
22991 PR tree-optimization/83593
22992 * tree-ssa-strlen.c: Include tree-cfg.h.
22993 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22994 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22995 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22997 (strlen_dom_walker::before_dom_children): Call
22998 gimple_purge_dead_eh_edges. Dump tranformation with details
23000 (strlen_dom_walker::before_dom_children): Update call by adding
23001 new argument cleanup_eh.
23002 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
23004 2018-01-03 Martin Liska <mliska@suse.cz>
23007 * cif-code.def (VARIADIC_THUNK): New enum value.
23008 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
23011 2018-01-03 Jan Beulich <jbeulich@suse.com>
23013 * sse.md (mov<mode>_internal): Tighten condition for when to use
23014 vmovdqu<ssescalarsize> for TI and OI modes.
23016 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23018 Update copyright years.
23020 2018-01-03 Martin Liska <mliska@suse.cz>
23023 * ipa-visibility.c (function_and_variable_visibility): Skip
23024 functions with noipa attribure.
23026 2018-01-03 Jakub Jelinek <jakub@redhat.com>
23028 * gcc.c (process_command): Update copyright notice dates.
23029 * gcov-dump.c (print_version): Ditto.
23030 * gcov.c (print_version): Ditto.
23031 * gcov-tool.c (print_version): Ditto.
23032 * gengtype.c (create_file): Ditto.
23033 * doc/cpp.texi: Bump @copying's copyright year.
23034 * doc/cppinternals.texi: Ditto.
23035 * doc/gcc.texi: Ditto.
23036 * doc/gccint.texi: Ditto.
23037 * doc/gcov.texi: Ditto.
23038 * doc/install.texi: Ditto.
23039 * doc/invoke.texi: Ditto.
23041 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23043 * vector-builder.h (vector_builder::m_full_nelts): Change from
23044 unsigned int to poly_uint64.
23045 (vector_builder::full_nelts): Update prototype accordingly.
23046 (vector_builder::new_vector): Likewise.
23047 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
23048 (vector_builder::operator ==): Likewise.
23049 (vector_builder::finalize): Likewise.
23050 * int-vector-builder.h (int_vector_builder::int_vector_builder):
23051 Take the number of elements as a poly_uint64 rather than an
23053 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
23054 from unsigned int to poly_uint64.
23055 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
23056 (vec_perm_indices::new_vector): Likewise.
23057 (vec_perm_indices::length): Likewise.
23058 (vec_perm_indices::nelts_per_input): Likewise.
23059 (vec_perm_indices::input_nelts): Likewise.
23060 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
23061 number of elements per input as a poly_uint64 rather than an
23062 unsigned int. Use the original encoding for variable-length
23063 vectors, rather than clamping each individual element.
23064 For the second and subsequent elements in each pattern,
23065 clamp the step and base before clamping their sum.
23066 (vec_perm_indices::series_p): Handle polynomial element counts.
23067 (vec_perm_indices::all_in_range_p): Likewise.
23068 (vec_perm_indices_to_tree): Likewise.
23069 (vec_perm_indices_to_rtx): Likewise.
23070 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
23071 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
23072 (tree_vector_builder::new_binary_operation): Handle polynomial
23073 element counts. Return false if we need to know the number
23074 of elements at compile time.
23075 * fold-const.c (fold_vec_perm): Punt if the number of elements
23076 isn't known at compile time.
23078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23080 * vec-perm-indices.h (vec_perm_builder): Change element type
23081 from HOST_WIDE_INT to poly_int64.
23082 (vec_perm_indices::element_type): Update accordingly.
23083 (vec_perm_indices::clamp): Handle polynomial element_types.
23084 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23085 (vec_perm_indices::all_in_range_p): Likewise.
23086 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
23088 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
23089 polynomial vec_perm_indices element types.
23090 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
23091 * fold-const.c (fold_vec_perm): Likewise.
23092 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
23093 * tree-vect-generic.c (lower_vec_perm): Likewise.
23094 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23095 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
23096 element type to HOST_WIDE_INT.
23098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23099 Alan Hayward <alan.hayward@arm.com>
23100 David Sherwood <david.sherwood@arm.com>
23102 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
23103 rather than an int. Use plus_constant.
23104 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
23105 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
23107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23108 Alan Hayward <alan.hayward@arm.com>
23109 David Sherwood <david.sherwood@arm.com>
23111 * calls.c (emit_call_1, expand_call): Change struct_value_size from
23112 a HOST_WIDE_INT to a poly_int64.
23114 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23115 Alan Hayward <alan.hayward@arm.com>
23116 David Sherwood <david.sherwood@arm.com>
23118 * calls.c (load_register_parameters): Cope with polynomial
23119 mode sizes. Require a constant size for BLKmode parameters
23120 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
23121 forces a parameter to be padded at the lsb end in order to
23122 fill a complete number of words, require the parameter size
23123 to be ordered wrt UNITS_PER_WORD.
23125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23126 Alan Hayward <alan.hayward@arm.com>
23127 David Sherwood <david.sherwood@arm.com>
23129 * reload1.c (spill_stack_slot_width): Change element type
23130 from unsigned int to poly_uint64_pod.
23131 (alter_reg): Treat mode sizes as polynomial.
23133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23134 Alan Hayward <alan.hayward@arm.com>
23135 David Sherwood <david.sherwood@arm.com>
23137 * reload.c (complex_word_subreg_p): New function.
23138 (reload_inner_reg_of_subreg, push_reload): Use it.
23140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23141 Alan Hayward <alan.hayward@arm.com>
23142 David Sherwood <david.sherwood@arm.com>
23144 * lra-constraints.c (process_alt_operands): Reject matched
23145 operands whose sizes aren't ordered.
23146 (match_reload): Refer to this check here.
23148 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23149 Alan Hayward <alan.hayward@arm.com>
23150 David Sherwood <david.sherwood@arm.com>
23152 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
23153 that the mode size is in the set {1, 2, 4, 8, 16}.
23155 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23156 Alan Hayward <alan.hayward@arm.com>
23157 David Sherwood <david.sherwood@arm.com>
23159 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
23160 Use plus_constant instead of gen_rtx_PLUS.
23162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23163 Alan Hayward <alan.hayward@arm.com>
23164 David Sherwood <david.sherwood@arm.com>
23166 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
23167 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
23168 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
23169 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23170 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23171 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23172 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23173 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23174 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23175 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23177 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23178 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23179 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23180 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23181 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23182 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23183 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23184 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23185 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23186 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23188 * expr.c (emit_move_resolve_push): Treat the input and result
23189 of PUSH_ROUNDING as a poly_int64.
23190 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23191 (emit_push_insn): Likewise.
23192 * lra-eliminations.c (mark_not_eliminable): Likewise.
23193 * recog.c (push_operand): Likewise.
23194 * reload1.c (elimination_effects): Likewise.
23195 * rtlanal.c (nonzero_bits1): Likewise.
23196 * calls.c (store_one_arg): Likewise. Require the padding to be
23197 known at compile time.
23199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23200 Alan Hayward <alan.hayward@arm.com>
23201 David Sherwood <david.sherwood@arm.com>
23203 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23204 Use plus_constant instead of gen_rtx_PLUS.
23206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23207 Alan Hayward <alan.hayward@arm.com>
23208 David Sherwood <david.sherwood@arm.com>
23210 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23211 rather than an int.
23213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23214 Alan Hayward <alan.hayward@arm.com>
23215 David Sherwood <david.sherwood@arm.com>
23217 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23218 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23219 via stack temporaries. Treat the mode size as polynomial too.
23221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23222 Alan Hayward <alan.hayward@arm.com>
23223 David Sherwood <david.sherwood@arm.com>
23225 * expr.c (expand_expr_real_2): When handling conversions involving
23226 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23227 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23228 as a poly_uint64 too.
23230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23231 Alan Hayward <alan.hayward@arm.com>
23232 David Sherwood <david.sherwood@arm.com>
23234 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23237 Alan Hayward <alan.hayward@arm.com>
23238 David Sherwood <david.sherwood@arm.com>
23240 * combine.c (can_change_dest_mode): Handle polynomial
23241 REGMODE_NATURAL_SIZE.
23242 * expmed.c (store_bit_field_1): Likewise.
23243 * expr.c (store_constructor): Likewise.
23244 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23245 and polynomial REGMODE_NATURAL_SIZE.
23246 (gen_lowpart_common): Likewise.
23247 * reginfo.c (record_subregs_of_mode): Likewise.
23248 * rtlanal.c (read_modify_subreg_p): Likewise.
23250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23251 Alan Hayward <alan.hayward@arm.com>
23252 David Sherwood <david.sherwood@arm.com>
23254 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23255 numbers of elements.
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 * match.pd: Cope with polynomial numbers of vector elements.
23263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23264 Alan Hayward <alan.hayward@arm.com>
23265 David Sherwood <david.sherwood@arm.com>
23267 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23268 in a POINTER_PLUS_EXPR.
23270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23271 Alan Hayward <alan.hayward@arm.com>
23272 David Sherwood <david.sherwood@arm.com>
23274 * omp-simd-clone.c (simd_clone_subparts): New function.
23275 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23276 (ipa_simd_modify_function_body): Likewise.
23278 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23279 Alan Hayward <alan.hayward@arm.com>
23280 David Sherwood <david.sherwood@arm.com>
23282 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23283 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23284 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23285 (expand_vector_condition, vector_element): Likewise.
23286 (subparts_gt): New function.
23287 (get_compute_type): Use subparts_gt.
23288 (count_type_subparts): Delete.
23289 (expand_vector_operations_1): Use subparts_gt instead of
23290 count_type_subparts.
23292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23293 Alan Hayward <alan.hayward@arm.com>
23294 David Sherwood <david.sherwood@arm.com>
23296 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23297 (vect_compile_time_alias): ...this new function. Do the calculation
23298 on poly_ints rather than trees.
23299 (vect_prune_runtime_alias_test_list): Update call accordingly.
23301 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23302 Alan Hayward <alan.hayward@arm.com>
23303 David Sherwood <david.sherwood@arm.com>
23305 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23307 (vect_schedule_slp_instance): Likewise.
23309 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23310 Alan Hayward <alan.hayward@arm.com>
23311 David Sherwood <david.sherwood@arm.com>
23313 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23314 constant and extern definitions for variable-length vectors.
23315 (vect_get_constant_vectors): Note that the number of units
23316 is known to be constant.
23318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23319 Alan Hayward <alan.hayward@arm.com>
23320 David Sherwood <david.sherwood@arm.com>
23322 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23323 of units as polynomial. Choose between WIDE and NARROW based
23326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23327 Alan Hayward <alan.hayward@arm.com>
23328 David Sherwood <david.sherwood@arm.com>
23330 * tree-vect-stmts.c (simd_clone_subparts): New function.
23331 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23333 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23334 Alan Hayward <alan.hayward@arm.com>
23335 David Sherwood <david.sherwood@arm.com>
23337 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23338 vectors as polynomial. Use build_index_vector for
23339 IFN_GOMP_SIMD_LANE.
23341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23342 Alan Hayward <alan.hayward@arm.com>
23343 David Sherwood <david.sherwood@arm.com>
23345 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23346 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23347 for variable-length vectors.
23348 (vectorizable_mask_load_store): Treat the number of units as
23349 polynomial, asserting that it is constant if the condition has
23350 already been enforced.
23351 (vectorizable_store, vectorizable_load): Likewise.
23353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23354 Alan Hayward <alan.hayward@arm.com>
23355 David Sherwood <david.sherwood@arm.com>
23357 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23358 of units as polynomial. Punt if we can't tell at compile time
23359 which vector contains the final result.
23361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23362 Alan Hayward <alan.hayward@arm.com>
23363 David Sherwood <david.sherwood@arm.com>
23365 * tree-vect-loop.c (vectorizable_induction): Treat the number
23366 of units as polynomial. Punt on SLP inductions. Use an integer
23367 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23368 cast of such a series for variable-length floating-point
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 * tree.h (build_index_vector): Declare.
23376 * tree.c (build_index_vector): New function.
23377 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23378 of units as polynomial, forcibly converting it to a constant if
23379 vectorizable_reduction has already enforced the condition.
23380 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23381 to create a {1,2,3,...} vector.
23382 (vectorizable_reduction): Treat the number of units as polynomial.
23383 Choose vectype_in based on the largest scalar element size rather
23384 than the smallest number of units. Enforce the restrictions
23387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23388 Alan Hayward <alan.hayward@arm.com>
23389 David Sherwood <david.sherwood@arm.com>
23391 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23392 number of units as polynomial.
23394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23395 Alan Hayward <alan.hayward@arm.com>
23396 David Sherwood <david.sherwood@arm.com>
23398 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23399 * target.def (autovectorize_vector_sizes): Return the vector sizes
23400 by pointer, using vector_sizes rather than a bitmask.
23401 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23402 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23403 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23405 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23406 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23407 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23408 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23409 * omp-general.c (omp_max_vf): Likewise.
23410 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23411 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23412 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23413 * tree-vect-slp.c (vect_slp_bb): Likewise.
23414 * doc/tm.texi: Regenerate.
23415 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23417 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23418 the vector size as a poly_uint64 rather than an unsigned int.
23419 (current_vector_size): Change from an unsigned int to a poly_uint64.
23420 (get_vectype_for_scalar_type): Update accordingly.
23421 * tree.h (build_truth_vector_type): Take the size and number of
23422 units as a poly_uint64 rather than an unsigned int.
23423 (build_vector_type): Add a temporary overload that takes
23424 the number of units as a poly_uint64 rather than an unsigned int.
23425 * tree.c (make_vector_type): Likewise.
23426 (build_truth_vector_type): Take the number of units as a poly_uint64
23427 rather than an unsigned int.
23429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23430 Alan Hayward <alan.hayward@arm.com>
23431 David Sherwood <david.sherwood@arm.com>
23433 * target.def (get_mask_mode): Take the number of units and length
23434 as poly_uint64s rather than unsigned ints.
23435 * targhooks.h (default_get_mask_mode): Update accordingly.
23436 * targhooks.c (default_get_mask_mode): Likewise.
23437 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23438 * doc/tm.texi: Regenerate.
23440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23441 Alan Hayward <alan.hayward@arm.com>
23442 David Sherwood <david.sherwood@arm.com>
23444 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23445 * omp-general.c (omp_max_vf): Likewise.
23446 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23447 (expand_omp_simd): Handle polynomial safelen.
23448 * omp-low.c (omplow_simd_context): Add a default constructor.
23449 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23450 (lower_rec_simd_input_clauses): Update accordingly.
23451 (lower_rec_input_clauses): Likewise.
23453 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23454 Alan Hayward <alan.hayward@arm.com>
23455 David Sherwood <david.sherwood@arm.com>
23457 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23458 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23459 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23460 (vect_analyze_slp_cost): Likewise.
23461 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23462 (vect_model_load_cost): Likewise.
23464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23465 Alan Hayward <alan.hayward@arm.com>
23466 David Sherwood <david.sherwood@arm.com>
23468 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23469 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23470 from an unsigned int * to a poly_uint64_pod *.
23471 (calculate_unrolling_factor): New function.
23472 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23475 Alan Hayward <alan.hayward@arm.com>
23476 David Sherwood <david.sherwood@arm.com>
23478 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23479 from an unsigned int to a poly_uint64.
23480 (_loop_vec_info::slp_unrolling_factor): Likewise.
23481 (_loop_vec_info::vectorization_factor): Change from an int
23483 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23484 (vect_get_num_vectors): New function.
23485 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23486 (vect_get_num_copies): Use vect_get_num_vectors.
23487 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23488 to an unsigned int *.
23489 (vect_analyze_data_refs): Change min_vf from an int * to a
23491 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23492 than an unsigned HOST_WIDE_INT.
23493 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23494 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23495 to an unsigned int *.
23496 (vect_analyze_data_ref_dependences): Likewise.
23497 (vect_compute_data_ref_alignment): Handle polynomial vf.
23498 (vect_enhance_data_refs_alignment): Likewise.
23499 (vect_prune_runtime_alias_test_list): Likewise.
23500 (vect_shift_permute_load_chain): Likewise.
23501 (vect_supportable_dr_alignment): Likewise.
23502 (dependence_distance_ge_vf): Take the vectorization factor as a
23503 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23504 (vect_analyze_data_refs): Change min_vf from an int * to a
23506 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23507 vfm1 as a poly_uint64 rather than an int. Make the same change
23508 for the returned bound_scalar.
23509 (vect_gen_vector_loop_niters): Handle polynomial vf.
23510 (vect_do_peeling): Likewise. Update call to
23511 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23512 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23514 * tree-vect-loop.c (vect_determine_vectorization_factor)
23515 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23516 (vect_get_known_peeling_cost): Likewise.
23517 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23518 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23519 (vect_transform_loop): Likewise. Use the lowest possible VF when
23520 updating the upper bounds of the loop.
23521 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23522 rather than an int.
23523 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23524 polynomial unroll factors.
23525 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23526 (vect_make_slp_decision): Likewise.
23527 (vect_supported_load_permutation_p): Likewise, and polynomial
23529 (vect_analyze_slp_cost): Handle polynomial vf.
23530 (vect_slp_analyze_node_operations): Likewise.
23531 (vect_slp_analyze_bb_1): Likewise.
23532 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23533 than an unsigned HOST_WIDE_INT.
23534 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23535 (vectorizable_load): Handle polynomial vf.
23536 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23538 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23541 Alan Hayward <alan.hayward@arm.com>
23542 David Sherwood <david.sherwood@arm.com>
23544 * match.pd: Handle bit operations involving three constants
23545 and try to fold one pair.
23547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23549 * tree-vect-loop-manip.c: Include gimple-fold.h.
23550 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23551 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23552 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23553 Add a path that uses a step of VF instead of 1, but disable it
23555 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23556 and niters_no_overflow parameters. Update calls to
23557 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23558 Create a new SSA name if the latter choses to use a ste other
23559 than zero, and return it via niters_vector_mult_vf_var.
23560 * tree-vect-loop.c (vect_transform_loop): Update calls to
23561 vect_do_peeling, vect_gen_vector_loop_niters and
23562 slpeel_make_loop_iterate_ntimes.
23563 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23564 (vect_gen_vector_loop_niters): Update declarations after above changes.
23566 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23568 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23569 128-bit round to integer instructions.
23570 (ceil<mode>2): Likewise.
23571 (btrunc<mode>2): Likewise.
23572 (round<mode>2): Likewise.
23574 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23576 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23577 unaligned VSX load/store on P8/P9.
23578 (expand_block_clear): Allow the use of unaligned VSX
23579 load/store on P8/P9.
23581 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23583 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23585 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23586 swap associated with both a load and a store.
23588 2018-01-02 Andrew Waterman <andrew@sifive.com>
23590 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23591 * config/riscv/riscv.md (clear_cache): Use it.
23593 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23595 * web.c: Remove out-of-date comment.
23597 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23599 * expr.c (fixup_args_size_notes): Check that any existing
23600 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23601 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23602 (emit_single_push_insn): ...here.
23604 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23606 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23607 (const_vector_encoded_nelts): New function.
23608 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23609 (const_vector_int_elt, const_vector_elt): Declare.
23610 * emit-rtl.c (const_vector_int_elt_1): New function.
23611 (const_vector_elt): Likewise.
23612 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23613 of CONST_VECTOR_ELT.
23615 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23617 * expr.c: Include rtx-vector-builder.h.
23618 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23619 directly on the tree encoding.
23620 (const_vector_from_tree): Likewise.
23621 * optabs.c: Include rtx-vector-builder.h.
23622 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23623 sequence of "u" values.
23624 * vec-perm-indices.c: Include rtx-vector-builder.h.
23625 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23626 directly on the vec_perm_indices encoding.
23628 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23630 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23631 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23632 * rtx-vector-builder.h: New file.
23633 * rtx-vector-builder.c: Likewise.
23634 * rtl.h (rtx_def::u2): Add a const_vector field.
23635 (CONST_VECTOR_NPATTERNS): New macro.
23636 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23637 (CONST_VECTOR_DUPLICATE_P): Likewise.
23638 (CONST_VECTOR_STEPPED_P): Likewise.
23639 (CONST_VECTOR_ENCODED_ELT): Likewise.
23640 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23641 (unwrap_const_vec_duplicate): Likewise.
23642 (const_vec_series_p): Check for a non-duplicated vector encoding.
23643 Say that the function only returns true for integer vectors.
23644 * emit-rtl.c: Include rtx-vector-builder.h.
23645 (gen_const_vec_duplicate_1): Delete.
23646 (gen_const_vector): Call gen_const_vec_duplicate instead of
23647 gen_const_vec_duplicate_1.
23648 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23649 (gen_const_vec_duplicate): Use rtx_vector_builder.
23650 (gen_const_vec_series): Likewise.
23651 (gen_rtx_CONST_VECTOR): Likewise.
23652 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23653 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23654 Build a new vector rather than modifying a CONST_VECTOR in-place.
23655 (handle_special_swappables): Update call accordingly.
23656 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23657 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23658 Build a new vector rather than modifying a CONST_VECTOR in-place.
23659 (handle_special_swappables): Update call accordingly.
23661 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23663 * simplify-rtx.c (simplify_const_binary_operation): Use
23664 CONST_VECTOR_ELT instead of XVECEXP.
23666 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23668 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23669 the selector elements to be different from the data elements
23670 if the selector is a VECTOR_CST.
23671 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23672 ssizetype for the selector.
23674 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23676 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23677 before testing each element individually.
23678 * tree-vect-generic.c (lower_vec_perm): Likewise.
23680 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23682 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23683 * selftest-run-tests.c (selftest::run_tests): Call it.
23684 * vector-builder.h (vector_builder::operator ==): New function.
23685 (vector_builder::operator !=): Likewise.
23686 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23687 (vec_perm_indices::all_from_input_p): New function.
23688 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23689 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23690 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23691 instead of reading the VECTOR_CST directly. Detect whether both
23692 vector inputs are the same before constructing the vec_perm_indices,
23693 and update the number of inputs argument accordingly. Use the
23694 utility functions added above. Only construct sel2 if we need to.
23696 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23698 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23699 the broadcast of the low byte.
23700 (expand_mult_highpart): Use an explicit encoding for the permutes.
23701 * optabs-query.c (can_mult_highpart_p): Likewise.
23702 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23703 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23704 (vectorizable_bswap): Likewise.
23705 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23706 explicit encoding for the power-of-2 permutes.
23707 (vect_permute_store_chain): Likewise.
23708 (vect_grouped_load_supported): Likewise.
23709 (vect_permute_load_chain): Likewise.
23711 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23713 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23714 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23715 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23716 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23717 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23718 (vect_gen_perm_mask_any): Likewise.
23720 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23722 * int-vector-builder.h: New file.
23723 * vec-perm-indices.h: Include int-vector-builder.h.
23724 (vec_perm_indices): Redefine as an int_vector_builder.
23725 (auto_vec_perm_indices): Delete.
23726 (vec_perm_builder): Redefine as a stand-alone class.
23727 (vec_perm_indices::vec_perm_indices): New function.
23728 (vec_perm_indices::clamp): Likewise.
23729 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23730 (vec_perm_indices::new_vector): New function.
23731 (vec_perm_indices::new_expanded_vector): Update for new
23732 vec_perm_indices class.
23733 (vec_perm_indices::rotate_inputs): New function.
23734 (vec_perm_indices::all_in_range_p): Operate directly on the
23735 encoded form, without computing elided elements.
23736 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23737 encoding. Update for new vec_perm_indices class.
23738 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23739 the given vec_perm_builder.
23740 (expand_vec_perm_var): Update vec_perm_builder constructor.
23741 (expand_mult_highpart): Use vec_perm_builder instead of
23742 auto_vec_perm_indices.
23743 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23744 vec_perm_indices instead of auto_vec_perm_indices. Use a single
23745 or double series encoding as appropriate.
23746 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23747 vec_perm_indices instead of auto_vec_perm_indices.
23748 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23749 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23750 (vect_permute_store_chain): Likewise.
23751 (vect_grouped_load_supported): Likewise.
23752 (vect_permute_load_chain): Likewise.
23753 (vect_shift_permute_load_chain): Likewise.
23754 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23755 (vect_transform_slp_perm_load): Likewise.
23756 (vect_schedule_slp_instance): Likewise.
23757 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23758 (vectorizable_mask_load_store): Likewise.
23759 (vectorizable_bswap): Likewise.
23760 (vectorizable_store): Likewise.
23761 (vectorizable_load): Likewise.
23762 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23763 vec_perm_indices instead of auto_vec_perm_indices. Use
23764 tree_to_vec_perm_builder to read the vector from a tree.
23765 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23766 vec_perm_builder instead of a vec_perm_indices.
23767 (have_whole_vector_shift): Use vec_perm_builder and
23768 vec_perm_indices instead of auto_vec_perm_indices. Leave the
23769 truncation to calc_vec_perm_mask_for_shift.
23770 (vect_create_epilog_for_reduction): Likewise.
23771 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23772 from auto_vec_perm_indices to vec_perm_indices.
23773 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23774 instead of changing individual elements.
23775 (aarch64_vectorize_vec_perm_const): Use new_vector to install
23776 the vector in d.perm.
23777 * config/arm/arm.c (expand_vec_perm_d::perm): Change
23778 from auto_vec_perm_indices to vec_perm_indices.
23779 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23780 instead of changing individual elements.
23781 (arm_vectorize_vec_perm_const): Use new_vector to install
23782 the vector in d.perm.
23783 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23784 Update vec_perm_builder constructor.
23785 (rs6000_expand_interleave): Likewise.
23786 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23787 (rs6000_expand_interleave): Likewise.
23789 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23791 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23792 to qimode could truncate the indices.
23793 * optabs.c (expand_vec_perm_var): Likewise.
23795 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23797 * Makefile.in (OBJS): Add vec-perm-indices.o.
23798 * vec-perm-indices.h: New file.
23799 * vec-perm-indices.c: Likewise.
23800 * target.h (vec_perm_indices): Replace with a forward class
23802 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23803 * optabs.h: Include vec-perm-indices.h.
23804 (expand_vec_perm): Delete.
23805 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23806 (expand_vec_perm_const): Declare.
23807 * target.def (vec_perm_const_ok): Replace with...
23808 (vec_perm_const): ...this new hook.
23809 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23810 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23811 * doc/tm.texi: Regenerate.
23812 * optabs.def (vec_perm_const): Delete.
23813 * doc/md.texi (vec_perm_const): Likewise.
23814 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23815 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23816 expand_vec_perm for constant permutation vectors. Assert that
23817 the mode of variable permutation vectors is the integer equivalent
23818 of the mode that is being permuted.
23819 * optabs-query.h (selector_fits_mode_p): Declare.
23820 * optabs-query.c: Include vec-perm-indices.h.
23821 (selector_fits_mode_p): New function.
23822 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23823 is defined, instead of checking whether the vec_perm_const_optab
23824 exists. Use targetm.vectorize.vec_perm_const instead of
23825 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23826 fit in the vector mode before using a variable permute.
23827 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23828 vec_perm_indices instead of an rtx.
23829 (expand_vec_perm): Replace with...
23830 (expand_vec_perm_const): ...this new function. Take the selector
23831 as a vec_perm_indices rather than an rtx. Also take the mode of
23832 the selector. Update call to shift_amt_for_vec_perm_mask.
23833 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23834 Use vec_perm_indices::new_expanded_vector to expand the original
23835 selector into bytes. Check whether the indices fit in the vector
23836 mode before using a variable permute.
23837 (expand_vec_perm_var): Make global.
23838 (expand_mult_highpart): Use expand_vec_perm_const.
23839 * fold-const.c: Includes vec-perm-indices.h.
23840 * tree-ssa-forwprop.c: Likewise.
23841 * tree-vect-data-refs.c: Likewise.
23842 * tree-vect-generic.c: Likewise.
23843 * tree-vect-loop.c: Likewise.
23844 * tree-vect-slp.c: Likewise.
23845 * tree-vect-stmts.c: Likewise.
23846 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23848 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23849 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23850 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23851 (aarch64_vectorize_vec_perm_const): ...this new function.
23852 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23853 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23854 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23855 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23856 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23857 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23858 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23860 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
23861 check for NEON modes.
23862 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23863 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23864 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23865 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23867 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
23868 the old VEC_PERM_CONST conditions.
23869 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23870 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23871 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23872 (ia64_vectorize_vec_perm_const_ok): Merge into...
23873 (ia64_vectorize_vec_perm_const): ...this new function.
23874 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23875 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23876 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23877 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23878 * config/mips/mips.c (mips_expand_vec_perm_const)
23879 (mips_vectorize_vec_perm_const_ok): Merge into...
23880 (mips_vectorize_vec_perm_const): ...this new function.
23881 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23882 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23883 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23884 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23885 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23886 (rs6000_expand_vec_perm_const): Delete.
23887 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23889 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23890 (altivec_expand_vec_perm_const_le): Take each operand individually.
23891 Operate on constant selectors rather than rtxes.
23892 (altivec_expand_vec_perm_const): Likewise. Update call to
23893 altivec_expand_vec_perm_const_le.
23894 (rs6000_expand_vec_perm_const): Delete.
23895 (rs6000_vectorize_vec_perm_const_ok): Delete.
23896 (rs6000_vectorize_vec_perm_const): New function.
23897 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23898 an element count and rtx array.
23899 (rs6000_expand_extract_even): Update call accordingly.
23900 (rs6000_expand_interleave): Likewise.
23901 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23902 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23903 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23904 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23905 (rs6000_expand_vec_perm_const): Delete.
23906 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23907 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23908 (altivec_expand_vec_perm_const_le): Take each operand individually.
23909 Operate on constant selectors rather than rtxes.
23910 (altivec_expand_vec_perm_const): Likewise. Update call to
23911 altivec_expand_vec_perm_const_le.
23912 (rs6000_expand_vec_perm_const): Delete.
23913 (rs6000_vectorize_vec_perm_const_ok): Delete.
23914 (rs6000_vectorize_vec_perm_const): New function. Remove stray
23915 reference to the SPE evmerge intructions.
23916 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23917 an element count and rtx array.
23918 (rs6000_expand_extract_even): Update call accordingly.
23919 (rs6000_expand_interleave): Likewise.
23920 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23921 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23923 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23925 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23927 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23928 vector mode and that that mode matches the mode of the data
23930 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23931 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
23932 directly using expand_vec_perm_1 when forcing selectors into
23934 (expand_vec_perm_var): New function, split out from expand_vec_perm.
23936 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23938 * optabs-query.h (can_vec_perm_p): Delete.
23939 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23940 * optabs-query.c (can_vec_perm_p): Split into...
23941 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23942 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23943 particular selector is valid.
23944 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23945 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23946 (vect_grouped_load_supported): Likewise.
23947 (vect_shift_permute_load_chain): Likewise.
23948 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23949 (vect_transform_slp_perm_load): Likewise.
23950 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23951 (vectorizable_bswap): Likewise.
23952 (vect_gen_perm_mask_checked): Likewise.
23953 * fold-const.c (fold_ternary_loc): Likewise. Don't take
23954 implementations of variable permutation vectors into account
23955 when deciding which selector to use.
23956 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23957 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23958 with a false third argument.
23959 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23960 to test whether the constant selector is valid and can_vec_perm_var_p
23961 to test whether a variable selector is valid.
23963 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23965 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23966 * optabs-query.c (can_vec_perm_p): Likewise.
23967 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23968 instead of vec_perm_indices.
23969 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23970 (vect_gen_perm_mask_checked): Likewise,
23971 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23972 (vect_gen_perm_mask_checked): Likewise,
23974 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23976 * optabs-query.h (qimode_for_vec_perm): Declare.
23977 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23978 (qimode_for_vec_perm): ...this new function.
23979 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23981 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23983 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23984 does not have a conditional at the top.
23986 2018-01-02 Richard Biener <rguenther@suse.de>
23988 * ipa-inline.c (big_speedup_p): Fix expression.
23990 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23993 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23996 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
24000 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
24001 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
24002 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
24003 cond_taken_branch_cost 3->4.
24005 2018-01-01 Jakub Jelinek <jakub@redhat.com>
24007 PR tree-optimization/83581
24008 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
24009 TODO_cleanup_cfg if any changes have been made.
24011 PR middle-end/83608
24012 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
24013 convert_modes if target mode has the right side, but different mode
24016 PR middle-end/83609
24017 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
24018 last argument when extracting from CONCAT. If either from_real or
24019 from_imag is NULL, use expansion through memory. If result is not
24020 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
24021 the parts directly to inner mode, if even that fails, use expansion
24024 PR middle-end/83623
24025 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
24026 check for bswap in mode rather than HImode and use that in expand_unop
24029 Copyright (C) 2018 Free Software Foundation, Inc.
24031 Copying and distribution of this file, with or without modification,
24032 are permitted in any medium without royalty provided the copyright
24033 notice and this notice are preserved.