1 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
11 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
13 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
14 full GENERIC expression used for replacement.
16 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
18 * tree-vrp.c (abs_extent_range): Remove.
19 (extract_range_into_wide_ints): Pass wide ints by reference.
20 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
21 Pass wide ints by reference in all calls to
22 extract_range_into_wide_ints.
23 * wide-int-range.cc (wide_int_range_div): New.
24 * wide-int-range.h (wide_int_range_div): New.
25 (wide_int_range_includes_zero_p): New.
26 (wide_int_range_zero_p): New.
28 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
30 * config/aarch64/aarch64.md (arches): New enum.
31 (arch): New enum attr.
32 (arch_enabled): New attr.
33 (enabled): Now uses arch_enabled only.
34 (simd, sve, fp16): Removed attribute.
35 (fp): Attr now defined in terms of 'arch'.
36 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
37 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
38 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
39 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
40 attributes into 'arch'.
41 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
42 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
43 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
44 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
45 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
46 'simd' attribute into 'arch'.
47 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
48 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
49 Convert use of 'fp' attribute to 'arch'.
50 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
51 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
53 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
54 (different modes) Merge 'fp' and 'simd' into 'arch'.
55 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
58 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
60 PR rtl-optimization/87026
61 * expmed.c (canonicalize_comparison): If we can no longer create
62 pseudoregisters, don't.
64 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
67 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
69 * config/arm/arm.c (speculation_barrier_libfunc): New static
71 (arm_init_libfuncs): Initialize it.
72 (arm_emit_speculation_barrier): New function.
73 * config/arm/arm.md (speculation_barrier): Call
74 arm_emit_speculation_barrier for architectures that do not have
76 (speculation_barrier_insn): Only match on Armv7 or later.
78 2018-08-23 Richard Biener <rguenther@suse.de>
81 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
84 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
86 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
87 of single-vector TBLs.
88 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
91 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
94 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
95 aarch64_evpc_tbl guard.
97 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
99 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
102 2018-08-22 Martin Sebor <msebor@redhat.com>
105 * tree-pretty-print.c (pretty_print_string): Add argument.
106 (dump_generic_node): Call to pretty_print_string with string size.
108 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
110 PR rtl-optimization/86771
111 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
112 of two SETs into those two SETs, one to be placed at i2, if that SETs
113 destination is modified between i2 and i3.
115 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
117 PR tree-optimization/86725
118 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
120 (vect_analyze_scalar_cycles_1): Check it.
122 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
124 PR tree-optimization/86725
125 * tree-vect-loop.c (vect_is_simple_reduction): When treating
126 an outer loop phi as a double reduction, make sure that the
127 single user of the phi result is an inner loop phi.
129 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
131 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
132 grouped stores with gaps to a strided group.
134 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
136 * tree-vect-stmts.c (get_group_load_store_type)
137 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
138 first statement in a group.
140 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
142 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
143 the sequence used in gcc/gcc.c.
145 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
148 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
151 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
153 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
154 Darwin10-specific unwinder-shim.
155 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
156 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
157 New to cater for Darwin10 Rosetta.
159 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
161 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
162 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
164 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
169 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
170 (dwarf2out_switch_text_section): Generate a local label for the
171 second function sub-section and apply it as the second FDE start
173 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
174 second sub-section start.
176 2018-08-22 Richard Biener <rguenther@suse.de>
178 PR tree-optimization/86988
179 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
181 2018-08-22 Richard Biener <rguenther@suse.de>
183 PR tree-optimization/86945
184 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
186 2018-08-22 Alexandre Oliva <oliva@adacore.com>
188 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
189 a comment about how uses of r2 for .sdata2 come about.
191 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
193 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
195 2018-08-21 Marek Polacek <polacek@redhat.com>
197 PR c++/86981, Implement -Wpessimizing-move.
198 * doc/invoke.texi: Document -Wpessimizing-move.
200 2018-08-21 Jan Hubicka <jh@suse.cz>
202 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
203 * tree.h (is_redundant_typedef): Remove.
204 * dwarf2out.c (is_redundant_typedef): Turn into static function.
206 2018-08-21 Jan Hubicka <jh@suse.cz>
208 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
211 2018-08-21 Tamar Christina <tamar.christina@arm.com>
213 * expmed.c (extract_low_bits): Reject invalid subregs early.
215 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
218 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
221 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
223 * config/vxworks.h: Guard vxworks_asm_out_constructor and
224 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
225 * config/vxworks.c: Likewise.
227 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
229 * config/vxworks.c: Set targetm.have_ctors_dtors
230 if HAVE_INITFINI_ARRAY_SUPPORT.
231 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
232 if HAVE_INITFINI_ARRAY_SUPPORT.
234 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
236 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
237 default search path for VxWorks < 7.
239 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
241 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
242 (get_format_string): Refer to c_getstr.
244 2018-08-21 Tom de Vries <tdevries@suse.de>
246 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
247 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
248 (debuginfo_early_stop): Declare.
249 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
250 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
251 (debuginfo_early_stop): New function.
252 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
253 and debuginfo_early_stop.
254 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
255 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
256 (general_init): Call debuginfo_early_init.
257 (finalize): Call debuginfo_fini.
258 (do_compile): Call debuginfo_init.
259 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
261 (@item -fdump-debug, @item -fdump-earlydebug): Add.
263 2018-08-21 Tom de Vries <tdevries@suse.de>
265 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
266 flag_dump_noaddr and flag_dump_unnumbered.
268 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
270 * wide-int-range.cc (wide_int_range_abs): New.
271 (wide_int_range_order_set): Rename from wide_int_range_min_max.
272 * wide-int-range.h (wide_int_range_abs): New.
273 (wide_int_range_min_max): New.
274 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
275 case to call wide_int_range_abs.
276 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
277 (extract_range_from_abs_expr): Delete.
279 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
282 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
283 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
286 2018-08-20 Nathan Sidwell <nathan@acm.org>
287 Jeff Law <law@redhat.com>
289 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
290 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
292 2018-08-20 David Malcolm <dmalcolm@redhat.com>
295 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
296 (decl_attributes): Likewise.
297 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
299 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
300 * diagnostic-core.h (class auto_diagnostic_group): New class.
301 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
302 (diagnostic_report_diagnostic): Handle the first diagnostics within
304 (emit_diagnostic): Add auto_diagnostic_group instance.
306 (inform_n): Likewise.
308 (warning_at): Likewise.
309 (warning_n): Likewise.
311 (permerror): Likewise.
314 (error_at): Likewise.
316 (fatal_error): Likewise.
317 (internal_error): Likewise.
318 (internal_error_no_backtrace): Likewise.
319 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
320 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
321 * diagnostic.h (struct diagnostic_context): Add fields
322 "diagnostic_group_nesting_depth",
323 "diagnostic_group_emission_count", "begin_group_cb",
325 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
326 Add auto_diagnostic_group instance(s).
327 (find_explicit_erroneous_behavior): Likewise.
328 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
329 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
330 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
331 (gimplify_va_arg_expr): Likewise.
332 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
333 (HSA_SORRY_AT): Likewise.
334 * ipa-devirt.c (compare_virtual_tables): Likewise.
335 (warn_odr): Likewise.
336 * multiple_target.c (expand_target_clones): Likewise.
337 * opts-common.c (cmdline_handle_error): Likewise.
338 * reginfo.c (globalize_reg): Likewise.
339 * substring-locations.c (format_warning_n_va): Likewise.
340 * tree-inline.c (expand_call_inline): Likewise.
341 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
342 * tree-ssa-loop-niter.c
343 (do_warn_aggressive_loop_optimizations): Likewise.
344 * tree-ssa-uninit.c (warn_uninit): Likewise.
345 * tree.c (warn_deprecated_use): Likewise.
347 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
350 * config/i386/i386.md (eh_return): Always update EH return
351 address in word_mode.
353 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
355 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
356 TARGET_SPLIT_COMPLEX_ARG is defined.
358 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
360 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
362 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
365 * expr.c (expand_assignment): Assert that bitpos is positive.
366 (store_field): Likewise
367 (expand_expr_real_1): Make sure that bitpos is positive.
368 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
371 2018-08-20 Nathan Sidwell <nathan@acm.org>
373 * Makefile.in (CPP_ID_DATA_H): Delete.
374 (CPP_INTERNAL_H): Don't add it.
375 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
376 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
378 2018-08-20 Richard Biener <rguenther@suse.de>
380 PR tree-optimization/78655
381 * tree-vrp.c (extract_range_from_binary_expr_1): Make
382 pointer + offset nonnull if either operand is nonnull work.
384 2018-08-20 Tom de Vries <tdevries@suse.de>
386 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
387 unless the referenced die describes the added property using
388 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
389 Otherwise, add a DW_AT_location to the referenced die.
391 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
394 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
395 register_operand when calling ix86_set_reg_reg_cost.
396 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
397 Set *total to 0 for operands that satisfy x86_64_immediate_operand
398 predicate and to 1 otherwise.
400 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
402 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
403 emit a diagnostic that it is not supported and reset the option.
404 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
405 supported and consume the option. (ASM_FINAL_SPEC): New.
407 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
409 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
412 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
414 C-SKY port: Documentation
416 * doc/extend.texi (C-SKY Function Attributes): New section.
417 * doc/invoke.texi (Option Summary): Add C-SKY options.
418 (C-SKY Options): New section.
419 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
421 2018-08-17 Jojo <jijie_rong@c-sky.com>
422 Huibin Wang <huibin_wang@c-sky.com>
423 Sandra Loosemore <sandra@codesourcery.com>
424 Chung-Lin Tang <cltang@codesourcery.com>
426 C-SKY port: Backend implementation
428 * config/csky/*: New.
429 * common/config/csky/*: New.
431 2018-08-17 Jojo <jijie_rong@c-sky.com>
432 Huibin Wang <huibin_wang@c-sky.com>
433 Sandra Loosemore <sandra@codesourcery.com>
434 Chung-Lin Tang <cltang@codesourcery.com>
435 Andrew Jenner <andrew@codesourcery.com>
437 C-SKY port: Configury
439 * config.gcc (csky-*-*): New.
440 * configure.ac: Add csky to targets for dwarf2 debug_line support.
441 * configure: Regenerated.
443 2018-08-17 David Malcolm <dmalcolm@redhat.com>
445 * dump-context.h: Include "dumpfile.h".
446 (dump_context::dump_printf_va): Convert final param from va_list
447 to va_list *. Convert from ATTRIBUTE_PRINTF to
448 ATTRIBUTE_GCC_DUMP_PRINTF.
449 (dump_context::dump_printf_loc_va): Likewise.
450 * dumpfile.c: Include "stringpool.h".
451 (make_item_for_dump_printf_va): Delete.
452 (make_item_for_dump_printf): Delete.
453 (class dump_pretty_printer): New class.
454 (dump_pretty_printer::dump_pretty_printer): New ctor.
455 (dump_pretty_printer::emit_items): New member function.
456 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
458 (dump_pretty_printer::emit_item): New member function.
459 (dump_pretty_printer::stash_item): New member function.
460 (dump_pretty_printer::format_decoder_cb): New member function.
461 (dump_pretty_printer::decode_format): New member function.
462 (dump_context::dump_printf_va): Reimplement in terms of
464 (dump_context::dump_printf_loc_va): Convert final param from va_list
466 (dump_context::begin_scope): Reimplement call to
467 make_item_for_dump_printf.
468 (dump_printf): Update for change to dump_printf_va.
469 (dump_printf_loc): Likewise.
470 (selftest::test_capture_of_dump_calls): Convert "stmt" from
471 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
473 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
474 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
475 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
476 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
477 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
478 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
479 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
480 within a dump_printf_loc call to "%wu".
481 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
482 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
483 missing space after "=".
484 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
485 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
486 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
487 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
488 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
489 duplicate "vectorized" from message.
491 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
493 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
494 polyNxK_t element's TYPE_STRING_FLAG.
496 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
498 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
499 (they were unnamed before). Fix comments.
501 2018-08-17 Nathan Sidwell <nathan@acm.org>
503 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
505 2018-08-17 Richard Biener <rguenther@suse.de>
507 PR tree-optimization/86841
508 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
510 2018-08-17 Martin Liska <mliska@suse.cz>
512 * common.opt: Remove Warn, Init and Report for options with
513 Ignore/Deprecated flag. Warning is done automatically for
515 * config/i386/i386.opt: Likewise.
516 * config/ia64/ia64.opt: Likewise.
517 * config/rs6000/rs6000.opt: Likewise.
518 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
519 Remove usage of flag_check_pointer_bounds.
520 * lto-wrapper.c (merge_and_complain): Do not handle
521 OPT_fcheck_pointer_bounds.
522 (append_compiler_options): Likewise.
523 * opt-functions.awk: Do not handle Deprecated.
524 * optc-gen.awk: Check that Var, Report and Init are not
525 used for an option with Ignore/Deprecated flag.
526 * opts-common.c (decode_cmdline_option): Do not report
528 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
530 * opts.h (struct cl_option): Remove cl_deprecated flag.
531 (CL_ERR_DEPRECATED): Remove error enum value.
533 2018-08-17 Richard Biener <rguenther@suse.de>
536 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
537 across a va-arg-pack using call adjust its return value accordingly.
539 2018-08-16 Martin Sebor <msebor@redhat.com>
541 PR tree-optimization/86853
542 * gimple-ssa-sprintf.c (struct format_result): Rename member.
543 (struct fmtresult): Add member and initialize it in ctors.
544 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
545 (format_string): Handle %S the same as %ls. Set MAYFAIL.
546 (format_directive): Set POSUNDER4K when MAYFAIL is set.
547 (parse_directive): Handle %C same as %c.
548 (sprintf_dom_walker::compute_format_length): Adjust.
549 (is_call_safe): Adjust.
551 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
553 * builtins.c (c_strlen): Add new parameter eltsize. Use it
554 for determining how to count the elements.
555 * builtins.h (c_strlen): Adjust prototype.
556 * expr.c (string_constant): Add new parameter mem_size.
557 Set *mem_size appropriately.
558 * expr.h (string_constant): Adjust protoype.
559 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
560 * gimple-fold.h (get_range_strlen): Adjust prototype.
561 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
562 (format_string): Call get_string_length with eltsize.
564 2018-08-16 David Malcolm <dmalcolm@redhat.com>
566 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
567 to emit the span, rather than setting it as the prefix.
569 2018-08-16 David Malcolm <dmalcolm@redhat.com>
571 * diagnostic-show-locus.c (layout::start_annotation_line): Add
572 "margin_char" parameter, defaulting to space. Use it in place
573 of pp_space for the initial part of the margin.
574 (layout::print_leading_fixits): Use '+' when filling the margin
575 of line-insertion fix-it hints.
577 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
579 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
582 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
584 * config/rs6000/altivec.md: Don't set length attribute to the default
586 * config/rs6000/darwin.md: Ditto.
587 * config/rs6000/dfp.md: Ditto.
588 * config/rs6000/htm.md: Ditto.
589 * config/rs6000/rs6000.md: Ditto.
590 * config/rs6000/sync.md: Ditto.
591 * config/rs6000/vsx.md: Ditto.
593 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
595 * config/rs6000/altivec.md: Don't set length attribute to the default
596 value, for branch instructions.
597 * config/rs6000/darwin.md: Ditto.
598 * config/rs6000/rs6000.md: Ditto.
600 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
602 * config/rs6000/rs6000.md (length): Always define as const_int 4.
603 (unnamed conditional branch define_insn): Set length to 4 or 8
605 (<bd>_<mode>): Similar, for alternative 0.
606 (<bd>tf_<mode>): Ditto.
608 2018-08-16 Tamar Christina <tamar.christina@arm.com>
610 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
612 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
614 * doc/rtl.texi: Replace old RTX class names with new names.
617 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
619 * expmed.h (canonicalize_comparison): New declaration.
620 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
621 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
622 * optabs.c (prepare_cmp_insn): Likewise.
623 * rtl.h (unsigned_condition_p): New function which checks if a
624 comparison operator is unsigned.
626 2018-08-16 Nathan Sidwell <nathan@acm.org>
628 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
629 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
631 2018-08-16 Tamar Christina <tamar.christina@arm.com>
634 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
635 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
636 (mov<mov>): ..this and enable unconditionally.
638 2018-08-16 Tamar Christina <tamar.christina@arm.com>
640 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
642 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
644 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
645 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
646 "Common" with "Target".
648 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
650 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
651 * doc/invoke.texi (mmitigate-rop): Remove.
652 * config/i386/i386.c: Do not include "regrename.h".
653 (ix86_rop_should_change_byte_p, reg_encoded_number)
654 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
656 (ix86_reorg): Remove call to ix86_mitigate_rop.
657 * config/i386/i386.md (attr "modrm_class"): Remove.
658 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
659 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
660 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
662 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
664 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
665 allow folding of mergeh() and mergel() for the float and double types.
666 (fold_mergehl_helper): Rework to handle building a permute tree
669 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
671 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
674 2018-08-15 David Malcolm <dmalcolm@redhat.com>
676 * common.opt (fdiagnostics-show-labels): New option.
677 * diagnostic-show-locus.c (class layout_range): Add field
679 (class layout): Add field "m_show_labels_p".
680 (layout_range::layout_range): Add param "label" and use it to
682 (make_range): Pass in NULL for new "label" param of layout_range's
684 (layout::layout): Initialize m_show_labels_p.
685 (layout::maybe_add_location_range): Pass in loc_range->m_label
686 when constructing layout_range instances.
687 (struct line_label): New struct.
688 (layout::print_any_labels): New member function.
689 (layout::print_line): Call it if label-printing is enabled.
690 (selftest::test_one_liner_labels): New test.
691 (selftest::test_diagnostic_show_locus_one_liner): Call it.
692 * diagnostic.c (diagnostic_initialize): Initialize
693 context->show_labels_p.
694 * diagnostic.h (struct diagnostic_context): Add field
696 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
697 -fno-diagnostics-show-labels.
698 * dwarf2out.c (gen_producer_string): Add
699 OPT_fdiagnostics_show_labels to the ignored options.
700 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
702 (gcc_rich_location::maybe_add_expr): Likewise.
703 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
704 label" param, defaulting to NULL.
705 (gcc_rich_location::add_expr): Add "label" param.
706 (gcc_rich_location::maybe_add_expr): Likewise.
707 (class text_range_label): New class.
708 (class range_label_for_type_mismatch): New class.
709 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
710 of format_warning_va.
711 (fmtwarn_n): Likewise for new params of format_warning_n_va.
712 * lto-wrapper.c (merge_and_complain): Add
713 OPT_fdiagnostics_show_labels to the "pick one setting" options.
714 (append_compiler_options): Likewise to the dropped options.
715 (append_diag_options): Likewise to the passed-on options.
716 * opts.c (common_handle_option): Handle the new option.
717 * selftest-diagnostic.c
718 (test_diagnostic_context::test_diagnostic_context): Enable
720 * substring-locations.c: Include "gcc-rich-location.h".
721 (format_warning_n_va): Add "fmt_label" and "param_label" params
722 and use them as appropriate.
723 (format_warning_va): Add "fmt_label" and "param_label" params,
724 passing them on to format_warning_n_va.
725 (format_warning_at_substring): Likewise.
726 (format_warning_at_substring_n): Likewise.
727 * substring-locations.h (format_warning_va): Add "fmt_label" and
728 "param_label" params.
729 (format_warning_n_va): Likewise.
730 (format_warning_at_substring): Likewise.
731 (format_warning_at_substring_n): Likewise.
732 * toplev.c (general_init): Initialize global_dc->show_labels_p.
734 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
737 * builtins.c (expand_builtin_memcmp): Do not expand the call
738 when overflow is detected.
740 2018-08-15 Martin Sebor <msebor@redhat.com>
742 PR tree-optimization/71625
743 * config/aarch64/aarch64-builtins.c
744 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
746 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
748 * config/s390/s390.c (s390_reorg): Remove loop.
750 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
753 (darwin_function_switched_text_sections): Delete.
754 * gcc/config/darwin.h
755 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
757 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
760 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
761 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
762 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
764 2018-08-15 Martin Liska <mliska@suse.cz>
766 PR tree-optimization/86925
767 * predict.c (expr_expected_value_1): When taking
768 later predictor, assign also probability.
769 Use fold_build2_initializer_loc in order to fold
770 the expression in -frounding-math.
772 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
774 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
776 (expand_vec_perm_1): Try the new method.
778 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
781 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
782 Check whether lra_live_max_point is 0 before dividing.
784 2018-08-14 Martin Sebor <msebor@redhat.com>
786 PR tree-optimization/86650
787 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
788 (vrp_prop::check_mem_ref): Same.
790 2018-08-13 Liu Hao <lh_mouse@126.com>
792 * pretty-print.c (eat_esc_sequence): Swap the foreground and
793 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
794 and clear it thereafter, as it only works for DBCS.
796 2018-08-13 Liu Hao <lh_mouse@126.com>
798 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
799 handle returned by _get_osf_handle().
801 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
803 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
804 for folding vec_perm.
806 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
808 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
809 Add support for gimple-folding of vec_pack() and vec_unpack()
812 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
814 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
815 vec_xst variants to the list.
816 (rs6000_gimple_fold_builtin): Add support for folding unaligned
817 vector loads and stores.
819 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
821 * config.gcc (rs6000-ibm-aix4.x): Delete.
822 (rs6000-ibm-aix5.1): Delete.
823 (rs6000-ibm-aix5.2): Delete.
824 (rs6000-ibm-aix5.3): Delete.
825 * config/rs6000/aix43.h: Delete.
826 * config/rs6000/aix51.h: Delete.
827 * config/rs6000/aix52.h: Delete.
828 * config/rs6000/t-aix43: Delete.
830 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
832 * config/s390/s390.c (s390_decompose_constant_pool_ref):
834 (s390_decompose_address): Factor out constant pool ref
837 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
839 * config/nds32/nds32-predicates.c
840 (nds32_can_use_bclr_p): Change return type as bool.
841 (nds32_can_use_bset_p): Ditto.
842 (nds32_can_use_btgl_p): Ditto.
843 (nds32_can_use_bitci_p): Ditto.
844 * config/nds32/nds32-protos.h
845 (nds32_can_use_bclr_p): Change declaration.
846 (nds32_can_use_bset_p): Ditto.
847 (nds32_can_use_btgl_p): Ditto.
848 (nds32_can_use_bitci_p): Ditto.
850 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
852 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
853 Support -msched-prolog-epilog option.
854 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
856 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
858 * common/config/nds32/nds32-common.c
859 (nds32_option_optimization_table): Enalbe -malways-align.
861 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
863 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
865 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
866 OPT_misr_secure_ case.
867 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
868 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
869 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
871 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
872 (nds32_isr_info): New field security_level.
873 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
874 * config/nds32/nds32.md (return_internal): Consider critical attribute.
875 * config/nds32/nds32.opt (misr-secure): New option.
876 * config/nds32/nds32_init.inc: New file.
877 * config/nds32/nds32_isr.h: New file.
879 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
881 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
882 Update comment for atomic instructions.
883 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
884 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
886 (atomic_loaddi): Revise fence expansion to only emit fence prior to
887 load for __ATOMIC_SEQ_CST model.
888 (atomic_loaddi_1): Remove float register target.
889 (atomic_storedi): Handle CONST_INT values.
890 (atomic_storedi_1): Remove float register source. Add special case
892 (memory_barrier): New expander and insn.
894 2018-08-11 Jakub Jelinek <jakub@redhat.com>
896 PR tree-optimization/86835
897 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
898 new_stmt after def_gsi, make sure to insert new_square_stmt after
899 that stmt, not 2 stmts before it.
901 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
904 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
907 2018-08-10 Martin Liska <mliska@suse.cz>
910 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
912 * builtins.c (expand_builtin_expect_with_probability):
914 (expand_builtin_expect_with_probability): New function.
915 (build_builtin_expect_predicate): Add new argumnet probability
916 for BUILT_IN_EXPECT_WITH_PROBABILITY.
917 (fold_builtin_expect):
920 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
921 * builtins.h (fold_builtin_expect): Set new argument.
922 * doc/extend.texi: Document __builtin_expect_with_probability.
923 * doc/invoke.texi: Likewise.
924 * gimple-fold.c (gimple_fold_call): Pass new argument.
925 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
926 also BUILT_IN_EXPECT_WITH_PROBABILITY.
927 * predict.c (get_predictor_value): New function.
928 (expr_expected_value): Add new argument probability. Assume
929 that predictor and probability are always non-null.
930 (expr_expected_value_1): Likewise. For __builtin_expect and
931 __builtin_expect_with_probability set probability. Handle
932 combination in binary expressions.
933 (tree_predict_by_opcode): Simplify code by simply calling
935 (pass_strip_predict_hints::execute): Add handling of
936 BUILT_IN_EXPECT_WITH_PROBABILITY.
937 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
939 * tree.h (DECL_BUILT_IN_P): New function.
941 2018-08-10 Martin Liska <mliska@suse.cz>
943 PR tree-optimization/85799
944 * passes.def: Add argument for pass_strip_predict_hints.
945 * predict.c (class pass_strip_predict_hints): Add new argument
947 (strip_predictor_early): New function.
948 (pass_strip_predict_hints::execute): Call the function to
950 (strip_predict_hints): New function.
951 * predict.def: Fix comment.
953 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
955 * Makefile.in: Clarify which tm.texi to copy over to assert the
956 right to grant a GFDL license for all.
958 2018-08-09 Jeff Law <law@redhat.com>
960 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
963 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
965 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
968 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
970 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
971 reductions for variable-length vectors.
973 2018-08-09 David Malcolm <dmalcolm@redhat.com>
976 * common.opt (fdiagnostics-show-line-numbers): New option.
977 * diagnostic-show-locus.c (class layout): Add fields
978 "m_show_line_numbers_p" and "m_linenum_width";
979 (num_digits): New function.
980 (test_num_digits): New function.
981 (layout::layout): Initialize new fields. Update m_x_offset
982 logic to handle any left margin.
983 (layout::print_source_line): Print line number when requested.
984 (layout::start_annotation_line): New member function.
985 (layout::print_annotation_line): Call it.
986 (layout::print_leading_fixits): Likewise.
987 (layout::print_trailing_fixits): Likewise. Update calls to
988 move_to_column for new parameter.
989 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
990 it to potentially call start_annotation_line.
991 (layout::show_ruler): Call start_annotation_line.
992 (selftest::test_line_numbers_multiline_range): New selftest.
993 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
994 and selftest::test_line_numbers_multiline_range.
995 * diagnostic.c (diagnostic_initialize): Initialize
997 * diagnostic.h (struct diagnostic_context): Add field
998 "show_line_numbers_p".
999 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
1000 -fno-diagnostics-show-line-numbers.
1001 * dwarf2out.c (gen_producer_string): Add
1002 OPT_fdiagnostics_show_line_numbers to the ignored options.
1003 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
1004 one setting" options.
1005 (append_compiler_options): Likewise to the dropped options.
1006 (append_diag_options): Likewise to the passed-on options.
1007 * opts.c (common_handle_option): Handle the new option.
1008 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
1010 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
1012 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
1013 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
1014 third argument of type "const signed char" to descriptions of
1015 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1016 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1017 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1018 __builtin_bcdsub_ov functions.
1020 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1022 PR tree-optimization/86858
1023 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1024 flow_bb_inside_loop_p calls.
1026 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1028 PR tree-optimization/86871
1029 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1030 instead of gimple_assign_lhs.
1032 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1035 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1036 register constraint to operand 0.
1037 (add<mode>3_carryinC): Likewise.
1038 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1040 2018-08-09 Martin Liska <mliska@suse.cz>
1043 * common.opt: Remove extra line.
1045 2018-08-09 Martin Liska <mliska@suse.cz>
1047 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1048 at the end of a line, make first letter capital and end up
1049 a sentence with a dot.
1050 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1051 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1052 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1053 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1054 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1055 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1056 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1057 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1058 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1059 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1060 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1061 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1062 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1063 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1064 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1065 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1066 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1067 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1069 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1072 * config/s390/s390.c (s390_option_override_internal): Reduce the
1073 stack-clash-protection-probe-interval param if it would be too big
1076 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1079 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1080 * config/m68k/m68k.c (handle_move_double): Don't call
1081 m68k_final_prescan_insn.
1082 (m68k_adjust_decorated_operand): Renamed from
1083 m68k_final_prescan_insn, remove first and third operand and
1085 (print_operand): Call it.
1086 (print_operand_address): Call it.
1088 2018-08-08 Nathan Sidwell <nathan@acm.org>
1090 * diagnostic.c (diagnostic_report_current_module): Use
1091 linemap_included_from & linemap_included_from_linemap.
1093 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1095 * config/aarch64/aarch64-cores.def: Add phecda core.
1096 * config/aarch64/aarch64-tune.md: Regenerate.
1097 * doc/invoke.texi: Add phecda core.
1099 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1102 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1104 * config/s390/s390.md ("movti"): Add more alternatives for
1105 constant to GPR copies.
1107 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1109 * config/s390/s390.c: Fix whitespace damage throughout the file.
1110 * config/s390/s390.h: Likewise.
1111 * config/s390/tpf.h: Likewise.
1113 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1115 * config/s390/s390.c (s390_loadrelative_operand_p):
1116 Remove TARGET_CPU_ZARCH usages.
1117 (s390_rtx_costs): Likewise.
1118 (s390_legitimate_constant_p): Likewise.
1119 (s390_cannot_force_const_mem): Likewise.
1120 (legitimate_reload_constant_p): Likewise.
1121 (s390_preferred_reload_class): Likewise.
1122 (legitimize_pic_address): Likewise.
1123 (legitimize_tls_address): Likewise.
1124 (s390_split_branches): Removed.
1125 (s390_add_execute): Removed.
1126 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1127 (s390_mainpool_start): Likewise.
1128 (s390_mainpool_finish): Likewise.
1129 (s390_mainpool_cancel): Removed.
1130 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1131 (s390_chunkify_cancel): Likewise.
1132 (s390_return_addr_rtx): Likewise.
1133 (s390_register_info): Remove split_branches_pending_p uages.
1134 (s390_optimize_register_info): Likewise.
1135 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1136 split_branches_pending_p usages.
1137 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1138 (s390_load_got): Likewise.
1139 (s390_expand_split_stack_prologue): Likewise.
1140 (output_asm_nops): Likewise.
1141 (s390_function_profiler): Likewise.
1142 (s390_emit_call): Likewise.
1143 (s390_conditional_register_usage): Likewise.
1144 (s390_optimize_prologue): Likewise.
1145 (s390_reorg): Remove TARGET_CPU_ZARCH and
1146 split_branches_pending_p usages.
1147 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1149 (s390_output_indirect_thunk_function): Likewise.
1150 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1151 (TARGET_CPU_ZARCH_P): Removed.
1152 (struct machine_function): Remove split_branches_pending_p.
1153 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1155 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1157 * common/config/s390/s390-common.c (processor_flags_table):
1159 * config.gcc: Remove with_arch/with_tune support.
1160 * config/s390/2064.md: Remove cpu attribute comparisons.
1161 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1163 * config/s390/linux.h (ASM_SPEC):
1164 Remove -march support.
1165 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1166 Use a table to get an arch level.
1167 * config/s390/s390-opts.h (enum processor_type):
1169 * config/s390/s390.c
1170 (processor_table): Remove entries, add arch_level values.
1171 (s390_issue_rate): Remove cases.
1172 (s390_option_override): Adjust
1173 s390_option_override_internal() call.
1174 (s390_option_override_internal): Remove deprecation warning.
1175 (s390_valid_target_attribute_tree): Adjust
1176 s390_option_override_internal() call.
1177 * config/s390/s390.h (struct s390_processor):
1178 Share with s390-c.c, add arch_level field.
1179 * config/s390/s390.md:
1180 Remove occurrences in cpu attribute.
1181 * config/s390/s390.opt: Remove -march/-mtune support.
1182 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1183 * doc/invoke.texi: Remove deprecation warning.
1185 2018-08-08 Luis Machado <luis.machado@linaro.org>
1187 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1189 (qdf24xx_tunings): Set vector cost structure to
1190 qdf24xx_vector_cost.
1192 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1193 <register_sextend>: Set to 3.
1195 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1198 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1199 * config/aarch64/aarch64-simd.md
1200 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1201 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1202 (aarch64_frecpx<mode>): ...this new pattern.
1203 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1204 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1206 2018-08-07 Martin Liska <mliska@suse.cz>
1209 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1210 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1211 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1212 * doc/extend.texi: Document that malloc attribute adds
1215 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1218 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1219 Define to speculation_safe_value_not_needed.
1221 2018-08-06 Jeff Law <law@redhat.com>
1223 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1224 the vr_values instance to cprop_into_stmt.
1225 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1226 (cprop_operand): Also query EVRP to determine if OP is a constant.
1228 2018-08-06 Nathan Sidwell <nathan@acm.org>
1230 * diagnostic.c (diagnostic_report_current_module): Reroll
1231 included-at loop. Translate text.
1233 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1235 * function-tests.c (selftest::test_expansion_to_rtl): Call
1236 free_after_compilation.
1238 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1240 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1242 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1244 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1245 loops with memory block operations from getting unrolled.
1247 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1250 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1251 Define to speculation_safe_value_not_needed.
1253 2018-08-06 Jeff Law <law@redhat.com>
1255 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1258 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1261 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1262 with all enabled __intN types.
1264 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1266 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1268 * alias.c (record_set): Check for clobber high.
1269 * cfgexpand.c (expand_gimple_stmt): Likewise.
1270 * combine-stack-adj.c (single_set_for_csa): Likewise.
1271 * combine.c (find_single_use_1): Likewise.
1272 (set_nonzero_bits_and_sign_copies): Likewise.
1273 (get_combine_src_dest): Likewise.
1274 (is_parallel_of_n_reg_sets): Likewise.
1275 (try_combine): Likewise.
1276 (record_dead_and_set_regs_1): Likewise.
1277 (reg_dead_at_p_1): Likewise.
1278 (reg_dead_at_p): Likewise.
1279 * dce.c (deletable_insn_p): Likewise.
1280 (mark_nonreg_stores_1): Likewise.
1281 (mark_nonreg_stores_2): Likewise.
1282 * df-scan.c (df_find_hard_reg_defs): Likewise.
1283 (df_uses_record): Likewise.
1284 (df_get_call_refs): Likewise.
1285 * dwarf2out.c (mem_loc_descriptor): Likewise.
1286 * haifa-sched.c (haifa_classify_rtx): Likewise.
1287 * ira-build.c (create_insn_allocnos): Likewise.
1288 * ira-costs.c (scan_one_insn): Likewise.
1289 * ira.c (equiv_init_movable_p): Likewise.
1290 (rtx_moveable_p): Likewise.
1291 (interesting_dest_for_shprep): Likewise.
1292 * jump.c (mark_jump_label_1): Likewise.
1293 * postreload-gcse.c (record_opr_changes): Likewise.
1294 * postreload.c (reload_cse_simplify): Likewise.
1295 (struct reg_use): Add source expr.
1296 (reload_combine): Check for clobber high.
1297 (reload_combine_note_use): Likewise.
1298 (reload_cse_move2add): Likewise.
1299 (move2add_note_store): Likewise.
1300 * print-rtl.c (print_pattern): Likewise.
1301 * recog.c (decode_asm_operands): Likewise.
1302 (store_data_bypass_p): Likewise.
1303 (if_test_bypass_p): Likewise.
1304 * regcprop.c (kill_clobbered_value): Likewise.
1305 (kill_set_value): Likewise.
1306 * reginfo.c (reg_scan_mark_refs): Likewise.
1307 * reload1.c (maybe_fix_stack_asms): Likewise.
1308 (eliminate_regs_1): Likewise.
1309 (elimination_effects): Likewise.
1310 (mark_not_eliminable): Likewise.
1311 (scan_paradoxical_subregs): Likewise.
1312 (forget_old_reloads_1): Likewise.
1313 * reorg.c (find_end_label): Likewise.
1314 (try_merge_delay_insns): Likewise.
1315 (redundant_insn): Likewise.
1316 (own_thread_p): Likewise.
1317 (fill_simple_delay_slots): Likewise.
1318 (fill_slots_from_thread): Likewise.
1319 (dbr_schedule): Likewise.
1320 * resource.c (update_live_status): Likewise.
1321 (mark_referenced_resources): Likewise.
1322 (mark_set_resources): Likewise.
1323 * rtl.c (copy_rtx): Likewise.
1324 * rtlanal.c (reg_referenced_p): Likewise.
1325 (single_set_2): Likewise.
1326 (noop_move_p): Likewise.
1327 (note_stores): Likewise.
1328 * sched-deps.c (sched_analyze_reg): Likewise.
1329 (sched_analyze_insn): Likewise.
1331 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1333 * cse.c (invalidate_reg): New function extracted from...
1334 (invalidate): ...here.
1335 (canonicalize_insn): Check for clobber high.
1336 (invalidate_from_clobbers): invalidate clobber highs.
1337 (invalidate_from_sets_and_clobbers): Likewise.
1338 (count_reg_usage): Check for clobber high.
1339 (insn_live_p): Likewise.
1340 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1341 (cselib_invalidate_regno): Check for clobber in setter.
1342 (cselib_invalidate_rtx): Pass through setter.
1343 (cselib_invalidate_rtx_note_stores):
1344 (cselib_process_insn): Check for clobber high.
1345 * cselib.h (cselib_invalidate_rtx): Add operand.
1347 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1349 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1350 (mark_not_eliminable): Likewise.
1351 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1352 * lra-lives.c (process_bb_lives): Check for clobber high.
1353 * lra.c (new_insn_reg): Remember clobber highs.
1354 (collect_non_operand_hard_regs): Check for clobber high.
1355 (lra_set_insn_recog_data): Likewise.
1356 (add_regs_to_insn_regno_info): Likewise.
1357 (lra_update_insn_regno_info): Likewise.
1359 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1361 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1362 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1364 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1366 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1367 (copy_insn_1): Likewise.
1368 (gen_hard_reg_clobber_high): New gen function.
1369 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1370 * genemit.c (gen_exp): Likewise.
1371 (gen_emit_seq): Pass through info.
1372 (gen_insn): Check for CLOBBER_HIGH.
1373 (gen_expand): Pass through info.
1374 (gen_split): Likewise.
1375 (output_add_clobbers): Likewise.
1376 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1377 (remove_clobbers): Likewise.
1378 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1380 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1382 * doc/rtl.texi (clobber_high): Add.
1383 (parallel): Add in clobber high
1384 * rtl.c (rtl_check_failed_code3): Add function.
1385 * rtl.def (CLOBBER_HIGH): Add expression.
1386 * rtl.h (RTL_CHECKC3): Add macro.
1387 (rtl_check_failed_code3): Add declaration.
1388 (XC3EXP): Add macro.
1390 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1393 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1394 cfun->machine->max_used_stack_alignment if needed.
1396 2018-08-04 Martin Sebor <msebor@redhat.com>
1398 PR tree-optimization/86571
1399 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1402 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1405 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1408 2018-08-03 Jeff Law <law@redhat.com>
1411 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1412 Define to speculation_safe_value_not_needed.
1414 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1416 * doc/gcov.texi (-x): Remove duplicate "to".
1417 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1418 (-Wif-not-aligned): Remove duplicate "is".
1419 (-flto): Remove duplicate "the".
1420 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1421 duplicate "v5.00.b".
1422 (MSP430 Options): Remove duplicate "and" from the description
1423 of "-mgprel-sec=regexp".
1424 (x86 Options): Remove duplicate copies of "vmldLog102" and
1425 vmlsLog104 from description of "-mveclibabi=type".
1427 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1429 * internal-fn.h (first_commutative_argument): Declare.
1430 * internal-fn.c (first_commutative_argument): New function.
1431 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1432 restrictions for pattern statements. Use first_commutative_argument
1433 to look for commutative operands in calls to internal functions.
1435 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1437 * Makefile.in (wide-int-range.o): New.
1438 * tree-vrp.c: Move all the wide_int_* functions to...
1439 * wide-int-range.cc: ...here.
1440 * tree-vrp.h: Move all the wide_int_* prototypes to...
1441 * wide-int-range.h: ...here.
1443 2018-08-03 Tom de Vries <tdevries@suse.de>
1445 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1447 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1448 * except.c (output_function_exception_table): Do early exit if
1449 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1451 2018-08-03 Martin Liska <mliska@suse.cz>
1453 * predict.c (dump_prediction): Change to 2 digits
1456 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1458 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1460 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1462 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1464 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1465 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1466 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1467 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1468 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1470 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1472 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1473 pp_take_prefix when saving the existing prefix.
1474 * diagnostic.c (diagnostic_append_note): Likewise.
1475 * langhooks.c (lhd_print_error_function): Likewise.
1476 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1477 param's type. Free the existing prefix.
1478 (pp_take_prefix): New function.
1479 (pretty_printer::pretty_printer): Drop the prefix parameter.
1480 Rename the length parameter to match the comment.
1481 (pretty_printer::~pretty_printer): Free the prefix.
1482 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1484 (struct pretty_printer): Drop the "const" from "prefix" field's
1485 type and clarify memory management.
1486 (pp_set_prefix): Drop the "const" from the 2nd param.
1487 (pp_take_prefix): New decl.
1489 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1491 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1492 for word_mode_ok here instead of passing as argument.
1493 (expand_block_compare): Change select_block_compare_mode() call.
1494 (expand_strncmp_gpr_sequence): New function.
1495 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1497 2018-08-02 Jeff Law <law@redhat.com>
1500 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1501 Define to speculation_safe_value_not_needed.
1504 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1505 Define to speculation_safe_value_not_needed.
1507 2018-08-02 Tom de Vries <tdevries@suse.de>
1510 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1511 function. Return UI_TARGET unconditionally.
1512 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1513 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1515 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1517 * genemit.c (print_overload_test): Fix typo.
1519 2018-08-02 Richard Biener <rguenther@suse.de>
1521 PR tree-optimization/86816
1522 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1523 which checks for value availability before querying it.
1524 (gvn_uses_equal): Use it.
1525 (same_succ_hash): Likewise.
1526 (gimple_equal_p): Likewise.
1528 2018-08-02 Nick Clifton <nickc@redhat.com>
1531 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1532 Define to speculation_safe_value_not_needed.
1535 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1536 Define to speculation_safe_value_not_needed.
1539 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1540 Define to speculation_safe_value_not_needed.
1543 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1544 Define to speculation_safe_value_not_needed.
1547 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1548 Define to speculation_safe_value_not_needed.
1551 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1552 Define to speculation_safe_value_not_needed.
1555 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1556 Define to speculation_safe_value_not_needed.
1559 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1560 Define to speculation_safe_value_not_needed.
1563 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1564 speculation_safe_value_not_needed.
1567 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1568 to speculation_safe_value_not_needed.
1570 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1572 * doc/md.texi: Expand the documentation of instruction names
1573 to mention port-local uses. Document '@' in pattern names.
1574 * read-md.h (overloaded_instance, overloaded_name): New structs.
1576 (md_reader::handle_overloaded_name): New member function.
1577 (md_reader::get_overloads): Likewise.
1578 (md_reader::m_first_overload): New member variable.
1579 (md_reader::m_next_overload_ptr): Likewise.
1580 (md_reader::m_overloads_htab): Likewise.
1581 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1582 m_next_overload_ptr and m_overloads_htab.
1583 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1584 (get_mode_token, get_code_token, get_int_token): New functions.
1585 (map_attr_string): Add an optional argument that passes back
1586 the associated iterator.
1587 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1588 (md_reader::handle_overloaded_name, add_overload_instance): New
1590 (apply_iterators): Handle '@' names. Report an error if '@'
1591 is used without iterators.
1592 (initialize_iterators): Initialize the new iterator_group fields.
1593 * genopinit.c (handle_overloaded_code_for)
1594 (handle_overloaded_gen): New functions.
1595 (main): Use them to print declarations of maybe_code_for_* and
1596 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1597 * genemit.c (print_overload_arguments, print_overload_test)
1598 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1599 (main): Use it to print definitions of maybe_code_for_* and
1600 maybe_gen_* functions.
1601 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1602 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1603 instead of explicit mode checks.
1604 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1605 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1606 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1607 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1608 (aarch64_expand_compare_and_swap): Likewise
1609 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1610 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1611 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1612 (aarch64_constant_pool_reload_icode): Delete.
1613 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1614 instead of aarch64_constant_pool_reload_icode. Use
1615 code_for_aarch64_reload_mov instead of explicit mode checks.
1616 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1617 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1618 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1619 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1620 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1621 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1622 (aarch64_atomic_load_op_code): Delete.
1623 (aarch64_emit_atomic_load_op): Likewise.
1624 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1625 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1626 instead of aarch64_emit_atomic_load_op.
1627 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1628 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1629 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1630 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1631 character before the pattern name.
1632 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1633 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1634 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1635 (aarch64_frecps<mode>): Likewise.
1636 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1637 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1638 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1639 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1640 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1642 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1644 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1645 Allow HFmode constants if TARGET_FP_F16INST.
1647 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1650 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1651 No longer check last store for clobber of address register.
1653 2018-08-02 Martin Liska <mliska@suse.cz>
1655 PR gcov-profile/86817
1656 * gcov.c (process_all_functions): New function.
1658 (process_file): Move functions processing to
1659 process_all_functions.
1661 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1663 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1664 "const" to the "gimple *" and "rtx_insn *" parameters.
1665 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1667 (dump_location_t::dump_location_t): Likewise.
1669 2018-08-01 Martin Sebor <msebor@redhat.com>
1671 PR tree-optimization/86650
1672 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1673 rather than a "gcall *". Directly pass the data of interest
1674 to percent_K_format, rather than building a temporary CALL_EXPR
1676 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1677 (gimple_fold_builtin_strncat): Adjust.
1678 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1679 gcall* argument with gimple*.
1680 * gimple-ssa-warn-restrict.c (check_call): Same.
1681 (wrestrict_dom_walker::before_dom_children): Same.
1682 (builtin_access::builtin_access): Same.
1683 (check_bounds_or_overlap): Same
1684 (maybe_diag_overlap): Same.
1685 (maybe_diag_offset_bounds): Same.
1686 * tree-diagnostic.c (default_tree_printer): Move usage of
1687 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1689 * tree-pretty-print.c (percent_K_format): Add argument.
1690 * tree-pretty-print.h: Add argument.
1691 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1692 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1693 (maybe_diag_stxncpy_trunc): Same.
1694 (handle_builtin_stxncpy): Same.
1695 (handle_builtin_strcat): Same.
1697 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1699 * match.pd: Optimise pointer range checks.
1701 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1703 PR tree-optimization/86758
1704 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1705 to remove pattern statements.
1707 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1709 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1710 result of dfs_enumerate_from when constructing stmt_vec_infos,
1711 instead of additionally calling get_loop_body.
1713 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1715 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1717 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1718 When creating an iv, assert that the step is not known to be zero.
1719 (vect_setup_realignment): Update call accordingly.
1720 * tree-vect-stmts.c (vectorizable_store): Likewise.
1721 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
1723 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1725 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1726 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1727 (vectorizable_reduction): Likewise.
1728 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1729 (vect_detect_hybrid_slp_stmts): Likewise.
1730 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1732 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
1734 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1735 (wide_int_set_zero_nonzero_bits): ...this.
1736 (zero_nonzero_bits_from_vr): Rename to...
1737 (vrp_set_zero_nonzero_bits): ...this.
1738 (extract_range_from_multiplicative_op_1): Abstract wide int
1740 (wide_int_range_multiplicative_op): ...here.
1741 (extract_range_from_binary_expr_1): Extract wide int binary
1742 operations into their own functions.
1743 (wide_int_range_lshift): New.
1744 (wide_int_range_can_optimize_bit_op): New.
1745 (wide_int_range_shift_undefined_p): New.
1746 (wide_int_range_bit_xor): New.
1747 (wide_int_range_bit_ior): New.
1748 (wide_int_range_bit_and): New.
1749 (wide_int_range_trunc_mod): New.
1750 (extract_range_into_wide_ints): New.
1751 (vrp_shift_undefined_p): New.
1752 (extract_range_from_multiplicative_op): New.
1753 (vrp_can_optimize_bit_op): New.
1754 * tree-vrp.h (value_range::dump): New.
1755 (wide_int_range_multiplicative_op): New.
1756 (wide_int_range_lshift):New.
1757 (wide_int_range_shift_undefined_p): New.
1758 (wide_int_range_bit_xor): New.
1759 (wide_int_range_bit_ior): New.
1760 (wide_int_range_bit_and): New.
1761 (wide_int_range_trunc_mod): New.
1762 (zero_nonzero_bits_from_bounds): Rename to...
1763 (wide_int_set_zero_nonzero_bits): ...this.
1764 (zero_nonzero_bits_from_vr): Rename to...
1765 (vrp_set_zero_nonzero_bits): ...this.
1766 (range_easy_mask_min_max): Rename to...
1767 (wide_int_range_can_optimize_bit_op): this.
1768 * vr-values.c (simplify_bit_ops_using_ranges): Rename
1769 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1771 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1773 * tree-vectorizer.h (vect_orig_stmt): New function.
1774 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1775 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1776 (vect_create_epilog_for_reduction): Likewise.
1777 (vectorizable_live_operation): Likewise.
1778 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1779 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1780 * tree-vect-stmts.c (vectorizable_call): Likewise.
1781 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1783 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1785 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1787 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1788 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1789 (vect_transform_loop): Likewise.
1790 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1792 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1794 * tree-vectorizer.h (vect_schedule_slp): Return void.
1795 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1796 (vect_schedule_slp): Likewise.
1798 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1800 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1802 (vect_transform_loop): Update calls accordingly. Schedule SLP
1803 instances before the main loop, if any exist.
1805 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1807 PR tree-optimization/86749
1808 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1809 If the lhs is used in a COND_EXPR, check that it is being used
1810 as the "then" or "else" value.
1812 2018-08-01 Tom de Vries <tdevries@suse.de>
1815 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1816 speculation_safe_value_not_needed.
1818 2018-08-01 Richard Biener <rguenther@suse.de>
1820 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1823 2018-08-01 Martin Liska <mliska@suse.cz>
1825 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1826 format how successful transformation is dumped.
1827 (gimple_mod_pow2_value_transform): Likewise.
1828 (gimple_mod_subtract_transform): Likewise.
1829 (gimple_stringops_transform): Likewise.
1831 2018-08-01 Martin Liska <mliska@suse.cz>
1834 * value-prof.c (interesting_stringop_to_profile_p):
1835 Simplify the code and add BUILT_IN_MEMMOVE.
1836 (gimple_stringops_transform): Likewise.
1838 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
1840 * config/aarch64/aarch64-simd.md
1841 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1842 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1843 use GPI iterator instead of SI mode.
1845 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1847 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1848 rs6000_speculation_barrier.
1849 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1850 new barrier pattern name.
1852 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1854 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1855 (speculation_barrier): New insn.
1857 2018-08-01 Richard Biener <rguenther@suse.de>
1860 * graphite.h: Include isl/id.h and isl/space.h to allow build
1863 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
1866 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1867 mode for COFF targets.
1868 * defaults.h (TARGET_COFF): Define.
1869 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1870 TARGET_COFF): Define.
1871 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1872 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1873 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1875 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1877 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1878 * gimple-streamer-out.c (output_bb): Save it.
1879 * lto-streamer-in.c (input_struct_function_base): Restore
1880 instance discriminator if available. Create map on demand.
1881 * lto-streamer-out.c (output_struct_function_base): Save it if
1883 * final.c (decl_to_instance_map): Document LTO strategy.
1885 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1886 Olivier Hainque <hainque@adacore.com>
1888 * debug.h (decl_to_instance_map_t): New type.
1889 (decl_to_instance_map): Declare.
1890 (maybe_create_decl_to_instance_map): New inline function.
1891 * final.c (bb_discriminator, last_bb_discriminator): New statics,
1892 to track basic block discriminators.
1893 (final_start_function_1): Initialize them.
1894 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1896 (decl_to_instance_map): New variable.
1897 (map_decl_to_instance, maybe_set_discriminator): New functions.
1898 (notice_source_line): Set discriminator.
1900 2018-07-31 Ian Lance Taylor <iant@golang.org>
1902 * targhooks.c (default_have_speculation_safe_value): Add
1905 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1907 * dump-context.h: Include "pretty-print.h".
1908 (dump_context::refresh_dumps_are_enabled): New decl.
1909 (dump_context::emit_item): New decl.
1910 (class dump_context): Add fields "m_test_pp" and
1912 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1913 (temp_dump_context::get_dumped_text): New decl.
1914 (class temp_dump_context): Add field "m_pp".
1915 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1916 (dump_context::refresh_dumps_are_enabled): ...and add a test for
1918 (set_dump_file): Update for above change.
1919 (set_alt_dump_file): Likewise.
1920 (dump_loc): New overload, taking a pretty_printer *.
1921 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
1922 to any test pretty-printer.
1923 (make_item_for_dump_gimple_stmt): New function, adapted from
1924 optinfo::add_gimple_stmt.
1925 (dump_context::dump_gimple_stmt): Call it, and use the result,
1926 eliminating the direct usage of dump_file and alt_dump_file in
1927 favor of indirectly using them via emit_item.
1928 (make_item_for_dump_gimple_expr): New function, adapted from
1929 optinfo::add_gimple_expr.
1930 (dump_context::dump_gimple_expr): Call it, and use the result,
1931 eliminating the direct usage of dump_file and alt_dump_file in
1932 favor of indirectly using them via emit_item.
1933 (make_item_for_dump_generic_expr): New function, adapted from
1935 (dump_context::dump_generic_expr): Call it, and use the result,
1936 eliminating the direct usage of dump_file and alt_dump_file in
1937 favor of indirectly using them via emit_item.
1938 (make_item_for_dump_printf_va): New function, adapted from
1939 optinfo::add_printf_va.
1940 (make_item_for_dump_printf): New function.
1941 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1942 and use the result, eliminating the direct usage of dump_file and
1943 alt_dump_file in favor of indirectly using them via emit_item.
1944 (make_item_for_dump_dec): New function.
1945 (dump_context::dump_dec): Call it, and use the result,
1946 eliminating the direct usage of dump_file and alt_dump_file in
1947 favor of indirectly using them via emit_item.
1948 (make_item_for_dump_symtab_node): New function, adapted from
1949 optinfo::add_symtab_node.
1950 (dump_context::dump_symtab_node): Call it, and use the result,
1951 eliminating the direct usage of dump_file and alt_dump_file in
1952 favor of indirectly using them via emit_item.
1953 (dump_context::begin_scope): Reimplement, avoiding direct usage
1954 of dump_file and alt_dump_file in favor of indirectly using them
1956 (dump_context::emit_item): New member function.
1957 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1958 Set up test pretty-printer on the underlying context. Call
1959 refresh_dumps_are_enabled.
1960 (temp_dump_context::~temp_dump_context): Call
1961 refresh_dumps_are_enabled.
1962 (temp_dump_context::get_dumped_text): New member function.
1963 (selftest::verify_dumped_text): New function.
1964 (ASSERT_DUMPED_TEXT_EQ): New macro.
1965 (selftest::test_capture_of_dump_calls): Run all tests twice, with
1966 and then without optinfo enabled. Add uses of
1967 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
1968 * dumpfile.h: Update comment for the dump_* API.
1969 * optinfo-emit-json.cc
1970 (selftest::test_building_json_from_dump_calls): Update for new
1971 param for temp_dump_context ctor.
1972 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1973 and "m_owned" field.
1974 (optinfo_item::~optinfo_item): Likewise.
1975 (optinfo::add_item): New member function.
1976 (optinfo::emit): Update comment.
1977 (optinfo::add_string): Delete.
1978 (optinfo::add_printf): Delete.
1979 (optinfo::add_printf_va): Delete.
1980 (optinfo::add_gimple_stmt): Delete.
1981 (optinfo::add_gimple_expr): Delete.
1982 (optinfo::add_tree): Delete.
1983 (optinfo::add_symtab_node): Delete.
1984 (optinfo::add_dec): Delete.
1985 * optinfo.h (class dump_context): New forward decl.
1986 (optinfo::add_item): New decl.
1987 (optinfo::add_string): Delete.
1988 (optinfo::add_printf): Delete.
1989 (optinfo::add_printf_va): Delete.
1990 (optinfo::add_gimple_stmt): Delete.
1991 (optinfo::add_gimple_expr): Delete.
1992 (optinfo::add_tree): Delete.
1993 (optinfo::add_symtab_node): Delete.
1994 (optinfo::add_dec): Delete.
1995 (optinfo::add_poly_int): Delete.
1996 (optinfo_item::optinfo_item): Remove "owned" param.
1997 (class optinfo_item): Remove field "m_owned".
1999 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2002 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
2003 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
2004 requested variable alignment.
2005 (expand_one_ssa_partition): Likewise.
2006 (expand_one_var): Likewise.
2008 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2010 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2011 to speculation_safe_value_not_needed.
2013 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2015 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2016 * targhooks.c (speculation_safe_value_not_needed): New function.
2017 * target.def (have_speculation_safe_value): Update documentation.
2018 * doc/tm.texi: Regenerated.
2020 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2022 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2023 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2025 (despeculate_copy<ALLI:mode>_insn): New insn.
2026 (despeculate_copyti_insn): New insn.
2027 (despeculate_simple<ALLI:mode>): New insn
2028 (despeculate_simpleti): New insn.
2029 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2031 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2032 aarch64_speculation_safe_value.
2033 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2035 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2037 * config/aarch64/aarch64-speculation.cc: New file.
2038 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2039 before pass_reorder_blocks.
2040 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2042 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2043 X14 and X15 when tracking speculation.
2044 * config/aarch64/aarch64.md (register name constants): Add
2045 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2046 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2047 (speculation_barrier): New insn attribute.
2048 (cmp<mode>): Allow SP in comparisons.
2049 (speculation_tracker): New insn.
2050 (speculation_barrier): Add speculation_barrier attribute.
2051 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2052 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2053 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2055 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2057 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2058 aarch64_track_speculation is true.
2059 (tb<optab><mode>1): Likewise.
2060 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2061 generate CB[N]Z when tracking speculation.
2062 (aarch64_split_compare_and_swap): Likewise.
2063 (aarch64_split_atomic_op): Likewise.
2065 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2067 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2069 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2071 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2072 (speculation_barrier): New insn.
2074 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2076 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2077 * config/arm/arm.md (speculation_barrier): New expand.
2078 (speculation_barrier_insn): New pattern.
2080 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2082 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2083 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2084 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2085 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2087 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2088 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2089 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2090 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2091 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2092 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2093 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2094 * builtins.c (expand_speculation_safe_value): New function.
2095 (expand_builtin): Call it.
2096 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2097 * doc/extend.texi: Document __builtin_speculation_safe_value.
2098 * doc/md.texi: Document "speculation_barrier" pattern.
2099 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2100 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2101 * doc/tm.texi: Regenerated.
2102 * target.def (have_speculation_safe_value, speculation_safe_value): New
2104 * targhooks.c (default_have_speculation_safe_value): New function.
2105 (default_speculation_safe_value): New function.
2106 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2107 (default_speculation_safe_value): Add prototype.
2109 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2111 * dump-context.h (dump_context::dump_loc): New decl.
2112 * dumpfile.c (dump_context::dump_loc): New member function.
2113 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2114 and dump_gimple_stmt.
2115 (dump_context::dump_gimple_expr_loc): Likewise, using
2117 (dump_context::dump_generic_expr_loc): Likewise, using
2119 (dump_context::dump_printf_loc_va): Likewise, using
2121 (dump_context::begin_scope): Explicitly using the global function
2122 "dump_loc", rather than the member function.
2124 2018-07-31 Martin Sebor <msebor@redhat.com>
2126 PR tree-optimization/86741
2127 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2129 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2131 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2132 depend on whether prefetch instructions will be emitted or not.
2133 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2134 will be emitted or not.
2135 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2136 (TARGET_SETMEM_PFD): New macros.
2138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2140 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2141 (NULL_STMT_VEC_INFO): Delete.
2142 (stmt_vec_info::operator*): Likewise.
2143 (stmt_vec_info::operator gimple *): Likewise.
2144 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2145 of NULL_STMT_VEC_INFO.
2146 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2147 (vect_reassociating_reduction_p): Likewise.
2148 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2149 (vectorizable_store): Likewise.
2150 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2151 (vec_info::free_stmt_vec_infos): Likewise.
2153 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2155 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2156 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2158 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2160 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2161 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2162 (vec_info::free_stmt_vec_info): New private member functions.
2163 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2164 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2165 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2166 set_stmt_vec_info_vec and free_stmt_vec_infos.
2167 * tree-vect-loop.c (_loop_vec_info): Remove call to
2168 set_stmt_vec_info_vec.
2169 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2170 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2171 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2172 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2173 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2174 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2175 with the clearing in the xcalloc.
2176 (stmt_vec_info_vec): Delete.
2177 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2178 (vectorize_loops): Likewise.
2179 (vec_info::~vec_info): Remove argument from call to
2180 free_stmt_vec_infos.
2181 (vec_info::add_stmt): Remove vinfo argument from call to
2184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2186 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2187 rather than a gimple stmt.
2188 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2189 information for pattern statements when passed the original
2190 statement; instead wait to be passed the pattern statement itself.
2191 Don't call set_vinfo_for_stmt here.
2192 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2193 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2194 stmt_vec_infos here.
2195 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2196 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2197 stmt_vec_infos entry.
2199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2201 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2202 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2203 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2204 * tree-vect-stmts.c (vectorizable_call): Likewise.
2205 (vectorizable_simd_clone_call): Likewise.
2207 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2209 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2210 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2211 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2212 * tree-vect-loop.c (vect_transform_loop): Likewise.
2213 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2214 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2216 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2218 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2219 (vect_dr_stmt): Delete.
2220 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2221 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2223 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2224 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2225 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2226 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2227 (vect_analyze_data_refs): Likewise.
2228 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2230 (vect_find_same_alignment_drs): Likewise.
2231 (vect_slp_analyze_node_dependences): Update calls accordingly.
2232 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2233 instead of DR_VECT_AUX.
2234 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2235 of a vector data references. Use vec_info::lookup_dr instead of
2237 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2238 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2239 instead of DR_VECT_AUX.
2241 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2243 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2245 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2247 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2248 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2249 (vect_gen_prolog_loop_niters): Likewise.
2251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2253 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2254 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2255 (vect_known_alignment_in_bytes, vect_dr_behavior)
2256 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2257 instead of data_references. Update calls to other routines for
2258 which the same change has been made.
2259 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2260 dr_vec_infos instead of stmt_vec_infos.
2261 (vect_analyze_data_ref_dependence): Update call accordingly.
2262 (vect_slp_analyze_data_ref_dependence)
2263 (vect_record_base_alignments): Use DR_VECT_AUX.
2264 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2265 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2266 (vector_alignment_reachable_p, vect_get_data_access_cost)
2267 (vect_peeling_supportable, vect_analyze_group_access_1)
2268 (vect_analyze_group_access, vect_analyze_data_ref_access)
2269 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2270 (vect_compile_time_alias, vect_small_gap_p)
2271 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2272 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2273 instead of data_references. Update calls to other routines for
2274 which the same change has been made.
2275 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2276 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2277 (vect_slp_analyze_and_verify_node_alignment)
2278 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2279 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2280 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2282 (_vect_peel_info::dr): Replace with...
2283 (_vect_peel_info::dr_info): ...this new field.
2284 (vect_peeling_hash_get_most_frequent)
2285 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2286 (vect_peeling_hash_get_lowest_cost):
2287 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2288 routines for which the same change has been made.
2289 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2291 * tree-vect-loop-manip.c (get_misalign_in_elems)
2292 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2294 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2295 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2296 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2297 (get_group_load_store_type, get_negative_load_store_type)
2298 (vect_get_data_ptr_increment, vectorizable_store)
2299 (vectorizable_load): Likewise.
2300 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2301 Update calls to other routines for which the same change has been made.
2303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2305 * tree-vectorizer.h (vec_info::move_dr): New member function.
2306 (dataref_aux): Rename to...
2307 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2308 (_stmt_vec_info::dr_aux): Update accordingly.
2309 (_stmt_vec_info::data_ref_info): Delete.
2310 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2311 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2312 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2313 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2315 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2316 (STMT_VINFO_DR_INFO): New macro.
2317 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2318 (set_dr_misalignment): Update after rename of dataref_aux.
2319 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2320 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2321 initialization of STMT_VINFO_DATA_REF.
2322 * tree-vectorizer.c (vec_info::move_dr): New function.
2323 * tree-vect-patterns.c (vect_recog_bool_pattern)
2324 (vect_recog_mask_conversion_pattern)
2325 (vect_recog_gather_scatter_pattern): Use it.
2326 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2327 the "dr" and "stmt" fields of dr_vec_info instead of
2328 STMT_VINFO_DATA_REF.
2330 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2332 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2333 (is_pattern_stmt_p): Use it.
2334 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2335 on pattern statements.
2337 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2339 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2340 original stmt as a stmt_vec_info rather than a gimple stmt.
2341 (vect_pattern_recog_1): Take the statement directly as a
2342 stmt_vec_info, rather than via a gimple_stmt_iterator.
2343 Update call to vect_mark_pattern_stmts.
2344 (vect_pattern_recog): Update calls accordingly.
2346 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2348 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2349 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2350 a vect_def_type for the first argument.
2351 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2352 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2353 operand if it isn't defined by a vectorized statement.
2354 (vect_build_gather_load_calls): Remove the mask_dt argument and
2355 update calls to vect_get_vec_def_for_stmt_copy.
2356 (vectorizable_bswap): Likewise the dt argument.
2357 (vectorizable_call): Update calls to vectorizable_bswap and
2358 vect_get_vec_def_for_stmt_copy.
2359 (vectorizable_simd_clone_call, vectorizable_assignment)
2360 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2361 (vectorizable_comparison): Update calls to
2362 vect_get_vec_def_for_stmt_copy.
2363 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2365 (vect_get_loop_based_defs): Remove dt argument and update call
2366 to vect_get_vec_def_for_stmt_copy.
2367 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2368 and vect_get_vec_def_for_stmt_copy.
2369 (vectorizable_load): Update calls to vect_build_gather_load_calls
2370 and vect_get_vec_def_for_stmt_copy.
2371 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2372 (vectorizable_reduction, vectorizable_live_operation): Update calls
2373 to vect_get_vec_def_for_stmt_copy.
2375 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2377 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2378 and gimple stmt arguments with a stmt_vec_info.
2379 (vect_record_base_alignments): Update calls accordingly.
2380 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2381 and gimple stmt arguments with a stmt_vec_info.
2382 (vect_build_slp_tree_1): Remove vinfo argument and update call
2383 to vect_record_max_nunits.
2384 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2385 and vect_record_max_nunits.
2387 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2389 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2390 file and take a stmt_vec_info instead of a gimple stmt.
2391 (supportable_widening_operation, vect_finish_replace_stmt)
2392 (vect_finish_stmt_generation, vect_get_store_rhs)
2393 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2394 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2395 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2396 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2397 (vect_create_data_ref_ptr, bump_vector_ptr)
2398 (vect_permute_store_chain, vect_setup_realignment)
2399 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2400 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2401 (vectorizable_reduction, vectorizable_induction)
2402 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2403 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2404 than gimple stmts as arguments.
2405 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2406 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2407 (can_group_stmts_p, vect_check_gather_scatter)
2408 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2409 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2410 (vect_permute_load_chain, vect_shift_permute_load_chain)
2411 (vect_transform_grouped_load)
2412 (vect_record_grouped_load_vectors): Likewise.
2413 * tree-vect-loop.c (vect_fixup_reduc_chain)
2414 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2415 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2416 (vectorizable_reduction, vectorizable_induction)
2417 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2418 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2419 (vect_get_load_store_mask): Likewise.
2420 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2421 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2422 * tree-vect-stmts.c (vect_mark_relevant)
2423 (is_simple_and_all_uses_invariant)
2424 (exist_non_indexing_operands_for_use_p, process_use)
2425 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2426 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2427 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2428 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2429 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2430 (get_negative_load_store_type, get_load_store_type)
2431 (vect_check_load_store_mask, vect_check_store_rhs)
2432 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2433 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2434 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2435 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2436 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2437 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2438 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2439 (supportable_widening_operation): Likewise.
2441 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2443 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2444 a stmt_vec_info instead of a gcall.
2445 (vect_check_gather_scatter): Update call accordingly.
2446 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2448 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2449 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2450 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2451 instead of a gimple stmt.
2452 (vect_transform_loop): Update calls accordingly.
2453 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2454 stmt_vec_infos instead of gimple stmts.
2455 (vect_analyze_slp_instance): Update use accordingly.
2456 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2457 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2458 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2459 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2460 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2461 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2462 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2463 down to subroutines.
2465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2467 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2468 of the worklist from a vector of gimple stmts to a vector of
2470 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2471 (vect_mark_stmts_to_be_vectorized): Likewise
2473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2475 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2476 statement before passing it to vect_analyze_stmt.
2477 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2478 the chain of phi vector definitions. Track the exit phi via its
2480 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2481 STMT_VINFO_REDUC_DEF.
2482 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2483 stmt_vec_infos to handle the statement chains.
2484 (vect_get_slp_defs): Record the first statement in the node
2485 using a stmt_vec_info.
2486 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2487 statements here and pass their stmt_vec_info down to subroutines.
2488 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2489 down to vect_finish_stmt_generation.
2490 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2491 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2492 stmt_vec_infos to subroutines.
2493 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2496 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2498 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2499 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2500 (vect_permute_store_chain, vect_setup_realignment)
2501 (vect_permute_load_chain, vect_shift_permute_load_chain)
2502 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2503 stmts internally, and when passing values to other vectorizer routines.
2504 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2505 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2506 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2507 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2508 (vectorizable_reduction, vectorizable_induction)
2509 (vectorizable_live_operation, vect_transform_loop_stmt)
2510 (vect_transform_loop): Likewise.
2511 * tree-vect-patterns.c (vect_reassociating_reduction_p)
2512 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2513 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2514 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2515 (vect_slp_analyze_node_operations_1): Likewise.
2516 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2517 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2518 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2519 (vect_finish_stmt_generation_1, get_group_load_store_type)
2520 (get_load_store_type, vect_build_gather_load_calls)
2521 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2522 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2523 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2524 (vectorizable_store, vectorizable_load, vectorizable_condition)
2525 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2526 (supportable_widening_operation): Likewise.
2527 (vect_get_vector_types_for_stmt): Likewise.
2528 * tree-vectorizer.h (vect_dr_behavior): Likewise.
2530 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2532 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2533 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2534 (vect_permute_store_chain, vect_permute_load_chain)
2535 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2536 repeated stmt_vec_info lookups.
2537 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2538 (vect_update_ivs_after_vectorizer): Likewise.
2539 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2540 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2541 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2542 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2543 (vect_bb_slp_scalar_cost): Likewise.
2544 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2546 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2548 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2549 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2550 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2551 to get gassigns and gcalls, rather than operating on generc gimple
2553 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2554 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2555 (vectorizable_load, vect_analyze_stmt): Likewise.
2556 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2558 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2560 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2561 return stmt_vec_infos rather than gimple stmts. Do not accept
2563 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2565 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2566 Update use of get_later_stmt.
2567 (vect_get_constant_vectors): Update call accordingly.
2568 (vect_schedule_slp_instance): Likewise
2569 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2570 (vect_slp_analyze_instance_dependence): Likewise.
2571 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2573 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2575 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2576 (stmt_info_for_cost::stmt_info): ...this new field.
2577 (add_stmt_costs): Update accordingly.
2578 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2579 (vect_get_known_peeling_cost): Likewise.
2580 (vect_estimate_min_profitable_iters): Likewise.
2581 * tree-vect-stmts.c (record_stmt_cost): Likewise.
2583 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2585 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2586 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2587 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2589 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2591 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2593 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2594 a gimple stmt to a stmt_vec_info.
2595 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2597 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2599 * tree-vectorizer.h (vec_info::grouped_stores): Change from
2600 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2601 (_loop_vec_info::reduction_chains): Likewise.
2602 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2604 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2606 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2608 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2609 a gimple stmt to a stmt_vec_info.
2610 (_stmt_vec_info::next_element): Likewise.
2611 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2612 (vect_slp_analyze_and_verify_node_alignment)
2613 (vect_analyze_group_access_1, vect_analyze_group_access)
2614 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2615 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2616 (vect_supportable_dr_alignment): Update accordingly.
2617 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2618 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2619 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2620 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2621 * tree-vect-slp.c (vect_build_slp_tree_1)
2622 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2623 (vect_split_slp_store_group, vect_analyze_slp_instance)
2624 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2625 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2626 (get_group_load_store_type, get_load_store_type)
2627 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2628 (vect_transform_stmt, vect_remove_stores): Likewise.
2630 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2632 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2634 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2635 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2636 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2637 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2638 (vector_alignment_reachable_p, vect_get_data_access_cost)
2639 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2640 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2641 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2642 (vect_analyze_group_access_1, vect_analyze_group_access)
2643 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2644 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2645 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2646 result of vect_dr_stmt and use the stmt_vec_info instead of
2647 the associated gimple stmt.
2648 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2649 (vect_gen_prolog_loop_niters): Likewise.
2650 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2654 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2655 to a vec<stmt_vec_info>.
2656 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2657 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2659 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2660 to a vec<stmt_vec_info>.
2661 (bst_traits::value_type, bst_traits::value_type): Likewise.
2662 (bst_traits::hash): Update accordingly.
2663 (vect_get_and_check_slp_defs): Change the stmts parameter from
2664 a vec<gimple *> to a vec<stmt_vec_info>.
2665 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2666 (vect_build_slp_tree): Likewise.
2667 (vect_build_slp_tree_2): Likewise. Update uses of
2668 SLP_TREE_SCALAR_STMTS.
2669 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2670 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2671 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2672 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2673 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2674 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2675 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2676 (vect_get_constant_vectors, vect_get_slp_defs)
2677 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2678 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2679 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2680 instead of gimple stmts.
2681 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2682 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2683 (vect_slp_analyze_instance_dependence): Update uses of
2684 SLP_TREE_SCALAR_STMTS.
2685 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2686 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2687 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2688 (get_initial_defs_for_reduction): Likewise.
2689 (vect_create_epilog_for_reduction): Likewise.
2690 (vectorize_fold_left_reduction): Likewise.
2691 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2692 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2693 (can_vectorize_live_stmts): Likewise.
2695 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2697 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2698 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2699 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2701 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2703 (gather_scalar_reductions): Update after above interface changes.
2704 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2705 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2707 (vect_force_simple_reduction): Likewise.
2708 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2709 LOOP_VINFO_REDUCTIONS.
2710 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2714 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2715 a gimple stmt to a stmt_vec_info.
2716 * tree-vect-loop.c (vect_active_double_reduction_p)
2717 (vect_force_simple_reduction, vectorizable_reduction): Update
2720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2722 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2723 vec<gimple *> to a vec<stmt_vec_info>.
2724 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2725 the reduction_phis argument from a vec<gimple *> to a
2727 (vectorizable_reduction): Likewise the phis local variable that
2728 is passed to vect_create_epilog_for_reduction. Update for new type
2729 of SLP_TREE_VEC_STMTS.
2730 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2731 (vectorizable_live_operation): Likewise.
2732 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2733 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2735 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2737 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2738 a gimple stmt to a stmt_vec_info.
2739 (vectorizable_condition, vectorizable_live_operation)
2740 (vectorizable_reduction, vectorizable_induction): Pass back the
2741 vectorized statement as a stmt_vec_info.
2742 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2743 use of STMT_VINFO_VEC_STMT.
2744 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2745 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2746 as stmt_vec_infos rather than gimple stmts.
2747 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2749 (vectorizable_live_operation): Likewise.
2750 (vectorizable_reduction, vectorizable_induction): Likewise,
2751 updating use of STMT_VINFO_VEC_STMT.
2752 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2753 of STMT_VINFO_VEC_STMT.
2754 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2755 (vectorizable_simd_clone_call, vectorizable_conversion)
2756 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2757 (vectorizable_store, vectorizable_load, vectorizable_condition)
2758 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2759 from a gimple stmt to a stmt_vec_info.
2760 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
2761 pointer to a stmt_vec_info to the vectorizable_* routines.
2763 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2765 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2766 a gimple stmt to a stmt_vec_info.
2767 (is_pattern_stmt_p): Update accordingly.
2768 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2769 (vect_record_grouped_load_vectors): Likewise.
2770 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2771 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2772 (vect_model_reduction_cost): Likewise.
2773 (vect_create_epilog_for_reduction): Likewise.
2774 (vectorizable_reduction, vectorizable_induction): Likewise.
2775 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2776 Return the stmt_vec_info for the pattern statement.
2777 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2778 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2779 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2780 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2781 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2782 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2783 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2784 (free_stmt_vec_info, vect_is_simple_use): Likewise.
2786 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2788 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2789 (vect_finish_stmt_generation): Likewise.
2790 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2791 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2792 (vect_build_gather_load_calls): Use the return value of the above
2793 functions instead of a separate call to vinfo_for_stmt. Use narrow
2794 scopes for the input gimple stmt and wider scopes for the associated
2795 stmt_vec_info. Use vec_info::lookup_def when setting these
2796 stmt_vec_infos from an SSA_NAME definition.
2797 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2798 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2799 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2800 (vectorizable_store, vectorizable_load, vectorizable_condition)
2801 (vectorizable_comparison): Likewise.
2802 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2803 (vectorizable_reduction): Likewise.
2805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2807 * tree-vectorizer.h (vect_is_simple_use): Add an optional
2808 stmt_vec_info * parameter before the optional gimple **.
2809 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2810 (process_use, vect_get_vec_def_for_operand_1): Update callers.
2811 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2812 * tree-vect-loop.c (vectorizable_reduction): Likewise.
2813 (vectorizable_live_operation): Likewise.
2814 * tree-vect-patterns.c (type_conversion_p): Likewise.
2815 (vect_look_through_possible_promotion): Likewise.
2816 (vect_recog_rotate_pattern): Likewise.
2817 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2819 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2821 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2822 a typedef to a wrapper class.
2823 (NULL_STMT_VEC_INFO): New macro.
2824 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2825 (stmt_vec_info::operator*): New function.
2826 (stmt_vec_info::operator gimple *): Likewise.
2827 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2828 (add_stmt_costs): Likewise.
2829 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2830 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2831 (vect_get_known_peeling_cost): Likewise.
2832 (vect_estimate_min_profitable_iters): Likewise.
2833 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2834 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2835 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2836 (vectorizable_store, free_stmt_vec_infos): Likewise.
2837 (new_stmt_vec_info): Change return type of xcalloc to
2840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2842 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2843 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2844 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2845 a single_imm_use-based sequence.
2846 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2848 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2850 * tree-vectorizer.h (vec_info::lookup_def): Declare.
2851 * tree-vectorizer.c (vec_info::lookup_def): New function.
2852 * tree-vect-patterns.c (vect_get_internal_def): Use it.
2853 (vect_widened_op_tree): Likewise.
2854 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2855 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2856 (vectorizable_reduction): Likewise.
2857 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2859 (vect_is_slp_reduction): Update calls accordingly. Use
2860 vec_info::lookup_def.
2861 (vect_is_simple_reduction): Likewise
2862 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2864 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2866 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2867 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2868 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2870 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2871 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2872 (vect_update_vf_for_slp, vect_analyze_loop_operations)
2873 (vect_is_slp_reduction, vectorizable_induction)
2874 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2875 * tree-vect-patterns.c (vect_init_pattern_stmt):
2876 (vect_determine_min_output_precision_1, vect_determine_precisions)
2877 (vect_pattern_recog): Likewise.
2878 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2879 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2880 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2881 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2882 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2883 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
2884 info field from a loop to a loop_vec_info.
2886 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2888 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2889 (vec_info::add_stmt): Declare.
2890 * tree-vectorizer.c (vec_info::add_stmt): New function.
2891 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2892 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2893 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2894 (vectorizable_induction): Likewise.
2895 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2896 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2897 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2898 (vectorizable_load): Likewise.
2899 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2900 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2901 (vect_recog_gather_scatter_pattern): Likewise.
2902 (append_pattern_def_seq): Likewise. Remove a check that is
2903 performed by add_stmt itself.
2905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2907 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2908 which make_ssa_name was called with new_stmt before new_stmt
2911 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2913 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2915 (vect_is_slp_reduction): ...here...
2916 (vect_is_simple_reduction): ...and here. Remove repetition of tests
2917 that are already known to be false.
2919 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2921 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2922 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
2923 STMT_VINFO_NUM_SLP_USES when it's true.
2924 (vect_free_slp_instance): Add a final_p parameter and pass it to
2926 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2927 (vect_analyze_slp_instance): Likewise.
2928 (vect_slp_analyze_operations): Likewise.
2929 (vect_slp_analyze_bb_1): Likewise.
2930 * tree-vectorizer.c (vec_info): Likewise.
2931 * tree-vect-loop.c (vect_transform_loop): Likewise.
2933 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2935 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2936 function is not called for second and subsequent members of
2939 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2941 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2942 cases for nested loops from here to ...
2943 (vect_create_epilog_for_reduction): ...here. Only call
2944 vect_is_simple_use for inner-loop reductions.
2946 2018-07-31 Martin Liska <mliska@suse.cz>
2948 PR gcov-profile/85338
2949 PR gcov-profile/85350
2950 PR gcov-profile/85372
2951 * profile.c (struct location_triplet): New.
2952 (struct location_triplet_hash): Likewise.
2953 (output_location): Do not output a BB that
2954 is already recorded for a line.
2955 (branch_prob): Use streamed_locations.
2957 2018-07-31 Martin Liska <mliska@suse.cz>
2959 PR gcov-profile/85370
2960 * coverage.c (coverage_begin_function): Do not mark target
2961 clones as artificial functions.
2963 2018-07-31 Martin Liska <mliska@suse.cz>
2965 PR gcov-profile/83813
2966 PR gcov-profile/84758
2967 PR gcov-profile/85217
2968 PR gcov-profile/85332
2969 * profile.c (branch_prob): Do not record GOTO expressions
2970 for GIMPLE statements which locations are already streamed.
2972 2018-07-31 Olivier Hainque <hainque@adacore.com>
2974 * gcc.c (handle_spec_function): Accept a soft_matched_part
2975 argument, as do_spec_1. Pass it down to ...
2976 (eval_spec_function): Accept a soft_matched_part argument,
2977 and pass it down to ...
2978 (do_spec_2): Accept a soft_matched_part argument, and pass
2979 it down to do_spec_1.
2980 (do_spec_1): Pass soft_matched_part to handle_spec_function.
2981 (handle_braces): Update call to handle_spec_function.
2982 (driver::set_up_specs): Update calls to do_spec_2.
2983 (compare_debug_dump_opt_spec_function): Likewise.
2984 (compare_debug_self_opt_spec_function): Likewise.
2986 2018-07-31 Olivier Hainque <hainque@adacore.com>
2988 * common.opt (nolibc): New option.
2989 * doc/invoke.texi (Link Options): Document it.
2990 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2991 * config/alpha/linux.h: Likewise.
2992 * config/arc/elf.h: Likewise.
2993 * config/arm/uclinux-elf.h: Likewise.
2994 * config/arm/unknown-elf.h: Likewise.
2995 * config/avr/avrlibc.h: Likewise.
2996 * config/bfin/bfin.h: Likewise.
2997 * config/bfin/linux.h: Likewise.
2998 * config/bfin/uclinux.h: Likewise.
2999 * config/darwin.h: Likewise.
3000 * config/darwin10.h: Likewise.
3001 * config/darwin12.h: Likewise.
3002 * config/gnu-user.h: Likewise.
3003 * config/lm32/uclinux-elf.h: Likewise.
3004 * config/pa/pa-hpux11.h: Likewise.
3005 * config/pa/pa64-hpux.h: Likewise.
3006 * config/sparc/sparc.h: Likewise.
3008 2018-07-31 Olivier Hainque <hainque@adacore.com>
3010 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
3011 undefined variables.
3013 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3016 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3019 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3021 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3022 terminated string literal.
3024 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3026 PR rtl-optimization/85160
3027 * combine.c (is_just_move): New function.
3028 (try_combine): Allow combining two instructions into two if neither of
3029 the original instructions was a move.
3031 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3034 * doc/extend.texi (Global Register Variables): Discourage use of type
3036 (Local Register Variables): Likewise.
3038 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3040 PR tree-optimization/86506
3041 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3043 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3046 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3047 hard_regno, make sure no insn between `from` and `to` clobbers it.
3049 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3050 Tom de Vries <tdevries@suse.de>
3052 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3053 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3054 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3055 PTX_DEFAULT_RUNTIME_DIM.
3056 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3058 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3060 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3061 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3062 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3064 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3066 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3068 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3069 predicate to reflect toc fusion has been deleted.
3070 (toc_fusion_mem_raw): Delete, no longer used.
3071 (toc_fusion_mem_wrapped): Likewise.
3072 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3074 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3075 Delete, no longer used.
3076 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3077 meant to be used for toc fusion.
3078 (rs6000_debug_print_mode): Delete toc fusion debugging.
3079 (rs6000_debug_reg_global): Likewise.
3080 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3081 fusion and secondary reload support that were never used.
3082 (rs6000_option_override_internal): Delete TOC fusion, that was only
3083 partially defined, and it did not work unless you also used the
3085 (rs6000_legitimate_address_p): Delete TOC fusion support.
3086 (rs6000_opt_masks): Likewise.
3087 (fusion_wrap_memory_address): Delete function, no longer used.
3088 (fusion_split_address); Delete TOC fusion support.
3089 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3090 longer used with toc fusion being deleted.
3091 (TARGET_TOC_FUSION_FP): Likewise.
3092 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3094 (toc fusion spliter): Delete TOC fusion support.
3095 (toc_fusionload_<mode>): Likewise.
3096 (toc_fusionload_di): Likewise.
3097 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3098 longer needs to be named. Rename predicate to delete TOC fusion.
3099 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3100 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3101 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3102 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3103 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3105 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3107 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3108 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3109 __int128 in built-in function prototypes.
3110 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3111 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3113 2018-07-27 Martin Sebor <msebor@redhat.com>
3115 PR tree-optimization/86696
3116 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3117 types, including enums.
3118 (handle_char_store): Be prepared for the above function to fail.
3120 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3122 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3123 when optimization level is lower than 2 or optimize for size.
3125 2018-07-26 Martin Sebor <msebor@redhat.com>
3127 PR tree-optimization/86043
3128 PR tree-optimization/86042
3129 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3130 (get_string_cst_length): Rename...
3131 (get_min_string_length): ...to this. Add argument.
3132 (handle_char_store): Extend to handle multi-character stores by
3134 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3135 * tree.h (initializer_zerop): Add argument.
3137 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3140 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3141 declare target to variables if they have always,{to,from,tofrom} map
3144 2018-07-26 Martin Liska <mliska@suse.cz>
3147 * lto-wrapper.c: Add linker_output as prefix
3148 for ltrans_output_file.
3150 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3152 PR rtl-optimization/85805
3153 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3154 value for hard registers if that was written in the same mode.
3156 2018-07-26 Martin Liska <mliska@suse.cz>
3158 PR gcov-profile/86536
3159 * gcov.c (format_gcov): Use printf format %.*f directly
3160 and do not handle special values.
3162 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3164 * common/config/arc/arc-common.c (arc_option_optimization_table):
3165 Update default optimizations for size.
3167 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3169 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3170 * config/arc/constraints.md (CfZ): New constraint.
3171 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3172 (subsf3_fpu): Likewise.
3173 (cmpsf_fpu): Likewise.
3174 (cmpsf_fpu_uneq): Likewise.
3176 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3178 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3180 (arc_is_uncached_mem_p): uncached applies to both the variable and
3183 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3185 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3188 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3190 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3191 field "m_scopes" from vec to auto_vec.
3193 2018-07-25 Martin Liska <mliska@suse.cz>
3195 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3198 2018-07-25 Richard Biener <rguenther@suse.de>
3201 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3202 special wrt context_die late.
3203 (gen_subprogram_die): Re-use DIEs in local scope.
3205 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3207 PR tree-optimization/86644
3208 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3210 2018-07-25 Martin Liska <mliska@suse.cz>
3213 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3214 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3216 2018-07-25 Martin Liska <mliska@suse.cz>
3219 * params.def: Explain ASan abbreviation and provide
3220 a documentation link.
3222 2018-07-24 Martin Sebor <msebor@redhat.com>
3224 PR tree-optimization/86622
3225 PR tree-optimization/86532
3226 * builtins.h (string_length): Declare.
3227 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3228 (check_access): Be prepared for non-constant length ranges.
3229 (string_length): Make extern.
3230 * expr.c (string_constant): Only handle the minor non-constant
3231 array index. Use string_constant to compute the length of
3232 a generic string constant.
3234 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3236 PR tree-optimization/86618
3237 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3238 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3240 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3242 PR tree-optimization/86636
3243 * json.cc (json::object::set): Fix comment. Add assertions.
3244 (json::array::append): Move here from json.h. Add comment and an
3246 (json::string::string): Likewise.
3247 * json.h (json::array::append): Move to json.cc.
3248 (json::string::string): Likewise.
3249 * optinfo-emit-json.cc
3250 (optrecord_json_writer::impl_location_to_json): Assert that we
3251 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3252 wrapper around it. Expand the location once, rather than three
3254 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3255 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3257 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3258 places. Fix some overlong lines.
3260 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3262 * config/aarch64/aarch64-simd.md
3263 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3264 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3265 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3266 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3267 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3268 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3269 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3270 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3271 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3273 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3276 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3277 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3278 and abs_d == d, do the power of two handling if profitable.
3280 2018-07-24 Richard Biener <rguenther@suse.de>
3282 * match.pd: Add BIT_FIELD_REF canonicalizations.
3284 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3287 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3289 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3291 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3292 terminated STRING_CST object.
3294 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3296 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3298 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3300 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3301 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3302 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3303 the elements into a register.
3304 (rs6000_split_v4si_init_di_reg): Delete.
3305 (rs6000_split_v4si_init): Delete.
3306 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3307 (vsx_init_v4si): Rewrite as a define_expand.
3309 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3311 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3312 zero_extend argument from memory): New.
3314 2018-07-22 Martin Sebor <msebor@redhat.com>
3317 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3318 diagnosing calls with unknown arguments unless -Walloca-larger-than
3319 is restricted to less than PTRDIFF_MAX bytes.
3321 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3323 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3325 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3327 * pretty-print.c (text_info::set_location): Remove redundant
3328 "line_table" parameter from call to rich_location::set_range.
3330 2018-07-20 Martin Sebor <msebor@redhat.com>
3333 * builtins.c (expand_builtin_alloca): Adjust.
3334 * calls.c (alloc_max_size): Simplify.
3335 * cgraphunit.c (cgraph_node::expand): Adjust.
3336 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3338 (frame_larger_than_size): Same.
3339 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3340 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3342 * doc/invoke.texi (GCC Command Options): Document option arguments.
3343 Explain byte-size arguments and suffixes.
3344 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3345 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3346 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3347 * doc/options.texi (UInteger): Expand.
3348 (Host_Wide_Int, ByteSize): Document new properties.
3349 * final.c (final_start_function_1): Include sizes in an error message.
3350 * function.c (frame_offset_overflow): Same.
3351 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3352 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3353 Diagnose unbounded alloca calls only for limits of less than
3355 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3356 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3358 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3359 only for limits of less than PTRDIFF_MAX.
3360 * langhooks-def.h (lhd_handle_option): Change function argument
3362 * langhooks.c (lhd_handle_option): Same.
3363 * langhooks.h (handle_option): Same.
3364 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3366 (var_type, var_type_struct): Same.
3367 (var_set): Handle ByteSize flag.
3368 * optc-gen.awk: Add comments to output to ease debugging. Make
3369 use of HOST_WIDE_INT where appropriate.
3370 * opts-gen-save.awk: Use %lx to format unsigned long.
3371 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3372 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3373 arguments. Parse bytes-size suffixes.
3374 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3375 (enum_value_to_arg): Same.
3376 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3377 (handle_option): Adjust.
3378 (generate_option): Change function argument to HOST_WIDE_INT.
3379 (cmdline_handle_error): Adjust.
3380 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3381 (set_option): Change function argument to HOST_WIDE_INT.
3382 (option_enabled): Handle cl_host_wide_int.
3383 (get_option_state): Handle CLVC_SIZE.
3384 (control_warning_option): Same.
3385 * opts.c (common_handle_option): Change function argument to
3386 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3387 OPT_Wvla_larger_than_.
3388 * opts.h (enum cl_var_type): Add an enumerator.
3389 * stor-layout.c (layout_decl): Print a more meaningful warning.
3390 * toplev.c (output_stack_usage): Adjust.
3392 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3394 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3395 call to inline_expand_builtin_string_cmp.
3396 (expand_builtin_strcmp): Likewise.
3397 (expand_builtin_strncmp): Likewise.
3398 (inline_string_cmp): Delete the last parameter, change char_type_node
3399 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3401 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3402 the inlining expansion on target where the type of the call has same or
3403 narrower precision than unsigned char.
3405 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3407 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3408 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3409 * common.opt (fsave-optimization-record): New option.
3410 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3411 * doc/invoke.texi (-fsave-optimization-record): New option.
3412 * dumpfile.c: Include "optinfo-emit-json.h".
3413 (struct kv_pair): Move to coretypes.h.
3414 (optgroup_options): Make non-static.
3415 (dump_context::end_scope): Call
3416 optimization_records_maybe_pop_dump_scope.
3417 * dumpfile.h (optgroup_options): New decl.
3418 * json.cc: New file.
3420 * optinfo-emit-json.cc: New file.
3421 * optinfo-emit-json.h: New file.
3422 * optinfo.cc: Include "optinfo-emit-json.h".
3423 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3424 (optinfo_enabled_p): Check optimization_records_enabled_p.
3425 (optinfo_wants_inlining_info_p): Likewise.
3426 * optinfo.h: Update comment.
3427 * profile-count.c (profile_quality_as_string): New function.
3428 * profile-count.h (profile_quality_as_string): New decl.
3429 (profile_count::quality): New accessor.
3430 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3431 and optinfo_emit_json_cc_tests.
3432 * selftest.h (selftest::json_cc_tests): New decl.
3433 (selftest::optinfo_emit_json_cc_tests): New decl.
3434 * toplev.c: Include "optinfo-emit-json.h".
3435 (compile_file): Call optimization_records_finish.
3436 (do_compile): Call optimization_records_start.
3437 * tree-ssa-live.c: Include optinfo.h.
3438 (remove_unused_scope_block_p): Retain inlining information if
3439 optinfo_wants_inlining_info_p returns true.
3441 2018-07-20 Richard Biener <rguenther@suse.de>
3444 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3445 to cover -flto-partition=none.
3447 2018-07-20 Martin Liska <mliska@suse.cz>
3449 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3450 (get_decl_source_range): Remove unused function.
3452 2018-07-20 Richard Biener <rguenther@suse.de>
3454 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3455 (struct vn_phi_s): Likewise.
3456 (struct vn_reference_s): Likewise.
3457 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3458 for searching the slot of an entry known to be in the hash itself.
3459 (vn_phi_hasher::equal): Likewise.
3460 (vn_reference_hasher::equal): Likewise.
3461 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3463 (optimistic_info, current_info): Remove, keeping only valid_info.
3464 (vn_reference_lookup_1): Remove fallback lookup.
3465 (vn_reference_lookup_2): Likewise.
3466 (vn_nary_op_lookup_1): Likewise.
3467 (vn_phi_lookup): Likewise.
3468 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3470 (vn_reference_insert): Adjust, chain the inserted hash element
3471 at last_inserted_ref.
3472 (vn_reference_insert_pieces): Likewise.
3473 (visit_reference_op_call): Likewise.
3474 (vn_nary_op_insert_into): Chain the inserted hash element at
3476 (vn_nary_op_insert_pieces): Adjust.
3477 (vn_nary_op_insert): Likewise.
3478 (vn_nary_op_insert_stmt): Likewise.
3479 (vn_phi_insert): Adjust, chain the inserted hash element at
3481 (process_scc): Remove clearing and copying the optimistic
3482 table. Instead remove elements inserted during an optimistic
3483 iteration from the single table we maintain.
3484 (init_scc_vn): Adjust.
3485 (free_scc_vn): Likewise.
3486 (sccvn_dom_walker::record_cond): Likewise.
3487 (sccvn_dom_walker::after_dom_children): Likewise.
3489 2018-07-19 Martin Sebor <msebor@redhat.com>
3491 PR tree-optimization/84047
3492 PR tree-optimization/83776
3493 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3494 (check_array_bounds): Call it.
3496 2018-07-19 Martin Sebor <msebor@redhat.com>
3498 * align.h (align_flags): Use member initialization.
3500 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3502 * Makefile.in (OBJS): Add optinfo.o.
3503 * coretypes.h (class symtab_node): New forward decl.
3504 (struct cgraph_node): New forward decl.
3505 (class varpool_node): New forward decl.
3506 * dump-context.h: New file.
3507 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3509 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3510 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3511 (set_alt_dump_file): Likewise.
3512 (dump_context::~dump_context): New dtor.
3513 (dump_gimple_stmt): Move implementation to...
3514 (dump_context::dump_gimple_stmt): ...this new member function.
3515 Add the stmt to any pending optinfo, creating one if need be.
3516 (dump_gimple_stmt_loc): Move implementation to...
3517 (dump_context::dump_gimple_stmt_loc): ...this new member function.
3518 Start a new optinfo and add the stmt to it.
3519 (dump_gimple_expr): Move implementation to...
3520 (dump_context::dump_gimple_expr): ...this new member function.
3521 Add the stmt to any pending optinfo, creating one if need be.
3522 (dump_gimple_expr_loc): Move implementation to...
3523 (dump_context::dump_gimple_expr_loc): ...this new member function.
3524 Start a new optinfo and add the stmt to it.
3525 (dump_generic_expr): Move implementation to...
3526 (dump_context::dump_generic_expr): ...this new member function.
3527 Add the tree to any pending optinfo, creating one if need be.
3528 (dump_generic_expr_loc): Move implementation to...
3529 (dump_context::dump_generic_expr_loc): ...this new member
3530 function. Add the tree to any pending optinfo, creating one if
3532 (dump_printf): Move implementation to...
3533 (dump_context::dump_printf_va): ...this new member function. Add
3534 the text to any pending optinfo, creating one if need be.
3535 (dump_printf_loc): Move implementation to...
3536 (dump_context::dump_printf_loc_va): ...this new member function.
3537 Start a new optinfo and add the stmt to it.
3538 (dump_dec): Move implementation to...
3539 (dump_context::dump_dec): ...this new member function. Add the
3540 value to any pending optinfo, creating one if need be.
3541 (dump_context::dump_symtab_node): New member function.
3542 (dump_context::get_scope_depth): New member function.
3543 (dump_context::begin_scope): New member function.
3544 (dump_context::end_scope): New member function.
3545 (dump_context::ensure_pending_optinfo): New member function.
3546 (dump_context::begin_next_optinfo): New member function.
3547 (dump_context::end_any_optinfo): New member function.
3548 (dump_context::s_current): New global.
3549 (dump_context::s_default): New global.
3550 (dump_scope_depth): Delete global.
3551 (dumpfile_ensure_any_optinfo_are_flushed): New function.
3552 (dump_symtab_node): New function.
3553 (get_dump_scope_depth): Reimplement in terms of dump_context.
3554 (dump_begin_scope): Likewise.
3555 (dump_end_scope): Likewise.
3556 (selftest::temp_dump_context::temp_dump_context): New ctor.
3557 (selftest::temp_dump_context::~temp_dump_context): New dtor.
3558 (selftest::verify_item): New function.
3559 (ASSERT_IS_TEXT): New macro.
3560 (ASSERT_IS_TREE): New macro.
3561 (ASSERT_IS_GIMPLE): New macro.
3562 (selftest::test_capture_of_dump_calls): New test.
3563 (selftest::dumpfile_c_tests): Call it.
3564 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3565 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3566 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3567 descriptive comment.
3568 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3569 (dump_node, dump_bb): Move these unrelated decls.
3570 (class dump_manager): Add leading comment.
3571 * optinfo.cc: New file.
3572 * optinfo.h: New file.
3574 2018-07-19 Michael Collison <michael.collison@arm.com>
3575 Richard Henderson <rth@redhat.com>
3577 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3578 (subti): Handle op1 zero.
3579 (subvti4, usub4ti4): New.
3580 (*sub<GPI>3_compare1_imm): New.
3581 (sub<GPI>3_carryinCV): New.
3582 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3583 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3585 2018-07-19 Michael Collison <michael.collison@arm.com>
3586 Richard Henderson <rth@redhat.com>
3588 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3589 (addti3): Create simpler code if low part is already known to be 0.
3590 (addvti4, uaddvti4): New.
3591 (*add<GPI>3_compareC_cconly_imm): New.
3592 (*add<GPI>3_compareC_cconly): New.
3593 (*add<GPI>3_compareC_imm): New.
3594 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3595 handle constants within this pattern..
3596 (*add<GPI>3_compareV_cconly_imm): New.
3597 (*add<GPI>3_compareV_cconly): New.
3598 (*add<GPI>3_compareV_imm): New.
3599 (add<GPI>3_compareV): New.
3600 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3601 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3602 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3603 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3604 with 'comparison' operator.
3605 (*add<GPI>3_compareV_cconly_imm): Ditto.
3606 (*add<GPI>3_compareV_cconly): Ditto.
3607 (*add<GPI>3_compareV_imm): Ditto.
3608 (add<GPI>3_compareV): Ditto.
3609 (add<mode>3_carryinC): Ditto.
3610 (*add<mode>3_carryinC_zero): Ditto.
3611 (*add<mode>3_carryinC): Ditto.
3612 (add<mode>3_carryinV): Ditto.
3613 (*add<mode>3_carryinV_zero): Ditto.
3614 (*add<mode>3_carryinV): Ditto.
3616 2018-07-19 Michael Collison <michael.collison@arm.com>
3617 Richard Henderson <rth@redhat.com>
3619 * config/aarch64/aarch64-modes.def (CC_V): New.
3620 * config/aarch64/aarch64-protos.h
3621 (aarch64_addti_scratch_regs): Declare
3622 (aarch64_subvti_scratch_regs): Declare.
3623 (aarch64_expand_subvti): Declare.
3624 (aarch64_gen_unlikely_cbranch): Declare
3625 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3626 for signed overflow using CC_Vmode.
3627 (aarch64_get_condition_code_1): Handle CC_Vmode.
3628 (aarch64_gen_unlikely_cbranch): New function.
3629 (aarch64_addti_scratch_regs): New function.
3630 (aarch64_subvti_scratch_regs): New function.
3631 (aarch64_expand_subvti): New function.
3633 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3635 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3637 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3638 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3641 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3644 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3645 address check not strict.
3647 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3649 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3651 (store_pair_lanes<mode>): Likewise.
3652 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3653 enum value 'ADDR_QUERY_LDP_STP_N'.
3654 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3655 (aarch64_print_address_internal): Add declaration.
3656 (aarch64_print_ldpstp_address): Remove.
3657 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3658 (aarch64_print_operand): Change printing of 'y'.
3659 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3660 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3661 'true' rather than '1'.
3662 * config/aarch64/constraints.md (Uml): Likewise.
3663 (Uml): Rename to Umn.
3666 2018-07-19 Richard Biener <rguenther@suse.de>
3668 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3670 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3671 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3672 (vn_reference_hasher): Likewise.
3673 (struct vn_tables_s): Remove obstack and alloc-pool members.
3674 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3675 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3676 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3677 (vn_reference_insert_pieces): Likewise.
3678 (alloc_vn_nary_op_noinit): Adjust.
3679 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3680 (vn_phi_eq): Adjust.
3681 (shared_lookup_phiargs): Remove.
3682 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3683 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3684 (visit_reference_op_call): Likewise.
3685 (copy_nary, copy_phi, copy_reference): Remove.
3686 (process_scc): Rewind the obstack when iterating. Do not
3687 copy the elements to valid_info but just move them from one
3688 hashtable to the other.
3689 (allocate_vn_table): Adjust.
3690 (free_vn_table): Likewise.
3691 (init_scc_vn): Likewise.
3692 (free_scc_vn): Likewise.
3694 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
3697 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3698 indirect_return as function type attribute.
3699 (ix86_attribute_table): Change indirect_return to function
3701 * doc/extend.texi: Update indirect_return attribute.
3703 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
3705 * wide-int.h (widest2_int): New.
3706 * gimple-fold.c (arith_overflowed_p): Use it.
3707 * tree.h (widest2_int_cst): New.
3708 * tree-vrp.c (wide_int_binop_overflow): Rename from
3709 vrp_int_const_binop.
3710 Rewrite to work on trees.
3711 (extract_range_from_multiplicative_op_1): Abstract code to...
3712 (wide_int_range_min_max): ...here.
3713 (wide_int_range_cross_product): ...and here.
3714 (extract_range_from_binary_expr_1): Abstract overflow code to...
3715 (wide_int_range_mult_wrapping): ...here.
3716 * tree-vrp.h (wide_int_range_cross_product): New.
3717 (wide_int_range_mult_wrapping): New.
3719 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
3720 Julia Koval <julia.koval@intel.com>
3722 * config/i386/x86-tune-costs.h (skylake_memcpy,
3723 skylake_memset): Replace rep_prefix with unrolling for size 512.
3725 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
3728 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3729 comparision with EQ_EXPR in last stmt.
3731 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
3733 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3734 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3735 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3736 previously known as "PowerPC AltiVec Built-in Functions". Move
3737 some material to new subsubsections "PowerPC AltiVec Built-in
3738 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3740 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3741 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3742 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3743 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3745 2018-07-18 Richard Biener <rguenther@suse.de>
3747 PR tree-optimization/86557
3748 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3751 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
3753 * config/s390/s390.c (s390_function_profiler): Generate CFI.
3755 2018-07-17 Jeff Law <law@redhat.com>
3757 * config/arm/arm.c (get_label_padding): Update for recent
3758 changes to label_to_alignment.
3760 PR tree-optimization/86010
3761 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3763 * config/mips/mips.c (vr4130_align_insns): Update for recent
3764 changes to label_to_alignment.
3766 * config/frv/frv.c (frv_label_align): Update for recent changes
3767 to label_to_alignment.
3769 * config/nios2/nios2.c (nios2_label_align): Update for recent
3770 changes which dropped ALIGN_LABELS_LOG.
3772 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3774 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3775 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3777 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
3779 * config/arc/arc.c (arc_label_align): Use align_labels instead of
3780 deprecated align_labels_log.
3782 2018-07-17 Richard Biener <rguenther@suse.de>
3785 * dwarf2out.c (init_sections_and_labels): Always generate
3786 a debug_line_str_section for early LTO debug.
3787 (dwarf2out_finish): Reset debug_line_str_hash output early.
3788 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3790 (dwarf2out_early_finish): Output debug_line_str.
3792 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3794 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3795 index register on z196 or later.
3797 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3799 * config/s390/s390.c (s390_default_align): Set default function
3801 (s390_override_options_after_change): Call s390_default align.
3802 (s390_option_override_internal): Call s390_default_align.
3803 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3805 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3808 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3809 to _looptemp_ clauses, other than the first two.
3811 2018-07-17 Martin Liska <mliska@suse.cz>
3813 * opts.c: Do not enable OPT_falign_* for -Os.
3815 2018-07-17 Martin Liska <mliska@suse.cz>
3817 * align.h (MAX_CODE_ALIGN): New.
3818 (MAX_CODE_ALIGN_VALUE): New.
3819 * common/config/i386/i386-common.c (ix86_handle_option):
3820 (MAX_CODE_ALIGN): Moved to align.h.
3821 * final.c (MAX_CODE_ALIGN): Likewise.
3822 * opts.c (parse_and_check_align_values):
3823 (MAX_CODE_ALIGN): Likewise.
3824 (MAX_CODE_ALIGN_VALUE): Likewise.
3826 2018-07-17 Martin Liska <mliska@suse.cz>
3828 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3829 in order to fulfil coding style.
3830 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3831 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3832 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3833 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3834 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3835 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3836 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3837 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3838 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3840 2018-07-17 Martin Liska <mliska@suse.cz>
3842 * align.h: New file.
3843 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3845 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3846 align_flags of label_to_alignment.
3847 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3849 * config/m68k/m68k.c: Do not use removed align_labels_value and
3851 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3852 (LOOP_ALIGN): Likewise.
3853 (LABEL_ALIGN): Likewise.
3854 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3855 Remove not used macro.
3856 (rs6000_loop_align): Change return type to align_flags.
3857 (rs6000_loop_align_max_skip): Remove.
3858 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3859 Change return type to align_flags.
3860 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3861 Remove not used macro.
3862 (rs6000_loop_align): Change return type to align_flags.
3863 (rs6000_loop_align_max_skip): Remove.
3864 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3865 * config/rx/rx-protos.h (rx_align_for_label): Make it
3867 * config/rx/rx.c (rx_align_for_label): Change return type
3869 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3871 into align_flags class.
3872 (LABEL_ALIGN): Likewise.
3873 (LOOP_ALIGN): Likewise.
3874 * config/s390/s390.c (s390_label_align): Use align_flags
3876 (s390_asm_output_function_label): Likewise.
3877 * config/sh/sh.c (sh_override_options_after_change):
3878 Use align_flags class directly without macros.
3879 (find_barrier): Likewise.
3880 (barrier_align): Likewise.
3881 (sh_loop_align): Likewise.
3882 * config/spu/spu.c (spu_option_override):
3883 Use align_flags_tuple::get_value instead of removed macros.
3884 (spu_sched_init): Likewise.
3885 * config/spu/spu.h (GTY): Likewise.
3886 * config/visium/visium.c (visium_option_override):
3887 Set "8" as default secondary alignment.
3888 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3889 in order to guarantee secondary alignment of 8.
3890 * coretypes.h: Include align.h header file.
3891 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3892 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3893 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3894 * doc/tm.texi.in: Likewise.
3895 * final.c (struct label_alignment): Remove not used structure.
3896 (LABEL_ALIGN): Change type to align_flags.
3897 (LOOP_ALIGN): Likewise.
3898 (JUMP_ALIGN): Likewise.
3899 (default_loop_align_max_skip): Remove.
3900 (default_label_align_max_skip): Likewise.
3901 (default_jump_align_max_skip): Likewise.
3902 (default_label_align_after_barrier_max_skip):
3903 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3904 (LABEL_TO_MAX_SKIP): Remove.
3905 (label_to_alignment): Return align_flags type instead of integer.
3906 (label_to_max_skip): Remove.
3907 (align_fuzz): Use align_flags type.
3908 (compute_alignments): Use align_flags type and use align_flags::max
3909 to combine multiple alignments.
3910 (grow_label_align): Grow vec instead of C array.
3911 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3912 (shorten_branches): Use align_flags type and use align_flags::max
3913 to combine multiple alignments.
3914 (final_scan_insn_1): Remove usage of secondary alignment that comes
3915 from label alignment, but instead use proper secondary alignment
3916 which is computed in grow_label_align.
3917 * flags.h (struct align_flags_tuple): Move to align.h.
3918 (struct align_flags): Likewise.
3919 (state_align_loops): Rename to align_loops.
3920 (state_align_jumps): Rename to align_jumps.
3921 (state_align_labels): Rename to align_labels.
3922 (state_align_functions): Rename to align_functions.
3923 (align_loops_log): Remove.
3924 (align_jumps_log): Remove.
3925 (align_labels_log): Remove.
3926 (align_functions_log): Remove.
3927 (align_loops_max_skip): Remove.
3928 (align_jumps_max_skip): Remove.
3929 (align_labels_max_skip): Remove.
3930 (align_functions_max_skip): Remove.
3931 (align_loops_value): Remove.
3932 (align_jumps_value): Remove.
3933 (align_labels_value): Remove.
3934 (align_functions_value): Remove.
3935 * output.h (label_to_alignment): Change return type to align_flags.
3936 (label_to_max_skip): Remove.
3937 * target.def: Remove loop_align_max_skip, label_align_max_skip,
3938 jump_align_max_skip macros.
3939 * targhooks.h (default_loop_align_max_skip): Remove.
3940 (default_label_align_max_skip): Likewise.
3941 (default_jump_align_max_skip): Likewise.
3942 (default_label_align_after_barrier_max_skip): Remove.
3943 * toplev.c (read_log_maxskip): Use ::normalize function.
3944 (parse_N_M): Remove not used argument and also call ::normalize.
3945 (parse_alignment_opts): Do not pass unused arguments.
3946 * varasm.c (assemble_start_function): Use directly align_functions
3947 instead of removed macros.
3948 * system.h: Do not poison removed macros.
3950 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3953 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3954 and cond temporaries don't have reference type if iterator has
3955 pointer type. For init use &for_pre_body instead of pre_p if
3956 for_pre_body is non-empty.
3958 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3960 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3961 double-double modes to SFmode directly directly.
3962 (trunc<mode>sf2_fprs): Delete.
3964 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3966 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3967 for conversions between IFmode and the decimal floating point modes.
3968 (init_float128_ieee): Use the correct names for conversions between
3969 KFmode and the decimal floating point modes.
3971 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3973 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3974 for the conversions between TDmode and IFmode.
3975 (init_float128_ieee): Use more correct names for the conversions
3976 between TDmode and KFmode.
3978 2018-07-16 Jakub Jelinek <jakub@redhat.com>
3980 PR tree-optimization/86526
3981 * builtins.c (expand_builtin_memcmp): Formatting fixes.
3982 (inline_expand_builtin_string_cmp): Likewise.
3983 (inline_string_cmp): Likewise. Use c_readstr instead of
3984 builtin_memcpy_read_str. Add unit_mode temporary.
3986 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3989 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3990 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3992 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
3994 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3995 Alphabetize prototypes of built-in functions, separating out
3996 built-in functions that are listed in this section but should be
3997 described elsewhere.
3999 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
4002 * expmed.c (emit_store_flag): Do not emit setcc followed by a
4003 conditional move when trapping comparison was split to a
4004 non-trapping one (and vice versa).
4006 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4008 * config/s390/s390.c (s390_function_profiler): Generate nops
4009 instead of profiler call sequences.
4010 * config/s390/s390.opt: Add the new option.
4012 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4014 * config/s390/s390.c (s390_function_profiler): Generate
4015 __mcount_loc section.
4016 * config/s390/s390.opt: Add the new option.
4018 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4020 * common.opt: Add the new warning.
4021 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4022 %r0,__fentry__" when -mfentry is specified.
4023 (s390_option_override_internal): Disallow -mfentry for 31-bit
4025 * config/s390/s390.opt: Add the new option.
4027 2018-07-16 Richard Biener <rguenther@suse.de>
4030 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4031 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4033 2018-07-16 Martin Liska <mliska@suse.cz>
4036 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4039 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4041 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4043 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4045 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4047 * config/arc/arc-cpus.def (hs4x): New cpu.
4049 * config/arc/arc-tables.opt: Regenerate.
4050 * config/arc/arc.c (arc_sched_issue_rate): New function.
4051 (TARGET_SCHED_ISSUE_RATE): Define.
4052 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4053 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4055 (attr tune): Add ARCHS4x tune values.
4056 (attr tune_dspmpy): Define.
4057 (*tst): Correct instruction type.
4058 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4059 * config/arc/arcHS4x.md: New file.
4060 * config/arc/fpu.md: Update instruction type attributes.
4061 * config/arc/t-multilib: Regenerate.
4063 2018-07-16 Tom de Vries <tdevries@suse.de>
4066 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4068 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4070 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4073 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4075 PR tree-optimization/86514
4076 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4077 conversion to a boolean type from a type with greater precision.
4079 2018-07-16 Tom de Vries <tdevries@suse.de>
4081 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4082 dump_flags request TDF_SLIM.
4084 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4086 * fold-const.c (int_const_binop_1): Abstract...
4087 (wide_int_binop): ...wide int code here.
4088 (poly_int_binop): ...poly int code here.
4089 Abstract the rest of int_const_binop_1 into int_const_binop.
4090 * fold-const.h (wide_int_binop): New.
4091 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4092 Remove useless PLUS/MINUS_EXPR case.
4093 (zero_nonzero_bits_from_vr): Move wide int code...
4094 (zero_nonzero_bits_from_bounds): ...here.
4095 (extract_range_from_binary_expr_1): Move mask optimization code...
4096 (range_easy_mask_min_max): ...here.
4097 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4098 (range_easy_mask_min_max): New.
4100 2018-07-15 Jeff Law <law@redhat.com>
4103 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4106 2018-07-14 Jim Wilson <jimw@sifive.com>
4108 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4110 2018-07-14 Paul Koning <ni1d@arrl.net>
4112 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4114 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4116 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4119 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4120 Steve Munroe <munroesj52@gmail.com>
4122 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4123 (_mm_andnot_si128): Likewise.
4124 (_mm_or_si128): Likewise.
4125 (_mm_xor_si128): Likewise.
4127 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4130 * builtins.c (expand_builtin_memcmp): Inline the calls first
4131 when result_eq is false.
4132 (expand_builtin_strcmp): Inline the calls first.
4133 (expand_builtin_strncmp): Likewise.
4134 (inline_string_cmp): New routine. Expand a string compare
4135 call by using a sequence of char comparison.
4136 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4137 a call to str(n)cmp/memcmp.
4138 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4140 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4142 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4144 * config/arm/driver-arm.c: Include arm-native.h.
4145 (host_detect_local_cpu): Use auto-generated data tables.
4146 (vendors, arm_cpu_table): Delete. Move part information to ...
4147 * config/arm/arm-cpus.in: ... here.
4148 * config/arm/parsecpu.awk (gen_native): New function.
4149 (vendor, part): New CPU fields.
4150 (END): Add support for building the native CPU detection tables.
4151 * config/arm/t-arm (arm-native.h): Add build rule.
4152 (driver-arm.o): Add dependency on arm-native.h.
4154 2018-07-13 Richard Biener <rguenther@suse.de>
4157 * match.pd (addr1 - addr2): Allow either of the operand to
4160 2018-07-13 Tom de Vries <tdevries@suse.de>
4162 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4165 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4167 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4168 arrays instead of numbered variables.
4170 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4172 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4173 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4175 2018-07-13 Richard Biener <rguenther@suse.de>
4178 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4179 instead of get_context_die.
4181 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4182 Richard Biener <rguenther@suse.de>
4185 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4186 that the loop latch destination where phi is defined.
4188 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4190 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4191 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4192 (riscv_set_current_function): Extract getting interrupt type to new
4194 (riscv_get_interrupt_type): New function.
4195 (riscv_merge_decl_attributes): New function, checking interrupt type is
4197 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4199 2018-07-12 Paul Koning <ni1d@arrl.net>
4201 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4204 2018-07-12 Paul Koning <ni1d@arrl.net>
4206 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4207 zero reference, add doloop_end instead.
4208 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4209 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4210 detail for doloop_end.
4212 2018-07-12 Martin Sebor <msebor@redhat.com>
4215 * attribs.c (decl_attributes): Reject conflicting attributes before
4216 calling attribute handlers.
4218 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4220 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4222 (gcc::dump_manager::get_dump_file_name): likewise.
4223 (dump_begin): Likewise.
4224 * dumpfile.h (dump_begin): Update prototype.
4225 (gcc::dump_manager::get_dump_file_name,
4226 gcc::dump_manager::get_dump_file_name): Update prototype.
4228 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4230 * internal-fn.h (vectorizable_internal_fn_p): New function.
4231 * tree-vect-slp.c (compatible_calls_p): Likewise.
4232 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4233 to internal functions.
4234 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4236 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4238 * fold-const.h (inverse_conditions_p): Declare.
4239 * fold-const.c (inverse_conditions_p): New function.
4240 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4241 that test the inverse condition of a conditional internal function.
4242 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4243 * internal-fn.c (internal_fn_mask_index): Handle conditional
4245 (vectorized_internal_fn_supported_p): New function.
4246 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4247 (any_pred_load_store): Replace with...
4248 (need_to_predicate): ...this new variable.
4249 (redundant_ssa_names): New variable.
4250 (ifcvt_can_use_mask_load_store): Move initial checks to...
4251 (ifcvt_can_predicate): ...this new function. Handle tree codes
4252 for which a conditional internal function exists.
4253 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4254 instead of ifcvt_can_use_mask_load_store. Update after variable
4256 (predicate_load_or_store): New function, split out from
4257 predicate_mem_writes.
4258 (check_redundant_cond_expr): New function.
4259 (value_available_p): Likewise.
4260 (predicate_rhs_code): Likewise.
4261 (predicate_mem_writes): Rename to...
4262 (predicate_statements): ...this. Use predicate_load_or_store
4263 and predicate_rhs_code.
4264 (combine_blocks, tree_if_conversion): Update after above name changes.
4265 (ifcvt_local_dce): Handle redundant_ssa_names.
4266 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4267 general conditional functions.
4268 * tree-vect-stmts.c (vectorizable_call): Likewise.
4270 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4271 Alan Hayward <alan.hayward@arm.com>
4272 David Sherwood <david.sherwood@arm.com>
4274 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4275 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4276 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4277 plus and minus and convert them into IFN_COND_FMA-based sequences.
4278 (convert_mult_to_fma): Handle conditional plus and minus.
4280 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4282 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4283 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4284 (cond_fnms_optab): New optabs.
4285 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4287 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4288 * internal-fn.h (get_conditional_internal_fn): Declare.
4289 (get_unconditional_internal_fn): Likewise.
4290 * internal-fn.c (cond_ternary_direct): New macro.
4291 (expand_cond_ternary_optab_fn): Likewise.
4292 (direct_cond_ternary_optab_supported_p): Likewise.
4293 (FOR_EACH_COND_FN_PAIR): Likewise.
4294 (get_conditional_internal_fn): New function.
4295 (get_unconditional_internal_fn): Likewise.
4296 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4297 (gimple_match_op::gimple_match_op): Add a new overload for 5
4299 (gimple_match_op::set_op): Likewise.
4300 (gimple_resimplify5): Declare.
4301 * genmatch.c (decision_tree::gen): Generate simplifications for
4303 * gimple-match-head.c (gimple_simplify): Define an overload for
4304 5 operands. Handle calls with 5 arguments in the top-level overload.
4305 (convert_conditional_op): Handle conversions from unconditional
4306 internal functions to conditional ones.
4307 (gimple_resimplify5): New function.
4308 (build_call_internal): Pass a fifth operand.
4309 (maybe_push_res_to_seq): Likewise.
4310 (try_conditional_simplification): Try converting conditional
4311 internal functions to unconditional internal functions.
4312 Handle 3-operand unconditional forms.
4313 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4314 Define ternary equivalents of the current rules for binary conditional
4316 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4318 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4319 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4320 (optab): Handle them.
4321 (SVE_COND_FP_TERNARY): New int iterator.
4322 (sve_fmla_op, sve_fmad_op): New int attributes.
4323 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4324 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4325 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4327 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4329 * target.def (preferred_else_value): New target hook.
4330 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4331 * doc/tm.texi: Regenerate.
4332 * targhooks.h (default_preferred_else_value): Declare.
4333 * targhooks.c (default_preferred_else_value): New function.
4334 * internal-fn.h (conditional_internal_fn_code): Declare.
4335 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4336 (get_conditional_internal_fn): Use it.
4337 (conditional_internal_fn_code): New function.
4338 * gimple-match.h (gimple_match_cond): New struct.
4339 (gimple_match_op): Add a cond member function.
4340 (gimple_match_op::gimple_match_op): Update all forms to take a
4342 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4343 for the suboperation, but don't specify a particular else_value.
4344 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4345 (visit_nary_op, visit_reference_op_load): Pass
4346 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4347 * gimple-match-head.c: Include tree-eh.h
4348 (convert_conditional_op): New function.
4349 (maybe_resimplify_conditional_op): Likewise.
4350 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4351 (gimple_resimplify2): Likewise.
4352 (gimple_resimplify3): Likewise.
4353 (gimple_resimplify4): Likewise.
4354 (maybe_push_res_to_seq): Return null for conditional operations.
4355 (try_conditional_simplification): New function.
4356 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4358 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4360 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4362 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4364 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4366 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4368 (hash_tree): Do not hash DECL_FCONTEXT
4369 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4370 Do not stream DECL_FCONTEXT.
4371 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4372 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4374 2018-07-12 Richard Biener <rguenther@suse.de>
4377 * dwarf2out.c (gen_block_die): Only output blocks when they have
4378 at least one !DECL_IGNORED_P variable.
4380 2018-07-12 Richard Biener <rguenther@suse.de>
4383 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4384 Remove -mieee-fp handling.
4386 2018-07-12 Richard Biener <rguenther@suse.de>
4388 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4389 left-over from last patch.
4391 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4393 PR tree-optimization/86492
4394 * gimple-ssa-store-merging.c
4395 (imm_store_chain_info::coalesce_immediate_stores): Call
4396 check_no_overlap even for the merge_overlapping case. Formatting fix.
4398 2018-07-12 Richard Biener <rguenther@suse.de>
4401 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4402 move possibly trapping operations into the conditional.
4404 2018-07-12 Richard Biener <rguenther@suse.de>
4406 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4407 (vn_lookup_simplify_result): Remove recursion limit applied
4409 (vn_nary_build_or_lookup_1): Adjust.
4410 (try_to_simplify): Likewise.
4411 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4413 (gimple_resimplify2): Likewise.
4414 (gimple_resimplify3): Likewise.
4415 (gimple_resimplify4): Likewise.
4417 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4419 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4420 Use __mmask64 type instead of __mmask8 for __M argument.
4421 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4422 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4424 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4425 __mmask16 for __M argument.
4426 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4427 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4428 to __mmask16 instead of __mmask8.
4429 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4430 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4431 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4432 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4433 instead of __mmask16 for __U argument.
4434 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4435 __mmask16 instead of __mmask8 for __U argument.
4436 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4438 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4440 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4442 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4444 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4446 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4448 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4450 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4452 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4454 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4456 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4457 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4458 return type as well as __M argument type and all casts from __mmask8
4460 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4461 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4462 return type as well as __M argument type and all casts from __mmask8
4464 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4465 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4466 return type as well as __M argument type and all casts from __mmask8
4468 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4469 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4470 return type as well as __M argument type and all casts from __mmask8
4472 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4473 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4476 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4478 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4479 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4482 2018-07-11 Paul Koning <ni1d@arrl.net>
4484 * doc/md.texi (define_subst): Document how multiple occurrences of
4485 the same argument in the replacement pattern are handled.
4487 2018-07-11 Paul Koning <ni1d@arrl.net>
4489 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4491 (Common Type Attributes): Add "mode" attribute.
4493 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4495 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4496 stream DECL_ORIGINAL_TYPE.
4497 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4498 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4499 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4500 Do not walk original type.
4501 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4503 (write_ts_decl_non_common_tree_pointers): Do not stream
4505 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4506 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4508 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4510 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4511 thread twice from the same starting edge.
4513 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4515 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4516 * gimple.c (gimple_call_nonnull_result_p): ...here...
4517 (gimple_call_nonnull_arg): ...and here.
4518 * gimple.h (gimple_call_nonnull_result_p): New.
4519 (gimple_call_nonnull_arg): New.
4521 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
4523 * config/arm/arm-cpus.in: Move information from fpu field of each
4524 cpu definition to the isa field.
4525 * config/arm/parsecpu.awk (fpu): Delete match rule.
4526 (gen_comm_data): Don't add bits from the CPU's FPU entry.
4528 2018-07-11 Richard Biener <rguenther@suse.de>
4531 * dwarf2out.c (init_sections_and_labels): Use
4532 output_asm_line_debug_info consistently.
4533 (dwarf2out_early_finish): Likewise.
4534 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4537 2018-07-11 Richard Biener <rguenther@suse.de>
4539 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4540 Rework father_bb setting in a way to avoid propagating constants
4541 multiple times on a loop body.
4543 2018-07-10 Mark Wielaard <mark@klomp.org>
4546 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4548 2018-07-10 Richard Biener <rguenther@suse.de>
4550 * hash-map.h (hash_map::iterator::operator*): Return
4551 references to key and value.
4553 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4556 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4557 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4558 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4559 (gimplify_omp_for): For composite loops, move outer
4560 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4561 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
4562 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
4563 TREE_LIST for both the original class iterator and the "last" helper
4564 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
4565 loop, remember has_decl_expr from outer composite loops for the
4566 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4568 2018-07-09 Martin Sebor <msebor@redhat.com>
4572 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4573 accessing implicitly initialized array elements.
4574 * expr.c (string_constant): Handle string initializers of
4575 character arrays within aggregates.
4576 * gimple-fold.c (fold_array_ctor_reference): Add argument.
4577 Store element offset. As a special case, handle zero size.
4578 (fold_nonarray_ctor_reference): Same.
4579 (fold_ctor_reference): Add argument. Store subobject offset.
4580 * gimple-fold.h (fold_ctor_reference): Add argument.
4582 2018-07-09 Paul Koning <ni1d@arrl.net>
4584 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4585 (pdp11_insn_cost): New function.
4586 (pdp11_md_asm_adjust): New function.
4587 (TARGET_INVALID_WITHIN_DOLOOP): Define.
4588 (pdp11_rtx_costs): Update to match machine better.
4589 (output_addr_const_pdp11): Correct format mismatch warnings.
4590 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4591 * config/pdp11/pdp11.md: General change to add base_cost and/or
4592 length attributes for use by new pdp11_insn_cost function.
4593 (MIN_BRANCH): Correct definition.
4595 (doloop_end): Use standard pattern name for looping pattern.
4596 (doloop_end_nocc): New.
4597 (movsf): Add another constraint alternative.
4598 (zero_extendqihi2): Add constraint alternatives for not in place
4600 (zero_extendhisi2): Remove.
4601 (shift patterns): Add CC handling variants.
4605 (define_peephole2): New peephole to recognize mov that sets CC for
4608 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4610 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4611 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4614 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4617 * real.c (real_nextafter): Return true if result is denormal.
4619 2018-07-09 Martin Liska <mliska@suse.cz>
4621 * common.opt: Add back wrongly removed attribute.
4623 2018-07-09 Richard Biener <rguenther@suse.de>
4626 * dwarf2out.c (gen_block_die): For an early generated DIE
4627 always output high/low PC attributes.
4629 2018-07-09 Tom de Vries <tdevries@suse.de>
4631 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4632 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4633 onto VAR_DECL with abstract origin.
4635 2018-07-07 Jim Wilson <jimw@sifive.com>
4637 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4639 2018-07-07 Tom de Vries <tdevries@suse.de>
4641 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4643 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4645 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4647 (combine_bound): Use wide-int overflow calculation instead of
4649 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4651 * fold-const.c (int_const_binop_2): Same.
4652 (extract_muldiv_1): Same.
4653 (fold_div_compare): Same.
4654 (fold_abs_const): Same.
4656 * poly-int.h (add): Same.
4660 * predict.c (predict_iv_comparison): Same.
4661 * profile-count.c (slow_safe_scale_64bit): Same.
4662 * simplify-rtx.c (simplify_const_binary_operation): Same.
4663 * tree-chrec.c (tree_fold_binomial): Same.
4664 * tree-data-ref.c (split_constant_offset_1): Same.
4665 * tree-if-conv.c (idx_within_array_bound): Same.
4666 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4667 * tree-ssa-phiopt.c (minmax_replacement): Same.
4668 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4669 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4670 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4671 * wide-int.cc (wi::add_large): Same.
4672 (wi::mul_internal): Same.
4673 (wi::sub_large): Same.
4674 (wi::divmod_internal): Same.
4675 * wide-int.h: Change overflow type to overflow_type for neg, add,
4676 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4677 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4678 mul_internal, divmod_internal.
4679 (overflow_type): New enum.
4680 (accumulate_overflow): New.
4682 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4684 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4685 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4687 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4689 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4690 argument is checked for zero before entering loop, avoid checking again.
4692 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4694 * gimplify.h (generic_expr_could_trap_p): Set as global function.
4695 * gimplify.h (generic_expr_could_trap_p): Likwise.
4696 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4698 2018-07-06 Jakub Jelinek <jakub@redhat.com>
4700 PR tree-optimization/86401
4701 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4702 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4703 (fold_bit_and_mask): ... here. New helper function for match.pd.
4704 * fold-const.h (fold_bit_and_mask): Declare.
4705 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4707 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4710 * target.def (translate_mode_attribute): New hook.
4711 * targhooks.h (default_translate_mode_attribute): Declare.
4712 * targhooks.c (default_translate_mode_attribute): New function.
4713 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4714 * doc/tm.texi: Regenerate.
4715 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4716 (rs6000_translate_mode_attribute): New function.
4718 2018-07-06 Paul Koning <ni1d@arrl.net>
4720 * doc/md.texi (define_split): Document DONE and FAIL.
4721 (define_peephole2): Ditto.
4723 2018-07-05 Jeff Law <law@redhat.com>
4725 PR tree-optimization/86010
4726 * tree-ssa-dse.c (compute_trims): More aggressively trim at
4727 both the head and tail of mem* and str* calls.
4729 2018-07-05 Jim Wilson <jimw@sifive.com>
4731 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4733 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
4735 * config/aarch64/aarch64-simd.md: correct flags text for
4736 MIN_EXPR replacement.
4738 2018-07-05 James Clarke <jrtc27@jrtc27.com>
4740 * configure: Regenerated.
4742 2018-07-05 Carl Love <cel@us.ibm.com>
4744 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4745 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4746 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4747 VSX_BUILTIN_DOUBLEL_V4SF.
4749 2018-07-05 Martin Sebor <msebor@redhat.com>
4752 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4753 than its domain to compute its the upper bound of a char array.
4755 2018-07-05 Nathan Sidwell <nathan@acm.org>
4757 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4758 * doc/cpp.texi: Update comment.
4759 * doc/tm.texi: Rebuilt.
4760 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4761 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4762 * doc/extend.texi (Backwards Compatibility): Clarify it is system
4763 headers affected by extern "C".
4764 * system.h: Poison NO_IMPLICIT_EXTERN_C.
4765 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4766 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4767 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4768 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4769 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4770 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4771 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4772 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4773 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4774 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4775 config/sparc/sp64-elf.h, config/spu/spu.h,
4776 config/stormy16/stormy16.h, config/v850/v850.h,
4777 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4778 define NO_IMPLICIT_EXTERN_C.
4779 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4781 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4784 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4785 instead of GET_MODE_SIZE when comparing Units.
4787 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4790 * rtlanal.c (set_noop_p): Constrain on mode change,
4791 include hard-reg-set.h
4793 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4795 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4797 2018-07-05 Jakub Jelinek <jakub@redhat.com>
4800 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4803 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4805 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4807 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4810 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4812 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4814 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
4817 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4819 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
4821 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4822 neg_*_op* variables.
4824 2018-07-04 Martin Liska <mliska@suse.cz>
4826 * tree-switch-conversion.c: Define
4827 max_ratio_for_speed and max_ratio_for_size constants.
4829 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4830 Martin Liska <mliska@suse.cz>
4835 * common.opt: Rename align options with 'str_' prefix.
4836 * common/config/i386/i386-common.c (set_malign_value): New
4838 (ix86_handle_option): Use it to set -falign-* options/
4839 * config/aarch64/aarch64-protos.h (struct tune_params): Change
4840 type from int to string.
4841 * config/aarch64/aarch64.c: Update default values from int
4843 * config/alpha/alpha.c (alpha_override_options_after_change):
4845 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4846 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4847 max skip conditionally.
4848 * config/i386/freebsd.h (SUBALIGN_LOG): New.
4849 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4850 max skip conditionally.
4851 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4852 max skip conditionally.
4853 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4854 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4855 max skip conditionally.
4856 * config/i386/i386.c (struct ptt): Change type from int to
4858 (ix86_default_align): Set default values.
4859 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4860 max skip conditionally.
4861 * config/i386/iamcu.h (SUBALIGN_LOG): New.
4862 (ASM_OUTPUT_MAX_SKIP_ALIGN):
4863 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4864 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4865 max skip conditionally.
4866 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4867 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4868 * config/i386/x86-64.h (SUBALIGN_LOG): New.
4869 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4870 max skip conditionally.
4871 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4872 * config/ia64/ia64.c (ia64_option_override): Set default values
4873 for alignment options.
4874 * config/m68k/m68k.c: Handle new str_align_* options.
4875 * config/mips/mips.c (mips_set_compression_mode): Change
4877 (mips_option_override): Set default values for options.
4878 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4880 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4882 * config/rx/rx.c (rx_option_override): Likewise.
4883 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4884 (LABEL_ALIGN): Use align_labels_log.
4885 (LOOP_ALIGN): Use align_loops_align.
4886 * config/s390/s390.c (s390_asm_output_function_label): Use new
4888 * config/sh/sh.c (sh_override_options_after_change):
4889 Change type of constants.
4890 * config/spu/spu.c (spu_sched_init): Likewise.
4891 * config/sparc/sparc.c (sparc_option_override): Set default
4893 * config/visium/visium.c (visium_option_override): Likewise.
4894 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4895 emit p2align format with last argument if it's not needed.
4896 * doc/invoke.texi: Document extended format of -falign-*.
4897 * final.c: Use align_labels alignment.
4898 * flags.h (struct target_flag_state): Change type to use
4900 (struct align_flags_tuple): New.
4901 (struct align_flags): Likewise.
4902 (align_loops_log): Redefine macro to use new types.
4903 (align_loops_max_skip): Redefine macro to use new types.
4904 (align_jumps_log): Redefine macro to use new types.
4905 (align_jumps_max_skip): Redefine macro to use new types.
4906 (align_labels_log): Redefine macro to use new types.
4907 (align_labels_max_skip): Redefine macro to use new types.
4908 (align_functions_log): Redefine macro to use new types.
4909 (align_loops): Redefine macro to use new types.
4910 (align_jumps): Redefine macro to use new types.
4911 (align_labels): Redefine macro to use new types.
4912 (align_functions): Redefine macro to use new types.
4913 (align_functions_max_skip): Redefine macro to use new types.
4914 (align_loops_value): New macro.
4915 (align_jumps_value): New macro.
4916 (align_labels_value): New macro.
4917 (align_functions_value): New macro.
4918 * function.c (invoke_set_current_function_hook): Propagate
4919 alignment values from flags to global variables default in
4921 * ipa-icf.c (sem_function::equals_wpa): Use
4922 cl_optimization_option_eq instead of memcmp.
4923 * lto-streamer.h (cl_optimization_stream_out): Support streaming
4925 (cl_optimization_stream_in): Likewise.
4926 * optc-save-gen.awk: Support strings in cl_optimization.
4927 * opth-gen.awk: Likewise.
4928 * opts.c (finish_options): Remove error checking of invalid
4930 (MAX_CODE_ALIGN): Remove.
4931 (MAX_CODE_ALIGN_VALUE): Likewise.
4932 (parse_and_check_align_values): New function.
4933 (check_alignment_argument): Likewise.
4934 (common_handle_option): Use check_alignment_argument.
4935 * opts.h (parse_and_check_align_values): Declare.
4936 * toplev.c (init_alignments): Remove.
4937 (read_log_maxskip): New.
4938 (parse_N_M): Likewise.
4939 (parse_alignment_opts): Likewise.
4940 (backend_init_target): Remove usage of init_alignments.
4941 * toplev.h (parse_alignment_opts): Declare.
4942 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4944 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4945 * tree.c (cl_option_hasher::equal): New.
4946 * varasm.c: Use new global macros.
4948 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4950 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4951 Use a simpler align directive also if MAXSKIP = ALIGN-1.
4952 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4953 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4954 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4955 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4956 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4957 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4958 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4959 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4960 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4961 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4962 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4964 2018-07-04 Martin Liska <mliska@suse.cz>
4965 Jonathan Wakely <jwakely@redhat.com>
4967 * coverage.c: Use correct type.
4968 * doc/invoke.texi: Language correction.
4970 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
4973 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4974 ENDBRANCH for non-tail call which may return via indirect branch.
4975 * doc/extend.texi: Document indirect_return attribute.
4977 2018-07-03 Martin Sebor <msebor@redhat.com>
4979 PR tree-optimization/86274
4980 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4982 (format_floating): Correct handling of infinities and NaNs.
4984 2018-07-03 Martin Sebor <msebor@redhat.com>
4986 * print-tree.c (print_real_cst): New function.
4987 (print_node_brief): Call it.
4988 (print_node): Ditto.
4990 2018-07-03 Jeff Law <law@redhat.com>
4992 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4993 into a single pattern.
4995 * config/h8300/h8300.md (ors code_iterator): New.
4996 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4997 a single pattern and single splitter.
4998 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4999 (iorqi3_1, xorqi3_1): Likewise.
5000 (iorqi3, xorqi3 expanders): Similarly.
5002 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
5003 (movmd_internal) into a single pattern using the P mode iterator.
5004 (movmd splitters): Similarly.
5005 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
5006 (movsd splitters): Similarly.
5008 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
5009 ADDB, ADDW and ADDL into a single ADD attribute which selects the
5010 right table based on the size of the operand.
5011 * config/h8300/h8300.md (length_table): Corresponding changes. All
5012 references to "addb", "addw" and "addl" changed to "add".
5013 (btst patterns): Merge two variants into a single pattern.
5014 (tstqi, tsthi): Likewise.
5015 (addhi3_incdec, addsi3_incdec): Likewise.
5016 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5017 (mulhi3, mulsi3): Likewise.
5018 (udivhi3, udivsi3): Likewise.
5019 (divhi3, divsi3): Likewise.
5020 (andorqi3, andorhi3, andorsi3): Likewise.
5022 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5025 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5026 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5028 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5030 PR tree-optimization/85694
5031 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5032 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5034 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5035 (<u>avg<mode>3_ceil): New patterns.
5037 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5039 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5040 scan-tree-dump directive.
5041 * gcc.dg/vect/slp-perm-2.c: Likewise.
5042 * gcc.dg/vect/slp-perm-3.c: Likewise.
5043 * gcc.dg/vect/slp-perm-5.c: Likewise.
5044 * gcc.dg/vect/slp-perm-6.c: Likewise.
5045 * gcc.dg/vect/slp-perm-7.c: Likewise.
5046 * gcc.dg/vect/slp-perm-8.c: Likewise.
5048 2018-07-03 Marek Polacek <polacek@redhat.com>
5051 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5053 2018-07-03 Richard Biener <rguenther@suse.de>
5056 * tree-ssa-structalias.c (find_func_clobbers): Properly
5057 handle indirect calls.
5059 2018-07-03 Jeff Law <law@redhat.com>
5061 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5062 (shifts): New code iterator.
5063 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5064 expander. Fix HImode handling on H8/SX.
5065 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5066 (subqi3, subhi3, subsi3 expanders): Likewise.
5067 (andqi3, andhi3, andsi3 expanders): Likewise.
5068 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5069 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5070 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5071 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5072 (zero_extendqihi2, zero_extendqisi2): Likewise.
5073 (extendqihi2, extendqisi2): Likewise.
5074 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5075 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5076 (rotlqi3_1, rotlhi3_1): Likewise.
5077 (logicalhi3_sn, logicalsi3_sn): Likewise.
5078 (logicalhi3, logicalsi3): Likewise.
5080 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5082 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5083 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5084 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5085 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5086 type to append_pattern_def_seq instead of creating a stmt_vec_info
5088 (build_mask_conversion): Likewise. Remove vinfo argument.
5089 (vect_add_conversion_to_patterm): Likewise, renaming to...
5090 (vect_add_conversion_to_pattern): ...this.
5091 (vect_recog_mask_conversion_pattern): Update call to
5092 build_mask_conversion. Pass the vector type to
5093 append_pattern_def_seq here too.
5094 (vect_recog_gather_scatter_pattern): Update call to
5095 vect_add_conversion_to_pattern.
5097 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5099 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5100 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5101 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5102 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5103 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5104 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5105 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5106 append_pattern_def_seq instead of new_pattern_def_seq.
5107 (vect_recog_divmod_pattern): Do both of the above.
5108 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5111 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5113 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5114 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5115 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5116 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5117 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5118 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5119 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5120 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5121 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5122 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5123 parameter with a single stmt_vec_info.
5124 (vect_recog_func_ptr): Likewise.
5125 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5126 (vect_try_gather_scatter_pattern): ...this.
5127 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5128 the stmt_vec_info of the statement to be matched. Don't clear
5129 STMT_VINFO_RELATED_STMT.
5130 (vect_pattern_recog): Update call accordingly.
5132 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5134 PR tree-optimization/85694
5135 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5136 (uavgM3_ceil): Document new optabs.
5137 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5138 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5140 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5141 (savg_ceil_optab): New optabs.
5142 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5143 (vect_vect_recog_func_ptrs): Add it.
5144 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5145 constant directly from the associated lhs.
5147 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5149 * tree-vect-patterns.c (vect_split_statement): New function.
5150 (vect_convert_input): Use it to try to split an existing cast.
5152 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5154 * poly-int.h (print_hex): New function.
5155 * dumpfile.h (dump_dec, dump_hex): Declare.
5156 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5157 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5158 min_input_precision, operation_precision and operation_sign.
5159 * tree-vect-patterns.c (vect_get_range_info): New function.
5160 (vect_same_loop_or_bb_p, vect_single_imm_use)
5161 (vect_operation_fits_smaller_type): Delete.
5162 (vect_look_through_possible_promotion): Add an optional
5163 single_use_p parameter.
5164 (vect_recog_over_widening_pattern): Rewrite to use new
5165 stmt_vec_info infomration. Handle one operation at a time.
5166 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5167 (vect_truncatable_operation_p, vect_set_operation_type)
5168 (vect_set_min_input_precision): New functions.
5169 (vect_determine_min_output_precision_1): Likewise.
5170 (vect_determine_min_output_precision): Likewise.
5171 (vect_determine_precisions_from_range): Likewise.
5172 (vect_determine_precisions_from_users): Likewise.
5173 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5174 (vect_vect_recog_func_ptrs): Put over_widening first.
5176 (vect_pattern_recog): Call vect_determine_precisions.
5178 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5180 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5181 statements that have been replaced by further pattern statements.
5182 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5184 2018-07-03 Richard Biener <rguenther@suse.de>
5186 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5187 always set *dt. Dump vectype in vectype overload.
5188 * dumpfile.h (dump_gimple_expr): New function.
5189 (dump_gimple_expr_loc): Likewise.
5190 * dumpfile.c (dump_gimple_expr): New function.
5191 (dump_gimple_expr_loc): Likewise.
5193 2018-07-02 Jeff Law <law@redhat.com>
5195 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5196 the H8/300, H8/300H and H8/S variants into a single pattern.
5197 (movhi_h8300, movqi_h8300hs): Similarly.
5198 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5199 (QHI mode iterator): New.
5201 * config/h8300/h8300.md: Remove trailing whitespace.
5203 2018-07-02 Jim Wilson <jimw@sifive.com>
5205 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5206 instead of emit_insn for interrupt returns.
5207 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5208 (riscv_sret, riscv_uret): Likewise.
5210 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5212 * pretty-print.c (selftest::test_pp_format): Move save and restore
5213 of quotes to class auto_fix_quotes, and add an instance.
5214 * selftest.c: Include "intl.h".
5215 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5216 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5217 * selftest.h (selftest::auto_fix_quotes): New class.
5219 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5221 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5222 (aarch64_sve_prepare_conditional_op): Remove.
5223 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5224 Allow aarch64_simd_reg_or_zero as select operand; remove
5225 the aarch64_sve_prepare_conditional_op call.
5226 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5227 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5228 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5229 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5230 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5231 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5232 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5233 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5234 and a splitters to match all of the *_any patterns.
5235 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5237 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5238 (SVE_COND_FP_BINARY_REV): Remove.
5239 (sve_int_op_rev, sve_fp_op_rev): New.
5240 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5241 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5242 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5243 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5244 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5245 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5246 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5247 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5248 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5250 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5251 Remove match_dup 1 from the inner unspec.
5252 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5254 * config/aarch64/aarch64.md (movprfx): New attr.
5255 (length): Default movprfx to 8.
5256 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5257 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5258 (*<su>mul<SVE_I>3_highpart): Likewise.
5259 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5260 (*v<ASHIFT><SVE_I>3): Likewise.
5261 (*<su><MAXMIN><SVE_I>3): Likewise.
5262 (*<su><MAXMIN><SVE_F>3): Likewise.
5263 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5264 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5265 (*div<SVE_F>4): Likewise.
5267 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5269 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5272 2018-07-02 Richard Biener <rguenther@suse.de>
5274 PR tree-optimization/86363
5275 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5276 memset argument refers to a non-variable address.
5278 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5280 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5281 {PLUS,MINUS}_EXPR code to...
5282 (adjust_symbolic_bound): ...here,
5283 (combine_bound): ...here,
5284 (set_value_range_with_overflow): ...and here.
5286 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5288 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5290 (extract_range_from_abs_expr): ...here.
5292 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5294 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5295 -fno-omit-frame-pointer when not optimizing.
5297 2018-07-02 Martin Liska <mliska@suse.cz>
5300 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5301 (propagate_nothrow): Likewise.
5303 2018-07-02 Martin Liska <mliska@suse.cz>
5306 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5308 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5310 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5311 function in r262149, changing "loc" param from source_location to
5312 const dump_location_t &.
5313 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5314 declaration, as above.
5316 2018-07-01 Paul Koning <ni1d@arrl.net>
5318 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5319 -munit-asm, -mgnu-asm, -mdec-asm.
5320 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5321 (pdp11_output_labelref): New.
5322 (pdp11_output_def): New.
5323 (pdp11_output_addr_vec_elt): New.
5324 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5325 %# and %@ format codes.
5326 (pdp11_option_override): New.
5327 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5328 (pdp11_output_ident): New.
5329 (pdp11_asm_named_section): New.
5330 (pdp11_asm_init_sections): New.
5331 (pdp11_file_start): New.
5332 (pdp11_file_end): New.
5333 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5334 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5335 %o, like %c but octal.
5336 (pdp11_option_override): New.
5337 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5339 (DATA_SECTION_ASM_OP): Ditto.
5340 (READONLY_DATA_SECTION_ASM_OP): New.
5341 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5342 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5343 (ASM_OUTPUT_LABELREF): Ditto.
5344 (ASM_OUTPUT_DEF): Ditto.
5345 (ASM_OUTPUT_EXTERNAL): New.
5346 (ASM_OUTPUT_SOURCE_FILENAME): New.
5347 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5348 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5349 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5350 %# and %@ format codes.
5351 * config/pdp11/pdp11.opt (mgnu-asm): New.
5352 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5353 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5354 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5356 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5358 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5359 dereferencing path[] beyond its length.
5361 (debug_all_paths): New.
5362 (rewire_first_differing_edge): New.
5363 (adjust_paths_after_duplication): New.
5364 (duplicate_thread_path): Call adjust_paths_after_duplication.
5366 (thread_through_all_blocks): Add new argument to
5367 duplicate_thread_path.
5369 2018-06-30 Jim Wilson <jimw@sifive.com>
5371 * config/riscv/predicates.md (p2m1_shift_operand): New.
5372 (high_mask_shift_operand): New.
5373 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5374 pattern using p2m1_shift_operand.
5375 (lshsi3_zero_extend_3+2): New combiner pattern using
5376 high_mask_shift_operand.
5378 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5380 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5382 (vect_recog_rotate_pattern): ...here.
5383 (vect_convert_input): Try to insert casts of invariants in the
5385 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5386 preheader to be empty.
5388 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5390 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5391 vector type. If given, install it in the new statement's
5393 (vect_element_precision): New function.
5394 (vect_unpromoted_value): New struct.
5395 (vect_unpromoted_value::vect_unpromoted_value): New function.
5396 (vect_unpromoted_value::set_op): Likewise.
5397 (vect_look_through_possible_promotion): Likewise.
5398 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5399 (vect_widened_op_tree, vect_convert_input): Likewise.
5400 (vect_convert_inputs, vect_convert_output): Likewise.
5401 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5402 to handle the optional cast of the multiplication result and
5403 vect_widened_op_tree to detect the widened multiplication itself.
5404 Do not require the input and output of promotion casts to have
5405 the same sign, but base the signedness of the operation on the
5406 input rather than the result. If the pattern includes two
5407 promotions, check that those promotions have the same sign.
5408 Do not restrict the MULT_EXPR handling to a double-width result;
5409 handle quadruple-width results and wider. Use vect_convert_inputs
5410 to convert the inputs to the common type.
5411 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5412 to handle the optional cast of the ABS result. Also allow a sign
5413 change or a sign extension between the ABS and MINUS.
5414 Use vect_widened_op_tree to detect the widened subtraction and use
5415 vect_convert_inputs to convert the inputs to the common type.
5416 (vect_handle_widen_op_by_const): Delete.
5417 (vect_recog_widen_op_pattern): New function.
5418 (vect_recog_widen_mult_pattern): Use it.
5419 (vect_recog_widen_shift_pattern): Likewise.
5420 (vect_recog_widen_sum_pattern): Use
5421 vect_look_through_possible_promotion to handle the promoted
5424 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5426 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5427 the containing gimple_seq *.
5428 * gimple-iterator.h (gsi_for_stmt): Declare it.
5429 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5430 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5431 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5432 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5433 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5435 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5437 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5438 statement being replaced is part of an existing pattern
5439 definition sequence, inserting the new pattern statements before
5441 (vect_pattern_recog_1): Don't return a bool. If the statement
5442 is already part of a pattern, instead apply pattern matching
5443 to the pattern definition statements. Don't clear the
5444 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5445 (vect_pattern_recog): Don't break after the first match;
5446 continue processing the pattern definition statements instead.
5447 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5449 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5451 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5452 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5453 (vect_recog_widen_sum_pattern): Use it.
5455 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5457 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5458 phi is not a pattern statement and has not been replaced by
5459 a pattern statement.
5460 * tree-vect-patterns.c (type_conversion_p): Don't check
5461 STMT_VINFO_IN_PATTERN_P.
5462 (vect_recog_vector_vector_shift_pattern): Likewise.
5463 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5464 the pattern statement rather than the original statement; check
5465 directly for a WIDEN_MULT_EXPR here.
5466 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5467 vect_is_simple_use to return the pattern statement rather
5468 than the original statement; use is_pattern_stmt_p to check
5469 for such a pattern statement.
5470 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5471 to return the pattern statement rather than the original statement;
5472 don't do the same transformation here.
5473 (vect_is_simple_use): If the defining statement has been replaced
5474 by a pattern statement, return the pattern statement instead.
5475 Remove the corresponding (local) transformation from the vectype
5478 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5480 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5481 end and default to null.
5482 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5483 (vectorizable_reduction): Update calls accordingly, dropping the
5484 gimple ** argument if the passed-back statement isn't needed.
5485 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5486 (vect_recog_rotate_pattern): Likewise.
5487 (vect_recog_mask_conversion_pattern): Likewise.
5488 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5489 (vect_mask_constant_operand_p): Likewise.
5490 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5491 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5492 (get_group_load_store_type, get_load_store_type): Likewise.
5493 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5494 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5495 (vectorizable_conversion, vectorizable_assignment): Likewise.
5496 (vectorizable_shift, vectorizable_operation): Likewise.
5497 (vectorizable_store, vect_is_simple_cond): Likewise.
5498 (vectorizable_condition, vectorizable_comparison): Likewise.
5499 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5500 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5501 and move it to the end. Cope with null def_stmt_outs.
5503 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5505 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5507 2018-06-29 Jeff Law <law@redhat.com>
5509 * config/v850/v850.c (v850_legitimate_address_p): Handle large
5510 displacements for TARGET_V850E2V3 and newer.
5511 (TARGET_LRA_P): Remove. Defaults to LRA now.
5512 * config/v850/v850.md (sign23byte_load): Remove.
5513 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5514 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5516 2018-06-29 Martin Liska <mliska@suse.cz>
5519 * coverage.c (coverage_init): Mangle full path name.
5520 * doc/invoke.texi: Document the change.
5521 * gcov-io.c (mangle_path): New.
5522 * gcov-io.h (mangle_path): Likewise.
5523 * gcov.c (mangle_name): Use mangle_path for path mangling.
5525 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5527 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5528 if starting source register is not even.
5530 2018-06-29 Martin Liska <mliska@suse.cz>
5532 PR tree-optimization/86263
5533 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5534 Make edge redirection.
5536 2018-06-29 David Malcolm <dmalcolm@redhat.com>
5538 * dumpfile.c (dump_loc): Add indentation based on scope depth.
5539 (dump_scope_depth): New variable.
5540 (get_dump_scope_depth): New function.
5541 (dump_begin_scope): New function.
5542 (dump_end_scope): New function.
5543 * dumpfile.h (get_dump_scope_depth): New declaration.
5544 (dump_begin_scope): New declaration.
5545 (dump_end_scope): New declaration.
5546 (class auto_dump_scope): New class.
5547 (AUTO_DUMP_SCOPE): New macro.
5548 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5551 2018-06-29 Richard Biener <rguenther@suse.de>
5553 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5554 compute_all_dependences succeeds.
5555 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5556 exceed --param loop-max-datarefs-for-datadeps.
5558 2018-06-29 Jakub Jelinek <jakub@redhat.com>
5560 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5562 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
5565 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5566 alternative 0 in preferred_for_speed attribute.
5568 2018-06-28 Paul Koning <ni1d@arrl.net>
5570 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5571 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5572 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5573 * config/pdp11/pdp11.md: Correct "length" attribute calculation
5574 for shift insn patterns.
5576 2018-06-28 David Malcolm <dmalcolm@redhat.com>
5578 * cgraph.c (cgraph_node::get_body): Replace assignments to
5579 "dump_file" with calls to set_dump_file.
5580 * dumpfile.c (alt_dump_file): Make static, and group with...
5581 (alt_flags): ...this definition.
5582 (dumps_are_enabled): New variable.
5583 (refresh_dumps_are_enabled): New function.
5584 (set_dump_file): New function.
5585 (set_alt_dump_file): New function.
5586 (gcc::dump_manager::dump_start): Replace assignments to
5587 "dump_file" and "alt_dump_file" with calls to set_dump_file and
5589 (gcc::dump_manager::dump_finish): Likewise.
5590 * dumpfile.h (alt_dump_file): Delete decl.
5591 (dumps_are_enabled): New variable decl.
5592 (set_dump_file): New function decl.
5593 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5595 * tree-nested.c (lower_nested_functions): Replace assignments to
5596 "dump_file" with calls to set_dump_file.
5598 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5600 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5601 goto_locus of each outgoing edge of each basic block.
5603 2018-06-28 Richard Biener <rguenther@suse.de>
5605 * dwarf2out.c (decl_scope_table): Remove.
5606 (push_decl_scope): Likewise.
5607 (pop_decl_scope): Likewise.
5608 (gen_type_die_for_member): Do not call push/pop_decl_scope.
5609 (gen_struct_or_union_type_die): Likewise.
5610 (gen_tagged_type_die): Likewise.
5611 (dwarf2out_init): Do not initialize decl_scope_table.
5612 (dwarf2out_c_finalize): Do not free it.
5614 2018-06-28 Richard Biener <rguenther@suse.de>
5616 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5617 deciding whether to not re-use a DIE.
5619 2018-06-28 Richard Biener <rguenther@suse.de>
5621 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5622 DW_AT_abstract_origin attribute.
5624 2018-06-28 Martin Liska <mliska@suse.cz>
5626 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5627 Use newly introduced constants.
5628 * tree-switch-conversion.h (struct jump_table_cluster):
5629 Define max_ratio_for_size and max_ratio_for_speed.
5631 2018-06-28 Martin Liska <mliska@suse.cz>
5633 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5634 Add new checking assert to catch invalid state.
5635 (jump_table_cluster::can_be_handled): Handle single case
5637 (jump_table_cluster::is_beneficial): Bail out for such case.
5638 (bit_test_cluster::find_bit_tests):
5639 Add new checking assert to catch invalid state.
5640 (bit_test_cluster::can_be_handled): Handle single case
5642 (bit_test_cluster::is_beneficial): Bail out for such case.
5643 (switch_decision_tree::analyze_switch_statement):
5646 2018-06-28 Martin Liska <mliska@suse.cz>
5648 * common.opt: Introduce -completion option.
5649 * gcc.c (driver_handle_option): Handle it.
5650 (driver::main): Print completions if completion
5652 * opt-suggestions.c (option_proposer::get_completions):
5654 (option_proposer::suggest_completion): Likewise.
5655 (option_proposer::find_param_completions): Likewise.
5656 (verify_autocompletions): Likewise.
5657 (test_completion_valid_options): Likewise.
5658 (test_completion_valid_params): Likewise.
5659 (in_completion_p): Likewise.
5660 (empty_completion_p): Likewise.
5661 (test_completion_partial_match): Likewise.
5662 (test_completion_garbage): Likewise.
5663 (opt_proposer_c_tests): Likewise.
5664 * opt-suggestions.h: Declare new functions.
5665 * opts.c (common_handle_option): Handle OPT__completion_.
5666 * selftest-run-tests.c (selftest::run_tests): Add
5667 opt_proposer_c_tests.
5668 * selftest.c (assert_str_startswith): New.
5669 * selftest.h (assert_str_startswith): Likewise.
5670 (opt_proposer_c_tests): New.
5671 (ASSERT_STR_STARTSWITH): Likewise.
5673 2018-06-28 Martin Liska <mliska@suse.cz>
5675 * Makefile.in: Add opt-suggestions.o.
5676 * gcc-main.c: Include opt-suggestions.h.
5677 * gcc.c (driver::driver): Likewise.
5678 (driver::~driver): Remove m_option_suggestions.
5679 (driver::build_option_suggestions): Moved to option_proposer.
5680 (driver::suggest_option): Likewise.
5681 (driver::handle_unrecognized_options): Use option_proposer.
5682 * gcc.h (class driver): Add new memver m_option_proposer.
5683 * opt-suggestions.c: New file.
5684 * opt-suggestions.h: New file.
5686 2018-06-28 Martin Liska <mliska@suse.cz>
5688 * vec.h (class auto_string_vec): New (moved from auto_argvec).
5689 (auto_string_vec::~auto_string_vec): Likewise.
5691 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5693 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5694 prevent_decl_creation_for_types fields up and add reset_location field.
5695 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5696 statement if id->reset_location is true.
5697 (copy_edges_for_bb): Do not set goto_locus on the new edges if
5698 id->reset_location is true.
5699 (copy_phis_for_bb): Force input_location on the arguments if
5700 id->reset_location is true.
5701 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5702 is set on the function to be inlined.
5704 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
5706 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5708 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
5710 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5711 registers for Pmode.
5712 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5713 hard registers for the clobbered pseudo.
5715 2018-06-27 Paul Koning <ni1d@arrl.net>
5717 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5718 mutually exclusive options.
5719 * config/pdp11/constraints.md (h): New constraint.
5720 (O): Update definition to match shift code generation.
5721 (D): New constraint.
5722 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5724 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5726 (output_jump): Change arguments.
5727 (pdp11_fixed_cc_regs): New function.
5728 (pdp11_cc_mode): Ditto.
5729 (pdp11_expand_shift): Ditto.
5730 (pdp11_assemble_shift): Ditto.
5731 (pdp11_small_shift): Ditto.
5732 (pdp11_branch_cost): Remove.
5733 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5735 (pdp11_register_move_cost): Update for CC registers.
5736 (pdp11_rtx_costs): Add case for LSHIFTRT.
5737 (pdp11_output_jump): Add CCNZ mode conditional branches.
5738 (notice_update_cc_on_set): Remove.
5739 (pdp11_cc_mode): New function.
5740 (simple_memory_operand): Correct pre/post decrement case.
5741 (no_side_effect_operand): New function.
5742 (pdp11_regno_reg_class): Add CC_REGS class.
5743 (pdp11_fixed_cc_regs): New function.
5744 (pdp11_small_shift): New function.
5745 (pdp11_expand_shift): New function to expand shift insns.
5746 (pdp11_assemble_shift): New function to output shifts.
5747 (pdp11_branch_cost): Remove.
5748 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5749 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5750 (WCHAR_TYPE): Ditto.
5751 (PTRDIFF_TYPE): Ditto.
5752 (ADJUST_INSN_LENGTH): New macro.
5753 (FIXED_REGISTERS): Add CC registers.
5754 (CALL_USED_REGISTERS): Ditto.
5756 (REG_CLASS_NAMES): Ditto.
5757 (REG_CLASS_CONTENTS): Ditto.
5758 (SELECT_CC_MODE): Use new function.
5759 (TARGET_FLAGS_REGNUM): New macro.
5760 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5761 (cc0_reg_rtx): Remove.
5762 (CC_STATUS_MDEP): Remove.
5763 (CC_STATUS_MDEFP_INIT): Remove.
5764 (CC_IN_FPU): Remove.
5765 (NOTICE_UPDATE_CC): Remove.
5766 (REGISTER_NAMES): Add CC registers.
5767 (BRANCH_COST): Change to constant 1.
5768 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5770 * config/pdp11/pdp11.opt (mbcopy): Remove.
5771 (mbcopy-builtin): Remove.
5772 (mbranch-cheap): Remove.
5773 (mbranch-expensive): Remove.
5774 * config/pdp11/predicates.md (expand_shift_operand): Update to
5775 match shift code generation.
5776 (ccnz_operator): New predicate.
5777 * doc/invoke.texi (PDP-11 Options): Remove deleted options
5778 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5779 Remove non-existent option -mabshi, -mno-abshi. Document mutually
5781 * doc/md.texi (PDP-11): Document new D and h constraints. Update
5782 description of O constraint.
5784 2018-06-27 Jeff Law <law@redhat.com>
5785 Austin Law <austinklaw@gmail.com>
5787 * config/v850/v850.md (addsi3_set_flags): New pattern.
5788 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5789 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5790 (zero_extendhisi2_v850_set_flags): Likewise.
5791 (zero_extendqisi2_v850_set_flags): Likewise.
5792 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5793 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5794 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5796 * config/v850/v850-protos.h (notice_update_cc): Remove.
5797 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5798 (v850_print_operand): Handle 'D' and "d".
5799 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5800 Add handling of arithmetic/logical operations compared against zero.
5801 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5802 Do not look at v850_compare_op, instead get mode from last argument.
5803 (v850_gen_compare): Remove
5804 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5805 after reload for prologue insns.
5806 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5808 (construct_save_jarl): Likewise.
5809 (TARGET_FLAGS_REGNUM): Define.
5810 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5811 (NOTICE_UPDATE_CC): Remove.
5812 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5813 than cc0. Conditionalize on reload_completed.
5814 (cmpsi_insn, setfcc_insn): Likewise.
5815 (tst1 splitter): Turn into define_and_split which sets the flags
5817 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5818 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5819 (cstoresf4, cstoredf4): Clobber the flags.
5820 (cmpsi, cmpsf, cmpdf): Remove expanders.
5821 (setf_insn): Remove pattern.
5822 (addsi3): Turn into define_and_split which clobbers the flags after
5823 reload and a suitable pattern (addsi3_clobber_flags) for use after
5825 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5826 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5827 (ashrsi3, ashrsi3_v850e2): Likewise.
5828 (bins): Clobber the flags.
5829 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5830 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5831 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5832 (call_value_internal_short, call_value_internal_long): Likewise.
5833 (callt_save_interrupt, callt_return_interrupt): Likewise.
5834 (save_interrupt, return_interrupt): Likewise.
5835 (callt_save_all_interrupt, save_all_interrupt): Likewise.
5836 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5837 (restore_all_interrupt, _restore_all_interrupt): Likewise.
5838 (All FP comparisons): Only allow after reload has completed.
5840 (divh, divhu): Tweak output template.
5841 (branch_z_normal, branch_z_invert): Remove
5842 (branch_nz_normal, branch_nz_invert): Likewise.
5843 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5845 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5846 * config/v850/v850.c (notice_update_cc): Remove.
5847 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
5848 (CC_NO_CARRY): Likewise.
5849 (NOTICE_UPDATE_CC): Define to nothing.
5850 * config/v850/v850.md: Remove block comment on cc0 handling
5851 Remove "cc" attribute from all patterns. Remove cc_status handling
5852 from all patterns. Minor formatting fixes.
5854 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5856 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5857 (cortex-a76.cortex-a55): Likewise.
5858 * config/aarch64/aarch64-tune.md: Regenerate.
5859 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5860 cortex-a76.cortex-a55.
5862 2018-06-27 Jeff Law <law@redhat.com>
5864 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5865 (MULTILIB_DIRNAMES): Similarly.
5867 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
5869 * gimple.h (gimple_return_retbnd): Delete.
5870 (gimple_return_set_retbnd): Likewise.
5871 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5872 gimple_return_set_retbnd.
5873 * gimple-pretty-print.c (dump_gimple_return): Remove call to
5874 gimple_return_retbnd and adjust.
5875 * tree-inline.h (struct copy_body_data): Remove retbnd field.
5876 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5877 Explicitly return NULL in a couple more cases. Move assertion
5878 on debug statements and remove unreachable code.
5879 (reset_debug_binding): Do not test id->retbnd.
5880 (expand_call_inline): Do not set it.
5882 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5884 * configure.ac: Add --disable-gcov option.
5885 * configure: Regenerate.
5886 * Makefile.in: Honour @enable_gcov@.
5887 * doc/install.texi: Document --disable-gcov.
5889 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5891 * config/arm/arm-cpus.in (cortex-a76): New entry.
5892 (cortex-a76.cortex-a55): Likewise.
5893 * config/arm/arm-tables.opt: Regenerate.
5894 * config/arm/arm-tune.md: Likewise.
5895 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5896 * doc/invoke.texi (ARM Options): Document cortex-a76 and
5897 cortex-a76.cortex-a55.
5899 2018-06-27 Tamar Christina <tamar.christina@arm.com>
5902 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5904 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
5906 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5908 (EPILOGUE_USES): Likewise.
5910 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
5912 * tree-inline.c (remap_location): New function extracted from...
5913 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
5914 (copy_phis_for_bb): ...here. Call remap_location.
5915 (copy_cfg_body): Adjust call to copy_edges_for_bb.
5917 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5919 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5920 unaligned vsx for 16B memset.
5922 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
5925 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5926 ieee128_float_type_node to long_double_type_node unless
5927 TARGET_LONG_DOUBLE_128 is set.
5929 2018-06-26 David Malcolm <dmalcolm@redhat.com>
5931 * cfgloop.c (get_loop_location): Convert return type from
5932 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5933 by implicit construction from rtx_insn *, and using
5934 dump_user_location_t::from_function_decl for the fallback case.
5935 * cfgloop.h (get_loop_location): Convert return type from
5936 location_t to dump_user_location_t.
5937 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5938 dump_printf_loc to pass in a dump_location_t rather than a
5939 location_t, via the gimple stmt.
5940 * coverage.c (get_coverage_counts): Update calls to
5941 dump_printf_loc to pass in dump_location_t rather than a
5943 * doc/optinfo.texi (Dump types): Convert example of
5944 dump_printf_loc from taking "locus" to taking "insn". Update
5945 description of the "_loc" calls to cover dump_location_t.
5946 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5948 (dump_user_location_t::dump_user_location_t): New constructors,
5949 from gimple *stmt and rtx_insn *.
5950 (dump_user_location_t::from_function_decl): New function.
5951 (dump_loc): Make static.
5952 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5953 const dump_location_t &.
5954 (dump_generic_expr_loc): Delete.
5955 (dump_printf_loc): Convert param "loc" from location_t to
5956 const dump_location_t &.
5957 (selftest::test_impl_location): New function.
5958 (selftest::dumpfile_c_tests): New function.
5959 * dumpfile.h: Include "profile-count.h".
5960 (class dump_user_location_t): New class.
5961 (struct dump_impl_location_t): New struct.
5962 (class dump_location_t): New class.
5963 (dump_printf_loc): Convert 2nd param from source_location to
5964 const dump_location_t &.
5965 (dump_generic_expr_loc): Delete.
5966 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5967 const dump_location_t &.
5968 * gimple-fold.c (fold_gimple_assign): Update call to
5969 dump_printf_loc to pass in a dump_location_t rather than a
5970 location_t, via the gimple stmt.
5971 (gimple_fold_call): Likewise.
5972 * gimple-loop-interchange.cc
5973 (loop_cand::analyze_iloop_reduction_var): Update for change to
5974 check_reduction_path.
5975 (tree_loop_interchange::interchange): Update for change to
5977 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5978 change in return-type of find_loop_location.
5979 (graphite_regenerate_ast_isl): Likewise.
5980 * graphite-optimize-isl.c (optimize_isl): Likewise.
5981 * graphite.c (graphite_transform_loops): Likewise.
5982 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5983 pass in a dump_location_t rather than a location_t, via the
5985 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5986 * ipa.c (walk_polymorphic_call_targets): Likewise.
5987 * loop-unroll.c (report_unroll): Convert "locus" param from
5988 location_t to dump_location_t.
5989 (decide_unrolling): Update for change to get_loop_location's
5991 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5992 location_t to dump_user_location_t.
5993 (grid_find_single_omp_among_assignments_1): Updates calls to
5994 dump_printf_loc to pass in a dump_location_t rather than a
5995 location_t, via the gimple stmt.
5996 (grid_parallel_clauses_gridifiable): Convert "tloc" from
5997 location_t to dump_location_t. Updates calls to dump_printf_loc
5998 to pass in a dump_location_t rather than a location_t, via the
6000 (grid_inner_loop_gridifiable_p): Likewise.
6001 (grid_dist_follows_simple_pattern): Likewise.
6002 (grid_gfor_follows_tiling_pattern): Likewise.
6003 (grid_target_follows_gridifiable_pattern): Likewise.
6004 (grid_attempt_target_gridification): Convert initialization
6005 of local "grid" from memset to zero-initialization; FIXME: does
6006 this require C++11? Update call to dump_printf_loc to pass in a
6007 optinfo_location rather than a location_t, via the gimple stmt.
6008 * profile.c (read_profile_edge_counts): Updates call to
6009 dump_printf_loc to pass in a dump_location_t rather than a
6011 (compute_branch_probabilities): Likewise.
6012 * selftest-run-tests.c (selftest::run_tests): Call
6014 * selftest.h (dumpfile_c_tests): New decl.
6015 * tree-loop-distribution.c (pass_loop_distribution::execute):
6016 Update for change in return type of find_loop_location.
6017 * tree-parloops.c (parallelize_loops): Likewise.
6018 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6019 "locus" from location_t to dump_user_location_t.
6020 (canonicalize_loop_induction_variables): Likewise.
6021 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6022 for change in return type of find_loop_location.
6023 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6024 to dump_printf_loc to pass in a dump_location_t rather than a
6025 location_t, via the stmt.
6026 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6028 * tree-vect-loop-manip.c (find_loop_location): Convert return
6029 type from source_location to dump_user_location_t.
6030 (vect_do_peeling): Update for above change.
6031 (vect_loop_versioning): Update for change in type of
6033 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6034 from location_t to dump_user_location_t.
6035 (vect_estimate_min_profitable_iters): Update for change in type
6037 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6038 location_t to dump_location_t.
6039 (vect_slp_bb): Update for change in type of vect_location.
6040 * tree-vectorizer.c (vect_location): Convert from source_location
6041 to dump_user_location_t.
6042 (try_vectorize_loop_1): Update for change in vect_location's type.
6043 (vectorize_loops): Likewise.
6044 (increase_alignment): Likewise.
6045 * tree-vectorizer.h (vect_location): Convert from source_location
6046 to dump_user_location_t.
6047 (find_loop_location): Convert return type from source_location to
6048 dump_user_location_t.
6049 (check_reduction_path): Convert 1st param from location_t to
6050 dump_user_location_t.
6051 * value-prof.c (check_counter): Update call to dump_printf_loc to
6052 pass in a dump_user_location_t rather than a location_t; update
6053 call to error_at for change in type of "locus".
6054 (check_ic_target): Update call to dump_printf_loc to
6055 pass in a dump_user_location_t rather than a location_t, via the
6058 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6060 * config/s390/s390.h (enum processor_flags): Do not use
6061 default tune parameter when -march was specified.
6063 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6066 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6067 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6070 2018-06-26 Richard Biener <rguenther@suse.de>
6072 PR tree-optimization/86287
6074 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6075 (vect_analyze_loop): Initialize n_stmts.
6077 2018-06-26 Richard Biener <rguenther@suse.de>
6080 * fold-const.c (fold_convertible_p): Pointer extension
6083 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6086 * dwarf2out.c (loc_list_has_views): Adjust comments.
6087 (dw_loc_list): Split single cross-partition range with
6090 2018-06-25 Jeff Law <law@redhat.com>
6092 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6093 on -mbig-switch by default.
6095 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6097 (const_float_0_operand): Remove unused predicate.
6098 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6099 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6100 (recipsf2): New expander. Original pattern now called
6102 (recipdf2, recipdf2_insn): Similarly.
6103 (rsqrtsf2, rsqrtsf2_insn): Similarly
6104 (rsqrtdf2, rsqrtdf2_insn): Similarly
6106 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6108 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6109 Simplify logic for FreeBSD (twice).
6111 2018-06-25 Martin Sebor <msebor@redhat.com>
6113 PR tree-optimization/86204
6114 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6115 a strnlen result if it's less than the length of the string.
6117 2018-06-25 Martin Sebor <msebor@redhat.com>
6119 PR tree-optimization/85700
6120 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6121 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6122 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6124 2018-06-25 Martin Sebor <msebor@redhat.com>
6126 * doc/extend.texi (Zero-length arrays): Update and clarify.
6128 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6130 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6131 added IEEE/IBM long double multilib support on PowerPC little
6132 endian Linux systems.
6133 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6134 (MULTILIB_DEFAULTS): Likewise.
6135 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6137 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6138 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6139 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6141 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6144 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6145 (REORDER_45): Likewise.
6147 2018-06-25 Jeff Law <law@redhat.com>
6149 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6150 dividend to 32 bits. Adjust length.
6151 (udivmodhi4): Cleanup output template. Fix length.
6153 2018-06-25 Carl Love <cel@us.ibm.com>
6155 * config/rs6000/vsx.md: Change word selector to prefered location.
6157 2018-06-25 Richard Biener <rguenther@suse.de>
6159 PR tree-optimization/86304
6160 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6161 epilogue-if-converted loops as well.
6163 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6165 * lto-section-out.c (lto_begin_section): Do not print section
6166 name for noaddr and unnumbered dumps.
6168 2018-06-25 Richard Biener <rguenther@suse.de>
6170 * tree-vectorizer.h (struct vec_info_shared): New structure
6171 with parts split out from struct vec_info and loop_nest from
6172 struct _loop_vec_info.
6173 (struct vec_info): Adjust accordingly.
6174 (struct _loop_vec_info): Likewise.
6175 (LOOP_VINFO_LOOP_NEST): Adjust.
6176 (LOOP_VINFO_DATAREFS): Likewise.
6177 (LOOP_VINFO_DDRS): Likewise.
6178 (struct _bb_vec_info): Likewise.
6179 (BB_VINFO_DATAREFS): Likewise.
6180 (BB_VINFO_DDRS): Likewise.
6181 (struct _stmt_vec_info): Add dr_aux member.
6182 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6183 (DR_MISALIGNMENT_UNINITIALIZED): New.
6184 (set_dr_misalignment): Adjust.
6185 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6186 (vect_analyze_loop): Adjust prototype.
6187 (vect_analyze_loop_form): Likewise.
6188 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6189 Compute dependences lazily.
6190 (vect_record_base_alignments): Use shared datarefs/ddrs.
6191 (vect_verify_datarefs_alignment): Likewise.
6192 (vect_analyze_data_refs_alignment): Likewise.
6193 (vect_analyze_data_ref_accesses): Likewise.
6194 (vect_analyze_data_refs): Likewise.
6195 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6196 constructor parameter for shared part.
6197 (vect_analyze_loop_form): Pass in shared part and adjust.
6198 (vect_analyze_loop_2): Pass in storage for the number of
6199 stmts. Move loop nest finding to the caller. Compute
6201 (vect_analyze_loop): Pass in shared part.
6202 (vect_transform_loop): Verify shared datarefs are unchanged.
6203 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6204 constructor parameter for shared part.
6205 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6206 (vect_slp_bb): Verify shared datarefs are unchanged before
6208 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6210 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6211 DR_MISALIGNMENT_UNINITIALIZED.
6212 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6213 parameter for shared part.
6214 (vec_info::~vec_info): Adjust.
6215 (vec_info_shared::vec_info_shared): New.
6216 (vec_info_shared::~vec_info_shared): Likewise.
6217 (vec_info_shared::save_datarefs): Likewise.
6218 (vec_info_shared::check_datarefs): Likewise.
6219 (try_vectorize_loop_1): Construct shared part live for analyses
6220 of a single loop for multiple vector sizes.
6221 * tree-parloops.c (gather_scalar_reductions): Adjust.
6223 2018-06-25 Richard Biener <rguenther@suse.de>
6225 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6226 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6227 (vect_analyze_data_refs): Remove similar code from here and
6228 simplify accordingly.
6230 2018-06-25 Richard Biener <rguenther@suse.de>
6232 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6233 for reverse storage order accesses rather than asserting
6234 they cannot happen here.
6236 2018-06-25 Tom de Vries <tdevries@suse.de>
6239 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6240 Use data16 instead of .byte for insn prefix.
6242 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6245 * parser.c (make_char_string_pack): Pass this literal chars
6246 through cpp_interpret_string.
6247 (cp_parser_userdef_numeric_literal): Check the result of
6248 make_char_string_pack.
6250 2018-06-24 Maya Rashish <coypu@sdf.org>
6252 * ginclude/stddef.h: Simplify conditions around avoiding
6253 re-definition of __size_t.
6255 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6257 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6258 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6260 2018-06-22 Maya Rashish <coypu@sdf.org>
6262 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6263 made to OpenBSD and NetBSD through the years.
6265 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6267 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6268 behavior of vec_pack (vector double, vector double) to match
6269 behavior of vec_float2 (vector double, vector double).
6271 2018-06-22 Olivier Hainque <hainque@adacore.com>
6273 * gimplify.c (gimplify_function_tree): Prevent creation
6274 of a trampoline for the address of the current function
6275 passed to entry/exit instrumentation hooks.
6277 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6280 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6283 2018-06-22 Martin Liska <mliska@suse.cz>
6285 PR tree-optimization/86263
6286 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6287 Bail out if is_enabled is false.
6288 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6290 (jump_table_cluster::is_enabled): New function.
6292 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6294 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6295 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6296 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6297 (lto_input_ts_binfo_tree_pointers): Likewise.
6298 * tree-streamer-out.c (streamer_write_tree_bitfields,
6299 write_ts_binfo_tree_pointers): Likewise.
6300 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6302 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6304 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6306 2018-06-22 Martin Liska <mliska@suse.cz>
6308 * symbol-summary.h (get): Make it pure and inline move
6309 functionality from ::get function.
6310 (get): Remove and inline into ::get and ::get_create.
6311 (get_create): Move code from ::get function.
6313 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6316 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6317 -x assembler-with-cpp.
6319 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6321 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6322 _FILE_OFFSET_BITS=64 for C++.
6324 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6326 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6327 conversion insn that shows up when pr85657-3.c is compiled using
6328 IEEE 128-bit long double.
6329 (neg<mode>2_internal): Use the correct mode to check whether the
6330 mode is IBM extended.
6331 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6332 multiply and divide external functions from being created more
6335 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6337 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6339 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6340 the edge can be forwarded.
6341 (cfg_layout_merge_blocks): Likewise.
6343 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6345 * except.c (finish_eh_generation): Commit edge insertions only after
6346 the EH edges have been redirected from post-landing to landing pads.
6348 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6350 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6351 create_tmp_var_for to create the FRAME decl.
6352 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6354 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6356 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6357 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6358 debug statement when resetting its value.
6359 (expand_call_inline): Copy the locus of the call onto the assignment
6360 of the return value, if any. Use local variable in more cases.
6362 2018-06-21 Martin Liska <mliska@suse.cz>
6364 * ipa-pure-const.c (propagate_nothrow): Use
6365 funct_state_summaries->get.
6366 (dump_malloc_lattice): Likewise.
6367 (propagate_malloc): Likewise.
6369 2018-06-21 Richard Biener <rguenther@suse.de>
6371 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6372 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6373 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6375 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6376 BLOCK_ABSTRACT_ORIGIN unconditionally.
6378 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6380 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6382 * ipa-reference.c (ipa_reference_c_finalize): Delete
6383 ipa_ref_opt_sum_summaries and set it to NULL.
6385 2018-06-21 Tom de Vries <tdevries@suse.de>
6387 PR tree-optimization/85859
6388 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6389 test with comment from bb_no_side_effects_p.
6391 2018-06-21 Richard Biener <rguenther@suse.de>
6393 PR tree-optimization/86232
6394 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6395 max for constant niter.
6397 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6399 * config/aarch64/aarch64-simd.md
6400 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6402 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6404 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6405 Make opernads of the unspec commutative.
6407 2018-06-21 Richard Biener <rguenther@suse.de>
6409 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6410 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6411 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6412 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6414 (vect_record_base_alignments): Do not record base alignment
6415 for gathers or scatters.
6416 (vect_compute_data_ref_alignment): Drop return value that is always
6417 true. Bail out early for gathers or scatters.
6418 (vect_enhance_data_refs_alignment): Bail out early for gathers
6420 (vect_find_same_alignment_drs): Likewise.
6421 (vect_analyze_data_refs_alignment): Remove dead code.
6422 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6423 (vect_analyze_data_refs): For possible gathers or scatters do
6424 not create an alternate DR, just check their possible validity
6425 and mark them. Adjust DECL_NONALIASED handling to not rely
6427 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6428 update inits of gathers or scatters.
6429 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6430 Also copy gather/scatter flag to pattern vinfo.
6432 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6434 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6435 behavior of vec_packsu (vector unsigned long long, vector unsigned
6436 long long) to match behavior of vec_packs with same signature.
6438 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6439 Thomas Schwinge <thomas@codesourcery.com>
6440 Cesar Philippidis <cesar@codesourcery.com>
6442 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6443 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6444 (gimplify_adjust_omp_clauses): Likewise.
6445 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6446 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6447 (gimplify_omp_target_update): Update handling of acc update and
6449 * omp-low.c (install_var_field): Remove unused parameter
6450 base_pointers_restrict.
6451 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6452 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6454 (omp_target_base_pointers_restrict_p): Delete.
6455 (scan_omp_target): Update call to scan_sharing_clauses.
6456 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6458 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6459 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6460 (convert_local_omp_clauses): Likewise.
6461 * tree-pretty-print.c (dump_omp_clause): Likewise.
6462 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6464 (omp_clause_code_name): Likewise.
6466 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6469 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6472 PR tree-optimization/86231
6473 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6474 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6476 2018-06-20 Tom de Vries <tdevries@suse.de>
6478 PR tree-optimization/86097
6479 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6480 iv type if signedness of iv type is not the same as that of *nit.
6482 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6484 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6485 EDGE_EH edges, verify they are all EDGE_EH.
6487 2018-06-20 Maya Rashish <coypu@sdf.org>
6489 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6491 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6493 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6494 * config/aarch64/aarch64.c (xgene1_tunings): Add
6495 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6496 (aarch64_mode_valid_for_sched_fusion_p):
6497 Allow 16-byte modes.
6498 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6499 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6501 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6503 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6504 * config/aarch64/iterators.md (VQ2): New mode iterator.
6506 2018-06-20 Martin Liska <mliska@suse.cz>
6508 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6509 Change default ratio from 10 to 8.
6511 2018-06-20 Martin Liska <mliska@suse.cz>
6513 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6515 (bit_test_cluster::find_bit_tests): Likewise.
6516 (switch_decision_tree::analyze_switch_statement): Find clusters.
6517 * tree-switch-conversion.h (struct jump_table_cluster): Document
6520 2018-06-20 Martin Liska <mliska@suse.cz>
6522 * tree-switch-conversion.c (switch_conversion::collect):
6523 Record m_uniq property.
6524 (switch_conversion::expand): Bail out for special conditions.
6525 (group_cluster::~group_cluster): New.
6526 (group_cluster::group_cluster): Likewise.
6527 (group_cluster::dump): Likewise.
6528 (jump_table_cluster::emit): New.
6529 (switch_decision_tree::fix_phi_operands_for_edges): New.
6530 (struct case_node): Remove struct.
6531 (jump_table_cluster::can_be_handled): New.
6532 (case_values_threshold): Moved to header.
6533 (reset_out_edges_aux): Likewise.
6534 (jump_table_cluster::is_beneficial): New.
6535 (bit_test_cluster::can_be_handled): Likewise.
6536 (add_case_node): Remove.
6537 (bit_test_cluster::is_beneficial): New.
6538 (case_bit_test::cmp): New.
6539 (bit_test_cluster::emit): New.
6540 (expand_switch_as_decision_tree_p): Remove.
6541 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6542 (fix_phi_operands_for_edge): Likewise.
6543 (switch_decision_tree::analyze_switch_statement): New.
6544 (compute_cases_per_edge): Move ...
6545 (switch_decision_tree::compute_cases_per_edge): ... here.
6546 (try_switch_expansion): Likewise.
6547 (switch_decision_tree::try_switch_expansion): Likewise.
6548 (record_phi_operand_mapping): Likewise.
6549 (switch_decision_tree::record_phi_operand_mapping): Likewise.
6550 (emit_case_decision_tree): Likewise.
6551 (switch_decision_tree::emit): Likewise.
6552 (balance_case_nodes): Likewise.
6553 (switch_decision_tree::balance_case_nodes): Likewise.
6554 (dump_case_nodes): Likewise.
6555 (switch_decision_tree::dump_case_nodes): Likewise.
6556 (emit_jump): Likewise.
6557 (switch_decision_tree::emit_jump): Likewise.
6558 (emit_cmp_and_jump_insns): Likewise.
6559 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6560 (emit_case_nodes): Likewise.
6561 (switch_decision_tree::emit_case_nodes): Likewise.
6562 (conditional_probability): Remove.
6563 * tree-switch-conversion.h (enum cluster_type): New.
6565 (struct cluster): Likewise.
6566 (cluster::cluster): Likewise.
6567 (struct simple_cluster): Likewise.
6568 (simple_cluster::simple_cluster): Likewise.
6569 (struct group_cluster): Likewise.
6570 (struct jump_table_cluster): Likewise.
6571 (struct bit_test_cluster): Likewise.
6572 (struct min_cluster_item): Likewise.
6573 (struct case_tree_node): Likewise.
6574 (case_tree_node::case_tree_node): Likewise.
6575 (jump_table_cluster::case_values_threshold): Likewise.
6576 (struct case_bit_test): Likewise.
6577 (struct switch_decision_tree): Likewise.
6578 (struct switch_conversion): Likewise.
6579 (switch_decision_tree::reset_out_edges_aux): Likewise.
6581 2018-06-20 Martin Liska <mliska@suse.cz>
6583 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6584 (hoist_edge_and_branch_if_true): Likewise.
6585 (expand_switch_using_bit_tests_p): Likewise.
6586 (struct case_bit_test): Likewise.
6587 (case_bit_test_cmp): Likewise.
6588 (emit_case_bit_tests): Likewise.
6589 (switch_conversion::switch_conversion): New class.
6590 (struct switch_conv_info): Remove old struct.
6591 (collect_switch_conv_info): More to ...
6592 (switch_conversion::collect): ... this.
6593 (check_range): Likewise.
6594 (switch_conversion::check_range): Likewise.
6595 (check_all_empty_except_final): Likewise.
6596 (switch_conversion::check_all_empty_except_final): Likewise.
6597 (check_final_bb): Likewise.
6598 (switch_conversion::check_final_bb): Likewise.
6599 (create_temp_arrays): Likewise.
6600 (switch_conversion::create_temp_arrays): Likewise.
6601 (free_temp_arrays): Likewise.
6602 (gather_default_values): Likewise.
6603 (switch_conversion::gather_default_values): Likewise.
6604 (build_constructors): Likewise.
6605 (switch_conversion::build_constructors): Likewise.
6606 (constructor_contains_same_values_p): Likewise.
6607 (switch_conversion::contains_same_values_p): Likewise.
6608 (array_value_type): Likewise.
6609 (switch_conversion::array_value_type): Likewise.
6610 (build_one_array): Likewise.
6611 (switch_conversion::build_one_array): Likewise.
6612 (build_arrays): Likewise.
6613 (switch_conversion::build_arrays): Likewise.
6614 (gen_def_assigns): Likewise.
6615 (switch_conversion::gen_def_assigns): Likewise.
6616 (prune_bbs): Likewise.
6617 (switch_conversion::prune_bbs): Likewise.
6618 (fix_phi_nodes): Likewise.
6619 (switch_conversion::fix_phi_nodes): Likewise.
6620 (gen_inbound_check): Likewise.
6621 (switch_conversion::gen_inbound_check): Likewise.
6622 (process_switch): Use the newly created class.
6623 (switch_conversion::expand): New.
6624 (switch_conversion::~switch_conversion): New.
6625 * tree-switch-conversion.h: New file.
6627 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6629 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6630 tree-vect-patterns.c.
6631 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6632 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6633 (vect_recog_sad_pattern): Likewise.
6634 (vect_recog_widen_sum_pattern): Likewise.
6635 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6636 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6637 (vect_recog_rotate_pattern): Likewise.
6638 (vect_recog_mult_pattern): Likewise.
6639 (vect_recog_vector_vector_shift_pattern): Likewise.
6640 (vect_recog_divmod_pattern): Likewise.
6641 (vect_recog_mixed_size_cond_pattern): Likewise.
6642 (vect_recog_bool_pattern): Likewise.
6643 (vect_recog_mask_conversion_pattern): Likewise.
6644 (vect_try_gather_scatter_pattern): Likewise.
6645 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6646 (vect_recog_over_widening_pattern): Likewise.
6647 (vect_recog_gather_scatter_pattern): Likewise.
6648 (vect_recog_func_ptr): Move from tree-vectorizer.h
6649 (vect_vect_recog_func_ptrs): Move further down the file.
6650 (vect_recog_func): Likewise. Remove the third argument.
6651 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6652 (vect_pattern_recog_1): Expect the pattern function to do any
6653 necessary target tests. Also expect it to provide a vector type.
6654 Remove the type_in handling.
6656 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6658 * tree-vect-patterns.c (vect_pattern_detected): New function.
6659 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6660 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6661 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6662 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6663 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6664 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6665 (vect_recog_mask_conversion_pattern)
6666 (vect_try_gather_scatter_pattern): Likewise.
6668 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6670 * tree-vect-patterns.c (vect_get_internal_def): New function.
6671 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6672 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6673 (search_type_for_mask_1): Use it.
6675 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6677 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6678 redundant WIDEN_SUM_EXPR handling.
6679 (vect_recog_sad_pattern): Likewise.
6681 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6683 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6684 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6685 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6686 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6687 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6689 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6691 * tree-vect-stmts.c (vectorizable_call): Make sure that we
6692 use the stmt_vec_info of the original bb statement for the
6693 new zero assignment, even if the call is part of a pattern.
6695 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6697 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6698 that the sequence is attached to the original statement rather
6699 than the pattern statement.
6700 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6701 PATTERN_DEF_SEQ from the original statement rather than
6702 the main pattern statement.
6703 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6704 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6705 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6707 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6709 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6710 definition statements before the early exit for statements that aren't
6712 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6714 (vect_transform_loop): ...here. Process pattern definition
6715 statements without first checking whether the main pattern
6716 statement is live or relevant.
6718 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6720 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6721 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6723 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
6725 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6726 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6727 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6728 (expand_block_compare): Change select_block_compare_mode call.
6729 (expand_strncmp_align_check): Use new functions, fix comment.
6730 (emit_final_str_compare_gpr): New function.
6731 (expand_strn_compare): Refactor and clean up code.
6732 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6734 2018-06-19 Tony Reix <tony.reix@atos.com>
6735 Damien Bergamini <damien.bergamini@atos.com>
6736 David Edelsohn <dje.gcc@gmail.com>
6738 * collect2.c (static_obj): New variable.
6739 (static_libs): New variable.
6740 (is_in_list): Uncomment declaration.
6741 (main): Track AIX libraries linked statically.
6742 (is_in_list): Uncomment definition.
6743 (scan_prog_file): Don't add AIX shared libraries initializer
6744 to constructor list if linking statically.
6746 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
6748 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6750 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6752 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
6754 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6757 2018-06-19 Martin Liska <mliska@suse.cz>
6759 * config/i386/i386.c (ix86_can_inline_p): Do not use
6760 ipa_fn_summaries::get_create.
6761 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6763 (devirtualization_time_bonus): Likewise.
6764 (ipcp_propagate_stage): Likewise.
6765 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6766 (edge_set_predicate): Likewise.
6767 (evaluate_conditions_for_known_args): Likewise.
6768 (evaluate_properties_for_edge): Likewise.
6769 (ipa_call_summary::reset): Tranform to ...
6770 (ipa_call_summary::~ipa_call_summary): ... this.
6771 (ipa_fn_summary::reset): Transform to ...
6772 (ipa_fn_summary::~ipa_fn_summary): ... this.
6773 (ipa_fn_summary_t::remove): Rename to ...
6774 (ipa_fn_summary_t::remove_callees): ... this.
6775 (ipa_fn_summary_t::duplicate): Use placement new
6776 instead of memory copy.
6777 (ipa_call_summary_t::duplicate): Likewise.
6778 (ipa_call_summary_t::remove): Remove.
6779 (dump_ipa_call_summary): Change get_create to get.
6780 (ipa_dump_fn_summary): Dump only when summary exists.
6781 (analyze_function_body): Use symbol_summary::get instead
6783 (compute_fn_summary): Likewise.
6784 (estimate_edge_devirt_benefit): Likewise.
6785 (estimate_edge_size_and_time): Likewise.
6786 (inline_update_callee_summaries): Likewise.
6787 (remap_edge_change_prob): Likewise.
6788 (remap_edge_summaries): Likewise.
6789 (ipa_merge_fn_summary_after_inlining): Likewise.
6790 (write_ipa_call_summary): Likewise.
6791 (ipa_fn_summary_write): Likewise.
6792 (ipa_free_fn_summary): Likewise.
6793 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6794 (struct ipa_call_summary): Likewise.
6795 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6797 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6798 (estimate_size_after_inlining): Likewise.
6799 (estimate_growth): Likewise.
6800 (growth_likely_positive): Likewise.
6801 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6802 (inline_call): Likewise.
6803 * ipa-inline.c (caller_growth_limits): Likewise.
6804 (can_inline_edge_p): Likewise.
6805 (can_inline_edge_by_limits_p): Likewise.
6806 (compute_uninlined_call_time): Likewise.
6807 (compute_inlined_call_time): Likewise.
6808 (want_inline_small_function_p): Likewise.
6809 (edge_badness): Likewise.
6810 (update_caller_keys): Likewise.
6811 (update_callee_keys): Likewise.
6812 (inline_small_functions): Likewise.
6813 (inline_to_all_callers_1): Likewise.
6814 (dump_overall_stats): Likewise.
6815 (early_inline_small_functions): Likewise.
6816 (early_inliner): Likewise.
6817 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6818 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6819 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6820 * ipa-split.c (execute_split_functions): Likewise.
6821 * symbol-summary.h: Likewise.
6822 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6824 2018-06-19 Richard Biener <rguenther@suse.de>
6826 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6827 (vectorize_loops): ... here. Fix dbgcnt handling.
6828 (try_vectorize_loop): Wrap try_vectorize_loop_1.
6830 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
6833 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6834 ieee128 argument takes up only one (vector) register, not two (floating
6837 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6839 * gimplify.c (gimplify_init_constructor): Really never clear for an
6840 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6842 2018-06-19 Richard Biener <rguenther@suse.de>
6844 PR tree-optimization/86179
6845 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6846 after failed recognition.
6848 2018-06-18 Martin Sebor <msebor@redhat.com>
6851 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6852 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6853 Handle integer subtraction.
6854 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6855 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6857 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6859 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6860 param from rtx to rtx_insn *.
6861 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6863 (frv_ifcvt_modify_insn): Likwise.
6864 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6865 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
6866 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6867 as_a <rtx_insn *> cast to local "unprotected_region" once
6868 it's been established that it's not NULL or pc_rtx.
6869 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6870 param "sethi" from rtx to rtx_insn *.
6871 (nds32_group_float_insns): Likewise for param "insn".
6872 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6874 (vax_output_int_subtract): Likewise.
6875 * config/vax/vax.c (vax_output_int_add): Likewise for param
6877 (vax_output_int_subtract): Likewise.
6878 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6879 (emit_pattern_after): Likewise for param "after".
6880 (emit_insn_after): Likewise.
6881 (emit_jump_insn_after): Likewise.
6882 (emit_call_insn_after): Likewise.
6883 (emit_debug_insn_after): Likewise.
6884 (emit_pattern_before): Likewise for param "before".
6885 (emit_insn_before): Likewise.
6886 (emit_jump_insn_before): Likewise.
6887 * final.c (get_insn_template): Likewise for param "insn", removing
6889 * output.h (get_insn_template): Likewise for 2nd param.
6890 * rtl.h (emit_insn_before): Likewise.
6891 (emit_jump_insn_before): Likewise.
6892 (emit_debug_insn_before_noloc): Likewise.
6893 (emit_insn_after): Likewise.
6894 (emit_jump_insn_after): Likewise.
6895 (emit_call_insn_after): Likewise.
6896 (emit_debug_insn_after): Likewise.
6897 (set_insn_deleted): Likewise for param.
6899 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
6902 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6903 floating point modes, so that IFmode is numerically greater than
6904 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6905 to declare the ordering. This prevents IFmode from being
6906 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6907 machine. Include rs6000-modes.h to share the fractional values
6908 between genmodes* and the rest of the compiler.
6912 * config/rs6000/rs6000-modes.h: New file.
6913 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6914 meaning of rs6000_long_double_size so that 126..128 selects an
6915 appropriate 128-bit floating point type.
6916 (rs6000_option_override_internal): Likewise.
6917 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6918 (TARGET_LONG_DOUBLE_128): Change the meaning of
6919 rs6000_long_double_size so that 126..128 selects an appropriate
6920 128-bit floating point type.
6921 (LONG_DOUBLE_TYPE_SIZE): Update comment.
6922 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6923 source and destination to match the standard usage.
6924 (truncifkf2): Likewise.
6925 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6926 ISA 2.07 to use an explicit clobber, instead of passing in a
6928 (copysign<mode>3_soft): Likewise.
6930 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6932 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6933 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6934 (vect_slp_analyze_instance_dependence): Likewise.
6935 (vect_enhance_data_refs_alignment): Likewise.
6936 (vect_analyze_data_refs_alignment): Likewise.
6937 (vect_slp_analyze_and_verify_instance_alignment
6938 (vect_analyze_data_ref_accesses): Likewise.
6939 (vect_prune_runtime_alias_test_list): Likewise.
6940 (vect_analyze_data_refs): Likewise.
6941 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6942 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6943 (vect_analyze_scalar_cycles_1): Likewise.
6944 (vect_get_loop_niters): Likewise.
6945 (vect_analyze_loop_form_1): Likewise.
6946 (vect_update_vf_for_slp): Likewise.
6947 (vect_analyze_loop_operations): Likewise.
6948 (vect_analyze_loop): Likewise.
6949 (vectorizable_induction): Likewise.
6950 (vect_transform_loop): Likewise.
6951 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6952 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6953 (vect_make_slp_decision): Likewise.
6954 (vect_detect_hybrid_slp): Likewise.
6955 (vect_slp_analyze_operations): Likewise.
6956 (vect_slp_bb): Likewise.
6957 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6958 (vectorizable_bswap): Likewise.
6959 (vectorizable_call): Likewise.
6960 (vectorizable_simd_clone_call): Likewise.
6961 (vectorizable_conversion): Likewise.
6962 (vectorizable_assignment): Likewise.
6963 (vectorizable_shift): Likewise.
6964 (vectorizable_operation): Likewise.
6965 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6967 2018-06-18 Martin Sebor <msebor@redhat.com>
6969 PR tree-optimization/81384
6970 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6971 * builtins.c (expand_builtin_strnlen): New function.
6972 (expand_builtin): Call it.
6973 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6974 * builtins.def (BUILT_IN_STRNLEN): New.
6975 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6976 Warn for bounds in excess of maximum object size.
6977 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6978 single-value ranges. Handle strnlen.
6979 (handle_builtin_strlen): Handle strnlen.
6980 (strlen_check_and_optimize_stmt): Same.
6981 * doc/extend.texi (Other Builtins): Document strnlen.
6983 2018-06-18 Maya Rashish <coypu@sdf.org>
6985 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6986 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6987 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6989 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6991 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6993 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6995 * tree.c (escaped_string::escape): Replace cast to char * by
6996 const_cast<char *> (unescaped).
6998 2018-06-18 Nick Clifton <nickc@redhat.com>
7001 * tree.c (escaped_string): New class. Converts an unescaped
7002 string into its escaped equivalent.
7003 (warn_deprecated_use): Use the new class to convert the
7004 deprecation message, if present.
7005 (test_escaped_strings): New self test.
7006 (test_c_tests): Add test_escaped_strings.
7007 * doc/extend.texi (deprecated): Add a note that the
7008 deprecation message is affected by the -fmessage-length
7009 option, and that control characters will be escaped.
7010 (#pragma GCC error): Document this pragma.
7011 (#pragma GCC warning): Likewise.
7012 * doc/invoke.texi (-fmessage-length): Document this option's
7013 effect on the #warning and #error preprocessor directives and
7014 the deprecated attribute.
7016 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7018 * tree.c (decl_value_expr_lookup): Revert latest change.
7019 (decl_value_expr_insert): Likewise.
7021 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7023 * gimplify.c (nonlocal_vlas): Delete.
7024 (nonlocal_vla_vars): Likewise.
7025 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7027 (gimplify_body): Do not create and destroy nonlocal_vlas.
7028 * tree-nested.c: Include diagnostic.h.
7029 (use_pointer_in_frame): Tweak.
7030 (lookup_field_for_decl): Add assertion and declare the transformation.
7031 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7032 internal error when the reference is in a wrong context. Do not
7033 create a debug decl by default.
7034 (note_nonlocal_block_vlas): Delete.
7035 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7036 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7037 create a debug decl by default.
7038 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7039 call is in a wrong context.
7040 (fixup_vla_decls): New function.
7041 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7042 debug variables were created.
7043 * tree.c (decl_value_expr_lookup): Add checking assertion.
7044 (decl_value_expr_insert): Likewise.
7046 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7049 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7050 * tree-scalar-evolution.c (interpret_expr): Likewise.
7051 (expression_expensive_p): Likewise.
7052 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7053 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7054 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7055 (ssa_defined_by_minus_one_stmt_p): New.
7057 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7060 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7061 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7062 * dojump.c (do_jump): Likewise.
7063 * expr.c (expand_expr_real_2): Check operand type's sign.
7064 * fold-const.c (const_unop): Handle ABSU_EXPR.
7065 (fold_abs_const): Likewise.
7066 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7067 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7068 (strip_sign_op_1): Likesise.
7069 * match.pd: Add new pattern to generate ABSU_EXPR.
7070 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7071 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7072 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7073 * tree-inline.c (estimate_operator_cost): Likewise.
7074 * tree-pretty-print.c (dump_generic_node): Likewise.
7075 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7076 * tree.def (ABSU_EXPR): New.
7078 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7081 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7082 documented as preserved for backward compatibility only.
7083 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7085 PR rtl-optimization/86108
7086 * bb-reorder.c (create_forwarder_block): Renamed to ...
7087 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7088 jump from new landing pad to the second part.
7089 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7092 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7095 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7096 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7097 Only call store_expr for halves if the mode is the same.
7100 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7101 Fix up comment formatting.
7103 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7105 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7106 (typed_splay_tree::closure,
7107 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7108 (typed_splay_tree::typed_splay_tree,
7109 typed_splay_tree::operator =): Declared private.
7110 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7111 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7112 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7113 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7114 typed_splay_tree::splay_tree_splay,
7115 typed_splay_tree::splay_tree_foreach_helper,
7116 typed_splay_tree::splay_tree_insert,
7117 typed_splay_tree::splay_tree_remove,
7118 typed_splay_tree::splay_tree_lookup,
7119 typed_splay_tree::splay_tree_predecessor,
7120 typed_splay_tree::splay_tree_successor,
7121 typed_splay_tree::splay_tree_min,
7122 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7123 (typed_splay_tree::root, typed_splay_tree::comp,
7124 typed_splay_tree::delete_key,
7125 typed_splay_tree::delete_value): New data members.
7126 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7127 typed_splay_tree::remove.
7129 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7131 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7132 -mginv and -mno-ginv to the assembler.
7133 * config/mips/mips.opt (-mcrc): New option.
7135 * doc/invoke.text (-mcrc): Document.
7138 2018-06-15 Nick Clifton <nickc@redhat.com>
7141 * tree.c (escaped_string): New class. Converts an unescaped
7142 string into its escaped equivalent.
7143 (warn_deprecated_use): Use the new class to convert the
7144 deprecation message, if present.
7145 (test_escaped_strings): New self test.
7146 (test_c_tests): Add test_escaped_strings.
7147 * doc/extend.texi (deprecated): Add a note that the
7148 deprecation message is affected by the -fmessage-length
7149 option, and that control characters will be escaped.
7150 (#pragma GCC error): Document this pragma.
7151 (#pragma GCC warning): Likewise.
7152 * doc/invoke.texi (-fmessage-length): Document this option's
7153 effect on the #warning and #error preprocessor directives and
7154 the deprecated attribute.
7156 2018-06-15 Richard Biener <rguenther@suse.de>
7158 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7159 here, also noting vector size used.
7160 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7161 size used in MSG_OPTIMIZED_LOCATIONS dump.
7162 (pass_slp_vectorize::execute): Adjust.
7164 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7167 * config/arc/arc.c (arc_return_address_register): Fix
7170 2018-06-15 Richard Biener <rguenther@suse.de>
7173 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7174 leave useless conversion stripping to force_gimple_operand_gsi.
7175 (gimplify_build2): Likewise.
7176 (gimplify_build1): Likewise.
7178 2018-06-15 Richard Biener <rguenther@suse.de>
7181 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7182 before adjusting their block.
7184 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7186 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7187 multilibs for *-*-rtems*.
7188 * config/riscv/t-rtems: New file.
7190 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7193 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7194 unsigned_type_for returns NULL.
7197 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7198 subregs of multi-word pseudos unless the float mode has word size.
7200 2018-06-14 Richard Biener <rguenther@suse.de>
7203 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7204 duplicate and harmful type_hash_canon.
7205 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7207 2018-06-14 Richard Biener <rguenther@suse.de>
7210 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7213 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7215 * config/rtems.h (STDINT_LONG32): Define.
7217 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7218 Prachi Godbole <prachi.godbole@imgtec.com>
7220 * config/mips/mips-cpus.def: Define P6600.
7221 * config/mips/mips-tables.opt: Regenerate.
7222 * config/mips/mips.c (mips_ucbranch_type): New enum.
7223 (mips_rtx_cost_data): Add support for P6600.
7224 (mips_issue_rate): Likewise.
7225 (mips_multipass_dfa_lookahead): Likewise.
7226 (mips_avoid_hazard): Likewise.
7227 (mips_reorg_process_insns): Likewise.
7228 (mips_classify_branch_p6600): New function.
7229 * config/mips/mips.h (TUNE_P6600): New define.
7230 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7231 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7232 * config/mips/mips.md: Include p6600.md.
7233 (processor): Add p6600.
7234 * config/mips/p6600.md: New file.
7235 * doc/invoke.texi: Add p6600 to supported architectures.
7237 2018-06-13 Martin Sebor <msebor@redhat.com>
7239 PR tree-optimization/86114
7240 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7242 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7244 2018-06-13 Richard Biener <rguenther@suse.de>
7246 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7247 Properly set vector type of the intermediate stmt.
7248 * tree-vect-stmts.c (vectorizable_operation): The destination
7249 var always has vectype_out type.
7251 2018-06-13 Jeff Law <law@redhat.com>
7253 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7254 integer 0 for argument to print_rtl_with_bb.
7255 (rl78_reorg): Likewise.
7257 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7259 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7260 from rtx to rtx_insn *.
7261 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7263 (add_sched_insns_for_speculation): Likewise for local "target",
7264 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7265 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7266 from rtx_insn ** to rtx_code_label **.
7267 (reorg_emit_nops): Likewise.
7268 (c6x_reorg): Likewise for local "call_labels".
7269 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7271 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7272 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7273 the loops over LABEL_REFS.
7274 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7276 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7277 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7278 (split_branches): Strengthen local "olabel" from rtx to
7279 rtx_insn *, adding a safe_as_a cast.
7280 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7282 (add_insn_after): Likewise for first two params.
7283 (add_insn_before): Likewise.
7284 (remove_insn): Likewise for param.
7285 (emit_pattern_before_noloc): Likewise for second and third params.
7286 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7287 (emit_call_insn_before_noloc): Likewise.
7288 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7290 (emit_barrier_before): Likewise.
7291 (emit_label_before): Strengthen "label" param from "rtx" to
7292 "rtx_code_label *". Strengthen "before" param from "rtx" to
7294 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7296 (emit_pattern_after_noloc): Likewise.
7297 (emit_insn_after_noloc): Likewise.
7298 (emit_jump_insn_after_noloc): Likewise.
7299 (emit_call_insn_after_noloc): Likewise.
7300 (emit_debug_insn_after_noloc): Likewise.
7301 (emit_barrier_after): Likewise.
7302 (emit_label_after): Likewise for both params.
7303 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7304 "loc" param from "int" to "location_t".
7305 (emit_insn_after_setloc): Likewise.
7306 (emit_jump_insn_after_setloc): Likewise.
7307 (emit_call_insn_after_setloc): Likewise.
7308 (emit_debug_insn_after_setloc): Likewise.
7309 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7310 "loc" param from "int" to "location_t".
7311 (emit_pattern_before): Convert NULL_RTX to NULL.
7312 (emit_insn_before_setloc): Convert "loc" param from "int" to
7314 (emit_jump_insn_before_setloc): Likewise.
7315 (emit_call_insn_before_setloc): Likewise.
7316 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7317 rtx_insn *. Convert "loc" param from "int" to "location_t".
7318 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7319 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7320 Convert 3rd param from "int" to "location_t".
7321 (emit_barrier_before, emit_barrier_after, next_real_insn):
7322 Strengthen param from rtx to rtx_insn *.
7323 (emit_label_before): Strengthen 1st param from "rtx" to
7324 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7326 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7327 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7328 Strengthen 2nd param from "rtx" to "rtx_insn *".
7329 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7330 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7331 Likewise. Convert 3rd param from "int" to "location_t".
7332 (emit_label_after): Strengthen 1st param from "rtx" to
7334 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7336 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7337 from "rtx" to "rtx_insn *".
7339 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7341 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7342 bodies streamed in with -Q.
7343 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7344 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7345 * gimple-streamer-out.c: Include gimple-pretty-print.h
7346 (output_bb): Dump stmts streamed.
7347 * lto-section-out.c: Include print-tree.h
7348 (lto_begin_section): Dump sections created.
7349 (lto_output_decl_index): Dump decl encoded.
7350 * lto-streamer-out.c: Include print-tree.h
7351 (create_output_block): Dump output block created.
7352 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7353 (output_function): Dump function output.
7354 (output_constructor): Dump constructor streamed.
7355 (write_global_stream): Output indexes encoded.
7356 (produce_asm_for_decls): Dump streams encoded.
7357 * lto-streamer.c (streamer_dump_file): New global var.
7358 * lto-streamer.h (streamer_dump_file): Declare.
7359 * passes.c (ipa_write_summaries): Initialize streamer dump.
7360 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7363 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7366 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7367 offsets for register save directives. Emit a second batch of save
7368 directives, if need be, when the function accesses prior frames.
7370 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7372 * config/arc/fpu.md (fmasf4): Force operand to register.
7373 (fnmasf4): Likewise.
7375 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7377 * config/arc/arc-protos.h (arc_pad_return): Remove.
7378 * config/arc/arc.c (machine_function): Remove force_short_suffix
7380 (arc_print_operand): Adjust printing of '&'.
7381 (arc_verify_short): Remove conditional printing of short suffix.
7382 (arc_final_prescan_insn): Remove reference to size_reason.
7383 (pad_return): New function.
7384 (arc_reorg): Call pad_return.
7385 (arc_pad_return): Remove.
7386 (arc_init_machine_status): Remove reference to force_short_suffix.
7387 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7388 (attr length): When attribute iscompact is true force to 2
7389 regardless; in the case of maybe check if we want to force the
7390 instruction to have 4 bytes length.
7391 (nopv): Change it to generate 4 byte long nop as well.
7392 (blockage): New pattern.
7393 (simple_return): Remove call to arc_pad_return.
7394 (p_return_i): Likewise.
7396 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7398 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7400 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7402 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7405 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7407 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7408 for ARC700 and ARCv2.
7410 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7413 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7414 operands[2] instead of operands[1].
7417 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7419 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7420 case, check whether the outer register overlaps an unallocatable
7421 register, not just whether it fits the required class.
7423 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7425 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7427 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7428 (memrefs_conflict_p): Likewise.
7429 (init_alias_analysis): Likewise.
7430 * cfgexpand.c (expand_debug_expr): Likewise.
7431 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7432 * cse.c (fold_rtx): Likewise.
7433 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7434 * expr.c (emit_block_move_hints): Likewise.
7435 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7436 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7437 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7438 (emit_group_store): Likewise.
7439 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7440 to read the PRE/POST_MODIFY increment.
7441 * calls.c (store_one_arg): Use strip_offset.
7442 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7444 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7446 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7447 (simplify_binary_operation_1): Extend CONST_INT handling to
7449 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7450 than a HOST_WIDE_INT.
7451 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7453 (adjust_mems, add_stores): Update accodingly.
7454 (vt_canonicalize_addr): Track polynomial offsets.
7455 (emit_note_insn_var_location): Likewise.
7456 (vt_add_function_parameter): Likewise.
7457 (vt_initialize): Likewise.
7459 2018-06-12 Jeff Law <law@redhat.com>
7461 * config.gcc (alpha*-*-freebsd*): Remove.
7462 * config/alpha/freebsd.h: Remove.
7464 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7467 * spellcheck-tree.c (levenshtein_distance): Rename to...
7468 (get_edit_distance): ...this, and update for underlying renaming.
7469 * spellcheck-tree.h (levenshtein_distance): Rename to...
7470 (get_edit_distance): ...this.
7471 * spellcheck.c (levenshtein_distance): Rename to...
7472 (get_edit_distance): ...this. Convert from Levenshtein distance
7473 to Damerau-Levenshtein distance by supporting transpositions of
7474 adjacent characters. Rename "v1" to "v_next" and "v0" to
7476 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7477 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7478 update for underlying renaming.
7479 (selftest::levenshtein_distance_unit_test): Rename to...
7480 (selftest::test_get_edit_distance_unit): ...this, and update for
7481 underlying renaming.
7482 (selftest::test_find_closest_string): Add example from PR 69968
7483 where transposition helps
7484 (selftest::test_metric_conditions): Update for renaming.
7485 (selftest::test_metric_conditions): Likewise.
7486 (selftest::spellcheck_c_tests): Likewise.
7487 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7488 (get_edit_distance): ...this.
7489 (best_match::consider): Update for renaming.
7491 2018-06-12 Martin Sebor <msebor@redhat.com>
7493 PR tree-optimization/85259
7494 * builtins.c (compute_objsize): Handle constant offsets.
7495 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7496 true iff a warning has been issued.
7497 * gimple.h (gimple_nonartificial_location): New function.
7498 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7499 gimple_nonartificial_location and handle -Wno-system-headers.
7500 (handle_builtin_stxncpy): Same.
7502 2018-06-12 Martin Sebor <msebor@redhat.com>
7505 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7507 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
7509 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7510 BUILTIN_VEC_XST entries for pointer to double and long long.
7512 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
7515 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7517 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7520 2018-06-12 Martin Liska <mliska@suse.cz>
7522 * doc/options.texi: Document IntegerRange.
7524 2018-06-12 Martin Liska <mliska@suse.cz>
7526 * config/i386/i386.opt: Make MPX-related options as Deprecated.
7527 * opt-functions.awk: Handle Deprecated flag.
7528 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7530 (read_cmdline_option): Report warning for a deprecated option.
7531 * opts.h (struct cl_option): Add new field cl_deprecated.
7532 (CL_ERR_DEPRECATED): New.
7534 2018-06-12 Martin Liska <mliska@suse.cz>
7536 * doc/options.texi: Document Deprecated option flag.
7538 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7540 * config/arc/arc-arch.h (arc_extras): New enum.
7541 (arc_cpu_t):Add field extra.
7542 (arc_cpu_types): Consider the extras.
7543 * config/arc/arc-cpus.def: Add extras info.
7544 * config/arc/arc-opts.h (processor_type): Consider extra field.
7545 * config/arc/arc.c (arc_override_options): Handle extra field.
7547 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7549 * config/arc/arc-arch.h: Update ARC_OPTX macro.
7550 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7552 * config/arc/arc.c (arc_init): Update pic warning.
7553 (irq_range): Update irq range parsing warnings.
7554 (arc_override_options): Update various warning messages.
7555 (arc_handle_aux_attribute): Likewise.
7557 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
7559 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7561 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7563 * doc/sourcebuild.texi: Document usage of line number 0 in verify
7564 compiler messages directives.
7566 2018-06-12 Matthew Fortune <mfortune@gmail.com>
7568 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7569 * config/mips/mips-tables.opt: Regenerate.
7570 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7572 * doc/invoke.texi: Document -march=i6500.
7574 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
7576 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7577 (i6400_gpmul): Add cpu_unit.
7578 (i6400_gpdiv): Likewise.
7579 (i6400_msa_add_d): Update reservations.
7580 (i6400_msa_int_add) Likewise.
7581 (i6400_msa_short_logic3) Likewise.
7582 (i6400_msa_short_logic2) Likewise.
7583 (i6400_msa_short_logic) Likewise.
7584 (i6400_msa_move) Likewise.
7585 (i6400_msa_cmp) Likewise.
7586 (i6400_msa_short_float2) Likewise.
7587 (i6400_msa_div_d) Likewise.
7588 (i6400_msa_long_logic1) Likewise.
7589 (i6400_msa_long_logic2) Likewise.
7590 (i6400_msa_mult) Likewise.
7591 (i6400_msa_long_float2) Likewise.
7592 (i6400_msa_long_float4) Likewise.
7593 (i6400_msa_long_float5) Likewise.
7594 (i6400_msa_long_float8) Likewise.
7595 (i6400_fpu_fadd): Include frint type.
7596 (i6400_fpu_store): New define_insn_reservation.
7597 (i6400_fpu_load): Likewise.
7598 (i6400_fpu_move): Likewise.
7599 (i6400_fpu_fcmp): Likewise.
7600 (i6400_fpu_fmadd): Likewise.
7601 (i6400_int_mult): Include imul3nc type and update reservation.
7602 (i6400_int_div): Include idiv3 type and update reservation.
7603 (i6400_int_load): Update to check type not move_type.
7604 (i6400_int_store): Likewise.
7605 (i6400_int_prefetch): Set zero latency.
7607 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
7609 * gcc.c: Document new %@{...} sequence.
7610 (LINK_COMMAND_SPEC): Use it for the -L switches.
7611 (cpp_unique_options): Use it for the -I switches.
7612 (at_file_argbuf): New global variable.
7613 (in_at_file): Likewise.
7614 (alloc_args): Create at_file_argbuf.
7615 (clear_args): Truncate at_file_argbuf.
7616 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7617 (open_at_file): New function.
7618 (close_at_file): Likewise.
7619 (create_at_file): Delete.
7620 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7623 (validate_switches_from_spec): Deal with %@{...} sequence.
7624 (validate_switches): Likewise.
7625 (driver::finalize): Call clear_args.
7627 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7629 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7631 2018-06-11 Martin Sebor <msebor@redhat.com>
7633 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7634 (Wno-class-memaccess): Add @opindex.
7635 (Wno-templates, Wno-multiple-inheritance): Same.
7636 (Wno-virtual-inheritance, Wno-namespaces): Same.
7637 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7638 (Wno-format-overflow, Wno-format-truncation): Same.
7639 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7640 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7641 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7642 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7643 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7644 (Wno-misspelled-isr): Same.
7646 2018-06-11 Martin Sebor <msebor@redhat.com>
7648 * PR tree-optimization/86083
7649 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7651 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7653 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7655 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7658 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7659 on the correct operand.
7660 (*movdi_internal64): Ditto.
7662 2018-06-11 Martin Liska <mliska@suse.cz>
7664 PR tree-optimization/86089
7665 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7667 2018-06-11 Julia Koval <julia.koval@intel.com>
7669 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7670 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7671 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7673 2018-06-11 Olivier Hainque <hainque@adacore.com>
7675 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7676 for Ada with strict dwarf2.
7678 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
7681 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7684 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
7686 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7688 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
7690 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7693 2018-06-08 Martin Liska <mliska@suse.cz>
7695 * tree-cfg.h (debug_function): Fix argument type to match
7698 2018-06-08 Martin Liska <mliska@suse.cz>
7700 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7701 Remove usage of MPX-related (and removed) fields.
7702 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7704 2018-06-08 David Malcolm <dmalcolm@redhat.com>
7706 * cfg.c (debug): Use TDF_NONE rather than 0.
7707 * cfghooks.c (debug): Likewise.
7708 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7709 (struct dump_option_value_info): Convert to...
7710 (struct kv_pair): ...this template type.
7711 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7713 (optinfo_verbosity_options): Likewise.
7714 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7716 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7717 than int for "optgroup_flags" param.
7718 (dump_generic_expr_loc): Use dump_flags_t rather than int for
7720 (dump_dec): Likewise.
7721 (dump_finish): Use TDF_NONE rather than 0.
7722 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7723 rather than int for "optgroup_flags" param. Use TDF_NONE rather
7724 than 0. Update for change to option_ptr.
7725 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7726 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
7727 0. Update for changes to optinfo_verbosity_options and
7729 (opt_info_switch_p): Convert optgroup_flags from int to
7731 (dump_basic_block): Use dump_flags_t rather than int
7732 for "dump_kind" param.
7733 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7734 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7735 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7736 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7737 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7738 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7739 TDF_NONE): Convert from macros to...
7740 (enum dump_flag): ...this new enum.
7741 (dump_flags_t): Update to use enum.
7742 (operator|, operator&, operator~, operator|=, operator&=):
7743 Implement for dump_flags_t.
7744 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7745 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7746 Convert from macros to...
7747 (enum optgroup_flag): ...this new enum.
7748 (optgroup_flags_t): New typedef.
7749 (operator|, operator|=): Implement for optgroup_flags_t.
7750 (struct dump_file_info): Convert field "alt_flags" to
7751 dump_flags_t. Convert field "optgroup_flags" to
7753 (dump_basic_block): Use dump_flags_t rather than int for param.
7754 (dump_generic_expr_loc): Likewise.
7755 (dump_dec): Likewise.
7756 (dump_register): Convert param "optgroup_flags" to
7758 (opt_info_enable_passes): Likewise.
7759 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7761 * gimple-pretty-print.c (debug): Likewise.
7762 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7763 (merged_store_group::apply_stores): Likewise.
7764 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7765 * gimple.c (verify_gimple_pp): Likewise.
7766 * graphite-poly.c (print_pbb_body): Likewise.
7767 * passes.c (pass_manager::register_one_dump_file): Convert
7768 local "optgroup_flags" to optgroup_flags_t.
7769 * print-tree.c (print_node): Use TDF_NONE rather than 0.
7771 (debug_body): Likewise.
7772 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7773 to optgroup_flags_t.
7774 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7776 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7777 (convert_mult_to_fma): Likewise.
7778 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7779 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7780 * tree-vect-data-refs.c (dump_lower_bound): Convert param
7781 "dump_kind" to dump_flags_t.
7783 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7785 * config/rs6000/rs6000.c (min, max): Delete.
7787 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7789 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7790 -mabi=spe and -mabi=no-spe.
7792 2018-06-08 Martin Liska <mliska@suse.cz>
7794 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7795 where we expect an existing summary.
7797 2018-06-08 Martin Liska <mliska@suse.cz>
7799 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7800 * ipa-inline.h (estimate_edge_growth): Likewise.
7802 2018-06-08 Martin Liska <mliska@suse.cz>
7804 * cgraph.c (function_version_hasher::hash): Use
7805 cgraph_node::get_uid ().
7806 (function_version_hasher::equal):
7807 * cgraph.h (cgraph_node::get_uid): New method.
7808 * ipa-inline.c (update_caller_keys): Use
7809 cgraph_node::get_uid ().
7810 (update_callee_keys): Likewise.
7811 * ipa-utils.c (searchc): Likewise.
7812 (ipa_reduced_postorder): Likewise.
7813 * lto-cgraph.c (input_node): Likewise.
7814 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7815 * symbol-summary.h (symtab_insertion): Likewise.
7816 (symtab_removal): Likewise.
7817 (symtab_duplication): Likewise.
7818 * tree-pretty-print.c (dump_function_header): Likewise.
7819 * tree-sra.c (convert_callers_for_node): Likewise.
7821 2018-06-08 Martin Liska <mliska@suse.cz>
7823 * cgraph.c (symbol_table::create_edge): Always assign a new
7825 (symbol_table::free_edge): Do not recycle numbers.
7826 * cgraph.h (cgraph_edge::get): New method.
7827 * symbol-summary.h (symtab_removal): Use it.
7828 (symtab_duplication): Likewise.
7829 (call_summary::hashable_uid): Remove.
7831 2018-06-08 Martin Liska <mliska@suse.cz>
7833 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7834 (initialize_growth_caches): Remove.
7835 (free_growth_caches): Likewise.
7836 (do_estimate_edge_time): Use edge_growth_cache.
7837 (do_estimate_edge_size): Likewise.
7838 (do_estimate_edge_hints): Likewise.
7839 * ipa-inline.c (reset_edge_caches): Likewise.
7840 (recursive_inlining): Likewise.
7841 (inline_small_functions): Likewise.
7842 * ipa-inline.h (initialize_growth_caches): Remove.
7843 (estimate_edge_size): Likewise.
7844 (estimate_edge_time): Likewise.
7845 (estimate_edge_hints): Likewise.
7846 (reset_edge_growth_cache): Likewise.
7847 * symbol-summary.h (call_summary::remove): New method.
7849 2018-06-08 Martin Liska <mliska@suse.cz>
7851 * ipa-cp.c (class edge_clone_summary): New summary.
7852 (grow_edge_clone_vectors): Remove.
7853 (ipcp_edge_duplication_hook): Remove.
7854 (class edge_clone_summary_t): New call_summary class.
7855 (ipcp_edge_removal_hook): Remove.
7856 (edge_clone_summary_t::duplicate): New function.
7857 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7858 (create_specialized_node): Likewise.
7859 (ipcp_driver): Initialize edge_clone_summaries and do not
7862 2018-06-08 Martin Liska <mliska@suse.cz>
7864 * symbol-summary.h (get): New function.
7865 (call_summary::m_initialize_when_cloning): New class member.
7867 2018-06-08 Martin Liska <mliska@suse.cz>
7869 * cgraph.c (cgraph_node::remove): Do not recycle uid.
7870 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7871 (symbol_table::allocate_cgraph_symbol): Do not set uid.
7872 * passes.c (uid_hash_t): Record removed_nodes by their uids.
7873 (remove_cgraph_node_from_order): Use the removed_nodes set.
7874 (do_per_function_toporder): Likwise.
7875 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7876 instead of summary_uid.
7877 (symtab_removal): Likewise.
7878 (symtab_duplication): Likewise.
7880 2018-06-08 Martin Liska <mliska@suse.cz>
7882 * ipa-cp.c (ipcp_store_bits_results): Use
7883 ipcp_transformation_sum.
7884 (ipcp_store_vr_results): Likewise.
7885 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7887 (ipcp_transformation_initialize): ... this.
7888 (ipa_set_node_agg_value_chain):
7889 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7890 (write_ipcp_transformation_info): Likewise.
7891 (read_ipcp_transformation_info): Likewise.
7892 (ipcp_update_bits): Likewise.
7893 (ipcp_update_vr): Likewise.
7894 (ipcp_transform_function): Likewise.
7895 * ipa-prop.h: Rename ipcp_transformation_summary to
7896 ipcp_transformation.
7897 (class ipcp_transformation_t): New function summary.
7898 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7899 (ipa_get_agg_replacements_for_node): Likewise.
7901 2018-06-08 Martin Liska <mliska@suse.cz>
7903 * ipa-pure-const.c (struct funct_state_d): Do it class instead
7905 (class funct_state_summary_t): New function_summary class.
7906 (has_function_state): Remove.
7907 (get_function_state): Likewise.
7908 (set_function_state): Likewise.
7909 (add_new_function): Likewise.
7910 (funct_state_summary_t::insert): New function.
7911 (duplicate_node_data): Remove.
7912 (remove_node_data): Remove.
7913 (funct_state_summary_t::duplicate): New function.
7914 (register_hooks): Create new funct_state_summaries.
7915 (pure_const_generate_summary): Use it.
7916 (pure_const_write_summary): Likewise.
7917 (pure_const_read_summary): Likewise.
7918 (propagate_pure_const): Likewise.
7919 (propagate_nothrow): Likewise.
7920 (dump_malloc_lattice): Likewise.
7921 (propagate_malloc): Likewise.
7922 (execute): Do not register hooks, just remove summary
7924 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7927 2018-06-08 Martin Liska <mliska@suse.cz>
7929 * ipa-reference.c (remove_node_data): Remove.
7930 (duplicate_node_data): Likewise.
7931 (class ipa_ref_var_info_summary_t): New class.
7932 (class ipa_ref_opt_summary_t): Likewise.
7933 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7934 (get_reference_optimization_summary): Use
7935 ipa_ref_opt_sum_summaries.
7936 (set_reference_vars_info): Remove.
7937 (set_reference_optimization_summary): Likewise.
7938 (ipa_init): Create summaries.
7939 (init_function_info): Use function summary.
7940 (ipa_ref_opt_summary_t::duplicate): New function.
7941 (ipa_ref_opt_summary_t::remove): New function.
7942 (get_read_write_all_from_node): Fix GNU coding style.
7943 (propagate): Use function summary.
7944 (write_node_summary_p): Fix GNU coding style.
7945 (stream_out_bitmap): Likewise.
7946 (ipa_reference_read_optimization_summary): Use function summary.
7947 (ipa_reference_c_finalize): Do not release hooks.
7949 2018-06-08 Martin Liska <mliska@suse.cz>
7951 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7952 (analyze_function_body): Extract multiple calls of get_create.
7953 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7954 * ipa-inline.c (recursive_inlining): Use ::get method.
7955 * ipa-inline.h (estimate_edge_growth): Likewise.
7957 2018-06-08 Martin Liska <mliska@suse.cz>
7959 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7961 (hsa_function_summary::hsa_function_summary): Use the new enum
7963 (hsa_gpu_implementation_p): Use hsa_summaries::get.
7964 * hsa-gen.c (hsa_get_host_function): Likewise.
7965 (get_brig_function_name): Likewise.
7966 * ipa-hsa.c (process_hsa_functions): Likewise.
7967 (ipa_hsa_write_summary): Likewise.
7968 * symbol-summary.h (symtab_duplication): Use ::get function/
7969 (get): New function.
7971 2018-06-08 Martin Liska <mliska@suse.cz>
7973 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7975 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7976 (hsa_register_kernel): Likewise.
7977 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7978 * hsa-gen.c (hsa_get_host_function): Likewise.
7979 (get_brig_function_name): Likewise.
7980 (generate_hsa): Likewise.
7981 (pass_gen_hsail::execute): Likewise.
7982 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7983 (devirtualization_time_bonus): Likewise.
7984 (ipcp_propagate_stage): Likewise.
7985 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7986 (edge_set_predicate): Likewise.
7987 (evaluate_conditions_for_known_args): Likewise.
7988 (evaluate_properties_for_edge): Likewise.
7989 (ipa_fn_summary::reset): Likewise.
7990 (ipa_fn_summary_t::duplicate): Likewise.
7991 (dump_ipa_call_summary): Likewise.
7992 (ipa_dump_fn_summary): Likewise.
7993 (analyze_function_body): Likewise.
7994 (compute_fn_summary): Likewise.
7995 (estimate_edge_devirt_benefit): Likewise.
7996 (estimate_edge_size_and_time): Likewise.
7997 (estimate_calls_size_and_time): Likewise.
7998 (estimate_node_size_and_time): Likewise.
7999 (inline_update_callee_summaries): Likewise.
8000 (remap_edge_change_prob): Likewise.
8001 (remap_edge_summaries): Likewise.
8002 (ipa_merge_fn_summary_after_inlining): Likewise.
8003 (ipa_update_overall_fn_summary): Likewise.
8004 (read_ipa_call_summary): Likewise.
8005 (inline_read_section): Likewise.
8006 (write_ipa_call_summary): Likewise.
8007 (ipa_fn_summary_write): Likewise.
8008 (ipa_free_fn_summary): Likewise.
8009 * ipa-hsa.c (process_hsa_functions): Likewise.
8010 (ipa_hsa_write_summary): Likewise.
8011 (ipa_hsa_read_section): Likewise.
8012 * ipa-icf.c (sem_function::merge): Likewise.
8013 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
8014 (do_estimate_edge_time): Likewise.
8015 (estimate_size_after_inlining): Likewise.
8016 (estimate_growth): Likewise.
8017 (growth_likely_positive): Likewise.
8018 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8019 (inline_call): Likewise.
8020 * ipa-inline.c (caller_growth_limits): Likewise.
8021 (can_inline_edge_p): Likewise.
8022 (can_inline_edge_by_limits_p): Likewise.
8023 (compute_uninlined_call_time): Likewise.
8024 (compute_inlined_call_time): Likewise.
8025 (want_inline_small_function_p): Likewise.
8026 (edge_badness): Likewise.
8027 (update_caller_keys): Likewise.
8028 (update_callee_keys): Likewise.
8029 (recursive_inlining): Likewise.
8030 (inline_small_functions): Likewise.
8031 (inline_to_all_callers_1): Likewise.
8032 (dump_overall_stats): Likewise.
8033 (early_inline_small_functions): Likewise.
8034 (early_inliner): Likewise.
8035 * ipa-inline.h (estimate_edge_growth): Likewise.
8036 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8037 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8038 * ipa-prop.h (IPA_NODE_REF): Likewise.
8039 (IPA_EDGE_REF): Likewise.
8040 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8041 (propagate_malloc): Likewise.
8042 * ipa-split.c (execute_split_functions): Likewise.
8043 * symbol-summary.h: Rename get to get_create.
8045 (get_create): Likewise.
8046 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8048 2018-06-08 Martin Liska <mliska@suse.cz>
8050 * symbol-summary.h (release): Move definition out of class
8052 (symtab_removal): Likewise.
8053 (symtab_duplication): Likewise.
8055 2018-06-08 Martin Liska <mliska@suse.cz>
8057 * symbol-summary.h (function_summary): Move constructor
8058 implementation out of class declaration.
8059 (release): Likewise.
8060 (symtab_insertion): Likewise.
8061 (symtab_removal): Likewise.
8062 (symtab_duplication): Likewise.
8065 2018-06-08 Martin Liska <mliska@suse.cz>
8067 * Makefile.in: Remove support for MPX (macros, related functions,
8068 fields in cgraph_node, ...).
8069 * builtin-types.def (BT_BND): Likewise.
8070 (BT_FN_BND_CONST_PTR): Likewise.
8071 (BT_FN_CONST_PTR_BND): Likewise.
8072 (BT_FN_VOID_PTR_BND): Likewise.
8073 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8074 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8075 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8076 (expand_builtin_mempcpy_with_bounds): Likewise.
8077 (expand_builtin_memset_with_bounds): Likewise.
8078 (expand_builtin_memset_args): Likewise.
8079 (std_expand_builtin_va_start): Likewise.
8080 (expand_builtin): Likewise.
8081 (expand_builtin_with_bounds): Likewise.
8082 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8083 (DEF_LIB_BUILTIN_CHKP): Likewise.
8084 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8085 (DEF_CHKP_BUILTIN): Likewise.
8086 (BUILT_IN_MEMCPY): Likewise.
8087 (BUILT_IN_MEMMOVE): Likewise.
8088 (BUILT_IN_MEMPCPY): Likewise.
8089 (BUILT_IN_MEMSET): Likewise.
8090 (BUILT_IN_STPCPY): Likewise.
8091 (BUILT_IN_STRCAT): Likewise.
8092 (BUILT_IN_STRCHR): Likewise.
8093 (BUILT_IN_STRCPY): Likewise.
8094 (BUILT_IN_STRLEN): Likewise.
8095 (BUILT_IN_MEMCPY_CHK): Likewise.
8096 (BUILT_IN_MEMMOVE_CHK): Likewise.
8097 (BUILT_IN_MEMPCPY_CHK): Likewise.
8098 (BUILT_IN_MEMSET_CHK): Likewise.
8099 (BUILT_IN_STPCPY_CHK): Likewise.
8100 (BUILT_IN_STRCAT_CHK): Likewise.
8101 (BUILT_IN_STRCPY_CHK): Likewise.
8102 * calls.c (store_bounds): Likewise.
8103 (emit_call_1): Likewise.
8104 (special_function_p): Likewise.
8105 (maybe_warn_nonstring_arg): Likewise.
8106 (initialize_argument_information): Likewise.
8107 (finalize_must_preallocate): Likewise.
8108 (compute_argument_addresses): Likewise.
8109 (expand_call): Likewise.
8110 * cfgexpand.c (expand_call_stmt): Likewise.
8111 (expand_return): Likewise.
8112 (expand_gimple_stmt_1): Likewise.
8113 (pass_expand::execute): Likewise.
8114 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8115 (cgraph_node::remove): Likewise.
8116 (cgraph_node::dump): Likewise.
8117 (cgraph_node::verify_node): Likewise.
8118 * cgraph.h (chkp_function_instrumented_p): Likewise.
8119 (symtab_node::get_alias_target): Likewise.
8120 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8121 (cgraph_local_p): Likewise.
8122 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8123 (cgraph_edge::rebuild_references): Likewise.
8124 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8125 (walk_polymorphic_call_targets): Likewise.
8126 (cgraph_node::expand_thunk): Likewise.
8127 (symbol_table::output_weakrefs): Likewise.
8128 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8129 (ix86_handle_option): Likewise.
8130 * config/i386/constraints.md: Likewise.
8131 * config/i386/i386-builtin-types.def (BND): Likewise.
8135 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8136 (BDESC_FIRST): Likewise.
8138 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8139 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8140 * config/i386/i386.c (enum reg_class): Likewise.
8141 (ix86_target_string): Likewise.
8142 (ix86_option_override_internal): Likewise.
8143 (ix86_conditional_register_usage): Likewise.
8144 (ix86_valid_target_attribute_inner_p): Likewise.
8145 (ix86_set_indirect_branch_type): Likewise.
8146 (ix86_set_current_function): Likewise.
8147 (ix86_function_arg_regno_p): Likewise.
8148 (init_cumulative_args): Likewise.
8149 (ix86_function_arg_advance): Likewise.
8150 (ix86_function_arg): Likewise.
8151 (ix86_pass_by_reference): Likewise.
8152 (ix86_function_value_regno_p): Likewise.
8153 (ix86_function_value_1): Likewise.
8154 (ix86_function_value_bounds): Likewise.
8155 (ix86_return_in_memory): Likewise.
8156 (ix86_setup_incoming_vararg_bounds): Likewise.
8157 (ix86_va_start): Likewise.
8158 (indirect_thunk_need_prefix): Likewise.
8159 (print_reg): Likewise.
8160 (ix86_print_operand): Likewise.
8161 (ix86_expand_call): Likewise.
8162 (ix86_output_function_return): Likewise.
8163 (reg_encoded_number): Likewise.
8164 (BDESC_VERIFYS): Likewise.
8165 (ix86_init_mpx_builtins): Likewise.
8166 (ix86_init_builtins): Likewise.
8167 (ix86_emit_cmove): Likewise.
8168 (ix86_emit_move_max): Likewise.
8169 (ix86_expand_builtin): Likewise.
8170 (ix86_builtin_mpx_function): Likewise.
8171 (ix86_get_arg_address_for_bt): Likewise.
8172 (ix86_load_bounds): Likewise.
8173 (ix86_store_bounds): Likewise.
8174 (ix86_load_returned_bounds): Likewise.
8175 (ix86_store_returned_bounds): Likewise.
8176 (ix86_class_likely_spilled_p): Likewise.
8177 (ix86_hard_regno_mode_ok): Likewise.
8178 (x86_order_regs_for_local_alloc): Likewise.
8179 (ix86_mitigate_rop): Likewise.
8180 (ix86_bnd_prefixed_insn_p): Likewise.
8181 (ix86_mpx_bound_mode): Likewise.
8182 (ix86_make_bounds_constant): Likewise.
8183 (ix86_initialize_bounds): Likewise.
8184 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8185 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8186 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8187 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8188 (TARGET_CHKP_BOUND_MODE): Likewise.
8189 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8190 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8191 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8192 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8193 * config/i386/i386.h (TARGET_MPX): Likewise.
8194 (TARGET_MPX_P): Likewise.
8195 (VALID_BND_REG_MODE): Likewise.
8196 (FIRST_BND_REG): Likewise.
8197 (LAST_BND_REG): Likewise.
8198 (enum reg_class): Likewise.
8199 (BND_REG_P): Likewise.
8200 (BND_REGNO_P): Likewise.
8201 (BNDmode): Likewise.
8202 (ADJUST_INSN_LENGTH): Likewise.
8203 * config/i386/i386.md: Likewise.
8204 * config/i386/i386.opt: Likewise.
8205 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8206 (defined): Likewise.
8207 (LINK_MPX): Likewise.
8208 (MPX_SPEC): Likewise.
8209 (LIBMPX_SPEC): Likewise.
8210 (LIBMPXWRAPPERS_SPEC): Likewise.
8211 (CHKP_SPEC): Likewise.
8212 * config/i386/predicates.md: Likewise.
8213 * dbxout.c (dbxout_type): Likewise.
8214 * doc/extend.texi: Likewise.
8215 * doc/invoke.texi: Likewise.
8216 * doc/md.texi: Likewise.
8217 * doc/tm.texi: Likewise.
8218 * doc/tm.texi.in: Likewise.
8219 * dwarf2out.c (is_base_type): Likewise.
8220 (gen_formal_types_die): Likewise.
8221 (gen_subprogram_die): Likewise.
8222 (gen_type_die_with_usage): Likewise.
8223 (gen_decl_die): Likewise.
8224 (dwarf2out_late_global_decl): Likewise.
8225 * expr.c (expand_assignment): Likewise.
8226 (emit_storent_insn): Likewise.
8227 (store_expr_with_bounds): Likewise.
8228 (store_expr): Likewise.
8229 (expand_expr_real_1): Likewise.
8230 * expr.h (store_expr_with_bounds): Likewise.
8231 * function.c (use_register_for_decl): Likewise.
8232 (struct bounds_parm_data): Likewise.
8233 (assign_parms_augmented_arg_list): Likewise.
8234 (assign_parm_find_entry_rtl): Likewise.
8235 (assign_parm_is_stack_parm): Likewise.
8236 (assign_parm_load_bounds): Likewise.
8237 (assign_bounds): Likewise.
8238 (assign_parms): Likewise.
8239 (expand_function_start): Likewise.
8240 * gcc.c (CHKP_SPEC): Likewise.
8241 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8242 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8243 (wrestrict_dom_walker::check_call): Likewise.
8244 * gimple.c (gimple_build_call_from_tree): Likewise.
8245 * gimple.h (enum gf_mask): Likewise.
8246 (gimple_call_with_bounds_p): Likewise.
8247 (gimple_call_set_with_bounds): Likewise.
8248 * gimplify.c (gimplify_init_constructor): Likewise.
8249 * ipa-cp.c (initialize_node_lattices): Likewise.
8250 (propagate_constants_across_call): Likewise.
8251 (find_more_scalar_values_for_callers_subset): Likewise.
8252 * ipa-hsa.c (process_hsa_functions): Likewise.
8253 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8254 * ipa-icf.c (sem_function::merge): Likewise.
8255 * ipa-inline.c (early_inliner): Likewise.
8256 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8257 (warn_function_cold): Likewise.
8258 (propagate_pure_const): Likewise.
8259 * ipa-ref.h (enum GTY): Likewise.
8260 * ipa-split.c (find_retbnd): Likewise.
8261 (consider_split): Likewise.
8262 (split_function): Likewise.
8263 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8264 * ipa.c (walk_polymorphic_call_targets): Likewise.
8265 (symbol_table::remove_unreachable_nodes): Likewise.
8266 (process_references): Likewise.
8267 (cgraph_build_static_cdtor_1): Likewise.
8268 * lto-cgraph.c (lto_output_node): Likewise.
8269 (output_refs): Likewise.
8270 (compute_ltrans_boundary): Likewise.
8271 (input_overwrite_node): Likewise.
8272 (input_node): Likewise.
8273 (input_cgraph_1): Likewise.
8274 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8275 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8276 (class pass_chkp_instrumentation_passes): Likewise.
8277 (make_pass_chkp_instrumentation_passes): Likewise.
8278 * passes.def: Likewise.
8279 * rtl.h (struct GTY): Likewise.
8280 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8281 * stor-layout.c (layout_type): Likewise.
8282 * symtab.c: Likewise.
8283 * target.def: Likewise.
8284 * targhooks.c (default_chkp_bound_type): Likewise.
8285 (default_chkp_bound_mode): Likewise.
8286 (default_builtin_chkp_function): Likewise.
8287 (default_chkp_function_value_bounds): Likewise.
8288 (default_chkp_make_bounds_constant): Likewise.
8289 (default_chkp_initialize_bounds): Likewise.
8290 * targhooks.h (default_chkp_bound_type): Likewise.
8291 (default_chkp_bound_mode): Likewise.
8292 (default_builtin_chkp_function): Likewise.
8293 (default_chkp_function_value_bounds): Likewise.
8294 (default_chkp_make_bounds_constant): Likewise.
8295 (default_chkp_initialize_bounds): Likewise.
8296 * toplev.c (compile_file): Likewise.
8297 (process_options): Likewise.
8298 * tree-core.h (DEF_BUILTIN): Likewise.
8299 (DEF_BUILTIN_CHKP): Likewise.
8300 * tree-inline.c (declare_return_variable): Likewise.
8301 (remap_gimple_stmt): Likewise.
8302 (copy_bb): Likewise.
8303 (initialize_inlined_parameters): Likewise.
8304 (expand_call_inline): Likewise.
8305 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8306 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8307 (make_pass_ipa_chkp_produce_thunks): Likewise.
8308 (make_pass_chkp): Likewise.
8309 (make_pass_chkp_opt): Likewise.
8310 (make_pass_chkp_instrumentation_passes): Likewise.
8311 * tree-pretty-print.c (dump_generic_node): Likewise.
8312 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8313 * tree-ssa-dce.c (propagate_necessity): Likewise.
8314 (eliminate_unnecessary_stmts): Likewise.
8315 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8316 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8317 * tree-ssa-sccvn.h: Likewise.
8318 * tree-ssa-strlen.c (get_string_length): Likewise.
8319 (valid_builtin_call): Likewise.
8320 (adjust_last_stmt): Likewise.
8321 (handle_builtin_strchr): Likewise.
8322 (handle_builtin_strcpy): Likewise.
8323 (handle_builtin_stxncpy): Likewise.
8324 (handle_builtin_memcpy): Likewise.
8325 (handle_builtin_strcat): Likewise.
8326 (strlen_check_and_optimize_stmt): Likewise.
8327 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8328 * tree-streamer-in.c: Likewise.
8329 * tree-streamer.c (record_common_node): Likewise.
8330 * tree.c (tree_code_size): Likewise.
8331 (wide_int_to_tree_1): Likewise.
8332 (type_contains_placeholder_1): Likewise.
8333 (build_common_tree_nodes): Likewise.
8334 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8335 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8336 (POINTER_BOUNDS_P): Likewise.
8337 (BOUNDED_TYPE_P): Likewise.
8338 (BOUNDED_P): Likewise.
8339 (CALL_WITH_BOUNDS_P): Likewise.
8340 (pointer_bounds_type_node): Likewise.
8341 * value-prof.c (gimple_ic): Likewise.
8342 * var-tracking.c (vt_add_function_parameters): Likewise.
8343 * varasm.c (make_decl_rtl): Likewise.
8344 (assemble_start_function): Likewise.
8345 (output_constant): Likewise.
8346 (maybe_assemble_visibility): Likewise.
8347 * varpool.c (ctor_for_folding): Likewise.
8348 * chkp-builtins.def: Remove.
8349 * ipa-chkp.c: Remove.
8350 * ipa-chkp.h: Remove.
8351 * rtl-chkp.c: Remove.
8352 * rtl-chkp.h: Remove.
8353 * tree-chkp-opt.c: Remove.
8354 * tree-chkp.c: Remove.
8355 * tree-chkp.h: Remove.
8357 2018-06-07 Carl Love <cel@us.ibm.com>
8359 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8360 vextract_fp_from_shortl): Add BE support.
8362 2018-06-07 Paul Koning <ni1d@arrl.net>
8364 * compare-elim.c (try_merge_compare): Don't merge compare if
8365 address contains a side effect.
8366 (try_eliminate_compare): Likewise.
8368 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8370 * config.gcc: Support "tremont".
8371 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8372 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8374 * config/i386/i386.c (m_TREMONT): Define.
8375 (processor_target_table): Add "tremont".
8376 (PTA_TREMONT): Define.
8377 (ix86_lea_outperforms): Add TARGET_TREMONT.
8378 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8379 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8380 and M_INTEL_GOLDMONT_PLUS.
8381 (fold_builtin_cpu): Add "tremont".
8382 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8383 (ix86_option_override_internal): Add "tremont".
8384 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8385 (processor_type): Add PROCESSOR_TREMONT.
8386 * config/i386/x86-tune.def: Add m_TREMONT.
8387 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8389 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8391 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8392 symbol defined for msp430i* devices to be lower case.
8394 2018-06-07 Richard Biener <rguenther@suse.de>
8396 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8397 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8398 Properly wrap signed arithmetic if overflow wraps.
8400 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8402 PR tree-optimization/69615
8403 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8404 of a cast from a same precision integral SSA_NAME in a bb dominated
8405 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8406 cast to utype if rhs2 has already a compatible type.
8408 2018-06-07 Richard Biener <rguenther@suse.de>
8410 PR tree-optimization/85935
8411 * graphite-scop-detection.c (find_params_in_bb): Analyze
8412 condition operands with respect to the correct loop. Assert
8413 the analysis doesn't fail.
8415 2018-06-04 Carl Love <cel@us.ibm.com>
8417 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8418 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8419 as it is slightly cheaper.
8420 (first_match_or_eos_index_<mode>):
8421 Calculate index using natural element order.
8422 (first_match_index_<mode>):
8423 Calculate index using natural element order.
8424 (first_match_or_eos_index_<mode>):
8425 Calculate index using natural order.
8426 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8427 for BE and LE modes.
8428 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8429 P9V_BUILTIN_VCLZLSBB_V16QI.
8430 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8433 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8435 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8436 indentation and line wrap for many prototypes. Add missing
8437 @smallexample directives around block of prototypes for vec_xl and
8440 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8442 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8443 track if we pass or return IEEE 128-bit floating point.
8444 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8445 C++ mangling that is compatible with GCC 8.1.
8446 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8447 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8448 floating point types.
8449 (rs6000_function_arg_advance_1): Likewise.
8450 (rs6000_mangle_type): Optionally generate mangled names that match
8451 what GCC 8.1 generated for IEEE 128-bit floating point types.
8452 (rs6000_globalize_decl_name): If we have an external function that
8453 passes or returns IEEE 128-bit types, generate a weak reference
8454 from the mangled name used in GCC 8.1 to the current mangled
8456 (rs6000_init_builtins): Make __ibm128 use the long double type if
8457 long double is IBM extended double. Make __float128 use the long
8458 double type if long double is IEEE 128-bit.
8461 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8462 macro for __ibm128 built-in functions.
8463 (PACK_IF): Add __ibm128 pack/unpack functions.
8464 (UNPACK_IF): Likewise.
8465 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8466 enable long double built-in functions if long double is IEEE
8467 128-bit floating point.
8468 (rs6000_invalid_builtin): Update long double built-in function
8470 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8471 functions, adjust the built-in function to use the long double
8472 built-in function if __ibm128 and long double are the same type.
8473 * doc/extend.texi (PowerPC builtins): Update documention for
8474 __builtin_{,un}pack_longdouble. Add documentation for
8475 __builtin_{,un}pack_ibm128.
8477 2018-06-06 Jim Wilson <jimw@sifive.com>
8479 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8480 (struct machine_function): New field interrupt_mode.
8481 (riscv_handle_type_attribute): New function. Add forward declaration.
8482 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8483 (riscv_expand_epilogue): Check interrupt_mode field.
8484 (riscv_set_current_function): Check interrupt attribute args and
8485 set interrupt_mode field.
8486 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8487 (riscv_sret, riscv_uret): New.
8488 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8489 new arguments to interrupt attribute.
8491 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8494 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8495 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8497 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8499 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8500 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8501 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8502 several redundant entries.
8504 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8506 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8507 type from "rtx" to "rtx_insn *".
8508 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8509 for local "call_insn", removing cast.
8510 (ix86_expand_call): Likewise, introducing a "call_insn" local.
8512 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
8514 PR tree-optimization/86066
8515 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8516 for BIT_INSERT_EXPR stores.
8518 2018-06-06 Richard Biener <rguenther@suse.de>
8520 PR tree-optimization/86062
8521 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8522 component refs ontop
8523 of to be offsetted base.
8525 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8527 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8528 to be static and remove check on interrupt attribute name.
8530 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
8532 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8533 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8535 2018-06-05 Steve Ellcey <sellcey@cavium.com>
8538 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8540 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8541 Remove second argument, change how error is called.
8542 (aarch64_layout_arg): Remove second argument from
8543 aarch64_err_no_fpadvsimd call.
8544 (aarch64_init_cumulative_args): Ditto.
8545 (aarch64_gimplify_va_arg_expr): Ditto.
8546 * config/aarch64/aarch64.md (mov<mode>): Ditto.
8548 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
8550 * config/i386/i386.md (simple_return_indirect_internal): New expander.
8551 (*simple_return_indirect_internal<mode>): Rename from
8552 simple_return_indirect_internal. Use W mode iterator.
8553 (rstorssp): New expander.
8554 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
8555 (clrssbsy): New expander.
8556 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
8558 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
8560 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8562 (cmse_check_pointed_object): Likewise.
8564 2018-06-05 Martin Liska <mliska@suse.cz>
8566 PR gcov-profile/47618
8567 * doc/invoke.texi: Document how -fprofile-dir format
8570 2018-06-05 Richard Biener <rguenther@suse.de>
8572 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8573 removal pretend DOM info isn't available so we do not update
8574 it and only remove edges, not dominated blocks. Actually free
8575 DOM info in case we removed something. Remove unreachable blocks.
8576 (mfb_keep_latches): Work with either DOM info or marked backedges.
8577 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8578 first. Mark backedges if DOM info isn't available.
8579 (Re-)compute DOM info after cleanup_control_flow_pre.
8581 2018-06-05 Richard Biener <rguenther@suse.de>
8583 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8584 (locus_discrim_hasher::hash): Adjust.
8585 (locus_discrim_hasher::equal): Likewise.
8586 (next_discriminator_for_locus): Work on line directly.
8587 (same_line_p): Pass in expanded locus1 as well.
8588 (assign_discriminators): Avoid redundant location expansions.
8590 2018-06-05 Richard Biener <rguenther@suse.de>
8592 PR tree-optimization/86046
8593 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8594 if required after clearing TREE_ADDRESSABLE.
8596 2018-06-05 Richard Biener <rguenther@suse.de>
8598 PR tree-optimization/86047
8599 * tree-ssa-loop.c (for_each_index): Glob handling of all
8600 decls and constants and really handle all of them.
8602 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8605 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8606 qualifier_void_pointer and qualifier_const_void_pointer.
8607 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8608 (arm_init_builtins): Handle the above.
8609 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8610 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8611 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8614 2018-06-05 Martin Liska <mliska@suse.cz>
8616 * auto-profile.c (read_autofdo_file): Do not use
8617 gcov_ctr_summary struct.
8618 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8619 * coverage.c (struct counts_entry): Likewise.
8620 (read_counts_file): Read just single summary entry.
8621 (get_coverage_counts): Use gcov_summary struct.
8622 * coverage.h (get_coverage_counts): Likewise.
8623 * gcov-dump.c (dump_working_sets): Likewise.
8624 (tag_summary): Dump just single summary.
8625 * gcov-io.c (gcov_write_summary): Write just histogram
8627 (gcov_read_summary): Read just single summary.
8628 (compute_working_sets): Use gcov_summary struct.
8629 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8630 of GCOV_COUNTERS_SUMMABLE.
8631 (GCOV_COUNTERS_SUMMABLE): Remove.
8632 (GCOV_FIRST_VALUE_COUNTER): Replace with
8633 GCOV_COUNTER_V_INTERVAL.
8634 (struct gcov_ctr_summary): Remove.
8635 (struct gcov_summary): Directly use fields of former
8637 (compute_working_sets): Use gcov_summary struct.
8638 * gcov.c (read_count_file): Do not use ctrs fields.
8639 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8641 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8643 * profile.c: Likewise.
8644 * profile.h: Likewise.
8646 2018-06-05 Martin Liska <mliska@suse.cz>
8648 PR gcov-profile/84846
8649 * gcov.c (output_lines): Print working directory only
8650 in intermediate format.
8652 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8654 * config/s390/s390-builtin-types.def: Add void function type.
8655 * config/s390/s390-builtins.def: Use the function type for the
8658 2018-06-04 Jim Wilson <jimw@sifive.com>
8660 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8662 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8663 and maybe_eh_return. Change regno to unsigned int. Use new args to
8664 handle EH_RETURN_DATA_REGNO registers properly.
8665 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8666 (riscv_expand_epilogue): Update comment. Change argument name and
8667 type. Update code to use new name and type. Pass new args to
8668 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8670 * config/riscv/riscv.md (NORMAL_RETURN): New.
8671 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8672 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8673 (eh_return): Call gen_eh_return_internal and emit barrier.
8674 (eh_return_internal): Call riscv_expand_epilogue.
8676 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8678 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8679 bit_insertion field and declare can_be_merged_into method.
8680 (merged_store_group::can_be_merged_into): New method.
8681 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8682 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
8683 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8685 2018-06-04 Richard Biener <rguenther@suse.de>
8687 PR tree-optimization/85955
8688 * builtins.c (fold_builtin_sincos): Convert pointers to
8689 destination to appropriate type before dereferencing.
8691 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
8693 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8695 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
8697 * expr.c (expand_expr_real_1): Force the operand into memory if
8698 its TYPE_MODE is BLKmode and if there is no integer mode for
8699 the number of bits being extracted.
8701 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8705 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8706 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8708 2018-06-04 Richard Biener <rguenther@suse.de>
8710 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8711 (cleanup_tree_cfg_noloop): ... single caller. Do
8712 start_recording_case_labels later.
8714 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
8716 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8717 to _IMMINTRIN_H_INCLUDED.
8718 * config/i386/pconfigintrin.h: Ditto.
8719 * config/i386/waitpkgintrin.h: Ditto.
8720 * config/i386/immintrin.h: Add includes for sgxintrin.h,
8721 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8722 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8723 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8724 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8725 waitpkgintrin.h and cldemoteintrin.h.
8727 2018-06-04 Richard Biener <rguenther@suse.de>
8729 PR tree-optimization/86038
8730 * tracer.c (find_best_successor): Check probability for
8731 being initialized, bail out if not.
8733 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
8736 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8737 of bits to ignore when comparing architectures.
8739 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8741 PR tree-optimization/69615
8742 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8743 maximum or minimum of the type, try to merge it also as if
8744 range1 is + [-, x - 1] or + [x + 1, -].
8747 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8749 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
8751 PR tree-optimization/86034
8752 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8753 the unsigned bitfield type in a bit insertion sequence if it does not
8754 have a larger precision than the bitfield size.
8755 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8757 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
8759 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8761 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8763 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8764 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8765 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8766 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8768 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8770 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8771 Disable -fdelete-null-pointer-checks for ELF toolchain.
8773 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8774 Kito Cheng <kito.cheng@gmail.com>
8776 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8777 (nds32le-*-*, nds32be-*-*): Integrate checking process.
8778 (nds32*-*-*): Add glibc and uclibc conditions.
8779 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8780 (TARGET_EXCEPT_UNWIND_INFO): Define.
8781 * config/nds32/elf.h: New file.
8782 * config/nds32/linux.h: New file.
8783 * config/nds32/nds32-elf.opt: New file.
8784 * config/nds32/nds32-linux.opt: New file.
8785 * config/nds32/nds32-fp-as-gp.c
8786 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8787 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8789 (nds32_asm_file_end): Ditto.
8790 (nds32_print_operand): Ditto.
8791 (nds32_insert_attributes): Ditto.
8792 (nds32_init_libfuncs): New function.
8793 (TARGET_HAVE_TLS): Define.
8794 (TARGET_INIT_LIBFUNCS): Define.
8795 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8797 (TARGET_ELF): Apply different mcmodel setting.
8798 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8799 been migrated into elf.h and linux.h files.
8800 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8801 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8802 (mcmodel): The content has been migrated into nds32-elf.opt and
8803 nds32-linux.opt files.
8804 * config/nds32/t-elf: New file.
8805 * config/nds32/t-linux: New file.
8807 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8808 Shiva Chen <shiva0217@gmail.com>
8810 * config/nds32/constants.md (unspec_volatile_element): Add
8811 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8812 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8814 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8815 (make_pass_nds32_fp_as_gp): Declare.
8816 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8818 (nds32_asm_function_end_prologue): Remove unused asm output.
8819 (nds32_asm_function_begin_epilogue): Remove unused asm output.
8820 (nds32_asm_file_start): Output necessary fp_as_gp information.
8821 (nds32_option_override): Adjust register usage.
8822 (nds32_expand_prologue): Consider fp_as_gp situation.
8823 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8824 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8827 (simple_return): Ditto.
8828 (omit_fp_begin): Output special directive for fp_as_gp.
8829 (omit_fp_end): Output special directive for fp_as_gp.
8830 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8831 mforbid-fp-as-gp): New options.
8833 2018-06-01 Mark Wielaard <mark@klomp.org>
8835 * dwarf2out.c (dwarf2out_finish): Remove generation of
8836 DW_AT_loclists_base.
8838 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
8840 * gimple-ssa-store-merging.c: Include gimple-fold.h.
8841 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8842 (struct merged_store_group): Add bit_insertion field.
8843 (dump_char_array): Use standard hexadecimal format.
8844 (merged_store_group::merged_store_group): Set bit_insertion to false.
8845 (merged_store_group::apply_stores): Use optimal buffer size. Deal
8846 with BIT_INSERT_EXPR stores. Move up code updating the mask and
8847 also print the mask in the dump file.
8848 (pass_store_merging::gate): Minor tweak.
8849 (imm_store_chain_info::coalesce_immediate): Fix wrong association
8850 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
8851 stores with INTEGER_CST stores.
8852 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8853 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8854 and use it throughout. Generate bit insertion sequences if need be.
8855 (pass_store_merging::process_store): Remove redundant condition.
8856 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8858 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
8860 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8861 the 128-bit floating point types. Fix function comment.
8863 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8865 * config/aarch64/aarch64-simd.md
8866 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8868 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8871 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8873 PR tree-optimization/85989
8874 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8876 (backprop::intersect_uses): Check it when deciding whether this
8877 is a backedge reference.
8878 (backprop::process_block): Add each phi to m_visited_phis
8879 after visiting it, then clear it at the end.
8881 2018-06-01 Richard Biener <rguenther@suse.de>
8883 * tree-vectorizer.h (vect_dr_stmt): New function.
8884 (vect_get_load_cost): Adjust.
8885 (vect_get_store_cost): Likewise.
8886 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8887 Use vect_dr_stmt instead of DR_SMTT.
8888 (vect_record_base_alignments): Likewise.
8889 (vect_calculate_target_alignment): Likewise.
8890 (vect_compute_data_ref_alignment): Likewise and make static.
8891 (vect_update_misalignment_for_peel): Likewise.
8892 (vect_verify_datarefs_alignment): Likewise.
8893 (vector_alignment_reachable_p): Likewise.
8894 (vect_get_data_access_cost): Likewise. Pass down
8895 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8896 (vect_get_peeling_costs_all_drs): Likewise.
8897 (vect_peeling_hash_get_lowest_cost): Likewise.
8898 (vect_enhance_data_refs_alignment): Likewise.
8899 (vect_find_same_alignment_drs): Likewise.
8900 (vect_analyze_data_refs_alignment): Likewise.
8901 (vect_analyze_group_access_1): Likewise.
8902 (vect_analyze_group_access): Likewise.
8903 (vect_analyze_data_ref_access): Likewise.
8904 (vect_analyze_data_ref_accesses): Likewise.
8905 (vect_vfa_segment_size): Likewise.
8906 (vect_small_gap_p): Likewise.
8907 (vectorizable_with_step_bound_p): Likewise.
8908 (vect_prune_runtime_alias_test_list): Likewise.
8909 (vect_analyze_data_refs): Likewise.
8910 (vect_supportable_dr_alignment): Likewise.
8911 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8912 (vect_gen_prolog_loop_niters): Likewise.
8913 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8914 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8916 (vect_recog_mask_conversion_pattern): Likewise.
8917 (vect_try_gather_scatter_pattern): Likewise.
8918 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8919 to vect_get_store_cost.
8920 (vect_get_store_cost): Get stmt_info instead of DR.
8921 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8922 (vect_get_load_cost): Get stmt_info instead of DR.
8924 2018-06-01 Richard Biener <rguenther@suse.de>
8927 * gimple-fold.c (var_decl_component_p): Also allow offsetted
8928 vars wrapped in MEM_REFs.
8930 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8932 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8933 Fix subreg tests so that we only return a choice between
8934 GENERAL_REGS and FP_REGS if the original classes included both.
8936 2018-06-01 Richard Biener <rguenther@suse.de>
8939 * tree-ssa-structalias.c (get_function_part_constraint):
8940 Handle NULL fi->decl.
8941 (find_func_aliases_for_call): Properly handle indirect
8942 fi from direct call.
8943 (find_func_clobbers): Likewise.
8944 (ipa_pta_execute): Likewise.
8945 (create_variable_info_for): For functions that are ifunc_resolver
8946 resolve to a varinfo that contains the result of the resolver call.
8947 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8950 2018-05-31 Michael Collison <michael.collison@arm.com>
8952 * config/aarch64/aarch64.md:
8953 (*fix_to_zero_extenddfdi2): New pattern.
8954 * gcc.target/aarch64/fix_extend1.c: New testcase.
8956 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
8960 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8961 and BUILT_IN_STRNCMP_EQ.
8962 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8963 BUILT_IN_STRNCMP_EQ.
8964 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8965 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8966 (gimple_fold_builtin): Likewise.
8967 * tree-ssa-strlen.c (compute_string_length): New function.
8968 (determine_min_obsize): New function.
8969 (handle_builtin_string_cmp): New function to handle calls to
8970 string compare functions.
8971 (strlen_optimize_stmt): Add handling to builtin string compare
8973 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8974 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8975 * tree.c (build_common_builtin_nodes): Add new defines of
8976 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8978 2018-05-31 Jakub Jelinek <jakub@redhat.com>
8981 * bb-reorder.c (pass_partition_blocks::gate): Return false for
8982 functions with naked attribute.
8984 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8986 * config/i386/sse.md (avx_vec_concat<mode>):
8987 Substitute concat_tg_mode mode attribute with xtg_mode.
8988 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8989 (concat_tg_mode): Remove mode attribute.
8991 2018-05-31 Martin Sebor <msebor@redhat.com>
8994 * calls.c (alloc_max_size): Correct a logic error/typo.
8995 Treat excessive arguments as infinite. Warn for invalid arguments.
8996 * doc/invoke.texi (-Walloc-size-larger-than): Update.
8998 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
9001 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
9002 and movx for Haswell.
9004 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
9005 Cesar Philippidis <cesar@codesourcery.com>
9008 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
9009 when emitting error on private/firstprivate reductions.
9010 * omp-low.c (lower_omp_target): Avoid reference-type processing
9011 on pointers for firstprivate clause.
9013 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9015 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9018 * config/aarch64/aarch64-simd.md
9019 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9020 (aarch64_ld1_x3_<mode>): Likewise
9021 (aarch64_st1x2<VALLDIF:mode>): Likewise
9022 (aarch64_st1_x2_<mode>): Likewise
9023 (aarch64_st1x3<VALLDIF:mode>): Likewise
9024 (aarch64_st1_x3_<mode>): Likewise
9025 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9026 (vld1_s8_x3): Likewise.
9027 (vld1_u16_x3): Likewise.
9028 (vld1_s16_x3): Likewise.
9029 (vld1_u32_x3): Likewise.
9030 (vld1_s32_x3): Likewise.
9031 (vld1_u64_x3): Likewise.
9032 (vld1_s64_x3): Likewise.
9033 (vld1_f16_x3): Likewise.
9034 (vld1_f32_x3): Likewise.
9035 (vld1_f64_x3): Likewise.
9036 (vld1_p8_x3): Likewise.
9037 (vld1_p16_x3): Likewise.
9038 (vld1_p64_x3): Likewise.
9039 (vld1q_u8_x3): Likewise.
9040 (vld1q_s8_x3): Likewise.
9041 (vld1q_u16_x3): Likewise.
9042 (vld1q_s16_x3): Likewise.
9043 (vld1q_u32_x3): Likewise.
9044 (vld1q_s32_x3): Likewise.
9045 (vld1q_u64_x3): Likewise.
9046 (vld1q_s64_x3): Likewise.
9047 (vld1q_f16_x3): Likewise.
9048 (vld1q_f32_x3): Likewise.
9049 (vld1q_f64_x3): Likewise.
9050 (vld1q_p8_x3): Likewise.
9051 (vld1q_p16_x3): Likewise.
9052 (vld1q_p64_x3): Likewise.
9053 (vst1_s64_x2): Likewise.
9054 (vst1_u64_x2): Likewise.
9055 (vst1_f64_x2): Likewise.
9056 (vst1_s8_x2): Likewise.
9057 (vst1_p8_x2): Likewise.
9058 (vst1_s16_x2): Likewise.
9059 (vst1_p16_x2): Likewise.
9060 (vst1_s32_x2): Likewise.
9061 (vst1_u8_x2): Likewise.
9062 (vst1_u16_x2): Likewise.
9063 (vst1_u32_x2): Likewise.
9064 (vst1_f16_x2): Likewise.
9065 (vst1_f32_x2): Likewise.
9066 (vst1_p64_x2): Likewise.
9067 (vst1q_s8_x2): Likewise.
9068 (vst1q_p8_x2): Likewise.
9069 (vst1q_s16_x2): Likewise.
9070 (vst1q_p16_x2): Likewise.
9071 (vst1q_s32_x2): Likewise.
9072 (vst1q_s64_x2): Likewise.
9073 (vst1q_u8_x2): Likewise.
9074 (vst1q_u16_x2): Likewise.
9075 (vst1q_u32_x2): Likewise.
9076 (vst1q_u64_x2): Likewise.
9077 (vst1q_f16_x2): Likewise.
9078 (vst1q_f32_x2): Likewise.
9079 (vst1q_f64_x2): Likewise.
9080 (vst1q_p64_x2): Likewise.
9081 (vst1_s64_x3): Likewise.
9082 (vst1_u64_x3): Likewise.
9083 (vst1_f64_x3): Likewise.
9084 (vst1_s8_x3): Likewise.
9085 (vst1_p8_x3): Likewise.
9086 (vst1_s16_x3): Likewise.
9087 (vst1_p16_x3): Likewise.
9088 (vst1_s32_x3): Likewise.
9089 (vst1_u8_x3): Likewise.
9090 (vst1_u16_x3): Likewise.
9091 (vst1_u32_x3): Likewise.
9092 (vst1_f16_x3): Likewise.
9093 (vst1_f32_x3): Likewise.
9094 (vst1_p64_x3): Likewise.
9095 (vst1q_s8_x3): Likewise.
9096 (vst1q_p8_x3): Likewise.
9097 (vst1q_s16_x3): Likewise.
9098 (vst1q_p16_x3): Likewise.
9099 (vst1q_s32_x3): Likewise.
9100 (vst1q_s64_x3): Likewise.
9101 (vst1q_u8_x3): Likewise.
9102 (vst1q_u16_x3): Likewise.
9103 (vst1q_u32_x3): Likewise.
9104 (vst1q_u64_x3): Likewise.
9105 (vst1q_f16_x3): Likewise.
9106 (vst1q_f32_x3): Likewise.
9107 (vst1q_f64_x3): Likewise.
9108 (vst1q_p64_x3): Likewise.
9110 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9112 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9113 user_label_prefix to name.
9115 * tree-core.h: Update comment about the format of NAME string
9116 passed to handler in attribute_spec.
9118 * config/msp430/msp430.md: Remove erroneous subreg expression from
9119 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9120 zero_extend{q,h}isi2.
9122 2018-05-30 Borislav Petkov <bp@suse.de>
9124 * doc/extend.texi: Document some architecture specific
9125 constraints and sort entries.
9127 2018-05-30 Martin Sebor <msebor@redhat.com>
9130 * builtins.c (expand_builtin_stpcpy_1): New function.
9131 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9132 only if the former succeeds.
9134 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9136 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9139 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9141 * doc/invoke.texi (-flinker-output): Document
9143 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9145 * passes.c (ipa_write_summaries): Only modify statements if body
9147 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9148 incrementally linking.
9149 (ipa_passes): Likewise.
9150 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9151 pass down resolution info.
9152 * common.opt (flag_incremental_link): Update info.
9153 * gcc.c (plugin specs): Turn flinker-output=* to
9154 -plugin-opt=-linker-output-known
9155 * toplev.c (compile_file): Also cut compilation when doing incremental
9157 * flag-types. (enum lto_partition_model): Add
9158 LTO_LINKER_OUTPUT_NOLTOREL.
9159 (invoke.texi): Add -flinker-output docs.
9160 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9161 link same way as WPA; do not stream in dead initializers.
9163 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9164 darf2out_register_external_decl): Support incremental link.
9166 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9168 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9170 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9172 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9173 it down to simple_object_copy_lto_debug_sections.
9174 (run_gcc): Determine incremental LTO link time and configure
9175 lto1 into non-wpa mode, disable renaming of debug sections.
9177 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9179 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9180 descriptions of various incorrectly documented functions.
9182 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9185 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9186 address check not strict.
9188 2018-05-30 Richard Biener <rguenther@suse.de>
9190 PR tree-optimization/85964
9191 * tracer.c (better_p): Drop initialized count check, we only
9192 call the function with initialized counts now.
9193 (find_best_successor): Do find a best edge if one
9194 has uninitialized count.
9195 (find_best_predecessor): Likewise. Do BB frequency check only
9196 if count is initialized.
9198 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9200 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9201 (aarch64_ldrstr_offset_compare): New.
9202 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9203 load/store orderings.
9204 (aarch64_gen_adjusted_ldpstp): Likewise.
9206 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9208 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9209 Check for subset of GENERAL_REGS and FP_REGS.
9210 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9213 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9215 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9216 and wi::to_poly_offset. Add the current offset and then check
9217 whether the sum fits, rather than using an unchecked addition of
9218 a checked term. Check for a shwi rather than a uhwi.
9219 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9220 (store_constructor): Use poly_int_tree_p.
9221 (expand_expr_real_1): Likewise.
9222 * function.c (assign_temp): Likewise.
9223 * fold-const.c (const_binop): Use poly_int_tree_p and
9225 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9227 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9228 to_poly_offset for MEM offsets.
9229 * ipa-icf.c (sem_variable::equals): Likewise.
9230 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9231 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9232 wi::to_poly_offset for BIT_FIELD_REF offsets.
9233 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9235 * var-tracking.c (emit_note_insn_var_location): Use
9236 tree_to_poly_uint64.
9238 2018-05-29 Jim Wilson <jimw@sifive.com>
9240 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9242 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9245 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9246 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9248 (sse4_1_round<mode>2): Use nonimmediate_operand
9249 for operand 1 predicate.
9251 2018-05-29 Martin Sebor <msebor@redhat.com>
9252 Richard Biener <rguenther@suse.de>
9255 * calls.c (get_size_range): Call determine_value_range instead
9256 of get_value_range..
9257 * tree-vrp.h (determine_value_range): Declared new function.
9258 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9260 2018-05-29 Richard Biener <rguenther@suse.de>
9262 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9263 sure to use non-pattern stmts for get_earlier_stmt arguments.
9264 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9265 called on pattern stmts.
9266 (get_later_stmt): Likewise.
9268 2018-05-29 Martin Liska <mliska@suse.cz>
9270 PR gcov-profile/85759
9271 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9274 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9276 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9278 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9282 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9283 VEC_PACK_FLOAT_EXPR): New tree codes.
9284 * tree-pretty-print.c (op_code_prio): Handle
9285 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9286 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9287 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9288 * tree-inline.c (estimate_operator_cost): Likewise.
9289 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9290 * fold-const.c (const_binop): Likewise.
9291 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9292 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9293 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9294 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9295 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9296 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9297 * expr.c (expand_expr_real_2): Likewise.
9298 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9299 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9300 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9302 * optabs.c (expand_widen_pattern_expr): For
9303 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9304 sign from result type rather than operand's type.
9305 (expand_binop_directly): For vec_packu_float_optab and
9306 vec_packs_float_optab allow result type to be different from operand's
9308 * optabs-tree.c (optab_for_tree_code): Handle
9309 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9310 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9311 * tree-vect-generic.c (expand_vector_operations_1): Handle
9312 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9313 VEC_PACK_FLOAT_EXPR.
9314 * tree-vect-stmts.c (supportable_widening_operation): Handle
9316 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9317 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9318 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9319 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9320 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9322 (vec_pack<floatprefix>_float_<mode>): New expander.
9323 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9325 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9326 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9327 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9328 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9329 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9331 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9332 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9333 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9334 VEC_PACK_FLOAT_EXPR): Document.
9336 2018-05-29 Richard Biener <rguenther@suse.de>
9338 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9340 (stmt_vec_info_vec): Make pointer.
9341 (init_stmt_vec_info_vec): Remove.
9342 (free_stmt_vec_info_vec): Likewise.
9343 (set_stmt_vec_info_vec): New function.
9344 (free_stmt_vec_infos): Likewise.
9345 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9346 (set_vinfo_for_stmt): Likewise.
9347 (get_earlier_stmt): Likewise.
9348 (get_later_stmt): Likewise.
9349 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9350 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9351 (vec_info::~vec_info): Free stmt_vec_infos.
9352 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9353 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9354 (pass_slp_vectorize::execute): Likewise.
9355 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9356 (free_stmt_vec_info_vec): Likewise.
9357 (set_stmt_vec_info_vec): New function.
9358 (free_stmt_vec_infos): Likewise.
9359 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9360 the global stmt_vec_info_vec.
9361 * tree-parloops.c (gather_scalar_reductions): Use
9362 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9365 2018-05-29 Richard Biener <rguenther@suse.de>
9367 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9369 2018-05-29 Martin Liska <mliska@suse.cz>
9370 David Malcolm <dmalcolm@redhat.com>
9372 * vec.c (test_reverse): New.
9373 (vec_c_tests): Add new test.
9374 * vec.h (vl_ptr>::reverse): New function.
9376 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9378 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9380 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9383 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9385 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9387 2018-05-28 Richard Biener <rguenther@suse.de>
9389 PR tree-optimization/85933
9390 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9391 look at stmts marked as vectorizable.
9393 2018-05-28 Richard Biener <rguenther@suse.de>
9395 PR tree-optimization/85934
9396 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9397 vector boolean check before scalar optimization.
9399 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9401 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9404 2018-05-28 Mark Wielaard <mark@klomp.org>
9406 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9407 if it is an expression containing a minus sign.
9409 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9411 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9413 2018-05-27 Paul Koning <ni1d@arrl.net>
9415 * config/pdp11/pdp11.md (truncsihi2): Remove.
9417 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9418 Chung-Ju Wu <jasonwucj@gmail.com>
9420 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9422 (unaligned_store_dw): Ditto.
9423 * config/nds32/nds32-memory-manipulation.c
9424 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9425 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9426 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9427 (emit_setmem_word_loop): Rename to ...
9428 (emit_setmem_doubleword_loop): ... this.
9429 (nds32_gen_dup_4_byte_to_word_value): New function.
9430 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9431 (nds32_expand_setmem_loop): Refine implementation.
9432 (nds32_expand_setmem_loop_v3m): Ditto.
9433 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9436 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9438 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9440 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9442 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9443 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9444 machine->attr_no_prologue_p.
9445 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9446 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9447 (nds32_expand_epilogue): Consider attr_naked_p.
9448 (nds32_expand_epilogue_v3pop): Likewise.
9449 (nds32_can_use_return_insn): Likewise.
9450 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9451 attr_no_prologue_p fields.
9452 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9454 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9457 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9459 * config/i386/sse.md
9460 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9462 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9464 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9466 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9468 (*<floatsuffix>floatv2div2sf2): Rename to ...
9469 (*float<floatunssuffix>v2div2sf2): ... this.
9470 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9471 (float<floatunssuffix>v2div2sf2_mask): ... this.
9472 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9473 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9474 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9476 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9478 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9480 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9482 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9484 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9486 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9487 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9488 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9489 gen_ufix_truncv8dfv8si2.
9490 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9491 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9492 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9493 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9494 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9495 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9496 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9497 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9499 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9503 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9505 2018-05-25 Jim Wilson <jimw@sifive.com>
9507 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9508 * config/riscv/riscv.c (struct machine_function): Add
9509 interrupt_handler_p and attribute_checked_p fields.
9510 (riscv_attribute_table): Add interrupt.
9511 (riscv_interrupt_type_p): New.
9512 (riscv_save_reg_p): Save extra regs for interrupt handler.
9513 (riscv_use_save_libcall): Return false for interrupt handler.
9514 (riscv_first_stack_step): Add forward declaration.
9515 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
9516 for interrupt handler with large frame. Use it for saved reg list.
9517 (riscv_expand_prologue): Move flag_stack_usage_info support to
9518 eliminate duplication.
9519 (riscv_expand_epilogue): Generate mret for interrupt handler.
9520 (riscv_epilogue_uses): New.
9521 (riscv_can_use_return_insn): Return false for interrupt handler.
9522 (riscv_function_ok_for_sibcall): Likewise.
9523 (riscv_set_current_function): Add interrupt handler support.
9524 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9525 * config/riscv/riscv.md (UNSPECV_MRET): New.
9527 (riscv_frflags, riscv_fsflags): Use tab after opcode.
9529 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9531 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
9533 PR tree-optimization/85712
9534 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9535 this candidate has already been replaced in-situ by a copy.
9537 2018-05-25 Jason Merrill <jason@redhat.com>
9539 PR c++/80485 - inline function non-zero address.
9540 * symtab.c (nonzero_address): Check DECL_COMDAT.
9542 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
9545 * config/alpha/alpha.md (ashlsi3): New insn pattern.
9546 (*ashlsi_se): Rename from *ashldi_se. Define as sign
9547 extension of SImode operation. Use const123_operand predicate.
9548 (*saddsi_1): Remove.
9549 (*saddl_se_1): Ditto.
9551 (*ssubl_se_1): Ditto.
9552 * config/alpha/predicates.md (const123_operand): New predicate.
9553 * config/alpha/constraints.md (P): Use IN_RANGE.
9555 2018-05-25 Richard Biener <rguenther@suse.de>
9557 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9559 (ref_maybe_used_by_stmt_p): Likewise.
9560 (stmt_may_clobber_ref_p): Likewise.
9561 (stmt_may_clobber_ref_p_1): Likewise.
9562 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9564 (ref_maybe_used_by_stmt_p): Likewise.
9565 (stmt_may_clobber_ref_p): Likewise.
9566 (stmt_may_clobber_ref_p_1): Likewise.
9567 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9568 the alias oracle to disambiguate DRs with stmts DR analysis
9570 (vect_analyze_data_refs): Do not give up on not analyzable
9571 DRs for BB vectorization. Remove code truncating the dataref
9574 2018-05-25 Jakub Jelinek <jakub@redhat.com>
9577 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9578 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
9579 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9581 2018-05-25 Richard Biener <rguenther@suse.de>
9583 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9584 function, combining stmt data ref gathering and fatal analysis
9586 (vect_analyze_data_refs): Remove now redudnant code and simplify.
9587 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9588 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9589 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9590 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9592 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9594 PR tree-optimization/85720
9595 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9596 SCC if all partitions are builtins.
9597 (version_loop_by_alias_check): New parameter. Generate cancelable
9598 runtime alias check if all partitions are builtins.
9599 (distribute_loop): Update call to above function.
9601 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9603 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9604 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9605 (parm_default_def_partition_arg): Ditto.
9606 (set_parm_default_def_partition): Ditto.
9607 (get_parm_default_def_partitions): Ditto and make it static.
9608 (get_undefined_value_partitions): Ditto and make it static.
9609 (remove_ssa_form): Refactor call to init_var_map here.
9610 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9611 computation for loop region.
9612 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9613 (register_default_def): Delete.
9614 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9615 (parm_default_def_partition_arg): Ditto.
9616 (set_parm_default_def_partition): Ditto.
9617 (get_parm_default_def_partitions): Ditto and make it static.
9618 (get_undefined_value_partitions): Ditto and make it static.
9619 (coalesce_with_default, coalesce_with_default): Update comment.
9620 (create_coalesce_list_for_region): New func factored out from
9621 create_outofssa_var_map.
9622 (populate_coalesce_list_for_outofssa): New func factored out from
9623 create_outofssa_var_map and coalesce_ssa_name.
9624 (create_outofssa_var_map): Delete.
9625 (coalesce_ssa_name): Refactor to support live range computation.
9626 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9627 (get_parm_default_def_partitions): Delete.
9628 (get_undefined_value_partitions): Ditto.
9629 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9630 computation for loop region.
9631 (new_tree_live_info, loe_visit_block): Ditto.
9632 (live_worklist, set_var_live_on_entry): Ditto.
9633 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9634 * tree-ssa-live.h (struct _var_map): New fields.
9635 (init_var_map): Change decl.
9636 (region_contains_p): New.
9638 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9640 * tree-ssa-live.h (live_merge_and_clear): Delete.
9642 2018-05-25 Richard Biener <rguenther@suse.de>
9645 * tree-dump.c (dequeue_and_dump): Remove access to removed
9646 operand 2 of a SWITCH_EXPR.
9648 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9650 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9651 multiplication and division.
9652 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9653 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9654 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9655 (cond_udiv_optab, cond_umod_optab): New optabs.
9656 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9657 (IFN_COND_RDIV): New internal functions.
9658 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9659 TRUNC_MOD_EXPR and RDIV_EXPR.
9660 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9661 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9663 (SVE_INT_BINARY): Include mult.
9664 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9665 (optab, sve_int_op): Handle mult.
9666 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9668 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9669 for SVE_INT_BINARY_SD.
9671 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9673 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9674 (optab, sve_int_op): Handle div and udiv.
9675 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9676 for SVE_INT_BINARY_SD.
9677 (*<optab><mode>3): New insn for the same.
9679 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9681 * tree-vect-patterns.c: Include predict.h.
9682 (vect_recog_divmod_pattern): Restrict check for division support
9683 to when optimizing for size.
9685 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9687 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9688 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9689 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9690 (gimple_match_op::set_op): Likewise.
9691 (gimple_resimplify4): Declare.
9692 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9693 (expr::gen_transform): Likewise.
9694 (decision_tree::gen): Generate a simplification routine for 4 operands.
9695 * gimple-match-head.c (gimple_simplify): Add an overload for
9696 4 operands. In the top-level function, handle up to 4 call
9697 arguments and call gimple_resimplify4.
9698 (gimple_resimplify4): New function.
9699 (build_call_internal): Pass a fourth operand.
9700 (maybe_push_to_seq): Likewise.
9701 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9702 Fold VEC_COND_EXPRs of an operation and a default value into
9703 an IFN_COND_* function if possible.
9704 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9706 (SVE_COND_FP_BINARY): Include them.
9707 (optab, sve_fp_op): Handle them.
9708 (SVE_INT_BINARY_REV): New code iterator.
9709 (SVE_COND_FP_BINARY_REV): New int iterator.
9710 (commutative): New int attribute.
9711 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9713 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9715 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9716 (*cond_<optab><mode>): New patterns for reversed operands.
9718 2018-05-25 Richard Biener <rguenther@suse.de>
9720 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9721 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9722 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9723 (STMT_VINFO_GROUPED_ACCESS): Adjust.
9724 * tree-vect-data-refs.c (everywhere): Adjust users.
9725 * tree-vect-loop.c (everywhere): Likewise.
9726 * tree-vect-slp.c (everywhere): Likewise.
9727 * tree-vect-stmts.c (everywhere): Likewise.
9728 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9730 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9732 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9734 (gcc_cv_as_section_exclude): ... this.
9735 Try Solaris as #exclude syntax.
9736 * configure: Regenerate.
9737 * config.in: Regenerate.
9738 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9740 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9741 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9743 * varasm.c (default_elf_asm_named_section): Don't check if
9744 HAVE_GAS_SECTION_EXCLUDE is defined.
9746 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9748 * doc/md.texi: Update the documentation of the cond_* optabs
9749 to mention the new final operand. Fix GET_MODE_NUNITS call.
9750 Describe the scalar case too.
9751 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9752 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9754 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9755 (get_conditional_internal_fn): Update comment.
9756 * tree-vect-loop.c (vectorizable_reduction): Pass the original
9757 accumulator value as a final argument to conditional functions.
9758 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9759 a define_expand and add an "else" operand. Assert for now that
9760 the else operand is equal to operand 2. Use SVE_INT_BINARY and
9761 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9762 (*cond_<optab><mode>): New patterns.
9763 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9764 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9765 (UNSPEC_COND_EOR): Delete.
9766 (optab): Remove associated mappings.
9767 (SVE_INT_BINARY): New code iterator.
9768 (sve_int_op): Remove int attribute and add "minus" to the code
9770 (SVE_COND_INT_OP): Delete.
9771 (SVE_COND_FP_OP): Rename to...
9772 (SVE_COND_FP_BINARY): ...this.
9774 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9776 * optabs.c (can_reuse_operands_p): New function.
9777 (maybe_legitimize_operands): Try to reuse the results for
9780 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9782 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9783 Add {q} suffix to insn mnemonic.
9785 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9787 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9788 (msp430_warn_func_return): New.
9790 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
9792 * fold-const.c (tree_nonzero_bits): New function.
9793 * fold-const.h (tree_nonzero_bits): Likewise.
9794 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9795 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9797 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9801 * varasm.c (assemble_alias): Check ifunc_resolver only on
9804 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9807 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9808 when memory input operand is handled.
9810 2018-05-24 Luis Machado <luis.machado@linaro.org>
9812 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9814 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9816 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9818 * match.pd: Delay FMA folds until after vectorization.
9820 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
9823 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9824 address check not strict.
9826 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9828 * gimple-match.h (gimple_match_op): New class.
9829 (mprts_hook): Replace parameters with a gimple_match_op *.
9830 (maybe_build_generic_op): Likewise.
9831 (gimple_simplified_result_is_gimple_val): Replace parameters with
9832 a const gimple_match_op *.
9833 (gimple_simplify): Replace code_helper * and tree * parameters with
9834 a gimple_match_op * parameter.
9835 (gimple_resimplify1): Replace code_helper *, tree and tree *
9836 parameters with a gimple_match_op * parameter.
9837 (gimple_resimplify2): Likewise.
9838 (gimple_resimplify3): Likewise.
9839 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9840 parameters with a gimple_match_op * parameter.
9841 * gimple-match-head.c (gimple_simplify): Change prototypes of
9842 auto-generated functions to take a gimple_match_op * instead of
9843 separate code_helper * and tree * parameters. Make the same
9844 change in the top-level overload and update calls to the
9845 gimple_resimplify routines. Update calls to the auto-generated
9846 functions and to maybe_push_res_to_seq in the publicly-facing
9847 operation-specific gimple_simplify overloads.
9848 (gimple_match_op::MAX_NUM_OPS): Define.
9849 (gimple_resimplify1): Replace rcode and ops with a single res_op
9850 parameter. Update call to gimple_simplify.
9851 (gimple_resimplify2): Likewise.
9852 (gimple_resimplify3): Likewise.
9853 (mprts_hook): Replace parameters with a gimple_match_op *.
9854 (maybe_build_generic_op): Likewise.
9855 (build_call_internal): Replace type, nargs and ops with
9856 a gimple_match_op *.
9857 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9858 with a single gimple_match_op *. Update calls to mprts_hook,
9859 build_call_internal and gimple_simplified_result_is_gimple_val.
9860 Factor out code that is common to the tree_code and combined_fn cases.
9861 * genmatch.c (expr::gen_transform): Replace tem_code and
9862 tem_ops with a gimple_match_op called tem_op. Update calls
9863 to the gimple_resimplify functions and maybe_push_res_to_seq.
9864 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9865 res_ops. Update call to the gimple_resimplify functions.
9866 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9867 (decision_tree::gen): Make the functions take a gimple_match_op *
9868 called res_op instead of separate res_code and res_ops parameters.
9869 Update call accordingly.
9870 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9871 and ops with a single res_op parameter. Update calls to
9872 maybe_build_generic_op and maybe_push_res_to_seq.
9873 (fold_stmt_1): Update calls to gimple_simplify and
9874 replace_stmt_with_simplification.
9875 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9876 and gimple_simplified_result_is_gimple_val.
9877 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9879 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9880 with a gimple_match_op *.
9881 (vn_nary_build_or_lookup): Likewise. Update call to
9882 vn_nary_build_or_lookup_1.
9883 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9884 gimple_match_op *. Update calls to the gimple_resimplify routines
9885 and to gimple_simplified_result_is_gimple_val.
9886 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9887 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9888 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9889 (visit_nary_op): Likewise.
9890 (visit_reference_op_load): Likewise.
9892 2018-05-23 Luis Machado <luis.machado@linaro.org>
9894 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9895 modifier for printing the step amount.
9897 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
9900 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9903 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
9905 * doc/sourcebuild.texi (Endianness): New subsubsection.
9907 2018-05-23 Luis Machado <luis.machado@linaro.org>
9909 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9910 <prefetch_dynamic_strides>: New const bool field.
9911 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9912 prefetch_dynamic_strides.
9913 (exynosm1_prefetch_tune): Likewise.
9914 (thunderxt88_prefetch_tune): Likewise.
9915 (thunderx_prefetch_tune): Likewise.
9916 (thunderx2t99_prefetch_tune): Likewise.
9917 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9919 (aarch64_override_options_internal): Update to set
9920 PARAM_PREFETCH_DYNAMIC_STRIDES.
9921 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9922 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9923 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9924 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9925 prefetch-dynamic-strides setting.
9927 2018-05-23 Luis Machado <luis.machado@linaro.org>
9929 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9930 <minimum_stride>: New const int field.
9931 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9932 minimum_stride field defaulting to -1.
9933 (exynosm1_prefetch_tune): Likewise.
9934 (thunderxt88_prefetch_tune): Likewise.
9935 (thunderx_prefetch_tune): Likewise.
9936 (thunderx2t99_prefetch_tune): Likewise.
9937 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9938 <default_opt_level>: Set to 3.
9939 (aarch64_override_options_internal): Update to set
9940 PARAM_PREFETCH_MINIMUM_STRIDE.
9941 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9942 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9943 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9944 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9945 stride is constant and is below the minimum stride threshold.
9947 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9949 * config/arm/arm-cpus.in (mode26): Delete.
9950 (armv4): Delete mode26 reference.
9951 * config/arm/arm.c (arm_configure_build_target): Delete use of
9954 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9956 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9958 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9959 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
9961 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
9962 (floatunsdidf2): Ditto.
9964 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9966 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9967 (fixuns_trunc<mode>si2_avx512f): Ditto.
9968 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9969 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9970 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9972 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9974 PR rtl-optimization/79985
9975 * df-scan.c (df_insn_refs_collect): Remove special case for
9976 global registers and asm statements.
9978 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9980 * extend.texi (Global Register Variables): Rewrite the bullet list.
9981 Note that the register is available for allocation. Note that access
9982 via inline asm must use constraints. Add note about async-signal
9983 handlers. Remove paragraph about automagic register selection.
9985 2018-05-23 Richard Biener <rguenther@suse.de>
9987 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9988 of fixed offset from memset VN.
9990 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
9992 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9994 (alloc_cand_and_find_basis): Initialize first_interp field.
9995 (slsr_process_mul): Modify first_interp field.
9996 (slsr_process_add): Likewise.
9997 (slsr_process_cast): Modify first_interp field for each new
9999 (slsr_process_copy): Likewise.
10000 (dump_candidate): Dump first_interp field.
10001 (replace_mult_candidate): Process all interpretations, not just
10003 (replace_rhs_if_not_dup): Likewise.
10004 (replace_one_candidate): Likewise.
10006 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
10008 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
10010 (aarch64_needs_frame_chain): New function.
10011 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
10013 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10016 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10017 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10018 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10019 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10020 as true for strict-align.
10021 (aarch64_can_inline_p): Perform checks even when callee has no
10022 attributes to check for strict alignment.
10023 * doc/extend.texi (AArch64 Function Attributes): Document
10025 * doc/invoke.texi: (AArch64 Options): Likewise.
10027 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10029 PR tree-optimization/85853
10030 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10031 the handling of the root of the node to...
10032 (vect_slp_analyze_node_operations_1): ...this new function,
10033 and run the whole thing with the child nodes' def types
10034 set according to their SLP node's def type.
10036 2018-05-23 Richard Biener <rguenther@suse.de>
10038 PR middle-end/85874
10039 * tree-data-ref.c (create_runtime_alias_checks): Defer
10040 and ignore overflow warnings.
10042 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10044 PR tree-optimization/85822
10045 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10048 2018-05-23 Richard Biener <rguenther@suse.de>
10050 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10051 memset constants via native_interpret_expr.
10053 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10056 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10058 (cgraph_node::create_alias): Likewise.
10059 (cgraph_node::get_availability): Check ifunc_resolver instead
10060 of looking up ifunc attribute.
10061 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10062 * varasm.c (do_assemble_alias): Likewise.
10063 (assemble_alias): Likewise.
10064 (default_binds_local_p_3): Likewise.
10065 * cgraph.h (cgraph_node): Add ifunc_resolver.
10066 (cgraph_node::only_called_directly_or_aliased_p): Return false
10067 for IFUNC resolver.
10068 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10070 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10071 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10072 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10073 instead of looking up ifunc attribute.
10075 2018-05-22 Luis Machado <luis.machado@linaro.org>
10077 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10079 2018-05-22 Martin Sebor <msebor@redhat.com>
10081 PR middle-end/85359
10082 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10083 only when expasion succeeds.
10084 (expand_builtin_strcmp): Same.
10085 (expand_builtin_strncmp): Same.
10087 2018-05-22 Martin Sebor <msebor@redhat.com>
10089 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10091 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10092 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10094 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10095 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10097 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10098 Add check for legitimate_address.
10099 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10100 (aarch64_swap_ldrstr_operands): New.
10101 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10104 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10105 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10107 * config/aarch64/aarch64.md: New patterns to generate stp
10109 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10110 single words and double words.
10111 (load_pair_sw, load_pair_dw): Likewise.
10112 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10114 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10116 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10117 for different mode ldpstp and add peephole for merged zero stores.
10118 Likewise for loads.
10119 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10121 (aarch64_gen_store_pair): Rename calls to match new patterns.
10122 (aarch64_gen_load_pair): Rename calls to match new patterns.
10123 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10124 (load_pair<DREG:mode><DREG2:mode>): ... This.
10125 (store_pair<mode>): Rename to...
10126 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10127 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10128 New mode iterators.
10129 (V_INT_EQUIV): Handle SImode.
10130 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10133 2018-05-22 Martin Sebor <msebor@redhat.com>
10136 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10137 or ajust the presumed bound on an operation to avoid unnecessary
10140 2018-05-22 Martin Sebor <msebor@redhat.com>
10142 PR tree-optimization/85826
10143 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10144 assuming that a DECL necesarily has a constant size.
10146 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10148 PR middle-end/85862
10149 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10151 2018-05-22 Richard Biener <rguenther@suse.de>
10153 PR tree-optimization/85834
10154 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10155 non-constant and non-zero memset arguments.
10157 2018-05-22 Martin Liska <mliska@suse.cz>
10160 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10162 2018-05-22 Richard Biener <rguenther@suse.de>
10164 PR tree-optimization/85863
10165 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10166 comparisons when vectype is specified.
10167 (vectorizable_condition): Do not specify vectype for
10168 vect_is_simple_cond when SLP vectorizing.
10170 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10173 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10174 define __ibm128 as long double.
10175 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10176 as a distinct type when IEEE 128-bit support is enabled.
10177 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10178 128-bit types to use the correct functions.
10179 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10180 convert between 128-bit floating point types that have different
10181 modes but the same representation, instead of using gen_lowpart to
10183 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10185 (IFKF_reg): New attributes to give the register constraints for
10187 (extend<mode>tf2_internal): New insns to mark an explicit
10188 conversion between 128-bit floating point types that have a
10189 different mode but share the same representation.
10191 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10193 PR tree-optimization/85814
10194 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10195 a null return from get_strinfo when unsharing the next
10196 strinfo in the chain.
10198 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10201 * varasm.c (weak_finish): Clean up weak_decls.
10203 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10205 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10206 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10207 UNSPEC_UADALP values.
10208 * config/aarch64/iterators.md (ABAL): New int iterator.
10211 (sur): Add mappings for the above.
10212 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10214 (aarch64_<sur>abal<mode>_4): Likewise.
10215 (aarch64_<sur>adalp<mode>_3): Likewise.
10216 (<sur>sadv16qi): New define_expand.
10218 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10220 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10221 (*movdf_internal): Ditto.
10222 (*rcpsf2_sse): Ditto.
10223 (*rsqrtsf2_sse): Ditto.
10224 (*sqrt<mode>2_sse): Ditto.
10226 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10228 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10230 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10231 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10232 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10233 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10235 * config/aarch64/arm_neon.h: Likewise.
10236 * config/aarch64/iterators.md (VQ_I): New.
10238 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10240 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10242 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10245 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10247 * config/nds32/constraints.md (S): New constraint.
10248 * config/nds32/nds32.md (call_internal): Use constraint S.
10249 (call_value_internal): Likewise.
10250 (sibcall_internal): Likewise.
10251 (sibcall_value_internal): Likewise.
10253 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10254 Chung-Ju Wu <jasonwucj@gmail.com>
10256 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10257 into consideration.
10259 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10260 Chung-Ju Wu <jasonwucj@gmail.com>
10262 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10263 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10264 (nds32_rtx_costs_impl): Simplify.
10265 (nds32_address_cost_impl): Simplify.
10266 (nds32_init_rtx_costs): New function.
10267 (nds32_rtx_costs_speed_prefer): Likewise.
10268 (nds32_rtx_costs_size_prefer): Likewise.
10269 (nds32_address_cost_speed_prefer): Likewise.
10270 (nds32_address_cost_speed_fwprop): Likewise.
10271 (nds32_address_cost_size_prefer): Likewise.
10272 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10273 * config/nds32/nds32.c (nds32_option_override): Use
10274 nds32_init_rtx_costs function.
10276 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10278 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10279 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10280 (TARGET_PIPELINE_N8): Likewise.
10281 (TARGET_PIPELINE_N10): Likewise.
10282 (TARGET_PIPELINE_N13): Likewise.
10283 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10285 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10287 * config/nds32/nds32-fpu.md: Update copyright year.
10289 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10291 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10293 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10295 * config/nds32/nds32.c
10296 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10297 * config/nds32/nds32.opt (minline-asm-r15): New option.
10299 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10301 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10303 * config/nds32/nds32.md (abssi2): New pattern.
10305 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10307 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10308 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10309 Merge insn pattern from sse_cvtsi2ss<round_name> and
10310 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10311 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10312 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10313 using SWI48 mode iterator.
10314 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10315 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10316 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10317 pattern from sse_cvttss2si<round_saeonly_name>
10318 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10319 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10320 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10321 using SWI48 mode iterator.
10322 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10323 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10324 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10325 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10326 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10327 using SWI48 mode iterator.
10328 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10329 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10330 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10331 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10332 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10333 SWI48 mode iterator.
10334 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10335 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10336 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10337 pattern from sse_cvttsd2si<round_saeonly_name>
10338 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10340 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10342 * config/nds32/nds32-md-auxiliary.c
10343 (nds32_valid_smw_lwm_base_p): Refine.
10344 (nds32_output_smw_single_word): Refine.
10345 (nds32_output_smw_double_word): New.
10346 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10348 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10350 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10351 (nds32_output_stack_pop): Refine.
10352 (nds32_expand_unaligned_load): Refine.
10353 (nds32_expand_unaligned_store): Refine.
10355 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10356 Chung-Ju Wu <jasonwucj@gmail.com>
10358 * config/nds32/constants.md: Add TP_REGNUM constant.
10359 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10360 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10362 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10363 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10364 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10365 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10366 and PIC code generation.
10367 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10369 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10371 * config/nds32/nds32.md: Support TLS and PIC.
10372 * config/nds32/nds32.c: Support TLS and PIC.
10373 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10374 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10377 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10379 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10380 mode with E_ prefix.
10382 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10383 Chung-Ju Wu <jasonwucj@gmail.com>
10385 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10386 * config/nds32/nds32-md-auxiliary.c
10387 (symbolic_reference_mentioned_p): New.
10388 (nds32_legitimize_ict_address): New.
10389 (nds32_expand_ict_move): New.
10390 (nds32_indirect_call_referenced_p): New.
10391 (nds32_symbol_binds_local_p): Delete.
10392 (nds32_long_call_p): Modify.
10393 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10394 * config/nds32/nds32-protos.h
10395 (symbolic_reference_mentioned_p): Declare.
10396 (nds32_legitimize_ict_address): Declare.
10397 (nds32_expand_ict_move): Declare.
10398 (nds32_indirect_call_referenced_p): Declare.
10399 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10400 (nds32_relax_group): Use nds32_ict_const_p as condition.
10401 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10402 (nds32_asm_file_start): Output ict_model directive in asm code.
10403 (nds32_legitimate_address_p): Consider indirect call.
10404 (nds32_print_operand): Consider indirect call.
10405 (nds32_print_operand_address): Consider indirect call.
10406 (nds32_insert_attributes): Handle "indirect_call" attribute.
10407 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10408 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10409 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10410 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10411 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10412 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10413 (TARGET_ICT_MODEL_SMALL): Define.
10414 (TARGET_ICT_MODEL_LARGE): Define.
10415 * config/nds32/nds32.md (movsi): Consider ict model.
10416 (call, call_value): Consider ict model.
10417 (sibcall, sibcall_value): Consider ict model.
10418 * config/nds32/nds32.opt (mict-model): New option.
10419 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10422 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10423 Monk Chiang <sh.chiang04@gmail.com>
10424 Jim Wilson <jimw@sifive.com>
10426 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10427 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10428 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10429 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10430 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10431 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10432 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10433 compute save_libcall_adjustment properly.
10434 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10435 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10436 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10437 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10438 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10439 (ABI_SPEC): Handle mabi=ilp32e.
10440 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10441 (RVE): Add RVE mask.
10442 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10443 <-march>: Add rv32e as an example.
10445 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10448 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10449 (intra_create_variable_infos): Handle C++ constructors.
10451 2018-05-18 Martin Liska <mliska@suse.cz>
10453 * passes.def: Remove a redundant pass.
10455 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10458 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10460 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10462 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10464 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10466 (armv2, armv2a, armv3, armv3m): Delete architectures.
10467 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10468 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10469 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10471 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10472 (*mulsidi3adddi): Likewise.
10473 (mulsidi3): Likewise.
10474 (*mulsidi3_nov6): Likewise.
10475 (umulsidi3): Likewise.
10476 (umulsidi3_nov6): Likewise.
10477 (umaddsidi4): Likewise.
10478 (*umulsidi3adddi): Likewise.
10479 (smulsi3_highpart): Likewise.
10480 (*smulsi3_highpart_nov6): Likewise.
10481 (umulsi3_highpart): Likewise.
10482 (*umulsi3_highpart_nov6): Likewise.
10483 * config/arm/arm.h (arm_arch3m): Delete.
10484 * config/arm/arm.c (arm_arch3m): Delete.
10485 (arm_option_override_internal): Update armv3-related comment.
10486 (arm_configure_build_target): Delete use of isa_bit_mode32.
10487 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10488 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10489 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10490 (mulsa3): Likewise.
10491 (mulusa3): Likewise.
10492 * config/arm/arm-protos.h (arm_arch3m): Delete.
10493 * config/arm/arm-tables.opt: Regenerate.
10494 * config/arm/arm-tune.md: Likewise.
10495 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10496 deleted architectures.
10498 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10500 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10501 (armv5t, armv5te): New features.
10502 (ARMv5, ARMv5e): Delete fgroups.
10503 (ARMv5t, ARMv5te): Adjust for above changes.
10504 (ARMv6m): Likewise.
10505 (armv5, armv5e): Delete arches.
10506 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10508 (*call_reg_arm): Likewise.
10509 (*call_value_reg_armv5): Likewise.
10510 (*call_value_reg_arm): Likewise.
10511 (*call_symbol): Likewise.
10512 (*call_value_symbol): Likewise.
10513 (*sibcall_insn): Likewise.
10514 (*sibcall_value_insn): Likewise.
10515 (clzsi2): Likewise.
10516 (prefetch): Likewise.
10517 (define_split and define_peephole2 dependent on arm_arch5):
10519 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10521 (TARGET_ARM_QBIT): Likewise.
10522 (TARGET_DSP_MULTIPLY): Likewise.
10523 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10524 (arm_arch5, arm_arch5e): Delete.
10525 (arm_arch5t, arm_arch5te): Declare.
10526 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10527 (arm_arch5t): Declare.
10528 (arm_option_reconfigure_globals): Update for the above.
10529 (arm_options_perform_arch_sanity_checks): Update comment, replace
10530 use of arm_arch5 with arm_arch5t.
10531 (use_return_insn): Likewise.
10532 (arm_emit_call_insn): Likewise.
10533 (output_return_instruction): Likewise.
10534 (arm_final_prescan_insn): Likewise.
10535 (arm_coproc_builtin_available): Likewise.
10536 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10537 arm_arch5e with arm_arch5t and arm_arch5te.
10538 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10539 (arm_arch5t, arm_arch5te): Declare.
10540 * config/arm/arm-tables.opt: Regenerate.
10541 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10542 * config/arm/t-multilib: Likewise.
10543 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10544 instead of arm_arch5.
10545 (*call_reg_thumb1): Likewise.
10546 (*call_value_reg_thumb1_v5): Likewise.
10547 (*call_value_reg_thumb1): Likewise.
10548 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10550 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10552 2018-05-18 Martin Liska <mliska@suse.cz>
10554 PR gcov-profile/84846
10555 * doc/gcov.texi: Document -t option of gcov tool.
10557 2018-05-18 Martin Liska <mliska@suse.cz>
10559 PR gcov-profile/84846
10560 * gcov.c (print_usage): Add new -t option.
10561 (process_args): Handle the option.
10562 (generate_results): Use stdout as output when requested by
10565 2018-05-18 Martin Liska <mliska@suse.cz>
10567 PR gcov-profile/84846
10568 * coverage.c (coverage_init): Write PWD to .gcno file.
10569 * doc/gcov.texi: Document how working directory is printed.
10570 * gcov-dump.c (dump_gcov_file): Print PWD.
10571 * gcov.c (output_intermediate_file): Likewise.
10572 (read_graph_file): Read PWD string.
10573 (output_lines): Print PWD.
10575 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10577 PR middle-end/85817
10578 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10579 for retval and return false if all args to phi are zero.
10581 2018-05-18 Richard Biener <rguenther@suse.de>
10583 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10585 (evrp_dom_walker::before_dom_children): Call it.
10587 2018-05-18 Richard Biener <rguenther@suse.de>
10589 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10590 results when processing array refs with variable index.
10592 2018-05-18 Toon Moene <toon@moene.org>
10594 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10595 directly after that of -floop-interchange. Indicate that both
10596 options are enabled by default when specifying -O3.
10598 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10600 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10601 iterator. Delete separate integer-mode vec_set<mode> expander.
10602 (aarch64_simd_vec_setv2di): Delete.
10603 (vec_setv2di): Delete.
10604 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10605 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
10606 the "w, r" alternative.
10608 2018-05-18 Martin Liska <mliska@suse.cz>
10610 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10611 * tree-pass.h (make_pass_lower_switch_O0): New function.
10612 * tree-switch-conversion.c (node_has_low_bound): Remove.
10613 (node_has_high_bound): Likewise.
10614 (node_is_bounded): Likewise.
10615 (class pass_lower_switch): Make it a template type and create
10617 (pass_lower_switch::execute): Add template argument.
10618 (make_pass_lower_switch): New function.
10619 (make_pass_lower_switch_O0): New function.
10620 (do_jump_if_equal): Remove.
10621 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10622 all the hard work to tree optimization passes.
10624 2018-05-18 Martin Liska <mliska@suse.cz>
10626 * dbgcnt.c (limit_low): Renamed from limit.
10627 (limit_high): New variable.
10628 (dbg_cnt_is_enabled): Check for upper limit.
10629 (dbg_cnt): Adjust dumping.
10630 (dbg_cnt_set_limit_by_index): Add new argument for high
10632 (dbg_cnt_set_limit_by_name): Likewise.
10633 (dbg_cnt_process_single_pair): Parse new format.
10634 (dbg_cnt_process_opt): Use strtok.
10635 (dbg_cnt_list_all_counters): Remove 'value' and add
10637 * doc/invoke.texi: Document changes.
10639 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10641 * doc/sourcebuild.texi (scalar_all_fma): Document.
10642 * tree.def (FMA_EXPR): Delete.
10643 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10644 * internal-fn.c (ternary_direct): New macro.
10645 (expand_ternary_optab_fn): Likewise.
10646 (direct_ternary_optab_supported_p): Likewise.
10647 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10648 * builtins.c (fold_builtin_fma): Delete.
10649 (fold_builtin_3): Don't call it.
10650 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10651 * expr.c (expand_expr_real_2): Likewise.
10652 * fold-const.c (operand_equal_p): Likewise.
10653 (fold_ternary_loc): Likewise.
10654 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10655 * gimple.c (DEFTREECODE): Likewise.
10656 * gimplify.c (gimplify_expr): Likewise.
10657 * optabs-tree.c (optab_for_tree_code): Likewise.
10658 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10659 * tree-eh.c (operation_could_trap_p): Likewise.
10660 (stmt_could_throw_1_p): Likewise.
10661 * tree-inline.c (estimate_operator_cost): Likewise.
10662 * tree-pretty-print.c (dump_generic_node): Likewise.
10663 (op_code_prio): Likewise.
10664 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10665 * tree-ssa-operands.c (get_expr_operands): Likewise.
10666 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10667 * fold-const-call.h (fold_fma): Delete.
10668 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10669 CFN_FNMA and CFN_FNMS.
10670 (fold_fma): Delete.
10671 * genmatch.c (combined_fn): New enum.
10672 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10673 (commutative_op): New function.
10674 (commutate): Use it. Handle more than 2 operands.
10675 (dt_operand::gen_gimple_expr): Use commutative_op.
10676 (parser::parse_expr): Allow :c to be used with non-binary
10677 operators if the commutative operand is known.
10678 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10679 CFN_FMS, CFN_FNMA and CFN_FNMS.
10680 (backprop::process_assign_use): Remove FMA_EXPR handling.
10681 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10682 (gen_hsa_fma): New function.
10683 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10684 IFN_FNMA and IFN_FNMS.
10685 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10686 * gimple-fold.h (follow_all_ssa_edges): Declare.
10687 * gimple-fold.c (follow_all_ssa_edges): New function.
10688 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10689 gimple_build interface and use follow_all_ssa_edges to fold the result.
10690 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10691 instead of checking for optabs directly.
10692 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10693 rather than FMA_EXPRs.
10694 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10695 call to IFN_FMA instead of an FMA_EXPR.
10697 2018-05-17 Jim Wilson <jimw@sifive.com>
10699 * expr.c (do_tablejump): When converting index to Pmode, if we have a
10700 sign extended promoted subreg, and the range does not have the sign bit
10701 set, then do a sign extend.
10703 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10704 test, check for sign extended subreg and/or constant operands, and
10705 do a sign extend in that case.
10707 2018-05-17 Steve Ellcey <sellcey@cavium.com>
10709 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10710 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10712 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10713 Change logics_shift_reg to logics_shift_imm.
10714 (thunderx2t99_fp_loadpair_basic): Delete.
10715 (thunderx2t99_fp_storepair_basic): Delete.
10716 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10717 (thunderx2t99_asimd_polynomial): Delete.
10718 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10719 and neon_fp_mul_d_scalar_q.
10720 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10721 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10722 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10723 (thunderx2t99_asimd_lut): Add missing tbl types.
10724 (thunderx2t99_asimd_ext): Delete.
10725 (thunderx2t99_asimd_load1_1_mult): Delete.
10726 (thunderx2t99_asimd_load1_2_mult): Delete.
10727 (thunderx2t99_asimd_load1_ldp): New.
10728 (thunderx2t99_asimd_load1): New.
10729 (thunderx2t99_asimd_load2): Add missing *load2* types.
10730 (thunderx2t99_asimd_load3): New.
10731 (thunderx2t99_asimd_load4): New.
10732 (thunderx2t99_asimd_store1_1_mult): Delete.
10733 (thunderx2t99_asimd_store1_2_mult): Delete.
10734 (thunderx2t99_asimd_store2_mult): Delete.
10735 (thunderx2t99_asimd_store2_onelane): Delete.
10736 (thunderx2t99_asimd_store_stp): New.
10737 (thunderx2t99_asimd_store1): New.
10738 (thunderx2t99_asimd_store2): New.
10739 (thunderx2t99_asimd_store3): New.
10740 (thunderx2t99_asimd_store4): New.
10742 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
10744 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10745 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
10747 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
10748 Segher Boessenkool <segher@kernel.crashing.org>
10751 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10754 2018-05-17 Richard Biener <rguenther@suse.de>
10756 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10757 for pruning loop and prune defs feeding only already visited PHIs.
10759 2018-05-17 Richard Biener <rguenther@suse.de>
10761 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10763 2018-05-17 Bin Cheng <bin.cheng@arm.com>
10764 Richard Biener <rguenther@suse.de>
10766 PR tree-optimization/85793
10767 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10768 for VMAT_ELEMENTWISE.
10770 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10772 * internal-fn.h (lookup_internal_fn): Declare
10773 * internal-fn.c (lookup_internal_fn): New function.
10774 * gimple.c (gimple_build_call_from_tree): Handle calls to
10775 internal functions.
10776 * gimple-pretty-print.c (dump_gimple_call): Print "." before
10777 internal function names.
10778 * tree-pretty-print.c (dump_generic_node): Likewise.
10779 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10781 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10783 * gimple-fold.h (gimple_build): Make the function forms take
10784 combined_fn rather than built_in_function.
10785 (gimple_simplify): Likewise.
10786 * gimple-match-head.c (gimple_simplify): Likewise.
10787 * gimple-fold.c (gimple_build): Likewise.
10788 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10789 rather than gimple_build_call_internal.
10790 (get_initial_defs_for_reduction): Likewise.
10791 (vect_create_epilog_for_reduction): Likewise.
10792 (vectorizable_live_operation): Likewise.
10794 2018-05-17 Martin Liska <mliska@suse.cz>
10796 * gimple-ssa-sprintf.c (format_directive): Do not use
10797 space in between 'G_' and '('.
10799 2018-05-17 Jakub Jelinek <jakub@redhat.com>
10802 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10803 even if the mask is not all ones.
10806 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10808 (ix86_gimple_fold_builtin): Likewise.
10811 * config/i386/i386.c: Include tree-vector-builder.h.
10812 (ix86_vector_shift_count): New function.
10813 (ix86_fold_builtin): Fold shift builtins by scalar count.
10814 (ix86_gimple_fold_builtin): Likewise.
10816 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10817 _mm512_setzero): New intrinsics.
10819 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
10820 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10822 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10823 code generation for cases where splatting a value is not useful.
10824 * simplify-rtx.c (simplify_ternary_operation): Simplify
10825 vec_merge across a vec_duplicate and a paradoxical subreg forming
10826 a vector mode to a vec_concat.
10828 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
10830 * config.gcc: Support "goldmont-plus".
10831 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10833 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10834 PROCESSOR_GOLDMONT_PLUS.
10835 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10836 (processor_target_table): Add "goldmont-plus".
10837 (PTA_GOLDMONT_PLUS): Define.
10838 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10839 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10840 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10841 (fold_builtin_cpu): Add "goldmont-plus".
10842 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10843 (ix86_option_override_internal): Add "goldmont-plus".
10844 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10845 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10846 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10847 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10849 2018-05-17 Richard Biener <rguenther@suse.de>
10851 PR tree-optimization/85757
10852 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10853 remove defs that only feed that PHI from further processing.
10855 2018-05-16 Jim Wilson <jimw@sifive.com>
10857 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10859 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10861 2018-05-16 Mark Wielaard <mark@klomp.org>
10863 * dwarf2out.c (count_index_strings): New function.
10864 (output_indirect_strings): Call count_index_strings and generate
10865 header for dwarf_version >= 5.
10867 2018-05-16 Mark Wielaard <mark@klomp.org>
10869 * dwarf2out.c (dwarf_FORM): New function.
10870 (set_indirect_string): Use dwarf_FORM.
10871 (reset_indirect_string): Likewise.
10872 (size_of_die): Likewise.
10873 (value_format): Likewise.
10874 (output_die): Likewise.
10875 (add_skeleton_AT_string): Likewise.
10876 (output_macinfo_op): Likewise.
10877 (index_string): Likewise.
10878 (output_index_string_offset): Likewise.
10879 (output_index_string): Likewise.
10880 (count_index_strings): Likewise.
10882 2018-05-16 Carl Love <cel@us.ibm.com>
10884 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10885 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10887 2018-05-16 Martin Jambor <mjambor@suse.cz>
10889 * ipa-prop.c (ipa_free_all_edge_args): Remove.
10890 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10892 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
10894 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10895 (fnma<mode>4): Likewise.
10896 (fms<mode>4): Likewise.
10897 (fnms<mode>4): Likewise.
10898 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10899 (aarch64_fnma<mode>4): Likewise.
10900 (aarch64_fms<mode>4): Likewise.
10901 (aarch64_fnms<mode>4): Likewise.
10902 (aarch64_fnmadd<mode>4): Likewise.
10904 2018-05-16 Jason Merrill <jason@redhat.com>
10906 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
10908 2018-05-16 Richard Biener <rguenther@suse.de>
10910 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10911 (dump_stmt_cost): Declare.
10912 (add_stmt_cost): Dump cost we add.
10913 (add_stmt_costs): New function.
10914 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10915 No longer exported.
10916 (vect_analyze_stmt): Adjust prototype.
10917 (vectorizable_condition): Likewise.
10918 (vectorizable_live_operation): Likewise.
10919 (vectorizable_reduction): Likewise.
10920 (vectorizable_induction): Likewise.
10921 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10922 cost vector to pass to vectorizable_ and record afterwards.
10923 (vect_model_reduction_cost): Take cost vector argument and adjust.
10924 (vect_model_induction_cost): Likewise.
10925 (vectorizable_reduction): Likewise.
10926 (vectorizable_induction): Likewise.
10927 (vectorizable_live_operation): Likewise.
10928 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10929 SLP_TREE_NUMBER_OF_VEC_STMTS.
10930 (vect_analyze_slp_cost_1): Remove.
10931 (vect_analyze_slp_cost): Likewise.
10932 (vect_slp_analyze_node_operations): Take visited args and
10933 a target cost vector. Avoid processing already visited stmt sets.
10934 (vect_slp_analyze_operations): Use a local cost vector to gather
10935 costs and register those of non-discarded instances.
10936 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10937 (vect_schedule_slp_instance): Remove copying of
10938 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
10940 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10941 adding cost. Record cost entry location.
10942 (vect_prologue_cost_for_slp_op): Function to compute cost of
10943 a constant or invariant generated for SLP vect in the prologue,
10944 split out from vect_analyze_slp_cost_1.
10945 (vect_model_simple_cost): Make static. Adjust for SLP costing.
10946 (vect_model_promotion_demotion_cost): Likewise.
10947 (vect_model_store_cost): Likewise, make static.
10948 (vect_model_load_cost): Likewise.
10949 (vectorizable_bswap): Add cost vector arg and adjust.
10950 (vectorizable_call): Likewise.
10951 (vectorizable_simd_clone_call): Likewise.
10952 (vectorizable_conversion): Likewise.
10953 (vectorizable_assignment): Likewise.
10954 (vectorizable_shift): Likewise.
10955 (vectorizable_operation): Likewise.
10956 (vectorizable_store): Likewise.
10957 (vectorizable_load): Likewise.
10958 (vectorizable_condition): Likewise.
10959 (vectorizable_comparison): Likewise.
10960 (can_vectorize_live_stmts): Likewise.
10961 (vect_analyze_stmt): Likewise.
10962 (vect_transform_stmt): Adjust calls to vectorizable_*.
10963 * tree-vectorizer.c: Include gimple-pretty-print.h.
10964 (dump_stmt_cost): New function.
10966 2018-05-16 Richard Biener <rguenther@suse.de>
10968 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10969 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10970 * tree-ssa-dse.c: Include tree-ssa-loop.h.
10971 (check_name): New callback.
10972 (dse_classify_store): Track cycles via a visited bitmap of PHI
10973 defs and simplify handling of in-loop and across loop dead stores
10974 and properly fail for loop-variant refs. Handle byte-tracking with
10975 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10978 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
10980 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10981 (vect_get_mask_type_for_stmt): Likewise.
10982 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10984 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
10985 to determine the statement's vector type and the vector type that
10986 should be used for calculating nunits. Deal with cases in which
10987 the type has to be deferred.
10988 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10989 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10990 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10991 (vect_determine_vf_for_stmt): New functions, split out from...
10992 (vect_determine_vectorization_factor): ...here.
10993 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10994 (vect_get_mask_type_for_stmt): New functions, split out from
10995 vect_determine_vectorization_factor.
10997 2018-05-16 Richard Biener <rguenther@suse.de>
10999 * tree-cfg.c (verify_gimple_assign_ternary): Properly
11000 verify the [VEC_]COND_EXPR embedded comparison.
11002 2018-05-15 Martin Sebor <msebor@redhat.com>
11004 PR tree-optimization/85753
11005 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
11006 RECORD_TYPE in addition to ARRAY_TYPE.
11008 2018-05-15 Martin Sebor <msebor@redhat.com>
11010 PR middle-end/85643
11011 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
11013 2018-05-15 Richard Biener <rguenther@suse.de>
11015 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11016 add by_clobber_p one. Change algorithm to collect all defs
11017 representing uses we need to walk and try reducing them to
11018 a single one before failing.
11019 (dse_dom_walker::dse_optimize_stmt): Adjust.
11021 2018-05-13 Mark Wielaard <mark@klomp.org>
11023 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11024 (size_of_loc_descr): Likewise.
11025 (output_loc_operands): Likewise.
11026 (output_loc_operands_raw): Likewise.
11027 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11028 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11029 (hash_loc_operands): Likewise.
11030 (compare_loc_operands): Likewise.
11032 2018-05-14 Mark Wielaard <mark@klomp.org>
11034 * dwarf2out.c (count_index_addrs): New function.
11035 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11037 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11039 PR tree-optimization/83648
11040 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11041 return value as malloc candidate.
11043 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11046 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11047 param as true in call to suggest_attribute.
11049 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11051 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11052 -mreadonly-in-sdata.
11054 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11056 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11058 (aarch64_crypto_aesd_fused): Likewise.
11060 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11062 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11063 (movsi_aarch64): Likewise.
11064 (load_pairsi): Likewise.
11065 (load_pairdi): Likewise.
11066 (store_pairsi): Likewise.
11067 (store_pairdi): Likewise.
11068 (load_pairsf): Likewise.
11069 (load_pairdf): Likewise.
11070 (store_pairsf): Likewise.
11071 (store_pairdf): Likewise.
11072 (zero_extend): Likewise.
11073 (trunc): Swap alternatives.
11074 (fcvt_target): Add '?' to prefer w over r.
11076 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11079 * config/i386/i386.md: Disallow non-commutative arithmetics in
11080 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11081 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11082 in the peephole2 before it.
11084 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11086 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11087 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11088 (ix86_handle_option): Handle -mcldemote.
11089 * config.gcc: New header.
11090 * config/i386/cldemoteintrin.h: New file.
11091 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11092 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11094 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11095 OPTION_MASK_ISA_CLDEMOTE.
11096 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11097 (ix86_valid_target_attribute_inner_p): Ditto.
11098 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11099 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11100 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11101 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11102 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11104 * config/i386/i386.opt: Add -mcldemote.
11105 * config/i386/x86intrin.h: New header.
11106 * doc/invoke.texi: Add -mcldemote.
11108 2018-05-14 Richard Biener <rguenther@suse.de>
11110 * doc/match-and-simplify.texi: Adjust :s documentation.
11112 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11114 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11115 intended memcpy size.
11116 (REORDER_45): Likewise.
11118 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11120 * sort.cc: New file.
11121 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11122 * vec.c (qsort_chk): Use gcc_qsort.
11123 * Makefile.in (OBJS-libcommon): Add sort.o.
11124 (build/sort.o): New target. Use it...
11125 (BUILD_RTL): ... here, and...
11126 (build/gencfn-macros): ... here, and...
11127 (build/genmatch): ... here.
11129 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11130 Chung-Ju Wu <jasonwucj@gmail.com>
11132 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11133 * config/nds32/nds32-graywolf.md: New file.
11134 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11135 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11137 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11138 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11139 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11140 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11141 * config/nds32/pipelines.md: Include n15 settings.
11143 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11144 Chung-Ju Wu <jasonwucj@gmail.com>
11146 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11147 * config/nds32/nds32-n13.md: New file.
11148 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11149 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11151 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11152 * config/nds32/nds32.md (pipeline_model): Add n13.
11153 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11154 * config/nds32/pipelines.md: Include n13 settings.
11156 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11157 Chung-Ju Wu <jasonwucj@gmail.com>
11159 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11160 * config/nds32/nds32-n10.md: New file.
11161 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11162 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11164 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11165 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11166 * config/nds32/nds32.md (pipeline_model): Add n10.
11167 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11168 * config/nds32/pipelines.md: Include n10 settings.
11170 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11171 Kito Cheng <kito.cheng@gmail.com>
11172 Chung-Ju Wu <jasonwucj@gmail.com>
11174 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11175 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11176 Add enum values for DSP extension instructions.
11177 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11179 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11180 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11181 New code iterators.
11182 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11183 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11184 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11185 * config/nds32/nds32-intrinsic.md: Likewise.
11186 * config/nds32/nds32_intrinsic.h: Likewise.
11187 * config/nds32/nds32-md-auxiliary.c: Likewise.
11188 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11189 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11190 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11191 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11192 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11193 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11194 TYPE_DMAC in switch statement.
11195 * config/nds32/nds32.c: New checking and implementation for DSP
11196 extension instructions.
11197 * config/nds32/nds32.h: Likewise.
11198 * config/nds32/nds32.md: Likewise.
11199 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11200 * config/nds32/predicates.md: Implement new predicates for DSP
11203 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11205 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11206 Reformat alternatives and attributes so it is easier to identify
11207 which constraints/attributes go with which instruction.
11208 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11209 (mov<mode>_softfloat32, FMOVE64): Likewise.
11210 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11211 (mov<mode>_softfloat64, FMOVE64): Likewise.
11213 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11215 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11217 (Basic PowerPC Built-in Functions): The new name of the
11218 subsection previously known as "PowerPC Built-in Functions".
11219 (Basic PowerPC Built-in Functions Available on all Configurations):
11221 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11222 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11223 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11224 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11226 2018-05-11 Martin Jambor <mjambor@suse.cz>
11229 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11232 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11235 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11237 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11239 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11240 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11241 (ix86_handle_option): Handle -mwaitpkg.
11242 * config.gcc: New header.
11243 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11244 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11245 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11247 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11248 OPTION_MASK_ISA_WAITPKG.
11249 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11250 (ix86_option_override_internal): Add PTA_WAITPKG.
11251 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11252 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11253 IX86_BUILTIN_TPAUSE.
11254 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11255 __builtin_ia32_umwait and __builtin_ia32_tpause.
11256 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11257 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11258 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11259 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11260 UNSPECV_TPAUSE): New.
11261 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11262 * config/i386/i386.opt: Add -mwaitpkg.
11263 * config/i386/waitpkgintrin.h: New file.
11264 * config/i386/x86intrin.h: New header.
11265 * doc/invoke.texi: Add -mwaitpkg.
11267 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11270 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11272 (cortex-m0): Use armv6s-m isa.
11273 (cortex-m0plus): Likewise.
11274 (cortex-m1): Likewise.
11275 (cortex-m0.small-multiply): Likewise.
11276 (cortex-m0plus.small-multiply): Likewise.
11277 (cortex-m1.small-multiply): Likewise.
11279 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11280 Jakub Jelinek <jakub@redhat.com>
11282 PR tree-optimization/85692
11283 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11284 source permute as well.
11286 2018-05-11 Martin Liska <mliska@suse.cz>
11289 * doc/extend.texi: Document LLVM style format for no_sanitize
11292 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11294 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11295 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11296 (mode_supports_vsx_dform_quad): Likewise.
11297 (mode_supports_vmx_dform): Move these functions to be next to the
11298 other mode_supports functions.
11299 (mode_supports_dq_form): Likewise.
11300 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11301 mode_supports_dq_form.
11302 (reg_offset_addressing_ok_p): Likewise.
11303 (offsettable_ok_by_alignment): Likewise.
11304 (rs6000_legitimate_offset_address_p): Likewise.
11305 (legitimate_lo_sum_address_p): Likewise.
11306 (rs6000_legitimize_address): Likewise.
11307 (rs6000_legitimize_reload_address): Likewise.
11308 (rs6000_secondary_reload_inner): Likewise.
11309 (rs6000_preferred_reload_class): Likewise.
11310 (rs6000_output_move_128bit): Likewise.
11312 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11314 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11315 Generate SImode target register for null target.
11316 <case IX86_BUILTIN_XGETBV>: Ditto.
11317 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11318 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11320 2018-05-10 Carl Love <cel@us.ibm.com>
11322 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11323 dcbtt and dcbtstt if operands[2] is 0.
11325 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11328 * config/i386/sse.md (usadv64qi): New expander.
11330 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11332 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11333 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11334 -maltivec=be support.
11335 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11336 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11337 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11338 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11339 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11340 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11341 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11342 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11343 altivec_vsumsws): Adjust.
11344 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11345 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11346 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11348 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11349 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11350 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11351 (altivec_lve<VI_char>x): Delete expand.
11352 (*altivec_lve<VI_char>x_internal): Rename to...
11353 (altivec_lve<VI_char>x): ... this.
11354 (altivec_lvxl_<mode>): Delete expand.
11355 (*altivec_lvxl_<mode>_internal): Rename to ...
11356 (altivec_lvxl_<mode>): ... this.
11357 (altivec_stvxl_<mode>): Delete expand.
11358 (*altivec_stvxl_<mode>_internal): Rename to ...
11359 (altivec_stvxl_<mode>): ... this.
11360 (altivec_stve<VI_char>x): Delete expand.
11361 (*altivec_stve<VI_char>x_internal): Rename to ...
11362 (altivec_stve<VI_char>x): ... this.
11363 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11364 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11365 reduc_plus_scal_<mode>): Adjust.
11366 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11368 (rs6000_cpu_cpp_builtins): Adjust.
11369 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11370 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11371 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11372 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11373 -maltivec=be support.
11374 (rs6000_split_vec_extract_var): Adjust.
11375 (rs6000_split_v4si_init): Adjust.
11376 (swap_selector_for_mode): Delete.
11377 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11378 altivec_expand_stvex_be): Delete.
11379 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11380 -maltivec=be support.
11381 (rs6000_gimple_fold_builtin): Ditto.
11382 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11384 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11385 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11386 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11387 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11388 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11389 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11390 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11391 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11392 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11393 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11394 anonymous split): Adjust.
11395 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11396 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11398 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11400 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11401 when --with-gxx-include-dir is also specified.
11402 * configure: Regenerate.
11404 2018-05-09 Jim Wilson <jimw@sifive.com>
11407 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11408 * config/riscv/t-withmultilib: New.
11409 * config/riscv/withmultilib.h: New.
11410 * doc/install.texi: Document RISC-V --with-multilib-list support.
11412 2018-05-09 Richard Biener <rguenther@suse.de>
11414 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11416 (vect_bb_vectorization_profitable_p): Adjust. Compute
11417 actual scalar cost using the cost vector and the add_stmt_cost
11420 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11422 PR rtl-optimization/85645
11423 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11424 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11426 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11428 PR rtl-optimization/85645
11429 * shrink-wrap.c (spread_components): Return a boolean saying if
11430 anything was changed.
11431 (try_shrink_wrapping_separate): Iterate spread_components until
11432 nothing changes anymore.
11434 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11436 PR rtl-optimization/85645
11437 * regrename.c (build_def_use): Also kill the chains that include the
11438 destination of a REG_CFA_REGISTER note.
11440 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11442 PR rtl-optimization/85645
11443 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11444 insn that has a REG_CFA_REGISTER note.
11446 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11448 * cfgexpand.c (expand_clobber): New function.
11449 (expand_gimple_stmt_1): Use it.
11450 * tree-vect-stmts.c (vect_clobber_variable): New function,
11452 (vectorizable_simd_clone_call): ...here.
11453 (vectorizable_store): Emit a clobber either side of an
11454 IFN_STORE_LANES sequence.
11455 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11457 2018-05-09 Tom de Vries <tom@codesourcery.com>
11460 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11461 (define_insn "trap_if_false"): Add exit after trap.
11463 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11465 PR rtl-optimization/85638
11466 * bb-reorder.c: Include common/common-target.h.
11467 (create_forwarder_block): New function extracted from...
11468 (fix_up_crossing_landing_pad): ...here. Rename into...
11469 (dw2_fix_up_crossing_landing_pad): ...this.
11470 (sjlj_fix_up_crossing_landing_pad): New function.
11471 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11472 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11473 from both partitions and exit the loop after one iteration.
11475 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11478 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11480 (Basic PowerPC Built-in Functions): The new name of the
11481 subsection previously known as "PowerPC Built-in Functions".
11482 (Basic PowerPC Built-in Functions Available on all Configurations):
11484 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11486 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11488 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11490 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11493 2018-05-08 Jim Wilson <jimw@sifive.com>
11495 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11496 (LD_EMUL_SUFFIX): New.
11497 (LINK_SPEC): Use it.
11499 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11501 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11503 (Basic PowerPC Built-in Functions): The new name of the
11504 subsection previously known as "PowerPC Built-in Functions".
11505 (Basic PowerPC Built-in Functions Available on all Configurations):
11507 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11509 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11511 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11513 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11516 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11519 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11520 after cmpelim optimization.
11522 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
11524 * config.gcc: Support "goldmont".
11525 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11526 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11527 PROCESSOR_GOLDMONT.
11528 * config/i386/i386.c (m_GOLDMONT): Define.
11529 (processor_target_table): Add "goldmont".
11530 (PTA_GOLDMONT): Define.
11531 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11532 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11533 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11534 (fold_builtin_cpu): Add "goldmont".
11535 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11536 (ix86_option_override_internal): Add "goldmont".
11537 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11538 (processor_type): Add PROCESSOR_GOLDMONT.
11539 * config/i386/i386.md: Add CPU "glm".
11540 * config/i386/glm.md: New file.
11541 * config/i386/x86-tune.def: Add m_GOLDMONT.
11542 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11544 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11547 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11549 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11550 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
11551 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
11554 * config/i386/i386.c (ix86_fold_builtin): Handle
11555 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11558 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11559 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11561 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
11564 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11565 (check_arch): Likewise.
11566 (check_fpu): Return the result rather than printing it.
11567 (end arch): Fix operator precedence.
11568 (end cpu): Likewise.
11569 (END): Print the result from check_fpu.
11571 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11572 Alan Hayward <alan.hayward@arm.com>
11573 David Sherwood <david.sherwood@arm.com>
11575 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11576 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11577 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11578 (*fcmuo<mode>_and): New patterns.
11580 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11582 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11583 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11584 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11585 (cmp_op, sve_imm_con): New code attributes.
11586 (SVE_COND_INT_CMP, imm_con): Delete.
11587 (cmp_op): Remove above unspecs from int attribute.
11588 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11590 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
11591 comparison-specific unspecs.
11592 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11593 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11594 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11595 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11596 (*vec_fcm<cmp_op><mode>): Rename to...
11597 (*fcm<cmp_op><mode>): ...this and adjust likewise.
11598 (*vec_fcmuo<mode>): Rename to...
11599 (*fcmuo<mode>): ...this and adjust likewise.
11600 (*pred_fcm<cmp_op><mode>): New pattern.
11601 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11602 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11604 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11606 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11607 (aarch64_emit_sve_predicated_cond): New function.
11608 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11609 (aarch64_emit_unspec_cond_or): Replace with...
11610 (aarch64_emit_sve_or_conds): ...this new function. Use
11611 aarch64_emit_sve_ptrue_op for the individual comparisons and
11612 aarch64_emit_binop to OR them together.
11613 (aarch64_emit_inverted_unspec_cond): Replace with...
11614 (aarch64_emit_sve_inverted_cond): ...this new function. Use
11615 aarch64_emit_sve_ptrue_op for the comparison and
11616 aarch64_emit_unop to invert the result.
11617 (aarch64_expand_sve_vec_cmp_float): Update after the above
11618 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11620 2018-05-07 Nathan Sidwell <nathan@acm.org>
11622 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11623 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11624 (Backwards Compatibility): Likewise.
11626 2018-05-07 Luis Machado <luis.machado@linaro.org>
11630 2018-05-07 Luis Machado <luis.machado@linaro.org>
11632 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11633 <prefetch_dynamic_strides>: New const bool field.
11634 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11635 prefetch_dynamic_strides.
11636 (exynosm1_prefetch_tune): Likewise.
11637 (thunderxt88_prefetch_tune): Likewise.
11638 (thunderx_prefetch_tune): Likewise.
11639 (thunderx2t99_prefetch_tune): Likewise.
11640 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11642 (aarch64_override_options_internal): Update to set
11643 PARAM_PREFETCH_DYNAMIC_STRIDES.
11644 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11645 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11646 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11647 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11648 prefetch-dynamic-strides setting.
11650 2018-05-07 Luis Machado <luis.machado@linaro.org>
11652 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11653 <minimum_stride>: New const int field.
11654 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11655 minimum_stride field.
11656 (exynosm1_prefetch_tune): Likewise.
11657 (thunderxt88_prefetch_tune): Likewise.
11658 (thunderx_prefetch_tune): Likewise.
11659 (thunderx2t99_prefetch_tune): Likewise.
11660 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11661 (aarch64_override_options_internal): Update to set
11662 PARAM_PREFETCH_MINIMUM_STRIDE.
11663 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11664 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11665 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11666 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11667 stride is constant and is below the minimum stride threshold.
11669 2018-05-07 Luis Machado <luis.machado@linaro.org>
11671 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11674 2018-05-07 Luis Machado <luis.machado@linaro.org>
11676 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11677 <prefetch_dynamic_strides>: New const bool field.
11678 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11679 prefetch_dynamic_strides.
11680 (exynosm1_prefetch_tune): Likewise.
11681 (thunderxt88_prefetch_tune): Likewise.
11682 (thunderx_prefetch_tune): Likewise.
11683 (thunderx2t99_prefetch_tune): Likewise.
11684 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11686 (aarch64_override_options_internal): Update to set
11687 PARAM_PREFETCH_DYNAMIC_STRIDES.
11688 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11689 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11690 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11691 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11692 prefetch-dynamic-strides setting.
11694 2018-05-07 Luis Machado <luis.machado@linaro.org>
11696 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11697 <minimum_stride>: New const int field.
11698 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11699 minimum_stride field.
11700 (exynosm1_prefetch_tune): Likewise.
11701 (thunderxt88_prefetch_tune): Likewise.
11702 (thunderx_prefetch_tune): Likewise.
11703 (thunderx2t99_prefetch_tune): Likewise.
11704 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11705 (aarch64_override_options_internal): Update to set
11706 PARAM_PREFETCH_MINIMUM_STRIDE.
11707 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11708 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11709 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11710 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11711 stride is constant and is below the minimum stride threshold.
11713 2018-05-06 Jakub Jelinek <jakub@redhat.com>
11716 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11717 the type is addressable. Don't force op into register if it has
11720 2018-05-05 Roland McGrath <mcgrathr@google.com>
11723 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11724 any section for which we don't know a specific type it should have,
11725 regardless of name. Previously this was done only for the exact
11726 names ".init_array", ".fini_array", and ".preinit_array".
11727 (default_elf_asm_named_section): Add comment about
11728 relationship with default_section_type_flags and SECTION_NOTYPE.
11729 (get_section): Don't consider it a type conflict if one side has
11730 SECTION_NOTYPE and the other doesn't, as long as neither has the
11731 SECTION_BSS et al used in the default_section_type_flags logic.
11733 2018-05-05 Tom de Vries <tom@codesourcery.com>
11736 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11737 (workaround_barsyncs): New function.
11738 (nvptx_reorg): Use workaround_barsyncs.
11739 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11740 (define_expand "nvptx_membar_cta"): New define_expand.
11741 (define_insn "*nvptx_membar_cta"): New insn.
11743 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
11745 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11746 To improve optimization opportunities.
11747 * builtin-types.def: The new needed builtin types for the above.
11749 2018-05-04 Richard Biener <rguenther@suse.de>
11751 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11752 * gimple-ssa-store-merging.c
11753 (imm_store_chain_info::output_merged_store): Remove redundant create,
11754 release split_store vector contents on failure.
11755 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11756 scalar stmt vector on cache hit.
11758 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
11760 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11762 * config.gcc (powerpc-xilinx-eabi*): Remove.
11763 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11765 (fusion_addis_mem_combo_load): Ditto.
11766 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11768 (rs6000_cpu_cpp_builtins): Ditto.
11769 * config/rs6000/rs6000-linux.c
11770 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11771 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11772 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11774 (rs6000_setup_reg_addr_masks): Ditto.
11775 (rs6000_init_hard_regno_mode_ok): Ditto.
11776 (rs6000_option_override_internal): Ditto.
11777 (legitimate_lo_sum_address_p): Ditto.
11778 (rs6000_legitimize_address): Ditto.
11779 (rs6000_legitimize_reload_address): Ditto.
11780 (rs6000_legitimate_address_p): Ditto.
11781 (abi_v4_pass_in_fpr): Ditto.
11782 (setup_incoming_varargs): Ditto.
11783 (rs6000_gimplify_va_arg): Ditto.
11784 (rs6000_split_multireg_move): Ditto.
11785 (rs6000_savres_strategy): Ditto.
11786 (rs6000_emit_prologue_components): Ditto.
11787 (rs6000_emit_epilogue_components): Ditto.
11788 (rs6000_emit_prologue): Ditto.
11789 (rs6000_emit_epilogue): Ditto.
11790 (rs6000_elf_file_end): Ditto.
11791 (rs6000_function_value): Ditto.
11792 (rs6000_libcall_value): Ditto.
11793 * config/rs6000/rs6000.h: Ditto.
11794 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11795 (TARGET_MINMAX): ... this. New.
11796 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11797 * config/rs6000/rs6000.md: Remove Xilinx FP support.
11798 (*movsi_internal1_single): Delete.
11799 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11800 mfpu=, mxilinx-fpu): Delete.
11801 * config/rs6000/singlefp.h: Delete.
11802 * config/rs6000/sysv4.h: Remove Xilinx FP support.
11803 * config/rs6000/t-rs6000: Ditto.
11804 * config/rs6000/t-xilinx: Delete.
11805 * config/rs6000/titan.md: Adjust for fp_type removal.
11806 * config/rs6000/vsx.md: Remove Xilinx FP support.
11807 (VStype_simple): Delete.
11808 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11809 * config/rs6000/xfpu.h: Delete.
11810 * config/rs6000/xfpu.md: Delete.
11811 * config/rs6000/xilinx.h: Delete.
11812 * config/rs6000/xilinx.opt: Delete.
11813 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11814 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11816 2018-05-04 Tom de Vries <tom@codesourcery.com>
11819 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11822 2018-05-04 Richard Biener <rguenther@suse.de>
11824 PR middle-end/85627
11825 * tree-complex.c (update_complex_assignment): We are always in SSA form.
11826 (expand_complex_div_wide): Likewise.
11827 (expand_complex_operations_1): Likewise.
11828 (expand_complex_libcall): Preserve EH info of the original stmt.
11829 (tree_lower_complex): Handle removed blocks.
11830 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11831 on complex multiplication and division libcall builtins.
11833 2018-05-04 Richard Biener <rguenther@suse.de>
11835 PR middle-end/85574
11836 * fold-const.c (negate_expr_p): Restrict negation of operand
11837 zero of a division to when we know that can happen without
11839 (fold_negate_expr_1): Likewise.
11841 2018-05-04 Jakub Jelinek <jakub@redhat.com>
11844 * real.h (real_nextafter): Declare.
11845 * real.c (real_nextafter): New function.
11846 * fold-const-call.c (fold_const_nextafter): New function.
11847 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11848 CASE_CFN_NEXTTOWARD.
11849 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11850 even when arg1_mode is different from arg0_mode.
11852 2018-05-03 Nathan Sidwell <nathan@acm.org>
11854 * doc/extend.texi (Deprecated Features): Remove
11855 -ffriend-injection.
11856 (Backwards Compatibility): Likewise.
11857 * doc/invoke.texi (C++ Language Options): Likewise.
11858 (C++ Dialect Options): Likewise.
11860 2018-05-03 Jakub Jelinek <jakub@redhat.com>
11863 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11864 _mm512_mask_mullox_epi64): New intrinsics.
11866 2018-05-03 Tom de Vries <tom@codesourcery.com>
11869 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11870 dump files): Add offload-tree.
11872 2018-05-03 Richard Biener <rguenther@suse.de>
11874 PR tree-optimization/85615
11875 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11876 to loops not nested in BBs loop father to avoid creating multi-entry
11879 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11881 PR tree-optimization/70291
11882 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11883 arguments. Change return type to tree. Emit libcall as a new
11884 statement rather than replacing existing one when inplace_p is true.
11885 (expand_complex_multiplication_components): New function.
11886 (expand_complex_multiplication): Expand floating-point complex
11887 multiplication using the above.
11888 (expand_complex_division): Rename inner_type parameter to type.
11889 Update expand_complex_libcall call-site.
11890 (expand_complex_operations_1): Update expand_complex_multiplication
11891 and expand_complex_division call-sites.
11893 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11896 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11897 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11898 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11899 the highest significant bit of the shift count mask is clear. In
11900 check whether and[sq]i3 is needed verify that all significant bits
11901 of the shift count other than the highest are set.
11903 2018-05-02 Tom de Vries <tom@codesourcery.com>
11906 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11907 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11908 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11909 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11910 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11911 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11912 __builtin_goacc_parlevel_size.
11914 2018-05-02 Richard Biener <rguenther@suse.de>
11916 PR tree-optimization/85597
11917 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11918 do not use split vect_get_vec_defs call but call vect_get_slp_defs
11921 2018-05-02 Tom de Vries <tom@codesourcery.com>
11924 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11925 dump files): Add ltrans-tree.
11927 2018-05-02 Tom de Vries <tom@codesourcery.com>
11930 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11931 dump files): Add wpa-ipa.
11933 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
11935 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
11936 powerpc*-*-linux*paired* target.
11937 * config/rs6000/750cl.h: Delete.
11938 * config/rs6000/paired.h: Delete.
11939 * config/rs6000/paired.md: Delete.
11940 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11942 * config/rs6000/rs6000-builtin.def: Remove paired float support.
11943 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11944 comment. Remove paired float support.
11945 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11946 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11948 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11949 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11951 * config/rs6000/rs6000.c: Remove paired float support.
11952 (paired_expand_vector_init, paired_expand_vector_move,
11953 paired_emit_vector_compare, paired_emit_vector_cond_expr,
11954 (paired_expand_lv_builtin, paired_expand_stv_builtin,
11955 paired_expand_builtin, paired_expand_predicate_builtin,
11956 paired_init_builtins): Delete.
11957 * config/rs6000/rs6000.h: Remove paired float support.
11958 * config/rs6000/rs6000.md: Remove paired float support.
11959 (move_from_CR_ov_bit): Delete.
11960 * config/rs6000/rs6000.opt (mpaired): Delete.
11961 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11962 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11964 2018-05-02 Richard Biener <rguenther@suse.de>
11966 PR middle-end/85567
11967 * gimplify.c (gimplify_save_expr): When in SSA form allow
11968 SAVE_EXPRs to compute to SSA vars.
11970 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11973 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11974 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11975 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11976 clobber operands[2], instead use a new pseudo. Formatting fixes.
11978 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
11980 PR tree-optimization/85586
11981 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11982 exit early for statements in the same group if the accesses are
11985 2018-05-02 Tom de Vries <tom@codesourcery.com>
11988 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11991 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
11993 PR tree-optimization/85143
11994 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11996 2018-05-01 Tom de Vries <tom@codesourcery.com>
11999 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
12000 not found" error message.
12002 2018-05-01 Tom de Vries <tom@codesourcery.com>
12005 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
12006 * vec.c (test_ordered_remove_if): New function.
12007 (vec_c_tests): Call test_ordered_remove_if.
12008 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
12009 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
12010 * tree-vect-patterns.c (vect_pattern_recog_1): Use
12011 VEC_ORDERED_REMOVE_IF.
12013 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12015 PR tree-optimization/82665
12016 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12017 pointer subtraction where arguments come from a memchr call.
12019 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12021 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12022 --push-state --as-needed and --pop-state instead of --as-needed and
12023 --no-as-needed if ld supports it.
12024 * configure: Regenerated.
12027 * doc/install.texi2html: Replace _002d with - and _002a with * in
12028 generated html files using sed.
12030 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12033 * gcc-rich-location.c (blank_line_before_p): New function.
12034 (use_new_line): New function.
12035 (gcc_rich_location::add_fixit_insert_formatted): New function.
12036 * gcc-rich-location.h
12037 (gcc_rich_location::add_fixit_insert_formatted): New function.
12039 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12041 * selftest.c (assert_streq): Rename "expected" and "actual" to
12042 "val1" and "val2". Extend NULL-handling to cover both inputs
12043 symmetrically, while still requiring both to be non-NULL for a pass.
12044 * selftest.h (assert_streq): Rename "expected" and "actual" to
12046 (ASSERT_EQ): Likewise.
12047 (ASSERT_EQ_AT): Likewise.
12048 (ASSERT_KNOWN_EQ): Likewise.
12049 (ASSERT_KNOWN_EQ_AT): Likewise.
12050 (ASSERT_NE): Likewise.
12051 (ASSERT_MAYBE_NE): Likewise.
12052 (ASSERT_MAYBE_NE_AT): Likewise.
12053 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12054 the assertion to pass.
12055 (ASSERT_STREQ_AT): Likewise.
12057 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12059 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12060 interaction with -pie.
12062 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12064 * selftest.h: Fix alphabetization of per-source-file selftest
12067 2018-04-30 Jason Merrill <jason@redhat.com>
12069 PR c++/61982 - dead stores to destroyed objects.
12070 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12073 2018-04-30 Jason Merrill <jason@redhat.com>
12075 * tree.c (build_clobber): New.
12076 * tree.h: Declare it.
12077 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12079 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12081 * diagnostic-show-locus.c (layout::layout): Update for
12082 location_get_source_line returning a char_span.
12083 (struct char_span): Move to input.h.
12084 (struct correction): Update for fields in char_span becoming
12086 (struct source_line): Update for location_get_source_line
12087 returning a char_span.
12088 (layout::print_line): Likewise.
12089 * edit-context.c (edited_file::print_content): Likewise.
12090 (edited_file::print_diff_hunk): Likewise.
12091 (edited_file::print_run_of_changed_lines): Likewise.
12092 (edited_file::get_num_lines): Likewise.
12093 (edited_line::edited_line): Likewise.
12094 * final.c (asm_show_source): Likewise.
12095 * input.c (location_get_source_line): Convert return type
12096 from const char * to char_span, losing the final "line_len"
12098 (dump_location_info): Update for the above.
12099 (get_substring_ranges_for_loc): Likewise. Use a char_span
12100 when handling the literal within the line.
12101 (test_reading_source_line): Update for location_get_source_line
12102 returning a char_span.
12103 * input.h (class char_span): Move here from
12104 diagnostic-show-locus.c, converting from a struct to a class.
12105 Make data members private.
12106 (char_span::operator bool): New.
12107 (char_span::length): New.
12108 (char_span::get_buffer): New.
12109 (char_span::operator[]): New.
12110 (char_span::subspan): Make const.
12111 (char_span::xstrdup): New.
12112 (location_get_source_line): Convert return type from const char *
12113 to char_span, losing the final "line_size" param.
12115 2018-04-30 Jan Hubicka <jh@suse.cz>
12117 * lto-wrapper.c (ltrans_priorities): New static var.
12118 (cmp_priority): New.
12119 (run_gcc): Read priorities and if doing parallel build order
12120 the Makefile by them.
12122 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12124 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12126 2018-04-30 Richard Biener <rguenther@suse.de>
12128 * tree-cfg.c (verify_address): Remove base argument, add
12129 flag whether to check TREE_ADDRESSABLE and do that.
12130 (verify_expr): Remove.
12131 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12132 (verify_gimple_assign_single): Likewise.
12133 (verify_gimple_switch): Likewise.
12134 (verify_expr_location_1): Dereference tp once. Add (disabled)
12135 piece from verify_expr.
12136 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12138 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12140 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12142 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12144 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12145 (small_data_pattern): Likewise.
12146 (arc_rewrite_small_data): Likewise.
12147 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12148 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12149 (get_symbol_alignment): New function.
12150 (legitimate_small_data_address_p): Likewise.
12151 (legitimate_scaled_address): Update, call
12152 legitimate_small_data_address_p.
12153 (output_sdata): New static variable.
12154 (arc_print_operand): Update how we handle small data operands.
12155 (arc_print_operand_address): Likewise.
12156 (arc_legitimate_address_p): Update, use
12157 legitimate_small_data_address_p.
12158 (arc_rewrite_small_data_p): Remove.
12159 (arc_rewrite_small_data_1): Likewise.
12160 (arc_rewrite_small_data): Likewise.
12161 (small_data_pattern): Likewise.
12162 (compact_sda_memory_operand): Update to use
12163 legitimate_small_data_address_p and get_symbol_alignment.
12164 (prepare_move_operands): Don't rewite sdata pattern.
12165 (prepare_extend_operands): Remove.
12166 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12168 (zero_extendqisi2): Likewise.
12169 (zero_extendhisi2): Likewise.
12170 (extendqihi2): Likewise.
12171 (extendqisi2): Likewise.
12172 (extendhisi2): Likewise.
12173 (addsi3): Likewise.
12174 (subsi3): Likewise.
12175 (andsi3): Likewise.
12176 * config/arc/constraints.md (Usd): Change it to memory constraint.
12178 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12180 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12181 as source of std instructions.
12182 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12183 allow 6-bit constants as source for store instructions.
12184 (movdi_insn): Update instruction pattern to allow 6-bit constants
12185 as source for store instructions.
12187 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12189 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12191 2018-04-30 Nathan Sidwell <nathan@acm.org>
12192 Sandra Loosemore <sandra@codesourcery.com>
12194 * dumpfile.c (dump_open): Allow '-' for stdout.
12195 * doc/invoke.texi (Developer Options): Document dump filename
12196 determination early. Document stdin/stdout selection.
12198 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12200 Microblaze Target: PIC data text relative
12202 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12203 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12205 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12206 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12207 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12208 New addressing mode for data-text relative position indepenedent code.
12209 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12210 'ADDRESS_SYMBOLIC_TXT_REL'.
12211 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12212 (microblaze_legitimate_pic_operand): Exclude function calls from
12213 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12214 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12216 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12217 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12218 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12219 for 'address + offset'.
12220 (microblaze_expand_prologue): Add new function prologue call for
12222 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12223 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12224 table in case of TARGET_PIC_DATA_TEXT_REL.
12225 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12226 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12227 Add new macros 'UNSPEC_TEXT',
12228 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12229 + exclude function calls from 'UNSPEC_PLT' in case of data text
12231 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12232 new target hook for generating address diff vector tables in case of
12234 * doc/tm.texi : Regenerate.
12235 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12236 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12237 of addr diff vector generation.
12238 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12239 target hook definition.
12240 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12241 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12242 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12243 option for data text relative.
12245 2018-04-30 Richard Biener <rguenther@suse.de>
12247 * tree-chrec.h (evolution_function_is_constant_p): Remove
12249 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12251 2018-04-30 Richard Biener <rguenther@suse.de>
12254 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12256 2018-04-30 Richard Biener <rguenther@suse.de>
12258 PR tree-optimization/28364
12259 PR tree-optimization/85275
12260 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12261 copying first exit test.
12263 2018-04-28 Mark Wielaard <mark@klomp.org>
12265 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12266 dwarf_version >= 5.
12267 (dwarf_AT): Handle DW_AT_addr_base.
12268 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12270 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12273 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12274 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12275 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12276 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12278 2018-04-28 Richard Biener <rguenther@suse.de>
12280 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12281 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12282 to reflect use. Only add interesting stmts.
12284 2018-04-27 Martin Jambor <mjambor@suse.cz>
12287 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12288 the jump function allows for passing through aggregate values.
12290 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12292 * input.h (in_system_header_at): Convert from macro to inline
12294 (from_macro_expansion_at): Likewise.
12295 (from_macro_definition_at): Likewise.
12297 2018-04-27 Jeff Law <law@redhat.com>
12299 * config.gcc: Mark tile* targets as deprecated/obsolete.
12301 2018-04-27 Richard Biener <rguenther@suse.de>
12303 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12306 2018-04-27 Richard Biener <rguenther@suse.de>
12308 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12310 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12312 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12313 with Yd constraint. Set "preferred_for_speed" attribute from
12314 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12315 with Yd constraint.
12316 (*movdi_internal): Ditto.
12317 (movti_interunit splitters): Remove
12318 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12319 (movdi_interunit splitters): Ditto.
12320 * config/i386/constraints.md (Ye): Remove.
12321 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12323 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12326 * config/aarch64/constraints.md (Usg): Limit to 31.
12327 (Usj): Limit to 63.
12329 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12331 PR tree-optimization/85529
12332 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12333 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12334 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12335 zero extension or masking of the MSB bit.
12336 (optimize_range_tests): Add FIRST_BB argument, pass it through
12337 to optimize_range_tests_var_bound.
12338 (maybe_optimize_range_tests, reassociate_bb): Adjust
12339 optimize_range_tests callers.
12341 2018-04-26 Richard Biener <rguenther@suse.de>
12342 Jakub Jelinek <jakub@redhat.com>
12344 * cgraph.h (symbol_table): Just declare debug method here.
12345 * symtab.c (symbol_table::debug): Define.
12347 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12349 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12351 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12353 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12354 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12355 (*movdi_internal): Substitute Yi and Yj constraint with x
12356 and Ym and Yn constraint with y constraint. Update "isa"
12357 attribute and set "preferred_for_speed" attribute from
12358 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12359 (*movsi_internal): Ditto.
12360 (*movdf_internal): Ditto.
12361 (*movsf_internal): Ditto.
12362 (*zero_extendsidi2): Ditto.
12363 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12364 (sse2_loadld): Ditto.
12365 (*vec_extract<ssevecmodelower>_0): Ditto.
12366 (*vec_extractv4si_0_zext_sse4): Ditto.
12367 (vec_concatv2di): Ditto.
12368 (*vec_dup<mode>): Ditto.
12369 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12370 * config/i386/constraints.md (Yi): Remove.
12375 2018-04-26 Nathan Sidwell <nathan@acm.org>
12377 * dumpfile.c (dump_open): New.
12378 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12379 (dump_finish): Detect stdio/stderr by value not name.
12381 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12383 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12385 2018-04-26 Tom de Vries <tom@codesourcery.com>
12388 * config/nvptx/nvptx.c (verify_neutering_jumps)
12389 (verify_neutering_labels): New function
12390 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12392 2018-04-26 Tom de Vries <tom@codesourcery.com>
12395 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12396 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12399 2018-04-26 Richard Biener <rguenther@suse.de>
12400 Tom de Vries <tom@codesourcery.com>
12403 * lto-streamer-out.c (output_function): Fixup loops if required to match
12404 discovery done in the reader.
12406 2018-04-26 Richard Biener <rguenther@suse.de>
12408 PR tree-optimization/85116
12409 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12410 have a loop exit from the single latch predecessor. Remove
12411 case of header with just condition.
12412 (ch_base::copy_headers): Exclude infinite loops from any
12414 (pass_ch::execute): Record exits.
12416 2018-04-26 Richard Biener <rguenther@suse.de>
12418 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12419 prologue cost vector and pass it to vect_get_load_cost.
12420 (vect_get_peeling_costs_all_drs): Likewise.
12421 (vect_peeling_hash_get_lowest_cost): Likewise.
12422 (vect_enhance_data_refs_alignment): Likewise.
12424 2018-04-26 Richard Biener <rguenther@suse.de>
12426 PR middle-end/85450
12427 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12428 checking of integer<->pointer conversions.
12429 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12430 sign-/zero-extending pointer types.
12431 (expand_omp_for_static_chunk): Likewise.
12433 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12434 Jean Lee <xiaoyur347@gmail.com>
12436 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12437 (TARGET_ASAN_SHADOW_OFFSET): Define.
12438 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12439 true for -fsanitize=address.
12441 2018-04-25 Mark Wielaard <mark@klomp.org>
12443 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12446 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12448 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12449 than "alu", remove explicit "memory" and "imm_disp" attributes.
12450 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12452 PR middle-end/85414
12453 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12454 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12455 gen_lowpart_no_emit.
12457 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12460 * config/i386/i386.c (ix86_expand_builtin): Change memory
12461 operand to XI, extend p0 to Pmode.
12462 * config/i386/i386.md: Change unspec volatile and operand
12463 1 mode to XI, change operand 0 mode to P.
12465 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12467 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12468 GET_MODE_MASK before any checking.
12469 (nds32_can_use_bset_p): Likewise.
12470 (nds32_can_use_btgl_p): Likewise.
12472 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12474 * config/nds32/nds32-doubleword.md: New define_split pattern for
12475 illegal register number.
12477 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12479 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12481 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12483 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12485 2018-04-25 Richard Biener <rguenther@suse.de>
12487 * lto-streamer.h (LTO_major_version): Bump to 8.
12489 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12491 * BASE-VER: Set to 9.0.0.
12493 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12495 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12496 in __abskf2 and __powikf2.
12498 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12501 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12502 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12503 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12504 Use the above on operand 2. Reindent.
12505 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12507 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12510 * common/config/i386/i386-common.c (ix86_handle_option): Don't
12512 * config/i386/i386.opt (mcet): Removed.
12513 * doc/install.texi: Remove -mcet documentation.
12514 * doc/invoke.texi: Likewise.
12516 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12519 * doc/install.texi: Remove -mcet from bootstrap-cet.
12521 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12524 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12525 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12529 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12530 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12531 containing a CONST_VECTOR.
12533 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
12535 * doc/install.texi: Update newlib dependency for nvptx.
12537 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12540 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12541 instead of INTVAL when shifting x left.
12543 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
12545 PR tree-optimization/85478
12546 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12547 vect_grouped_store_supported for single element vectors.
12549 2018-04-24 Richard Biener <rguenther@suse.de>
12552 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12553 load cost increase to the case of non-constant step.
12555 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12558 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12559 destination if any_malformed_asm.
12561 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
12563 PR middle-end/85496
12564 * expr.c (store_field): In the bitfield case, if the value comes from
12565 a function call and is returned in registers by means of a PARALLEL,
12566 do not change the mode of the temporary unless BLKmode and VOIDmode.
12568 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
12570 PR rtl-optimization/85423
12571 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12572 dependencies to debug insns when the previous insn is non-debug.
12574 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12576 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12577 enums into a single definition.
12578 (fls): Fix predicates and printing.
12581 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12583 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12584 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12585 and short u6 immediate.
12586 (check_if_valid_sleep_operand): Remove.
12587 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12589 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12591 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12592 flag_always_save_lp condition.
12593 * config/nds32/nds32.opt (malways-save-lp): New option.
12595 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12597 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12598 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12599 * config/nds32/nds32.h
12600 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12601 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12603 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12605 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12606 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12608 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12609 Chung-Ju Wu <jasonwucj@gmail.com>
12611 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12613 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12614 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12616 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12618 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12620 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12622 * config/nds32/nds32-protos.h (nds32_data_alignment,
12623 nds32_local_alignment): Declare.
12624 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12625 nds32_local_alignment): New functions.
12626 (TARGET_CONSTANT_ALIGNMENT): Define.
12627 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12629 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12631 * config/nds32/nds32.c
12632 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12633 (TARGET_MODES_TIEABLE_P): Likewise.
12635 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12637 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12638 level Ofast and Og.
12640 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12641 Chung-Ju Wu <jasonwucj@gmail.com>
12643 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12644 for unaligned access.
12645 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12647 * config/nds32/nds32-intrinsic.md: Likewise.
12648 * config/nds32/nds32_intrinsic.h: Likewise.
12649 * config/nds32/nds32.h (nds32_builtins): Likewise.
12650 * config/nds32/nds32.opt (munaligned-access): New option.
12651 * config/nds32/nds32.c (nds32_asm_file_start): Display
12652 flag_unaligned_access status.
12654 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12656 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12657 -mno-relax is present.
12658 * config/riscv/linux.h (LINK_SPEC): Ditto.
12660 2018-04-20 Martin Sebor <msebor@redhat.com>
12663 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12665 (gimple_fold_builtin_stxcpy_chk): Same.
12666 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12668 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12671 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12672 __powikf2 when long double is IEEE 128-bit.
12674 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12676 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12677 step to make sure stack always aligned.
12679 2018-04-20 Carl Love <cel@us.ibm.com>
12682 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12683 size check for arg0.
12685 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
12686 Tom de Vries <tom@codesourcery.com>
12689 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12690 Emit insns for calls too.
12691 (nvptx_find_par): Always look for worker-level predecessor insn.
12692 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
12694 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12695 (nvptx_process_pars): Propagate frames for calls.
12697 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
12700 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12702 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12703 (ix86_handle_option): Don't handle OPT_mibt.
12704 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12706 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12708 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12709 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12710 (ix86_target_macros): Define __CET__ with flag_cf_protection
12711 for -fcf-protection.
12712 * config/i386/i386.c (isa2_opts): Remove -mibt.
12713 * config/i386/i386.h (TARGET_IBT): Removed.
12714 (TARGET_IBT_P): Likewise.
12715 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12716 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12717 * config/i386/i386.opt (mcet): Update help message.
12718 (mshstk): Likewise.
12720 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
12721 -mcet as an alias for -mshstk.
12723 2018-04-20 Richard Biener <rguenther@suse.de>
12725 PR middle-end/85475
12726 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12727 complexity by forcing a single use of the multiply operand.
12729 2018-04-20 Martin Jambor <mjambor@suse.cz>
12732 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12733 recursion dependency to only apply to non-clones.
12735 2018-04-20 Martin Jambor <mjambor@suse.cz>
12738 * ipa-cp.c (create_specialized_node): Check that clones of
12739 self-recursive edges exist during IPA-CP.
12741 2018-04-19 Toon Moene <toon@moene.org>
12743 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12746 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12748 PR tree-optimization/85467
12749 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12750 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
12751 VECTOR_CST element to type.
12753 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12756 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12757 * config/i386/i386.md (builtin_setjmp_setup): Removed.
12758 (builtin_longjmp): Likewise.
12759 (save_stack_nonlocal): New pattern.
12760 (restore_stack_nonlocal): Likewise.
12762 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12765 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12766 Replace ASM_OUTPUT_LABEL with fprintf.
12768 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12771 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12772 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12773 * config/i386/i386-c.c (ix86_target_macros_internal): Also
12774 define __IBT__ and __SHSTK__ for -fcf-protection.
12775 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12777 (ix86_trampoline_init): Likewise.
12778 (x86_output_mi_thunk): Likewise.
12779 (ix86_notrack_prefixed_insn_p): Likewise.
12780 (ix86_option_override_internal): Don't disallow -fcf-protection.
12781 * config/i386/i386.md (rdssp<mode>): Also enable for
12783 (incssp<mode>): Likewise.
12784 (nop_endbr): Likewise.
12785 * config/i386/i386.opt (mcet): Change help message to built-in
12788 (mshstk): Likewise.
12789 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12790 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
12791 enable CET built-in functions.
12793 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
12795 * common/config/i386/i386-common.c
12796 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12797 OPTION_MASK_ISA_MOVDIRI_UNSET,
12798 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12799 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12800 * config.gcc (movdirintrin.h): New header.
12801 * config/i386/cpuid.h (bit_MOVDIRI,
12802 bit_MOVDIR64B): New bits.
12803 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12805 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12806 (VOID, PVOID, PCVOID)): New function types.
12807 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12808 __builtin_ia32_directstoreu_u64,
12809 __builtin_ia32_movdir64b): New builtins.
12810 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12811 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12813 (ix86_valid_target_attribute_inner_p): Ditto.
12814 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12815 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12816 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12817 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12818 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12819 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12820 (movdiri<mode>, movdir64b_<mode>): New.
12821 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12822 * config/i386/immintrin.h: Include movdirintrin.h.
12823 * config/i386/movdirintrin.h: New file.
12824 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12826 2018-04-19 Richard Biener <rguenther@suse.de>
12828 PR middle-end/85455
12829 * cfg.c (clear_bb_flags): When loop state says we have
12830 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12832 2018-04-19 Richard Biener <rguenther@suse.de>
12834 PR tree-optimization/84737
12835 * tree-vect-data-refs.c (vect_copy_ref_info): New function
12836 copying restrict info.
12837 (vect_setup_realignment): Use it.
12838 * tree-vectorizer.h (vect_copy_ref_info): Declare.
12839 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12840 the first DR to all generated stores.
12841 (vectorizable_load): Likewise for loads.
12843 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12845 PR tree-optimization/85446
12846 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12847 the integral and pointer types to have the same precision.
12849 * doc/install.texi: Document --disable-cet being the default and
12852 2018-04-18 Martin Liska <mliska@suse.cz>
12854 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12857 2018-04-18 Martin Liska <mliska@suse.cz>
12860 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12863 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12864 arguments if they are comparable.
12866 2018-04-18 Martin Liska <mliska@suse.cz>
12869 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12872 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12875 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
12878 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12879 ENDBR after calling __morestack.
12881 2018-04-18 David Malcolm <dmalcolm@redhat.com>
12884 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12885 by using gcc_base_ver to generate a gcc_driver_version, and use
12886 it when generating GCC_DRIVER_NAME.
12887 * configure: Regenerate.
12889 2018-04-18 Jakub Jelinek <jakub@redhat.com>
12892 * config.gcc: Obsolete powerpc*-*-*spe*.
12894 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12897 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12898 (stabstr_D): Change type of unum from unsigned int to
12899 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
12902 2018-04-17 Jim Wilson <jimw@sifive.com>
12905 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12906 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12907 Set arg_pointer_offset after using pretend_args_size.
12909 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12911 PR rtl-optimization/85431
12912 * dse.c (record_store): Ignore zero width stores.
12915 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
12916 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12917 __builtin_stack_restore rather than after it.
12918 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12919 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12920 argument instead of virtual_dynamic_stack_rtx.
12922 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
12924 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12926 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12927 Add note to error message to explain internal mapping of overloaded
12928 built-in function name to non-overloaded built-in function name.
12929 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12932 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
12935 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12936 where the inputs overlap with the output.
12938 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12940 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12941 (=v, v) alternative and explicit "memory" attribute.
12942 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
12943 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12945 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12946 "sselog1" type instead of "sselog".
12947 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12948 "sselog". Remove explicit "memory" attribute.
12949 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12950 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12952 (vec_extract_hi_v32hi): Merge all alternatives into one, use
12953 "sselog1" type instead of "sselog". Remove explicit "memory"
12955 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12956 use "sselog1" type instead of "sselog". Remove explicit "memory"
12958 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12959 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12961 (vec_extract_hi_v64qi): Merge all alternatives into one, use
12962 "sselog1" type instead of "sselog". Remove explicit "memory"
12964 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12965 use "sselog1" type instead of "sselog". Remove explicit "memory"
12969 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12971 PR middle-end/85414
12972 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12975 2018-04-17 Martin Jambor <mjambor@suse.cz>
12978 * ipa-cp.c (create_specialized_node): Call
12979 expand_all_artificial_thunks if necessary.
12981 2018-04-17 Martin Liska <mliska@suse.cz>
12984 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12985 in message, remote space in between '_G' and '('.
12987 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12990 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12991 avx512f_vmcmp<mode>3<round_saeonly_name>,
12992 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12993 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12994 avx512f_rndscale<mode><round_saeonly_name>,
12995 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12996 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12997 Use %<iptr>2 instead of %2 for -masm=intel.
12998 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12999 avx512f_vcvttss2usi<round_saeonly_name>,
13000 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
13002 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
13003 avx512f_vcvttsd2usi<round_saeonly_name>,
13004 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
13005 Use %q1 instead of %1 for -masm=intel.
13006 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
13007 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
13008 of %3 for -masm=intel.
13009 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
13011 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
13013 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13015 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13016 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13018 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13020 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13021 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13022 %g1 and one with %0 and %1.
13023 (avx512er_vmrcp28<mode><round_saeonly_name>,
13024 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13025 %1 for -masm=intel.
13026 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13027 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13028 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13029 of %0 and %{%4%} for -masm=intel.
13030 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13031 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13032 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13033 order of %0 and %{%5%}%{z%} for -masm=intel.
13035 2018-04-17 Jan Hubicka <jh@suse.cz>
13038 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13040 2018-04-17 Martin Liska <mliska@suse.cz>
13043 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13044 for target_clone error message. Make default implementation
13045 clone to be a local declaration.
13046 (separate_attrs): Add new argument and check for an empty
13048 (expand_target_clones): Handle it.
13049 (ipa_target_clone): Make redirection just for target_clones
13052 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13053 Tom de Vries <tom@codesourcery.com>
13055 PR middle-end/84955
13056 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13057 tiled basic blocks without omp continue statements.
13059 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13062 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13063 vec_extract expression as having side effects to make sure it gets
13066 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13069 * config/i386/i386.c (get_builtin_code_for_version): Check
13072 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13075 * config.gcc: Support "skylake".
13076 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13078 * config/i386/i386.c (m_SKYLAKE): Define.
13079 (processor_target_table): Add "skylake".
13080 (ix86_option_override_internal): Add "skylake".
13081 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13082 PROCESSOR_CANNONLAKE.
13083 (get_builtin_code_for_version): Fix priority for
13084 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13085 PROCESSOR_SKYLAKE-AVX512.
13086 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13087 (processor_type): Add PROCESSOR_SKYLAKE.
13089 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13090 Jason Merrill <jason@redhat.com>
13093 * convert.c (convert_to_integer_1): Use direct recursion for
13094 enumeral types and types with a precision less than the number
13095 of bits in their mode.
13097 2018-04-16 Julia Koval <julia.koval@intel.com>
13100 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13101 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13103 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13106 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13107 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13108 and -mno-direct-move.
13110 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13113 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13114 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13115 Ensure negative shifts result in {0}.
13117 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13119 PR rtl-optimization/79916
13120 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13121 regs (if any) to define how to gnerate SD moves when LRA is in
13124 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13126 PR rtl-optimization/85393
13127 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13128 * except.c (expand_dw2_landing_pad_for_region): Make static.
13129 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13130 a label and unconditional jump to old_bb, rather than
13131 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13134 PR rtl-optimization/85376
13135 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13136 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13137 instead of a specific value.
13139 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13140 Bin Cheng <bin.cheng@arm.com>
13142 PR tree-optimization/82965
13143 PR tree-optimization/83991
13144 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13145 by_profile_only parameter.
13146 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13147 information if the loop was predicted to iterate too many times.
13148 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13150 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13153 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13156 2018-04-13 Martin Liska <mliska@suse.cz>
13157 Jakub Jelinek <jakub@redhat.com>
13159 PR middle-end/81657
13160 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13161 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13162 * builtins.c (expand_builtin_memory_copy_args): Use
13163 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13164 handle dest_addr == pc_rtx.
13166 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13169 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13170 asked to not generate direct moves.
13171 (fix_trunc<mode>si2_stfiwx): Similar.
13172 (fix_trunc<mode>si2_internal): Similar.
13174 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13177 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13178 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13179 lookup if dest in some wider mode is known to be const0_rtx and
13180 if so, record permanent equivalence for it to be ZERO_EXTEND of
13181 the narrower mode destination.
13183 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13185 * lto-streamer-out.c (output_function): Revert 259346.
13186 * omp-expand.c (expand_oacc_for): Likewise.
13188 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13190 PR rtl-optimization/85354
13191 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13192 * sel-sched.c (sel_global_init): ... here.
13194 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13197 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13198 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13199 mode for PE-COFF targets.
13200 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13201 (i386_pe_asm_lto_end): Likewise.
13202 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13203 (TARGET_ASM_LTO_END): Likewise.
13204 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13205 (i386_pe_asm_lto_start): New function.
13206 (i386_pe_asm_lto_end): Likewise.
13208 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13209 Richard Biener <rguenther@suse.de>
13211 PR middle-end/84955
13212 * lto-streamer-out.c (output_function): Fix CFG loop state before
13214 * omp-expand.c (expand_oacc_for): Handle calls to internal
13215 functions like regular functions.
13217 2018-04-12 Richard Biener <rguenther@suse.de>
13220 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13221 for the early LTO debug to properly generate references to it
13222 during DIE emission. Do not re-use that for the skeleton for
13224 (dwarf2out_early_finish): Likewise.
13226 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13229 * config/i386/sse.md
13230 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13231 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13232 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13233 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13234 and output is a reg, avoid creating invalid lowpart subreg, but
13235 instead split into a 512-bit move. Don't split if not AVX512VL,
13236 input is xmm16+ reg and output is a mem.
13237 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13238 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13239 xmm16+ reg and output is a mem.
13241 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13243 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13244 also for flag_dwarf2_cfi_asm.
13246 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13248 PR rtl-optimization/85342
13249 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13250 a bool scalar var inside of the loop instead. Don't try to update
13251 recog_data.operand after failed apply_change_group.
13253 2018-04-12 Tom de Vries <tom@codesourcery.com>
13256 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13257 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13258 array with flexible array member as array without given dimension.
13259 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13260 argument for undefined param to true.
13262 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13265 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13266 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13267 from PowerPC section.
13268 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13269 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13270 help text that is too long.
13271 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13272 help text that is too long.
13273 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13274 help text that is too long.
13276 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13278 * config/alpha/alpha.md (stack_probe_internal): Rename
13279 from "probe_stack". Update all callers.
13281 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13283 PR rtl-optimization/84566
13284 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13285 sched_macro_fuse_insns.
13287 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13290 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13291 (compute_block_dependences): ... from here.
13293 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13295 PR tree-optimization/85331
13296 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13297 from int to HOST_WIDE_INT.
13299 2018-04-11 Martin Jambor <mjambor@suse.cz>
13302 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13303 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13304 not the same as the source val.
13305 (cgraph_edge_brings_value_p): New parameter.
13306 (gather_edges_for_value): Pass destination value to
13307 cgraph_edge_brings_value_p.
13308 (perhaps_add_new_callers): Likewise.
13309 (get_info_about_necessary_edges): Likewise and exclude values brought
13310 only by self-recursive edges.
13311 (create_specialized_node): Redirect only clones of self-calling edges.
13312 (+self_recursive_pass_through_p): New function.
13313 (find_more_scalar_values_for_callers_subset): Use it.
13314 (find_aggregate_values_for_callers_subset): Likewise.
13315 (known_aggs_to_agg_replacement_list): Removed.
13316 (decide_whether_version_node): Re-calculate known constants for all
13317 remaining context clones.
13319 2018-04-11 Richard Biener <rguenther@suse.de>
13322 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13323 from early DWARF output.
13324 (dwarf2out_early_finish): Output line info unconditionally into
13325 early DWARF and add reference to it.
13327 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13330 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13331 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13332 other than V2DFmode using iptr mode attribute.
13333 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13335 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13337 PR rtl-optimization/84659
13338 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13340 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13343 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13345 (output_loc_list): Pass address of a dummy size variable even in the
13346 locview handling loop.
13347 (index_location_lists): Add comment on why skip_loc_list_entry can't
13350 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13353 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13356 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13359 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13360 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13361 and -mstring-compare-inline-limit.
13363 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13366 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13367 for stack clash protection in a register whenever we need it to be in
13370 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13372 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13373 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13375 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13378 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13380 (mlong-double-): Ditto.
13381 * config/rs6000/sysv4.opt (msdata=): Ditto.
13382 (mtls-size=): Ditto.
13384 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13386 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13387 erroneous entries for
13388 "vector int vec_ldl (int, long int *)", and
13389 "vector unsigned int vec_ldl (int, unsigned long int *)".
13390 Add comments and entries for
13391 "vector bool char vec_ldl (int, bool char *)",
13392 "vector bool short vec_ldl (int, bool short *)",
13393 "vector bool int vec_ldl (int, bool int *)",
13394 "vector bool long long vec_ldl (int, bool long long *)",
13395 "vector pixel vec_ldl (int, pixel *)",
13396 "vector long long vec_ldl (int, long long *)",
13397 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13398 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13399 type tree bool_long_long_type_node and correct definition of
13400 bool_V2DI_type_node to make reference to this new type tree.
13401 (rs6000_mangle_type): Replace erroneous reference to
13402 bool_long_type_node with bool_long_long_type_node.
13403 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13404 comments to emphasize sign distinctions for char and int types and
13405 replace RS6000_BTI_bool_long constant with
13406 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13407 use of RS6000_BTI_pixel.
13408 (bool_long_type_node): Remove this macro definition.
13409 (bool_long_long_type_node): New macro definition
13411 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13413 PR rtl-optimization/85300
13414 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13415 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13416 simplify_unary_operation fails.
13418 2018-04-10 Martin Liska <mliska@suse.cz>
13420 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13421 cgraph_edge and ipa_ref.
13423 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13427 * config/i386/sse.md
13428 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13429 computation of the VEC_MERGE selector from mask.
13430 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13431 Fix decoding of the VEC_MERGE selector into mask.
13433 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13435 PR tree-optimization/85286
13436 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13438 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13440 * final.c (final_1): Set insn_last_address as well as
13441 insn_current_address.
13443 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13446 * explow.c (emit_stack_probe): Call validize_mem on memory location
13447 before passing it to gen_probe_stack. Create address operand and
13448 legitimize it for the probe_stack_address case.
13450 2018-04-09 Jan Hubicka <jh@suse.cz>
13453 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13454 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13455 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13457 (free_lang_data): Rebuild type inheritance graph.
13459 2018-04-09 Martin Sebor <msebor@redhat.com>
13461 * invoke.texi (-finline-small-functions): Mention other optimization
13463 (-findirect-inlining, -fpartial-inlining): Same.
13464 (-finline-functions-called-once): Same.
13465 (-freorder-blocks-and-partition): Same.
13467 2018-04-09 Jan Hubicka <jh@suse.cz>
13470 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13471 jumps; choose last target that matches the criteria (i.e.
13472 no partition changes for non-crossing jumps).
13473 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13474 support for redirecting crossing jumps to non-crossing.
13476 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13478 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13479 also for naked functions.
13481 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13483 * config/arc/arc.md (add_shift): New pattern.
13484 (add_shift2): Likewise.
13485 (sub_shift): Likewise.
13486 (sub_shift_cmp0_noout): Likewise.
13487 (compare_si_ashiftsi): Likewise.
13488 (xbfu_cmp0_noout): New combine pattern.
13489 (xbfu_cmp0"): Likewise.
13490 (movsi_set_cc_insn): Place the predicable variant first.
13491 (commutative_binary_cmp0_noout): Remove clobber.
13492 (commutative_binary_cmp0): New pattern.
13493 (noncommutative_binary_cmp0): Likewise.
13494 (noncommutative_binary_cmp0_noout): Likewise.
13495 (noncommutative_binary_comparison_result_used): Removed.
13496 (rsub_cmp0): New pattern.
13497 (rsub_cmp0_noout): Likewise.
13498 (extzvsi): Changed, keep only meaningful variants.
13499 (SQH, SEZ): New iterators.
13500 (SQH_postfix): New mode attribute.
13501 (SEZ_prefix): New code attribute.
13502 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13503 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13504 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13505 of numerical value.
13506 (noncommutative_operator): Check the availability of barrel
13509 2018-04-09 Richard Biener <rguenther@suse.de>
13511 PR tree-optimization/85284
13512 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13513 Only use the niter constraining form of simple_iv when the exit
13514 is always executed.
13516 2018-04-09 Tom de Vries <tom@codesourcery.com>
13519 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13520 (define_expand "*memory_barrier"): New define_expand.
13521 (define_insn "memory_barrier"): New insn.
13523 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13525 PR rtl-optimization/80463
13526 PR rtl-optimization/83972
13527 PR rtl-optimization/83480
13529 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13530 correct producer for the insn.
13531 (tidy_control_flow): Fixup seqnos in case of debug insns.
13533 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13535 PR rtl-optimization/83913
13537 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13538 different sched-times when merging exprs.
13540 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13542 PR rtl-optimization/83962
13544 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13545 tidy_fallthru_edge and tidy_control_flow.
13547 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13549 PR rtl-optimization/83530
13551 * sel-sched.c (force_next_insn): New global variable.
13552 (remove_insn_for_debug): When force_next_insn is true, also leave only
13553 next insn in the ready list.
13554 (sel_sched_region): When the region wasn't scheduled, make another pass
13555 over it with force_next_insn set to 1.
13557 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13559 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13561 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13562 for interrupt control.
13563 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13564 functions for interrupt control.
13565 * config/nds32/nds32-intrinsic.md: Likewise.
13566 * config/nds32/nds32_intrinsic.h: Likewise.
13567 * config/nds32/nds32.h (nds32_builtins): Likewise.
13569 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13571 * config/nds32/nds32.c (nds32_init_machine_status,
13572 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13573 strict_aligned_p field.
13574 (nds32_expand_to_rtl_hook): New function.
13575 (TARGET_EXPAND_TO_RTL_HOOK): Define.
13576 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13578 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13579 Chung-Ju Wu <jasonwucj@gmail.com>
13581 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13582 * config/nds32/nds32-n7.md: New file.
13583 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13584 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13586 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13587 * config/nds32/nds32.md (pipeline_model): Add n7.
13588 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13589 * config/nds32/pipelines.md: Include n7 settings.
13591 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13592 Chung-Ju Wu <jasonwucj@gmail.com>
13594 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13595 * config/nds32/nds32-e8.md: New file.
13596 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13597 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13599 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13600 * config/nds32/nds32.md (pipeline_model): Add e8.
13601 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13602 * config/nds32/pipelines.md: Include e8 settings.
13604 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13605 Chung-Ju Wu <jasonwucj@gmail.com>
13607 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13608 * config/nds32/nds32-n8.md: New file.
13609 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13610 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13612 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13613 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13614 * config/nds32/nds32.md (pipeline_model): Add n8.
13615 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13616 * config/nds32/pipelines.md: Include n8 settings.
13618 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13619 Chung-Ju Wu <jasonwucj@gmail.com>
13621 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13622 * config/nds32/nds32-n9-2r1w.md: New file.
13623 * config/nds32/nds32-n9-3r2w.md: New file.
13624 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13625 nds32_register_ports): New or modify for cpu n9.
13626 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13628 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13629 * config/nds32/nds32-utils.c: New file.
13630 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13631 TARGET_MUL_SLOW): Define.
13632 * config/nds32/nds32.md (pipeline_model): New attribute.
13633 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13634 New options that support cpu n9.
13635 * config/nds32/pipelines.md: Include n9 settings.
13636 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13638 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13640 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13641 information if necessary.
13642 (output_cond_branch_compare_zero): Likewise.
13643 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13644 (nds32_target_alignment): Refine for alignment.
13645 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13646 (FUNCTION_BOUNDARY): Modify.
13647 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13649 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13651 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13653 * config/nds32/constants.md (unspec_volatile_element): Add values for
13654 TLB operation and data prefetch.
13655 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13656 functions for TLB operation and data prefetch.
13657 * config/nds32/nds32-intrinsic.md: Likewise.
13658 * config/nds32/nds32_intrinsic.h: Likewise.
13659 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13660 (nds32_print_operand): Likewise.
13661 * config/nds32/nds32.h (nds32_builtins): Likewise.
13663 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13664 Andrew Pinski <pinsika@gcc.gnu.org>
13666 PR middle-end/82976
13667 * match.pd: Use constant_boolean_node of correct type instead of
13668 boolean_true_node or boolean_false_node for simplifying
13669 pointer comparisons to zero.
13671 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13673 PR tree-optimization/80021
13674 * tree.c (verify_type_variant): Make error call in verify_variant_match
13675 translatable and remove final full stop.
13677 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13679 * config/nds32/constants.md (unspec_volatile_element): Add
13680 UNSPEC_VOLATILE_EH_RETURN.
13681 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13682 nds32_output_stack_pop): Support dwarf exception handling process.
13683 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13684 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13685 exception handling process.
13686 (nds32_compute_stack_frame): Likewise.
13687 (nds32_return_addr_rtx): Likewise.
13688 (nds32_initial_elimination_offset): Likewise.
13689 (nds32_expand_prologue): Likewise.
13690 (nds32_expand_epilogue): Likewise.
13691 (nds32_dynamic_chain_address): New function.
13692 * config/nds32/nds32.h (machine_function): Add fields for dwarf
13693 exception handling.
13694 (DYNAMIC_CHAIN_ADDRESS): Define.
13695 (EH_RETURN_DATA_REGNO): Define.
13696 (EH_RETURN_STACKADJ_RTX): Define.
13697 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13698 patterns for dwarf exception handling.
13700 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13702 * config/nds32/nds32.h: Clean up obsolete macros.
13704 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13706 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13707 Add enum values for particular instructions.
13708 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13709 particular intrinsic functions.
13710 * config/nds32/nds32-intrinsic.md: Likewise.
13711 * config/nds32/nds32_intrinsic.h: Likewise.
13712 * config/nds32/nds32.h (nds32_builtins): Likewise.
13713 * config/nds32/nds32.md (type): Add pbsad and pbsada.
13714 (btst, ave): New patterns for particular instructions.
13716 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13718 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13719 Add enum values for atomic load/store and memory sync.
13720 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13722 * config/nds32/nds32-intrinsic.md: Likewise.
13723 * config/nds32/nds32_intrinsic.h: Likewise.
13724 * config/nds32/nds32.h (nds32_builtins): Likewise.
13726 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13728 PR tree-optimization/85257
13729 * fold-const.c (native_encode_vector): If not all elts could fit
13730 and off is -1, return 0 rather than offset.
13731 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13732 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13733 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
13734 adjust buffer in native_interpret_expr call.
13736 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13738 * config/nds32/constants.md (unspec_volatile_element): Add cache
13739 control enum values.
13740 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13741 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13742 * config/nds32/nds32.c (nds32_cctl_names): New.
13743 (nds32_print_operand): Handle cache control register names.
13744 * config/nds32/nds32.h (nds32_builtins): New enum values.
13745 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13747 * config/nds32/nds32.md (type): Add mmu.
13748 * config/nds32/pipelines.md (simple_insn): Add mmu.
13750 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13752 * config/nds32/nds32.md (type): Remove call.
13753 * config/nds32/pipelines.md (simple_insn): Likewise.
13755 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13757 * config/nds32/constants.md (unspec_volatile_element): Add
13758 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13759 UNSPEC_VOLATILE_FMFCFG.
13760 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13761 description for fmfcfg and fmfcsr.
13762 (bdesc_1arg): Add fmtcsr.
13763 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13764 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13765 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13766 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13767 unspec_fmfcfg): New patterns.
13768 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13769 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13770 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13771 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13772 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13773 __nds32__fmfcfg): Define.
13775 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13777 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13778 intrinsic register names.
13779 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13780 intrinsic register enum values and macros.
13782 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13784 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13785 for load/store addressing form.
13786 (nds32_print_operand_address): Likewise.
13788 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
13791 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13792 based on LABEL_REF. Remove useless assertion.
13793 (pic_address_needs_scratch): Fix formatting.
13794 (sparc_legitimize_pic_address): Minor tweaks.
13795 (sparc_delegitimize_address): Adjust assertion accordingly.
13796 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13797 into symbolic_operand.
13798 (movsi_high_pic_label_ref): Likewise.
13799 (movsi_lo_sum_pic_label_ref): Likewise.
13800 (movdi_pic_label_ref): Likewise.
13801 (movdi_high_pic_label_ref): Likewise.
13802 (movdi_lo_sum_pic_label_ref): Likewise.
13804 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
13806 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13807 custom LIB_SPEC setup.
13809 2018-04-06 Ruslan Bukin <br@bsdpad.com>
13810 Kito Cheng <kito.cheng@gmail.com>
13812 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13813 * config/riscv/freebsd.h: New.
13815 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13817 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13818 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13821 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13822 Kito Cheng <kito.cheng@gmail.com>
13824 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13825 nds32_output_call, nds32_symbol_binds_local_p): New functions.
13826 * config/nds32/nds32-protos.h (nds32_output_call,
13827 nds32_output_return): Declare.
13828 * config/nds32/nds32.md: Refine all the call and return patterns.
13830 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13833 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13834 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13836 PR rtl-optimization/84872
13837 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13838 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13839 EDGE_CROSSING edge.
13841 2018-04-06 Tamar Christina <tamar.christina@arm.com>
13843 * expr.c (copy_blkmode_to_reg): Revert 254862.
13844 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13846 2018-04-06 Richard Biener <rguenther@suse.de>
13848 PR middle-end/85244
13849 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13850 after seeing a component reference with an adjacent field. Treat
13851 refs to arrays at struct end of external decls similar to
13852 refs to unconstrained commons.
13854 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13857 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13858 look through SAVE_EXPRs with non-side-effects argument. Adjust
13860 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13863 2018-04-06 Richard Biener <rguenther@suse.de>
13865 PR middle-end/85180
13866 * alias.c (find_base_term): New wrapper around find_base_term
13867 unwinding CSELIB_VAL_PTR changes.
13868 (find_base_term): Do not restore CSELIB_VAL_PTR during the
13871 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13873 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13875 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13876 constant definitions.
13877 ("nop"): lr 0,0 -> nopr r0
13878 ("nop_lr0", "nop_lr1"): New insn definitions.
13880 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13882 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13883 NDS32_V3PUSH_AVAILABLE_P macro.
13885 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
13886 Chung-Ju Wu <jasonwucj@gmail.com>
13888 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13889 (nds32*-*-*): Add float and fpu_config into supported_defaults.
13890 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13891 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13892 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13893 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13894 * config/nds32/constraints.md: New constraints and checking for hard
13895 float configuration.
13896 * config/nds32/iterators.md: New mode iterator and attribute for hard
13897 float configuration.
13898 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13900 * config/nds32/nds32-fpu.md: New file.
13901 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13902 deal with hard float code generation.
13903 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13905 (abi_type, float_reg_number): New enum type.
13906 * config/nds32/nds32-predicates.c: New predicates for hard float.
13907 * config/nds32/nds32-protos.h: Declare functions for hard float.
13908 * config/nds32/nds32.c: Implementation for hard float configuration.
13909 * config/nds32/nds32.h: Definitions for hard float configuration.
13910 * config/nds32/nds32.md: Include hard float machine description and
13911 modify patterns for hard float configuration.
13912 * config/nds32/nds32.opt: New options for hard float configuration.
13913 * config/nds32/predicates.md: New predicates for hard float
13916 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13918 * common/config/nds32/nds32-common.c
13919 (nds32_option_optimization_table): Enable -mreleax-hint by default.
13921 2018-04-05 Jakub Jelinek <jakub@redhat.com>
13923 PR middle-end/85195
13924 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13925 CONSTRUCTOR_ELT (ctor, ...)->value.
13927 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
13930 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13932 2018-04-05 Tom de Vries <tom@codesourcery.com>
13935 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13938 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13939 Kito Cheng <kito.cheng@gmail.com>
13941 * config/nds32/constraints.md (U33): Fine-tune checking condition.
13942 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13943 * config/nds32/nds32.h (nds32_16bit_address_type): Add
13944 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13946 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13947 Kito Cheng <kito.cheng@gmail.com>
13949 * config/nds32/constraints.md (Ufe): New memory constraint.
13950 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13951 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13952 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13954 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13955 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13957 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13959 * config/nds32/nds32.md: Use optimize_size in the condition for
13960 alu-shift instructions.
13962 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13964 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13966 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13968 * config/nds32/nds32.md (negsi2): Refine pattern.
13970 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13971 Chung-Ju Wu <jasonwucj@gmail.com>
13973 * config/nds32/iterators.md (shift_rotate): New code iterator.
13974 (shift): New code attribute.
13975 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13976 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13977 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13978 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13979 bit-wise operations.
13980 (andsi3, *andsi3): Ditto.
13981 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13982 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13983 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13984 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13985 nds32_ior_operand, nds32_xor_operand): New predicates.
13987 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13989 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13990 (addsi3, subsi3): ... this.
13992 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13994 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13996 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13998 * config/nds32/nds32.md: Adjust indention.
14000 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
14002 * config/nds32/nds32.md (feature): New attribute.
14004 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
14006 * config/nds32/nds32.md (subtype): New attribute.
14008 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
14011 * config/arm/arm-builtins.c (arm_expand_builtin): Change
14012 expansion to perform a bitwise AND of the argument followed by a
14013 boolean negation of the result.
14015 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14017 PR rtl-optimization/84878
14018 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14019 the basic block. Assert the use reference is not artificial and that
14020 it has an associated insn.
14022 2018-04-04 Michael Matz <matz@suse.de>
14024 * builtins.c (compute_objsize): Pass correct operand
14025 to array_at_struct_end_p.
14027 2018-04-04 Richard Biener <rguenther@suse.de>
14030 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14031 from contexts for DINFO_LEVEL_TERSE and below.
14033 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14035 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14036 resiter_operand condition.
14037 * config/nds32/nds32.md (*move<mode>): Ditto.
14039 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14040 Monk Chiang <sh.chiang04@gmail.com>
14042 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14044 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14046 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14048 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14049 Kito Cheng <kito.cheng@gmail.com>
14051 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14052 nds32_cond_code_str, output_cond_branch,
14053 output_cond_branch_compare_zero, nds32_expand_cbranch,
14054 nds32_expand_cstore, nds32_expand_movcc,
14055 nds32_output_cbranchsi4_equality_zero,
14056 nds32_output_cbranchsi4_equality_reg,
14057 nds32_output_cbranchsi4_equality_reg_or_const_int,
14058 nds32_output_cbranchsi4_greater_less_zero: New functions.
14059 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14060 nds32_expand_cstore, nds32_expand_movcc,
14061 nds32_output_cbranchsi4_equality_zero,
14062 nds32_output_cbranchsi4_equality_reg,
14063 nds32_output_cbranchsi4_equality_reg_or_const_int,
14064 nds32_output_cbranchsi4_greater_less_zero): Declare.
14065 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14066 nds32_rimm11s_operand): New predicates.
14067 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14068 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14071 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14073 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14074 * config/nds32/nds32.md: Ditto.
14075 * config/nds32/pipelines.md: Ditto.
14077 2018-04-04 Richard Biener <rguenther@suse.de>
14079 PR tree-optimization/85168
14080 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14081 propagating abnormals.
14083 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14085 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14087 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14088 Kito Cheng <kito.cheng@gmail.com>
14090 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14091 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14092 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14093 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14094 * config/nds32/nds32.md (sibcall_internal): New.
14095 (sibcall_register): Remove.
14096 (sibcall_immediate): Remove.
14097 (sibcall_value_internal): New.
14098 (sibcall_value_register): Remove.
14099 (sibcall_value_immediate): Remove.
14100 * config/nds32/predicates.md (nds32_general_register_operand): New.
14101 (nds32_call_address_operand): New.
14103 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14105 PR rtl-optimization/85167
14106 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14107 bb_defs if *split_p, instead preinitialize it to NULL.
14109 PR tree-optimization/85156
14110 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14111 evaluating the argument multiple times.
14113 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14115 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14117 (_mm_cvtpd_ps): Likewise.
14118 (_mm_cvttpd_epi32): Likewise.
14119 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14120 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14121 vector, pixel, and bool following altivec.h include.
14123 2018-04-03 Martin Sebor <msebor@redhat.com>
14125 * doc/extend.texi (Common Function Attributes): Clarify.
14126 (const attribute): Likewise.
14127 (pure attribute): Likewise.
14129 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14132 * config/i386/i386.c (ix86_expand_vector_set): Use
14133 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14135 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14137 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14138 instructions when changing rounding bits to preserve precision bits
14139 in the x87 control word.
14141 2018-04-03 Martin Liska <mliska@suse.cz>
14143 PR tree-optimization/82491
14144 * rtl.h (strip_offset_and_add): Replace += suboffset with
14145 poly_uint64 () + suboffset.
14147 2018-03-29 Martin Liska <mliska@suse.cz>
14148 Martin Jambor <mjambor@suse.cz>
14151 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14152 param_type is not an integral or pointer type.
14154 2018-04-03 Richard Biener <rguenther@suse.de>
14156 * sese.h (recompute_all_dominators): Remove.
14158 2018-04-02 Martin Sebor <msebor@redhat.com>
14160 * doc/invoke.texi (-Wrestrict): Fix typos.
14162 2018-04-02 Jim Wilson <jimw@sifive.com>
14164 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14165 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14166 (<optab>di3, <optab>si3_extend): Likewise.
14167 (<optab>si3_mask, <optab>si3_mask_1): New.
14168 (<optab>di3_mask, <optab>di3_mask_1): New.
14169 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14170 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14171 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14173 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14175 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14178 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14180 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14181 (nds32_canonicalize_comparison): New function.
14183 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14184 Kito Cheng <kito.cheng@gmail.com>
14185 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14187 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14188 * config/nds32/constants.md (unspec_volatile_element): Add
14189 UNSPEC_VOLATILE_RELAX_GROUP.
14190 * config/nds32/nds32-relax-opt.c: New file.
14191 * config/nds32/nds32-predicates.c
14192 (nds32_symbol_load_store_p): New function.
14193 * config/nds32/nds32-protos.h
14194 (nds32_symbol_load_store_p): Declare function.
14195 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14196 * config/nds32/nds32.c
14197 (nds32_register_pass): New function to register pass.
14198 (nds32_register_passes): New function to register passes.
14199 * config/nds32/nds32.md (relax_group): New pattern.
14200 * config/nds32/nds32.opt (mrelax-hint): New option.
14201 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14203 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14205 * config/nds32/t-nds32: Modify files dependency.
14207 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14209 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14210 (PROFILE_HOOK): Define its implementation.
14212 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14214 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14215 type and 32-bit size.
14217 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14219 PR middle-end/85090
14220 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14221 (V_128_256): New mode iterator.
14222 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14223 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14224 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14226 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14227 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14229 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14232 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14233 NaN inputs correctly.
14235 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14238 * config/rs6000/vsx.md (??r): New mode attribute.
14239 (*vsx_mov<mode>_64bit): Use it.
14240 (*vsx_mov<mode>_32bit): Likewise.
14242 2018-03-30 Martin Sebor <msebor@redhat.com>
14244 PR tree-optimization/84818
14245 * builtins.c (check_access): Use warning_n.
14247 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14250 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14252 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14255 2018-03-30 Julia Koval <julia.koval@intel.com>
14258 * x86-tune.def (movx, partial_reg_dependency): Enable for
14261 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14263 PR inline-asm/84985
14264 * lra-constraints.c (process_alt_operands): Move setting
14265 this_alternative_matches below.
14267 2018-03-29 Martin Liska <mliska@suse.cz>
14270 * doc/invoke.texi: Document how LTO works with debug info.
14271 Describe auto-load support of binutils. Mention 'x86-64'
14272 as valid option value of -march option.
14274 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14276 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14279 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14280 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14281 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14284 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14287 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14288 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14289 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14290 for RS6000_BTM_POWERPC64.
14291 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14292 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14293 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14296 (DIVDEU): Likewise.
14298 2018-03-28 Carl Love <cel@us.ibm.com>
14301 2017-09-27 Carl Love <cel@us.ibm.com>
14303 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14304 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14305 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14308 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14310 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14311 instead of __vector bool.
14312 (_mm_max_pu8): Likewise.
14313 (_mm_min_pi16): Likewise.
14315 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14318 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14319 (DIVWEUO): Likewise.
14320 (DIVDEO): Likewise.
14321 (DIVDEUO): Likewise.
14322 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14323 DIVWEUO and DIVDEUO.
14324 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14325 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14326 (div_extend): Likewise.
14327 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14329 (__builtin_divweuo): Likewise.
14330 (__builtin_divdeo): Likewise.
14331 (__builtin_divdeuo): Likewise.
14333 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14336 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14337 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14339 PR tree-optimization/82004
14340 * gimple-match-head.c (optimize_pow_to_exp): New function.
14341 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14342 Don't fold to exp if optimize_pow_to_exp is false.
14344 2018-03-28 Martin Liska <mliska@suse.cz>
14347 * calls.c (initialize_argument_information): Fix trailing space.
14348 * common.opt: Fix typo and provide better explanation for
14349 -fsanitize-coverage option.
14350 * config/i386/i386.opt: Fix typo.
14352 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14353 Martin Liska <mliska@suse.cz>
14356 * gimplify.c (asan_poison_variable): Don't do the check for
14357 gimplify_omp_ctxp here.
14358 (gimplify_decl_expr): Do it here.
14359 (gimplify_target_expr): Likewise.
14361 2018-03-28 Martin Liska <mliska@suse.cz>
14364 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14365 chkp_type_bounds_count if MPX is not enabled.
14367 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14369 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14371 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14374 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14375 function to create the function decl for complex long double
14376 multiply and divide for -mabi=ieeelongdouble.
14377 (init_float128_ieee): Call it.
14379 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14382 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14383 -fcf-protection=branch -mibt.
14384 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14386 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14389 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14390 arm_word_relocations.
14392 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14395 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14396 extern array declarations.
14398 2018-03-27 Richard Biener <rguenther@suse.de>
14400 PR middle-end/84067
14401 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14402 explicit single_use checks.
14404 2018-03-27 Richard Biener <rguenther@suse.de>
14406 PR tree-optimization/85082
14407 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14410 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14412 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14413 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14414 Turn on fasynchronous-unwind-tables and funwind-tables.
14416 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14419 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14420 (*bmi_blsr_<mode>_ccz): Ditto.
14422 2018-03-26 Tom de Vries <tom@codesourcery.com>
14424 PR tree-optimization/85063
14425 * omp-general.c (offloading_function_p): New function. Factor out
14427 * omp-offload.c (pass_omp_target_link::gate): ... here.
14428 * omp-general.h (offloading_function_p): Declare.
14429 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14430 with attribute omp declare target for offloading functions.
14432 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14434 PR tree-optimization/84005
14435 * tree-data-ref.h (get_base_for_alignment): Declare.
14436 * tree-data-ref.c (get_base_for_alignment_1): New function.
14437 (get_base_for_alignment): Likewise.
14438 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14439 get_base_for_alignment to find a suitable base object, instead
14440 of always using drb->base_address.
14442 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14444 PR inline-asm/85022
14445 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14446 known size by default.
14448 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14450 PR inline-asm/85030
14451 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14452 and non BLKmode operands.
14454 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14457 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14458 Clean up attributes.
14460 2018-03-23 Richard Biener <rguenther@suse.de>
14463 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14464 we are going to emit early debug for LTO.
14466 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14468 PR inline-asm/85034
14469 * function.c (match_asm_constraints_1): Don't optimize if input
14470 doesn't satisfy general_operand predicate for output's mode.
14472 PR inline-asm/85022
14473 * alias.c (write_dependence_p): Don't require for x_canonicalized
14474 non-VOIDmode if x has VOIDmode.
14477 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14478 just don't try to optimize it rather than assert it never happens.
14480 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14482 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14483 macro expansions for definition of ST_INTERNAL_<mode> and
14484 LD_INTERNAL_<mode> builtins.
14485 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14487 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14489 (altivec_expand_st_builtin): Likewise.
14490 (altivec_expand_builtin): Remove calls to deleted functions.
14491 (rs6000_address_for_altivec): Delete this function.
14492 * config/rs6000/vector.md: Remove expands for
14493 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14495 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14498 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14499 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14500 re-computing once computed.
14501 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14502 (arm_init_machine_status): Initialize
14503 machine->static_chain_stack_bytes.
14505 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14508 * doc/extend.texi: Add four new prototypes for vec_ld.
14509 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14510 definitions for more logical presentation.
14511 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14512 entries for V1TI variants of __builtin_altivec_ld builtin.
14513 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14514 handling of V1TI variant of LVX icode pattern.
14515 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14516 (rs6000_gimple_fold_builtin): Likewise.
14517 (altivec_init_builtins): Add code to define
14518 __builtin_altivec_lvx_v1ti function.
14520 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14522 PR inline-asm/84941
14523 * function.c (match_asm_constraints_1): Don't do the optimization
14524 if input isn't a REG, SUBREG, MEM or constant.
14526 2018-03-22 Tom de Vries <tom@codesourcery.com>
14528 PR tree-optimization/84956
14529 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14530 bb_has_abnormal_pred.
14532 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14535 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14536 DECL_INITIAL (decl) to decl at the end.
14537 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14538 adjust the comment.
14540 2018-03-21 Joseph Myers <joseph@codesourcery.com>
14542 * doc/extend.texi (__builtin_tgmath): Document when complex
14543 integer types are treated as _Complex _Float64.
14545 2018-03-21 Tom de Vries <tom@codesourcery.com>
14547 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14549 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14551 PR tree-optimization/84960
14552 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14553 if it is ENTRY block, move them into single succ of ENTRY in that case.
14555 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
14557 PR tree-optimization/84811
14558 * poly-int.h (poly_span_traits): Remove the T3 parameter and
14559 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14560 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14561 (known_subrange_p): Update accordingly. Cast each value involved
14562 in the size comparison, rather than casting the result of the
14565 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14567 PR tree-optimization/84982
14568 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14569 by flipping the least significant bit rather than all bits from
14570 bitpos to bitpos + bitsize - 1.
14572 2018-03-21 Nathan Sidwell <nathan@acm.org>
14574 * doc/extend.texi (Deprecated Features): Remove mention of
14575 long-deleted deprecations.
14577 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14580 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14581 * configure: Regenerate.
14583 2018-03-21 Tom de Vries <tom@codesourcery.com>
14585 PR tree-optimization/83126
14586 * tree-parloops.c (num_phis): New function.
14587 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14589 2018-03-21 Nathan Sidwell <nathan@acm.org>
14591 * doc/extend.texi (Deprecated Features): Update deprecated flags,
14592 mention anon-struct/union members and trailing attributes.
14594 2018-03-21 Bin Cheng <bin.cheng@arm.com>
14596 PR tree-optimization/84969
14597 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14598 builtin memset partitions if they set different rhs values.
14600 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14602 PR rtl-optimization/84989
14603 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14604 VEC_DUPLICATE with scalar result mode.
14606 2018-03-21 Martin Liska <mliska@suse.cz>
14609 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14610 not intended return statement.
14612 2018-03-21 Martin Liska <mliska@suse.cz>
14615 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14616 (chkp_find_bound_slots_1): Limit number of iterations.
14618 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14621 * Minor grammar fixes for x86 options.
14623 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14626 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14627 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14629 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14632 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14633 (altivec_lvx_<mode>_1op): Likewise.
14634 (altivec_stvx_<mode>_2op): Likewise.
14635 (altivec_stvx_<mode>_1op): Likewise.
14636 (altivec_lvx_<VM2:mode>): New define_expand.
14637 (altivec_stvx_<VM2:mode>): Likewise.
14638 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14639 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14640 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14641 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14642 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14643 (rs6000_gen_lvx): Likewise.
14644 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14645 (altivec_expand_stv_builtin): Likewise.
14646 (altivec_expand_builtin): Likewise.
14647 * config/rs6000/vector.md: Likewise.
14649 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14652 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14655 2018-03-20 Richard Biener <rguenther@suse.de>
14658 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14659 sign-conversions as zero, fall back to standard scalar_stmt
14662 2018-03-20 Martin Liska <mliska@suse.cz>
14665 * predict.c (rebuild_frequencies): Handle case when we have
14666 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14668 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14671 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14672 flag_section_anchors.
14673 * varasm.c (use_blocks_for_decl_p): Remove hack for
14674 dw2_force_const_mem.
14677 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14679 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
14680 be created, use lowpart_subreg of operands[0] rather than operands[0]
14682 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14683 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14684 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14685 and n constraint instead of aarch64_shift_imm_di and Usd.
14686 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14687 (*aarch64_<optab>_reg_minus<mode>3): ... this.
14689 2018-03-20 Sudakshina Das <sudi.das@arm.com>
14692 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14693 to favor GPR over NEON registers.
14694 (<shift>di3_neon): Likewise.
14696 2018-03-20 Tom de Vries <tom@codesourcery.com>
14699 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14700 (nvptx_process_pars): Emit bar.sync asap and alap.
14702 2018-03-20 Tom de Vries <tom@codesourcery.com>
14705 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14706 seen_label if seen_label is already set.
14708 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14711 * config/i386/i386.c (fold_builtin_cpu): For features above 31
14712 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14713 Use 1U instead of 1. Formatting fixes.
14716 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14717 instead of TREE_TYPE (s1) for the return value.
14719 2018-03-19 Jakub Jelinek <jakub@redhat.com>
14721 PR tree-optimization/84946
14722 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14723 bitsize + bitsize in poly_uint64 rather than poly_int64.
14726 * dwarf2asm.c: Include fold-const.c.
14727 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14728 of decl rather than decl itself.
14730 PR rtl-optimization/84643
14731 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14733 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
14736 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14737 calling assemble_variable.
14739 2018-03-19 Sudakshina Das <sudi.das@arm.com>
14742 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14743 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14745 2018-03-19 Jim Wilson <jimw@sifive.com>
14748 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14749 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14750 (riscv_first_stack_step): Likewise.
14751 (riscv_option_override): Use STACK_BOUNDARY instead of
14752 MIN_STACK_BOUNDARY.
14753 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14754 MIN_STACK_BOUNDARY.
14755 (BIGGEST_ALIGNMENT): Set to 128.
14756 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14757 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14760 2018-03-19 Richard Biener <rguenther@suse.de>
14762 PR tree-optimization/84933
14763 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14764 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14766 2018-03-19 Richard Biener <rguenther@suse.de>
14768 PR tree-optimization/84859
14769 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14770 (cond_if_else_store_replacement): Perform sinking operation on
14771 single-store BBs regardless of MAX_STORES_TO_SINK setting.
14772 Generalize what a BB with a single eligible store is.
14774 2018-03-19 Richard Biener <rguenther@suse.de>
14776 PR tree-optimization/84929
14777 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14778 chrec_is_positive against non-chrec arg.
14780 2018-03-19 Tamar Christina <tamar.christina@arm.com>
14783 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14785 2018-03-18 Martin Liska <mliska@suse.cz>
14787 PR rtl-optimization/84635
14788 * regrename.c (build_def_use): Use matches_mode only when
14791 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
14793 PR tree-optimization/84913
14794 * tree-vect-loop.c (vectorizable_reduction): Don't try to
14795 vectorize chains of COND_EXPRs.
14797 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14799 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14801 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14803 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14805 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14807 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14809 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14810 Kito Cheng <kito.cheng@gmail.com>
14812 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14813 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14814 (nds32_adjust_reg_alloc_order): New function.
14815 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14817 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
14819 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14820 nds32_print_operand, nds32_print_operand_address): Use
14821 HOST_WIDE_INT_PRINT_DEC instead.
14823 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14825 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14827 2018-03-17 Jakub Jelinek <jakub@redhat.com>
14830 * config/i386/i386.c (initial_ix86_tune_features,
14831 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14832 unsigned long long.
14833 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14834 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14835 rather than 1u << ix86_tune. Formatting fix.
14836 (ix86_option_override_internal): Change ix86_arch_mask from
14837 unsigned int to unsigned HOST_WIDE_INT, initialize to
14838 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14839 (ix86_function_specific_restore): Likewise.
14841 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14844 * postreload.c (reload_combine_recognize_pattern): Perform
14845 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14846 truncate_int_for_mode the result for the destination's mode.
14849 * hsa-gen.c (mem_type_for_type): Fix comment typo.
14850 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14852 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14855 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
14858 * lra-assigns.c (lra_split_hard_reg_for): Don't use
14859 regno_allocno_class_array and sorted_pseudos.
14860 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14861 insns where regno is used.
14863 2018-03-16 Martin Liska <mliska@suse.cz>
14866 * multiple_target.c (create_dispatcher_calls): Redirect
14867 reference in the symbol table.
14869 2018-03-16 Martin Liska <mliska@suse.cz>
14872 * multiple_target.c (create_dispatcher_calls): Redirect also
14875 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14879 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14880 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14881 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14883 2018-03-16 Julia Koval <julia.koval@intel.com>
14885 * doc/invoke.texi (Skylake Server): Add CLWB.
14886 Cannonlake): Remove CLWB.
14888 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14890 PR tree-optimization/84841
14891 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14893 (FLOAT_ONE_CONST_TYPE): Define.
14894 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14895 (sort_by_operand_rank): Put entries with higher constant_type last
14896 rather than first to match comments.
14898 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
14900 * config/nios2/nios2.md (movsi_internal): Fix thinko in
14903 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14906 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14907 check and use address of target always.
14909 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
14912 * config/i386/i386.c (indirect_thunk_needed): Update comments.
14913 (indirect_thunk_bnd_needed): Likewise.
14914 (indirect_thunks_used): Likewise.
14915 (indirect_thunks_bnd_used): Likewise.
14916 (indirect_return_needed): New.
14917 (indirect_return_bnd_needed): Likewise.
14918 (output_indirect_thunk_function): Add a bool argument for
14920 (output_indirect_thunk_function): Don't generate alias for
14921 function return thunk.
14922 (ix86_code_end): Call output_indirect_thunk_function to generate
14923 function return thunks.
14924 (ix86_output_function_return): Set indirect_return_bnd_needed
14925 and indirect_return_needed instead of indirect_thunk_bnd_needed
14926 and indirect_thunk_needed.
14928 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
14930 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14931 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14932 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14934 2018-03-15 David Malcolm <dmalcolm@redhat.com>
14935 Paul Hua <paul.hua.gm@gmail.com>
14938 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14940 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
14942 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14943 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14944 resp. SFmode cases.
14946 2018-03-15 Tamar Christina <tamar.christina@arm.com>
14949 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14950 instead of GET_MODE_SIZE when comparing Units.
14952 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14955 * varasm.c (hash_section): Return an unchangeble hash value
14956 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14957 Return !aarch64_can_use_per_function_literal_pools_p ().
14959 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14962 * optabs.c (emit_conditional_move): Pass address of cmode's copy
14963 rather than address of cmode as last argument to prepare_cmp_insn.
14965 2018-03-15 Julia Koval <julia.koval@intel.com>
14967 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14968 F_AVX512VNNI, F_AVX512BITALG): New.
14970 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
14973 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
14974 insn for floating-point loads and stores.
14976 2018-03-14 Carl Love <cel@us.ibm.com>
14978 * config/rs6000/rs6000-c.c: Add macro definitions for
14979 ALTIVEC_BUILTIN_VEC_PERMXOR.
14980 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14981 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14982 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14983 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14985 * config/doc/extend.texi: Add prototypes for vec_permxor.
14987 2018-03-14 David Malcolm <dmalcolm@redhat.com>
14990 * diagnostic-show-locus.c (class layout_point): Convert m_line
14991 from int to linenum_type.
14992 (line_span::comparator): Use linenum "compare" function when
14993 comparing line numbers.
14994 (test_line_span): New function.
14995 (layout_range::contains_point): Convert param "row" from int to
14997 (layout_range::intersects_line_p): Likewise.
14998 (layout::will_show_line_p): Likewise.
14999 (layout::print_source_line): Likewise.
15000 (layout::should_print_annotation_line_p): Likewise.
15001 (layout::print_annotation_line): Likewise.
15002 (layout::print_leading_fixits): Likewise.
15003 (layout::annotation_line_showed_range_p): Likewise.
15004 (struct line_corrections): Likewise for field m_row.
15005 (line_corrections::line_corrections): Likewise for param "row".
15006 (layout::print_trailing_fixits): Likewise.
15007 (layout::get_state_at_point): Likewise.
15008 (layout::get_x_bound_for_row): Likewise.
15009 (layout::print_line): Likewise.
15010 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
15011 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
15012 * input.c (selftest::test_linenum_comparisons): New function.
15013 (selftest::input_c_tests): Call it.
15014 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15015 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15016 * selftest.h (ASSERT_GT): New macro.
15017 (ASSERT_GT_AT): New macro.
15018 (ASSERT_LT): New macro.
15019 (ASSERT_LT_AT): New macro.
15021 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15023 PR rtl-optimization/84780
15024 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15026 2018-03-14 Martin Liska <mliska@suse.cz>
15028 * tree.c (record_node_allocation_statistics): Use
15029 get_stats_node_kind.
15030 (get_stats_node_kind): New function extracted from
15031 record_node_allocation_statistics.
15032 (free_node): Use get_stats_node_kind.
15034 2018-03-14 Richard Biener <rguenther@suse.de>
15036 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15037 that the value-set of ANTIC_IN doesn't grow.
15040 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15042 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15043 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15045 2018-03-14 Julia Koval <julia.koval@intel.com>
15047 * config.gcc (icelake-client, icelake-server): New.
15049 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15050 (initial_ix86_arch_features): Ditto.
15051 (PTA_SKYLAKE): Add SGX.
15052 (PTA_ICELAKE): Remove.
15053 (PTA_ICELAKE_CLIENT): New.
15054 (PTA_ICELAKE_SERVER): New.
15055 (ix86_option_override_internal): Split up icelake on icelake client and
15057 (get_builtin_code_for_version): Ditto.
15058 (fold_builtin_cpu): Ditto.
15059 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15060 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15061 * config/i386/i386.h (processor_type): Ditto.
15062 * doc/invoke.texi: Ditto.
15064 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15067 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15068 INTEGER_CST offset, add it together with bitpos / 8 and
15069 sign extend based on POINTER_SIZE.
15073 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15076 * config/i386/constraints.md (Yc): New register constraint.
15077 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15078 Use Yc constraint for alternative 2 of operand 0. Remove
15079 preferred_for_speed attribute.
15081 2018-03-14 Richard Biener <rguenther@suse.de>
15083 PR tree-optimization/84830
15084 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15085 with the old one to avoid oscillations.
15087 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15090 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15092 (assign_by_spills): Return a flag of reload assignment failure.
15093 Do not process the reload assignment failures. Do not spill other
15094 reload pseudos if they has the same reg class. Update n if
15096 (lra_assign): Add a return arg. Set up from the result of
15097 assign_by_spills call.
15098 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15099 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15100 usage_insns if it is not NULL.
15101 (spill_hard_reg_in_range): New function.
15102 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15103 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15104 function prototypes.
15105 (lra_assign): Change prototype.
15106 * lra.c (lra): Add code to deal with fails by splitting hard reg
15109 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15111 * config/riscv/riscv.opt (mrelax): New option.
15112 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15113 "norelax" when riscv_mrelax is disabled.
15114 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15116 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15119 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15120 reassociation for int modes.
15122 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15124 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15125 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15127 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15128 * config/aarch64/aarch64-sve.md
15129 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15130 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15131 (*extend<mode><Vwide>2): Rename to...
15132 (aarch64_sve_extend<mode><Vwide>2): ...this.
15133 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15134 renaming the old pattern to...
15135 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15137 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15138 define_expand, renaming the old pattern to...
15139 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15140 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15141 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15142 account when deciding which SVE instruction the optab should use.
15143 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15145 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15147 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15148 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15149 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15150 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15151 (tlsdesc_small_<mode>): Turn a define_expand and use
15152 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15153 (tlsdesc_small_advsimd_<mode>): ...this.
15154 (tlsdesc_small_sve_<mode>): New pattern.
15156 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15158 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15159 (UNSPEC_UMUL_HIGHPART): New constants.
15160 (MUL_HIGHPART): New int iteraor.
15161 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15162 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15164 (*<su>mul<mode>3_highpart): New define_insn.
15166 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15169 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15172 2018-03-13 Martin Liska <mliska@suse.cz>
15175 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15177 (sem_item_optimizer::~sem_item_optimizer): Release it.
15178 (sem_item_optimizer::merge_classes): Register variable aliases.
15179 (sem_item_optimizer::fixup_pt_set): New function.
15180 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15181 * ipa-icf.h: Declare new variables and functions.
15183 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15185 PR middle-end/84834
15186 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15187 integer_pow2p@2 and test integer_pow2p in condition.
15188 (A < 0 ? C : 0): Similarly for @1.
15190 PR middle-end/84831
15191 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15192 characters starting at p contain '\0' character, don't look beyond
15196 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15197 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15200 * reg-stack.c (change_stack): Change update_end var from int to
15201 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15202 also call set_block_for_insn on the newly added insns and rescan.
15205 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15206 on the last operand.
15209 * tree.c (stabilize_reference_1): Return save_expr (e) for
15210 STATEMENT_LIST even if it doesn't have side-effects.
15212 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15214 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15216 2018-03-12 Renlin Li <renlin.li@arm.com>
15218 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15219 aarch64_output_scalar_simd_mov_immediate.
15221 2018-03-12 Martin Sebor <msebor@redhat.com>
15223 PR tree-optimization/83456
15224 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15225 for perfectly overlapping calls to memcpy.
15226 (gimple_fold_builtin_memory_chk): Same.
15227 (gimple_fold_builtin_strcpy): Handle no-warning.
15228 (gimple_fold_builtin_stxcpy_chk): Same.
15229 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15231 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15233 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15234 parameter. Use it for SFmode.
15235 (rs6000_function_arg_advance_1): Adjust.
15236 (rs6000_function_arg): Adjust.
15237 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15239 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15241 PR rtl-optimization/84169
15242 PR rtl-optimization/84780
15243 * combine.c (can_combine_p): Check for a 2-insn combination whether
15244 the destination register is used between the two insns, too.
15246 2018-03-12 Richard Biener <rguenther@suse.de>
15248 PR tree-optimization/84803
15249 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15250 for refs DR analysis didn't process.
15252 2018-03-12 Richard Biener <rguenther@suse.de>
15254 PR tree-optimization/84777
15255 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15256 force-vectorize loops ignore whether we are optimizing for size.
15258 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15260 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15261 (TARGET_MD_ASM_ADJUST): Define.
15263 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15264 Kito Cheng <kito.cheng@gmail.com>
15265 Chung-Ju Wu <jasonwucj@gmail.com>
15267 * config/nds32/nds32.c (nds32_compute_stack_frame,
15268 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15269 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15270 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15271 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15272 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15273 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15274 * config/nds32/nds32.md (prologue, epilogue): Use macro
15275 NDS32_V3PUSH_AVAILABLE_P to do checking.
15277 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15280 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15281 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15282 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15283 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15284 addition of most attributes on !orig_type_die or the attribute not
15285 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15287 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15288 Chung-Ju Wu <jasonwucj@gmail.com>
15290 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15291 __NDS32_VH__ macro.
15292 * config/nds32/nds32.opt (mvh): New option.
15294 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15295 Chung-Ju Wu <jasonwucj@gmail.com>
15297 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15299 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15300 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15303 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15304 Chung-Ju Wu <jasonwucj@gmail.com>
15306 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15308 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15309 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15311 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15312 Kito Cheng <kito.cheng@gmail.com>
15313 Chung-Ju Wu <jasonwucj@gmail.com>
15315 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15316 UNSPEC_FFMISM and UNSPEC_FLMISM.
15317 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15318 for ffb, ffmism and flmism.
15319 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15320 (unspec_ffmism): Ditto.
15321 (unspec_flmism): Ditto.
15322 (nds32_expand_builtin_impl): Check if string extension is available.
15323 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15324 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15326 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15329 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15332 * lra-assigns.c (assign_by_spills): Return a flag of reload
15333 assignment failure. Do not process the reload assignment
15334 failures. Do not spill other reload pseudos if they has the same
15336 (lra_assign): Add a return arg. Set up from the result of
15337 assign_by_spills call.
15338 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15339 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15340 usage_insns if it is not NULL.
15341 (spill_hard_reg_in_range): New function.
15342 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15343 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15344 function prototypes.
15345 (lra_assign): Change prototype.
15346 * lra.c (lra): Add code to deal with fails by splitting hard reg
15349 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15352 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15354 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15357 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15358 (dw_val_node): Add val_symbolic_view.
15359 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15360 (symview_upper_bound): New.
15361 (new_line_info_table): Initialize symviews_since_reset.
15362 (dwarf2out_source_line): Count symviews_since_reset and set
15363 symview_upper_bound.
15364 (dw_val_equal_p): Handle symview.
15365 (add_AT_symview): New.
15366 (print_dw_val): Handle symview.
15367 (attr_checksum, attr_checksum_ordered): Likewise.
15368 (same_dw_val_p, size_of_die): Likewise.
15369 (value_format, output_die): Likewise.
15370 (add_high_low_attributes): Use add_AT_symview for entry_view.
15371 (dwarf2out_finish): Reset symview_upper_bound, clear
15374 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15377 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15378 Add strict argument and use it.
15379 (rs6000_split_multireg_move): Update for new strict argument.
15380 (mem_operand_gpr): Disallow all non-offsettable addresses.
15381 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15383 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15386 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15387 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15388 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15391 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15392 decl, use remap_type if we want to use the type.
15394 2018-03-09 Martin Sebor <msebor@redhat.com>
15396 PR tree-optimization/84526
15397 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15399 (builtin_access::generic_overlap): Be prepared to handle non-array
15402 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15404 PR rtl-optimization/84682
15405 * lra-constraints.c (process_address_1): Check is_address flag
15406 for address constraints.
15407 (process_alt_operands): Likewise.
15408 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15409 preprocess_constraints.
15410 * recog.h (preprocess_constraints): Add oploc parameter.
15412 * recog.c (preprocess_constraints): Test address_operand for
15413 CT_ADDRESS constraints.
15415 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15418 * lra-assigns.c (assign_by_spills): Return a flag of reload
15419 assignment failure. Do not process the reload assignment
15420 failures. Do not spill other reload pseudos if they has the same
15422 (lra_assign): Add a return arg. Set up from the result of
15423 assign_by_spills call.
15424 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15425 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15426 usage_insns if it is not NULL.
15427 (spill_hard_reg_in_range): New function.
15428 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15429 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15430 function prototypes.
15431 (lra_assign): Change prototype.
15432 * lra.c (lra): Add code to deal with fails by splitting hard reg
15435 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15438 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15439 Accept complain bool parameter. Only emit errors if it is true.
15440 (arm_parse_cpu_option_name): Likewise.
15441 (arm_target_thumb_only): Adjust callers of the above.
15442 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15443 prototype to take a default true bool parameter.
15444 (arm_parse_arch_option_name): Likewise.
15446 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15447 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15451 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15452 * configure: Regenerate.
15453 * configure.ac ("linker --version-script option"): New.
15454 ("linker soname option"): New.
15456 2018-03-09 Richard Biener <rguenther@suse.de>
15458 PR tree-optimization/84775
15459 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15460 immediate uses of predicate stmts and mark them modified.
15463 PR tree-optimization/84178
15464 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15466 (version_loop_for_if_conversion): Delay update_ssa call.
15467 (tree_if_conversion): Delay update_ssa until after predicate
15470 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15473 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15474 when the function accesses prior frames.
15476 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15479 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15480 gen_llsym, otherwise call maybe_gen_llsym.
15482 PR inline-asm/84742
15483 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15484 has ',' character inside of it.
15486 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15489 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15490 as clobbering CC_REGNUM.
15492 2018-03-08 Richard Biener <rguenther@suse.de>
15494 PR middle-end/84552
15495 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15496 (follow_copies_to_constant): Do not follow SSA names registered
15499 2018-03-08 Richard Biener <rguenther@suse.de>
15501 PR tree-optimization/84178
15502 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15504 (version_loop_for_if_conversion): Delay update_ssa call.
15505 (tree_if_conversion): Delay update_ssa until after predicate
15508 2018-03-08 David Malcolm <dmalcolm@redhat.com>
15510 PR tree-optimization/84178
15511 * tree-if-conv.c (release_bb_predicate): Remove the
15512 the assertion that the stmts have NULL use_ops.
15513 Discard the statements, asserting that they haven't
15514 yet been added to a BB.
15516 2018-03-08 Richard Biener <rguenther@suse.de>
15518 PR tree-optimization/84746
15519 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15520 (phi_translate): Pass in destination ANTIC_OUT set.
15521 (phi_translate_1): Likewise. For a simplified result lookup
15522 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15523 (phi_translate_set): Adjust.
15524 (do_pre_regular_insertion): Likewise.
15525 (do_pre_partial_partial_insertion): Likewise.
15527 2018-03-08 Martin Liska <mliska@suse.cz>
15529 PR gcov-profile/84735
15530 * doc/gcov.texi: Document usage of profile files.
15531 * gcov-io.h: Document changes in the format.
15533 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
15537 * dwarf2out.c (struct dw_line_info_table): Update comments for
15539 (FORCE_RESET_NEXT_VIEW): New.
15540 (FORCE_RESETTING_VIEW_P): New.
15541 (RESETTING_VIEW_P): Check for -1 too.
15542 (ZERO_VIEW_P): Likewise.
15543 (new_line_info_table): Force-reset next view.
15544 (dwarf2out_begin_function): Likewise.
15545 (dwarf2out_source_line): Simplify zero_view_p initialization.
15546 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15547 view directly. Omit view when omitting .loc at line 0.
15549 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15551 PR tree-optimization/84740
15552 * tree-switch-conversion.c (process_switch): Call build_constructors
15553 only if info.phi_count is non-zero.
15555 PR tree-optimization/84739
15556 * tree-tailcall.c (find_tail_calls): Check call arguments against
15557 DECL_ARGUMENTS (current_function_decl) rather than
15558 DECL_ARGUMENTS (func) when checking for tail recursion.
15560 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15562 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15563 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15564 Volker Reichelt's entry and add entries for people that perform
15565 GCC fuzzy testing and report numerous bugs.
15567 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
15570 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15571 readonly data in sdata, if that is disabled.
15572 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15573 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15574 -mreadonly-in-sdata option.
15576 2018-03-07 Martin Sebor <msebor@redhat.com>
15578 PR tree-optimization/84468
15579 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15580 basic block when looking for nul assignment.
15582 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
15585 * except.h (output_function_exception_table): Adjust prototype.
15586 * except.c (output_function_exception_table): Remove FNNAME parameter
15587 and add SECTION parameter. Ouput one part of the table at a time.
15588 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15589 the first part of the exception table and emit unwind directives.
15590 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15591 (i386_pe_seh_cold_init): Likewise.
15592 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15593 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15594 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15595 (ix86_output_call_insn): Emit a nop in one more case for SEH.
15596 * config/i386/winnt.c: Include except.h.
15597 (struct seh_frame_state): Add reg_offset, after_prologue and
15598 in_cold_section fields.
15599 (i386_pe_seh_end_prologue): Set seh->after_prologue.
15600 (i386_pe_seh_cold_init): New function.
15601 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15602 to seh->in_cold_section.
15603 (seh_emit_push): Record the offset of the push.
15604 (seh_emit_save): Record the offet of the save.
15605 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15606 Test seh->after_prologue to disregard the epilogue.
15607 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15608 (i386_pe_end_cold_function): New function.
15610 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15613 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15614 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15617 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15619 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15620 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15622 PR middle-end/84723
15623 * multiple_target.c: Include tree-inline.h and intl.h.
15624 (expand_target_clones): Diagnose and fail if node->definition and
15625 !tree_versionable_function_p (node->decl).
15627 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15629 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15631 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15632 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15633 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15635 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15638 * combine.c (try_combine): Use reg_or_subregno instead of handling
15639 just paradoxical SUBREGs and REGs.
15641 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15643 * config/arc/arc.c (arc_finalize_pic): Remove function.
15644 (arc_must_save_register): We use single base PIC register, remove
15645 checks to save/restore the PIC register.
15646 (arc_expand_prologue): Likewise.
15647 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15649 (arc_verify_short): Likewise.
15650 (arc_attr_type): Likewise.
15651 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15652 (walk_stores): Likewise.
15653 (arc_address_cost): Make it static.
15654 (arc_verify_short): Likewise.
15655 (branch_dest): Likewise.
15656 (arc_attr_type): Likewise.
15657 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15658 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15659 (arc_final_prescan_insn): Remove inserting the nops due to
15660 hardware hazards. It is done in reorg step.
15661 (insn_length_variant_t): Remove.
15662 (insn_length_parameters_t): Likewise.
15663 (arc_insn_length_parameters): Likewise.
15664 (arc_get_insn_variants): Likewise.
15665 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15667 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15669 PR inline-asm/84683
15670 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15673 PR tree-optimization/84687
15674 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15676 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15678 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15680 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15681 Rename to ppc_speculation_barrier.
15682 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15683 __builtin_ppc_speculation_barrier.
15685 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15688 * combine.c (combine_simplify_rtx): Don't try to simplify if
15689 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15692 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
15694 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15695 to 32 bytes when compiling for POWER9.
15697 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15700 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15701 regparm >= 3 with no arg reg available also for calls with
15702 flag_force_indirect_call. Pass decl to ix86_function_regparm.
15705 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15707 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
15709 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
15712 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15714 2018-03-05 Richard Biener <rguenther@suse.de>
15716 PR tree-optimization/84486
15717 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15718 When inserting a __builtin_assume_aligned call set the LHS
15719 SSA name alignment info accordingly.
15721 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
15723 PR tree-optimization/84114
15724 * config/aarch64/aarch64.c (aarch64_reassociation_width)
15725 Avoid reassociation of FLOAT_MODE addition.
15727 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
15729 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15730 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15731 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15732 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15733 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15734 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15735 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15737 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15738 __builtin_ia32_wbinvd): New builtins.
15739 (SPECIAL_ARGS2): New.
15740 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15741 (SPECIAL_ARGS2): New.
15742 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15743 (ix86_valid_target_attribute_inner_p): Ditto.
15744 (ix86_init_mmx_sse_builtins): Add special_args2.
15745 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15746 TARGET_WBNOINVD_P): New.
15747 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15748 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15749 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15750 * config/i386/immintrin.h (_wbinvd): New intrinsic.
15751 * config/i386/pconfigintrin.h: New file.
15752 * config/i386/wbnoinvdintrin.h: Ditto.
15753 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15755 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15757 2018-03-05 Richard Biener <rguenther@suse.de>
15759 PR tree-optimization/84670
15760 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15762 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15763 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15764 (compute_antic_aux): Only assert the number of values in ANTIC_IN
15765 doesn't grow if all successors (recursively) were visited at least
15768 2018-03-05 Richard Biener <rguenther@suse.de>
15770 PR tree-optimization/84650
15771 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15772 if executed in the loop pipeline.
15774 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
15776 * doc/configfiles.texi (Configuration Files): Move info about
15777 conditionalizing $target-protos.h to...
15778 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
15779 differs from $target-protos.h.
15781 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
15782 Chung-Ju Wu <jasonwucj@gmail.com>
15784 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15785 * config/nds32/nds32-multiple.md (setmemsi): Define.
15786 * config/nds32/nds32-memory-manipulation.c
15787 (nds32_gen_dup_4_byte_to_word_value): New.
15788 (emit_setmem_word_loop): New.
15789 (emit_setmem_byte_loop): New.
15790 (nds32_expand_setmem_loop): New.
15791 (nds32_expand_setmem_loop_v3m): New.
15792 (nds32_expand_setmem_unroll): New.
15793 (nds32_expand_setmem): New.
15795 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15796 Chung-Ju Wu <jasonwucj@gmail.com>
15798 * config/nds32/nds32-memory-manipulation.c
15799 (nds32_emit_load_store): New.
15800 (nds32_emit_post_inc_load_store): New.
15801 (nds32_emit_mem_move): New.
15802 (nds32_emit_mem_move_block): New.
15803 (nds32_expand_movmemsi_loop_unknown_size): New.
15804 (nds32_expand_movmemsi_loop_known_size): New.
15805 (nds32_expand_movmemsi_loop): New.
15806 (nds32_expand_movmemsi_unroll): New.
15807 (nds32_expand_movmemqi): Rename ...
15808 (nds32_expand_movmemsi): ... to this.
15809 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15810 (movmemsi): ... to this.
15811 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15812 (nds32_expand_movmemsi): ... to this.
15814 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15815 Monk Chiang <sh.chiang04@gmail.com>
15816 Chung-Ju Wu <jasonwucj@gmail.com>
15818 * config/nds32/nds32-protos.h
15819 (nds32_expand_load_multiple): New arguments.
15820 (nds32_expand_store_multiple): Ditto.
15821 (nds32_valid_multiple_load_store): Rename ...
15822 (nds32_valid_multiple_load_store_p): ... to this.
15823 * config/nds32/nds32-memory-manipulation.c
15824 (nds32_expand_load_multiple): Refine implementation.
15825 (nds32_expand_store_multiple): Ditto.
15826 * config/nds32/nds32-multiple.md
15827 (load_multiple): Update nds32_expand_load_multiple interface.
15828 (store_multiple): Update nds32_expand_store_multiple interface.
15829 * config/nds32/nds32-predicates.c
15830 (nds32_valid_multiple_load_store): Rename ...
15831 (nds32_valid_multiple_load_store_p): ... to this and refine
15833 * config/nds32/predicates.md
15834 (nds32_load_multiple_and_update_address_operation): New predicate.
15835 (nds32_store_multiple_and_update_address_operation): New predicate.
15837 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15838 Chung-Ju Wu <jasonwucj@gmail.com>
15840 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15841 (combo): New attribute.
15842 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15844 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
15846 * config/nds32/nds32.opt: Change -mcmodel= default value.
15848 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
15849 Monk Chiang <sh.chiang04@gmail.com>
15850 Chung-Ju Wu <jasonwucj@gmail.com>
15852 * config/nds32/constants.md (unspec_element): New enum.
15853 * config/nds32/constraints.md (Umw): New constraint.
15854 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15855 * config/nds32/nds32-intrinsic.md: Likewise.
15856 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15857 (nds32_valid_smw_lwm_base_p): New.
15858 (nds32_output_smw_single_word): New.
15859 (nds32_output_lmw_single_word): New.
15860 (nds32_expand_unaligned_load): New.
15861 (nds32_expand_unaligned_store): New.
15862 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15863 (nds32_output_smw_single_word): Declare.
15864 (nds32_output_lmw_single_word): Declare.
15865 (nds32_expand_unaligned_load): Declare.
15866 (nds32_expand_unaligned_store): Declare.
15867 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15868 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15869 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15870 NDS32_BUILTIN_UASTORE_DW.
15871 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15874 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
15875 Kito Cheng <kito.cheng@gmail.com>
15876 Chung-Ju Wu <jasonwucj@gmail.com>
15878 * config/nds32/nds32-intrinsic.c
15879 (nds32_expand_builtin_null_ftype_reg): Delete.
15880 (nds32_expand_builtin_reg_ftype_imm): Ditto.
15881 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15882 (nds32_read_argument): New.
15883 (nds32_legitimize_target): Ditto.
15884 (nds32_legitimize_argument): Ditto.
15885 (nds32_check_constant_argument): Ditto.
15886 (nds32_expand_unop_builtin): Ditto.
15887 (nds32_expand_unopimm_builtin): Ditto.
15888 (nds32_expand_binop_builtin): Ditto.
15889 (nds32_builtin_decl_impl): Ditto.
15890 (builtin_description): Ditto.
15891 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15892 (nds32_init_builtins_impl): Ditto.
15893 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15894 (nds32_builtin_decl): New.
15895 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15896 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15898 2018-03-02 Jeff Law <law@redhat.com>
15900 * reorg.c (stop_search_p): Handle DEBUG_INSN.
15901 (redundant_insn, fill_simple_delay_slots): Likewise.
15902 (fill_slots_from_thread): Likewise.
15903 * resource.c (mark_referenced_resources): Likewise.
15904 (mark_set_resources, find_dead_or_set_registers): Likewise.
15906 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15908 * substring-locations.h (format_warning_va): Formatting fix for
15909 ATTRIBUTE_GCC_DIAG.
15910 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15912 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15913 * substring-locations.c: Include intl.h.
15914 (format_warning_va): Turned into small wrapper around
15915 format_warning_n_va, renamed to ...
15916 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15917 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15919 (format_warning_at_substring_n): New function.
15920 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15921 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
15922 format_warning_at_substring with just a shorter name instead of
15923 const function pointer.
15924 (fmtwarn_n): New function.
15925 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15926 appropriate, get rid of all the fmtstr temporaries, move conditionals
15927 with G_() wrapped string literals directly into fmtwarn arguments,
15928 cast dir.len to (int), formatting fixes.
15930 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
15932 * doc/invoke.texi: Remove "Cilk Plus" references.
15934 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15935 Richard Biener <rguenther@suse.de>
15938 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15939 for error or warning attributes if CALL_FROM_THUNK_P is set.
15942 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15945 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15946 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15949 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15950 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15952 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15953 instead of -1U in last predictors element's probability member.
15955 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15958 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15959 arguments if they are comparable.
15961 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15963 PR tree-optimization/84634
15964 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15965 masks and masked_loop_p with a single loop_masks, making sure it's
15966 null for bb vectorization.
15968 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15970 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15971 (vect_analyze_data_ref_access): Use loop->safe_len rather than
15972 loop->force_vectorize to check whether there is no alias.
15974 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15977 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15979 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15981 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15982 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15983 instead of a loop around prev_real_insn.
15984 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15987 PR inline-asm/84625
15988 * config/i386/i386.c (ix86_print_operand): Use conditional
15989 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15992 2018-03-02 Richard Biener <rguenther@suse.de>
15994 PR tree-optimization/84427
15995 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15996 (bitmap_set_subtract_values): Rewrite to handle multiple
15999 (prune_clobbered_mems): Likewise.
16000 (phi_translate): Take edge instead of pred/phiblock.
16001 (phi_translate_1): Likewise.
16002 (phi_translate_set): Likewise. Insert all translated
16003 exprs for a value into the set, keeping possibly multiple
16004 expressions per value.
16005 (compute_antic_aux): Adjust for phi_translate changes.
16006 When intersecting union the expressions and prune those
16007 not in the final value set, keeping possibly multiple
16008 expressions per value. Do not use value-insertion
16009 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
16010 all expressions. Add verification that the value-sets
16011 only shrink during iteration.
16012 (compute_partial_antic_aux): Adjust for the phi_translate changes.
16013 (do_pre_regular_insertion): Likewise.
16014 (do_pre_partial_partial_insertion): Likewise.
16016 2018-03-02 Richard Biener <rguenther@suse.de>
16019 * config/darwin.c (saved_debug_info_level): New static global.
16020 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16021 (darwin_asm_lto_end): Restore debug info generation settings.
16023 2018-03-01 Martin Liska <mliska@suse.cz>
16026 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16027 volatile arguments.
16029 2018-03-01 Richard Biener <rguenther@suse.de>
16032 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16033 type annotation with LTO when debug was disabled at compile-time.
16035 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16037 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16039 (mips_final_postscan_insn): Likewise.
16041 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16043 PR rtl-optimization/84528
16044 * alias.c (init_alias_target): Add commentary.
16045 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16046 a unique base value if the frame pointer is not eliminated
16047 to the stack pointer.
16049 2018-03-01 Tom de Vries <tom@codesourcery.com>
16051 PR rtl-optimization/83327
16052 * lra-int.h (hard_regs_spilled_into): Declare.
16053 * lra.c (hard_regs_spilled_into): Define.
16054 (init_reg_info): Init hard_regs_spilled_into.
16055 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16056 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16057 (process_bb_lives): Handle hard_regs_spilled_into.
16058 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16059 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16061 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16063 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16064 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16065 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16066 * config/rs6000/aix72.h: New file.
16068 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16070 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16071 instead of warning_at with conditional singular and plural messages
16075 * stor-layout.c (update_alignment_for_field): For
16076 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16077 && !DECL_PACKED (field), do the alignment update, just use
16078 only desired_align instead of MAX (type_align, desired_align)
16080 (place_field): Don't do known_align < desired_align handling
16081 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16082 is non-NULL, instead do it after rli->prev_field handling and
16083 only if not within a bitfield word. For DECL_PACKED (field)
16084 use type_align of BITS_PER_UNIT.
16086 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16088 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16089 superfluous parentheses and trailing spaces.
16091 2018-02-28 Richard Biener <rguenther@suse.de>
16093 PR tree-optimization/84584
16094 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16095 SCoPs with fake exit edge.
16097 2018-02-28 Martin Liska <mliska@suse.cz>
16100 * timevar.c (timer::print): Fix format to properly print 100%
16103 2018-02-28 Richard Biener <rguenther@suse.de>
16105 PR middle-end/84607
16106 * genmatch.c (capture_info::walk_match): Do not mark
16107 captured expressions without operands as expr_p given
16108 they act more like predicates and should be subject to
16109 "lost tail" side-effect preserving.
16111 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16113 PR rtl-optimization/81611
16114 * auto-inc-dec.c (attempt_change): Move dead note from
16115 mem_insn if it's the next use of regno
16116 (find_address): Take address use of reg holding
16117 non-incremented value. Add parm to limit search to the named
16119 (merge_in_block): Attempt to use a mem insn that is the next
16120 use of the original regno.
16122 2018-02-27 Martin Sebor <msebor@redhat.com>
16125 * doc/invoke.texi (-Wmissing-attributes): New option.
16126 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16128 2018-02-27 Martin Sebor <msebor@redhat.com>
16130 PR translation/84207
16131 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16132 n argument to unsigned HOST_WIDE_INT.
16133 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16134 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16135 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16136 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16138 2018-02-27 Richard Biener <rguenther@suse.de>
16140 PR tree-optimization/84512
16141 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16142 Do not use the estimate returned from record_stmt_cost for
16143 the scalar iteration cost but sum properly using add_stmt_cost.
16145 2018-02-27 Richard Biener <rguenther@suse.de>
16147 PR tree-optimization/84466
16148 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16149 Adjust last change to less strictly validate use operands.
16151 2018-02-27 Martin Liska <mliska@suse.cz>
16153 PR gcov-profile/84548
16154 * gcov.c (process_file): Allow partial overlap and consider it
16155 also as group functions.
16156 (output_lines): Properly calculate range of lines for a group.
16158 2018-02-27 Martin Liska <mliska@suse.cz>
16160 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16161 'ggc' suffixes. Change first column width.
16162 (timer::print): Fix formatting of the column.
16164 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16166 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16167 preserve inline entry blocks for the sake of debug inline
16168 entry point markers alone.
16169 (remove_unused_locals): Suggest in comments a better place to
16170 force the preservation of inline entry blocks that are
16171 otherwise unused, but do not preserve them.
16173 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16175 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16177 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16180 * config/i386/constraints.md (Bs): Replace
16181 ix86_indirect_branch_register with
16182 TARGET_INDIRECT_BRANCH_REGISTER.
16184 * config/i386/i386.md (indirect_jump): Likewise.
16185 (tablejump): Likewise.
16186 (*sibcall_memory): Likewise.
16187 (*sibcall_value_memory): Likewise.
16188 Peepholes of indirect call and jump via memory: Likewise.
16189 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16190 (*sibcall_value_GOT_32): Likewise.
16191 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16192 (GOT_memory_operand): Likewise.
16193 (call_insn_operand): Likewise.
16194 (sibcall_insn_operand): Likewise.
16195 (GOT32_symbol_operand): Likewise.
16196 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16198 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16200 PR rtl-optimization/83496
16201 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16202 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16203 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16204 redundant insn, if any.
16205 (relax_delay_slots): Likewise.
16206 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16208 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16210 PR tree-optimization/83965
16211 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16212 that grouped statements are part of a reduction chain. Return
16213 true if the statement is not marked as a reduction itself but
16214 is part of a group.
16215 (vect_recog_dot_prod_pattern): Don't check whether the statement
16216 is part of a group here.
16217 (vect_recog_sad_pattern): Likewise.
16218 (vect_recog_widen_sum_pattern): Likewise.
16220 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16223 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16225 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16228 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16230 (ix86_output_indirect_function_return): New prototype.
16231 (ix86_split_simple_return_pop_internal): Likewise.
16232 * config/i386/i386.c (indirect_return_via_cx): New.
16233 (indirect_return_via_cx_bnd): Likewise.
16234 (indirect_thunk_name): Handle return va CX_REG.
16235 (output_indirect_thunk_function): Create alias for
16236 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16237 (ix86_output_indirect_jmp): Remove the bool argument.
16238 (ix86_output_indirect_function_return): New function.
16239 (ix86_split_simple_return_pop_internal): Likewise.
16240 * config/i386/i386.md (*indirect_jump): Don't pass false
16241 to ix86_output_indirect_jmp.
16242 (*tablejump_1): Likewise.
16243 (simple_return_pop_internal): Change it to define_insn_and_split.
16244 Call ix86_split_simple_return_pop_internal to split it for
16245 -mfunction-return=.
16246 (simple_return_indirect_internal): Call
16247 ix86_output_indirect_function_return instead of
16248 ix86_output_indirect_jmp.
16250 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16253 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16254 memset and value initialization afterwards.
16256 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16258 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16260 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16263 * common/config/aarch64/aarch64-common.c
16264 (aarch_option_optimization_table[]): Switch
16265 off fomit-frame-pointer
16267 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16268 Chung-Ju Wu <jasonwucj@gmail.com>
16270 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16272 (store_multiple): Ditto.
16274 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16276 * config.gcc: Add --with-cpu support for nds32 target.
16277 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16278 * config/nds32/nds32.opt: Add -mcpu= option.
16280 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16282 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16283 isel=yes): Warn for these deprecated options.
16285 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16287 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16288 ISA_2_5_MASKS_EMBEDDED.
16290 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16292 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16293 p->max as pointers rather than using iterative_hash_expr.
16295 2018-02-23 Carl Love <cel@us.ibm.com>
16297 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16298 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16300 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16301 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16302 P8V_BUILTIN_VEC_VUNSIGNED2.
16304 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16307 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16308 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16310 * lra-constraints.c (curr_insn_transform): Set up
16311 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16313 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16314 * lra-eliminations.c (spill_pseudos): Ditto.
16315 (process_insn_for_elimination): Ditto.
16316 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16317 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16318 LRA_NON_CLOBBERED_ALT.
16320 2018-02-22 Martin Sebor <msebor@redhat.com>
16322 PR tree-optimization/84480
16323 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16324 to maybe_diag_stxncpy_trunc. Call it.
16325 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16326 from gimple_fold_builtin_strcpy. Print inlining stack.
16327 (handle_builtin_stxncpy): Print inlining stack.
16328 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16330 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16333 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16334 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16335 and -fcheck-pointer-bounds are used together.
16336 (indirect_thunk_prefix): New enum.
16337 (indirect_thunk_need_prefix): New function.
16338 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16339 "_nt" instead of "_bnd" for NOTRACK prefix.
16340 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16341 (output_indirect_thunk_function): Likewise.
16343 (ix86_code_end): Update output_indirect_thunk_function calls.
16344 (ix86_output_indirect_branch_via_reg): Replace
16345 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16346 (ix86_output_indirect_branch_via_push): Likewise.
16347 (ix86_output_function_return): Likewise.
16348 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16349 incompatible with -fcf-protection=branch and
16350 -fcheck-pointer-bounds.
16352 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16355 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16356 Change gcc_assert call to output_operand_lossage.
16358 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16360 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16362 2018-02-22 DJ Delorie <dj@redhat.com>
16363 Sebastian Perta <sebastian.perta@renesas.com>
16364 Oleg Endo <olegendo@gcc.gnu.org>
16366 * config/rx/rx.c (rx_rtx_costs): New function.
16367 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16369 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16371 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16373 2018-02-22 Martin Liska <mliska@suse.cz>
16376 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16377 Add "native" as a possible value.
16379 2018-02-22 Martin Liska <mliska@suse.cz>
16382 * config/i386/i386.c (ix86_option_override_internal):
16383 Add "native" as a possible value for -march and -mtune.
16385 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16388 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16389 to all type variants.
16391 PR tree-optimization/84503
16392 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16393 width as info->bitpos + info->bitsize - start.
16394 (merged_store_group::merge_overlapping): Simplify width computation.
16395 (check_no_overlap): New function.
16396 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16397 start + width and last_order of the group, fail if check_no_overlap
16399 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16400 to group if check_no_overlap fails.
16402 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16404 * config/rs6000/altivec.md: Delete contraint arguments to
16405 define_expand, define_split, and define_peephole2, and in
16406 define_insn_and_split if always unused.
16407 * config/rs6000/darwin.md: Ditto.
16408 * config/rs6000/dfp.md: Ditto.
16409 * config/rs6000/rs6000.md: Ditto.
16410 * config/rs6000/sync.md: Ditto.
16411 * config/rs6000/vector.md: Ditto.
16412 * config/rs6000/vsx.md: Ditto.
16414 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16416 * config/rs6000/altivec.md: Write output control strings as braced
16417 blocks instead of double-quoted strings.
16418 * config/rs6000/darwin.md: Ditto.
16419 * config/rs6000/rs6000.md: Ditto.
16420 * config/rs6000/vector.md: Ditto.
16421 * config/rs6000/vsx.md: Ditto.
16423 2018-02-21 Jason Merrill <jason@redhat.com>
16425 PR c++/84314 - ICE with templates and fastcall attribute.
16426 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16428 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16430 * ipa-cp.c (determine_versionability): Fix comment typos.
16432 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16435 * ipa-cp.c (determine_versionability): Do not version functions caling
16438 2018-02-21 Martin Liska <mliska@suse.cz>
16441 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16442 Add "native" as a possible value.
16443 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16444 the macro when native cpu detection is available.
16446 2018-02-21 Martin Liska <mliska@suse.cz>
16449 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16450 Add "native" as a possible value.
16451 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16452 when native cpu detection is available.
16454 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16455 Martin Sebor <msebor@redhat.com>
16457 PR tree-optimization/84478
16458 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16460 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16461 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16462 support which is conservatively correct, for 2 only stay conservative
16463 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16464 argument to the 2 argument get_range_strlen, adjust 6 arg
16465 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16467 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16468 (gimple_fold_builtin_strlen): Pass true as last argument to
16471 2018-02-20 Martin Sebor <msebor@redhat.com>
16473 PR middle-end/84095
16474 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16475 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16476 (builtin_memref::builtin_memref): Factor out parts into
16477 set_base_and_offset and call it.
16479 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16481 PR middle-end/84406
16482 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16483 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16484 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16485 search at the associated MODE_INT.
16487 2018-02-20 Jeff Law <law@redhat.com>
16489 PR middle-end/82123
16490 PR tree-optimization/81592
16491 PR middle-end/79257
16492 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16493 for range data rather than using global data.
16494 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16495 range data rather than using global data.
16496 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16497 pass it to children as needed.
16498 (struct directive::fmtresult): Similarly.
16499 (struct directive::set_width): Similarly.
16500 (struct directive::set_precision): Similarly.
16501 (format_integer, format_directive, parse_directive): Similarly.
16502 (format_none): Accept unnamed vr_values parameter.
16503 (format_percent, format_floating, format_character): Similarly.
16504 (format_string, format_plain): Similarly.
16505 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16506 the EVRP range analyzer for range data rather than using global data.
16507 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16508 gimple-ssa-evrp-analyze.h
16509 (class sprintf_dom_walker): Add after_dom_children member function.
16510 Add evrp_range_analyzer member.
16511 (sprintf_dom_walker::before_dom_children): Call into the EVRP
16512 range analyzer as needed.
16513 (sprintf_dom_walker::after_dom_children): New member function.
16514 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16516 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16517 (evrp_range_analyzer::pop_to_marker): Likewise.
16519 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16521 PR tree-optimization/84419
16522 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16523 with the required type if its current type is compatible but
16526 2018-02-20 Jakub Jelinek <jakub@redhat.com>
16528 PR middle-end/82004
16529 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16530 after vectorization.
16532 2018-02-20 Martin Liska <mliska@suse.cz>
16535 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16536 possible values if we don't have a hint.
16538 2018-02-20 Martin Liska <mliska@suse.cz>
16542 * final.c (shorten_branches): Build align_tab array with one
16544 * opts.c (finish_options): Add alignment option limit check.
16545 (MAX_CODE_ALIGN): Likewise.
16546 (MAX_CODE_ALIGN_VALUE): Likewise.
16547 * doc/invoke.texi: Document maximum allowed option value for
16548 all -falign-* options.
16550 2018-02-19 Jakub Jelinek <jakub@redhat.com>
16553 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16554 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16555 * var-tracking.c (emit_note_insn_var_location): Remove all references
16556 to NOTE_INSN_CALL_ARG_LOCATION.
16557 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16558 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16559 Use copy_rtx_if_shared.
16560 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16561 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16562 (dwarf2out_var_location): Remove handling of
16563 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16565 * final.c (final_scan_insn): Remove all references to
16566 NOTE_INSN_CALL_ARG_LOCATION.
16567 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
16568 before dumping final insns.
16569 * except.c (emit_note_eh_region_end): Remove all references to
16570 NOTE_INSN_CALL_ARG_LOCATION.
16571 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16572 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16573 * config/arc/arc.c (hwloop_optimize): Likewise.
16574 * config/arm/arm.c (create_fix_barrier): Likewise.
16575 * config/s390/s390.c (s390_chunkify_start): Likewise.
16576 * config/sh/sh.c (find_barrier): Likewise.
16577 * config/i386/i386.c (rest_of_insert_endbranch,
16578 ix86_seh_fixup_eh_fallthru): Likewise.
16579 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16580 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16581 * config/frv/frv.c (frv_function_prologue): Likewise.
16582 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
16584 (note_outside_basic_block_p): Remove all references to
16585 NOTE_INSN_CALL_ARG_LOCATION.
16586 * gengtype.c (adjust_field_rtx_def): Likewise.
16587 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16589 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16590 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16593 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16596 PR tree-optimization/84452
16597 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16598 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16601 2018-02-19 Martin Liska <mliska@suse.cz>
16604 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16606 2018-02-19 Martin Liska <mliska@suse.cz>
16607 Richard Sandiford <richard.sandiford@linaro.org>
16609 PR tree-optimization/82491
16610 * gimple-fold.c (get_base_constructor): Make earlier bail out
16613 2018-02-19 Carl Love <cel@us.ibm.com>
16615 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16616 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16618 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16619 P8V_BUILTIN_VEC_NEG.
16621 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16623 * config/rl78/rl78.md (movdf): New define expand.
16625 2018-02-19 Martin Liska <mliska@suse.cz>
16628 * doc/invoke.texi: Fix typo.
16629 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16631 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16633 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16634 handle rs6000_single_float and rs6000_double_float specially for
16637 2018-02-16 Jeff Law <law@redhat.com>
16639 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16640 (pop_regs): Use it.
16642 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16645 * ipa-inline.c (inline_small_functions): Fix a typo.
16647 2018-02-16 Nathan Sidwell <nathan@acm.org>
16649 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16651 2018-02-16 Carl Love <cel@us.ibm.com>
16653 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16654 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16655 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16656 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16657 expansion to P8V_BUILTIN_VEC_FLOAT2.
16659 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16661 PR rtl-optimization/70023
16662 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16663 src_regno into account.
16665 2018-02-16 Carl Love <cel@us.ibm.com>
16667 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16668 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16669 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16670 * config/rs6000/rs6000.c: Remove case statements for
16671 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16672 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16673 and P9V_BUILTIN_VEC_VINSERT4B.
16674 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16675 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16676 * config/rs6000/vsx.md:
16677 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16680 2018-02-16 Carl Love <cel@us.ibm.com>
16682 * config/rs6000/altivec.h: Add builtin names vec_extract4b
16684 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16686 * config/rs6000/rs6000-c.c: Add the definitions for
16687 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16688 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16689 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16690 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
16691 definition for insert4b and define insn *insert3b_internal.
16692 * doc/extend.texi: Add documentation for vec_extract4b.
16694 2018-02-16 Nathan Sidwell <nathan@acm.org>
16696 * doc/extend.texi (Backwards Compatibility): Mention friend
16697 injection. Note for-scope is deprecated.
16698 * doc/invoke.texi (-ffriend-injection): Deprecate.
16700 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
16702 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16703 that moved to I2, also allow destinations that are a paradoxical
16704 subreg (instead of a normal reg).
16706 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
16709 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16712 2018-02-16 Richard Biener <rguenther@suse.de>
16714 PR tree-optimization/84037
16715 PR tree-optimization/84016
16717 * config/i386/i386.c (ix86_builtin_vectorization_cost):
16718 Adjust vec_construct for the fact we need additional higher latency
16719 128bit inserts for AVX256 and AVX512 vector builds.
16720 (ix86_add_stmt_cost): Scale vector construction cost for
16723 2018-02-16 Richard Biener <rguenther@suse.de>
16725 PR tree-optimization/84417
16726 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16727 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16728 (non_rewritable_lvalue_p): Likewise, use poly-ints.
16730 2018-02-16 Martin Liska <mliska@suse.cz>
16733 * internal-fn.def (ASAN_CHECK): Set proper flags.
16734 (ASAN_MARK): Likewise.
16736 2018-02-16 Julia Koval <julia.koval@intel.com>
16738 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16739 from PTA_CANNONLAKE.
16741 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16744 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16745 Use ++iter rather than iter++ for std::list iterators.
16746 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
16747 defer deleting them until all nodes in the forest are processed. Do
16748 free even leaf nodes. Change to_process into auto_vec.
16751 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16752 * vec.h (vec_default_construct): Use memset instead of placement new
16753 if BROKEN_VALUE_INITIALIZATION is defined.
16754 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16755 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16758 PR rtl-optimization/83723
16759 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16760 * lra.c (lra_substitute_pseudo): Likewise. If true, use
16761 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
16763 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16765 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16767 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
16769 PR rtl-optimization/81443
16770 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16771 from inner REGs to paradoxical SUBREGs.
16773 2018-02-16 Richard Biener <rguenther@suse.de>
16775 PR tree-optimization/84399
16776 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16777 For operands we can analyze at their definition make sure we can
16778 analyze them at each use as well.
16780 2018-02-16 Richard Biener <rguenther@suse.de>
16782 PR tree-optimization/84190
16783 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16784 volatile accesses if the decl isn't volatile.
16786 2018-02-15 Jason Merrill <jason@redhat.com>
16788 PR c++/84314 - ICE with templates and fastcall attribute.
16789 * attribs.c (build_type_attribute_qual_variant): Don't clobber
16790 TYPE_CANONICAL on an existing type.
16792 2018-02-15 Jakub Jelinek <jakub@redhat.com>
16794 PR tree-optimization/84383
16795 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16796 dstoff nor call operand_equal_p if dstbase is NULL.
16798 PR tree-optimization/84334
16799 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16800 also a CONSTANT_CLASS_P, punt.
16802 2018-02-14 Jim Wilson <jimw@sifive.com>
16804 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16805 first SMALL_OPERAND check. New local min_second_step. Move assert
16806 to where locals are set. Add TARGET_RVC support.
16807 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16809 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
16811 * doc/invoke.texi: Correct -Wformat-overflow code sample.
16813 2018-02-14 Martin Sebor <msebor@redhat.com>
16815 PR tree-optimization/83698
16816 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16817 arrays constrain the offset range to their bounds.
16818 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16819 (builtin_access::overlap): Avoid setting the size of overlap if it's
16821 (maybe_diag_overlap): Also consider arrays when deciding what values
16822 of offsets to include in diagnostics.
16824 2018-02-14 Martin Sebor <msebor@redhat.com>
16827 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16828 that correspond to the kind of a declaration.
16830 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
16833 * config/pa/pa.md: Load address of PIC label using the linkage table
16834 if the label is nonlocal.
16836 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
16838 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16839 warning message if user requests -maltivec=be.
16840 * doc/invoke.texi: Document deprecation of -maltivec=be.
16842 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
16845 * config/rs6000/rs6000-c.c: Update definitions for
16846 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16847 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16849 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16852 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16853 add _get_ssp intrinsics. Remove argument from
16854 __builtin_ia32_rdssp[d|q].
16855 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16856 * config/i386/i386-builtin.def: Remove argument from
16857 __builtin_ia32_rdssp[d|q].
16858 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16859 ix86_expand_special_args_builtin for _rdssp[d|q].
16860 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16861 Clear register before usage.
16862 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16863 Add documentation for new _get_ssp and _inc_ssp intrinsics.
16865 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
16867 PR tree-optimization/84357
16868 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16869 operand 1 of an ARRAY_REF too.
16871 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
16874 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16875 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16877 (set_of_reg): New struct.
16878 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16879 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16880 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16882 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16883 Split into bitclr, bitset, bitinvert patterns if appropriate.
16884 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16885 use rx_fuse_in_memory_bitop.
16886 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16887 to named insn, correct maximum insn length.
16889 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
16892 * machmode.def: Define a complex mode for PARTIAL_INT.
16893 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16895 * doc/rtl.texi: Document CSPImode.
16896 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16898 (msp430_hard_regno_nregs_with_padding): Likewise.
16900 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
16903 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16905 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
16907 PR rtl-optimization/84169
16908 * combine.c (try_combine): New variable split_i2i3. Set it to true if
16909 we generated a parallel as new i3 and we split that to new i2 and i3
16910 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
16911 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
16912 those to i2, not i1. Partially rewrite this scan code.
16914 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16917 * stor-layout.c (place_field): For variable length fields, adjust
16918 offset_align afterwards not just based on the field's alignment,
16919 but also on the size.
16921 PR middle-end/84309
16922 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16923 of exps and logs in the use_exp2 case.
16925 2018-02-13 Jeff Law <law@redhat.com>
16927 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16928 entry for "vector".
16930 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16933 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
16937 * common.opt (gas-loc-support, gas-locview-support): New.
16938 (ginline-points, ginternal-reset-location-views): New.
16939 * doc/invoke.texi: Document them. Use @itemx where intended.
16940 (gvariable-location-views): Adjust.
16941 * target.def (reset_location_view): New.
16942 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16943 (TARGET_RESET_LOCATION_VIEW): New.
16944 * doc/tm.texi: Rebuilt.
16945 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16946 (dwarf2out_default_as_locview_support): New.
16947 (output_asm_line_debug_info): Use option variables.
16948 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16949 (output_loc_list): Likewise.
16950 (add_high_low_attributes): Check option variables.
16951 Don't output entry view attribute in strict mode.
16952 (gen_inlined_subroutine_die): Check option variables.
16953 (dwarf2out_inline_entry): Likewise.
16954 (init_sections_and_labels): Likewise.
16955 (dwarf2out_early_finish): Likewise.
16956 (maybe_reset_location_view): New, from...
16957 (dwarf2out_var_location): ... here. Call it.
16958 * debug.h (dwarf2out_default_as_loc_support): Declare.
16959 (dwarf2out_default_as_locview_support): Declare.
16960 * hooks.c (hook_int_rtx_insn_0): New.
16961 * hooks.h (hook_int_rtx_insn_0): Declare.
16962 * toplev.c (process_options): Take -gas-loc-support and
16963 -gas-locview-support from dwarf2out. Enable
16964 -gvariable-location-views by default only with locview
16965 assembler support. Enable -ginternal-reset-location-views by
16966 default only if the target defines the corresponding hook.
16967 Enable -ginline-points by default if location views are
16968 enabled; force it disabled if statement frontiers are
16970 * tree-inline.c (expand_call_inline): Check option variables.
16971 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16973 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
16975 PR tree-optimization/84321
16976 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16977 handling. Also check whether the anti-range contains any values
16978 that satisfy the mask; switch to a VR_RANGE if not.
16980 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
16983 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16985 2018-02-13 Martin Jambor <mjambor@suse.cz>
16988 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16989 of call statements, also set location of a load to a temporary.
16991 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
16993 * config/rl78/rl78.c (add_vector_labels): New function.
16994 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16995 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16996 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16997 which checks that no arguments are passed.
16998 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16999 * doc/extend.texi: Documentation for the new attribute.
17001 2018-02-13 Andreas Schwab <schwab@suse.de>
17003 * config/riscv/linux.h (CPP_SPEC): Define.
17005 2018-02-13 Jakub Jelinek <jakub@redhat.com>
17008 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
17009 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
17010 OPTION_MASK_ISA_AES as first argument to def_builtin_const
17011 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
17012 instead of OPTION_MASK_ISA_PCLMUL as first argument to
17013 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
17014 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17015 temporarily for AES and PCLMUL builtins.
17017 PR tree-optimization/84339
17018 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17019 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17022 PR middle-end/84309
17023 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17024 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17025 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17027 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17029 * omp-simd-clone.h: New file.
17030 * omp-simd-clone.c: Include omp-simd-clone.h.
17031 (expand_simd_clones): No longer static.
17032 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17033 cgraph.h and omp-simd-clone.h.
17034 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17035 (vect_recog_widen_shift_pattern): Formatting fix.
17036 (vect_pattern_recog_1): Don't check optab for calls.
17039 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17040 operands[2] into a REG before using gen_lowpart on it.
17042 2018-02-12 Jeff Law <law@redhat.com>
17045 * config/sh/sh.c (find_barrier): Consider a sibling call
17048 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17049 successfully back substituting a reg.
17051 2018-02-12 Richard Biener <rguenther@suse.de>
17053 PR tree-optimization/84037
17054 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17055 parameter, move visited init to caller.
17056 (vect_slp_analyze_operations): Separate cost from validity
17057 check, initialize visited once for all instances.
17058 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17060 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17062 (vect_model_promotion_demotion_cost): Likewise.
17063 (vectorizable_bswap): Guard cost modeling with !slp_node
17064 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17066 (vectorizable_call): Likewise.
17067 (vectorizable_conversion): Likewise.
17068 (vectorizable_assignment): Likewise.
17069 (vectorizable_shift): Likewise.
17070 (vectorizable_operation): Likewise.
17071 (vectorizable_store): Likewise.
17072 (vectorizable_load): Likewise.
17073 (vectorizable_condition): Likewise.
17074 (vectorizable_comparison): Likewise.
17076 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17079 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17080 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17081 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17083 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17085 PR middle-end/83665
17086 * params.def (inline-min-speedup): Increase from 8 to 15.
17087 (max-inline-insns-auto): Decrease from 40 to 30.
17088 * ipa-split.c (consider_split): Add some buffer for function to
17089 be considered inlining candidate.
17090 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17093 2018-02-12 Richard Biener <rguenther@suse.de>
17095 PR tree-optimization/84037
17096 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17097 matched stmts if we cannot swap the non-matched ones.
17099 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17101 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17102 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17103 _mm_maskz_scalef_round_ss): New intrinsics.
17104 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17105 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17106 __builtin_ia32_scalefss_round): Remove.
17107 (__builtin_ia32_scalefsd_mask_round,
17108 __builtin_ia32_scalefss_mask_round): New intrinsics.
17109 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17110 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17111 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17112 "<round_constraint>")): Changed to ...
17113 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17114 "<round_scalar_constraint>")): ... this.
17115 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17116 %0, %1, %2<round_op3>}"): Changed to ...
17117 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17118 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17119 %2<round_scalar_mask_op3>}"): ... this.
17120 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17122 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17124 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17125 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17126 (_mm_maskz_sqrt_round_ss): New intrinsics.
17127 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17128 (__builtin_ia32_sqrtsd_mask_round)
17129 (__builtin_ia32_sqrtss_mask_round): New builtins.
17130 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17131 (__builtin_ia32_sqrtss_round): Remove.
17132 (__builtin_ia32_sqrtsd_mask_round)
17133 (__builtin_ia32_sqrtss_mask_round): New builtins.
17134 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17135 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17136 ((match_operand:VF_128 1 "vector_operand"
17137 "xBm,<round_constraint>")): Changed to ...
17138 ((match_operand:VF_128 1 "vector_operand"
17139 "xBm,<round_scalar_constraint>")): ... this.
17140 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17141 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17142 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17143 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17144 %<iptr>1<round_scalar_mask_op3>}): ... this.
17145 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17146 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17148 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17151 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17152 Cast vec_cmpeq result to correct type.
17153 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17154 Cast vec_cmpgt result to correct type.
17156 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17158 * final.c (final_scan_insn_1): Renamed from...
17159 (final_scan_insn): ... this. New wrapper, to recover
17160 seen from the outermost call in recursive ones.
17161 * config/sparc/sparc.c (output_return): Drop seen from call.
17162 (output_sibcall): Likewise.
17163 * config/visium/visium.c (output_branch): Likewise.
17165 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17167 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17170 2018-02-10 Alan Modra <amodra@gmail.com>
17173 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17174 Specify LR as an input.
17176 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17179 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17180 remove_member_access_dummy_vars): New functions.
17181 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17182 lower_omp_1, execute_lower_omp): Use them.
17184 PR rtl-optimization/84308
17185 * shrink-wrap.c (spread_components): Release todo vector.
17187 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17189 PR rtl-optimization/57193
17190 * ira-color.c (struct allocno_color_data): Add member
17191 conflict_allocno_hard_prefs.
17192 (update_conflict_allocno_hard_prefs): New.
17193 (bucket_allocno_compare_func): Add a preference based on
17194 conflict_allocno_hard_prefs.
17195 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17196 (color_allocnos): Remove a dead code. Initiate
17197 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17199 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17202 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17203 constraint from =wa to wa. Avoid a subreg on the output operand,
17204 instead use a pseudo and subreg it in a move.
17205 (p9_xxbrd_<mode>): Changed to ...
17206 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17207 (p9_xxbrd_v2df): New expander.
17208 (p9_xxbrw_<mode>): Changed to ...
17209 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17210 (p9_xxbrw_v4sf): New expander.
17212 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17214 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17216 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17219 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17220 multiply in 32-bit mode.
17221 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17222 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17225 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17227 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17228 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17229 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17230 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17232 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17235 * dwarf2out.c (is_trivial_indirect_ref): New function.
17236 (dwarf2out_late_global_decl): Do not generate a location
17237 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17238 and that are not defined in the current unit.
17240 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17242 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17243 instead of a libcall for UNORDERED.
17245 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17248 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17249 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17251 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17254 * config/s390/s390.c (s390_set_current_function): Invoke
17255 s390_indirect_branch_settings also if fndecl didn't change.
17257 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17259 * config/rs6000/rs6000.md (blockage): Set length to zero.
17261 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17263 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17265 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17268 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17269 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17273 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17274 PARALLEL incoming that failed vt_get_decl_and_offset check.
17276 PR middle-end/84237
17277 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17278 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17280 (get_variable_section): For decls in named .bss* sections pass true as
17281 second argument to bss_initializer_p.
17283 2018-02-09 Marek Polacek <polacek@redhat.com>
17284 Jakub Jelinek <jakub@redhat.com>
17287 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17288 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17289 Sync some changes from cxx_fold_indirect_ref.
17291 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17293 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17295 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17296 (BLOCK_INLINE_ENTRY_LABEL): New.
17297 (dwarf2out_var_location): Disregard inline entry markers.
17298 (inline_entry_data): New struct.
17299 (inline_entry_data_hasher): New hashtable type.
17300 (inline_entry_data_hasher::hash): New.
17301 (inline_entry_data_hasher::equal): New.
17302 (inline_entry_data_table): New variable.
17303 (add_high_low_attributes): Add DW_AT_entry_pc and
17304 DW_AT_GNU_entry_view attributes if a pending entry is found
17305 in inline_entry_data_table. Add old entry_pc attribute only
17306 if debug nonbinding markers are disabled.
17307 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17308 markers are enabled.
17309 (block_within_block_p, dwarf2out_inline_entry): New.
17310 (dwarf2out_finish): Check that no entries remained in
17311 inline_entry_data_table.
17312 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17313 (final_scan_insn, notice_source_line): Likewise.
17314 (rest_of_clean_state): Skip inline entry markers.
17315 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17317 * gimple.c (gimple_build_debug_inline_entry): New.
17318 * gimple.h (enum gimple_debug_subcode): Add
17319 GIMPLE_DEBUG_INLINE_ENTRY.
17320 (gimple_build_debug_inline_entry): Declare.
17321 (gimple_debug_inline_entry_p): New.
17322 (gimple_debug_nonbind_marker_p): Adjust.
17323 * insn-notes.def (INLINE_ENTRY): New.
17324 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17325 inline entry marker notes.
17326 (print_insn): Likewise.
17327 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17328 (INSN_DEBUG_MARKER_KIND): Likewise.
17329 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17330 * tree-inline.c (expand_call_inline): Build and insert
17331 debug_inline_entry stmt.
17332 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17333 inline entry blocks early, if nonbind markers are enabled.
17334 (dump_scope_block): Dump fragment info.
17335 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17336 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17337 (gimple_build_debug_inline_entry): New.
17338 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17339 Enable/disable inline entry points too.
17340 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17341 (DEBUG_INSN): Describe inline entry markers.
17343 * common.opt (gvariable-location-views): New.
17344 (gvariable-location-views=incompat5): New.
17345 * config.in: Rebuilt.
17346 * configure: Rebuilt.
17347 * configure.ac: Test assembler for view support.
17348 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17349 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17350 * dwarf2out.c (var_loc_view): New typedef.
17351 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17352 (dwarf2out_locviews_in_attribute): New.
17353 (dwarf2out_locviews_in_loclist): New.
17354 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17355 (enum dw_line_info_opcode): Add LI_adv_address.
17356 (struct dw_line_info_table): Add view.
17357 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17358 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17359 (zero_view_p): New variable.
17360 (ZERO_VIEW_P): New macro.
17361 (output_asm_line_debug_info): New.
17362 (struct var_loc_node): Add view.
17363 (add_AT_view_list, AT_loc_list): New.
17364 (add_var_loc_to_decl): Add view param. Test it against last.
17365 (new_loc_list): Add view params. Record them.
17366 (AT_loc_list_ptr): Handle loc and view lists.
17367 (view_list_to_loc_list_val_node): New.
17368 (print_dw_val): Handle dw_val_class_view_list.
17369 (size_of_die): Likewise.
17370 (value_format): Likewise.
17371 (loc_list_has_views): New.
17372 (gen_llsym): Set vl_symbol too.
17373 (maybe_gen_llsym, skip_loc_list_entry): New.
17374 (dwarf2out_maybe_output_loclist_view_pair): New.
17375 (output_loc_list): Output view list or entries too.
17376 (output_view_list_offset): New.
17377 (output_die): Handle dw_val_class_view_list.
17378 (output_dwarf_version): New.
17379 (output_compilation_unit_header): Use it.
17380 (output_skeleton_debug_sections): Likewise.
17381 (output_rnglists, output_line_info): Likewise.
17382 (output_pubnames, output_aranges): Update version comments.
17383 (output_one_line_info_table): Output view numbers in asm comments.
17384 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17385 Call maybe_gen_llsym.
17386 (loc_list_from_tree_1): Adjust.
17387 (add_AT_location_description): Create view list attribute if
17388 needed, check it's absent otherwise.
17389 (convert_cfa_to_fb_loc_list): Adjust.
17390 (maybe_emit_file): Call output_asm_line_debug_info for test.
17391 (dwarf2out_var_location): Reset views as needed. Precompute
17392 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17393 attribute. Set view.
17394 (new_line_info_table): Reset next view.
17395 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17396 (dwarf2out_source_line): Likewise. Output view resets and labels to
17397 the assembler, or select appropriate line info opcodes.
17398 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17399 (optimize_string_length): Catch it. Adjust.
17400 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17401 dw_val_class_view_list, and remove it if no longer needed.
17402 (hash_loc_list): Hash view numbers.
17403 (loc_list_hasher::equal): Compare them.
17404 (optimize_location_lists): Check whether a view list symbol is
17405 needed, and whether the locview attribute is present, and
17406 whether they match. Remove the locview attribute if no longer
17408 (index_location_lists): Call skip_loc_list_entry for test.
17409 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17410 Use output_dwarf_version.
17411 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17412 (struct dw_val_node): Add val_view_list.
17413 * final.c (SEEN_NEXT_VIEW): New.
17414 (set_next_view_needed): New.
17415 (clear_next_view_needed): New.
17416 (maybe_output_next_view): New.
17417 (final_start_function): Rename to...
17418 (final_start_function_1): ... this. Take pointer to FIRST,
17419 add SEEN parameter. Emit param bindings in the initial view.
17420 (final_start_function): Reintroduce SEEN-less interface.
17421 (final): Rename to...
17422 (final_1): ... this. Take SEEN parameter. Output final pending
17423 next view at the end.
17424 (final): Reintroduce seen-less interface.
17425 (final_scan_insn): Output pending next view before switching
17426 sections or ending a block. Mark the next view as needed when
17427 outputting variable locations. Notify debug backend of section
17428 changes, and of location view changes.
17429 (rest_of_handle_final): Adjust.
17430 * toplev.c (process_options): Autodetect value for debug variable
17431 location views option. Warn on incompat5 without -gdwarf-5.
17432 * doc/invoke.texi (gvariable-location-views): New.
17433 (gvariable-location-views=incompat5): New.
17434 (gno-variable-location-views): New.
17436 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17438 PR tree-optimization/84136
17439 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17440 that the result of find_edge is non-NULL.
17442 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17445 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17446 storing integer register in SImode. Fix cost of 256 and 512
17447 byte aligned SSE register store.
17449 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17451 * config/i386/i386.c (ix86_multiplication_cost): Fix
17452 multiplication cost for TARGET_AVX512DQ.
17454 2018-02-08 Marek Polacek <polacek@redhat.com>
17456 PR tree-optimization/84238
17457 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17460 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17462 PR tree-optimization/84265
17463 * tree-vect-stmts.c (vectorizable_store): Don't treat
17464 VMAT_CONTIGUOUS accesses as grouped.
17465 (vectorizable_load): Likewise.
17467 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17469 PR tree-optimization/81635
17470 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17471 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17472 (test_round_for_mask): New functions.
17473 (wide_int_cc_tests): Call test_round_for_mask.
17474 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17475 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17476 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17477 range returned by get_range_info.
17479 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17482 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17483 * symtab.c: Include builtins.h
17484 (symtab_node::output_to_lto_symbol_table_p): Move here
17485 from lto-streamer-out.c:output_symbol_p.
17486 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17487 (output_symbol_p): Move all logic to symtab.c
17488 (produce_symtab): Update.
17490 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17492 * config/s390/s390-opts.h (enum indirect_branch): Define.
17493 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17494 (s390_indirect_branch_via_thunk)
17495 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17496 (enum s390_indirect_branch_type): Define.
17497 * config/s390/s390.c (struct s390_frame_layout, struct
17498 machine_function): Remove.
17499 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17500 (indirect_branch_table_label_no, indirect_branch_table_name):
17502 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17503 (enum s390_indirect_branch_option): Define.
17504 (s390_return_addr_from_memory): New function.
17505 (s390_handle_string_attribute): New function.
17506 (s390_attribute_table): Add new attribute handler.
17507 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17508 (s390_indirect_branch_via_thunk): New function.
17509 (s390_indirect_branch_via_inline_thunk): New function.
17510 (s390_function_ok_for_sibcall): When jumping via thunk disallow
17511 sibling call optimization for non z10 compiles.
17512 (s390_emit_call): Force indirect branch target to be a single
17513 register. Add r1 clobber for non-z10 compiles.
17514 (s390_emit_epilogue): Emit return jump via return_use expander.
17515 (s390_reorg): Handle JUMP_INSNs as execute targets.
17516 (s390_option_override_internal): Perform validity checks for the
17517 new command line options.
17518 (s390_indirect_branch_attrvalue): New function.
17519 (s390_indirect_branch_settings): New function.
17520 (s390_set_current_function): Invoke s390_indirect_branch_settings.
17521 (s390_output_indirect_thunk_function): New function.
17522 (s390_code_end): Implement target hook.
17523 (s390_case_values_threshold): Implement target hook.
17524 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17526 * config/s390/s390.h (struct s390_frame_layout)
17527 (struct machine_function): Move here from s390.c.
17528 (TARGET_INDIRECT_BRANCH_NOBP_RET)
17529 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17530 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17531 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17532 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17533 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17534 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17535 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17536 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17537 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17538 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17539 (mnemonic attribute): Add values which aren't recognized
17541 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17542 pattern for branch conversion. Fix mnemonic attribute.
17543 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17544 indirect branch via thunk if requested.
17545 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17546 ("*indirect_jump"): Disable for branch conversion using out of
17548 ("indirect_jump_via_thunk<mode>_z10")
17549 ("indirect_jump_via_thunk<mode>")
17550 ("indirect_jump_via_inlinethunk<mode>_z10")
17551 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17552 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17553 ("casesi_jump_via_inlinethunk<mode>_z10")
17554 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17555 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17556 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17557 ("*indirect2_jump"): Disable for branch conversion.
17558 ("casesi_jump"): Turn into expander and expand patterns for branch
17560 ("return_use"): New expander.
17561 ("*return"): Emit return via thunk and rename it to ...
17562 ("*return<mode>"): ... this one.
17563 * config/s390/s390.opt: Add new options and and enum for the
17566 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17568 * lra-constraints.c (match_reload): Unconditionally use
17569 gen_lowpart_SUBREG, rather than selecting between that
17570 and equivalent gen_rtx_SUBREG code.
17572 2018-02-08 Richard Biener <rguenther@suse.de>
17574 PR tree-optimization/84233
17575 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17576 changed flag instead of boguously re-using phi_inserted.
17578 2018-02-08 Martin Jambor <mjambor@suse.cz>
17580 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17581 static local variables.
17583 2018-02-08 Richard Biener <rguenther@suse.de>
17585 PR tree-optimization/84278
17586 * tree-vect-stmts.c (vectorizable_store): When looking for
17587 smaller vector types to perform grouped strided loads/stores
17588 make sure the mode is supported by the target.
17589 (vectorizable_load): Likewise.
17591 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17593 * config/aarch64/aarch64.c (aarch64_components_for_bb):
17594 Increase LDP/STP opportunities by adding adjacent callee-saves.
17596 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17598 PR rtl-optimization/84068
17599 PR rtl-optimization/83459
17600 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17602 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
17604 PR tree-optimization/84224
17605 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17606 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17607 non-zero arguments.
17609 2018-02-07 Iain Sandoe <iain@codesourcery.com>
17612 * config/rs6000/altivec.md (*restore_world): Remove LR use.
17613 * config/rs6000/predicates.md (restore_world_operation): Adjust op
17614 count, remove one USE.
17616 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17618 * doc/install.texi (Configuration): Document the
17619 --with-long-double-format={ibm,ieee} PowerPC configuration
17623 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17624 Convert from define_expand to be define_insn_and_split. Rework
17625 float/double/_Float128 conversions to QI/HI/SImode to work with
17626 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17627 conversions to QI/HImode types did a store and then a load to
17628 truncate the value. For conversions to VSX registers, don't split
17629 the insn, instead emit the code directly. Use the code iterator
17630 any_fix to combine signed and unsigned conversions.
17631 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17632 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17633 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17634 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17635 (fix_<mode>di2_hw): Likewise.
17636 (fixuns_<mode>di2_hw): Likewise.
17637 (fix_<mode>si2_hw): Likewise.
17638 (fixuns_<mode>si2_hw): Likewise.
17639 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17640 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17641 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17642 fix<uns>_trunc<SFDF:mode>si2_p8.
17643 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17644 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17645 (fix<uns>_<mode>_mem): Likewise.
17646 (fctiw<u>z_<mode>_mem): Likewise.
17647 (fix<uns>_<mode>_mem): Likewise.
17648 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17649 the register allocator from doing a direct move to the GPRs to do
17650 a store, and instead use the ISA 3.0 store byte/half-word from
17651 vector register instruction. For IEEE 128-bit floating point,
17652 also optimize stores of 32-bit ints.
17653 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17655 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17657 * genextract.c (push_pathstr_operand): New function to support
17659 (walk_rtx): Call push_pathstr_operand.
17660 (print_path): Support [a-zA-Z].
17662 2018-02-07 Richard Biener <rguenther@suse.de>
17664 PR tree-optimization/84037
17665 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17666 (cse_and_gimplify_to_preheader): Declare.
17667 (vect_get_place_in_interleaving_chain): Likewise.
17668 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17670 (_loop_vec_info::~_loop_vec_info): Delete it.
17671 (cse_and_gimplify_to_preheader): New function.
17672 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17673 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17674 (vectorizable_load): Likewise. For grouped stores always base
17675 the IV on the first element.
17676 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17677 condition before gimplifying.
17679 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17681 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17682 *DIV_EXPR and *MOD_EXPR.
17684 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
17687 * config/i386/i386.c (ix86_option_override_internal): Mask out
17688 the CF_SET bit when checking -fcf-protection.
17690 2018-02-07 Tom de Vries <tom@codesourcery.com>
17693 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17696 2018-02-07 Richard Biener <rguenther@suse.de>
17698 PR tree-optimization/84204
17699 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17702 PR tree-optimization/84205
17703 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17704 special-case isl_ast_op_zdiv_r.
17706 PR tree-optimization/84223
17707 * graphite-scop-detection.c (gather_bbs::before_dom_children):
17708 Only add conditions from within the region.
17709 (gather_bbs::after_dom_children): Adjust.
17711 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
17714 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17715 * config/avr/avr.md: Only post-reload split REG-REG moves if
17716 either register is GENERAL_REG_P.
17718 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17720 PR tree-optimization/84235
17721 * tree-ssa-scopedtables.c
17722 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17723 if the subtraction is performed in floating point type where NaNs are
17724 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17725 build 1. Formatting fix.
17727 2018-02-06 Jakub Jelinek <jakub@redhat.com>
17730 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17731 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17732 and skip it regardless of bb boundaries. Use CALL_P macro,
17733 don't test INSN_P (insn) together with CALL_P or JUMP_P check
17734 unnecessarily, formatting fix.
17736 2018-02-06 Michael Collison <michael.collison@arm.com>
17738 * config/arm/thumb2.md:
17739 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17740 (*thumb_mov_notscc): Ditto.
17742 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
17745 * config/rs6000/rs6000.md (su code attribute): Use "u" for
17746 unsigned_fix, not "s".
17748 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17750 * configure.ac (gcc_fn_eh_frame_ro): New function.
17751 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17752 correct .eh_frame permissions.
17753 * configure: Regenerate.
17755 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
17757 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17758 irrelevant options.
17760 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17762 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17763 Display warning message for -mno-speculate-indirect-jumps.
17765 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
17767 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17769 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17771 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
17773 PR tree-optimization/84225
17774 * tree-eh.c (find_trapping_overflow): Only call
17775 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17777 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17780 * config/i386/i386.c: Reimplement the check of possible options
17781 -mibt/-mshstk conbination. Change error messages.
17782 * doc/invoke.texi: Fix a typo: remove extra '='.
17784 2018-02-06 Marek Polacek <polacek@redhat.com>
17786 PR tree-optimization/84228
17787 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17789 2018-02-06 Tamar Christina <tamar.christina@arm.com>
17792 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17793 emitted arch directives.
17794 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17795 __ARM_FEATURE_COPROC before changing architectures.
17797 2018-02-06 Richard Biener <rguenther@suse.de>
17799 * config/i386/i386.c (print_reg): Fix typo.
17800 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17802 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17804 * configure: Regenerate.
17806 2018-02-05 Martin Sebor <msebor@redhat.com>
17808 PR tree-optimization/83369
17809 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17812 2018-02-05 Martin Liska <mliska@suse.cz>
17814 * doc/invoke.texi: Cherry-pick upstream r323995.
17816 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
17818 * ira.c (ira_init_register_move_cost): Adjust comment.
17820 2018-02-05 Martin Liska <mliska@suse.cz>
17822 PR gcov-profile/84137
17823 * doc/gcov.texi: Fix typo in documentation.
17825 2018-02-05 Martin Liska <mliska@suse.cz>
17827 PR gcov-profile/83879
17828 * doc/gcov.texi: Document necessity of --dynamic-list-data when
17829 using dlopen functionality.
17831 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
17833 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17834 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17835 _mm_maskz_range_ss, _mm_mask_range_round_ss,
17836 _mm_maskz_range_round_ss): New intrinsics.
17837 (__builtin_ia32_rangesd128_round)
17838 (__builtin_ia32_rangess128_round): Remove.
17839 (__builtin_ia32_rangesd128_mask_round,
17840 __builtin_ia32_rangess128_mask_round): New builtins.
17841 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17842 __builtin_ia32_rangess128_round): Remove.
17843 (__builtin_ia32_rangesd128_mask_round,
17844 __builtin_ia32_rangess128_mask_round): New builtins.
17845 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17846 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17847 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17848 "<round_saeonly_constraint>")): Changed to ...
17849 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17850 "<round_saeonly_scalar_constraint>")): ... this.
17851 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17852 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17853 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17854 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17855 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17857 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
17859 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17861 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17862 Remove all values except native, 8540 and 8548.
17864 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
17866 * config/i386/i386.c (ix86_output_function_return): Pass
17867 INVALID_REGNUM, instead of -1, as invalid register number to
17868 indirect_thunk_name and output_indirect_thunk.
17870 2018-02-02 Julia Koval <julia.koval@intel.com>
17872 * config.gcc: Add -march=icelake.
17873 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17874 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17875 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17876 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17877 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17878 (processor_target_table): Add icelake.
17879 (ix86_option_override_internal): Handle new PTAs.
17880 (get_builtin_code_for_version): Handle icelake.
17881 (M_INTEL_COREI7_ICELAKE): New.
17882 (fold_builtin_cpu): Handle icelake.
17883 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17884 * doc/invoke.texi: Add -march=icelake.
17886 2018-02-02 Julia Koval <julia.koval@intel.com>
17888 * config/i386/i386.c (ix86_option_override_internal): Change flags type
17889 to wide_int_bitmask.
17890 * wide-int-bitmask.h: New.
17892 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17895 * config/i386/i386.md: Replace Pmode with word_mode in
17896 builtin_setjmp_setup and builtin_longjmp to support x32.
17898 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
17902 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17904 (rs6000_supported_cpu_names): New static variable.
17905 (linux_cpu_translation_table): Likewise.
17906 (elf_platform) <cpu>: Define new static variable and use it.
17907 Translate kernel AT_PLATFORM name to canonical name if needed.
17908 Error if platform name is unknown.
17910 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
17913 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17915 2018-02-01 Jeff Law <law@redhat.com>
17918 * config/i386/i386.c (release_scratch_register_on_entry): Add new
17919 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
17920 the scratch if RELEASE_VIA_POP is false.
17921 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17922 If we have to save a temporary register, decrement SIZE appropriately.
17923 Pass new arguments to release_scratch_register_on_entry.
17924 (ix86_adjust_stack_and_probe): Likewise.
17925 (ix86_emit_probe_stack_range): Pass new arguments to
17926 release_scratch_register_on_entry.
17928 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
17930 PR rtl-optimization/84157
17931 * combine.c (change_zero_ext): Use REG_P predicate in
17932 front of HARD_REGISTER_P predicate.
17934 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
17936 * config/avr/avr.c (avr_option_override): Move disabling of
17937 -fdelete-null-pointer-checks to...
17938 * common/config/avr/avr-common.c (avr_option_optimization_table):
17941 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17943 PR tree-optimization/81635
17944 * tree-data-ref.c (split_constant_offset_1): For types that
17945 wrap on overflow, try to use range info to prove that wrapping
17948 2018-02-01 Renlin Li <renlin.li@arm.com>
17951 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17952 TAILCALL_ADDR_REGS.
17953 (aarch64_register_move_cost): Likewise.
17954 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17955 TAILCALL_ADDR_REGS.
17956 (REG_CLASS_NAMES): Likewise.
17957 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17958 TAILCALL_ADDR_REGS. Remove IP registers.
17959 * config/aarch64/aarch64.md (Ucs): Update register constraint.
17961 2018-02-01 Richard Biener <rguenther@suse.de>
17963 * domwalk.h (dom_walker::dom_walker): Add additional constructor
17964 for specifying RPO order and allow NULL for that.
17965 * domwalk.c (dom_walker::dom_walker): Likewise.
17966 (dom_walker::walk): Handle NULL RPO order.
17967 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17969 (rewrite_update_dom_walker): Likewise.
17970 (mark_def_dom_walker): Likewise.
17972 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17974 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17975 (aarch64_maybe_expand_sve_subreg_move): Declare.
17976 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17977 * config/aarch64/predicates.md (aarch64_any_register_operand): New
17979 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17980 that are semantically a reverse operation.
17981 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17982 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17983 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17985 (aarch64_can_change_mode_class): For big-endian, forbid changes
17986 between two SVE modes if they have different element sizes.
17988 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17990 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17991 the TImode handling for big-endian targets.
17993 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17995 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17996 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
17998 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17999 Remove BSWAP handing for big-endian targets and use the form of
18000 LD1RQ appropariate for the mode.
18002 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18004 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
18005 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
18006 duplicated element.
18008 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
18011 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
18012 check for operands that need to go through aarch64_sve_reload_be.
18014 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18016 PR tree-optimization/81661
18017 PR tree-optimization/84117
18018 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18019 * tree-eh.c: Include gimplify.h.
18020 (find_trapping_overflow, replace_trapping_overflow,
18021 rewrite_to_non_trapping_overflow): New functions.
18022 * tree-vect-loop.c: Include tree-eh.h.
18023 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18024 * tree-data-ref.c: Include tree-eh.h.
18025 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18027 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18029 PR rtl-optimization/84123
18030 * combine.c (change_zero_ext): Check if hard register satisfies
18031 can_change_dest_mode before calling gen_lowpart_SUBREG.
18033 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18036 * ira.c (ira_init_register_move_cost): Remove assert.
18038 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18040 PR rtl-optimization/84071
18041 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18042 * doc/tm.texi: Regenerate.
18044 2018-01-31 Richard Biener <rguenther@suse.de>
18046 PR tree-optimization/84132
18047 * tree-data-ref.c (analyze_miv_subscript): Properly
18048 check whether evolution_function_is_affine_multivariate_p
18049 before calling gcd_of_steps_may_divide_p.
18051 2018-01-31 Julia Koval <julia.koval@intel.com>
18054 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18055 * config/i386/i386.md (rdpid_rex64) New.
18056 (rdpid): Make 32bit only.
18058 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18061 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18062 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18064 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18067 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18069 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18071 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18073 PR rtl-optimization/84071
18074 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18075 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18077 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18079 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18080 (arc_attribute_table): Add 'aux' attribute.
18081 (arc_in_small_data_p): Consider aux like variables.
18082 (arc_is_aux_reg_p): New function.
18083 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18084 (arc_get_aux_arg): New function.
18085 (prepare_move_operands): Handle aux-register access.
18086 (arc_handle_aux_attribute): New function.
18087 * doc/extend.texi (ARC Variable attributes): Add subsection.
18089 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18091 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18092 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18093 (arc_attribute_table): Add 'uncached' attribute.
18094 (arc_print_operand): Print '.di' flag for uncached memory
18096 (arc_in_small_data_p): Do not consider for small data the uncached
18098 (arc_is_uncached_mem_p): New function.
18099 * config/arc/predicates.md (compact_store_memory_operand): Check
18100 for uncached memory accesses.
18101 (nonvol_nonimm_operand): Likewise.
18102 * doc/extend.texi (ARC Type Attribute): New subsection.
18104 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18107 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18108 falign-loops=): Add Optimization flag.
18110 2018-01-30 Jeff Law <law@redhat.com>
18113 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18114 INT_REGISTERS_SAVED. Check it prior to calling
18115 get_scratch_register_on_entry.
18116 (ix86_adjust_stack_and_probe): Similarly.
18117 (ix86_emit_probe_stack_range): Similarly.
18118 (ix86_expand_prologue): Corresponding changes.
18120 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18123 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18124 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18126 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18129 * lra-constraints.c (curr_insn_transform): Process AND in the
18132 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18134 PR rtl-optimization/83986
18135 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18136 dependence against last_pending_memory_flush in addition to
18137 pending_jump_insns.
18139 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18141 PR tree-optimization/81611
18142 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18145 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18148 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18151 2018-01-30 Richard Biener <rguenther@suse.de>
18152 Jakub Jelinek <jakub@redhat.com>
18154 PR tree-optimization/84111
18155 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18156 inner loops added during recursion, as they don't have up-to-date
18159 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18162 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18163 (can_inline_edge_by_limits_p): ... here.
18164 (can_early_inline_edge_p, check_callers,
18165 update_caller_keys, update_callee_keys, recursive_inlining,
18166 add_new_edges_to_heap, speculation_useful_p,
18167 inline_small_functions,
18168 inline_small_functions, flatten_function,
18169 inline_to_all_callers_1): Update.
18171 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18173 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18176 2018-01-30 Richard Biener <rguenther@suse.de>
18178 PR tree-optimization/83008
18179 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18180 invariant and constant vector uses in stmts when they need
18181 more than one stmt.
18183 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18186 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18187 * configure: Regenerate.
18189 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18191 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18193 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18194 Use gen_rtx_REG rather than gen_lowpart.
18196 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18198 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18199 rather than 0 when creating partial subregs.
18201 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18203 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18206 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18209 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18210 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18211 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18212 flags. This restores the settings used before the 2017-07-24.
18213 Turning off pre increment/decrement/modify allows IVOPTS to
18214 optimize DF/SF loops where the index is an int.
18216 2018-01-29 Richard Biener <rguenther@suse.de>
18217 Kelvin Nilsen <kelvin@gcc.gnu.org>
18220 * tree-vect-stmts.c (vectorizable_call): Don't call
18221 targetm.vectorize_builtin_md_vectorized_function if callee is
18224 2018-01-22 Carl Love <cel@us.ibm.com>
18226 * doc/extend.tex: Fix typo in second arg in
18227 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18229 2018-01-29 Richard Biener <rguenther@suse.de>
18231 PR tree-optimization/84086
18232 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18233 (flush_ssaname_freelist): When SSA names were released reset
18234 the SCEV hash table.
18236 2018-01-29 Richard Biener <rguenther@suse.de>
18238 PR tree-optimization/84057
18239 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18240 removed paths when removing edges.
18242 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18244 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18245 -mfunction-return=@var{choice}.
18247 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18249 PR diagnostic/84034
18250 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18251 Handle CR like TAB.
18252 (layout::print_source_line): Likewise.
18253 (test_get_line_width_without_trailing_whitespace): Add test cases.
18255 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18257 PR middle-end/84040
18258 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18261 2018-01-26 Jim Wilson <jimw@sifive.com>
18263 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18265 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18268 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18270 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18271 and CMP + SUB-immediate -> SUBS.
18273 2018-01-26 Martin Sebor <msebor@redhat.com>
18275 PR tree-optimization/83896
18276 * tree-ssa-strlen.c (get_string_len): Rename...
18277 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18278 Avoid assuming length is constant.
18279 (handle_char_store): Use HOST_WIDE_INT for string length.
18281 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18284 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18285 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18287 2018-01-26 Richard Biener <rguenther@suse.de>
18289 PR rtl-optimization/84003
18290 * dse.c (record_store): Only record redundant stores when
18291 the earlier store aliases at least all accesses the later one does.
18293 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18295 PR rtl-optimization/83985
18296 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18297 REG_CFA_RESTORE insns.
18298 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18299 REG_CFA_RESTORE insns here.
18302 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18303 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18305 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18307 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18308 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18309 (arc_init): Likewise.
18310 (arc_override_options): Likewise.
18311 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18313 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18315 * config/arc/arc.h (TARGET_DBNZ): Define.
18316 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18317 properly set the tune attribute.
18318 (dbnz): Use TARGET_DBNZ guard.
18319 * config/arc/arc.opt (mtune): Add core3 option.
18321 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18323 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18324 recognize new pic like addresses.
18325 (arc_delegitimize_address): Clean up.
18327 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18329 * config/arc/arc-arches.def: Option mrf16 valid for all
18331 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18332 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18333 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18334 * config/arc/arc-tables.opt: Regenerate.
18335 * config/arc/arc.c (arc_conditional_register_usage): Handle
18336 reduced register file case.
18337 (arc_file_start): Set must have build attributes.
18338 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18339 mrf16 option value.
18340 * config/arc/arc.opt (mrf16): Add new option.
18341 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18342 * config/arc/genmultilib.awk: Handle new mrf16 option.
18343 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18344 * config/arc/t-multilib: Regenerate.
18345 * doc/invoke.texi (ARC Options): Document mrf16 option.
18347 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18349 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18350 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18351 (arc_attribute_table): Add 'secure_call' attribute.
18352 (arc_print_operand): Print secure call operand.
18353 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18355 (arc_is_secure_call_p): New function. * config/arc/arc.md
18356 (call_i): Add support for sjli instruction.
18357 (call_value_i): Likewise.
18358 * config/arc/constraints.md (Csc): New constraint.
18360 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18361 John Eric Martin <John.Martin@emmicro-us.com>
18363 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18364 * config/arc/arc.c (_arc_jli_section): New struct.
18365 (arc_jli_section): New type.
18366 (rc_jli_sections): New static variable.
18367 (arc_handle_jli_attribute): New function.
18368 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18369 (arc_file_end): New function.
18370 (TARGET_ASM_FILE_END): Define.
18371 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18372 (arc_add_jli_section): New function.
18373 (jli_call_scan): Likewise.
18374 (arc_reorg): Call jli_call_scan.
18375 (arc_output_addsi): Remove 'S' from printing asm operand.
18376 (arc_is_jli_call_p): New function.
18377 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18379 (movhi_insn): Likewise.
18380 (movsi_insn): Likewise.
18381 (movsi_set_cc_insn): Likewise.
18382 (loadqi_update): Likewise.
18383 (load_zeroextendqisi_update): Likewise.
18384 (load_signextendqisi_update): Likewise.
18385 (loadhi_update): Likewise.
18386 (load_zeroextendhisi_update): Likewise.
18387 (load_signextendhisi_update): Likewise.
18388 (loadsi_update): Likewise.
18389 (loadsf_update): Likewise.
18390 (movsicc_insn): Likewise.
18391 (bset_insn): Likewise.
18392 (bxor_insn): Likewise.
18393 (bclr_insn): Likewise.
18394 (bmsk_insn): Likewise.
18395 (bicsi3_insn): Likewise.
18396 (cmpsi_cc_c_insn): Likewise.
18397 (movsi_ne): Likewise.
18398 (movsi_cond_exec): Likewise.
18399 (clrsbsi2): Likewise.
18400 (norm_f): Likewise.
18410 (call_i): Remove 'S' asm letter, add jli instruction.
18411 (call_value_i): Likewise.
18412 * config/arc/arc.op (mjli-always): New option.
18413 * config/arc/constraints.md (Cji): New constraint.
18414 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18416 (subsf3_fpx): Likewise.
18417 (mulsf3_fpx): Likewise.
18418 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18420 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18421 function attrbutes.
18422 * doc/invoke.texi (ARC): Document mjli-always option.
18424 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18426 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18427 avoid addition with 0 and use incw and decw where possible.
18429 2018-01-26 Richard Biener <rguenther@suse.de>
18431 PR tree-optimization/81082
18432 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18433 association if it requires casting to unsigned.
18434 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18435 from fold_plusminus_mult_expr to catch important cases late when
18436 range info is available.
18438 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18440 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18441 * configure.ac (hidden_linkonce): New test.
18442 * configure: Regenerate.
18443 * config.in: Regenerate.
18445 2018-01-26 Julia Koval <julia.koval@intel.com>
18447 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18448 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18449 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18450 _mm_mask_bitshuffle_epi64_mask): Fix type.
18451 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18452 USI_FTYPE_V4DI_V4DI_USI): Remove.
18453 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18454 __builtin_ia32_vpshufbitqmb256_mask,
18455 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18456 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18457 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18459 2018-01-26 Alan Modra <amodra@gmail.com>
18462 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18463 UNSPEC_VBPERMQ. Sort other unspecs.
18465 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18467 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18469 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18471 PR middle-end/83055
18472 * predict.c (drop_profile): Do not push/pop cfun; update also
18474 (handle_missing_profiles): Fix logic looking for zero profiles.
18476 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18478 PR middle-end/83977
18479 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18480 on functions with #pragma omp declare simd or functions with simd
18482 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18483 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18484 Remove trailing \n from warning_at calls.
18486 2018-01-25 Tom de Vries <tom@codesourcery.com>
18489 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18490 for neutered workers.
18492 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18495 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18496 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18498 2018-01-24 Jeff Law <law@redhat.com>
18501 * i386.c (get_probe_interval): Move to earlier point.
18502 (ix86_compute_frame_layout): If -fstack-clash-protection and
18503 the frame is larger than the probe interval, then use pushes
18504 to save registers rather than reg->mem moves.
18505 (ix86_expand_prologue): Remove conditional for int_registers_saved
18508 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
18511 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18512 min/max for never referenced object.
18514 2018-01-24 Jakub Jelinek <jakub@redhat.com>
18516 PR middle-end/83977
18517 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18519 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18520 attributes from DECL_ATTRIBUTES (decl) without affecting
18521 DECL_ATTRIBUTES (current_function_decl).
18522 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18523 functions with non-NULL DECL_ABSTRACT_ORIGIN.
18525 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
18527 PR tree-optimization/83979
18528 * fold-const.c (fold_comparison): Use constant_boolean_node
18529 instead of boolean_{true,false}_node.
18531 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
18533 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18536 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18538 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18539 Simplify the clause that sets the length attribute.
18540 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18541 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18542 clause that sets the length attribute.
18543 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18545 2018-01-24 Tom de Vries <tom@codesourcery.com>
18548 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18549 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18550 Add strict parameter.
18551 (prevent_branch_around_nothing): Insert dummy insn between branch to
18552 label and label with no ptx insn inbetween.
18553 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18555 2018-01-24 Tom de Vries <tom@codesourcery.com>
18558 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18559 for neutered threads in warp.
18560 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18562 2018-01-24 Richard Biener <rguenther@suse.de>
18564 PR tree-optimization/83176
18565 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18568 2018-01-24 Richard Biener <rguenther@suse.de>
18570 PR tree-optimization/82819
18571 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18572 code generating pluses that are no-ops in the target precision.
18574 2018-01-24 Richard Biener <rguenther@suse.de>
18576 PR middle-end/84000
18577 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18579 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18581 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18582 to merge probabilities.
18583 * predict.c (probably_never_executed): Also mark as cold functions
18584 with global 0 profile and guessed local profile.
18585 * profile-count.c (profile_probability::combine_with_count): New
18587 * profile-count.h (profile_probability::operator*,
18588 profile_probability::operator*=, profile_probability::operator/,
18589 profile_probability::operator/=): Reduce precision to adjusted
18590 and set value to guessed on contradictory divisions.
18591 (profile_probability::combine_with_freq): Remove.
18592 (profile_probability::combine_wiht_count): Declare.
18593 (profile_count::force_nonzero):: Set to adjusted.
18594 (profile_count::probability_in):: Set quality to adjusted.
18595 * tree-ssa-tail-merge.c (replace_block_by): Use
18596 combine_with_count.
18598 2018-01-23 Andrew Waterman <andrew@sifive.com>
18599 Jim Wilson <jimw@sifive.com>
18601 * config/riscv/riscv.c (riscv_stack_boundary): New.
18602 (riscv_option_override): Set riscv_stack_boundary. Handle
18603 riscv_preferred_stack_boundary_arg.
18604 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18605 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18606 (STACK_BOUNDARY): Set to riscv_stack_boundary.
18607 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18608 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18609 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18611 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
18614 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18615 of struct ix86_frame.
18616 (ix86_expand_epilogue): Likewise. Add a local variable for
18617 the reg_save_offset field in struct ix86_frame.
18619 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18621 PR tree-optimization/82604
18622 * tree-loop-distribution.c (enum partition_kind): New enum item
18623 PKIND_PARTIAL_MEMSET.
18624 (partition_builtin_p): Support above new enum item.
18625 (generate_code_for_partition): Ditto.
18626 (compute_access_range): Differentiate cases that equality can be
18627 proven at all loops, the innermost loops or no loops.
18628 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18629 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18630 (finalize_partitions, distribute_loop): Don't fuse partition of
18631 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18632 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18633 parloop is enabled.
18635 2018-01-23 Martin Liska <mliska@suse.cz>
18637 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18638 order to ignore the predictor.
18639 (PRED_POLYMORPHIC_CALL): Likewise.
18640 (PRED_RECURSIVE_CALL): Likewise.
18642 2018-01-23 Martin Liska <mliska@suse.cz>
18644 * tree-profile.c (tree_profiling): Print function header to
18645 aware reader which function we are working on.
18646 * value-prof.c (gimple_find_values_to_profile): Do not print
18647 not interesting value histograms.
18649 2018-01-23 Martin Liska <mliska@suse.cz>
18651 * profile-count.h (enum profile_quality): Add
18652 profile_uninitialized as the first value. Do not number values
18653 as they are zero based.
18654 (profile_count::verify): Update sanity check.
18655 (profile_probability::verify): Likewise.
18657 2018-01-23 Nathan Sidwell <nathan@acm.org>
18659 * doc/invoke.texi (ffor-scope): Deprecate.
18661 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18663 PR tree-optimization/83510
18664 * domwalk.c (set_all_edges_as_executable): New function.
18665 (dom_walker::dom_walker): Convert bool param
18666 "skip_unreachable_blocks" to enum reachability. Move setup of
18667 edge flags to set_all_edges_as_executable and only do it when
18668 reachability is REACHABLE_BLOCKS.
18669 * domwalk.h (enum dom_walker::reachability): New enum.
18670 (dom_walker::dom_walker): Convert bool param
18671 "skip_unreachable_blocks" to enum reachability.
18672 (set_all_edges_as_executable): New decl.
18673 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18674 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18676 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18677 but converting true to REACHABLE_BLOCKS.
18678 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18680 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18681 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18682 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18684 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18685 if check_all_array_refs will be called.
18687 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18689 * tree.c (selftest::test_location_wrappers): Add more test
18692 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18694 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18695 (selftest::test_bit_in_range): Likewise.
18697 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18700 * doc/sourcebuild.texi (vect_float): Say that the selector
18701 only describes the situation when -funsafe-math-optimizations is on.
18702 (vect_float_strict): Document.
18704 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18706 PR tree-optimization/83965
18707 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18708 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18709 instead of checking only for a reduction.
18710 (vect_recog_widen_sum_pattern): Likewise.
18712 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18714 * predict.c (probably_never_executed): Only use precise profile info.
18715 (compute_function_frequency): Skip after inlining hack since we now
18716 have quality checking.
18718 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18720 * profile-count.h (profile_probability::very_unlikely,
18721 profile_probability::unlikely, profile_probability::even): Set
18722 precision to guessed.
18724 2018-01-23 Richard Biener <rguenther@suse.de>
18726 PR tree-optimization/83963
18727 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18728 Properly terminate dominator walk when crossing the exit edge not
18729 when visiting its source block.
18731 2018-01-23 Jakub Jelinek <jakub@redhat.com>
18734 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18735 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18737 2018-01-22 Jakub Jelinek <jakub@redhat.com>
18739 PR tree-optimization/83957
18740 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
18741 semicolon after for body surrounded by braces.
18743 PR tree-optimization/83081
18744 * profile-count.h (profile_probability::split): New method.
18745 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18746 Use profile_probability::split.
18747 (do_compare_rtx_and_jump): Fix adjustment of probabilities
18748 when splitting a single conditional jump into 2.
18750 2018-01-22 David Malcolm <dmalcolm@redhat.com>
18752 PR tree-optimization/69452
18753 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18756 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18758 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18759 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18760 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18762 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18764 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18766 * config/rl78/rl78.md (movdi): New define_expand.
18767 * config/rl78/rl78.c (rl78_split_movdi): New function.
18769 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
18772 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18774 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18775 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18776 128-bit to produce an UNSPEC move to get the double word with the
18777 signbit and then a shift directly to do signbit.
18778 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18779 implementation with a new version that just does either a direct
18780 move or a regular move. Move memory interface to separate insns.
18781 Move insns so they are next to the expander.
18782 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18783 with signbit move. Split big and little endian case.
18784 (signbit<mode>2_dm_mem_le): Likewise.
18785 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18786 (signbit<mode>2_dm2): Likewise.
18788 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18790 * config/rl78/rl78.md (anddi3): New define_expand.
18792 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18794 * config/rl78/rl78.md (umindi3): New define_expand.
18796 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18798 * config/rl78/rl78.md (smindi3): New define_expand.
18800 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18802 * config/rl78/rl78.md (smaxdi3): New define_expand.
18804 2018-01-22 Carl Love <cel@us.ibm.com>
18806 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18807 LVX_V1TI): Add macro expansion.
18808 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18809 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18810 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18811 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18812 Change check to determine if the instruction is a byte reversing
18813 entry. Fix typo in comment.
18814 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18815 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18816 Add def_builtin calls for new builtins.
18817 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18818 Add define_insn expansion.
18820 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18822 * config/rl78/rl78.md (umaxdi3): New define_expand.
18824 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18826 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18827 for non-QImode registers.
18829 2018-01-22 Richard Biener <rguenther@suse.de>
18831 PR tree-optimization/83963
18832 * graphite-scop-detection.c (scop_detection::get_sese): Delay
18833 including the loop exit block.
18834 (scop_detection::merge_sese): Likewise.
18835 (scop_detection::add_scop): Do it here instead.
18837 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18839 * doc/sourcebuild.texi (arm_softfloat): Document.
18841 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
18844 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18845 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18846 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18848 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18849 David Edelsohn <dje.gcc@gmail.com>
18852 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18853 Change "crset eq" to "crset 2".
18854 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18855 (*call_indirect_aix<mode>_nospec): Likewise.
18856 (*call_value_indirect_aix<mode>_nospec): Likewise.
18857 (*call_indirect_elfv2<mode>_nospec): Likewise.
18858 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18859 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18860 change assembly output from . to $.
18861 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18862 (indirect_jump<mode>_nospec): Change assembly output from . to $.
18863 (*tablejump<mode>_internal1_nospec): Likewise.
18865 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
18868 * config/sh/sh_optimize_sett_clrt.cc:
18869 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18871 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
18873 PR tree-optimization/83940
18874 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18875 offset_dt to vect_constant_def rather than vect_unknown_def_type.
18876 (vect_check_load_store_mask): Add a mask_dt_out parameter and
18877 use it to pass back the definition type.
18878 (vect_check_store_rhs): Likewise rhs_dt_out.
18879 (vect_build_gather_load_calls): Add a mask_dt argument and use
18880 it instead of a call to vect_is_simple_use.
18881 (vectorizable_store): Update calls to vect_check_load_store_mask
18882 and vect_check_store_rhs. Use the dt returned by the latter instead
18883 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
18884 instead of calls to vect_is_simple_use. Pass the scalar rather
18885 than the vector operand to vect_is_simple_use when handling
18886 second and subsequent copies of an rhs value.
18887 (vectorizable_load): Update calls to vect_check_load_store_mask
18888 and vect_build_gather_load_calls. Use the cached mask_dt and
18889 gs_info.offset_dt instead of calls to vect_is_simple_use.
18891 2018-01-20 Jakub Jelinek <jakub@redhat.com>
18893 PR middle-end/83945
18894 * tree-emutls.c: Include gimplify.h.
18895 (lower_emutls_2): New function.
18896 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18897 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18898 it before further processing.
18901 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18902 UINTVAL (trueop1) instead of INTVAL (op1).
18904 2018-01-19 Jakub Jelinek <jakub@redhat.com>
18908 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18909 INCOMING_FRAME_SP_OFFSET if not defined.
18910 (scan_trace): Add ENTRY argument. If true and
18911 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18912 emit a note to adjust the CFA offset.
18913 (create_cfi_notes): Adjust scan_trace callers.
18914 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18915 INCOMING_FRAME_SP_OFFSET in the CIE.
18916 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18917 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18919 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18920 * doc/tm.texi: Regenerated.
18922 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18924 PR rtl-optimization/83147
18925 * lra-constraints.c (remove_inheritance_pseudos): Use
18926 lra_substitute_pseudo_within_insn.
18928 2018-01-19 Tom de Vries <tom@codesourcery.com>
18929 Cesar Philippidis <cesar@codesourcery.com>
18932 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18934 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
18937 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18938 spaces for function labels.
18940 2018-01-19 Martin Liska <mliska@suse.cz>
18942 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18943 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18944 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18945 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18946 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18947 (PRED_CONST_RETURN): Change from 69 to 65.
18948 (PRED_NULL_RETURN): Change from 91 to 71.
18949 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18950 (PRED_LOOP_GUARD): Change from 66 to 73.
18952 2018-01-19 Martin Liska <mliska@suse.cz>
18954 * predict.c (predict_insn_def): Add new assert.
18955 (struct branch_predictor): Change type to signed integer.
18956 (test_prediction_value_range): Amend test to cover
18957 PROB_UNINITIALIZED.
18958 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18959 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18960 (PRED_LOOP_ITERATIONS_MAX): Likewise.
18961 (PRED_LOOP_IV_COMPARE): Likewise.
18962 * predict.h (PROB_UNINITIALIZED): Define new constant.
18964 2018-01-19 Martin Liska <mliska@suse.cz>
18966 * predict.c (dump_prediction): Add new format for
18967 analyze_brprob.py script which is enabled with -details
18969 * profile-count.h (precise_p): New function.
18971 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18973 PR tree-optimization/83922
18974 * tree-vect-loop.c (vect_verify_full_masking): Return false if
18975 there are no statements that need masking.
18976 (vect_active_double_reduction_p): New function.
18977 (vect_analyze_loop_operations): Use it when handling phis that
18978 are not in the loop header.
18980 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18982 PR tree-optimization/83914
18983 * tree-vect-loop.c (vectorizable_induction): Don't convert
18984 init_expr or apply the peeling adjustment for inductions
18985 that are nested within the vectorized loop.
18987 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18989 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18992 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18996 * function.h (gimplify_parameters): Add gimple_seq * argument.
18997 * function.c: Include gimple.h and options.h.
18998 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18999 for the added local temporaries if needed.
19000 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
19001 if there are any parameter cleanups, wrap whole body into a
19002 try/finally with the cleanups.
19004 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
19007 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
19008 Use GET_MODE_CLASS for scalar floating point.
19010 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19014 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19015 Fix call of call_cgraph_insertion_hooks.
19017 2018-01-18 Martin Sebor <msebor@redhat.com>
19019 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19021 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19024 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19027 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19030 * common.opt: (-ffile-prefix-map): New option.
19031 * opts.c (common_handle_option): Defer it.
19032 * opts-global.c (handle_common_deferred_options): Handle it.
19033 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19034 * file-prefix-map.h: New file.
19035 (remap_debug_filename, add_debug_prefix_map): ...here.
19036 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19037 * final.c (debug_prefix_map, add_debug_prefix_map
19038 remap_debug_filename): Move to...
19039 * file-prefix-map.c: New file.
19040 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19041 generalize, get rid of alloca(), use strrchr() instead of strchr().
19042 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19043 Implement in terms of add_prefix_map().
19044 (remap_macro_filename, remap_debug_filename): Implement in term of
19046 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19047 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19048 * dbxout.c: Include file-prefix-map.h.
19049 * varasm.c: Likewise.
19050 * vmsdbgout.c: Likewise.
19051 * xcoffout.c: Likewise.
19052 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19053 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19054 * doc/invoke.texi (-ffile-prefix-map): Document.
19055 (-fdebug-prefix-map): Update description.
19057 2018-01-18 Martin Liska <mliska@suse.cz>
19059 * config/i386/i386.c (indirect_thunk_name): Document that also
19061 (output_indirect_thunk): Document why both instructions
19062 (pause and lfence) are generated.
19064 2018-01-18 Richard Biener <rguenther@suse.de>
19066 PR tree-optimization/83887
19067 * graphite-scop-detection.c
19068 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19069 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19070 (scop_detection::merge_sese): Re-implement with a flood-fill
19071 algorithm that properly finds a SESE region if it exists.
19073 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19076 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19077 pointer_diff optimizations use view_convert instead of convert.
19079 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19081 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19082 Generate different code for -mno-speculate-indirect-jumps.
19083 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19084 (*call_indirect_aix<mode>): Disable for
19085 -mno-speculate-indirect-jumps.
19086 (*call_indirect_aix<mode>_nospec): New define_insn.
19087 (*call_value_indirect_aix<mode>): Disable for
19088 -mno-speculate-indirect-jumps.
19089 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19090 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19091 -mno-speculate-indirect-jumps.
19092 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19094 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19096 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19097 long double type, set the flags for noting the default long double
19098 type, even if we don't pass or return a long double type.
19100 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19103 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19106 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19108 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19109 support for merge[hl].
19110 (fold_mergehl_helper): New helper function.
19111 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19112 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19113 (altivec_vmrglw_direct): Add xxmrglw insn.
19115 2018-01-17 Andrew Waterman <andrew@sifive.com>
19117 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19118 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19120 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19123 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19124 call the lto_location_cache before reading the
19125 DECL_SOURCE_LOCATION of the types.
19127 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19128 Richard Sandiford <richard.sandiford@linaro.org>
19130 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19131 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19132 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19133 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19134 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19136 * config/aarch64/constraints.md (aarch64_movti_operand):
19138 * config/aarch64/predicates.md (Uti): Add new constraint.
19140 2018-01-17 Carl Love <cel@us.ibm.com>
19142 * config/rs6000/vsx.md (define_expand xl_len_r,
19143 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19144 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19146 (define_expand, define_insn): Move the shift left from the
19147 define_insn to the define_expand for lxvl and stxvl instructions.
19148 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19149 and XL_LEN_R definitions to PURE.
19151 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19153 * config/i386/i386.c (indirect_thunk_name): Declare regno
19154 as unsigned int. Compare regno with INVALID_REGNUM.
19155 (output_indirect_thunk): Ditto.
19156 (output_indirect_thunk_function): Ditto.
19157 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19158 in the call to output_indirect_thunk_function.
19160 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19162 PR middle-end/83884
19163 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19164 rather than the size of inner_type to determine the stack slot size
19165 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19167 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19170 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19173 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19175 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19176 endian Linux systems to optionally enable multilibs for selecting
19177 the long double type if the user configured an explicit type.
19178 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19179 have no long double multilibs if not defined.
19180 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19181 warn if the user used -mabi={ieee,ibm}longdouble and we built
19182 multilibs for long double.
19183 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19184 appropriate multilib option.
19185 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19187 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19188 for building long double multilibs.
19189 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19191 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19193 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19196 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19198 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19201 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19204 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19207 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19209 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19210 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19212 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19214 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19215 different rtl trees depending on TARGET_64BIT.
19216 (rs6000_gen_lvx): Likewise.
19218 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19220 * config/visium/visium.md (nop): Tweak comment.
19221 (hazard_nop): Likewise.
19223 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19225 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19226 -mspeculate-indirect-jumps.
19227 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19228 for -mno-speculate-indirect-jumps.
19229 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19230 (*call_value_indirect_elfv2<mode>): Disable for
19231 -mno-speculate-indirect-jumps.
19232 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19233 (indirect_jump): Emit different RTL for
19234 -mno-speculate-indirect-jumps.
19235 (*indirect_jump<mode>): Disable for
19236 -mno-speculate-indirect-jumps.
19237 (*indirect_jump<mode>_nospec): New define_insn.
19238 (tablejump): Emit different RTL for
19239 -mno-speculate-indirect-jumps.
19240 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19241 (tablejumpsi_nospec): New define_expand.
19242 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19243 (tablejumpdi_nospec): New define_expand.
19244 (*tablejump<mode>_internal1): Disable for
19245 -mno-speculate-indirect-jumps.
19246 (*tablejump<mode>_internal1_nospec): New define_insn.
19247 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19250 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19252 * caller-save.c (insert_save): Drop unnecessary parameter. All
19255 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19256 Richard Biener <rguenth@suse.de>
19259 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19260 return early, inline manually is_gimple_sizepos. Make sure if we
19261 call gimplify_expr we don't end up with a gimple constant.
19262 * tree.c (variably_modified_type_p): Don't return true for
19263 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19264 * gimplify.h (is_gimple_sizepos): Remove.
19266 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19268 PR tree-optimization/83857
19269 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19270 vectorizable_live_operation for pure SLP statements.
19271 (vectorizable_live_operation): Handle PHIs.
19273 2018-01-16 Richard Biener <rguenther@suse.de>
19275 PR tree-optimization/83867
19276 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19277 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19279 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19282 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19283 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19284 If off is not INTEGER_CST, issue a may not be aligned warning
19285 rather than isn't aligned. Use isn%'t rather than isn't.
19286 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19288 <case MULT_EXPR>: Improve the case when bottom and one of the
19289 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19290 operand, in that case check if the other operand is multiple of
19291 bottom divided by the INTEGER_CST operand.
19293 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19296 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19297 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19298 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19299 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19300 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19301 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19302 (pa_function_arg_size): New function.
19304 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19306 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19307 in a separate statement.
19309 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19311 PR tree-optimization/83847
19312 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19313 group gathers and scatters.
19315 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19317 PR rtl-optimization/86620
19318 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19320 PR rtl-optimization/83213
19321 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19322 to last if both are JUMP_INSNs.
19324 PR tree-optimization/83843
19325 * gimple-ssa-store-merging.c
19326 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19327 store_immediate_info for bswap/nop orig_stores.
19329 2018-01-15 Andrew Waterman <andrew@sifive.com>
19331 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19333 <UDIV>: Increase cost if !TARGET_DIV.
19335 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19337 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19338 (define_attr "cr_logical_3op"): New.
19339 (cceq_ior_compare): Adjust.
19340 (cceq_ior_compare_complement): Adjust.
19341 (*cceq_rev_compare): Adjust.
19342 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19343 (is_cracked_insn): Adjust.
19344 (insn_must_be_first_in_group): Adjust.
19345 * config/rs6000/40x.md: Adjust.
19346 * config/rs6000/440.md: Adjust.
19347 * config/rs6000/476.md: Adjust.
19348 * config/rs6000/601.md: Adjust.
19349 * config/rs6000/603.md: Adjust.
19350 * config/rs6000/6xx.md: Adjust.
19351 * config/rs6000/7450.md: Adjust.
19352 * config/rs6000/7xx.md: Adjust.
19353 * config/rs6000/8540.md: Adjust.
19354 * config/rs6000/cell.md: Adjust.
19355 * config/rs6000/e300c2c3.md: Adjust.
19356 * config/rs6000/e500mc.md: Adjust.
19357 * config/rs6000/e500mc64.md: Adjust.
19358 * config/rs6000/e5500.md: Adjust.
19359 * config/rs6000/e6500.md: Adjust.
19360 * config/rs6000/mpc.md: Adjust.
19361 * config/rs6000/power4.md: Adjust.
19362 * config/rs6000/power5.md: Adjust.
19363 * config/rs6000/power6.md: Adjust.
19364 * config/rs6000/power7.md: Adjust.
19365 * config/rs6000/power8.md: Adjust.
19366 * config/rs6000/power9.md: Adjust.
19367 * config/rs6000/rs64.md: Adjust.
19368 * config/rs6000/titan.md: Adjust.
19370 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19372 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19373 ix86_indirect_branch_register logic.
19375 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19377 * config/i386/constraints.md (Bs): Update
19378 ix86_indirect_branch_register check. Don't check
19379 ix86_indirect_branch_register with GOT_memory_operand.
19381 * config/i386/predicates.md (GOT_memory_operand): Don't check
19382 ix86_indirect_branch_register here.
19383 (GOT32_symbol_operand): Likewise.
19385 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19387 * config/i386/predicates.md (constant_call_address_operand):
19388 Rewrite ix86_indirect_branch_register logic.
19389 (sibcall_insn_operand): Likewise.
19391 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19393 * config/i386/constraints.md (Bs): Replace
19394 ix86_indirect_branch_thunk_register with
19395 ix86_indirect_branch_register.
19397 * config/i386/i386.md (indirect_jump): Likewise.
19398 (tablejump): Likewise.
19399 (*sibcall_memory): Likewise.
19400 (*sibcall_value_memory): Likewise.
19401 Peepholes of indirect call and jump via memory: Likewise.
19402 * config/i386/i386.opt: Likewise.
19403 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19404 (GOT_memory_operand): Likewise.
19405 (call_insn_operand): Likewise.
19406 (sibcall_insn_operand): Likewise.
19407 (GOT32_symbol_operand): Likewise.
19409 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19411 PR middle-end/83837
19412 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19413 type rather than type addr's type points to.
19414 (expand_omp_atomic_mutex): Likewise.
19415 (expand_omp_atomic): Likewise.
19417 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19420 * config/i386/i386.c (output_indirect_thunk_function): Use
19421 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19422 for __x86_return_thunk.
19424 2018-01-15 Richard Biener <rguenther@suse.de>
19426 PR middle-end/83850
19427 * expmed.c (extract_bit_field_1): Fix typo.
19429 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19432 * config/arm/iterators.md (VF): New mode iterator.
19433 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19434 Remove integer-related logic from pattern.
19435 (neon_vabd<mode>_3): Likewise.
19437 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19439 PR middle-end/82694
19440 * common.opt (fstrict-overflow): No longer an alias.
19441 (fwrapv-pointer): New option.
19442 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19443 also for pointer types based on flag_wrapv_pointer.
19444 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19445 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19446 opts->x_flag_wrapv got set.
19447 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19448 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19449 POINTER_TYPE_OVERFLOW_UNDEFINED.
19450 * match.pd: Likewise in address comparison pattern.
19451 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19453 2018-01-15 Richard Biener <rguenther@suse.de>
19456 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19457 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19458 Reset type names to their identifier if their TYPE_DECL doesn't
19459 have linkage (and thus is used for ODR and devirt).
19460 (save_debug_info_for_decl): Remove.
19461 (save_debug_info_for_type): Likewise.
19462 (add_tree_to_fld_list): Adjust.
19463 * tree-pretty-print.c (dump_generic_node): Make dumping of
19464 type names more robust.
19466 2018-01-15 Richard Biener <rguenther@suse.de>
19468 * BASE-VER: Bump to 8.0.1.
19470 2018-01-14 Martin Sebor <msebor@redhat.com>
19473 * builtins.c (check_access): Avoid warning when the no-warning bit
19476 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19478 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19479 * ira-color (allocno_hard_regs_compare): Likewise.
19481 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19484 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19485 Use .pushsection/.popsection.
19487 2018-01-14 Martin Sebor <msebor@redhat.com>
19490 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19492 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19494 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19495 entry from extra_headers.
19496 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19497 extra_headers, make the list bitwise identical to the i?86-*-* one.
19499 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19501 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19502 -mcmodel=large with -mindirect-branch=thunk,
19503 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19504 -mfunction-return=thunk-extern.
19505 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19506 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19507 -mfunction-return=thunk and -mfunction-return=thunk-extern.
19509 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19511 * config/i386/i386.c (print_reg): Print the name of the full
19512 integer register without '%'.
19513 (ix86_print_operand): Handle 'V'.
19514 * doc/extend.texi: Document 'V' modifier.
19516 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19518 * config/i386/constraints.md (Bs): Disallow memory operand for
19519 -mindirect-branch-register.
19521 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19522 (GOT_memory_operand): Likewise.
19523 (call_insn_operand): Likewise.
19524 (sibcall_insn_operand): Likewise.
19525 (GOT32_symbol_operand): Likewise.
19526 * config/i386/i386.md (indirect_jump): Call convert_memory_address
19527 for -mindirect-branch-register.
19528 (tablejump): Likewise.
19529 (*sibcall_memory): Likewise.
19530 (*sibcall_value_memory): Likewise.
19531 Disallow peepholes of indirect call and jump via memory for
19532 -mindirect-branch-register.
19533 (*call_pop): Replace m with Bw.
19534 (*call_value_pop): Likewise.
19535 (*sibcall_pop_memory): Replace m with Bs.
19536 * config/i386/i386.opt (mindirect-branch-register): New option.
19537 * doc/invoke.texi: Document -mindirect-branch-register option.
19539 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19541 * config/i386/i386-protos.h (ix86_output_function_return): New.
19542 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19543 set function_return_type.
19544 (indirect_thunk_name): Add ret_p to indicate thunk for function
19546 (output_indirect_thunk_function): Pass false to
19547 indirect_thunk_name.
19548 (ix86_output_indirect_branch_via_reg): Likewise.
19549 (ix86_output_indirect_branch_via_push): Likewise.
19550 (output_indirect_thunk_function): Create alias for function
19551 return thunk if regno < 0.
19552 (ix86_output_function_return): New function.
19553 (ix86_handle_fndecl_attribute): Handle function_return.
19554 (ix86_attribute_table): Add function_return.
19555 * config/i386/i386.h (machine_function): Add
19556 function_return_type.
19557 * config/i386/i386.md (simple_return_internal): Use
19558 ix86_output_function_return.
19559 (simple_return_internal_long): Likewise.
19560 * config/i386/i386.opt (mfunction-return=): New option.
19561 (indirect_branch): Mention -mfunction-return=.
19562 * doc/extend.texi: Document function_return function attribute.
19563 * doc/invoke.texi: Document -mfunction-return= option.
19565 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19567 * config/i386/i386-opts.h (indirect_branch): New.
19568 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19569 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19570 with local indirect jump when converting indirect call and jump.
19571 (ix86_set_indirect_branch_type): New.
19572 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19573 (indirectlabelno): New.
19574 (indirect_thunk_needed): Likewise.
19575 (indirect_thunk_bnd_needed): Likewise.
19576 (indirect_thunks_used): Likewise.
19577 (indirect_thunks_bnd_used): Likewise.
19578 (INDIRECT_LABEL): Likewise.
19579 (indirect_thunk_name): Likewise.
19580 (output_indirect_thunk): Likewise.
19581 (output_indirect_thunk_function): Likewise.
19582 (ix86_output_indirect_branch_via_reg): Likewise.
19583 (ix86_output_indirect_branch_via_push): Likewise.
19584 (ix86_output_indirect_branch): Likewise.
19585 (ix86_output_indirect_jmp): Likewise.
19586 (ix86_code_end): Call output_indirect_thunk_function if needed.
19587 (ix86_output_call_insn): Call ix86_output_indirect_branch if
19589 (ix86_handle_fndecl_attribute): Handle indirect_branch.
19590 (ix86_attribute_table): Add indirect_branch.
19591 * config/i386/i386.h (machine_function): Add indirect_branch_type
19592 and has_local_indirect_jump.
19593 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19595 (tablejump): Likewise.
19596 (*indirect_jump): Use ix86_output_indirect_jmp.
19597 (*tablejump_1): Likewise.
19598 (simple_return_indirect_internal): Likewise.
19599 * config/i386/i386.opt (mindirect-branch=): New option.
19600 (indirect_branch): New.
19603 (thunk-inline): Likewise.
19604 (thunk-extern): Likewise.
19605 * doc/extend.texi: Document indirect_branch function attribute.
19606 * doc/invoke.texi: Document -mindirect-branch= option.
19608 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
19611 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19613 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
19615 * ipa-inline.c (want_inline_small_function_p): Return false if
19616 inlining has already failed with CIF_FINAL_ERROR.
19617 (update_caller_keys): Call want_inline_small_function_p before
19619 (update_callee_keys): Likewise.
19621 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19623 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19625 (rs6000_quadword_masked_address_p): Likewise.
19626 (quad_aligned_load_p): Likewise.
19627 (quad_aligned_store_p): Likewise.
19628 (const_load_sequence_p): Add comment to describe the outer-most loop.
19629 (mimic_memory_attributes_and_flags): New function.
19630 (rs6000_gen_stvx): Likewise.
19631 (replace_swapped_aligned_store): Likewise.
19632 (rs6000_gen_lvx): Likewise.
19633 (replace_swapped_aligned_load): Likewise.
19634 (replace_swapped_load_constant): Capitalize argument name in
19635 comment describing this function.
19636 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19637 and stores that access quad-word aligned addresses and replace
19638 with stvx or lvx instructions when appropriate.
19639 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19640 New function prototype.
19641 (rs6000_quadword_masked_address_p): Likewise.
19642 (rs6000_gen_lvx): Likewise.
19643 (rs6000_gen_stvx): Likewise.
19644 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19645 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19646 when memory address is aligned.
19647 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19648 this split to select lvx instruction when memory address is aligned.
19649 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19650 instruction when memory address is aligned.
19651 (*vsx_le_perm_load_v16qi): Likewise.
19652 (four unnamed splitters): Modify to select the stvx instruction
19653 when memory is aligned.
19655 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19657 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19658 which appears in the queue multiple times.
19660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19661 Alan Hayward <alan.hayward@arm.com>
19662 David Sherwood <david.sherwood@arm.com>
19664 * tree-vectorizer.h (vec_lower_bound): New structure.
19665 (_loop_vec_info): Add check_nonzero and lower_bounds.
19666 (LOOP_VINFO_CHECK_NONZERO): New macro.
19667 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19668 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19669 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19670 fields. Make seg_len the distance travelled, not including the
19672 (dr_direction_indicator): Declare.
19673 (dr_zero_step_indicator): Likewise.
19674 (dr_known_forward_stride_p): Likewise.
19675 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19677 (runtime_alias_check_p): Allow runtime alias checks with
19679 (operator ==): Compare access_size and align.
19680 (prune_runtime_alias_test_list): Rework for new distinction between
19681 the access_size and seg_len.
19682 (create_intersect_range_checks_index): Likewise. Cope with polynomial
19684 (get_segment_min_max): New function.
19685 (create_intersect_range_checks): Use it.
19686 (dr_step_indicator): New function.
19687 (dr_direction_indicator): Likewise.
19688 (dr_zero_step_indicator): Likewise.
19689 (dr_known_forward_stride_p): Likewise.
19690 * tree-loop-distribution.c (data_ref_segment_size): Return
19691 DR_STEP * (niters - 1).
19692 (compute_alias_check_pairs): Update call to the dr_with_seg_len
19694 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19695 (vect_preserves_scalar_order_p): New function, split out from...
19696 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
19697 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19698 (vect_vfa_access_size): New function.
19699 (vect_vfa_align): Likewise.
19700 (vect_compile_time_alias): Take access_size_a and access_b arguments.
19701 (dump_lower_bound): New function.
19702 (vect_check_lower_bound): Likewise.
19703 (vect_small_gap_p): Likewise.
19704 (vectorizable_with_step_bound_p): Likewise.
19705 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19706 depencies if the vectorization factor is 1. Convert the checks
19707 for nonzero steps into checks on the bounds of DR_STEP. Try using
19708 a bunds check for variable steps if the minimum required step is
19709 relatively small. Update calls to the dr_with_seg_len
19710 constructor and to vect_compile_time_alias.
19711 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19713 (vect_loop_versioning): Call it.
19714 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19716 (vect_estimate_min_profitable_iters): Account for any bounds checks.
19718 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19719 Alan Hayward <alan.hayward@arm.com>
19720 David Sherwood <david.sherwood@arm.com>
19722 * doc/sourcebuild.texi (vect_scatter_store): Document.
19723 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19725 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19727 * genopinit.c (main): Add supports_vec_scatter_store and
19728 supports_vec_scatter_store_cached to target_optabs.
19729 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19730 IFN_MASK_SCATTER_STORE.
19731 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19733 * internal-fn.h (internal_store_fn_p): Declare.
19734 (internal_fn_stored_value_index): Likewise.
19735 * internal-fn.c (scatter_store_direct): New macro.
19736 (expand_scatter_store_optab_fn): New function.
19737 (direct_scatter_store_optab_supported_p): New macro.
19738 (internal_store_fn_p): New function.
19739 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19740 IFN_MASK_SCATTER_STORE.
19741 (internal_fn_mask_index): Likewise.
19742 (internal_fn_stored_value_index): New function.
19743 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19744 for scatter stores.
19745 * optabs-query.h (supports_vec_scatter_store_p): Declare.
19746 * optabs-query.c (supports_vec_scatter_store_p): New function.
19747 * tree-vectorizer.h (vect_get_store_rhs): Declare.
19748 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19749 true for scatter stores.
19750 (vect_gather_scatter_fn_p): Handle scatter stores too.
19751 (vect_check_gather_scatter): Consider using scatter stores if
19752 supports_vec_scatter_store_p.
19753 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19754 scatter stores too.
19755 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19756 internal_fn_stored_value_index.
19757 (check_load_store_masking): Handle scatter stores too.
19758 (vect_get_store_rhs): Make public.
19759 (vectorizable_call): Use internal_store_fn_p.
19760 (vectorizable_store): Handle scatter store internal functions.
19761 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19762 when deciding whether the end of the group has been reached.
19763 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19764 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19765 (mask_scatter_store<mode>): New insns.
19767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19768 Alan Hayward <alan.hayward@arm.com>
19769 David Sherwood <david.sherwood@arm.com>
19771 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19772 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19773 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19775 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19776 Use vect_truncate_gather_scatter_offset if we can't treat the
19777 operation as a normal gather load or scatter store.
19778 (get_group_load_store_type): Take the gather_scatter_info
19779 as argument. Try using a gather load or scatter store for
19780 single-element groups.
19781 (get_load_store_type): Update calls to get_group_load_store_type
19782 and vect_use_strided_gather_scatters_p.
19784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19785 Alan Hayward <alan.hayward@arm.com>
19786 David Sherwood <david.sherwood@arm.com>
19788 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19789 optional tree argument.
19790 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19792 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19793 but continue to use the current value as a fallback.
19794 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19795 to compare the updates.
19796 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19797 (get_load_store_type): Use it when handling a strided access.
19798 (vect_get_strided_load_store_ops): New function.
19799 (vect_get_data_ptr_increment): Likewise.
19800 (vectorizable_load): Handle strided gather loads. Always pass
19801 a step to vect_create_data_ref_ptr and bump_vector_ptr.
19803 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19804 Alan Hayward <alan.hayward@arm.com>
19805 David Sherwood <david.sherwood@arm.com>
19807 * doc/md.texi (gather_load@var{m}): Document.
19808 (mask_gather_load@var{m}): Likewise.
19809 * genopinit.c (main): Add supports_vec_gather_load and
19810 supports_vec_gather_load_cached to target_optabs.
19811 * optabs-tree.c (init_tree_optimization_optabs): Use
19812 ggc_cleared_alloc to allocate target_optabs.
19813 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19814 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19816 * internal-fn.h (internal_load_fn_p): Declare.
19817 (internal_gather_scatter_fn_p): Likewise.
19818 (internal_fn_mask_index): Likewise.
19819 (internal_gather_scatter_fn_supported_p): Likewise.
19820 * internal-fn.c (gather_load_direct): New macro.
19821 (expand_gather_load_optab_fn): New function.
19822 (direct_gather_load_optab_supported_p): New macro.
19823 (direct_internal_fn_optab): New function.
19824 (internal_load_fn_p): Likewise.
19825 (internal_gather_scatter_fn_p): Likewise.
19826 (internal_fn_mask_index): Likewise.
19827 (internal_gather_scatter_fn_supported_p): Likewise.
19828 * optabs-query.c (supports_at_least_one_mode_p): New function.
19829 (supports_vec_gather_load_p): Likewise.
19830 * optabs-query.h (supports_vec_gather_load_p): Declare.
19831 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19832 and memory_type field.
19833 (NUM_PATTERNS): Bump to 15.
19834 * tree-vect-data-refs.c: Include internal-fn.h.
19835 (vect_gather_scatter_fn_p): New function.
19836 (vect_describe_gather_scatter_call): Likewise.
19837 (vect_check_gather_scatter): Try using internal functions for
19838 gather loads. Recognize existing calls to a gather load function.
19839 (vect_analyze_data_refs): Consider using gather loads if
19840 supports_vec_gather_load_p.
19841 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19842 (vect_get_gather_scatter_offset_type): Likewise.
19843 (vect_convert_mask_for_vectype): Likewise.
19844 (vect_add_conversion_to_patterm): Likewise.
19845 (vect_try_gather_scatter_pattern): Likewise.
19846 (vect_recog_gather_scatter_pattern): New pattern recognizer.
19847 (vect_vect_recog_func_ptrs): Add it.
19848 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19849 internal_fn_mask_index and internal_gather_scatter_fn_p.
19850 (check_load_store_masking): Take the gather_scatter_info as an
19851 argument and handle gather loads.
19852 (vect_get_gather_scatter_ops): New function.
19853 (vectorizable_call): Check internal_load_fn_p.
19854 (vectorizable_load): Likewise. Handle gather load internal
19856 (vectorizable_store): Update call to check_load_store_masking.
19857 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19858 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19859 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19860 (aarch64_gather_scale_operand_d): New predicates.
19861 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19862 (mask_gather_load<mode>): New insns.
19864 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19865 Alan Hayward <alan.hayward@arm.com>
19866 David Sherwood <david.sherwood@arm.com>
19868 * optabs.def (fold_left_plus_optab): New optab.
19869 * doc/md.texi (fold_left_plus_@var{m}): Document.
19870 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19871 * internal-fn.c (fold_left_direct): Define.
19872 (expand_fold_left_optab_fn): Likewise.
19873 (direct_fold_left_optab_supported_p): Likewise.
19874 * fold-const-call.c (fold_const_fold_left): New function.
19875 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19876 * tree-parloops.c (valid_reduction_p): New function.
19877 (gather_scalar_reductions): Use it.
19878 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19879 (vect_finish_replace_stmt): Declare.
19880 * tree-vect-loop.c (fold_left_reduction_fn): New function.
19881 (needs_fold_left_reduction_p): New function, split out from...
19882 (vect_is_simple_reduction): ...here. Accept reductions that
19883 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19884 (vect_force_simple_reduction): Also store the reduction type in
19885 the assignment's STMT_VINFO_REDUC_TYPE.
19886 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19887 (merge_with_identity): New function.
19888 (vect_expand_fold_left): Likewise.
19889 (vectorize_fold_left_reduction): Likewise.
19890 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
19891 scalar phi in place for it. Check for target support and reject
19892 cases that would reassociate the operation. Defer the transform
19893 phase to vectorize_fold_left_reduction.
19894 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19895 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19896 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19898 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19900 * tree-if-conv.c (predicate_mem_writes): Remove redundant
19901 call to ifc_temp_var.
19903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19904 Alan Hayward <alan.hayward@arm.com>
19905 David Sherwood <david.sherwood@arm.com>
19907 * target.def (legitimize_address_displacement): Take the original
19908 offset as a poly_int.
19909 * targhooks.h (default_legitimize_address_displacement): Update
19911 * targhooks.c (default_legitimize_address_displacement): Likewise.
19912 * doc/tm.texi: Regenerate.
19913 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19914 as an argument, moving assert of ad->disp == ad->disp_term to...
19915 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
19916 Try calling targetm.legitimize_address_displacement before expanding
19917 the address rather than afterwards, and adjust for the new interface.
19918 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19919 Match the new hook interface. Handle SVE addresses.
19920 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19921 new hook interface.
19923 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19925 * Makefile.in (OBJS): Add early-remat.o.
19926 * target.def (select_early_remat_modes): New hook.
19927 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19928 * doc/tm.texi: Regenerate.
19929 * targhooks.h (default_select_early_remat_modes): Declare.
19930 * targhooks.c (default_select_early_remat_modes): New function.
19931 * timevar.def (TV_EARLY_REMAT): New timevar.
19932 * passes.def (pass_early_remat): New pass.
19933 * tree-pass.h (make_pass_early_remat): Declare.
19934 * early-remat.c: New file.
19935 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19937 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19939 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19940 Alan Hayward <alan.hayward@arm.com>
19941 David Sherwood <david.sherwood@arm.com>
19943 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19944 vfm1 with a bound_epilog parameter.
19945 (vect_do_peeling): Update calls accordingly, and move the prologue
19946 call earlier in the function. Treat the base bound_epilog as 0 for
19947 fully-masked loops and retain vf - 1 for other loops. Add 1 to
19948 this base when peeling for gaps.
19949 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19950 with fully-masked loops.
19951 (vect_estimate_min_profitable_iters): Handle the single peeled
19952 iteration in that case.
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-vect-data-refs.c (vect_analyze_group_access_1): Allow
19959 single-element interleaving even if the size is not a power of 2.
19960 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19961 accesses for single-element interleaving if the group size is
19964 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19965 Alan Hayward <alan.hayward@arm.com>
19966 David Sherwood <david.sherwood@arm.com>
19968 * doc/md.texi (fold_extract_last_@var{m}): Document.
19969 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19970 * optabs.def (fold_extract_last_optab): New optab.
19971 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19972 * internal-fn.c (fold_extract_direct): New macro.
19973 (expand_fold_extract_optab_fn): Likewise.
19974 (direct_fold_extract_optab_supported_p): Likewise.
19975 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19976 * tree-vect-loop.c (vect_model_reduction_cost): Handle
19977 EXTRACT_LAST_REDUCTION.
19978 (get_initial_def_for_reduction): Do not create an initial vector
19979 for EXTRACT_LAST_REDUCTION reductions.
19980 (vectorizable_reduction): Leave the scalar phi in place for
19981 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
19982 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
19983 epilogue code for EXTRACT_LAST_REDUCTION and defer the
19984 transform phase to vectorizable_condition.
19985 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19987 (vect_finish_stmt_generation): ...here.
19988 (vect_finish_replace_stmt): New function.
19989 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19990 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19992 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19994 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19995 Alan Hayward <alan.hayward@arm.com>
19996 David Sherwood <david.sherwood@arm.com>
19998 * doc/md.texi (extract_last_@var{m}): Document.
19999 * optabs.def (extract_last_optab): New optab.
20000 * internal-fn.def (EXTRACT_LAST): New internal function.
20001 * internal-fn.c (cond_unary_direct): New macro.
20002 (expand_cond_unary_optab_fn): Likewise.
20003 (direct_cond_unary_optab_supported_p): Likewise.
20004 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
20005 loops using EXTRACT_LAST.
20006 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
20007 (extract_last_<mode>): ...this optab.
20008 (vec_extract<mode><Vel>): Update accordingly.
20010 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20011 Alan Hayward <alan.hayward@arm.com>
20012 David Sherwood <david.sherwood@arm.com>
20014 * target.def (empty_mask_is_expensive): New hook.
20015 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20016 * doc/tm.texi: Regenerate.
20017 * targhooks.h (default_empty_mask_is_expensive): Declare.
20018 * targhooks.c (default_empty_mask_is_expensive): New function.
20019 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20020 if the target says that empty masks are expensive.
20021 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20023 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
20025 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20026 Alan Hayward <alan.hayward@arm.com>
20027 David Sherwood <david.sherwood@arm.com>
20029 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20030 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20031 (vect_use_loop_mask_for_alignment_p): New function.
20032 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20033 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20034 niters_skip argument. Make sure that the first niters_skip elements
20035 of the first iteration are inactive.
20036 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20037 Update call to vect_set_loop_masks_directly.
20038 (get_misalign_in_elems): New function, split out from...
20039 (vect_gen_prolog_loop_niters): ...here.
20040 (vect_update_init_of_dr): Take a code argument that specifies whether
20041 the adjustment should be added or subtracted.
20042 (vect_update_init_of_drs): Likewise.
20043 (vect_prepare_for_masked_peels): New function.
20044 (vect_do_peeling): Skip prologue peeling if we're using a mask
20045 instead. Update call to vect_update_inits_of_drs.
20046 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20048 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20049 alignment. Do not include the number of peeled iterations in
20050 the minimum threshold in that case.
20051 (vectorizable_induction): Adjust the start value down by
20052 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20053 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20054 Take the number of skipped iterations into account when calculating
20056 * tree-vect-stmts.c (vect_gen_while_not): New function.
20058 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20059 Alan Hayward <alan.hayward@arm.com>
20060 David Sherwood <david.sherwood@arm.com>
20062 * doc/sourcebuild.texi (vect_fully_masked): Document.
20063 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20064 default value to 0.
20065 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20067 (vect_analyze_loop_2): ...here. Don't check the vectorization
20068 factor against the number of loop iterations if the loop is
20071 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20072 Alan Hayward <alan.hayward@arm.com>
20073 David Sherwood <david.sherwood@arm.com>
20075 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20076 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20077 (dump_groups): Update accordingly.
20078 (iv_use::mem_type): New member variable.
20079 (address_p): New function.
20080 (record_use): Add a mem_type argument and initialize the new
20082 (record_group_use): Add a mem_type argument. Use address_p.
20083 Remove obsolete null checks of base_object. Update call to record_use.
20084 (find_interesting_uses_op): Update call to record_group_use.
20085 (find_interesting_uses_cond): Likewise.
20086 (find_interesting_uses_address): Likewise.
20087 (get_mem_type_for_internal_fn): New function.
20088 (find_address_like_use): Likewise.
20089 (find_interesting_uses_stmt): Try find_address_like_use before
20090 calling find_interesting_uses_op.
20091 (addr_offset_valid_p): Use the iv mem_type field as the type
20092 of the addressed memory.
20093 (add_autoinc_candidates): Likewise.
20094 (get_address_cost): Likewise.
20095 (split_small_address_groups_p): Use address_p.
20096 (split_address_groups): Likewise.
20097 (add_iv_candidate_for_use): Likewise.
20098 (autoinc_possible_for_pair): Likewise.
20099 (rewrite_groups): Likewise.
20100 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20101 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20102 (get_alias_ptr_type_for_ptr_address): New function.
20103 (rewrite_use_address): Rewrite address uses in calls that were
20104 identified by find_address_like_use.
20106 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20107 Alan Hayward <alan.hayward@arm.com>
20108 David Sherwood <david.sherwood@arm.com>
20110 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20112 * gimple-expr.h (is_gimple_addressable: Likewise.
20113 * gimple-expr.c (is_gimple_address): Likewise.
20114 * internal-fn.c (expand_call_mem_ref): New function.
20115 (expand_mask_load_optab_fn): Use it.
20116 (expand_mask_store_optab_fn): Likewise.
20118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20119 Alan Hayward <alan.hayward@arm.com>
20120 David Sherwood <david.sherwood@arm.com>
20122 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20123 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20124 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20125 (cond_umax@var{mode}): Document.
20126 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20127 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20128 (cond_umin_optab, cond_umax_optab): New optabs.
20129 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20130 (COND_IOR, COND_XOR): New internal functions.
20131 * internal-fn.h (get_conditional_internal_fn): Declare.
20132 * internal-fn.c (cond_binary_direct): New macro.
20133 (expand_cond_binary_optab_fn): Likewise.
20134 (direct_cond_binary_optab_supported_p): Likewise.
20135 (get_conditional_internal_fn): New function.
20136 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20137 Cope with reduction statements that are vectorized as calls rather
20139 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20140 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20141 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20142 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20143 (UNSPEC_COND_EOR): New unspecs.
20144 (optab): Add mappings for them.
20145 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20146 (sve_int_op, sve_fp_op): New int attributes.
20148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20149 Alan Hayward <alan.hayward@arm.com>
20150 David Sherwood <david.sherwood@arm.com>
20152 * optabs.def (while_ult_optab): New optab.
20153 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20154 * internal-fn.def (WHILE_ULT): New internal function.
20155 * internal-fn.h (direct_internal_fn_supported_p): New override
20156 that takes two types as argument.
20157 * internal-fn.c (while_direct): New macro.
20158 (expand_while_optab_fn): New function.
20159 (convert_optab_supported_p): Likewise.
20160 (direct_while_optab_supported_p): New macro.
20161 * wide-int.h (wi::udiv_ceil): New function.
20162 * tree-vectorizer.h (rgroup_masks): New structure.
20163 (vec_loop_masks): New typedef.
20164 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20165 and fully_masked_p.
20166 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20167 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20168 (vect_max_vf): New function.
20169 (slpeel_make_loop_iterate_ntimes): Delete.
20170 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20171 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20172 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20173 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20174 internal-fn.h, stor-layout.h and optabs-query.h.
20175 (vect_set_loop_mask): New function.
20176 (add_preheader_seq): Likewise.
20177 (add_header_seq): Likewise.
20178 (interleave_supported_p): Likewise.
20179 (vect_maybe_permute_loop_masks): Likewise.
20180 (vect_set_loop_masks_directly): Likewise.
20181 (vect_set_loop_condition_masked): Likewise.
20182 (vect_set_loop_condition_unmasked): New function, split out from
20183 slpeel_make_loop_iterate_ntimes.
20184 (slpeel_make_loop_iterate_ntimes): Rename to..
20185 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20186 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20187 (vect_do_peeling): Update call accordingly.
20188 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20190 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20191 mask_compare_type, can_fully_mask_p and fully_masked_p.
20192 (release_vec_loop_masks): New function.
20193 (_loop_vec_info): Use it to free the loop masks.
20194 (can_produce_all_loop_masks_p): New function.
20195 (vect_get_max_nscalars_per_iter): Likewise.
20196 (vect_verify_full_masking): Likewise.
20197 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20198 retries, and free the mask rgroups before retrying. Check loop-wide
20199 reasons for disallowing fully-masked loops. Make the final decision
20200 about whether use a fully-masked loop or not.
20201 (vect_estimate_min_profitable_iters): Do not assume that peeling
20202 for the number of iterations will be needed for fully-masked loops.
20203 (vectorizable_reduction): Disable fully-masked loops.
20204 (vectorizable_live_operation): Likewise.
20205 (vect_halve_mask_nunits): New function.
20206 (vect_double_mask_nunits): Likewise.
20207 (vect_record_loop_mask): Likewise.
20208 (vect_get_loop_mask): Likewise.
20209 (vect_transform_loop): Handle the case in which the final loop
20210 iteration might handle a partial vector. Call vect_set_loop_condition
20211 instead of slpeel_make_loop_iterate_ntimes.
20212 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20213 (check_load_store_masking): New function.
20214 (prepare_load_store_mask): Likewise.
20215 (vectorizable_store): Handle fully-masked loops.
20216 (vectorizable_load): Likewise.
20217 (supportable_widening_operation): Use vect_halve_mask_nunits for
20219 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20220 (vect_gen_while): New function.
20221 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20222 (aarch64_uqdec<mode>): New insn.
20224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20225 Alan Hayward <alan.hayward@arm.com>
20226 David Sherwood <david.sherwood@arm.com>
20228 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20229 (reduc_xor_scal_optab): New optabs.
20230 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20231 (reduc_xor_scal_@var{m}): Document.
20232 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20233 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20234 internal functions.
20235 * fold-const-call.c (fold_const_call): Handle them.
20236 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20237 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20238 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20239 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20240 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20241 (UNSPEC_XORV): New unspecs.
20242 (optab): Add entries for them.
20243 (BITWISEV): New int iterator.
20244 (bit_reduc_op): New int attributes.
20246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20247 Alan Hayward <alan.hayward@arm.com>
20248 David Sherwood <david.sherwood@arm.com>
20250 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20251 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20252 * optabs.def (vec_shl_insert_optab): New optab.
20253 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20254 (duplicate_and_interleave): Likewise.
20255 * tree-vect-loop.c: Include internal-fn.h.
20256 (neutral_op_for_slp_reduction): New function, split out from
20257 get_initial_defs_for_reduction.
20258 (get_initial_def_for_reduction): Handle option 2 for variable-length
20259 vectors by loading the neutral value into a vector and then shifting
20260 the initial value into element 0.
20261 (get_initial_defs_for_reduction): Replace the code argument with
20262 the neutral value calculated by neutral_op_for_slp_reduction.
20263 Use gimple_build_vector for constant-length vectors.
20264 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20265 but the first group_size elements have a neutral value.
20266 Use duplicate_and_interleave otherwise.
20267 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20268 Update call to get_initial_defs_for_reduction. Handle SLP
20269 reductions for variable-length vectors by creating one vector
20270 result for each scalar result, with the elements associated
20271 with other scalar results stubbed out with the neutral value.
20272 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20273 Require IFN_VEC_SHL_INSERT for double reductions on
20274 variable-length vectors, or SLP reductions that have
20275 a neutral value. Require can_duplicate_and_interleave_p
20276 support for variable-length unchained SLP reductions if there
20277 is no neutral value, such as for MIN/MAX reductions. Also require
20278 the number of vector elements to be a multiple of the number of
20279 SLP statements when doing variable-length unchained SLP reductions.
20280 Update call to vect_create_epilog_for_reduction.
20281 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20282 and remove initial values.
20283 (duplicate_and_interleave): Make public.
20284 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20285 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20288 Alan Hayward <alan.hayward@arm.com>
20289 David Sherwood <david.sherwood@arm.com>
20291 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20292 (can_duplicate_and_interleave_p): New function.
20293 (vect_get_and_check_slp_defs): Take the vector of statements
20294 rather than just the current one. Remove excess parentheses.
20295 Restriction rejectinon of vect_constant_def and vect_external_def
20296 for variable-length vectors to boolean types, or types for which
20297 can_duplicate_and_interleave_p is false.
20298 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20299 (duplicate_and_interleave): New function.
20300 (vect_get_constant_vectors): Use gimple_build_vector for
20301 constant-length vectors and suitable variable-length constant
20302 vectors. Use duplicate_and_interleave for other variable-length
20303 vectors. Don't defer the update when inserting new statements.
20305 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20306 Alan Hayward <alan.hayward@arm.com>
20307 David Sherwood <david.sherwood@arm.com>
20309 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20310 min_profitable_iters doesn't go negative.
20312 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20313 Alan Hayward <alan.hayward@arm.com>
20314 David Sherwood <david.sherwood@arm.com>
20316 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20317 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20318 * optabs.def (vec_mask_load_lanes_optab): New optab.
20319 (vec_mask_store_lanes_optab): Likewise.
20320 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20321 (MASK_STORE_LANES): Likewise.
20322 * internal-fn.c (mask_load_lanes_direct): New macro.
20323 (mask_store_lanes_direct): Likewise.
20324 (expand_mask_load_optab_fn): Handle masked operations.
20325 (expand_mask_load_lanes_optab_fn): New macro.
20326 (expand_mask_store_optab_fn): Handle masked operations.
20327 (expand_mask_store_lanes_optab_fn): New macro.
20328 (direct_mask_load_lanes_optab_supported_p): Likewise.
20329 (direct_mask_store_lanes_optab_supported_p): Likewise.
20330 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20332 (vect_load_lanes_supported): Likewise.
20333 * tree-vect-data-refs.c (strip_conversion): New function.
20334 (can_group_stmts_p): Likewise.
20335 (vect_analyze_data_ref_accesses): Use it instead of checking
20336 for a pair of assignments.
20337 (vect_store_lanes_supported): Take a masked_p parameter.
20338 (vect_load_lanes_supported): Likewise.
20339 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20340 vect_store_lanes_supported and vect_load_lanes_supported.
20341 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20342 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20343 parameter. Don't allow gaps for masked accesses.
20344 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20345 and vect_load_lanes_supported.
20346 (get_load_store_type): Take a masked_p parameter and update
20347 call to get_group_load_store_type.
20348 (vectorizable_store): Update call to get_load_store_type.
20349 Handle IFN_MASK_STORE_LANES.
20350 (vectorizable_load): Update call to get_load_store_type.
20351 Handle IFN_MASK_LOAD_LANES.
20353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20354 Alan Hayward <alan.hayward@arm.com>
20355 David Sherwood <david.sherwood@arm.com>
20357 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20359 * config/aarch64/aarch64-protos.h
20360 (aarch64_sve_struct_memory_operand_p): Declare.
20361 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20362 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20363 (VPRED, vpred): Handle SVE structure modes.
20364 * config/aarch64/constraints.md (Utx): New constraint.
20365 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20366 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20367 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20368 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20369 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20370 structure modes. Split into pieces after RA.
20371 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20372 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20374 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20375 SVE structure modes.
20376 (aarch64_classify_address): Likewise.
20377 (sizetochar): Move earlier in file.
20378 (aarch64_print_operand): Handle SVE register lists.
20379 (aarch64_array_mode): New function.
20380 (aarch64_sve_struct_memory_operand_p): Likewise.
20381 (TARGET_ARRAY_MODE): Redefine.
20383 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20384 Alan Hayward <alan.hayward@arm.com>
20385 David Sherwood <david.sherwood@arm.com>
20387 * target.def (array_mode): New target hook.
20388 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20389 * doc/tm.texi: Regenerate.
20390 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20391 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20392 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20393 targetm.array_mode.
20394 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20397 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20398 Alan Hayward <alan.hayward@arm.com>
20399 David Sherwood <david.sherwood@arm.com>
20401 * fold-const.c (fold_binary_loc): Check the argument types
20402 rather than the result type when testing for a vector operation.
20404 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20406 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20407 * doc/tm.texi: Regenerate.
20409 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20410 Alan Hayward <alan.hayward@arm.com>
20411 David Sherwood <david.sherwood@arm.com>
20413 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20414 (sve): Document new AArch64 extension.
20415 * doc/md.texi (w): Extend the description of the AArch64
20416 constraint to include SVE vectors.
20417 (Upl, Upa): Document new AArch64 predicate constraints.
20418 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20420 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20421 (msve-vector-bits=): New option.
20422 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20423 SVE when these are disabled.
20424 (sve): New extension.
20425 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20426 modes. Adjust their number of units based on aarch64_sve_vg.
20427 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20428 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20429 aarch64_addr_query_type.
20430 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20431 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20432 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20433 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20434 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20435 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20436 (aarch64_simd_imm_zero_p): Delete.
20437 (aarch64_check_zero_based_sve_index_immediate): Declare.
20438 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20439 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20440 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20441 (aarch64_sve_float_mul_immediate_p): Likewise.
20442 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20443 rather than an rtx.
20444 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20445 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20446 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20447 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20448 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20449 (aarch64_regmode_natural_size): Likewise.
20450 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20451 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20453 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20454 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20455 for VG and the SVE predicate registers.
20456 (V_ALIASES): Add a "z"-prefixed alias.
20457 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20458 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20459 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20460 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20461 (REG_CLASS_NAMES): Add entries for them.
20462 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20463 and the predicate registers.
20464 (aarch64_sve_vg): Declare.
20465 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20466 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20467 (REGMODE_NATURAL_SIZE): Define.
20468 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20470 * config/aarch64/aarch64.c: Include cfgrtl.h.
20471 (simd_immediate_info): Add a constructor for series vectors,
20472 and an associated step field.
20473 (aarch64_sve_vg): New variable.
20474 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20475 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20476 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20477 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20478 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20479 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20480 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20481 (aarch64_get_mask_mode): New functions.
20482 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20483 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20484 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20485 predicate modes and predicate registers. Explicitly restrict
20486 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20487 to store a vector mode if it is recognized by
20488 aarch64_classify_vector_mode.
20489 (aarch64_regmode_natural_size): New function.
20490 (aarch64_hard_regno_caller_save_mode): Return the original mode
20492 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20493 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20494 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20495 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20497 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20498 does not overlap dest if the function is frame-related. Handle
20500 (aarch64_split_add_offset): New function.
20501 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20502 them aarch64_add_offset.
20503 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20504 and update call to aarch64_sub_sp.
20505 (aarch64_add_cfa_expression): New function.
20506 (aarch64_expand_prologue): Pass extra temporary registers to the
20507 functions above. Handle the case in which we need to emit new
20508 DW_CFA_expressions for registers that were originally saved
20509 relative to the stack pointer, but now have to be expressed
20510 relative to the frame pointer.
20511 (aarch64_output_mi_thunk): Pass extra temporary registers to the
20513 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
20514 IP0 and IP1 values for SVE frames.
20515 (aarch64_expand_vec_series): New function.
20516 (aarch64_expand_sve_widened_duplicate): Likewise.
20517 (aarch64_expand_sve_const_vector): Likewise.
20518 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20519 Handle SVE constants. Use emit_move_insn to move a force_const_mem
20520 into the register, rather than emitting a SET directly.
20521 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20522 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20523 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20524 (offset_9bit_signed_scaled_p): New functions.
20525 (aarch64_replicate_bitmask_imm): New function.
20526 (aarch64_bitmask_imm): Use it.
20527 (aarch64_cannot_force_const_mem): Reject expressions involving
20528 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
20529 (aarch64_classify_index): Handle SVE indices, by requiring
20530 a plain register index with a scale that matches the element size.
20531 (aarch64_classify_address): Handle SVE addresses. Assert that
20532 the mode of the address is VOIDmode or an integer mode.
20533 Update call to aarch64_classify_symbol.
20534 (aarch64_classify_symbolic_expression): Update call to
20535 aarch64_classify_symbol.
20536 (aarch64_const_vec_all_in_range_p): New function.
20537 (aarch64_print_vector_float_operand): Likewise.
20538 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
20539 "vN" for FP registers with SVE modes. Handle (const ...) vectors
20540 and the FP immediates 1.0 and 0.5.
20541 (aarch64_print_address_internal): Handle SVE addresses.
20542 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20543 (aarch64_regno_regclass): Handle predicate registers.
20544 (aarch64_secondary_reload): Handle big-endian reloads of SVE
20546 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20547 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20548 (aarch64_convert_sve_vector_bits): New function.
20549 (aarch64_override_options): Use it to handle -msve-vector-bits=.
20550 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20551 rather than an rtx.
20552 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20553 Handle SVE vector and predicate modes. Accept VL-based constants
20554 that need only one temporary register, and VL offsets that require
20555 no temporary registers.
20556 (aarch64_conditional_register_usage): Mark the predicate registers
20557 as fixed if SVE isn't available.
20558 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20559 Return true for SVE vector and predicate modes.
20560 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20561 rather than an unsigned int. Handle SVE modes.
20562 (aarch64_preferred_simd_mode): Update call accordingly. Handle
20564 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20566 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20567 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20568 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20569 (aarch64_sve_float_mul_immediate_p): New functions.
20570 (aarch64_sve_valid_immediate): New function.
20571 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20572 Explicitly reject structure modes. Check for INDEX constants.
20573 Handle PTRUE and PFALSE constants.
20574 (aarch64_check_zero_based_sve_index_immediate): New function.
20575 (aarch64_simd_imm_zero_p): Delete.
20576 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20577 vector modes. Accept constants in the range of CNT[BHWD].
20578 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20579 ask for an Advanced SIMD mode.
20580 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20581 (aarch64_simd_vector_alignment): Handle SVE predicates.
20582 (aarch64_vectorize_preferred_vector_alignment): New function.
20583 (aarch64_simd_vector_alignment_reachable): Use it instead of
20585 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20586 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20588 (MAX_VECT_LEN): Delete.
20589 (expand_vec_perm_d): Add a vec_flags field.
20590 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20591 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20592 (aarch64_evpc_ext): Don't apply a big-endian lane correction
20594 (aarch64_evpc_rev): Rename to...
20595 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
20596 (aarch64_evpc_rev_global): New function.
20597 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20598 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20600 (aarch64_evpc_sve_tbl): New function.
20601 (aarch64_expand_vec_perm_const_1): Update after rename of
20602 aarch64_evpc_rev. Handle SVE permutes too, trying
20603 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20604 than aarch64_evpc_tbl.
20605 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20606 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20607 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20608 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20609 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20610 (aarch64_expand_sve_vcond): New functions.
20611 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20612 of aarch64_vector_mode_p.
20613 (aarch64_dwarf_poly_indeterminate_value): New function.
20614 (aarch64_compute_pressure_classes): Likewise.
20615 (aarch64_can_change_mode_class): Likewise.
20616 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20617 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20618 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20619 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20620 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20621 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20622 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20623 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20625 (Dn, Dl, Dr): Accept const as well as const_vector.
20626 (Dz): Likewise. Compare against CONST0_RTX.
20627 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20628 of "vector" where appropriate.
20629 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20630 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20631 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20632 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20633 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20634 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20635 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20636 (v_int_equiv): Extend to SVE modes.
20637 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20639 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20640 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20641 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20642 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20643 (SVE_COND_FP_CMP): New int iterators.
20644 (perm_hilo): Handle the new unpack unspecs.
20645 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20647 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20648 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20649 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20650 (aarch64_equality_operator, aarch64_constant_vector_operand)
20651 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20652 (aarch64_sve_nonimmediate_operand): Likewise.
20653 (aarch64_sve_general_operand): Likewise.
20654 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20655 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20656 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20657 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20658 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20659 (aarch64_sve_float_arith_immediate): Likewise.
20660 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20661 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20662 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20663 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20664 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20665 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20666 (aarch64_sve_float_arith_operand): Likewise.
20667 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20668 (aarch64_sve_float_mul_operand): Likewise.
20669 (aarch64_sve_vec_perm_operand): Likewise.
20670 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20671 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20672 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20673 as well as const_vector.
20674 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20675 in file. Use CONST0_RTX and CONSTM1_RTX.
20676 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20677 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20678 Use aarch64_simd_imm_zero.
20679 * config/aarch64/aarch64-sve.md: New file.
20680 * config/aarch64/aarch64.md: Include it.
20681 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20682 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20683 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20684 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20685 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20686 (sve): New attribute.
20687 (enabled): Disable instructions with the sve attribute unless
20689 (movqi, movhi): Pass CONST_POLY_INT operaneds through
20690 aarch64_expand_mov_immediate.
20691 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20692 CNT[BHSD] immediates.
20693 (movti): Split CONST_POLY_INT moves into two halves.
20694 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20695 Split additions that need a temporary here if the destination
20696 is the stack pointer.
20697 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20698 (*add<mode>3_poly_1): New instruction.
20699 (set_clobber_cc): New expander.
20701 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20703 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20704 parameter and use it instead of GET_MODE_SIZE (innermode). Use
20705 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20706 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20707 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
20708 Change innermode from fixed_mode_size to machine_mode.
20709 (simplify_subreg): Update call accordingly. Handle a constant-sized
20710 subreg of a variable-length CONST_VECTOR.
20712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20713 Alan Hayward <alan.hayward@arm.com>
20714 David Sherwood <david.sherwood@arm.com>
20716 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20717 (add_offset_to_base): New function, split out from...
20718 (create_mem_ref): ...here. When handling a scale other than 1,
20719 check first whether the address is valid without the offset.
20720 Add it into the base if so, leaving the index and scale as-is.
20722 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20725 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20726 fold_for_warn before checking if arg2 is INTEGER_CST.
20728 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
20730 * config/rs6000/predicates.md (load_multiple_operation): Delete.
20731 (store_multiple_operation): Delete.
20732 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20733 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20734 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20735 guarded by TARGET_STRING.
20736 (rs6000_output_load_multiple): Delete.
20737 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20738 OPTION_MASK_STRING / TARGET_STRING handling.
20739 (print_operand) <'N', 'O'>: Add comment that these are unused now.
20740 (const rs6000_opt_masks) <"string">: Change mask to 0.
20741 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20742 (MASK_STRING): Delete.
20743 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20745 (load_multiple): Delete.
20752 (store_multiple): Delete.
20759 (movmemsi_8reg): Delete.
20760 (corresponding unnamed define_insn): Delete.
20761 (movmemsi_6reg): Delete.
20762 (corresponding unnamed define_insn): Delete.
20763 (movmemsi_4reg): Delete.
20764 (corresponding unnamed define_insn): Delete.
20765 (movmemsi_2reg): Delete.
20766 (corresponding unnamed define_insn): Delete.
20767 (movmemsi_1reg): Delete.
20768 (corresponding unnamed define_insn): Delete.
20769 * config/rs6000/rs6000.opt (mno-string): New.
20770 (mstring): Replace by deprecation warning stub.
20771 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20773 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20775 * regrename.c (regrename_do_replace): If replacing the same
20776 reg multiple times, try to reuse last created gen_raw_REG.
20779 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20780 main to workaround a bug in GDB.
20782 2018-01-12 Tom de Vries <tom@codesourcery.com>
20785 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20787 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
20789 PR rtl-optimization/80481
20790 * ira-color.c (get_cap_member): New function.
20791 (allocnos_conflict_by_live_ranges_p): Use it.
20792 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20793 (setup_slot_coalesced_allocno_live_ranges): Ditto.
20795 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
20798 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20799 (*saddl_se_1): Ditto.
20800 (*ssubsi_1): Ditto.
20801 (*ssubl_se_1): Ditto.
20803 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20805 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20806 rather than wi::to_widest for DR_INITs.
20807 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20808 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20809 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20811 (vect_analyze_group_access_1): Note that here.
20813 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20815 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20816 polynomial type sizes.
20818 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20820 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20821 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20822 (gimple_add_tmp_var): Likewise.
20824 2018-01-12 Martin Liska <mliska@suse.cz>
20826 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20827 (gimple_alloc_sizes): Likewise.
20828 (dump_gimple_statistics): Use PRIu64 in printf format.
20829 * gimple.h: Change uint64_t to int.
20831 2018-01-12 Martin Liska <mliska@suse.cz>
20833 * tree-core.h: Use uint64_t instead of int.
20834 * tree.c (tree_node_counts): Likewise.
20835 (tree_node_sizes): Likewise.
20836 (dump_tree_statistics): Use PRIu64 in printf format.
20838 2018-01-12 Martin Liska <mliska@suse.cz>
20840 * Makefile.in: As qsort_chk is implemented in vec.c, add
20841 vec.o to linkage of gencfn-macros.
20842 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20843 passing the info to record_node_allocation_statistics.
20844 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20846 * ggc-common.c (struct ggc_usage): Add operator== and use
20847 it in operator< and compare function.
20848 * mem-stats.h (struct mem_usage): Likewise.
20849 * vec.c (struct vec_usage): Remove operator< and compare
20850 function. Can be simply inherited.
20852 2018-01-12 Martin Jambor <mjambor@suse.cz>
20855 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20856 * tree-ssa-math-opts.c: Include domwalk.h.
20857 (convert_mult_to_fma_1): New function.
20858 (fma_transformation_info): New type.
20859 (fma_deferring_state): Likewise.
20860 (cancel_fma_deferring): New function.
20861 (result_of_phi): Likewise.
20862 (last_fma_candidate_feeds_initial_phi): Likewise.
20863 (convert_mult_to_fma): Added deferring logic, split actual
20864 transformation to convert_mult_to_fma_1.
20865 (math_opts_dom_walker): New type.
20866 (math_opts_dom_walker::after_dom_children): New method, body moved
20867 here from pass_optimize_widening_mul::execute, added deferring logic
20869 (pass_optimize_widening_mul::execute): Moved most of code to
20870 math_opts_dom_walker::after_dom_children.
20871 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20872 * config/i386/i386.c (ix86_option_override_internal): Added
20873 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20875 2018-01-12 Richard Biener <rguenther@suse.de>
20878 * dwarf2out.c (gen_variable_die): Do not reset old_die for
20879 inline instance vars.
20881 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
20884 * config/rx/rx.c (rx_is_restricted_memory_address):
20885 Handle SUBREG case.
20887 2018-01-12 Richard Biener <rguenther@suse.de>
20889 PR tree-optimization/80846
20890 * target.def (split_reduction): New target hook.
20891 * targhooks.c (default_split_reduction): New function.
20892 * targhooks.h (default_split_reduction): Declare.
20893 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20894 target requests first reduce vectors by combining low and high
20896 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20897 (get_vectype_for_scalar_type_and_size): Export.
20898 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20899 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20900 * doc/tm.texi: Regenerate.
20901 * config/i386/i386.c (ix86_split_reduction): Implement
20902 TARGET_VECTORIZE_SPLIT_REDUCTION.
20904 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20907 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20908 in PIC mode except for TARGET_VXWORKS_RTP.
20909 * config/sparc/sparc.c: Include cfgrtl.h.
20910 (TARGET_INIT_PIC_REG): Define.
20911 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20912 (sparc_pic_register_p): New predicate.
20913 (sparc_legitimate_address_p): Use it.
20914 (sparc_legitimize_pic_address): Likewise.
20915 (sparc_delegitimize_address): Likewise.
20916 (sparc_mode_dependent_address_p): Likewise.
20917 (gen_load_pcrel_sym): Remove 4th parameter.
20918 (load_got_register): Adjust call to above. Remove obsolete stuff.
20919 (sparc_expand_prologue): Do not call load_got_register here.
20920 (sparc_flat_expand_prologue): Likewise.
20921 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20922 (sparc_use_pseudo_pic_reg): New function.
20923 (sparc_init_pic_reg): Likewise.
20924 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20925 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20927 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
20929 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20930 Add item for branch_cost.
20932 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20934 PR rtl-optimization/83565
20935 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20936 not extend the result to a larger mode for rotate operations.
20937 (num_sign_bit_copies1): Likewise.
20939 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20942 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20944 Use values-Xc.o for -pedantic.
20945 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20947 2018-01-12 Martin Liska <mliska@suse.cz>
20950 * ipa-devirt.c (final_warning_record::grow_type_warnings):
20952 (possible_polymorphic_call_targets): Use it.
20953 (ipa_devirt): Likewise.
20955 2018-01-12 Martin Liska <mliska@suse.cz>
20957 * profile-count.h (enum profile_quality): Use 0 as invalid
20958 enum value of profile_quality.
20960 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
20962 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20963 -mext-string options.
20965 2018-01-12 Richard Biener <rguenther@suse.de>
20967 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20968 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20969 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20971 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20973 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20975 * configure.ac (--with-long-double-format): Add support for the
20976 configuration option to change the default long double format on
20978 * config.gcc (powerpc*-linux*-*): Likewise.
20979 * configure: Regenerate.
20980 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20981 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20982 used without modification.
20984 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20986 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20987 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20988 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20989 MISC_BUILTIN_SPEC_BARRIER.
20990 (rs6000_init_builtins): Likewise.
20991 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20993 (speculation_barrier): New define_insn.
20994 * doc/extend.texi: Document __builtin_speculation_barrier.
20996 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20999 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
21000 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
21001 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
21003 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
21004 integral modes instead of "ss" and "sd".
21005 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
21006 vectors with 32-bit and 64-bit elements.
21007 (vecdupssescalarmodesuffix): New mode attribute.
21008 (vec_dup<mode>): Use it.
21010 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
21013 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
21014 frame if argument is passed on stack.
21016 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21019 * ree.c (combine_reaching_defs): Optimize also
21020 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21021 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21023 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21025 PR middle-end/83189
21026 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21028 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21030 PR middle-end/83718
21031 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21032 after they are computed.
21034 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21036 PR tree-optimization/83695
21037 * gimple-loop-linterchange.cc
21038 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21039 reset cached scev information after interchange.
21040 (pass_linterchange::execute): Remove call to scev_reset_htab.
21042 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21044 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21045 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21046 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21047 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21048 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21049 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21050 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21051 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21052 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21053 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21054 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21055 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21056 (V_lane_reg): Likewise.
21057 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21059 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21060 (vfmal_lane_low<mode>_intrinsic,
21061 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21062 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21063 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21064 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21065 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21066 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21068 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21070 * config/arm/arm-cpus.in (fp16fml): New feature.
21071 (ALL_SIMD): Add fp16fml.
21072 (armv8.2-a): Add fp16fml as an option.
21073 (armv8.3-a): Likewise.
21074 (armv8.4-a): Add fp16fml as part of fp16.
21075 * config/arm/arm.h (TARGET_FP16FML): Define.
21076 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21078 * config/arm/arm-modes.def (V2HF): Define.
21079 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21080 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21081 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21082 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21083 vfmsl_low, vfmsl_high): New set of builtins.
21084 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21085 (vfml_op): New code attribute.
21086 (VFMLHALVES): New int iterator.
21087 (VFML, VFMLSEL): New mode attributes.
21088 (V_reg): Define mapping for V2HF.
21089 (V_hi, V_lo): New mode attributes.
21090 (VF_constraint): Likewise.
21091 (vfml_half, vfml_half_selector): New int attributes.
21092 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21094 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21095 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21097 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21098 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21099 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21100 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21102 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21103 Document new effective target and option set.
21105 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21107 * config/arm/arm-cpus.in (armv8_4): New feature.
21108 (ARMv8_4a): New fgroup.
21109 (armv8.4-a): New arch.
21110 * config/arm/arm-tables.opt: Regenerate.
21111 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21112 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21113 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21114 Add matching rules for -march=armv8.4-a and extensions.
21115 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21117 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21120 * config/rx/rx.md (BW): New mode attribute.
21121 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21123 2018-01-11 Richard Biener <rguenther@suse.de>
21125 PR tree-optimization/83435
21126 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21127 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21128 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21130 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21131 Alan Hayward <alan.hayward@arm.com>
21132 David Sherwood <david.sherwood@arm.com>
21134 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21136 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21137 (aarch64_print_address_internal): Use it to check for a zero offset.
21139 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21140 Alan Hayward <alan.hayward@arm.com>
21141 David Sherwood <david.sherwood@arm.com>
21143 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21144 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21145 Return a poly_int64 rather than a HOST_WIDE_INT.
21146 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21147 rather than a HOST_WIDE_INT.
21148 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21149 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21150 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21151 final_offset from HOST_WIDE_INT to poly_int64.
21152 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21153 to_constant when getting the number of units in an Advanced SIMD
21155 (aarch64_builtin_vectorized_function): Check for a constant number
21157 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21159 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21160 attribute instead of GET_MODE_NUNITS.
21161 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21162 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21163 GET_MODE_SIZE for fixed-size registers.
21164 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21165 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21166 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21167 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21168 (aarch64_print_operand, aarch64_print_address_internal)
21169 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21170 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21171 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21172 Handle polynomial GET_MODE_SIZE.
21173 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21174 wider than SImode without modification.
21175 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21176 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21177 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21178 passing and returning SVE modes.
21179 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21180 rather than GEN_INT.
21181 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21182 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21183 (aarch64_allocate_and_probe_stack_space): Likewise.
21184 (aarch64_layout_frame): Cope with polynomial offsets.
21185 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21186 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21187 polynomial offsets.
21188 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21189 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21190 poly_int64 rather than a HOST_WIDE_INT.
21191 (aarch64_get_separate_components, aarch64_process_components)
21192 (aarch64_expand_prologue, aarch64_expand_epilogue)
21193 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21194 (aarch64_anchor_offset): New function, split out from...
21195 (aarch64_legitimize_address): ...here.
21196 (aarch64_builtin_vectorization_cost): Handle polynomial
21197 TYPE_VECTOR_SUBPARTS.
21198 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21200 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21201 number of elements from the PARALLEL rather than the mode.
21202 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21203 rather than GET_MODE_BITSIZE.
21204 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21205 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21206 (aarch64_expand_vec_perm_const_1): Handle polynomial
21207 d->perm.length () and d->perm elements.
21208 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21209 Apply to_constant to d->perm elements.
21210 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21211 polynomial CONST_VECTOR_NUNITS.
21212 (aarch64_move_pointer): Take amount as a poly_int64 rather
21214 (aarch64_progress_pointer): Avoid temporary variable.
21215 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21216 the mode attribute instead of GET_MODE.
21218 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21219 Alan Hayward <alan.hayward@arm.com>
21220 David Sherwood <david.sherwood@arm.com>
21222 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21223 x exists before using it.
21224 (aarch64_add_constant_internal): Rename to...
21225 (aarch64_add_offset_1): ...this. Replace regnum with separate
21226 src and dest rtxes. Handle the case in which they're different,
21227 including when the offset is zero. Replace scratchreg with an rtx.
21228 Use 2 additions if there is no spare register into which we can
21229 move a 16-bit constant.
21230 (aarch64_add_constant): Delete.
21231 (aarch64_add_offset): Replace reg with separate src and dest
21232 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21233 Use aarch64_add_offset_1.
21234 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21235 an rtx rather than an int. Take the delta as a poly_int64
21236 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21237 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21238 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21239 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21240 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21241 and aarch64_add_sp.
21242 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21243 aarch64_add_constant.
21245 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21247 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21248 Use scalar_float_mode.
21250 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21252 * config/aarch64/aarch64-simd.md
21253 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21254 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21255 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21256 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21257 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21258 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21259 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21260 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21261 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21262 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21264 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21267 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21268 targ_options->x_arm_arch_string is non NULL.
21270 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21272 * config/aarch64/aarch64.h
21273 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21275 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21278 * expmed.c (emit_store_flag_force): Swap if const op0
21279 and change VOIDmode to mode of op0.
21281 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21283 PR rtl-optimization/83761
21284 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21285 than bytes to mode_for_size.
21287 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21289 PR middle-end/83189
21290 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21291 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21294 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21296 PR middle-end/83575
21297 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21298 when in layout mode.
21299 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21300 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21303 2018-01-10 Michael Collison <michael.collison@arm.com>
21305 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21306 * config/aarch64/aarch64-option-extension.def: Add
21307 AARCH64_OPT_EXTENSION of 'fp16fml'.
21308 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21309 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21310 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21311 * config/aarch64/constraints.md (Ui7): New constraint.
21312 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21313 (VFMLA_SEL_W): Ditto.
21316 (VFMLA16_LOW): New int iterator.
21317 (VFMLA16_HIGH): Ditto.
21318 (UNSPEC_FMLAL): New unspec.
21319 (UNSPEC_FMLSL): Ditto.
21320 (UNSPEC_FMLAL2): Ditto.
21321 (UNSPEC_FMLSL2): Ditto.
21322 (f16mac): New code attribute.
21323 * config/aarch64/aarch64-simd-builtins.def
21324 (aarch64_fmlal_lowv2sf): Ditto.
21325 (aarch64_fmlsl_lowv2sf): Ditto.
21326 (aarch64_fmlalq_lowv4sf): Ditto.
21327 (aarch64_fmlslq_lowv4sf): Ditto.
21328 (aarch64_fmlal_highv2sf): Ditto.
21329 (aarch64_fmlsl_highv2sf): Ditto.
21330 (aarch64_fmlalq_highv4sf): Ditto.
21331 (aarch64_fmlslq_highv4sf): Ditto.
21332 (aarch64_fmlal_lane_lowv2sf): Ditto.
21333 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21334 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21335 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21336 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21337 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21338 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21339 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21340 (aarch64_fmlal_lane_highv2sf): Ditto.
21341 (aarch64_fmlsl_lane_highv2sf): Ditto.
21342 (aarch64_fmlal_laneq_highv2sf): Ditto.
21343 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21344 (aarch64_fmlalq_lane_highv4sf): Ditto.
21345 (aarch64_fmlsl_lane_highv4sf): Ditto.
21346 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21347 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21348 * config/aarch64/aarch64-simd.md:
21349 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21350 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21351 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21352 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21353 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21354 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21355 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21356 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21357 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21358 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21359 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21360 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21361 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21362 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21363 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21364 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21365 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21366 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21367 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21368 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21369 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21370 (vfmlsl_low_u32): Ditto.
21371 (vfmlalq_low_u32): Ditto.
21372 (vfmlslq_low_u32): Ditto.
21373 (vfmlal_high_u32): Ditto.
21374 (vfmlsl_high_u32): Ditto.
21375 (vfmlalq_high_u32): Ditto.
21376 (vfmlslq_high_u32): Ditto.
21377 (vfmlal_lane_low_u32): Ditto.
21378 (vfmlsl_lane_low_u32): Ditto.
21379 (vfmlal_laneq_low_u32): Ditto.
21380 (vfmlsl_laneq_low_u32): Ditto.
21381 (vfmlalq_lane_low_u32): Ditto.
21382 (vfmlslq_lane_low_u32): Ditto.
21383 (vfmlalq_laneq_low_u32): Ditto.
21384 (vfmlslq_laneq_low_u32): Ditto.
21385 (vfmlal_lane_high_u32): Ditto.
21386 (vfmlsl_lane_high_u32): Ditto.
21387 (vfmlal_laneq_high_u32): Ditto.
21388 (vfmlsl_laneq_high_u32): Ditto.
21389 (vfmlalq_lane_high_u32): Ditto.
21390 (vfmlslq_lane_high_u32): Ditto.
21391 (vfmlalq_laneq_high_u32): Ditto.
21392 (vfmlslq_laneq_high_u32): Ditto.
21393 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21394 (AARCH64_FL_FOR_ARCH8_4): New.
21395 (AARCH64_ISA_F16FML): New ISA flag.
21396 (TARGET_F16FML): New feature flag for fp16fml.
21397 (doc/invoke.texi): Document new fp16fml option.
21399 2018-01-10 Michael Collison <michael.collison@arm.com>
21401 * config/aarch64/aarch64-builtins.c:
21402 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21403 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21404 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21405 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21406 (AARCH64_ISA_SHA3): New ISA flag.
21407 (TARGET_SHA3): New feature flag for sha3.
21408 * config/aarch64/iterators.md (sha512_op): New int attribute.
21409 (CRYPTO_SHA512): New int iterator.
21410 (UNSPEC_SHA512H): New unspec.
21411 (UNSPEC_SHA512H2): Ditto.
21412 (UNSPEC_SHA512SU0): Ditto.
21413 (UNSPEC_SHA512SU1): Ditto.
21414 * config/aarch64/aarch64-simd-builtins.def
21415 (aarch64_crypto_sha512hqv2di): New builtin.
21416 (aarch64_crypto_sha512h2qv2di): Ditto.
21417 (aarch64_crypto_sha512su0qv2di): Ditto.
21418 (aarch64_crypto_sha512su1qv2di): Ditto.
21419 (aarch64_eor3qv8hi): Ditto.
21420 (aarch64_rax1qv2di): Ditto.
21421 (aarch64_xarqv2di): Ditto.
21422 (aarch64_bcaxqv8hi): Ditto.
21423 * config/aarch64/aarch64-simd.md:
21424 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21425 (aarch64_crypto_sha512su0qv2di): Ditto.
21426 (aarch64_crypto_sha512su1qv2di): Ditto.
21427 (aarch64_eor3qv8hi): Ditto.
21428 (aarch64_rax1qv2di): Ditto.
21429 (aarch64_xarqv2di): Ditto.
21430 (aarch64_bcaxqv8hi): Ditto.
21431 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21432 (vsha512h2q_u64): Ditto.
21433 (vsha512su0q_u64): Ditto.
21434 (vsha512su1q_u64): Ditto.
21435 (veor3q_u16): Ditto.
21436 (vrax1q_u64): Ditto.
21437 (vxarq_u64): Ditto.
21438 (vbcaxq_u16): Ditto.
21439 * config/arm/types.md (crypto_sha512): New type attribute.
21440 (crypto_sha3): Ditto.
21441 (doc/invoke.texi): Document new sha3 option.
21443 2018-01-10 Michael Collison <michael.collison@arm.com>
21445 * config/aarch64/aarch64-builtins.c:
21446 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21447 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21448 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21449 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21450 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21451 (AARCH64_ISA_SM4): New ISA flag.
21452 (TARGET_SM4): New feature flag for sm4.
21453 * config/aarch64/aarch64-simd-builtins.def
21454 (aarch64_sm3ss1qv4si): Ditto.
21455 (aarch64_sm3tt1aq4si): Ditto.
21456 (aarch64_sm3tt1bq4si): Ditto.
21457 (aarch64_sm3tt2aq4si): Ditto.
21458 (aarch64_sm3tt2bq4si): Ditto.
21459 (aarch64_sm3partw1qv4si): Ditto.
21460 (aarch64_sm3partw2qv4si): Ditto.
21461 (aarch64_sm4eqv4si): Ditto.
21462 (aarch64_sm4ekeyqv4si): Ditto.
21463 * config/aarch64/aarch64-simd.md:
21464 (aarch64_sm3ss1qv4si): Ditto.
21465 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21466 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21467 (aarch64_sm4eqv4si): Ditto.
21468 (aarch64_sm4ekeyqv4si): Ditto.
21469 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21470 (sm3part_op): Ditto.
21471 (CRYPTO_SM3TT): Ditto.
21472 (CRYPTO_SM3PART): Ditto.
21473 (UNSPEC_SM3SS1): New unspec.
21474 (UNSPEC_SM3TT1A): Ditto.
21475 (UNSPEC_SM3TT1B): Ditto.
21476 (UNSPEC_SM3TT2A): Ditto.
21477 (UNSPEC_SM3TT2B): Ditto.
21478 (UNSPEC_SM3PARTW1): Ditto.
21479 (UNSPEC_SM3PARTW2): Ditto.
21480 (UNSPEC_SM4E): Ditto.
21481 (UNSPEC_SM4EKEY): Ditto.
21482 * config/aarch64/constraints.md (Ui2): New constraint.
21483 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21484 * config/arm/types.md (crypto_sm3): New type attribute.
21485 (crypto_sm4): Ditto.
21486 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21487 (vsm3tt1aq_u32): Ditto.
21488 (vsm3tt1bq_u32): Ditto.
21489 (vsm3tt2aq_u32): Ditto.
21490 (vsm3tt2bq_u32): Ditto.
21491 (vsm3partw1q_u32): Ditto.
21492 (vsm3partw2q_u32): Ditto.
21493 (vsm4eq_u32): Ditto.
21494 (vsm4ekeyq_u32): Ditto.
21495 (doc/invoke.texi): Document new sm4 option.
21497 2018-01-10 Michael Collison <michael.collison@arm.com>
21499 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21500 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21501 (AARCH64_FL_FOR_ARCH8_4): New.
21502 (AARCH64_FL_V8_4): New flag.
21503 (doc/invoke.texi): Document new armv8.4-a option.
21505 2018-01-10 Michael Collison <michael.collison@arm.com>
21507 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21508 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21509 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21510 * config/aarch64/aarch64-option-extension.def: Add
21511 AARCH64_OPT_EXTENSION of 'sha2'.
21512 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21513 (crypto): Disable sha2 and aes if crypto disabled.
21514 (crypto): Enable aes and sha2 if enabled.
21515 (simd): Disable sha2 and aes if simd disabled.
21516 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21518 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21519 (TARGET_SHA2): New feature flag for sha2.
21520 (TARGET_AES): New feature flag for aes.
21521 * config/aarch64/aarch64-simd.md:
21522 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21523 conditional on TARGET_AES.
21524 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21525 (aarch64_crypto_sha1hsi): Make pattern conditional
21527 (aarch64_crypto_sha1hv4si): Ditto.
21528 (aarch64_be_crypto_sha1hv4si): Ditto.
21529 (aarch64_crypto_sha1su1v4si): Ditto.
21530 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21531 (aarch64_crypto_sha1su0v4si): Ditto.
21532 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21533 (aarch64_crypto_sha256su0v4si): Ditto.
21534 (aarch64_crypto_sha256su1v4si): Ditto.
21535 (doc/invoke.texi): Document new aes and sha2 options.
21537 2018-01-10 Martin Sebor <msebor@redhat.com>
21539 PR tree-optimization/83781
21540 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21543 2018-01-11 Martin Sebor <msebor@gmail.com>
21544 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21546 PR tree-optimization/83501
21547 PR tree-optimization/81703
21549 * tree-ssa-strlen.c (get_string_cst): Rename...
21550 (get_string_len): ...to this. Handle global constants.
21551 (handle_char_store): Adjust.
21553 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
21554 Jim Wilson <jimw@sifive.com>
21556 * config/riscv/riscv-protos.h (riscv_output_return): New.
21557 * config/riscv/riscv.c (struct machine_function): New naked_p field.
21558 (riscv_attribute_table, riscv_output_return),
21559 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21560 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21561 (riscv_compute_frame_info): Only compute frame->mask if not a naked
21563 (riscv_expand_prologue): Add early return for naked function.
21564 (riscv_expand_epilogue): Likewise.
21565 (riscv_function_ok_for_sibcall): Return false for naked function.
21566 (riscv_set_current_function): New.
21567 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21568 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21569 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21570 * doc/extend.texi (RISC-V Function Attributes): New.
21572 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21574 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21575 check for 128-bit long double before checking TCmode.
21576 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21577 128-bit long doubles before checking TFmode or TCmode.
21578 (FLOAT128_IBM_P): Likewise.
21580 2018-01-10 Martin Sebor <msebor@redhat.com>
21582 PR tree-optimization/83671
21583 * builtins.c (c_strlen): Unconditionally return zero for the empty
21585 Use -Warray-bounds for warnings.
21586 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21587 for non-constant array indices with COMPONENT_REF, arrays of
21588 arrays, and pointers to arrays.
21589 (gimple_fold_builtin_strlen): Determine and set length range for
21590 non-constant character arrays.
21592 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
21594 PR middle-end/81897
21595 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21598 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
21600 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21602 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21605 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21606 VECTOR_MEM_ALTIVEC_OR_VSX_P.
21607 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21608 indexed_or_indirect_operand predicate.
21609 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21610 (*vsx_le_perm_load_v8hi): Likewise.
21611 (*vsx_le_perm_load_v16qi): Likewise.
21612 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21613 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21614 (*vsx_le_perm_store_v8hi): Likewise.
21615 (*vsx_le_perm_store_v16qi): Likewise.
21616 (eight unnamed splitters): Likewise.
21618 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21620 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21621 * config/rs6000/emmintrin.h: Likewise.
21622 * config/rs6000/mmintrin.h: Likewise.
21623 * config/rs6000/xmmintrin.h: Likewise.
21625 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21628 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21630 * tree.c (tree_nop_conversion): Return true for location wrapper
21632 (maybe_wrap_with_location): New function.
21633 (selftest::check_strip_nops): New function.
21634 (selftest::test_location_wrappers): New function.
21635 (selftest::tree_c_tests): Call it.
21636 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21637 (maybe_wrap_with_location): New decl.
21638 (EXPR_LOCATION_WRAPPER_P): New macro.
21639 (location_wrapper_p): New inline function.
21640 (tree_strip_any_location_wrapper): New inline function.
21642 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21645 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21646 stack_realign_offset for the largest alignment of stack slot
21648 (ix86_find_max_used_stack_alignment): New function.
21649 (ix86_finalize_stack_frame_flags): Use it. Set
21650 max_used_stack_alignment if we don't realign stack.
21651 * config/i386/i386.h (machine_function): Add
21652 max_used_stack_alignment.
21654 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21656 * config/arm/arm.opt (-mbranch-cost): New option.
21657 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21660 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21663 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21664 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21666 2018-01-10 Richard Biener <rguenther@suse.de>
21669 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21670 early out so it also covers the case where we have a non-NULL
21673 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21675 PR tree-optimization/83753
21676 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21677 for non-strided grouped accesses if the number of elements is 1.
21679 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21682 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21683 * i386.h (TARGET_USE_GATHER): Define.
21684 * x86-tune.def (X86_TUNE_USE_GATHER): New.
21686 2018-01-10 Martin Liska <mliska@suse.cz>
21689 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21690 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21692 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21693 CLEANUP_NO_PARTITIONING is not set.
21695 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21697 * doc/rtl.texi: Remove documentation of (const ...) wrappers
21698 for vectors, as a partial revert of r254296.
21699 * rtl.h (const_vec_p): Delete.
21700 (const_vec_duplicate_p): Don't test for vector CONSTs.
21701 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21702 * expmed.c (make_tree): Likewise.
21705 * common.md (E, F): Use CONSTANT_P instead of checking for
21707 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21708 checking for CONST_VECTOR.
21710 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21712 PR middle-end/83575
21713 * predict.c (force_edge_cold): Handle in more sane way edges
21714 with no prediction.
21716 2018-01-09 Carl Love <cel@us.ibm.com>
21718 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21720 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21721 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21722 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21723 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
21724 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21725 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
21726 * config/rs6000/rs6000-protos.h: Add extern defition for
21727 rs6000_generate_float2_double_code.
21728 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21730 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21731 (float2_v2df): Add define_expand.
21733 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
21736 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21737 op_mode in the force_to_mode call.
21739 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21741 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21742 instead of checking each element individually.
21743 (aarch64_evpc_uzp): Likewise.
21744 (aarch64_evpc_zip): Likewise.
21745 (aarch64_evpc_ext): Likewise.
21746 (aarch64_evpc_rev): Likewise.
21747 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21748 instead of checking each element individually. Return true without
21750 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21751 whether all selected elements come from the same input, instead of
21752 checking each element individually. Remove calls to gen_rtx_REG,
21753 start_sequence and end_sequence and instead assert that no rtl is
21756 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21758 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21759 order of HIGH and CONST checks.
21761 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21763 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21764 if the destination isn't an SSA_NAME.
21766 2018-01-09 Richard Biener <rguenther@suse.de>
21768 PR tree-optimization/83668
21769 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21771 (canonicalize_loop_form): ... here, renamed from ...
21772 (canonicalize_loop_closed_ssa_form): ... this and amended to
21773 swap successor edges for loop exit blocks to make us use
21774 the RPO order we need for initial schedule generation.
21776 2018-01-09 Joseph Myers <joseph@codesourcery.com>
21778 PR tree-optimization/64811
21779 * match.pd: When optimizing comparisons with Inf, avoid
21780 introducing or losing exceptions from comparisons with NaN.
21782 2018-01-09 Martin Liska <mliska@suse.cz>
21785 * asan.c (shadow_mem_size): Add gcc_assert.
21787 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
21789 Don't save registers in main().
21792 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21793 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21794 * config/avr/avr.c (avr_set_current_function): Don't error if
21795 naked, OS_task or OS_main are specified at the same time.
21796 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21798 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21800 * common/config/avr/avr-common.c (avr_option_optimization_table):
21801 Switch on -mmain-is-OS_task for optimizing compilations.
21803 2018-01-09 Richard Biener <rguenther@suse.de>
21805 PR tree-optimization/83572
21806 * graphite.c: Include cfganal.h.
21807 (graphite_transform_loops): Connect infinite loops to exit
21808 and remove fake edges at the end.
21810 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21812 * ipa-inline.c (edge_badness): Revert accidental checkin.
21814 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21817 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21818 symbols; not inline clones.
21820 2018-01-09 Jakub Jelinek <jakub@redhat.com>
21823 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21824 hard registers. Formatting fixes.
21826 PR preprocessor/83722
21827 * gcc.c (try_generate_repro): Pass
21828 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21829 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21832 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
21833 Kito Cheng <kito.cheng@gmail.com>
21835 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21836 (riscv_leaf_function_p): Delete.
21837 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21839 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21841 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21843 (do_ifelse): New function.
21844 (do_isel): New function.
21845 (do_sub3): New function.
21846 (do_add3): New function.
21847 (do_load_mask_compare): New function.
21848 (do_overlap_load_compare): New function.
21849 (expand_compare_loop): New function.
21850 (expand_block_compare): Call expand_compare_loop() when appropriate.
21851 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21852 option description.
21853 (-mblock-compare-inline-loop-limit): New option.
21855 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21858 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21859 Reverse order of second and third operands in first alternative.
21860 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21861 of first and second elements in UNSPEC_VPERMR vector.
21862 (altivec_expand_vec_perm_le): Likewise.
21864 2018-01-08 Jeff Law <law@redhat.com>
21866 PR rtl-optimizatin/81308
21867 * tree-switch-conversion.c (cfg_altered): New file scoped static.
21868 (process_switch): If group_case_labels makes a change, then set
21870 (pass_convert_switch::execute): If a switch is converted, then
21871 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
21873 PR rtl-optimization/81308
21874 * recog.c (split_all_insns): Conditionally cleanup the CFG after
21877 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
21879 PR target/83663 - Revert r255946
21880 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21881 generation for cases where splatting a value is not useful.
21882 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21883 across a vec_duplicate and a paradoxical subreg forming a vector
21884 mode to a vec_concat.
21886 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21888 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21889 -march=armv8.3-a variants.
21890 * config/arm/t-multilib: Likewise.
21891 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
21893 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21895 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21897 (cceq_ior_compare_complement): Give it a name so I can use it, and
21898 change boolean_or_operator predicate to boolean_operator so it can
21899 be used to generate a crand.
21900 (eqne): New code iterator.
21901 (bd/bd_neg): New code_attrs.
21902 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21903 a single define_insn.
21904 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21905 decrement (bdnzt/bdnzf/bdzt/bdzf).
21906 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21907 with the new names of the branch decrement patterns, and added the
21908 names of the branch decrement conditional patterns.
21910 2018-01-08 Richard Biener <rguenther@suse.de>
21912 PR tree-optimization/83563
21913 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21916 2018-01-08 Richard Biener <rguenther@suse.de>
21918 PR middle-end/83713
21919 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21921 2018-01-08 Richard Biener <rguenther@suse.de>
21923 PR tree-optimization/83685
21924 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21925 references to abnormals.
21927 2018-01-08 Richard Biener <rguenther@suse.de>
21930 * dwarf2out.c (output_indirect_strings): Handle empty
21931 skeleton_debug_str_hash.
21932 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21934 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21936 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21937 (emit_store_direct): Likewise.
21938 (arc_trampoline_adjust_address): Likewise.
21939 (arc_asm_trampoline_template): New function.
21940 (arc_initialize_trampoline): Use asm_trampoline_template.
21941 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21942 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21943 * config/arc/arc.md (flush_icache): Delete pattern.
21945 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21947 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21948 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21951 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21954 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21955 by not USED_FOR_TARGET.
21956 (make_pass_resolve_sw_modes): Likewise.
21958 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21960 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21963 2018-01-08 Richard Biener <rguenther@suse.de>
21965 PR middle-end/83580
21966 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21968 2018-01-08 Richard Biener <rguenther@suse.de>
21970 PR middle-end/83517
21971 * match.pd ((t * 2) / 2) -> t): Add missing :c.
21973 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
21975 PR middle-end/81897
21976 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21977 basic blocks with a small number of successors.
21978 (convert_control_dep_chain_into_preds): Improve handling of
21980 (dump_predicates): Split apart into...
21981 (dump_pred_chain): ...here...
21982 (dump_pred_info): ...and here.
21983 (can_one_predicate_be_invalidated_p): Add debugging printfs.
21984 (can_chain_union_be_invalidated_p): Improve check for invalidation
21986 (uninit_uses_cannot_happen): Avoid unnecessary if
21987 convert_control_dep_chain_into_preds yielded nothing.
21989 2018-01-06 Martin Sebor <msebor@redhat.com>
21991 PR tree-optimization/83640
21992 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21993 subtracting negative offset from size.
21994 (builtin_access::overlap): Adjust offset bounds of the access to fall
21995 within the size of the object if possible.
21997 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
21999 PR rtl-optimization/83699
22000 * expmed.c (extract_bit_field_1): Restrict the vector usage of
22001 extract_bit_field_as_subreg to cases in which the extracted
22002 value is also a vector.
22004 * lra-constraints.c (process_alt_operands): Test for the equivalence
22005 substitutions when detecting a possible reload cycle.
22007 2018-01-06 Jakub Jelinek <jakub@redhat.com>
22010 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
22011 by default if flag_selective_schedling{,2}. Formatting fixes.
22013 PR rtl-optimization/83682
22014 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22015 if it has non-VECTOR_MODE element mode.
22016 (vec_duplicate_p): Likewise.
22018 PR middle-end/83694
22019 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22020 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22022 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22025 * config/i386/i386-builtin.def
22026 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22027 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22028 Require also OPTION_MASK_ISA_AVX512F in addition to
22029 OPTION_MASK_ISA_GFNI.
22030 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22031 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22032 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22033 to OPTION_MASK_ISA_GFNI.
22034 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22035 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22036 OPTION_MASK_ISA_AVX512BW.
22037 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22038 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22039 addition to OPTION_MASK_ISA_GFNI.
22040 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22041 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22042 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22043 to OPTION_MASK_ISA_GFNI.
22044 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22045 a requirement for all ISAs rather than any of them with a few
22047 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22049 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22050 bitmasks to be enabled with 3 exceptions, instead of requiring any
22051 enabled ISA with lots of exceptions.
22052 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22053 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22054 Change avx512bw in isa attribute to avx512f.
22055 * config/i386/sgxintrin.h: Add license boilerplate.
22056 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22057 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22058 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22059 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22061 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22062 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22063 temporarily sse2 rather than sse if not enabled already.
22066 * config/i386/sse.md (VI248_VLBW): Rename to ...
22067 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22068 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22069 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22070 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22071 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22072 mode iterator instead of VI248_VLBW.
22074 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22076 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22077 (record_modified): Skip clobbers; add debug output.
22078 (param_change_prob): Use sreal frequencies.
22080 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22082 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22083 punt for user-aligned variables.
22085 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22087 * tree-chrec.c (chrec_contains_symbols): Return true for
22090 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22093 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22094 of (x|y) == x for BICS pattern.
22096 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22098 PR tree-optimization/83605
22099 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22100 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22103 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22105 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22106 * config/epiphany/rtems.h: New file.
22108 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22109 Uros Bizjak <ubizjak@gmail.com>
22112 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22113 QIreg_operand instead of register_operand predicate.
22114 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22115 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22116 comments instead of -fmitigate[-_]rop.
22118 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22121 * cgraphunit.c (symbol_table::compile): Switch to text_section
22122 before calling assembly_start debug hook.
22123 * run-rtl-passes.c (run_rtl_passes): Likewise.
22126 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22128 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22129 range_int_cst_p rather than !symbolic_range_p before calling
22130 extract_range_from_multiplicative_op_1.
22132 2018-01-04 Jeff Law <law@redhat.com>
22134 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22135 redundant test in assertion.
22137 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22139 * doc/rtl.texi: Document machine_mode wrapper classes.
22141 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22143 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22144 using tree_to_uhwi.
22146 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22148 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22149 the VEC_PERM_EXPR fold to fail.
22151 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22154 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22155 to switched_sections.
22157 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22160 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22161 test for d.testing.
22163 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22166 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22167 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22169 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22172 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22173 is BLKmode and bitpos not zero or mode change is needed.
22175 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22178 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22181 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22184 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22185 instead of MULT rtx. Update all corresponding splitters.
22186 (*saddl_se): Ditto.
22187 (*ssub<modesuffix>): Ditto.
22188 (*ssubl_se): Ditto.
22189 (*cmp_sadd_di): Update split patterns.
22190 (*cmp_sadd_si): Ditto.
22191 (*cmp_sadd_sidi): Ditto.
22192 (*cmp_ssub_di): Ditto.
22193 (*cmp_ssub_si): Ditto.
22194 (*cmp_ssub_sidi): Ditto.
22195 * config/alpha/predicates.md (const23_operand): New predicate.
22196 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22197 Look for ASHIFT, not MULT inner operand.
22198 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22200 2018-01-04 Martin Liska <mliska@suse.cz>
22202 PR gcov-profile/83669
22203 * gcov.c (output_intermediate_file): Add version to intermediate
22205 * doc/gcov.texi: Document new field 'version' in intermediate
22206 file format. Fix location of '-k' option of gcov command.
22208 2018-01-04 Martin Liska <mliska@suse.cz>
22211 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22213 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22215 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22217 2018-01-03 Martin Sebor <msebor@redhat.com>
22219 PR tree-optimization/83655
22220 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22221 checking calls with invalid arguments.
22223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22225 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22226 (vectorizable_mask_load_store): Delete.
22227 (vectorizable_call): Return false for masked loads and stores.
22228 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22229 instead of gimple_assign_rhs1.
22230 (vectorizable_load): Handle IFN_MASK_LOAD.
22231 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22233 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22235 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22237 (vectorizable_mask_load_store): ...here.
22238 (vectorizable_load): ...and here.
22240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22242 * tree-vect-stmts.c (vect_build_all_ones_mask)
22243 (vect_build_zero_merge_argument): New functions, split out from...
22244 (vectorizable_load): ...here.
22246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22248 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22250 (vectorizable_mask_load_store): ...here.
22251 (vectorizable_store): ...and here.
22253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22255 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22257 (vectorizable_mask_load_store): ...here.
22259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22261 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22262 (vect_model_store_cost): Take a vec_load_store_type instead of a
22264 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22265 (vect_model_store_cost): Take a vec_load_store_type instead of a
22267 (vectorizable_mask_load_store): Update accordingly.
22268 (vectorizable_store): Likewise.
22269 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22273 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22274 IFN_MASK_LOAD calls here rather than...
22275 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22278 Alan Hayward <alan.hayward@arm.com>
22279 David Sherwood <david.sherwood@arm.com>
22281 * expmed.c (extract_bit_field_1): For vector extracts,
22282 fall back to extract_bit_field_as_subreg if vec_extract
22285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22286 Alan Hayward <alan.hayward@arm.com>
22287 David Sherwood <david.sherwood@arm.com>
22289 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22290 they are variable or constant sized.
22291 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22292 slots for constant-sized data.
22294 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22295 Alan Hayward <alan.hayward@arm.com>
22296 David Sherwood <david.sherwood@arm.com>
22298 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22299 handling COND_EXPRs with boolean comparisons, try to find a better
22300 basis for the mask type than the boolean itself.
22302 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22304 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22305 is calculated and how it can be overridden.
22306 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22307 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22309 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22312 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22313 Alan Hayward <alan.hayward@arm.com>
22314 David Sherwood <david.sherwood@arm.com>
22316 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22317 Remove the mode argument.
22318 (aarch64_simd_valid_immediate): Remove the mode and inverse
22320 * config/aarch64/iterators.md (bitsize): New iterator.
22321 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22322 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22323 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22324 aarch64_simd_valid_immediate.
22325 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22326 (aarch64_reg_or_bic_imm): Likewise.
22327 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22328 with an insn_type enum and msl with a modifier_type enum.
22329 Replace element_width with a scalar_mode. Change the shift
22330 to unsigned int. Add constructors for scalar_float_mode and
22331 scalar_int_mode elements.
22332 (aarch64_vect_float_const_representable_p): Delete.
22333 (aarch64_can_const_movi_rtx_p)
22334 (aarch64_simd_scalar_immediate_valid_for_move)
22335 (aarch64_simd_make_constant): Update call to
22336 aarch64_simd_valid_immediate.
22337 (aarch64_advsimd_valid_immediate_hs): New function.
22338 (aarch64_advsimd_valid_immediate): Likewise.
22339 (aarch64_simd_valid_immediate): Remove mode and inverse
22340 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22341 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22342 and aarch64_float_const_representable_p on the result.
22343 (aarch64_output_simd_mov_immediate): Remove mode argument.
22344 Update call to aarch64_simd_valid_immediate and use of
22345 simd_immediate_info.
22346 (aarch64_output_scalar_simd_mov_immediate): Update call
22349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22350 Alan Hayward <alan.hayward@arm.com>
22351 David Sherwood <david.sherwood@arm.com>
22353 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22354 (mode_nunits): Likewise CONST_MODE_NUNITS.
22355 * machmode.def (ADJUST_NUNITS): Document.
22356 * genmodes.c (mode_data::need_nunits_adj): New field.
22357 (blank_mode): Update accordingly.
22358 (adj_nunits): New variable.
22359 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22361 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22362 listed in adj_nunits.
22363 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22364 listed in adj_nunits. Don't emit case statements for such modes.
22365 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22366 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22367 nothing if adj_nunits is nonnull.
22368 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22369 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22370 (emit_mode_fbit): Update use of print_maybe_const_decl.
22371 (emit_move_size): Likewise. Treat the array as non-const
22373 (emit_mode_adjustments): Handle adj_nunits.
22375 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22377 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22378 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22379 (VECTOR_MODES): Use it.
22380 (make_vector_modes): Take the prefix as an argument.
22382 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22383 Alan Hayward <alan.hayward@arm.com>
22384 David Sherwood <david.sherwood@arm.com>
22386 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22387 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22388 for MODE_VECTOR_BOOL.
22389 * machmode.def (VECTOR_BOOL_MODE): Document.
22390 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22391 (make_vector_bool_mode): New function.
22392 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22394 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22395 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22397 * stor-layout.c (int_mode_for_mode): Likewise.
22398 * tree.c (build_vector_type_for_mode): Likewise.
22399 * varasm.c (output_constant_pool_2): Likewise.
22400 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22401 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22402 for MODE_VECTOR_BOOL.
22403 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22404 of mode class checks.
22405 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22406 instead of a list of mode class checks.
22407 (expand_vector_scalar_condition): Likewise.
22408 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22411 Alan Hayward <alan.hayward@arm.com>
22412 David Sherwood <david.sherwood@arm.com>
22414 * machmode.h (mode_size): Change from unsigned short to
22416 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22417 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22418 or if measurement_type is not polynomial.
22419 (fixed_size_mode::includes_p): Check for constant-sized modes.
22420 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22421 return a poly_uint16 rather than an unsigned short.
22422 (emit_mode_size): Change the type of mode_size from unsigned short
22423 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22424 (emit_mode_adjustments): Cope with polynomial vector sizes.
22425 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22427 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22429 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22430 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22431 * caller-save.c (setup_save_areas): Likewise.
22432 (replace_reg_with_saved_mem): Likewise.
22433 * calls.c (emit_library_call_value_1): Likewise.
22434 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22435 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22436 (gen_lowpart_for_combine): Likewise.
22437 * convert.c (convert_to_integer_1): Likewise.
22438 * cse.c (equiv_constant, cse_insn): Likewise.
22439 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22440 (cselib_subst_to_values): Likewise.
22441 * dce.c (word_dce_process_block): Likewise.
22442 * df-problems.c (df_word_lr_mark_ref): Likewise.
22443 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22444 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22445 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22446 (rtl_for_decl_location): Likewise.
22447 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22448 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22449 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22450 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22451 (expand_expr_real_1): Likewise.
22452 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22453 (pad_below): Likewise.
22454 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22455 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22456 * ira.c (get_subreg_tracking_sizes): Likewise.
22457 * ira-build.c (ira_create_allocno_objects): Likewise.
22458 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22459 (ira_sort_regnos_for_alter_reg): Likewise.
22460 * ira-costs.c (record_operand_costs): Likewise.
22461 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22462 (resolve_simple_move): Likewise.
22463 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22464 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22465 (lra_constraints): Likewise.
22466 (CONST_POOL_OK_P): Reject variable-sized modes.
22467 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22468 (add_pseudo_to_slot, lra_spill): Likewise.
22469 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22470 * optabs-query.c (get_best_extraction_insn): Likewise.
22471 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22472 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22473 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22474 * recog.c (offsettable_address_addr_space_p): Likewise.
22475 * regcprop.c (maybe_mode_change): Likewise.
22476 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22477 * regrename.c (build_def_use): Likewise.
22478 * regstat.c (dump_reg_info): Likewise.
22479 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22480 (find_reloads, find_reloads_subreg_address): Likewise.
22481 * reload1.c (eliminate_regs_1): Likewise.
22482 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22483 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22484 (simplify_binary_operation_1, simplify_subreg): Likewise.
22485 * targhooks.c (default_function_arg_padding): Likewise.
22486 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22487 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22488 (verify_gimple_assign_ternary): Likewise.
22489 * tree-inline.c (estimate_move_cost): Likewise.
22490 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22491 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22492 (get_address_cost_ainc): Likewise.
22493 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22494 (vect_supportable_dr_alignment): Likewise.
22495 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22496 (vectorizable_reduction): Likewise.
22497 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22498 (vectorizable_operation, vectorizable_load): Likewise.
22499 * tree.c (build_same_sized_truth_vector_type): Likewise.
22500 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22501 * var-tracking.c (emit_note_insn_var_location): Likewise.
22502 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22503 (ADDR_VEC_ALIGN): Likewise.
22505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22506 Alan Hayward <alan.hayward@arm.com>
22507 David Sherwood <david.sherwood@arm.com>
22509 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22511 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22512 or if measurement_type is polynomial.
22513 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22514 * combine.c (make_extraction): Likewise.
22515 * dse.c (find_shift_sequence): Likewise.
22516 * dwarf2out.c (mem_loc_descriptor): Likewise.
22517 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22518 (extract_bit_field, extract_low_bits): Likewise.
22519 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22520 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22521 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22522 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22523 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22524 * reload.c (find_reloads): Likewise.
22525 * reload1.c (alter_reg): Likewise.
22526 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22527 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22528 * tree-if-conv.c (predicate_mem_writes): Likewise.
22529 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22530 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22531 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22532 * valtrack.c (dead_debug_insert_temp): Likewise.
22533 * varasm.c (mergeable_constant_section): Likewise.
22534 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22536 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22537 Alan Hayward <alan.hayward@arm.com>
22538 David Sherwood <david.sherwood@arm.com>
22540 * expr.c (expand_assignment): Cope with polynomial mode sizes
22541 when assigning to a CONCAT.
22543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22544 Alan Hayward <alan.hayward@arm.com>
22545 David Sherwood <david.sherwood@arm.com>
22547 * machmode.h (mode_precision): Change from unsigned short to
22549 (mode_to_precision): Return a poly_uint16 rather than an unsigned
22551 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22552 or if measurement_type is not polynomial.
22553 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
22554 in which the mode is already known to be a scalar_int_mode.
22555 * genmodes.c (emit_mode_precision): Change the type of mode_precision
22556 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
22558 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22559 for GET_MODE_PRECISION.
22560 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22561 for GET_MODE_PRECISION.
22562 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22564 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22565 (expand_field_assignment, make_extraction): Likewise.
22566 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22567 (get_last_value): Likewise.
22568 * convert.c (convert_to_integer_1): Likewise.
22569 * cse.c (cse_insn): Likewise.
22570 * expr.c (expand_expr_real_1): Likewise.
22571 * lra-constraints.c (simplify_operand_subreg): Likewise.
22572 * optabs-query.c (can_atomic_load_p): Likewise.
22573 * optabs.c (expand_atomic_load): Likewise.
22574 (expand_atomic_store): Likewise.
22575 * ree.c (combine_reaching_defs): Likewise.
22576 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22577 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22578 * tree.h (type_has_mode_precision_p): Likewise.
22579 * ubsan.c (instrument_si_overflow): Likewise.
22581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22582 Alan Hayward <alan.hayward@arm.com>
22583 David Sherwood <david.sherwood@arm.com>
22585 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22586 polynomial numbers of units.
22587 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22588 (valid_vector_subparts_p): New function.
22589 (build_vector_type): Remove temporary shim and take the number
22590 of units as a poly_uint64 rather than an int.
22591 (build_opaque_vector_type): Take the number of units as a
22592 poly_uint64 rather than an int.
22593 * tree.c (build_vector_from_ctor): Handle polynomial
22594 TYPE_VECTOR_SUBPARTS.
22595 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22596 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22597 (build_vector_from_val): If the number of units is variable,
22598 use build_vec_duplicate_cst for constant operands and
22599 VEC_DUPLICATE_EXPR otherwise.
22600 (make_vector_type): Remove temporary is_constant ().
22601 (build_vector_type, build_opaque_vector_type): Take the number of
22602 units as a poly_uint64 rather than an int.
22603 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22605 * cfgexpand.c (expand_debug_expr): Likewise.
22606 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22607 (store_constructor, expand_expr_real_1): Likewise.
22608 (const_scalar_mask_from_tree): Likewise.
22609 * fold-const-call.c (fold_const_reduction): Likewise.
22610 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22611 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22612 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22613 (fold_relational_const): Likewise.
22614 (native_interpret_vector): Likewise. Change the size from an
22615 int to an unsigned int.
22616 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22617 TYPE_VECTOR_SUBPARTS.
22618 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22619 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22620 duplicating a non-constant operand into a variable-length vector.
22621 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22622 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22623 * ipa-icf.c (sem_variable::equals): Likewise.
22624 * match.pd: Likewise.
22625 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22626 * print-tree.c (print_node): Likewise.
22627 * stor-layout.c (layout_type): Likewise.
22628 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22629 * tree-cfg.c (verify_gimple_comparison): Likewise.
22630 (verify_gimple_assign_binary): Likewise.
22631 (verify_gimple_assign_ternary): Likewise.
22632 (verify_gimple_assign_single): Likewise.
22633 * tree-pretty-print.c (dump_generic_node): Likewise.
22634 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22635 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22636 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22637 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22638 (vect_shift_permute_load_chain): Likewise.
22639 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22640 (expand_vector_condition, optimize_vector_constructor): Likewise.
22641 (lower_vec_perm, get_compute_type): Likewise.
22642 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22643 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22644 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22645 (vect_recog_mask_conversion_pattern): Likewise.
22646 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22647 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22648 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22649 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22650 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22651 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22652 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22653 (supportable_widening_operation): Likewise.
22654 (supportable_narrowing_operation): Likewise.
22655 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22657 * varasm.c (output_constant): Likewise.
22659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22660 Alan Hayward <alan.hayward@arm.com>
22661 David Sherwood <david.sherwood@arm.com>
22663 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22664 so that both the length == 3 and length != 3 cases set up their
22665 own permute vectors. Add comments explaining why we know the
22666 number of elements is constant.
22667 (vect_permute_load_chain): Likewise.
22669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22670 Alan Hayward <alan.hayward@arm.com>
22671 David Sherwood <david.sherwood@arm.com>
22673 * machmode.h (mode_nunits): Change from unsigned char to
22675 (ONLY_FIXED_SIZE_MODES): New macro.
22676 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22677 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22678 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22680 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22681 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22682 or if measurement_type is not polynomial.
22683 * genmodes.c (ZERO_COEFFS): New macro.
22684 (emit_mode_nunits_inline): Make mode_nunits_inline return a
22686 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22687 Use ZERO_COEFFS when emitting initializers.
22688 * data-streamer.h (bp_pack_poly_value): New function.
22689 (bp_unpack_poly_value): Likewise.
22690 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22691 for GET_MODE_NUNITS.
22692 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22693 for GET_MODE_NUNITS.
22694 * tree.c (make_vector_type): Remove temporary shim and make
22695 the real function take the number of units as a poly_uint64
22696 rather than an int.
22697 (build_vector_type_for_mode): Handle polynomial nunits.
22698 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22699 * emit-rtl.c (const_vec_series_p_1): Likewise.
22700 (gen_rtx_CONST_VECTOR): Likewise.
22701 * fold-const.c (test_vec_duplicate_folding): Likewise.
22702 * genrecog.c (validate_pattern): Likewise.
22703 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22704 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22705 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22706 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22707 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22708 * rtlanal.c (subreg_get_info): Likewise.
22709 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22710 (vect_grouped_load_supported): Likewise.
22711 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22712 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22713 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22714 (simplify_const_unary_operation, simplify_binary_operation_1)
22715 (simplify_const_binary_operation, simplify_ternary_operation)
22716 (test_vector_ops_duplicate, test_vector_ops): Likewise.
22717 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22718 instead of CONST_VECTOR_NUNITS.
22719 * varasm.c (output_constant_pool_2): Likewise.
22720 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22721 explicit-encoded elements in the XVEC for variable-length vectors.
22723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22725 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22727 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22728 Alan Hayward <alan.hayward@arm.com>
22729 David Sherwood <david.sherwood@arm.com>
22731 * coretypes.h (fixed_size_mode): Declare.
22732 (fixed_size_mode_pod): New typedef.
22733 * builtins.h (target_builtins::x_apply_args_mode)
22734 (target_builtins::x_apply_result_mode): Change type to
22735 fixed_size_mode_pod.
22736 * builtins.c (apply_args_size, apply_result_size, result_vector)
22737 (expand_builtin_apply_args_1, expand_builtin_apply)
22738 (expand_builtin_return): Update accordingly.
22740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22742 * cse.c (hash_rtx_cb): Hash only the encoded elements.
22743 * cselib.c (cselib_hash_rtx): Likewise.
22744 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22745 CONST_VECTOR encoding.
22747 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22748 Jeff Law <law@redhat.com>
22751 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22752 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22753 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22754 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22757 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22758 explicitly probe *sp in a noreturn function if there were any callee
22759 register saves or frame pointer is needed.
22761 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22764 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22765 BLKmode for ternary, binary or unary expressions.
22768 * var-tracking.c (delete_vta_debug_insn): New inline function.
22769 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22770 insns from get_insns () to NULL instead of each bb separately.
22771 Use delete_vta_debug_insn. No longer static.
22772 (vt_debug_insns_local, variable_tracking_main_1): Adjust
22773 delete_vta_debug_insns callers.
22774 * rtl.h (delete_vta_debug_insns): Declare.
22775 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22776 instead of variable_tracking_main.
22778 2018-01-03 Martin Sebor <msebor@redhat.com>
22780 PR tree-optimization/83603
22781 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22782 arguments past the endof the argument list in functions declared
22783 without a prototype.
22784 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22785 Avoid checking when arguments are null.
22787 2018-01-03 Martin Sebor <msebor@redhat.com>
22790 * doc/extend.texi (attribute const): Fix a typo.
22791 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22792 issuing -Wsuggest-attribute for void functions.
22794 2018-01-03 Martin Sebor <msebor@redhat.com>
22796 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22797 offset_int::from instead of wide_int::to_shwi.
22798 (maybe_diag_overlap): Remove assertion.
22799 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22800 * gimple-ssa-sprintf.c (format_directive): Same.
22801 (parse_directive): Same.
22802 (sprintf_dom_walker::compute_format_length): Same.
22803 (try_substitute_return_value): Same.
22805 2018-01-03 Jeff Law <law@redhat.com>
22807 PR middle-end/83654
22808 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22809 non-constant residual for zero at runtime and avoid probing in
22810 that case. Reorganize code for trailing problem to mirror handling
22813 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22815 PR tree-optimization/83501
22816 * tree-ssa-strlen.c (get_string_cst): New.
22817 (handle_char_store): Call get_string_cst.
22819 2018-01-03 Martin Liska <mliska@suse.cz>
22821 PR tree-optimization/83593
22822 * tree-ssa-strlen.c: Include tree-cfg.h.
22823 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22824 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22825 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22827 (strlen_dom_walker::before_dom_children): Call
22828 gimple_purge_dead_eh_edges. Dump tranformation with details
22830 (strlen_dom_walker::before_dom_children): Update call by adding
22831 new argument cleanup_eh.
22832 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22834 2018-01-03 Martin Liska <mliska@suse.cz>
22837 * cif-code.def (VARIADIC_THUNK): New enum value.
22838 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22841 2018-01-03 Jan Beulich <jbeulich@suse.com>
22843 * sse.md (mov<mode>_internal): Tighten condition for when to use
22844 vmovdqu<ssescalarsize> for TI and OI modes.
22846 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22848 Update copyright years.
22850 2018-01-03 Martin Liska <mliska@suse.cz>
22853 * ipa-visibility.c (function_and_variable_visibility): Skip
22854 functions with noipa attribure.
22856 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22858 * gcc.c (process_command): Update copyright notice dates.
22859 * gcov-dump.c (print_version): Ditto.
22860 * gcov.c (print_version): Ditto.
22861 * gcov-tool.c (print_version): Ditto.
22862 * gengtype.c (create_file): Ditto.
22863 * doc/cpp.texi: Bump @copying's copyright year.
22864 * doc/cppinternals.texi: Ditto.
22865 * doc/gcc.texi: Ditto.
22866 * doc/gccint.texi: Ditto.
22867 * doc/gcov.texi: Ditto.
22868 * doc/install.texi: Ditto.
22869 * doc/invoke.texi: Ditto.
22871 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22873 * vector-builder.h (vector_builder::m_full_nelts): Change from
22874 unsigned int to poly_uint64.
22875 (vector_builder::full_nelts): Update prototype accordingly.
22876 (vector_builder::new_vector): Likewise.
22877 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22878 (vector_builder::operator ==): Likewise.
22879 (vector_builder::finalize): Likewise.
22880 * int-vector-builder.h (int_vector_builder::int_vector_builder):
22881 Take the number of elements as a poly_uint64 rather than an
22883 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22884 from unsigned int to poly_uint64.
22885 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22886 (vec_perm_indices::new_vector): Likewise.
22887 (vec_perm_indices::length): Likewise.
22888 (vec_perm_indices::nelts_per_input): Likewise.
22889 (vec_perm_indices::input_nelts): Likewise.
22890 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22891 number of elements per input as a poly_uint64 rather than an
22892 unsigned int. Use the original encoding for variable-length
22893 vectors, rather than clamping each individual element.
22894 For the second and subsequent elements in each pattern,
22895 clamp the step and base before clamping their sum.
22896 (vec_perm_indices::series_p): Handle polynomial element counts.
22897 (vec_perm_indices::all_in_range_p): Likewise.
22898 (vec_perm_indices_to_tree): Likewise.
22899 (vec_perm_indices_to_rtx): Likewise.
22900 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22901 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22902 (tree_vector_builder::new_binary_operation): Handle polynomial
22903 element counts. Return false if we need to know the number
22904 of elements at compile time.
22905 * fold-const.c (fold_vec_perm): Punt if the number of elements
22906 isn't known at compile time.
22908 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22910 * vec-perm-indices.h (vec_perm_builder): Change element type
22911 from HOST_WIDE_INT to poly_int64.
22912 (vec_perm_indices::element_type): Update accordingly.
22913 (vec_perm_indices::clamp): Handle polynomial element_types.
22914 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22915 (vec_perm_indices::all_in_range_p): Likewise.
22916 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22918 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22919 polynomial vec_perm_indices element types.
22920 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22921 * fold-const.c (fold_vec_perm): Likewise.
22922 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22923 * tree-vect-generic.c (lower_vec_perm): Likewise.
22924 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22925 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22926 element type to HOST_WIDE_INT.
22928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22929 Alan Hayward <alan.hayward@arm.com>
22930 David Sherwood <david.sherwood@arm.com>
22932 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22933 rather than an int. Use plus_constant.
22934 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22935 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22938 Alan Hayward <alan.hayward@arm.com>
22939 David Sherwood <david.sherwood@arm.com>
22941 * calls.c (emit_call_1, expand_call): Change struct_value_size from
22942 a HOST_WIDE_INT to a poly_int64.
22944 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22945 Alan Hayward <alan.hayward@arm.com>
22946 David Sherwood <david.sherwood@arm.com>
22948 * calls.c (load_register_parameters): Cope with polynomial
22949 mode sizes. Require a constant size for BLKmode parameters
22950 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
22951 forces a parameter to be padded at the lsb end in order to
22952 fill a complete number of words, require the parameter size
22953 to be ordered wrt UNITS_PER_WORD.
22955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22956 Alan Hayward <alan.hayward@arm.com>
22957 David Sherwood <david.sherwood@arm.com>
22959 * reload1.c (spill_stack_slot_width): Change element type
22960 from unsigned int to poly_uint64_pod.
22961 (alter_reg): Treat mode sizes as polynomial.
22963 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22964 Alan Hayward <alan.hayward@arm.com>
22965 David Sherwood <david.sherwood@arm.com>
22967 * reload.c (complex_word_subreg_p): New function.
22968 (reload_inner_reg_of_subreg, push_reload): Use it.
22970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22971 Alan Hayward <alan.hayward@arm.com>
22972 David Sherwood <david.sherwood@arm.com>
22974 * lra-constraints.c (process_alt_operands): Reject matched
22975 operands whose sizes aren't ordered.
22976 (match_reload): Refer to this check here.
22978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22979 Alan Hayward <alan.hayward@arm.com>
22980 David Sherwood <david.sherwood@arm.com>
22982 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22983 that the mode size is in the set {1, 2, 4, 8, 16}.
22985 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22986 Alan Hayward <alan.hayward@arm.com>
22987 David Sherwood <david.sherwood@arm.com>
22989 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22990 Use plus_constant instead of gen_rtx_PLUS.
22992 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22993 Alan Hayward <alan.hayward@arm.com>
22994 David Sherwood <david.sherwood@arm.com>
22996 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22997 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22998 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22999 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
23000 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
23001 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
23002 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
23003 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
23004 * config/i386/i386.c (ix86_push_rounding): ...this new function.
23005 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
23007 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
23008 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
23009 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
23010 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
23011 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
23012 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
23013 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
23014 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23015 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23016 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23018 * expr.c (emit_move_resolve_push): Treat the input and result
23019 of PUSH_ROUNDING as a poly_int64.
23020 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23021 (emit_push_insn): Likewise.
23022 * lra-eliminations.c (mark_not_eliminable): Likewise.
23023 * recog.c (push_operand): Likewise.
23024 * reload1.c (elimination_effects): Likewise.
23025 * rtlanal.c (nonzero_bits1): Likewise.
23026 * calls.c (store_one_arg): Likewise. Require the padding to be
23027 known at compile time.
23029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23030 Alan Hayward <alan.hayward@arm.com>
23031 David Sherwood <david.sherwood@arm.com>
23033 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23034 Use plus_constant instead of gen_rtx_PLUS.
23036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23037 Alan Hayward <alan.hayward@arm.com>
23038 David Sherwood <david.sherwood@arm.com>
23040 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23041 rather than an int.
23043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23044 Alan Hayward <alan.hayward@arm.com>
23045 David Sherwood <david.sherwood@arm.com>
23047 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23048 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23049 via stack temporaries. Treat the mode size as polynomial too.
23051 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23052 Alan Hayward <alan.hayward@arm.com>
23053 David Sherwood <david.sherwood@arm.com>
23055 * expr.c (expand_expr_real_2): When handling conversions involving
23056 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23057 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23058 as a poly_uint64 too.
23060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23061 Alan Hayward <alan.hayward@arm.com>
23062 David Sherwood <david.sherwood@arm.com>
23064 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
23066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23067 Alan Hayward <alan.hayward@arm.com>
23068 David Sherwood <david.sherwood@arm.com>
23070 * combine.c (can_change_dest_mode): Handle polynomial
23071 REGMODE_NATURAL_SIZE.
23072 * expmed.c (store_bit_field_1): Likewise.
23073 * expr.c (store_constructor): Likewise.
23074 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23075 and polynomial REGMODE_NATURAL_SIZE.
23076 (gen_lowpart_common): Likewise.
23077 * reginfo.c (record_subregs_of_mode): Likewise.
23078 * rtlanal.c (read_modify_subreg_p): Likewise.
23080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23081 Alan Hayward <alan.hayward@arm.com>
23082 David Sherwood <david.sherwood@arm.com>
23084 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23085 numbers of elements.
23087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23088 Alan Hayward <alan.hayward@arm.com>
23089 David Sherwood <david.sherwood@arm.com>
23091 * match.pd: Cope with polynomial numbers of vector elements.
23093 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23094 Alan Hayward <alan.hayward@arm.com>
23095 David Sherwood <david.sherwood@arm.com>
23097 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23098 in a POINTER_PLUS_EXPR.
23100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23101 Alan Hayward <alan.hayward@arm.com>
23102 David Sherwood <david.sherwood@arm.com>
23104 * omp-simd-clone.c (simd_clone_subparts): New function.
23105 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23106 (ipa_simd_modify_function_body): Likewise.
23108 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23109 Alan Hayward <alan.hayward@arm.com>
23110 David Sherwood <david.sherwood@arm.com>
23112 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23113 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23114 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23115 (expand_vector_condition, vector_element): Likewise.
23116 (subparts_gt): New function.
23117 (get_compute_type): Use subparts_gt.
23118 (count_type_subparts): Delete.
23119 (expand_vector_operations_1): Use subparts_gt instead of
23120 count_type_subparts.
23122 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23123 Alan Hayward <alan.hayward@arm.com>
23124 David Sherwood <david.sherwood@arm.com>
23126 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23127 (vect_compile_time_alias): ...this new function. Do the calculation
23128 on poly_ints rather than trees.
23129 (vect_prune_runtime_alias_test_list): Update call accordingly.
23131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23132 Alan Hayward <alan.hayward@arm.com>
23133 David Sherwood <david.sherwood@arm.com>
23135 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23137 (vect_schedule_slp_instance): Likewise.
23139 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23140 Alan Hayward <alan.hayward@arm.com>
23141 David Sherwood <david.sherwood@arm.com>
23143 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23144 constant and extern definitions for variable-length vectors.
23145 (vect_get_constant_vectors): Note that the number of units
23146 is known to be constant.
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 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23153 of units as polynomial. Choose between WIDE and NARROW based
23156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23157 Alan Hayward <alan.hayward@arm.com>
23158 David Sherwood <david.sherwood@arm.com>
23160 * tree-vect-stmts.c (simd_clone_subparts): New function.
23161 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23164 Alan Hayward <alan.hayward@arm.com>
23165 David Sherwood <david.sherwood@arm.com>
23167 * tree-vect-stmts.c (vectorizable_call): Treat the number of
23168 vectors as polynomial. Use build_index_vector for
23169 IFN_GOMP_SIMD_LANE.
23171 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23172 Alan Hayward <alan.hayward@arm.com>
23173 David Sherwood <david.sherwood@arm.com>
23175 * tree-vect-stmts.c (get_load_store_type): Treat the number of
23176 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23177 for variable-length vectors.
23178 (vectorizable_mask_load_store): Treat the number of units as
23179 polynomial, asserting that it is constant if the condition has
23180 already been enforced.
23181 (vectorizable_store, vectorizable_load): Likewise.
23183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23184 Alan Hayward <alan.hayward@arm.com>
23185 David Sherwood <david.sherwood@arm.com>
23187 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23188 of units as polynomial. Punt if we can't tell at compile time
23189 which vector contains the final result.
23191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23192 Alan Hayward <alan.hayward@arm.com>
23193 David Sherwood <david.sherwood@arm.com>
23195 * tree-vect-loop.c (vectorizable_induction): Treat the number
23196 of units as polynomial. Punt on SLP inductions. Use an integer
23197 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23198 cast of such a series for variable-length floating-point
23201 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23202 Alan Hayward <alan.hayward@arm.com>
23203 David Sherwood <david.sherwood@arm.com>
23205 * tree.h (build_index_vector): Declare.
23206 * tree.c (build_index_vector): New function.
23207 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23208 of units as polynomial, forcibly converting it to a constant if
23209 vectorizable_reduction has already enforced the condition.
23210 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23211 to create a {1,2,3,...} vector.
23212 (vectorizable_reduction): Treat the number of units as polynomial.
23213 Choose vectype_in based on the largest scalar element size rather
23214 than the smallest number of units. Enforce the restrictions
23217 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23218 Alan Hayward <alan.hayward@arm.com>
23219 David Sherwood <david.sherwood@arm.com>
23221 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23222 number of units as polynomial.
23224 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23225 Alan Hayward <alan.hayward@arm.com>
23226 David Sherwood <david.sherwood@arm.com>
23228 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23229 * target.def (autovectorize_vector_sizes): Return the vector sizes
23230 by pointer, using vector_sizes rather than a bitmask.
23231 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23232 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23233 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23235 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23236 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23237 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23238 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23239 * omp-general.c (omp_max_vf): Likewise.
23240 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23241 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23242 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23243 * tree-vect-slp.c (vect_slp_bb): Likewise.
23244 * doc/tm.texi: Regenerate.
23245 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23247 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23248 the vector size as a poly_uint64 rather than an unsigned int.
23249 (current_vector_size): Change from an unsigned int to a poly_uint64.
23250 (get_vectype_for_scalar_type): Update accordingly.
23251 * tree.h (build_truth_vector_type): Take the size and number of
23252 units as a poly_uint64 rather than an unsigned int.
23253 (build_vector_type): Add a temporary overload that takes
23254 the number of units as a poly_uint64 rather than an unsigned int.
23255 * tree.c (make_vector_type): Likewise.
23256 (build_truth_vector_type): Take the number of units as a poly_uint64
23257 rather than an unsigned int.
23259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23260 Alan Hayward <alan.hayward@arm.com>
23261 David Sherwood <david.sherwood@arm.com>
23263 * target.def (get_mask_mode): Take the number of units and length
23264 as poly_uint64s rather than unsigned ints.
23265 * targhooks.h (default_get_mask_mode): Update accordingly.
23266 * targhooks.c (default_get_mask_mode): Likewise.
23267 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23268 * doc/tm.texi: Regenerate.
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-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23275 * omp-general.c (omp_max_vf): Likewise.
23276 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23277 (expand_omp_simd): Handle polynomial safelen.
23278 * omp-low.c (omplow_simd_context): Add a default constructor.
23279 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23280 (lower_rec_simd_input_clauses): Update accordingly.
23281 (lower_rec_input_clauses): Likewise.
23283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23284 Alan Hayward <alan.hayward@arm.com>
23285 David Sherwood <david.sherwood@arm.com>
23287 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23288 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23289 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23290 (vect_analyze_slp_cost): Likewise.
23291 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23292 (vect_model_load_cost): Likewise.
23294 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23295 Alan Hayward <alan.hayward@arm.com>
23296 David Sherwood <david.sherwood@arm.com>
23298 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23299 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23300 from an unsigned int * to a poly_uint64_pod *.
23301 (calculate_unrolling_factor): New function.
23302 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23304 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23305 Alan Hayward <alan.hayward@arm.com>
23306 David Sherwood <david.sherwood@arm.com>
23308 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23309 from an unsigned int to a poly_uint64.
23310 (_loop_vec_info::slp_unrolling_factor): Likewise.
23311 (_loop_vec_info::vectorization_factor): Change from an int
23313 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23314 (vect_get_num_vectors): New function.
23315 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23316 (vect_get_num_copies): Use vect_get_num_vectors.
23317 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23318 to an unsigned int *.
23319 (vect_analyze_data_refs): Change min_vf from an int * to a
23321 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23322 than an unsigned HOST_WIDE_INT.
23323 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23324 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23325 to an unsigned int *.
23326 (vect_analyze_data_ref_dependences): Likewise.
23327 (vect_compute_data_ref_alignment): Handle polynomial vf.
23328 (vect_enhance_data_refs_alignment): Likewise.
23329 (vect_prune_runtime_alias_test_list): Likewise.
23330 (vect_shift_permute_load_chain): Likewise.
23331 (vect_supportable_dr_alignment): Likewise.
23332 (dependence_distance_ge_vf): Take the vectorization factor as a
23333 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23334 (vect_analyze_data_refs): Change min_vf from an int * to a
23336 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23337 vfm1 as a poly_uint64 rather than an int. Make the same change
23338 for the returned bound_scalar.
23339 (vect_gen_vector_loop_niters): Handle polynomial vf.
23340 (vect_do_peeling): Likewise. Update call to
23341 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23342 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23344 * tree-vect-loop.c (vect_determine_vectorization_factor)
23345 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23346 (vect_get_known_peeling_cost): Likewise.
23347 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23348 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23349 (vect_transform_loop): Likewise. Use the lowest possible VF when
23350 updating the upper bounds of the loop.
23351 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23352 rather than an int.
23353 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23354 polynomial unroll factors.
23355 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23356 (vect_make_slp_decision): Likewise.
23357 (vect_supported_load_permutation_p): Likewise, and polynomial
23359 (vect_analyze_slp_cost): Handle polynomial vf.
23360 (vect_slp_analyze_node_operations): Likewise.
23361 (vect_slp_analyze_bb_1): Likewise.
23362 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23363 than an unsigned HOST_WIDE_INT.
23364 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23365 (vectorizable_load): Handle polynomial vf.
23366 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23368 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23371 Alan Hayward <alan.hayward@arm.com>
23372 David Sherwood <david.sherwood@arm.com>
23374 * match.pd: Handle bit operations involving three constants
23375 and try to fold one pair.
23377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23379 * tree-vect-loop-manip.c: Include gimple-fold.h.
23380 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23381 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23382 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23383 Add a path that uses a step of VF instead of 1, but disable it
23385 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23386 and niters_no_overflow parameters. Update calls to
23387 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23388 Create a new SSA name if the latter choses to use a ste other
23389 than zero, and return it via niters_vector_mult_vf_var.
23390 * tree-vect-loop.c (vect_transform_loop): Update calls to
23391 vect_do_peeling, vect_gen_vector_loop_niters and
23392 slpeel_make_loop_iterate_ntimes.
23393 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23394 (vect_gen_vector_loop_niters): Update declarations after above changes.
23396 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23398 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23399 128-bit round to integer instructions.
23400 (ceil<mode>2): Likewise.
23401 (btrunc<mode>2): Likewise.
23402 (round<mode>2): Likewise.
23404 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23406 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23407 unaligned VSX load/store on P8/P9.
23408 (expand_block_clear): Allow the use of unaligned VSX
23409 load/store on P8/P9.
23411 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23413 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23415 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23416 swap associated with both a load and a store.
23418 2018-01-02 Andrew Waterman <andrew@sifive.com>
23420 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23421 * config/riscv/riscv.md (clear_cache): Use it.
23423 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23425 * web.c: Remove out-of-date comment.
23427 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23429 * expr.c (fixup_args_size_notes): Check that any existing
23430 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23431 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23432 (emit_single_push_insn): ...here.
23434 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23436 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23437 (const_vector_encoded_nelts): New function.
23438 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23439 (const_vector_int_elt, const_vector_elt): Declare.
23440 * emit-rtl.c (const_vector_int_elt_1): New function.
23441 (const_vector_elt): Likewise.
23442 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23443 of CONST_VECTOR_ELT.
23445 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23447 * expr.c: Include rtx-vector-builder.h.
23448 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23449 directly on the tree encoding.
23450 (const_vector_from_tree): Likewise.
23451 * optabs.c: Include rtx-vector-builder.h.
23452 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23453 sequence of "u" values.
23454 * vec-perm-indices.c: Include rtx-vector-builder.h.
23455 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23456 directly on the vec_perm_indices encoding.
23458 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23460 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23461 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23462 * rtx-vector-builder.h: New file.
23463 * rtx-vector-builder.c: Likewise.
23464 * rtl.h (rtx_def::u2): Add a const_vector field.
23465 (CONST_VECTOR_NPATTERNS): New macro.
23466 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23467 (CONST_VECTOR_DUPLICATE_P): Likewise.
23468 (CONST_VECTOR_STEPPED_P): Likewise.
23469 (CONST_VECTOR_ENCODED_ELT): Likewise.
23470 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23471 (unwrap_const_vec_duplicate): Likewise.
23472 (const_vec_series_p): Check for a non-duplicated vector encoding.
23473 Say that the function only returns true for integer vectors.
23474 * emit-rtl.c: Include rtx-vector-builder.h.
23475 (gen_const_vec_duplicate_1): Delete.
23476 (gen_const_vector): Call gen_const_vec_duplicate instead of
23477 gen_const_vec_duplicate_1.
23478 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23479 (gen_const_vec_duplicate): Use rtx_vector_builder.
23480 (gen_const_vec_series): Likewise.
23481 (gen_rtx_CONST_VECTOR): Likewise.
23482 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23483 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23484 Build a new vector rather than modifying a CONST_VECTOR in-place.
23485 (handle_special_swappables): Update call accordingly.
23486 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23487 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23488 Build a new vector rather than modifying a CONST_VECTOR in-place.
23489 (handle_special_swappables): Update call accordingly.
23491 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23493 * simplify-rtx.c (simplify_const_binary_operation): Use
23494 CONST_VECTOR_ELT instead of XVECEXP.
23496 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23498 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23499 the selector elements to be different from the data elements
23500 if the selector is a VECTOR_CST.
23501 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23502 ssizetype for the selector.
23504 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23506 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23507 before testing each element individually.
23508 * tree-vect-generic.c (lower_vec_perm): Likewise.
23510 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23512 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23513 * selftest-run-tests.c (selftest::run_tests): Call it.
23514 * vector-builder.h (vector_builder::operator ==): New function.
23515 (vector_builder::operator !=): Likewise.
23516 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23517 (vec_perm_indices::all_from_input_p): New function.
23518 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23519 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23520 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23521 instead of reading the VECTOR_CST directly. Detect whether both
23522 vector inputs are the same before constructing the vec_perm_indices,
23523 and update the number of inputs argument accordingly. Use the
23524 utility functions added above. Only construct sel2 if we need to.
23526 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23528 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23529 the broadcast of the low byte.
23530 (expand_mult_highpart): Use an explicit encoding for the permutes.
23531 * optabs-query.c (can_mult_highpart_p): Likewise.
23532 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23533 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23534 (vectorizable_bswap): Likewise.
23535 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23536 explicit encoding for the power-of-2 permutes.
23537 (vect_permute_store_chain): Likewise.
23538 (vect_grouped_load_supported): Likewise.
23539 (vect_permute_load_chain): Likewise.
23541 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23543 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23544 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23545 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23546 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23547 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23548 (vect_gen_perm_mask_any): Likewise.
23550 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23552 * int-vector-builder.h: New file.
23553 * vec-perm-indices.h: Include int-vector-builder.h.
23554 (vec_perm_indices): Redefine as an int_vector_builder.
23555 (auto_vec_perm_indices): Delete.
23556 (vec_perm_builder): Redefine as a stand-alone class.
23557 (vec_perm_indices::vec_perm_indices): New function.
23558 (vec_perm_indices::clamp): Likewise.
23559 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23560 (vec_perm_indices::new_vector): New function.
23561 (vec_perm_indices::new_expanded_vector): Update for new
23562 vec_perm_indices class.
23563 (vec_perm_indices::rotate_inputs): New function.
23564 (vec_perm_indices::all_in_range_p): Operate directly on the
23565 encoded form, without computing elided elements.
23566 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23567 encoding. Update for new vec_perm_indices class.
23568 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23569 the given vec_perm_builder.
23570 (expand_vec_perm_var): Update vec_perm_builder constructor.
23571 (expand_mult_highpart): Use vec_perm_builder instead of
23572 auto_vec_perm_indices.
23573 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23574 vec_perm_indices instead of auto_vec_perm_indices. Use a single
23575 or double series encoding as appropriate.
23576 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23577 vec_perm_indices instead of auto_vec_perm_indices.
23578 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23579 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23580 (vect_permute_store_chain): Likewise.
23581 (vect_grouped_load_supported): Likewise.
23582 (vect_permute_load_chain): Likewise.
23583 (vect_shift_permute_load_chain): Likewise.
23584 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23585 (vect_transform_slp_perm_load): Likewise.
23586 (vect_schedule_slp_instance): Likewise.
23587 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23588 (vectorizable_mask_load_store): Likewise.
23589 (vectorizable_bswap): Likewise.
23590 (vectorizable_store): Likewise.
23591 (vectorizable_load): Likewise.
23592 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23593 vec_perm_indices instead of auto_vec_perm_indices. Use
23594 tree_to_vec_perm_builder to read the vector from a tree.
23595 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23596 vec_perm_builder instead of a vec_perm_indices.
23597 (have_whole_vector_shift): Use vec_perm_builder and
23598 vec_perm_indices instead of auto_vec_perm_indices. Leave the
23599 truncation to calc_vec_perm_mask_for_shift.
23600 (vect_create_epilog_for_reduction): Likewise.
23601 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23602 from auto_vec_perm_indices to vec_perm_indices.
23603 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23604 instead of changing individual elements.
23605 (aarch64_vectorize_vec_perm_const): Use new_vector to install
23606 the vector in d.perm.
23607 * config/arm/arm.c (expand_vec_perm_d::perm): Change
23608 from auto_vec_perm_indices to vec_perm_indices.
23609 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23610 instead of changing individual elements.
23611 (arm_vectorize_vec_perm_const): Use new_vector to install
23612 the vector in d.perm.
23613 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23614 Update vec_perm_builder constructor.
23615 (rs6000_expand_interleave): Likewise.
23616 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23617 (rs6000_expand_interleave): Likewise.
23619 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23621 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23622 to qimode could truncate the indices.
23623 * optabs.c (expand_vec_perm_var): Likewise.
23625 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23627 * Makefile.in (OBJS): Add vec-perm-indices.o.
23628 * vec-perm-indices.h: New file.
23629 * vec-perm-indices.c: Likewise.
23630 * target.h (vec_perm_indices): Replace with a forward class
23632 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23633 * optabs.h: Include vec-perm-indices.h.
23634 (expand_vec_perm): Delete.
23635 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23636 (expand_vec_perm_const): Declare.
23637 * target.def (vec_perm_const_ok): Replace with...
23638 (vec_perm_const): ...this new hook.
23639 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23640 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23641 * doc/tm.texi: Regenerate.
23642 * optabs.def (vec_perm_const): Delete.
23643 * doc/md.texi (vec_perm_const): Likewise.
23644 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23645 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23646 expand_vec_perm for constant permutation vectors. Assert that
23647 the mode of variable permutation vectors is the integer equivalent
23648 of the mode that is being permuted.
23649 * optabs-query.h (selector_fits_mode_p): Declare.
23650 * optabs-query.c: Include vec-perm-indices.h.
23651 (selector_fits_mode_p): New function.
23652 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23653 is defined, instead of checking whether the vec_perm_const_optab
23654 exists. Use targetm.vectorize.vec_perm_const instead of
23655 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23656 fit in the vector mode before using a variable permute.
23657 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23658 vec_perm_indices instead of an rtx.
23659 (expand_vec_perm): Replace with...
23660 (expand_vec_perm_const): ...this new function. Take the selector
23661 as a vec_perm_indices rather than an rtx. Also take the mode of
23662 the selector. Update call to shift_amt_for_vec_perm_mask.
23663 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23664 Use vec_perm_indices::new_expanded_vector to expand the original
23665 selector into bytes. Check whether the indices fit in the vector
23666 mode before using a variable permute.
23667 (expand_vec_perm_var): Make global.
23668 (expand_mult_highpart): Use expand_vec_perm_const.
23669 * fold-const.c: Includes vec-perm-indices.h.
23670 * tree-ssa-forwprop.c: Likewise.
23671 * tree-vect-data-refs.c: Likewise.
23672 * tree-vect-generic.c: Likewise.
23673 * tree-vect-loop.c: Likewise.
23674 * tree-vect-slp.c: Likewise.
23675 * tree-vect-stmts.c: Likewise.
23676 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23678 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23679 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23680 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23681 (aarch64_vectorize_vec_perm_const): ...this new function.
23682 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23683 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23684 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23685 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23686 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23687 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23688 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23690 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
23691 check for NEON modes.
23692 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23693 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23694 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23695 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23697 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
23698 the old VEC_PERM_CONST conditions.
23699 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23700 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23701 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23702 (ia64_vectorize_vec_perm_const_ok): Merge into...
23703 (ia64_vectorize_vec_perm_const): ...this new function.
23704 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23705 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23706 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23707 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23708 * config/mips/mips.c (mips_expand_vec_perm_const)
23709 (mips_vectorize_vec_perm_const_ok): Merge into...
23710 (mips_vectorize_vec_perm_const): ...this new function.
23711 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23712 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23713 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23714 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23715 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23716 (rs6000_expand_vec_perm_const): Delete.
23717 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23719 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23720 (altivec_expand_vec_perm_const_le): Take each operand individually.
23721 Operate on constant selectors rather than rtxes.
23722 (altivec_expand_vec_perm_const): Likewise. Update call to
23723 altivec_expand_vec_perm_const_le.
23724 (rs6000_expand_vec_perm_const): Delete.
23725 (rs6000_vectorize_vec_perm_const_ok): Delete.
23726 (rs6000_vectorize_vec_perm_const): New function.
23727 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23728 an element count and rtx array.
23729 (rs6000_expand_extract_even): Update call accordingly.
23730 (rs6000_expand_interleave): Likewise.
23731 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23732 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23733 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23734 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23735 (rs6000_expand_vec_perm_const): Delete.
23736 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23737 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23738 (altivec_expand_vec_perm_const_le): Take each operand individually.
23739 Operate on constant selectors rather than rtxes.
23740 (altivec_expand_vec_perm_const): Likewise. Update call to
23741 altivec_expand_vec_perm_const_le.
23742 (rs6000_expand_vec_perm_const): Delete.
23743 (rs6000_vectorize_vec_perm_const_ok): Delete.
23744 (rs6000_vectorize_vec_perm_const): New function. Remove stray
23745 reference to the SPE evmerge intructions.
23746 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23747 an element count and rtx array.
23748 (rs6000_expand_extract_even): Update call accordingly.
23749 (rs6000_expand_interleave): Likewise.
23750 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23751 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23753 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23755 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23757 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23758 vector mode and that that mode matches the mode of the data
23760 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23761 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
23762 directly using expand_vec_perm_1 when forcing selectors into
23764 (expand_vec_perm_var): New function, split out from expand_vec_perm.
23766 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23768 * optabs-query.h (can_vec_perm_p): Delete.
23769 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23770 * optabs-query.c (can_vec_perm_p): Split into...
23771 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23772 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23773 particular selector is valid.
23774 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23775 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23776 (vect_grouped_load_supported): Likewise.
23777 (vect_shift_permute_load_chain): Likewise.
23778 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23779 (vect_transform_slp_perm_load): Likewise.
23780 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23781 (vectorizable_bswap): Likewise.
23782 (vect_gen_perm_mask_checked): Likewise.
23783 * fold-const.c (fold_ternary_loc): Likewise. Don't take
23784 implementations of variable permutation vectors into account
23785 when deciding which selector to use.
23786 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23787 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23788 with a false third argument.
23789 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23790 to test whether the constant selector is valid and can_vec_perm_var_p
23791 to test whether a variable selector is valid.
23793 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23795 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23796 * optabs-query.c (can_vec_perm_p): Likewise.
23797 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23798 instead of vec_perm_indices.
23799 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23800 (vect_gen_perm_mask_checked): Likewise,
23801 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23802 (vect_gen_perm_mask_checked): Likewise,
23804 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23806 * optabs-query.h (qimode_for_vec_perm): Declare.
23807 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23808 (qimode_for_vec_perm): ...this new function.
23809 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23811 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23813 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23814 does not have a conditional at the top.
23816 2018-01-02 Richard Biener <rguenther@suse.de>
23818 * ipa-inline.c (big_speedup_p): Fix expression.
23820 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23823 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23826 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23830 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23831 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23832 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23833 cond_taken_branch_cost 3->4.
23835 2018-01-01 Jakub Jelinek <jakub@redhat.com>
23837 PR tree-optimization/83581
23838 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23839 TODO_cleanup_cfg if any changes have been made.
23841 PR middle-end/83608
23842 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23843 convert_modes if target mode has the right side, but different mode
23846 PR middle-end/83609
23847 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23848 last argument when extracting from CONCAT. If either from_real or
23849 from_imag is NULL, use expansion through memory. If result is not
23850 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23851 the parts directly to inner mode, if even that fails, use expansion
23854 PR middle-end/83623
23855 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23856 check for bswap in mode rather than HImode and use that in expand_unop
23859 Copyright (C) 2018 Free Software Foundation, Inc.
23861 Copying and distribution of this file, with or without modification,
23862 are permitted in any medium without royalty provided the copyright
23863 notice and this notice are preserved.