1 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
3 * tree-vrp.c (abs_extent_range): Remove.
4 (extract_range_into_wide_ints): Pass wide ints by reference.
5 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6 Pass wide ints by reference in all calls to
7 extract_range_into_wide_ints.
8 * wide-int-range.cc (wide_int_range_div): New.
9 * wide-int-range.h (wide_int_range_div): New.
10 (wide_int_range_includes_zero_p): New.
11 (wide_int_range_zero_p): New.
13 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
15 * config/aarch64/aarch64.md (arches): New enum.
16 (arch): New enum attr.
17 (arch_enabled): New attr.
18 (enabled): Now uses arch_enabled only.
19 (simd, sve, fp16): Removed attribute.
20 (fp): Attr now defined in terms of 'arch'.
21 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
22 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
23 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
24 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
25 attributes into 'arch'.
26 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
27 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
28 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
29 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
30 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
31 'simd' attribute into 'arch'.
32 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
33 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
34 Convert use of 'fp' attribute to 'arch'.
35 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
36 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
38 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
39 (different modes) Merge 'fp' and 'simd' into 'arch'.
40 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
43 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
45 PR rtl-optimization/87026
46 * expmed.c (canonicalize_comparison): If we can no longer create
47 pseudoregisters, don't.
49 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
52 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
54 * config/arm/arm.c (speculation_barrier_libfunc): New static
56 (arm_init_libfuncs): Initialize it.
57 (arm_emit_speculation_barrier): New function.
58 * config/arm/arm.md (speculation_barrier): Call
59 arm_emit_speculation_barrier for architectures that do not have
61 (speculation_barrier_insn): Only match on Armv7 or later.
63 2018-08-23 Richard Biener <rguenther@suse.de>
66 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
69 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
71 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
72 of single-vector TBLs.
73 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
76 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
79 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
80 aarch64_evpc_tbl guard.
82 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
84 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
87 2018-08-22 Martin Sebor <msebor@redhat.com>
90 * tree-pretty-print.c (pretty_print_string): Add argument.
91 (dump_generic_node): Call to pretty_print_string with string size.
93 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
95 PR rtl-optimization/86771
96 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
97 of two SETs into those two SETs, one to be placed at i2, if that SETs
98 destination is modified between i2 and i3.
100 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
102 PR tree-optimization/86725
103 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
105 (vect_analyze_scalar_cycles_1): Check it.
107 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
109 PR tree-optimization/86725
110 * tree-vect-loop.c (vect_is_simple_reduction): When treating
111 an outer loop phi as a double reduction, make sure that the
112 single user of the phi result is an inner loop phi.
114 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
116 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
117 grouped stores with gaps to a strided group.
119 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
121 * tree-vect-stmts.c (get_group_load_store_type)
122 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
123 first statement in a group.
125 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
127 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
128 the sequence used in gcc/gcc.c.
130 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
133 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
136 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
138 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
139 Darwin10-specific unwinder-shim.
140 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
141 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
142 New to cater for Darwin10 Rosetta.
144 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
146 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
147 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
149 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
154 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
155 (dwarf2out_switch_text_section): Generate a local label for the
156 second function sub-section and apply it as the second FDE start
158 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
159 second sub-section start.
161 2018-08-22 Richard Biener <rguenther@suse.de>
163 PR tree-optimization/86988
164 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
166 2018-08-22 Richard Biener <rguenther@suse.de>
168 PR tree-optimization/86945
169 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
171 2018-08-22 Alexandre Oliva <oliva@adacore.com>
173 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
174 a comment about how uses of r2 for .sdata2 come about.
176 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
178 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
180 2018-08-21 Marek Polacek <polacek@redhat.com>
182 PR c++/86981, Implement -Wpessimizing-move.
183 * doc/invoke.texi: Document -Wpessimizing-move.
185 2018-08-21 Jan Hubicka <jh@suse.cz>
187 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
188 * tree.h (is_redundant_typedef): Remove.
189 * dwarf2out.c (is_redundant_typedef): Turn into static function.
191 2018-08-21 Jan Hubicka <jh@suse.cz>
193 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
196 2018-08-21 Tamar Christina <tamar.christina@arm.com>
198 * expmed.c (extract_low_bits): Reject invalid subregs early.
200 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
203 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
206 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
208 * config/vxworks.h: Guard vxworks_asm_out_constructor and
209 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
210 * config/vxworks.c: Likewise.
212 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
214 * config/vxworks.c: Set targetm.have_ctors_dtors
215 if HAVE_INITFINI_ARRAY_SUPPORT.
216 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
217 if HAVE_INITFINI_ARRAY_SUPPORT.
219 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
221 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
222 default search path for VxWorks < 7.
224 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
226 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
227 (get_format_string): Refer to c_getstr.
229 2018-08-21 Tom de Vries <tdevries@suse.de>
231 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
232 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
233 (debuginfo_early_stop): Declare.
234 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
235 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
236 (debuginfo_early_stop): New function.
237 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
238 and debuginfo_early_stop.
239 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
240 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
241 (general_init): Call debuginfo_early_init.
242 (finalize): Call debuginfo_fini.
243 (do_compile): Call debuginfo_init.
244 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
246 (@item -fdump-debug, @item -fdump-earlydebug): Add.
248 2018-08-21 Tom de Vries <tdevries@suse.de>
250 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
251 flag_dump_noaddr and flag_dump_unnumbered.
253 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
255 * wide-int-range.cc (wide_int_range_abs): New.
256 (wide_int_range_order_set): Rename from wide_int_range_min_max.
257 * wide-int-range.h (wide_int_range_abs): New.
258 (wide_int_range_min_max): New.
259 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
260 case to call wide_int_range_abs.
261 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
262 (extract_range_from_abs_expr): Delete.
264 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
267 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
268 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
271 2018-08-20 Nathan Sidwell <nathan@acm.org>
272 Jeff Law <law@redhat.com>
274 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
275 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
277 2018-08-20 David Malcolm <dmalcolm@redhat.com>
280 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
281 (decl_attributes): Likewise.
282 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
284 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
285 * diagnostic-core.h (class auto_diagnostic_group): New class.
286 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
287 (diagnostic_report_diagnostic): Handle the first diagnostics within
289 (emit_diagnostic): Add auto_diagnostic_group instance.
291 (inform_n): Likewise.
293 (warning_at): Likewise.
294 (warning_n): Likewise.
296 (permerror): Likewise.
299 (error_at): Likewise.
301 (fatal_error): Likewise.
302 (internal_error): Likewise.
303 (internal_error_no_backtrace): Likewise.
304 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
305 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
306 * diagnostic.h (struct diagnostic_context): Add fields
307 "diagnostic_group_nesting_depth",
308 "diagnostic_group_emission_count", "begin_group_cb",
310 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
311 Add auto_diagnostic_group instance(s).
312 (find_explicit_erroneous_behavior): Likewise.
313 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
314 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
315 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
316 (gimplify_va_arg_expr): Likewise.
317 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
318 (HSA_SORRY_AT): Likewise.
319 * ipa-devirt.c (compare_virtual_tables): Likewise.
320 (warn_odr): Likewise.
321 * multiple_target.c (expand_target_clones): Likewise.
322 * opts-common.c (cmdline_handle_error): Likewise.
323 * reginfo.c (globalize_reg): Likewise.
324 * substring-locations.c (format_warning_n_va): Likewise.
325 * tree-inline.c (expand_call_inline): Likewise.
326 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
327 * tree-ssa-loop-niter.c
328 (do_warn_aggressive_loop_optimizations): Likewise.
329 * tree-ssa-uninit.c (warn_uninit): Likewise.
330 * tree.c (warn_deprecated_use): Likewise.
332 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
335 * config/i386/i386.md (eh_return): Always update EH return
336 address in word_mode.
338 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
340 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
341 TARGET_SPLIT_COMPLEX_ARG is defined.
343 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
345 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
347 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
350 * expr.c (expand_assignment): Assert that bitpos is positive.
351 (store_field): Likewise
352 (expand_expr_real_1): Make sure that bitpos is positive.
353 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
356 2018-08-20 Nathan Sidwell <nathan@acm.org>
358 * Makefile.in (CPP_ID_DATA_H): Delete.
359 (CPP_INTERNAL_H): Don't add it.
360 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
361 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
363 2018-08-20 Richard Biener <rguenther@suse.de>
365 PR tree-optimization/78655
366 * tree-vrp.c (extract_range_from_binary_expr_1): Make
367 pointer + offset nonnull if either operand is nonnull work.
369 2018-08-20 Tom de Vries <tdevries@suse.de>
371 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
372 unless the referenced die describes the added property using
373 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
374 Otherwise, add a DW_AT_location to the referenced die.
376 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
379 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
380 register_operand when calling ix86_set_reg_reg_cost.
381 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
382 Set *total to 0 for operands that satisfy x86_64_immediate_operand
383 predicate and to 1 otherwise.
385 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
387 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
388 emit a diagnostic that it is not supported and reset the option.
389 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
390 supported and consume the option. (ASM_FINAL_SPEC): New.
392 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
394 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
397 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
399 C-SKY port: Documentation
401 * doc/extend.texi (C-SKY Function Attributes): New section.
402 * doc/invoke.texi (Option Summary): Add C-SKY options.
403 (C-SKY Options): New section.
404 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
406 2018-08-17 Jojo <jijie_rong@c-sky.com>
407 Huibin Wang <huibin_wang@c-sky.com>
408 Sandra Loosemore <sandra@codesourcery.com>
409 Chung-Lin Tang <cltang@codesourcery.com>
411 C-SKY port: Backend implementation
413 * config/csky/*: New.
414 * common/config/csky/*: New.
416 2018-08-17 Jojo <jijie_rong@c-sky.com>
417 Huibin Wang <huibin_wang@c-sky.com>
418 Sandra Loosemore <sandra@codesourcery.com>
419 Chung-Lin Tang <cltang@codesourcery.com>
420 Andrew Jenner <andrew@codesourcery.com>
422 C-SKY port: Configury
424 * config.gcc (csky-*-*): New.
425 * configure.ac: Add csky to targets for dwarf2 debug_line support.
426 * configure: Regenerated.
428 2018-08-17 David Malcolm <dmalcolm@redhat.com>
430 * dump-context.h: Include "dumpfile.h".
431 (dump_context::dump_printf_va): Convert final param from va_list
432 to va_list *. Convert from ATTRIBUTE_PRINTF to
433 ATTRIBUTE_GCC_DUMP_PRINTF.
434 (dump_context::dump_printf_loc_va): Likewise.
435 * dumpfile.c: Include "stringpool.h".
436 (make_item_for_dump_printf_va): Delete.
437 (make_item_for_dump_printf): Delete.
438 (class dump_pretty_printer): New class.
439 (dump_pretty_printer::dump_pretty_printer): New ctor.
440 (dump_pretty_printer::emit_items): New member function.
441 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
443 (dump_pretty_printer::emit_item): New member function.
444 (dump_pretty_printer::stash_item): New member function.
445 (dump_pretty_printer::format_decoder_cb): New member function.
446 (dump_pretty_printer::decode_format): New member function.
447 (dump_context::dump_printf_va): Reimplement in terms of
449 (dump_context::dump_printf_loc_va): Convert final param from va_list
451 (dump_context::begin_scope): Reimplement call to
452 make_item_for_dump_printf.
453 (dump_printf): Update for change to dump_printf_va.
454 (dump_printf_loc): Likewise.
455 (selftest::test_capture_of_dump_calls): Convert "stmt" from
456 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
458 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
459 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
460 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
461 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
462 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
463 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
464 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
465 within a dump_printf_loc call to "%wu".
466 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
467 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
468 missing space after "=".
469 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
470 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
471 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
472 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
473 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
474 duplicate "vectorized" from message.
476 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
478 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
479 polyNxK_t element's TYPE_STRING_FLAG.
481 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
483 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
484 (they were unnamed before). Fix comments.
486 2018-08-17 Nathan Sidwell <nathan@acm.org>
488 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
490 2018-08-17 Richard Biener <rguenther@suse.de>
492 PR tree-optimization/86841
493 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
495 2018-08-17 Martin Liska <mliska@suse.cz>
497 * common.opt: Remove Warn, Init and Report for options with
498 Ignore/Deprecated flag. Warning is done automatically for
500 * config/i386/i386.opt: Likewise.
501 * config/ia64/ia64.opt: Likewise.
502 * config/rs6000/rs6000.opt: Likewise.
503 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
504 Remove usage of flag_check_pointer_bounds.
505 * lto-wrapper.c (merge_and_complain): Do not handle
506 OPT_fcheck_pointer_bounds.
507 (append_compiler_options): Likewise.
508 * opt-functions.awk: Do not handle Deprecated.
509 * optc-gen.awk: Check that Var, Report and Init are not
510 used for an option with Ignore/Deprecated flag.
511 * opts-common.c (decode_cmdline_option): Do not report
513 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
515 * opts.h (struct cl_option): Remove cl_deprecated flag.
516 (CL_ERR_DEPRECATED): Remove error enum value.
518 2018-08-17 Richard Biener <rguenther@suse.de>
521 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
522 across a va-arg-pack using call adjust its return value accordingly.
524 2018-08-16 Martin Sebor <msebor@redhat.com>
526 PR tree-optimization/86853
527 * gimple-ssa-sprintf.c (struct format_result): Rename member.
528 (struct fmtresult): Add member and initialize it in ctors.
529 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
530 (format_string): Handle %S the same as %ls. Set MAYFAIL.
531 (format_directive): Set POSUNDER4K when MAYFAIL is set.
532 (parse_directive): Handle %C same as %c.
533 (sprintf_dom_walker::compute_format_length): Adjust.
534 (is_call_safe): Adjust.
536 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
538 * builtins.c (c_strlen): Add new parameter eltsize. Use it
539 for determining how to count the elements.
540 * builtins.h (c_strlen): Adjust prototype.
541 * expr.c (string_constant): Add new parameter mem_size.
542 Set *mem_size appropriately.
543 * expr.h (string_constant): Adjust protoype.
544 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
545 * gimple-fold.h (get_range_strlen): Adjust prototype.
546 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
547 (format_string): Call get_string_length with eltsize.
549 2018-08-16 David Malcolm <dmalcolm@redhat.com>
551 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
552 to emit the span, rather than setting it as the prefix.
554 2018-08-16 David Malcolm <dmalcolm@redhat.com>
556 * diagnostic-show-locus.c (layout::start_annotation_line): Add
557 "margin_char" parameter, defaulting to space. Use it in place
558 of pp_space for the initial part of the margin.
559 (layout::print_leading_fixits): Use '+' when filling the margin
560 of line-insertion fix-it hints.
562 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
564 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
567 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
569 * config/rs6000/altivec.md: Don't set length attribute to the default
571 * config/rs6000/darwin.md: Ditto.
572 * config/rs6000/dfp.md: Ditto.
573 * config/rs6000/htm.md: Ditto.
574 * config/rs6000/rs6000.md: Ditto.
575 * config/rs6000/sync.md: Ditto.
576 * config/rs6000/vsx.md: Ditto.
578 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
580 * config/rs6000/altivec.md: Don't set length attribute to the default
581 value, for branch instructions.
582 * config/rs6000/darwin.md: Ditto.
583 * config/rs6000/rs6000.md: Ditto.
585 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
587 * config/rs6000/rs6000.md (length): Always define as const_int 4.
588 (unnamed conditional branch define_insn): Set length to 4 or 8
590 (<bd>_<mode>): Similar, for alternative 0.
591 (<bd>tf_<mode>): Ditto.
593 2018-08-16 Tamar Christina <tamar.christina@arm.com>
595 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
597 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
599 * doc/rtl.texi: Replace old RTX class names with new names.
602 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
604 * expmed.h (canonicalize_comparison): New declaration.
605 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
606 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
607 * optabs.c (prepare_cmp_insn): Likewise.
608 * rtl.h (unsigned_condition_p): New function which checks if a
609 comparison operator is unsigned.
611 2018-08-16 Nathan Sidwell <nathan@acm.org>
613 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
614 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
616 2018-08-16 Tamar Christina <tamar.christina@arm.com>
619 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
620 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
621 (mov<mov>): ..this and enable unconditionally.
623 2018-08-16 Tamar Christina <tamar.christina@arm.com>
625 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
627 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
629 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
630 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
631 "Common" with "Target".
633 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
635 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
636 * doc/invoke.texi (mmitigate-rop): Remove.
637 * config/i386/i386.c: Do not include "regrename.h".
638 (ix86_rop_should_change_byte_p, reg_encoded_number)
639 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
641 (ix86_reorg): Remove call to ix86_mitigate_rop.
642 * config/i386/i386.md (attr "modrm_class"): Remove.
643 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
644 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
645 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
647 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
649 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
650 allow folding of mergeh() and mergel() for the float and double types.
651 (fold_mergehl_helper): Rework to handle building a permute tree
654 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
656 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
659 2018-08-15 David Malcolm <dmalcolm@redhat.com>
661 * common.opt (fdiagnostics-show-labels): New option.
662 * diagnostic-show-locus.c (class layout_range): Add field
664 (class layout): Add field "m_show_labels_p".
665 (layout_range::layout_range): Add param "label" and use it to
667 (make_range): Pass in NULL for new "label" param of layout_range's
669 (layout::layout): Initialize m_show_labels_p.
670 (layout::maybe_add_location_range): Pass in loc_range->m_label
671 when constructing layout_range instances.
672 (struct line_label): New struct.
673 (layout::print_any_labels): New member function.
674 (layout::print_line): Call it if label-printing is enabled.
675 (selftest::test_one_liner_labels): New test.
676 (selftest::test_diagnostic_show_locus_one_liner): Call it.
677 * diagnostic.c (diagnostic_initialize): Initialize
678 context->show_labels_p.
679 * diagnostic.h (struct diagnostic_context): Add field
681 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
682 -fno-diagnostics-show-labels.
683 * dwarf2out.c (gen_producer_string): Add
684 OPT_fdiagnostics_show_labels to the ignored options.
685 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
687 (gcc_rich_location::maybe_add_expr): Likewise.
688 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
689 label" param, defaulting to NULL.
690 (gcc_rich_location::add_expr): Add "label" param.
691 (gcc_rich_location::maybe_add_expr): Likewise.
692 (class text_range_label): New class.
693 (class range_label_for_type_mismatch): New class.
694 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
695 of format_warning_va.
696 (fmtwarn_n): Likewise for new params of format_warning_n_va.
697 * lto-wrapper.c (merge_and_complain): Add
698 OPT_fdiagnostics_show_labels to the "pick one setting" options.
699 (append_compiler_options): Likewise to the dropped options.
700 (append_diag_options): Likewise to the passed-on options.
701 * opts.c (common_handle_option): Handle the new option.
702 * selftest-diagnostic.c
703 (test_diagnostic_context::test_diagnostic_context): Enable
705 * substring-locations.c: Include "gcc-rich-location.h".
706 (format_warning_n_va): Add "fmt_label" and "param_label" params
707 and use them as appropriate.
708 (format_warning_va): Add "fmt_label" and "param_label" params,
709 passing them on to format_warning_n_va.
710 (format_warning_at_substring): Likewise.
711 (format_warning_at_substring_n): Likewise.
712 * substring-locations.h (format_warning_va): Add "fmt_label" and
713 "param_label" params.
714 (format_warning_n_va): Likewise.
715 (format_warning_at_substring): Likewise.
716 (format_warning_at_substring_n): Likewise.
717 * toplev.c (general_init): Initialize global_dc->show_labels_p.
719 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
722 * builtins.c (expand_builtin_memcmp): Do not expand the call
723 when overflow is detected.
725 2018-08-15 Martin Sebor <msebor@redhat.com>
727 PR tree-optimization/71625
728 * config/aarch64/aarch64-builtins.c
729 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
731 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
733 * config/s390/s390.c (s390_reorg): Remove loop.
735 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
738 (darwin_function_switched_text_sections): Delete.
739 * gcc/config/darwin.h
740 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
742 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
745 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
746 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
747 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
749 2018-08-15 Martin Liska <mliska@suse.cz>
751 PR tree-optimization/86925
752 * predict.c (expr_expected_value_1): When taking
753 later predictor, assign also probability.
754 Use fold_build2_initializer_loc in order to fold
755 the expression in -frounding-math.
757 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
759 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
761 (expand_vec_perm_1): Try the new method.
763 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
766 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
767 Check whether lra_live_max_point is 0 before dividing.
769 2018-08-14 Martin Sebor <msebor@redhat.com>
771 PR tree-optimization/86650
772 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
773 (vrp_prop::check_mem_ref): Same.
775 2018-08-13 Liu Hao <lh_mouse@126.com>
777 * pretty-print.c (eat_esc_sequence): Swap the foreground and
778 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
779 and clear it thereafter, as it only works for DBCS.
781 2018-08-13 Liu Hao <lh_mouse@126.com>
783 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
784 handle returned by _get_osf_handle().
786 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
788 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
789 for folding vec_perm.
791 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
793 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
794 Add support for gimple-folding of vec_pack() and vec_unpack()
797 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
799 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
800 vec_xst variants to the list.
801 (rs6000_gimple_fold_builtin): Add support for folding unaligned
802 vector loads and stores.
804 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
806 * config.gcc (rs6000-ibm-aix4.x): Delete.
807 (rs6000-ibm-aix5.1): Delete.
808 (rs6000-ibm-aix5.2): Delete.
809 (rs6000-ibm-aix5.3): Delete.
810 * config/rs6000/aix43.h: Delete.
811 * config/rs6000/aix51.h: Delete.
812 * config/rs6000/aix52.h: Delete.
813 * config/rs6000/t-aix43: Delete.
815 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
817 * config/s390/s390.c (s390_decompose_constant_pool_ref):
819 (s390_decompose_address): Factor out constant pool ref
822 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
824 * config/nds32/nds32-predicates.c
825 (nds32_can_use_bclr_p): Change return type as bool.
826 (nds32_can_use_bset_p): Ditto.
827 (nds32_can_use_btgl_p): Ditto.
828 (nds32_can_use_bitci_p): Ditto.
829 * config/nds32/nds32-protos.h
830 (nds32_can_use_bclr_p): Change declaration.
831 (nds32_can_use_bset_p): Ditto.
832 (nds32_can_use_btgl_p): Ditto.
833 (nds32_can_use_bitci_p): Ditto.
835 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
837 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
838 Support -msched-prolog-epilog option.
839 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
841 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
843 * common/config/nds32/nds32-common.c
844 (nds32_option_optimization_table): Enalbe -malways-align.
846 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
848 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
850 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
851 OPT_misr_secure_ case.
852 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
853 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
854 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
856 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
857 (nds32_isr_info): New field security_level.
858 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
859 * config/nds32/nds32.md (return_internal): Consider critical attribute.
860 * config/nds32/nds32.opt (misr-secure): New option.
861 * config/nds32/nds32_init.inc: New file.
862 * config/nds32/nds32_isr.h: New file.
864 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
866 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
867 Update comment for atomic instructions.
868 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
869 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
871 (atomic_loaddi): Revise fence expansion to only emit fence prior to
872 load for __ATOMIC_SEQ_CST model.
873 (atomic_loaddi_1): Remove float register target.
874 (atomic_storedi): Handle CONST_INT values.
875 (atomic_storedi_1): Remove float register source. Add special case
877 (memory_barrier): New expander and insn.
879 2018-08-11 Jakub Jelinek <jakub@redhat.com>
881 PR tree-optimization/86835
882 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
883 new_stmt after def_gsi, make sure to insert new_square_stmt after
884 that stmt, not 2 stmts before it.
886 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
889 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
892 2018-08-10 Martin Liska <mliska@suse.cz>
895 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
897 * builtins.c (expand_builtin_expect_with_probability):
899 (expand_builtin_expect_with_probability): New function.
900 (build_builtin_expect_predicate): Add new argumnet probability
901 for BUILT_IN_EXPECT_WITH_PROBABILITY.
902 (fold_builtin_expect):
905 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
906 * builtins.h (fold_builtin_expect): Set new argument.
907 * doc/extend.texi: Document __builtin_expect_with_probability.
908 * doc/invoke.texi: Likewise.
909 * gimple-fold.c (gimple_fold_call): Pass new argument.
910 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
911 also BUILT_IN_EXPECT_WITH_PROBABILITY.
912 * predict.c (get_predictor_value): New function.
913 (expr_expected_value): Add new argument probability. Assume
914 that predictor and probability are always non-null.
915 (expr_expected_value_1): Likewise. For __builtin_expect and
916 __builtin_expect_with_probability set probability. Handle
917 combination in binary expressions.
918 (tree_predict_by_opcode): Simplify code by simply calling
920 (pass_strip_predict_hints::execute): Add handling of
921 BUILT_IN_EXPECT_WITH_PROBABILITY.
922 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
924 * tree.h (DECL_BUILT_IN_P): New function.
926 2018-08-10 Martin Liska <mliska@suse.cz>
928 PR tree-optimization/85799
929 * passes.def: Add argument for pass_strip_predict_hints.
930 * predict.c (class pass_strip_predict_hints): Add new argument
932 (strip_predictor_early): New function.
933 (pass_strip_predict_hints::execute): Call the function to
935 (strip_predict_hints): New function.
936 * predict.def: Fix comment.
938 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
940 * Makefile.in: Clarify which tm.texi to copy over to assert the
941 right to grant a GFDL license for all.
943 2018-08-09 Jeff Law <law@redhat.com>
945 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
948 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
950 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
953 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
955 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
956 reductions for variable-length vectors.
958 2018-08-09 David Malcolm <dmalcolm@redhat.com>
961 * common.opt (fdiagnostics-show-line-numbers): New option.
962 * diagnostic-show-locus.c (class layout): Add fields
963 "m_show_line_numbers_p" and "m_linenum_width";
964 (num_digits): New function.
965 (test_num_digits): New function.
966 (layout::layout): Initialize new fields. Update m_x_offset
967 logic to handle any left margin.
968 (layout::print_source_line): Print line number when requested.
969 (layout::start_annotation_line): New member function.
970 (layout::print_annotation_line): Call it.
971 (layout::print_leading_fixits): Likewise.
972 (layout::print_trailing_fixits): Likewise. Update calls to
973 move_to_column for new parameter.
974 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
975 it to potentially call start_annotation_line.
976 (layout::show_ruler): Call start_annotation_line.
977 (selftest::test_line_numbers_multiline_range): New selftest.
978 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
979 and selftest::test_line_numbers_multiline_range.
980 * diagnostic.c (diagnostic_initialize): Initialize
982 * diagnostic.h (struct diagnostic_context): Add field
983 "show_line_numbers_p".
984 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
985 -fno-diagnostics-show-line-numbers.
986 * dwarf2out.c (gen_producer_string): Add
987 OPT_fdiagnostics_show_line_numbers to the ignored options.
988 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
989 one setting" options.
990 (append_compiler_options): Likewise to the dropped options.
991 (append_diag_options): Likewise to the passed-on options.
992 * opts.c (common_handle_option): Handle the new option.
993 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
995 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
997 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
998 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
999 third argument of type "const signed char" to descriptions of
1000 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
1001 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
1002 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
1003 __builtin_bcdsub_ov functions.
1005 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1007 PR tree-optimization/86858
1008 * tree-vect-loop.c (vect_is_simple_reduction): Restore
1009 flow_bb_inside_loop_p calls.
1011 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
1013 PR tree-optimization/86871
1014 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
1015 instead of gimple_assign_lhs.
1017 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
1020 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
1021 register constraint to operand 0.
1022 (add<mode>3_carryinC): Likewise.
1023 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
1025 2018-08-09 Martin Liska <mliska@suse.cz>
1028 * common.opt: Remove extra line.
1030 2018-08-09 Martin Liska <mliska@suse.cz>
1032 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
1033 at the end of a line, make first letter capital and end up
1034 a sentence with a dot.
1035 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
1036 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
1037 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
1038 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
1039 (PARAM_MAX_ISL_OPERATIONS): Likewise.
1040 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
1041 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
1042 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
1043 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
1044 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
1045 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
1046 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
1047 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
1048 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
1049 (PARAM_TREE_REASSOC_WIDTH): Likewise.
1050 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
1051 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
1052 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
1054 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
1057 * config/s390/s390.c (s390_option_override_internal): Reduce the
1058 stack-clash-protection-probe-interval param if it would be too big
1061 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
1064 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
1065 * config/m68k/m68k.c (handle_move_double): Don't call
1066 m68k_final_prescan_insn.
1067 (m68k_adjust_decorated_operand): Renamed from
1068 m68k_final_prescan_insn, remove first and third operand and
1070 (print_operand): Call it.
1071 (print_operand_address): Call it.
1073 2018-08-08 Nathan Sidwell <nathan@acm.org>
1075 * diagnostic.c (diagnostic_report_current_module): Use
1076 linemap_included_from & linemap_included_from_linemap.
1078 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
1080 * config/aarch64/aarch64-cores.def: Add phecda core.
1081 * config/aarch64/aarch64-tune.md: Regenerate.
1082 * doc/invoke.texi: Add phecda core.
1084 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1087 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1089 * config/s390/s390.md ("movti"): Add more alternatives for
1090 constant to GPR copies.
1092 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
1094 * config/s390/s390.c: Fix whitespace damage throughout the file.
1095 * config/s390/s390.h: Likewise.
1096 * config/s390/tpf.h: Likewise.
1098 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1100 * config/s390/s390.c (s390_loadrelative_operand_p):
1101 Remove TARGET_CPU_ZARCH usages.
1102 (s390_rtx_costs): Likewise.
1103 (s390_legitimate_constant_p): Likewise.
1104 (s390_cannot_force_const_mem): Likewise.
1105 (legitimate_reload_constant_p): Likewise.
1106 (s390_preferred_reload_class): Likewise.
1107 (legitimize_pic_address): Likewise.
1108 (legitimize_tls_address): Likewise.
1109 (s390_split_branches): Removed.
1110 (s390_add_execute): Removed.
1111 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1112 (s390_mainpool_start): Likewise.
1113 (s390_mainpool_finish): Likewise.
1114 (s390_mainpool_cancel): Removed.
1115 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1116 (s390_chunkify_cancel): Likewise.
1117 (s390_return_addr_rtx): Likewise.
1118 (s390_register_info): Remove split_branches_pending_p uages.
1119 (s390_optimize_register_info): Likewise.
1120 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1121 split_branches_pending_p usages.
1122 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1123 (s390_load_got): Likewise.
1124 (s390_expand_split_stack_prologue): Likewise.
1125 (output_asm_nops): Likewise.
1126 (s390_function_profiler): Likewise.
1127 (s390_emit_call): Likewise.
1128 (s390_conditional_register_usage): Likewise.
1129 (s390_optimize_prologue): Likewise.
1130 (s390_reorg): Remove TARGET_CPU_ZARCH and
1131 split_branches_pending_p usages.
1132 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1134 (s390_output_indirect_thunk_function): Likewise.
1135 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1136 (TARGET_CPU_ZARCH_P): Removed.
1137 (struct machine_function): Remove split_branches_pending_p.
1138 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1140 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
1142 * common/config/s390/s390-common.c (processor_flags_table):
1144 * config.gcc: Remove with_arch/with_tune support.
1145 * config/s390/2064.md: Remove cpu attribute comparisons.
1146 * config/s390/driver-native.c (s390_host_detect_local_cpu):
1148 * config/s390/linux.h (ASM_SPEC):
1149 Remove -march support.
1150 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1151 Use a table to get an arch level.
1152 * config/s390/s390-opts.h (enum processor_type):
1154 * config/s390/s390.c
1155 (processor_table): Remove entries, add arch_level values.
1156 (s390_issue_rate): Remove cases.
1157 (s390_option_override): Adjust
1158 s390_option_override_internal() call.
1159 (s390_option_override_internal): Remove deprecation warning.
1160 (s390_valid_target_attribute_tree): Adjust
1161 s390_option_override_internal() call.
1162 * config/s390/s390.h (struct s390_processor):
1163 Share with s390-c.c, add arch_level field.
1164 * config/s390/s390.md:
1165 Remove occurrences in cpu attribute.
1166 * config/s390/s390.opt: Remove -march/-mtune support.
1167 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1168 * doc/invoke.texi: Remove deprecation warning.
1170 2018-08-08 Luis Machado <luis.machado@linaro.org>
1172 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1174 (qdf24xx_tunings): Set vector cost structure to
1175 qdf24xx_vector_cost.
1177 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1178 <register_sextend>: Set to 3.
1180 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
1183 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1184 * config/aarch64/aarch64-simd.md
1185 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1186 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1187 (aarch64_frecpx<mode>): ...this new pattern.
1188 * config/aarch64/aarch64-simd-builtins.def: Remove comment
1189 about aarch64_frecp<FRECP:frecp_suffix><mode>.
1191 2018-08-07 Martin Liska <mliska@suse.cz>
1194 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1195 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1196 * predict.def (PRED_MALLOC_NONNULL): New predictor.
1197 * doc/extend.texi: Document that malloc attribute adds
1200 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
1203 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1204 Define to speculation_safe_value_not_needed.
1206 2018-08-06 Jeff Law <law@redhat.com>
1208 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1209 the vr_values instance to cprop_into_stmt.
1210 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1211 (cprop_operand): Also query EVRP to determine if OP is a constant.
1213 2018-08-06 Nathan Sidwell <nathan@acm.org>
1215 * diagnostic.c (diagnostic_report_current_module): Reroll
1216 included-at loop. Translate text.
1218 2018-08-06 David Malcolm <dmalcolm@redhat.com>
1220 * function-tests.c (selftest::test_expansion_to_rtl): Call
1221 free_after_compilation.
1223 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1225 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1227 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
1229 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1230 loops with memory block operations from getting unrolled.
1232 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
1235 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1236 Define to speculation_safe_value_not_needed.
1238 2018-08-06 Jeff Law <law@redhat.com>
1240 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1243 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1246 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1247 with all enabled __intN types.
1249 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1251 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1253 * alias.c (record_set): Check for clobber high.
1254 * cfgexpand.c (expand_gimple_stmt): Likewise.
1255 * combine-stack-adj.c (single_set_for_csa): Likewise.
1256 * combine.c (find_single_use_1): Likewise.
1257 (set_nonzero_bits_and_sign_copies): Likewise.
1258 (get_combine_src_dest): Likewise.
1259 (is_parallel_of_n_reg_sets): Likewise.
1260 (try_combine): Likewise.
1261 (record_dead_and_set_regs_1): Likewise.
1262 (reg_dead_at_p_1): Likewise.
1263 (reg_dead_at_p): Likewise.
1264 * dce.c (deletable_insn_p): Likewise.
1265 (mark_nonreg_stores_1): Likewise.
1266 (mark_nonreg_stores_2): Likewise.
1267 * df-scan.c (df_find_hard_reg_defs): Likewise.
1268 (df_uses_record): Likewise.
1269 (df_get_call_refs): Likewise.
1270 * dwarf2out.c (mem_loc_descriptor): Likewise.
1271 * haifa-sched.c (haifa_classify_rtx): Likewise.
1272 * ira-build.c (create_insn_allocnos): Likewise.
1273 * ira-costs.c (scan_one_insn): Likewise.
1274 * ira.c (equiv_init_movable_p): Likewise.
1275 (rtx_moveable_p): Likewise.
1276 (interesting_dest_for_shprep): Likewise.
1277 * jump.c (mark_jump_label_1): Likewise.
1278 * postreload-gcse.c (record_opr_changes): Likewise.
1279 * postreload.c (reload_cse_simplify): Likewise.
1280 (struct reg_use): Add source expr.
1281 (reload_combine): Check for clobber high.
1282 (reload_combine_note_use): Likewise.
1283 (reload_cse_move2add): Likewise.
1284 (move2add_note_store): Likewise.
1285 * print-rtl.c (print_pattern): Likewise.
1286 * recog.c (decode_asm_operands): Likewise.
1287 (store_data_bypass_p): Likewise.
1288 (if_test_bypass_p): Likewise.
1289 * regcprop.c (kill_clobbered_value): Likewise.
1290 (kill_set_value): Likewise.
1291 * reginfo.c (reg_scan_mark_refs): Likewise.
1292 * reload1.c (maybe_fix_stack_asms): Likewise.
1293 (eliminate_regs_1): Likewise.
1294 (elimination_effects): Likewise.
1295 (mark_not_eliminable): Likewise.
1296 (scan_paradoxical_subregs): Likewise.
1297 (forget_old_reloads_1): Likewise.
1298 * reorg.c (find_end_label): Likewise.
1299 (try_merge_delay_insns): Likewise.
1300 (redundant_insn): Likewise.
1301 (own_thread_p): Likewise.
1302 (fill_simple_delay_slots): Likewise.
1303 (fill_slots_from_thread): Likewise.
1304 (dbr_schedule): Likewise.
1305 * resource.c (update_live_status): Likewise.
1306 (mark_referenced_resources): Likewise.
1307 (mark_set_resources): Likewise.
1308 * rtl.c (copy_rtx): Likewise.
1309 * rtlanal.c (reg_referenced_p): Likewise.
1310 (single_set_2): Likewise.
1311 (noop_move_p): Likewise.
1312 (note_stores): Likewise.
1313 * sched-deps.c (sched_analyze_reg): Likewise.
1314 (sched_analyze_insn): Likewise.
1316 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1318 * cse.c (invalidate_reg): New function extracted from...
1319 (invalidate): ...here.
1320 (canonicalize_insn): Check for clobber high.
1321 (invalidate_from_clobbers): invalidate clobber highs.
1322 (invalidate_from_sets_and_clobbers): Likewise.
1323 (count_reg_usage): Check for clobber high.
1324 (insn_live_p): Likewise.
1325 * cselib.c (cselib_expand_value_rtx_1):Likewise.
1326 (cselib_invalidate_regno): Check for clobber in setter.
1327 (cselib_invalidate_rtx): Pass through setter.
1328 (cselib_invalidate_rtx_note_stores):
1329 (cselib_process_insn): Check for clobber high.
1330 * cselib.h (cselib_invalidate_rtx): Add operand.
1332 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1334 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1335 (mark_not_eliminable): Likewise.
1336 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1337 * lra-lives.c (process_bb_lives): Check for clobber high.
1338 * lra.c (new_insn_reg): Remember clobber highs.
1339 (collect_non_operand_hard_regs): Check for clobber high.
1340 (lra_set_insn_recog_data): Likewise.
1341 (add_regs_to_insn_regno_info): Likewise.
1342 (lra_update_insn_regno_info): Likewise.
1344 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1346 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1347 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1349 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1351 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1352 (copy_insn_1): Likewise.
1353 (gen_hard_reg_clobber_high): New gen function.
1354 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1355 * genemit.c (gen_exp): Likewise.
1356 (gen_emit_seq): Pass through info.
1357 (gen_insn): Check for CLOBBER_HIGH.
1358 (gen_expand): Pass through info.
1359 (gen_split): Likewise.
1360 (output_add_clobbers): Likewise.
1361 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1362 (remove_clobbers): Likewise.
1363 * rtl.h (gen_hard_reg_clobber_high): New declaration.
1365 2018-08-06 Alan Hayward <alan.hayward@arm.com>
1367 * doc/rtl.texi (clobber_high): Add.
1368 (parallel): Add in clobber high
1369 * rtl.c (rtl_check_failed_code3): Add function.
1370 * rtl.def (CLOBBER_HIGH): Add expression.
1371 * rtl.h (RTL_CHECKC3): Add macro.
1372 (rtl_check_failed_code3): Add declaration.
1373 (XC3EXP): Add macro.
1375 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
1378 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1379 cfun->machine->max_used_stack_alignment if needed.
1381 2018-08-04 Martin Sebor <msebor@redhat.com>
1383 PR tree-optimization/86571
1384 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1387 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
1390 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1393 2018-08-03 Jeff Law <law@redhat.com>
1396 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1397 Define to speculation_safe_value_not_needed.
1399 2018-08-03 David Malcolm <dmalcolm@redhat.com>
1401 * doc/gcov.texi (-x): Remove duplicate "to".
1402 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1403 (-Wif-not-aligned): Remove duplicate "is".
1404 (-flto): Remove duplicate "the".
1405 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1406 duplicate "v5.00.b".
1407 (MSP430 Options): Remove duplicate "and" from the description
1408 of "-mgprel-sec=regexp".
1409 (x86 Options): Remove duplicate copies of "vmldLog102" and
1410 vmlsLog104 from description of "-mveclibabi=type".
1412 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
1414 * internal-fn.h (first_commutative_argument): Declare.
1415 * internal-fn.c (first_commutative_argument): New function.
1416 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1417 restrictions for pattern statements. Use first_commutative_argument
1418 to look for commutative operands in calls to internal functions.
1420 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
1422 * Makefile.in (wide-int-range.o): New.
1423 * tree-vrp.c: Move all the wide_int_* functions to...
1424 * wide-int-range.cc: ...here.
1425 * tree-vrp.h: Move all the wide_int_* prototypes to...
1426 * wide-int-range.h: ...here.
1428 2018-08-03 Tom de Vries <tdevries@suse.de>
1430 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1432 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1433 * except.c (output_function_exception_table): Do early exit if
1434 targetm_common.except_unwind_info (&global_options) == UI_NONE.
1436 2018-08-03 Martin Liska <mliska@suse.cz>
1438 * predict.c (dump_prediction): Change to 2 digits
1441 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
1443 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1445 (falkor_am_1_gtov_gtov): ... a new insn reservation.
1447 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
1449 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1450 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1451 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1452 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1453 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1455 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1457 * diagnostic-show-locus.c (diagnostic_show_locus): Use
1458 pp_take_prefix when saving the existing prefix.
1459 * diagnostic.c (diagnostic_append_note): Likewise.
1460 * langhooks.c (lhd_print_error_function): Likewise.
1461 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1462 param's type. Free the existing prefix.
1463 (pp_take_prefix): New function.
1464 (pretty_printer::pretty_printer): Drop the prefix parameter.
1465 Rename the length parameter to match the comment.
1466 (pretty_printer::~pretty_printer): Free the prefix.
1467 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1469 (struct pretty_printer): Drop the "const" from "prefix" field's
1470 type and clarify memory management.
1471 (pp_set_prefix): Drop the "const" from the 2nd param.
1472 (pp_take_prefix): New decl.
1474 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1476 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1477 for word_mode_ok here instead of passing as argument.
1478 (expand_block_compare): Change select_block_compare_mode() call.
1479 (expand_strncmp_gpr_sequence): New function.
1480 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1482 2018-08-02 Jeff Law <law@redhat.com>
1485 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1486 Define to speculation_safe_value_not_needed.
1489 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1490 Define to speculation_safe_value_not_needed.
1492 2018-08-02 Tom de Vries <tdevries@suse.de>
1495 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1496 function. Return UI_TARGET unconditionally.
1497 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1498 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1500 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1502 * genemit.c (print_overload_test): Fix typo.
1504 2018-08-02 Richard Biener <rguenther@suse.de>
1506 PR tree-optimization/86816
1507 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1508 which checks for value availability before querying it.
1509 (gvn_uses_equal): Use it.
1510 (same_succ_hash): Likewise.
1511 (gimple_equal_p): Likewise.
1513 2018-08-02 Nick Clifton <nickc@redhat.com>
1516 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1517 Define to speculation_safe_value_not_needed.
1520 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1521 Define to speculation_safe_value_not_needed.
1524 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1525 Define to speculation_safe_value_not_needed.
1528 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1529 Define to speculation_safe_value_not_needed.
1532 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1533 Define to speculation_safe_value_not_needed.
1536 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1537 Define to speculation_safe_value_not_needed.
1540 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1541 Define to speculation_safe_value_not_needed.
1544 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1545 Define to speculation_safe_value_not_needed.
1548 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1549 speculation_safe_value_not_needed.
1552 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1553 to speculation_safe_value_not_needed.
1555 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1557 * doc/md.texi: Expand the documentation of instruction names
1558 to mention port-local uses. Document '@' in pattern names.
1559 * read-md.h (overloaded_instance, overloaded_name): New structs.
1561 (md_reader::handle_overloaded_name): New member function.
1562 (md_reader::get_overloads): Likewise.
1563 (md_reader::m_first_overload): New member variable.
1564 (md_reader::m_next_overload_ptr): Likewise.
1565 (md_reader::m_overloads_htab): Likewise.
1566 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1567 m_next_overload_ptr and m_overloads_htab.
1568 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1569 (get_mode_token, get_code_token, get_int_token): New functions.
1570 (map_attr_string): Add an optional argument that passes back
1571 the associated iterator.
1572 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1573 (md_reader::handle_overloaded_name, add_overload_instance): New
1575 (apply_iterators): Handle '@' names. Report an error if '@'
1576 is used without iterators.
1577 (initialize_iterators): Initialize the new iterator_group fields.
1578 * genopinit.c (handle_overloaded_code_for)
1579 (handle_overloaded_gen): New functions.
1580 (main): Use them to print declarations of maybe_code_for_* and
1581 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1582 * genemit.c (print_overload_arguments, print_overload_test)
1583 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1584 (main): Use it to print definitions of maybe_code_for_* and
1585 maybe_gen_* functions.
1586 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1587 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1588 instead of explicit mode checks.
1589 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1590 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1591 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1592 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1593 (aarch64_expand_compare_and_swap): Likewise
1594 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1595 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1596 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1597 (aarch64_constant_pool_reload_icode): Delete.
1598 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1599 instead of aarch64_constant_pool_reload_icode. Use
1600 code_for_aarch64_reload_mov instead of explicit mode checks.
1601 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1602 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1603 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1604 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1605 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1606 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1607 (aarch64_atomic_load_op_code): Delete.
1608 (aarch64_emit_atomic_load_op): Likewise.
1609 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1610 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
1611 instead of aarch64_emit_atomic_load_op.
1612 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1613 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1614 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1615 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1616 character before the pattern name.
1617 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1618 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1619 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1620 (aarch64_frecps<mode>): Likewise.
1621 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1622 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1623 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1624 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1625 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1627 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
1629 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1630 Allow HFmode constants if TARGET_FP_F16INST.
1632 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
1635 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1636 No longer check last store for clobber of address register.
1638 2018-08-02 Martin Liska <mliska@suse.cz>
1640 PR gcov-profile/86817
1641 * gcov.c (process_all_functions): New function.
1643 (process_file): Move functions processing to
1644 process_all_functions.
1646 2018-08-02 David Malcolm <dmalcolm@redhat.com>
1648 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1649 "const" to the "gimple *" and "rtx_insn *" parameters.
1650 * dumpfile.h (dump_user_location_t::dump_user_location_t):
1652 (dump_location_t::dump_location_t): Likewise.
1654 2018-08-01 Martin Sebor <msebor@redhat.com>
1656 PR tree-optimization/86650
1657 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1658 rather than a "gcall *". Directly pass the data of interest
1659 to percent_K_format, rather than building a temporary CALL_EXPR
1661 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1662 (gimple_fold_builtin_strncat): Adjust.
1663 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1664 gcall* argument with gimple*.
1665 * gimple-ssa-warn-restrict.c (check_call): Same.
1666 (wrestrict_dom_walker::before_dom_children): Same.
1667 (builtin_access::builtin_access): Same.
1668 (check_bounds_or_overlap): Same
1669 (maybe_diag_overlap): Same.
1670 (maybe_diag_offset_bounds): Same.
1671 * tree-diagnostic.c (default_tree_printer): Move usage of
1672 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1674 * tree-pretty-print.c (percent_K_format): Add argument.
1675 * tree-pretty-print.h: Add argument.
1676 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1677 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1678 (maybe_diag_stxncpy_trunc): Same.
1679 (handle_builtin_stxncpy): Same.
1680 (handle_builtin_strcat): Same.
1682 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1684 * match.pd: Optimise pointer range checks.
1686 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1688 PR tree-optimization/86758
1689 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1690 to remove pattern statements.
1692 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1694 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1695 result of dfs_enumerate_from when constructing stmt_vec_infos,
1696 instead of additionally calling get_loop_body.
1698 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1700 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1702 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1703 When creating an iv, assert that the step is not known to be zero.
1704 (vect_setup_realignment): Update call accordingly.
1705 * tree-vect-stmts.c (vectorizable_store): Likewise.
1706 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
1708 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1710 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1711 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1712 (vectorizable_reduction): Likewise.
1713 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1714 (vect_detect_hybrid_slp_stmts): Likewise.
1715 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1717 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
1719 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1720 (wide_int_set_zero_nonzero_bits): ...this.
1721 (zero_nonzero_bits_from_vr): Rename to...
1722 (vrp_set_zero_nonzero_bits): ...this.
1723 (extract_range_from_multiplicative_op_1): Abstract wide int
1725 (wide_int_range_multiplicative_op): ...here.
1726 (extract_range_from_binary_expr_1): Extract wide int binary
1727 operations into their own functions.
1728 (wide_int_range_lshift): New.
1729 (wide_int_range_can_optimize_bit_op): New.
1730 (wide_int_range_shift_undefined_p): New.
1731 (wide_int_range_bit_xor): New.
1732 (wide_int_range_bit_ior): New.
1733 (wide_int_range_bit_and): New.
1734 (wide_int_range_trunc_mod): New.
1735 (extract_range_into_wide_ints): New.
1736 (vrp_shift_undefined_p): New.
1737 (extract_range_from_multiplicative_op): New.
1738 (vrp_can_optimize_bit_op): New.
1739 * tree-vrp.h (value_range::dump): New.
1740 (wide_int_range_multiplicative_op): New.
1741 (wide_int_range_lshift):New.
1742 (wide_int_range_shift_undefined_p): New.
1743 (wide_int_range_bit_xor): New.
1744 (wide_int_range_bit_ior): New.
1745 (wide_int_range_bit_and): New.
1746 (wide_int_range_trunc_mod): New.
1747 (zero_nonzero_bits_from_bounds): Rename to...
1748 (wide_int_set_zero_nonzero_bits): ...this.
1749 (zero_nonzero_bits_from_vr): Rename to...
1750 (vrp_set_zero_nonzero_bits): ...this.
1751 (range_easy_mask_min_max): Rename to...
1752 (wide_int_range_can_optimize_bit_op): this.
1753 * vr-values.c (simplify_bit_ops_using_ranges): Rename
1754 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1756 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1758 * tree-vectorizer.h (vect_orig_stmt): New function.
1759 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1760 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1761 (vect_create_epilog_for_reduction): Likewise.
1762 (vectorizable_live_operation): Likewise.
1763 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1764 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1765 * tree-vect-stmts.c (vectorizable_call): Likewise.
1766 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1768 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1770 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1772 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1773 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1774 (vect_transform_loop): Likewise.
1775 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1777 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1779 * tree-vectorizer.h (vect_schedule_slp): Return void.
1780 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1781 (vect_schedule_slp): Likewise.
1783 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1785 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1787 (vect_transform_loop): Update calls accordingly. Schedule SLP
1788 instances before the main loop, if any exist.
1790 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
1792 PR tree-optimization/86749
1793 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1794 If the lhs is used in a COND_EXPR, check that it is being used
1795 as the "then" or "else" value.
1797 2018-08-01 Tom de Vries <tdevries@suse.de>
1800 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1801 speculation_safe_value_not_needed.
1803 2018-08-01 Richard Biener <rguenther@suse.de>
1805 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1808 2018-08-01 Martin Liska <mliska@suse.cz>
1810 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1811 format how successful transformation is dumped.
1812 (gimple_mod_pow2_value_transform): Likewise.
1813 (gimple_mod_subtract_transform): Likewise.
1814 (gimple_stringops_transform): Likewise.
1816 2018-08-01 Martin Liska <mliska@suse.cz>
1819 * value-prof.c (interesting_stringop_to_profile_p):
1820 Simplify the code and add BUILT_IN_MEMMOVE.
1821 (gimple_stringops_transform): Likewise.
1823 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
1825 * config/aarch64/aarch64-simd.md
1826 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1827 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1828 use GPI iterator instead of SI mode.
1830 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1832 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1833 rs6000_speculation_barrier.
1834 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1835 new barrier pattern name.
1837 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
1839 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1840 (speculation_barrier): New insn.
1842 2018-08-01 Richard Biener <rguenther@suse.de>
1845 * graphite.h: Include isl/id.h and isl/space.h to allow build
1848 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
1851 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1852 mode for COFF targets.
1853 * defaults.h (TARGET_COFF): Define.
1854 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1855 TARGET_COFF): Define.
1856 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1857 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1858 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1860 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1862 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1863 * gimple-streamer-out.c (output_bb): Save it.
1864 * lto-streamer-in.c (input_struct_function_base): Restore
1865 instance discriminator if available. Create map on demand.
1866 * lto-streamer-out.c (output_struct_function_base): Save it if
1868 * final.c (decl_to_instance_map): Document LTO strategy.
1870 2018-07-31 Alexandre Oliva <oliva@adacore.com>
1871 Olivier Hainque <hainque@adacore.com>
1873 * debug.h (decl_to_instance_map_t): New type.
1874 (decl_to_instance_map): Declare.
1875 (maybe_create_decl_to_instance_map): New inline function.
1876 * final.c (bb_discriminator, last_bb_discriminator): New statics,
1877 to track basic block discriminators.
1878 (final_start_function_1): Initialize them.
1879 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1881 (decl_to_instance_map): New variable.
1882 (map_decl_to_instance, maybe_set_discriminator): New functions.
1883 (notice_source_line): Set discriminator.
1885 2018-07-31 Ian Lance Taylor <iant@golang.org>
1887 * targhooks.c (default_have_speculation_safe_value): Add
1890 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1892 * dump-context.h: Include "pretty-print.h".
1893 (dump_context::refresh_dumps_are_enabled): New decl.
1894 (dump_context::emit_item): New decl.
1895 (class dump_context): Add fields "m_test_pp" and
1897 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1898 (temp_dump_context::get_dumped_text): New decl.
1899 (class temp_dump_context): Add field "m_pp".
1900 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1901 (dump_context::refresh_dumps_are_enabled): ...and add a test for
1903 (set_dump_file): Update for above change.
1904 (set_alt_dump_file): Likewise.
1905 (dump_loc): New overload, taking a pretty_printer *.
1906 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
1907 to any test pretty-printer.
1908 (make_item_for_dump_gimple_stmt): New function, adapted from
1909 optinfo::add_gimple_stmt.
1910 (dump_context::dump_gimple_stmt): Call it, and use the result,
1911 eliminating the direct usage of dump_file and alt_dump_file in
1912 favor of indirectly using them via emit_item.
1913 (make_item_for_dump_gimple_expr): New function, adapted from
1914 optinfo::add_gimple_expr.
1915 (dump_context::dump_gimple_expr): Call it, and use the result,
1916 eliminating the direct usage of dump_file and alt_dump_file in
1917 favor of indirectly using them via emit_item.
1918 (make_item_for_dump_generic_expr): New function, adapted from
1920 (dump_context::dump_generic_expr): Call it, and use the result,
1921 eliminating the direct usage of dump_file and alt_dump_file in
1922 favor of indirectly using them via emit_item.
1923 (make_item_for_dump_printf_va): New function, adapted from
1924 optinfo::add_printf_va.
1925 (make_item_for_dump_printf): New function.
1926 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1927 and use the result, eliminating the direct usage of dump_file and
1928 alt_dump_file in favor of indirectly using them via emit_item.
1929 (make_item_for_dump_dec): New function.
1930 (dump_context::dump_dec): 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_symtab_node): New function, adapted from
1934 optinfo::add_symtab_node.
1935 (dump_context::dump_symtab_node): 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 (dump_context::begin_scope): Reimplement, avoiding direct usage
1939 of dump_file and alt_dump_file in favor of indirectly using them
1941 (dump_context::emit_item): New member function.
1942 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1943 Set up test pretty-printer on the underlying context. Call
1944 refresh_dumps_are_enabled.
1945 (temp_dump_context::~temp_dump_context): Call
1946 refresh_dumps_are_enabled.
1947 (temp_dump_context::get_dumped_text): New member function.
1948 (selftest::verify_dumped_text): New function.
1949 (ASSERT_DUMPED_TEXT_EQ): New macro.
1950 (selftest::test_capture_of_dump_calls): Run all tests twice, with
1951 and then without optinfo enabled. Add uses of
1952 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
1953 * dumpfile.h: Update comment for the dump_* API.
1954 * optinfo-emit-json.cc
1955 (selftest::test_building_json_from_dump_calls): Update for new
1956 param for temp_dump_context ctor.
1957 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1958 and "m_owned" field.
1959 (optinfo_item::~optinfo_item): Likewise.
1960 (optinfo::add_item): New member function.
1961 (optinfo::emit): Update comment.
1962 (optinfo::add_string): Delete.
1963 (optinfo::add_printf): Delete.
1964 (optinfo::add_printf_va): Delete.
1965 (optinfo::add_gimple_stmt): Delete.
1966 (optinfo::add_gimple_expr): Delete.
1967 (optinfo::add_tree): Delete.
1968 (optinfo::add_symtab_node): Delete.
1969 (optinfo::add_dec): Delete.
1970 * optinfo.h (class dump_context): New forward decl.
1971 (optinfo::add_item): New decl.
1972 (optinfo::add_string): Delete.
1973 (optinfo::add_printf): Delete.
1974 (optinfo::add_printf_va): Delete.
1975 (optinfo::add_gimple_stmt): Delete.
1976 (optinfo::add_gimple_expr): Delete.
1977 (optinfo::add_tree): Delete.
1978 (optinfo::add_symtab_node): Delete.
1979 (optinfo::add_dec): Delete.
1980 (optinfo::add_poly_int): Delete.
1981 (optinfo_item::optinfo_item): Remove "owned" param.
1982 (class optinfo_item): Remove field "m_owned".
1984 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1987 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1988 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1989 requested variable alignment.
1990 (expand_one_ssa_partition): Likewise.
1991 (expand_one_var): Likewise.
1993 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1995 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1996 to speculation_safe_value_not_needed.
1998 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2000 * targhooks.h (speculation_safe_value_not_needed): New prototype.
2001 * targhooks.c (speculation_safe_value_not_needed): New function.
2002 * target.def (have_speculation_safe_value): Update documentation.
2003 * doc/tm.texi: Regenerated.
2005 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2007 * config/aarch64/iterators.md (ALLI_TI): New iterator.
2008 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
2010 (despeculate_copy<ALLI:mode>_insn): New insn.
2011 (despeculate_copyti_insn): New insn.
2012 (despeculate_simple<ALLI:mode>): New insn
2013 (despeculate_simpleti): New insn.
2014 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
2016 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
2017 aarch64_speculation_safe_value.
2018 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2020 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2022 * config/aarch64/aarch64-speculation.cc: New file.
2023 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
2024 before pass_reorder_blocks.
2025 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
2027 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
2028 X14 and X15 when tracking speculation.
2029 * config/aarch64/aarch64.md (register name constants): Add
2030 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
2031 (unspec): Add UNSPEC_SPECULATION_TRACKER.
2032 (speculation_barrier): New insn attribute.
2033 (cmp<mode>): Allow SP in comparisons.
2034 (speculation_tracker): New insn.
2035 (speculation_barrier): Add speculation_barrier attribute.
2036 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
2037 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
2038 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2040 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2042 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
2043 aarch64_track_speculation is true.
2044 (tb<optab><mode>1): Likewise.
2045 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
2046 generate CB[N]Z when tracking speculation.
2047 (aarch64_split_compare_and_swap): Likewise.
2048 (aarch64_split_atomic_op): Likewise.
2050 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2052 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2054 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2056 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
2057 (speculation_barrier): New insn.
2059 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2061 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
2062 * config/arm/arm.md (speculation_barrier): New expand.
2063 (speculation_barrier_insn): New pattern.
2065 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
2067 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
2068 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
2069 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
2070 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
2072 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
2073 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
2074 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
2075 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
2076 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
2077 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
2078 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
2079 * builtins.c (expand_speculation_safe_value): New function.
2080 (expand_builtin): Call it.
2081 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2082 * doc/extend.texi: Document __builtin_speculation_safe_value.
2083 * doc/md.texi: Document "speculation_barrier" pattern.
2084 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2085 TARGET_HAVE_SPECULATION_SAFE_VALUE.
2086 * doc/tm.texi: Regenerated.
2087 * target.def (have_speculation_safe_value, speculation_safe_value): New
2089 * targhooks.c (default_have_speculation_safe_value): New function.
2090 (default_speculation_safe_value): New function.
2091 * targhooks.h (default_have_speculation_safe_value): Add prototype.
2092 (default_speculation_safe_value): Add prototype.
2094 2018-07-31 David Malcolm <dmalcolm@redhat.com>
2096 * dump-context.h (dump_context::dump_loc): New decl.
2097 * dumpfile.c (dump_context::dump_loc): New member function.
2098 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2099 and dump_gimple_stmt.
2100 (dump_context::dump_gimple_expr_loc): Likewise, using
2102 (dump_context::dump_generic_expr_loc): Likewise, using
2104 (dump_context::dump_printf_loc_va): Likewise, using
2106 (dump_context::begin_scope): Explicitly using the global function
2107 "dump_loc", rather than the member function.
2109 2018-07-31 Martin Sebor <msebor@redhat.com>
2111 PR tree-optimization/86741
2112 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2114 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
2116 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2117 depend on whether prefetch instructions will be emitted or not.
2118 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2119 will be emitted or not.
2120 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2121 (TARGET_SETMEM_PFD): New macros.
2123 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2125 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2126 (NULL_STMT_VEC_INFO): Delete.
2127 (stmt_vec_info::operator*): Likewise.
2128 (stmt_vec_info::operator gimple *): Likewise.
2129 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2130 of NULL_STMT_VEC_INFO.
2131 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2132 (vect_reassociating_reduction_p): Likewise.
2133 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2134 (vectorizable_store): Likewise.
2135 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2136 (vec_info::free_stmt_vec_infos): Likewise.
2138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2140 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2141 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2145 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2146 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2147 (vec_info::free_stmt_vec_info): New private member functions.
2148 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2149 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2150 * tree-parloops.c (gather_scalar_reductions): Remove calls to
2151 set_stmt_vec_info_vec and free_stmt_vec_infos.
2152 * tree-vect-loop.c (_loop_vec_info): Remove call to
2153 set_stmt_vec_info_vec.
2154 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2155 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2156 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2157 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2158 (vec_info::free_stmt_vec_info): ...these new functions. Remove
2159 assignments in {vec_info::,}new_stmt_vec_info that are redundant
2160 with the clearing in the xcalloc.
2161 (stmt_vec_info_vec): Delete.
2162 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2163 (vectorize_loops): Likewise.
2164 (vec_info::~vec_info): Remove argument from call to
2165 free_stmt_vec_infos.
2166 (vec_info::add_stmt): Remove vinfo argument from call to
2169 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2171 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2172 rather than a gimple stmt.
2173 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
2174 information for pattern statements when passed the original
2175 statement; instead wait to be passed the pattern statement itself.
2176 Don't call set_vinfo_for_stmt here.
2177 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2178 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2179 stmt_vec_infos here.
2180 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2181 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2182 stmt_vec_infos entry.
2184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2186 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2187 * tree-vectorizer.c (vec_info::replace_stmt): New function.
2188 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2189 * tree-vect-stmts.c (vectorizable_call): Likewise.
2190 (vectorizable_simd_clone_call): Likewise.
2192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2194 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2195 * tree-vectorizer.c (vec_info::remove_stmt): New function.
2196 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2197 * tree-vect-loop.c (vect_transform_loop): Likewise.
2198 * tree-vect-slp.c (vect_schedule_slp): Likewise.
2199 * tree-vect-stmts.c (vect_remove_stores): Likewise.
2201 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2203 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2204 (vect_dr_stmt): Delete.
2205 * tree-vectorizer.c (vec_info::lookup_dr): New function.
2206 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2208 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2209 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2210 (vect_verify_datarefs_alignment, vect_peeling_supportable)
2211 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2212 (vect_analyze_data_refs): Likewise.
2213 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
2215 (vect_find_same_alignment_drs): Likewise.
2216 (vect_slp_analyze_node_dependences): Update calls accordingly.
2217 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2218 instead of DR_VECT_AUX.
2219 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2220 of a vector data references. Use vec_info::lookup_dr instead of
2222 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2223 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
2224 instead of DR_VECT_AUX.
2226 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2228 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2230 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2232 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2233 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2234 (vect_gen_prolog_loop_niters): Likewise.
2236 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2238 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2239 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2240 (vect_known_alignment_in_bytes, vect_dr_behavior)
2241 (vect_get_scalar_dr_size): Take references as dr_vec_infos
2242 instead of data_references. Update calls to other routines for
2243 which the same change has been made.
2244 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2245 dr_vec_infos instead of stmt_vec_infos.
2246 (vect_analyze_data_ref_dependence): Update call accordingly.
2247 (vect_slp_analyze_data_ref_dependence)
2248 (vect_record_base_alignments): Use DR_VECT_AUX.
2249 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2250 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2251 (vector_alignment_reachable_p, vect_get_data_access_cost)
2252 (vect_peeling_supportable, vect_analyze_group_access_1)
2253 (vect_analyze_group_access, vect_analyze_data_ref_access)
2254 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2255 (vect_compile_time_alias, vect_small_gap_p)
2256 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2257 (vect_supportable_dr_alignment): Take references as dr_vec_infos
2258 instead of data_references. Update calls to other routines for
2259 which the same change has been made.
2260 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2261 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2262 (vect_slp_analyze_and_verify_node_alignment)
2263 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2264 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2265 (vect_setup_realignment): Use dr_vec_infos. Update calls after
2267 (_vect_peel_info::dr): Replace with...
2268 (_vect_peel_info::dr_info): ...this new field.
2269 (vect_peeling_hash_get_most_frequent)
2270 (vect_peeling_hash_choose_best_peeling): Update accordingly.
2271 (vect_peeling_hash_get_lowest_cost):
2272 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
2273 routines for which the same change has been made.
2274 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
2276 * tree-vect-loop-manip.c (get_misalign_in_elems)
2277 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
2279 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2280 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2281 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2282 (get_group_load_store_type, get_negative_load_store_type)
2283 (vect_get_data_ptr_increment, vectorizable_store)
2284 (vectorizable_load): Likewise.
2285 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2286 Update calls to other routines for which the same change has been made.
2288 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2290 * tree-vectorizer.h (vec_info::move_dr): New member function.
2291 (dataref_aux): Rename to...
2292 (dr_vec_info): ...this and add "dr" and "stmt" fields.
2293 (_stmt_vec_info::dr_aux): Update accordingly.
2294 (_stmt_vec_info::data_ref_info): Delete.
2295 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2296 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2297 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2298 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2300 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
2301 (STMT_VINFO_DR_INFO): New macro.
2302 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2303 (set_dr_misalignment): Update after rename of dataref_aux.
2304 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
2305 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2306 initialization of STMT_VINFO_DATA_REF.
2307 * tree-vectorizer.c (vec_info::move_dr): New function.
2308 * tree-vect-patterns.c (vect_recog_bool_pattern)
2309 (vect_recog_mask_conversion_pattern)
2310 (vect_recog_gather_scatter_pattern): Use it.
2311 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2312 the "dr" and "stmt" fields of dr_vec_info instead of
2313 STMT_VINFO_DATA_REF.
2315 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2317 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2318 (is_pattern_stmt_p): Use it.
2319 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2320 on pattern statements.
2322 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2324 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2325 original stmt as a stmt_vec_info rather than a gimple stmt.
2326 (vect_pattern_recog_1): Take the statement directly as a
2327 stmt_vec_info, rather than via a gimple_stmt_iterator.
2328 Update call to vect_mark_pattern_stmts.
2329 (vect_pattern_recog): Update calls accordingly.
2331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2333 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2334 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2335 a vect_def_type for the first argument.
2336 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2337 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
2338 operand if it isn't defined by a vectorized statement.
2339 (vect_build_gather_load_calls): Remove the mask_dt argument and
2340 update calls to vect_get_vec_def_for_stmt_copy.
2341 (vectorizable_bswap): Likewise the dt argument.
2342 (vectorizable_call): Update calls to vectorizable_bswap and
2343 vect_get_vec_def_for_stmt_copy.
2344 (vectorizable_simd_clone_call, vectorizable_assignment)
2345 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2346 (vectorizable_comparison): Update calls to
2347 vect_get_vec_def_for_stmt_copy.
2348 (vectorizable_store): Likewise. Remove now-unnecessary calls to
2350 (vect_get_loop_based_defs): Remove dt argument and update call
2351 to vect_get_vec_def_for_stmt_copy.
2352 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2353 and vect_get_vec_def_for_stmt_copy.
2354 (vectorizable_load): Update calls to vect_build_gather_load_calls
2355 and vect_get_vec_def_for_stmt_copy.
2356 * tree-vect-loop.c (vect_create_epilog_for_reduction)
2357 (vectorizable_reduction, vectorizable_live_operation): Update calls
2358 to vect_get_vec_def_for_stmt_copy.
2360 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2362 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2363 and gimple stmt arguments with a stmt_vec_info.
2364 (vect_record_base_alignments): Update calls accordingly.
2365 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2366 and gimple stmt arguments with a stmt_vec_info.
2367 (vect_build_slp_tree_1): Remove vinfo argument and update call
2368 to vect_record_max_nunits.
2369 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2370 and vect_record_max_nunits.
2372 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2374 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2375 file and take a stmt_vec_info instead of a gimple stmt.
2376 (supportable_widening_operation, vect_finish_replace_stmt)
2377 (vect_finish_stmt_generation, vect_get_store_rhs)
2378 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2379 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2380 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2381 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2382 (vect_create_data_ref_ptr, bump_vector_ptr)
2383 (vect_permute_store_chain, vect_setup_realignment)
2384 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2385 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2386 (vectorizable_reduction, vectorizable_induction)
2387 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2388 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2389 than gimple stmts as arguments.
2390 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2391 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2392 (can_group_stmts_p, vect_check_gather_scatter)
2393 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2394 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2395 (vect_permute_load_chain, vect_shift_permute_load_chain)
2396 (vect_transform_grouped_load)
2397 (vect_record_grouped_load_vectors): Likewise.
2398 * tree-vect-loop.c (vect_fixup_reduc_chain)
2399 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2400 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2401 (vectorizable_reduction, vectorizable_induction)
2402 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2403 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2404 (vect_get_load_store_mask): Likewise.
2405 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2406 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2407 * tree-vect-stmts.c (vect_mark_relevant)
2408 (is_simple_and_all_uses_invariant)
2409 (exist_non_indexing_operands_for_use_p, process_use)
2410 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2411 (vect_get_vec_def_for_operand, vect_get_vec_defs)
2412 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2413 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2414 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2415 (get_negative_load_store_type, get_load_store_type)
2416 (vect_check_load_store_mask, vect_check_store_rhs)
2417 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2418 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2419 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2420 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2421 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2422 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2423 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2424 (supportable_widening_operation): Likewise.
2426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2428 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2429 a stmt_vec_info instead of a gcall.
2430 (vect_check_gather_scatter): Update call accordingly.
2431 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2433 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2434 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2435 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2436 instead of a gimple stmt.
2437 (vect_transform_loop): Update calls accordingly.
2438 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2439 stmt_vec_infos instead of gimple stmts.
2440 (vect_analyze_slp_instance): Update use accordingly.
2441 * tree-vect-stmts.c (read_vector_array, write_vector_array)
2442 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2443 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2444 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2445 (vect_gen_widened_results_half, vect_get_loop_based_defs)
2446 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2447 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2448 down to subroutines.
2450 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2452 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2453 of the worklist from a vector of gimple stmts to a vector of
2455 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2456 (vect_mark_stmts_to_be_vectorized): Likewise
2458 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2460 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2461 statement before passing it to vect_analyze_stmt.
2462 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2463 the chain of phi vector definitions. Track the exit phi via its
2465 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2466 STMT_VINFO_REDUC_DEF.
2467 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2468 stmt_vec_infos to handle the statement chains.
2469 (vect_get_slp_defs): Record the first statement in the node
2470 using a stmt_vec_info.
2471 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2472 statements here and pass their stmt_vec_info down to subroutines.
2473 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2474 down to vect_finish_stmt_generation.
2475 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2476 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2477 stmt_vec_infos to subroutines.
2478 (vect_remove_stores): Use stmt_vec_infos to handle the statement
2481 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2483 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2484 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2485 (vect_permute_store_chain, vect_setup_realignment)
2486 (vect_permute_load_chain, vect_shift_permute_load_chain)
2487 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2488 stmts internally, and when passing values to other vectorizer routines.
2489 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2490 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2491 (vect_analyze_loop_operations, get_initial_def_for_reduction)
2492 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2493 (vectorizable_reduction, vectorizable_induction)
2494 (vectorizable_live_operation, vect_transform_loop_stmt)
2495 (vect_transform_loop): Likewise.
2496 * tree-vect-patterns.c (vect_reassociating_reduction_p)
2497 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2498 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2499 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2500 (vect_slp_analyze_node_operations_1): Likewise.
2501 * tree-vect-stmts.c (vect_mark_relevant, process_use)
2502 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2503 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2504 (vect_finish_stmt_generation_1, get_group_load_store_type)
2505 (get_load_store_type, vect_build_gather_load_calls)
2506 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2507 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2508 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2509 (vectorizable_store, vectorizable_load, vectorizable_condition)
2510 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2511 (supportable_widening_operation): Likewise.
2512 (vect_get_vector_types_for_stmt): Likewise.
2513 * tree-vectorizer.h (vect_dr_behavior): Likewise.
2515 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2517 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2518 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2519 (vect_permute_store_chain, vect_permute_load_chain)
2520 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2521 repeated stmt_vec_info lookups.
2522 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2523 (vect_update_ivs_after_vectorizer): Likewise.
2524 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2525 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2526 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2527 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2528 (vect_bb_slp_scalar_cost): Likewise.
2529 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2531 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2533 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2534 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2535 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2536 to get gassigns and gcalls, rather than operating on generc gimple
2538 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2539 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2540 (vectorizable_load, vect_analyze_stmt): Likewise.
2541 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2545 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2546 return stmt_vec_infos rather than gimple stmts. Do not accept
2548 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2550 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2551 Update use of get_later_stmt.
2552 (vect_get_constant_vectors): Update call accordingly.
2553 (vect_schedule_slp_instance): Likewise
2554 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2555 (vect_slp_analyze_instance_dependence): Likewise.
2556 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2558 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2560 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2561 (stmt_info_for_cost::stmt_info): ...this new field.
2562 (add_stmt_costs): Update accordingly.
2563 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2564 (vect_get_known_peeling_cost): Likewise.
2565 (vect_estimate_min_profitable_iters): Likewise.
2566 * tree-vect-stmts.c (record_stmt_cost): Likewise.
2568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2570 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2571 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2572 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2574 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2578 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2579 a gimple stmt to a stmt_vec_info.
2580 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2582 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2584 * tree-vectorizer.h (vec_info::grouped_stores): Change from
2585 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2586 (_loop_vec_info::reduction_chains): Likewise.
2587 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2589 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2591 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2593 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2594 a gimple stmt to a stmt_vec_info.
2595 (_stmt_vec_info::next_element): Likewise.
2596 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2597 (vect_slp_analyze_and_verify_node_alignment)
2598 (vect_analyze_group_access_1, vect_analyze_group_access)
2599 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2600 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2601 (vect_supportable_dr_alignment): Update accordingly.
2602 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2603 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2604 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2605 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2606 * tree-vect-slp.c (vect_build_slp_tree_1)
2607 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2608 (vect_split_slp_store_group, vect_analyze_slp_instance)
2609 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2610 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2611 (get_group_load_store_type, get_load_store_type)
2612 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2613 (vect_transform_stmt, vect_remove_stores): Likewise.
2615 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2617 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2619 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2620 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2621 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2622 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2623 (vector_alignment_reachable_p, vect_get_data_access_cost)
2624 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2625 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2626 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2627 (vect_analyze_group_access_1, vect_analyze_group_access)
2628 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2629 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2630 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2631 result of vect_dr_stmt and use the stmt_vec_info instead of
2632 the associated gimple stmt.
2633 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2634 (vect_gen_prolog_loop_niters): Likewise.
2635 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2637 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2639 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2640 to a vec<stmt_vec_info>.
2641 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2642 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2644 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2645 to a vec<stmt_vec_info>.
2646 (bst_traits::value_type, bst_traits::value_type): Likewise.
2647 (bst_traits::hash): Update accordingly.
2648 (vect_get_and_check_slp_defs): Change the stmts parameter from
2649 a vec<gimple *> to a vec<stmt_vec_info>.
2650 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2651 (vect_build_slp_tree): Likewise.
2652 (vect_build_slp_tree_2): Likewise. Update uses of
2653 SLP_TREE_SCALAR_STMTS.
2654 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2655 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2656 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2657 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2658 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2659 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2660 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2661 (vect_get_constant_vectors, vect_get_slp_defs)
2662 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2663 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2664 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2665 instead of gimple stmts.
2666 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2667 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2668 (vect_slp_analyze_instance_dependence): Update uses of
2669 SLP_TREE_SCALAR_STMTS.
2670 (vect_slp_analyze_and_verify_node_alignment): Likewise.
2671 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2672 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2673 (get_initial_defs_for_reduction): Likewise.
2674 (vect_create_epilog_for_reduction): Likewise.
2675 (vectorize_fold_left_reduction): Likewise.
2676 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2677 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2678 (can_vectorize_live_stmts): Likewise.
2680 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2682 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2683 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2684 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2686 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2688 (gather_scalar_reductions): Update after above interface changes.
2689 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2690 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2692 (vect_force_simple_reduction): Likewise.
2693 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2694 LOOP_VINFO_REDUCTIONS.
2695 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2697 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2699 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2700 a gimple stmt to a stmt_vec_info.
2701 * tree-vect-loop.c (vect_active_double_reduction_p)
2702 (vect_force_simple_reduction, vectorizable_reduction): Update
2705 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2707 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2708 vec<gimple *> to a vec<stmt_vec_info>.
2709 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2710 the reduction_phis argument from a vec<gimple *> to a
2712 (vectorizable_reduction): Likewise the phis local variable that
2713 is passed to vect_create_epilog_for_reduction. Update for new type
2714 of SLP_TREE_VEC_STMTS.
2715 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2716 (vectorizable_live_operation): Likewise.
2717 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2718 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2722 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2723 a gimple stmt to a stmt_vec_info.
2724 (vectorizable_condition, vectorizable_live_operation)
2725 (vectorizable_reduction, vectorizable_induction): Pass back the
2726 vectorized statement as a stmt_vec_info.
2727 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2728 use of STMT_VINFO_VEC_STMT.
2729 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2730 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2731 as stmt_vec_infos rather than gimple stmts.
2732 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2734 (vectorizable_live_operation): Likewise.
2735 (vectorizable_reduction, vectorizable_induction): Likewise,
2736 updating use of STMT_VINFO_VEC_STMT.
2737 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2738 of STMT_VINFO_VEC_STMT.
2739 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2740 (vectorizable_simd_clone_call, vectorizable_conversion)
2741 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2742 (vectorizable_store, vectorizable_load, vectorizable_condition)
2743 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2744 from a gimple stmt to a stmt_vec_info.
2745 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
2746 pointer to a stmt_vec_info to the vectorizable_* routines.
2748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2750 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2751 a gimple stmt to a stmt_vec_info.
2752 (is_pattern_stmt_p): Update accordingly.
2753 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2754 (vect_record_grouped_load_vectors): Likewise.
2755 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2756 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2757 (vect_model_reduction_cost): Likewise.
2758 (vect_create_epilog_for_reduction): Likewise.
2759 (vectorizable_reduction, vectorizable_induction): Likewise.
2760 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2761 Return the stmt_vec_info for the pattern statement.
2762 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2763 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2764 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2765 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2766 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2767 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2768 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2769 (free_stmt_vec_info, vect_is_simple_use): Likewise.
2771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2773 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2774 (vect_finish_stmt_generation): Likewise.
2775 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2776 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2777 (vect_build_gather_load_calls): Use the return value of the above
2778 functions instead of a separate call to vinfo_for_stmt. Use narrow
2779 scopes for the input gimple stmt and wider scopes for the associated
2780 stmt_vec_info. Use vec_info::lookup_def when setting these
2781 stmt_vec_infos from an SSA_NAME definition.
2782 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2783 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2784 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2785 (vectorizable_store, vectorizable_load, vectorizable_condition)
2786 (vectorizable_comparison): Likewise.
2787 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2788 (vectorizable_reduction): Likewise.
2790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2792 * tree-vectorizer.h (vect_is_simple_use): Add an optional
2793 stmt_vec_info * parameter before the optional gimple **.
2794 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2795 (process_use, vect_get_vec_def_for_operand_1): Update callers.
2796 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2797 * tree-vect-loop.c (vectorizable_reduction): Likewise.
2798 (vectorizable_live_operation): Likewise.
2799 * tree-vect-patterns.c (type_conversion_p): Likewise.
2800 (vect_look_through_possible_promotion): Likewise.
2801 (vect_recog_rotate_pattern): Likewise.
2802 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2804 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2806 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2807 a typedef to a wrapper class.
2808 (NULL_STMT_VEC_INFO): New macro.
2809 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2810 (stmt_vec_info::operator*): New function.
2811 (stmt_vec_info::operator gimple *): Likewise.
2812 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2813 (add_stmt_costs): Likewise.
2814 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2815 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2816 (vect_get_known_peeling_cost): Likewise.
2817 (vect_estimate_min_profitable_iters): Likewise.
2818 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2819 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2820 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2821 (vectorizable_store, free_stmt_vec_infos): Likewise.
2822 (new_stmt_vec_info): Change return type of xcalloc to
2825 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2827 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2828 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2829 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2830 a single_imm_use-based sequence.
2831 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2833 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2835 * tree-vectorizer.h (vec_info::lookup_def): Declare.
2836 * tree-vectorizer.c (vec_info::lookup_def): New function.
2837 * tree-vect-patterns.c (vect_get_internal_def): Use it.
2838 (vect_widened_op_tree): Likewise.
2839 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2840 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2841 (vectorizable_reduction): Likewise.
2842 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2844 (vect_is_slp_reduction): Update calls accordingly. Use
2845 vec_info::lookup_def.
2846 (vect_is_simple_reduction): Likewise
2847 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2851 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2852 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2853 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2855 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2856 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2857 (vect_update_vf_for_slp, vect_analyze_loop_operations)
2858 (vect_is_slp_reduction, vectorizable_induction)
2859 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2860 * tree-vect-patterns.c (vect_init_pattern_stmt):
2861 (vect_determine_min_output_precision_1, vect_determine_precisions)
2862 (vect_pattern_recog): Likewise.
2863 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2864 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2865 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2866 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2867 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2868 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
2869 info field from a loop to a loop_vec_info.
2871 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2873 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2874 (vec_info::add_stmt): Declare.
2875 * tree-vectorizer.c (vec_info::add_stmt): New function.
2876 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2877 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2878 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2879 (vectorizable_induction): Likewise.
2880 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2881 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2882 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2883 (vectorizable_load): Likewise.
2884 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2885 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2886 (vect_recog_gather_scatter_pattern): Likewise.
2887 (append_pattern_def_seq): Likewise. Remove a check that is
2888 performed by add_stmt itself.
2890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2892 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2893 which make_ssa_name was called with new_stmt before new_stmt
2896 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2898 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2900 (vect_is_slp_reduction): ...here...
2901 (vect_is_simple_reduction): ...and here. Remove repetition of tests
2902 that are already known to be false.
2904 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2906 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2907 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
2908 STMT_VINFO_NUM_SLP_USES when it's true.
2909 (vect_free_slp_instance): Add a final_p parameter and pass it to
2911 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2912 (vect_analyze_slp_instance): Likewise.
2913 (vect_slp_analyze_operations): Likewise.
2914 (vect_slp_analyze_bb_1): Likewise.
2915 * tree-vectorizer.c (vec_info): Likewise.
2916 * tree-vect-loop.c (vect_transform_loop): Likewise.
2918 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2920 * tree-vect-loop.c (vectorizable_reduction): Assert that the
2921 function is not called for second and subsequent members of
2924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
2926 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2927 cases for nested loops from here to ...
2928 (vect_create_epilog_for_reduction): ...here. Only call
2929 vect_is_simple_use for inner-loop reductions.
2931 2018-07-31 Martin Liska <mliska@suse.cz>
2933 PR gcov-profile/85338
2934 PR gcov-profile/85350
2935 PR gcov-profile/85372
2936 * profile.c (struct location_triplet): New.
2937 (struct location_triplet_hash): Likewise.
2938 (output_location): Do not output a BB that
2939 is already recorded for a line.
2940 (branch_prob): Use streamed_locations.
2942 2018-07-31 Martin Liska <mliska@suse.cz>
2944 PR gcov-profile/85370
2945 * coverage.c (coverage_begin_function): Do not mark target
2946 clones as artificial functions.
2948 2018-07-31 Martin Liska <mliska@suse.cz>
2950 PR gcov-profile/83813
2951 PR gcov-profile/84758
2952 PR gcov-profile/85217
2953 PR gcov-profile/85332
2954 * profile.c (branch_prob): Do not record GOTO expressions
2955 for GIMPLE statements which locations are already streamed.
2957 2018-07-31 Olivier Hainque <hainque@adacore.com>
2959 * gcc.c (handle_spec_function): Accept a soft_matched_part
2960 argument, as do_spec_1. Pass it down to ...
2961 (eval_spec_function): Accept a soft_matched_part argument,
2962 and pass it down to ...
2963 (do_spec_2): Accept a soft_matched_part argument, and pass
2964 it down to do_spec_1.
2965 (do_spec_1): Pass soft_matched_part to handle_spec_function.
2966 (handle_braces): Update call to handle_spec_function.
2967 (driver::set_up_specs): Update calls to do_spec_2.
2968 (compare_debug_dump_opt_spec_function): Likewise.
2969 (compare_debug_self_opt_spec_function): Likewise.
2971 2018-07-31 Olivier Hainque <hainque@adacore.com>
2973 * common.opt (nolibc): New option.
2974 * doc/invoke.texi (Link Options): Document it.
2975 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2976 * config/alpha/linux.h: Likewise.
2977 * config/arc/elf.h: Likewise.
2978 * config/arm/uclinux-elf.h: Likewise.
2979 * config/arm/unknown-elf.h: Likewise.
2980 * config/avr/avrlibc.h: Likewise.
2981 * config/bfin/bfin.h: Likewise.
2982 * config/bfin/linux.h: Likewise.
2983 * config/bfin/uclinux.h: Likewise.
2984 * config/darwin.h: Likewise.
2985 * config/darwin10.h: Likewise.
2986 * config/darwin12.h: Likewise.
2987 * config/gnu-user.h: Likewise.
2988 * config/lm32/uclinux-elf.h: Likewise.
2989 * config/pa/pa-hpux11.h: Likewise.
2990 * config/pa/pa64-hpux.h: Likewise.
2991 * config/sparc/sparc.h: Likewise.
2993 2018-07-31 Olivier Hainque <hainque@adacore.com>
2995 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2996 undefined variables.
2998 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3001 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3004 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
3006 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
3007 terminated string literal.
3009 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3011 PR rtl-optimization/85160
3012 * combine.c (is_just_move): New function.
3013 (try_combine): Allow combining two instructions into two if neither of
3014 the original instructions was a move.
3016 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
3019 * doc/extend.texi (Global Register Variables): Discourage use of type
3021 (Local Register Variables): Likewise.
3023 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
3025 PR tree-optimization/86506
3026 * hwint.h (ceil_log2): Resync with hwint.c implementation.
3028 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
3031 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
3032 hard_regno, make sure no insn between `from` and `to` clobbers it.
3034 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
3035 Tom de Vries <tdevries@suse.de>
3037 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
3038 (PTX_DEFAULT_RUNTIME_DIM): ... this.
3039 (nvptx_goacc_validate_dims): Set default worker and gang dims to
3040 PTX_DEFAULT_RUNTIME_DIM.
3041 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
3043 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3045 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3046 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3047 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3049 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
3051 * config/rs6000/constraints.md (wG constraint): Delete, no longer
3053 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
3054 predicate to reflect toc fusion has been deleted.
3055 (toc_fusion_mem_raw): Delete, no longer used.
3056 (toc_fusion_mem_wrapped): Likewise.
3057 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
3059 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
3060 Delete, no longer used.
3061 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
3062 meant to be used for toc fusion.
3063 (rs6000_debug_print_mode): Delete toc fusion debugging.
3064 (rs6000_debug_reg_global): Likewise.
3065 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
3066 fusion and secondary reload support that were never used.
3067 (rs6000_option_override_internal): Delete TOC fusion, that was only
3068 partially defined, and it did not work unless you also used the
3070 (rs6000_legitimate_address_p): Delete TOC fusion support.
3071 (rs6000_opt_masks): Likewise.
3072 (fusion_wrap_memory_address): Delete function, no longer used.
3073 (fusion_split_address); Delete TOC fusion support.
3074 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
3075 longer used with toc fusion being deleted.
3076 (TARGET_TOC_FUSION_FP): Likewise.
3077 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
3079 (toc fusion spliter): Delete TOC fusion support.
3080 (toc_fusionload_<mode>): Likewise.
3081 (toc_fusionload_di): Likewise.
3082 (fusion_gpr_load_<mode>): Delete generator function, this insn no
3083 longer needs to be named. Rename predicate to delete TOC fusion.
3084 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3085 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3086 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3087 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3088 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3090 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3092 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3093 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
3094 __int128 in built-in function prototypes.
3095 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3096 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3098 2018-07-27 Martin Sebor <msebor@redhat.com>
3100 PR tree-optimization/86696
3101 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3102 types, including enums.
3103 (handle_char_store): Be prepared for the above function to fail.
3105 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
3107 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3108 when optimization level is lower than 2 or optimize for size.
3110 2018-07-26 Martin Sebor <msebor@redhat.com>
3112 PR tree-optimization/86043
3113 PR tree-optimization/86042
3114 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3115 (get_string_cst_length): Rename...
3116 (get_min_string_length): ...to this. Add argument.
3117 (handle_char_store): Extend to handle multi-character stores by
3119 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
3120 * tree.h (initializer_zerop): Add argument.
3122 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3125 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3126 declare target to variables if they have always,{to,from,tofrom} map
3129 2018-07-26 Martin Liska <mliska@suse.cz>
3132 * lto-wrapper.c: Add linker_output as prefix
3133 for ltrans_output_file.
3135 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
3137 PR rtl-optimization/85805
3138 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3139 value for hard registers if that was written in the same mode.
3141 2018-07-26 Martin Liska <mliska@suse.cz>
3143 PR gcov-profile/86536
3144 * gcov.c (format_gcov): Use printf format %.*f directly
3145 and do not handle special values.
3147 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3149 * common/config/arc/arc-common.c (arc_option_optimization_table):
3150 Update default optimizations for size.
3152 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3154 * config/arc/arc.md (movsf_insn): Add short instruction selection.
3155 * config/arc/constraints.md (CfZ): New constraint.
3156 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3157 (subsf3_fpu): Likewise.
3158 (cmpsf_fpu): Likewise.
3159 (cmpsf_fpu_uneq): Likewise.
3161 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3163 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3165 (arc_is_uncached_mem_p): uncached applies to both the variable and
3168 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
3170 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3173 2018-07-25 David Malcolm <dmalcolm@redhat.com>
3175 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3176 field "m_scopes" from vec to auto_vec.
3178 2018-07-25 Martin Liska <mliska@suse.cz>
3180 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3183 2018-07-25 Richard Biener <rguenther@suse.de>
3186 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3187 special wrt context_die late.
3188 (gen_subprogram_die): Re-use DIEs in local scope.
3190 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
3192 PR tree-optimization/86644
3193 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
3195 2018-07-25 Martin Liska <mliska@suse.cz>
3198 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3199 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3201 2018-07-25 Martin Liska <mliska@suse.cz>
3204 * params.def: Explain ASan abbreviation and provide
3205 a documentation link.
3207 2018-07-24 Martin Sebor <msebor@redhat.com>
3209 PR tree-optimization/86622
3210 PR tree-optimization/86532
3211 * builtins.h (string_length): Declare.
3212 * builtins.c (c_strlen): Correct handling of non-constant offsets.
3213 (check_access): Be prepared for non-constant length ranges.
3214 (string_length): Make extern.
3215 * expr.c (string_constant): Only handle the minor non-constant
3216 array index. Use string_constant to compute the length of
3217 a generic string constant.
3219 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
3221 PR tree-optimization/86618
3222 * tree-vect-stmts.c (vectorizable_call): Don't take the address
3223 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3225 2018-07-24 David Malcolm <dmalcolm@redhat.com>
3227 PR tree-optimization/86636
3228 * json.cc (json::object::set): Fix comment. Add assertions.
3229 (json::array::append): Move here from json.h. Add comment and an
3231 (json::string::string): Likewise.
3232 * json.h (json::array::append): Move to json.cc.
3233 (json::string::string): Likewise.
3234 * optinfo-emit-json.cc
3235 (optrecord_json_writer::impl_location_to_json): Assert that we
3236 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3237 wrapper around it. Expand the location once, rather than three
3239 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3240 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3242 (optrecord_json_writer::optinfo_to_json): Likewise, in four
3243 places. Fix some overlong lines.
3245 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
3247 * config/aarch64/aarch64-simd.md
3248 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3249 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3250 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3251 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3252 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3253 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3254 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3255 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3256 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3258 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3261 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3262 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3263 and abs_d == d, do the power of two handling if profitable.
3265 2018-07-24 Richard Biener <rguenther@suse.de>
3267 * match.pd: Add BIT_FIELD_REF canonicalizations.
3269 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3272 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3274 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3276 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3277 terminated STRING_CST object.
3279 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3281 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3283 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3285 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3286 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3287 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3288 the elements into a register.
3289 (rs6000_split_v4si_init_di_reg): Delete.
3290 (rs6000_split_v4si_init): Delete.
3291 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3292 (vsx_init_v4si): Rewrite as a define_expand.
3294 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
3296 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3297 zero_extend argument from memory): New.
3299 2018-07-22 Martin Sebor <msebor@redhat.com>
3302 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3303 diagnosing calls with unknown arguments unless -Walloca-larger-than
3304 is restricted to less than PTRDIFF_MAX bytes.
3306 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
3308 * doc/gcov.texi (Invoking Gcov): Editorial changes.
3310 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3312 * pretty-print.c (text_info::set_location): Remove redundant
3313 "line_table" parameter from call to rich_location::set_range.
3315 2018-07-20 Martin Sebor <msebor@redhat.com>
3318 * builtins.c (expand_builtin_alloca): Adjust.
3319 * calls.c (alloc_max_size): Simplify.
3320 * cgraphunit.c (cgraph_node::expand): Adjust.
3321 * common.opt (larger_than_size, warn_frame_larger_than): Remove
3323 (frame_larger_than_size): Same.
3324 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3325 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3327 * doc/invoke.texi (GCC Command Options): Document option arguments.
3328 Explain byte-size arguments and suffixes.
3329 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3330 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3331 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3332 * doc/options.texi (UInteger): Expand.
3333 (Host_Wide_Int, ByteSize): Document new properties.
3334 * final.c (final_start_function_1): Include sizes in an error message.
3335 * function.c (frame_offset_overflow): Same.
3336 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3337 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3338 Diagnose unbounded alloca calls only for limits of less than
3340 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
3341 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
3343 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
3344 only for limits of less than PTRDIFF_MAX.
3345 * langhooks-def.h (lhd_handle_option): Change function argument
3347 * langhooks.c (lhd_handle_option): Same.
3348 * langhooks.h (handle_option): Same.
3349 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3351 (var_type, var_type_struct): Same.
3352 (var_set): Handle ByteSize flag.
3353 * optc-gen.awk: Add comments to output to ease debugging. Make
3354 use of HOST_WIDE_INT where appropriate.
3355 * opts-gen-save.awk: Use %lx to format unsigned long.
3356 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3357 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3358 arguments. Parse bytes-size suffixes.
3359 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3360 (enum_value_to_arg): Same.
3361 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
3362 (handle_option): Adjust.
3363 (generate_option): Change function argument to HOST_WIDE_INT.
3364 (cmdline_handle_error): Adjust.
3365 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3366 (set_option): Change function argument to HOST_WIDE_INT.
3367 (option_enabled): Handle cl_host_wide_int.
3368 (get_option_state): Handle CLVC_SIZE.
3369 (control_warning_option): Same.
3370 * opts.c (common_handle_option): Change function argument to
3371 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
3372 OPT_Wvla_larger_than_.
3373 * opts.h (enum cl_var_type): Add an enumerator.
3374 * stor-layout.c (layout_decl): Print a more meaningful warning.
3375 * toplev.c (output_stack_usage): Adjust.
3377 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
3379 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3380 call to inline_expand_builtin_string_cmp.
3381 (expand_builtin_strcmp): Likewise.
3382 (expand_builtin_strncmp): Likewise.
3383 (inline_string_cmp): Delete the last parameter, change char_type_node
3384 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3386 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3387 the inlining expansion on target where the type of the call has same or
3388 narrower precision than unsigned char.
3390 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3392 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3393 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3394 * common.opt (fsave-optimization-record): New option.
3395 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3396 * doc/invoke.texi (-fsave-optimization-record): New option.
3397 * dumpfile.c: Include "optinfo-emit-json.h".
3398 (struct kv_pair): Move to coretypes.h.
3399 (optgroup_options): Make non-static.
3400 (dump_context::end_scope): Call
3401 optimization_records_maybe_pop_dump_scope.
3402 * dumpfile.h (optgroup_options): New decl.
3403 * json.cc: New file.
3405 * optinfo-emit-json.cc: New file.
3406 * optinfo-emit-json.h: New file.
3407 * optinfo.cc: Include "optinfo-emit-json.h".
3408 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3409 (optinfo_enabled_p): Check optimization_records_enabled_p.
3410 (optinfo_wants_inlining_info_p): Likewise.
3411 * optinfo.h: Update comment.
3412 * profile-count.c (profile_quality_as_string): New function.
3413 * profile-count.h (profile_quality_as_string): New decl.
3414 (profile_count::quality): New accessor.
3415 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3416 and optinfo_emit_json_cc_tests.
3417 * selftest.h (selftest::json_cc_tests): New decl.
3418 (selftest::optinfo_emit_json_cc_tests): New decl.
3419 * toplev.c: Include "optinfo-emit-json.h".
3420 (compile_file): Call optimization_records_finish.
3421 (do_compile): Call optimization_records_start.
3422 * tree-ssa-live.c: Include optinfo.h.
3423 (remove_unused_scope_block_p): Retain inlining information if
3424 optinfo_wants_inlining_info_p returns true.
3426 2018-07-20 Richard Biener <rguenther@suse.de>
3429 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3430 to cover -flto-partition=none.
3432 2018-07-20 Martin Liska <mliska@suse.cz>
3434 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3435 (get_decl_source_range): Remove unused function.
3437 2018-07-20 Richard Biener <rguenther@suse.de>
3439 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3440 (struct vn_phi_s): Likewise.
3441 (struct vn_reference_s): Likewise.
3442 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3443 for searching the slot of an entry known to be in the hash itself.
3444 (vn_phi_hasher::equal): Likewise.
3445 (vn_reference_hasher::equal): Likewise.
3446 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3448 (optimistic_info, current_info): Remove, keeping only valid_info.
3449 (vn_reference_lookup_1): Remove fallback lookup.
3450 (vn_reference_lookup_2): Likewise.
3451 (vn_nary_op_lookup_1): Likewise.
3452 (vn_phi_lookup): Likewise.
3453 (vn_nary_build_or_lookup_1): Make sure to not chain the built
3455 (vn_reference_insert): Adjust, chain the inserted hash element
3456 at last_inserted_ref.
3457 (vn_reference_insert_pieces): Likewise.
3458 (visit_reference_op_call): Likewise.
3459 (vn_nary_op_insert_into): Chain the inserted hash element at
3461 (vn_nary_op_insert_pieces): Adjust.
3462 (vn_nary_op_insert): Likewise.
3463 (vn_nary_op_insert_stmt): Likewise.
3464 (vn_phi_insert): Adjust, chain the inserted hash element at
3466 (process_scc): Remove clearing and copying the optimistic
3467 table. Instead remove elements inserted during an optimistic
3468 iteration from the single table we maintain.
3469 (init_scc_vn): Adjust.
3470 (free_scc_vn): Likewise.
3471 (sccvn_dom_walker::record_cond): Likewise.
3472 (sccvn_dom_walker::after_dom_children): Likewise.
3474 2018-07-19 Martin Sebor <msebor@redhat.com>
3476 PR tree-optimization/84047
3477 PR tree-optimization/83776
3478 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3479 (check_array_bounds): Call it.
3481 2018-07-19 Martin Sebor <msebor@redhat.com>
3483 * align.h (align_flags): Use member initialization.
3485 2018-07-19 David Malcolm <dmalcolm@redhat.com>
3487 * Makefile.in (OBJS): Add optinfo.o.
3488 * coretypes.h (class symtab_node): New forward decl.
3489 (struct cgraph_node): New forward decl.
3490 (class varpool_node): New forward decl.
3491 * dump-context.h: New file.
3492 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3494 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3495 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3496 (set_alt_dump_file): Likewise.
3497 (dump_context::~dump_context): New dtor.
3498 (dump_gimple_stmt): Move implementation to...
3499 (dump_context::dump_gimple_stmt): ...this new member function.
3500 Add the stmt to any pending optinfo, creating one if need be.
3501 (dump_gimple_stmt_loc): Move implementation to...
3502 (dump_context::dump_gimple_stmt_loc): ...this new member function.
3503 Start a new optinfo and add the stmt to it.
3504 (dump_gimple_expr): Move implementation to...
3505 (dump_context::dump_gimple_expr): ...this new member function.
3506 Add the stmt to any pending optinfo, creating one if need be.
3507 (dump_gimple_expr_loc): Move implementation to...
3508 (dump_context::dump_gimple_expr_loc): ...this new member function.
3509 Start a new optinfo and add the stmt to it.
3510 (dump_generic_expr): Move implementation to...
3511 (dump_context::dump_generic_expr): ...this new member function.
3512 Add the tree to any pending optinfo, creating one if need be.
3513 (dump_generic_expr_loc): Move implementation to...
3514 (dump_context::dump_generic_expr_loc): ...this new member
3515 function. Add the tree to any pending optinfo, creating one if
3517 (dump_printf): Move implementation to...
3518 (dump_context::dump_printf_va): ...this new member function. Add
3519 the text to any pending optinfo, creating one if need be.
3520 (dump_printf_loc): Move implementation to...
3521 (dump_context::dump_printf_loc_va): ...this new member function.
3522 Start a new optinfo and add the stmt to it.
3523 (dump_dec): Move implementation to...
3524 (dump_context::dump_dec): ...this new member function. Add the
3525 value to any pending optinfo, creating one if need be.
3526 (dump_context::dump_symtab_node): New member function.
3527 (dump_context::get_scope_depth): New member function.
3528 (dump_context::begin_scope): New member function.
3529 (dump_context::end_scope): New member function.
3530 (dump_context::ensure_pending_optinfo): New member function.
3531 (dump_context::begin_next_optinfo): New member function.
3532 (dump_context::end_any_optinfo): New member function.
3533 (dump_context::s_current): New global.
3534 (dump_context::s_default): New global.
3535 (dump_scope_depth): Delete global.
3536 (dumpfile_ensure_any_optinfo_are_flushed): New function.
3537 (dump_symtab_node): New function.
3538 (get_dump_scope_depth): Reimplement in terms of dump_context.
3539 (dump_begin_scope): Likewise.
3540 (dump_end_scope): Likewise.
3541 (selftest::temp_dump_context::temp_dump_context): New ctor.
3542 (selftest::temp_dump_context::~temp_dump_context): New dtor.
3543 (selftest::verify_item): New function.
3544 (ASSERT_IS_TEXT): New macro.
3545 (ASSERT_IS_TREE): New macro.
3546 (ASSERT_IS_GIMPLE): New macro.
3547 (selftest::test_capture_of_dump_calls): New test.
3548 (selftest::dumpfile_c_tests): Call it.
3549 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3550 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3551 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3552 descriptive comment.
3553 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3554 (dump_node, dump_bb): Move these unrelated decls.
3555 (class dump_manager): Add leading comment.
3556 * optinfo.cc: New file.
3557 * optinfo.h: New file.
3559 2018-07-19 Michael Collison <michael.collison@arm.com>
3560 Richard Henderson <rth@redhat.com>
3562 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3563 (subti): Handle op1 zero.
3564 (subvti4, usub4ti4): New.
3565 (*sub<GPI>3_compare1_imm): New.
3566 (sub<GPI>3_carryinCV): New.
3567 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3568 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3570 2018-07-19 Michael Collison <michael.collison@arm.com>
3571 Richard Henderson <rth@redhat.com>
3573 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3574 (addti3): Create simpler code if low part is already known to be 0.
3575 (addvti4, uaddvti4): New.
3576 (*add<GPI>3_compareC_cconly_imm): New.
3577 (*add<GPI>3_compareC_cconly): New.
3578 (*add<GPI>3_compareC_imm): New.
3579 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3580 handle constants within this pattern..
3581 (*add<GPI>3_compareV_cconly_imm): New.
3582 (*add<GPI>3_compareV_cconly): New.
3583 (*add<GPI>3_compareV_imm): New.
3584 (add<GPI>3_compareV): New.
3585 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3586 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3587 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3588 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3589 with 'comparison' operator.
3590 (*add<GPI>3_compareV_cconly_imm): Ditto.
3591 (*add<GPI>3_compareV_cconly): Ditto.
3592 (*add<GPI>3_compareV_imm): Ditto.
3593 (add<GPI>3_compareV): Ditto.
3594 (add<mode>3_carryinC): Ditto.
3595 (*add<mode>3_carryinC_zero): Ditto.
3596 (*add<mode>3_carryinC): Ditto.
3597 (add<mode>3_carryinV): Ditto.
3598 (*add<mode>3_carryinV_zero): Ditto.
3599 (*add<mode>3_carryinV): Ditto.
3601 2018-07-19 Michael Collison <michael.collison@arm.com>
3602 Richard Henderson <rth@redhat.com>
3604 * config/aarch64/aarch64-modes.def (CC_V): New.
3605 * config/aarch64/aarch64-protos.h
3606 (aarch64_addti_scratch_regs): Declare
3607 (aarch64_subvti_scratch_regs): Declare.
3608 (aarch64_expand_subvti): Declare.
3609 (aarch64_gen_unlikely_cbranch): Declare
3610 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3611 for signed overflow using CC_Vmode.
3612 (aarch64_get_condition_code_1): Handle CC_Vmode.
3613 (aarch64_gen_unlikely_cbranch): New function.
3614 (aarch64_addti_scratch_regs): New function.
3615 (aarch64_subvti_scratch_regs): New function.
3616 (aarch64_expand_subvti): New function.
3618 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3620 * config/aarch64/aarch64-option-extensions.def: New entry for profile
3622 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3623 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3626 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3629 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3630 address check not strict.
3632 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
3634 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3636 (store_pair_lanes<mode>): Likewise.
3637 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3638 enum value 'ADDR_QUERY_LDP_STP_N'.
3639 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3640 (aarch64_print_address_internal): Add declaration.
3641 (aarch64_print_ldpstp_address): Remove.
3642 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3643 (aarch64_print_operand): Change printing of 'y'.
3644 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3645 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3646 'true' rather than '1'.
3647 * config/aarch64/constraints.md (Uml): Likewise.
3648 (Uml): Rename to Umn.
3651 2018-07-19 Richard Biener <rguenther@suse.de>
3653 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3655 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3656 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3657 (vn_reference_hasher): Likewise.
3658 (struct vn_tables_s): Remove obstack and alloc-pool members.
3659 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3660 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3661 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3662 (vn_reference_insert_pieces): Likewise.
3663 (alloc_vn_nary_op_noinit): Adjust.
3664 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3665 (vn_phi_eq): Adjust.
3666 (shared_lookup_phiargs): Remove.
3667 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3668 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3669 (visit_reference_op_call): Likewise.
3670 (copy_nary, copy_phi, copy_reference): Remove.
3671 (process_scc): Rewind the obstack when iterating. Do not
3672 copy the elements to valid_info but just move them from one
3673 hashtable to the other.
3674 (allocate_vn_table): Adjust.
3675 (free_vn_table): Likewise.
3676 (init_scc_vn): Likewise.
3677 (free_scc_vn): Likewise.
3679 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
3682 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3683 indirect_return as function type attribute.
3684 (ix86_attribute_table): Change indirect_return to function
3686 * doc/extend.texi: Update indirect_return attribute.
3688 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
3690 * wide-int.h (widest2_int): New.
3691 * gimple-fold.c (arith_overflowed_p): Use it.
3692 * tree.h (widest2_int_cst): New.
3693 * tree-vrp.c (wide_int_binop_overflow): Rename from
3694 vrp_int_const_binop.
3695 Rewrite to work on trees.
3696 (extract_range_from_multiplicative_op_1): Abstract code to...
3697 (wide_int_range_min_max): ...here.
3698 (wide_int_range_cross_product): ...and here.
3699 (extract_range_from_binary_expr_1): Abstract overflow code to...
3700 (wide_int_range_mult_wrapping): ...here.
3701 * tree-vrp.h (wide_int_range_cross_product): New.
3702 (wide_int_range_mult_wrapping): New.
3704 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
3705 Julia Koval <julia.koval@intel.com>
3707 * config/i386/x86-tune-costs.h (skylake_memcpy,
3708 skylake_memset): Replace rep_prefix with unrolling for size 512.
3710 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
3713 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3714 comparision with EQ_EXPR in last stmt.
3716 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
3718 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3719 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3720 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3721 previously known as "PowerPC AltiVec Built-in Functions". Move
3722 some material to new subsubsections "PowerPC AltiVec Built-in
3723 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3725 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3726 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3727 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3728 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3730 2018-07-18 Richard Biener <rguenther@suse.de>
3732 PR tree-optimization/86557
3733 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3736 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
3738 * config/s390/s390.c (s390_function_profiler): Generate CFI.
3740 2018-07-17 Jeff Law <law@redhat.com>
3742 * config/arm/arm.c (get_label_padding): Update for recent
3743 changes to label_to_alignment.
3745 PR tree-optimization/86010
3746 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3748 * config/mips/mips.c (vr4130_align_insns): Update for recent
3749 changes to label_to_alignment.
3751 * config/frv/frv.c (frv_label_align): Update for recent changes
3752 to label_to_alignment.
3754 * config/nios2/nios2.c (nios2_label_align): Update for recent
3755 changes which dropped ALIGN_LABELS_LOG.
3757 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3759 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3760 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3762 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
3764 * config/arc/arc.c (arc_label_align): Use align_labels instead of
3765 deprecated align_labels_log.
3767 2018-07-17 Richard Biener <rguenther@suse.de>
3770 * dwarf2out.c (init_sections_and_labels): Always generate
3771 a debug_line_str_section for early LTO debug.
3772 (dwarf2out_finish): Reset debug_line_str_hash output early.
3773 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3775 (dwarf2out_early_finish): Output debug_line_str.
3777 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3779 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3780 index register on z196 or later.
3782 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
3784 * config/s390/s390.c (s390_default_align): Set default function
3786 (s390_override_options_after_change): Call s390_default align.
3787 (s390_option_override_internal): Call s390_default_align.
3788 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3790 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3793 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3794 to _looptemp_ clauses, other than the first two.
3796 2018-07-17 Martin Liska <mliska@suse.cz>
3798 * opts.c: Do not enable OPT_falign_* for -Os.
3800 2018-07-17 Martin Liska <mliska@suse.cz>
3802 * align.h (MAX_CODE_ALIGN): New.
3803 (MAX_CODE_ALIGN_VALUE): New.
3804 * common/config/i386/i386-common.c (ix86_handle_option):
3805 (MAX_CODE_ALIGN): Moved to align.h.
3806 * final.c (MAX_CODE_ALIGN): Likewise.
3807 * opts.c (parse_and_check_align_values):
3808 (MAX_CODE_ALIGN): Likewise.
3809 (MAX_CODE_ALIGN_VALUE): Likewise.
3811 2018-07-17 Martin Liska <mliska@suse.cz>
3813 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3814 in order to fulfil coding style.
3815 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3816 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3817 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3818 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3819 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3820 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3821 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3822 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3823 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3825 2018-07-17 Martin Liska <mliska@suse.cz>
3827 * align.h: New file.
3828 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3830 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3831 align_flags of label_to_alignment.
3832 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3834 * config/m68k/m68k.c: Do not use removed align_labels_value and
3836 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3837 (LOOP_ALIGN): Likewise.
3838 (LABEL_ALIGN): Likewise.
3839 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3840 Remove not used macro.
3841 (rs6000_loop_align): Change return type to align_flags.
3842 (rs6000_loop_align_max_skip): Remove.
3843 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3844 Change return type to align_flags.
3845 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3846 Remove not used macro.
3847 (rs6000_loop_align): Change return type to align_flags.
3848 (rs6000_loop_align_max_skip): Remove.
3849 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3850 * config/rx/rx-protos.h (rx_align_for_label): Make it
3852 * config/rx/rx.c (rx_align_for_label): Change return type
3854 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3856 into align_flags class.
3857 (LABEL_ALIGN): Likewise.
3858 (LOOP_ALIGN): Likewise.
3859 * config/s390/s390.c (s390_label_align): Use align_flags
3861 (s390_asm_output_function_label): Likewise.
3862 * config/sh/sh.c (sh_override_options_after_change):
3863 Use align_flags class directly without macros.
3864 (find_barrier): Likewise.
3865 (barrier_align): Likewise.
3866 (sh_loop_align): Likewise.
3867 * config/spu/spu.c (spu_option_override):
3868 Use align_flags_tuple::get_value instead of removed macros.
3869 (spu_sched_init): Likewise.
3870 * config/spu/spu.h (GTY): Likewise.
3871 * config/visium/visium.c (visium_option_override):
3872 Set "8" as default secondary alignment.
3873 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3874 in order to guarantee secondary alignment of 8.
3875 * coretypes.h: Include align.h header file.
3876 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3877 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3878 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3879 * doc/tm.texi.in: Likewise.
3880 * final.c (struct label_alignment): Remove not used structure.
3881 (LABEL_ALIGN): Change type to align_flags.
3882 (LOOP_ALIGN): Likewise.
3883 (JUMP_ALIGN): Likewise.
3884 (default_loop_align_max_skip): Remove.
3885 (default_label_align_max_skip): Likewise.
3886 (default_jump_align_max_skip): Likewise.
3887 (default_label_align_after_barrier_max_skip):
3888 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3889 (LABEL_TO_MAX_SKIP): Remove.
3890 (label_to_alignment): Return align_flags type instead of integer.
3891 (label_to_max_skip): Remove.
3892 (align_fuzz): Use align_flags type.
3893 (compute_alignments): Use align_flags type and use align_flags::max
3894 to combine multiple alignments.
3895 (grow_label_align): Grow vec instead of C array.
3896 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3897 (shorten_branches): Use align_flags type and use align_flags::max
3898 to combine multiple alignments.
3899 (final_scan_insn_1): Remove usage of secondary alignment that comes
3900 from label alignment, but instead use proper secondary alignment
3901 which is computed in grow_label_align.
3902 * flags.h (struct align_flags_tuple): Move to align.h.
3903 (struct align_flags): Likewise.
3904 (state_align_loops): Rename to align_loops.
3905 (state_align_jumps): Rename to align_jumps.
3906 (state_align_labels): Rename to align_labels.
3907 (state_align_functions): Rename to align_functions.
3908 (align_loops_log): Remove.
3909 (align_jumps_log): Remove.
3910 (align_labels_log): Remove.
3911 (align_functions_log): Remove.
3912 (align_loops_max_skip): Remove.
3913 (align_jumps_max_skip): Remove.
3914 (align_labels_max_skip): Remove.
3915 (align_functions_max_skip): Remove.
3916 (align_loops_value): Remove.
3917 (align_jumps_value): Remove.
3918 (align_labels_value): Remove.
3919 (align_functions_value): Remove.
3920 * output.h (label_to_alignment): Change return type to align_flags.
3921 (label_to_max_skip): Remove.
3922 * target.def: Remove loop_align_max_skip, label_align_max_skip,
3923 jump_align_max_skip macros.
3924 * targhooks.h (default_loop_align_max_skip): Remove.
3925 (default_label_align_max_skip): Likewise.
3926 (default_jump_align_max_skip): Likewise.
3927 (default_label_align_after_barrier_max_skip): Remove.
3928 * toplev.c (read_log_maxskip): Use ::normalize function.
3929 (parse_N_M): Remove not used argument and also call ::normalize.
3930 (parse_alignment_opts): Do not pass unused arguments.
3931 * varasm.c (assemble_start_function): Use directly align_functions
3932 instead of removed macros.
3933 * system.h: Do not poison removed macros.
3935 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3938 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3939 and cond temporaries don't have reference type if iterator has
3940 pointer type. For init use &for_pre_body instead of pre_p if
3941 for_pre_body is non-empty.
3943 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3945 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3946 double-double modes to SFmode directly directly.
3947 (trunc<mode>sf2_fprs): Delete.
3949 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3951 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3952 for conversions between IFmode and the decimal floating point modes.
3953 (init_float128_ieee): Use the correct names for conversions between
3954 KFmode and the decimal floating point modes.
3956 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
3958 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3959 for the conversions between TDmode and IFmode.
3960 (init_float128_ieee): Use more correct names for the conversions
3961 between TDmode and KFmode.
3963 2018-07-16 Jakub Jelinek <jakub@redhat.com>
3965 PR tree-optimization/86526
3966 * builtins.c (expand_builtin_memcmp): Formatting fixes.
3967 (inline_expand_builtin_string_cmp): Likewise.
3968 (inline_string_cmp): Likewise. Use c_readstr instead of
3969 builtin_memcpy_read_str. Add unit_mode temporary.
3971 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
3974 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3975 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3977 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
3979 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3980 Alphabetize prototypes of built-in functions, separating out
3981 built-in functions that are listed in this section but should be
3982 described elsewhere.
3984 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3987 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3988 conditional move when trapping comparison was split to a
3989 non-trapping one (and vice versa).
3991 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3993 * config/s390/s390.c (s390_function_profiler): Generate nops
3994 instead of profiler call sequences.
3995 * config/s390/s390.opt: Add the new option.
3997 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
3999 * config/s390/s390.c (s390_function_profiler): Generate
4000 __mcount_loc section.
4001 * config/s390/s390.opt: Add the new option.
4003 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
4005 * common.opt: Add the new warning.
4006 * config/s390/s390.c (s390_function_profiler): Emit "brasl
4007 %r0,__fentry__" when -mfentry is specified.
4008 (s390_option_override_internal): Disallow -mfentry for 31-bit
4010 * config/s390/s390.opt: Add the new option.
4012 2018-07-16 Richard Biener <rguenther@suse.de>
4015 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
4016 for function-local FUNCTION_DECL and RESULT_DECL immediately.
4018 2018-07-16 Martin Liska <mliska@suse.cz>
4021 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
4024 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4026 * config/arc/arcHS.md: Update ARCHS scheduling rules.
4028 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
4030 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
4032 * config/arc/arc-cpus.def (hs4x): New cpu.
4034 * config/arc/arc-tables.opt: Regenerate.
4035 * config/arc/arc.c (arc_sched_issue_rate): New function.
4036 (TARGET_SCHED_ISSUE_RATE): Define.
4037 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
4038 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
4040 (attr tune): Add ARCHS4x tune values.
4041 (attr tune_dspmpy): Define.
4042 (*tst): Correct instruction type.
4043 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
4044 * config/arc/arcHS4x.md: New file.
4045 * config/arc/fpu.md: Update instruction type attributes.
4046 * config/arc/t-multilib: Regenerate.
4048 2018-07-16 Tom de Vries <tdevries@suse.de>
4051 * var-tracking.c (vt_initialize): Fix pre_dec handling.
4053 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4055 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
4058 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
4060 PR tree-optimization/86514
4061 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
4062 conversion to a boolean type from a type with greater precision.
4064 2018-07-16 Tom de Vries <tdevries@suse.de>
4066 * var-tracking.c (vt_initialize): Print adjusted insn slim if
4067 dump_flags request TDF_SLIM.
4069 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
4071 * fold-const.c (int_const_binop_1): Abstract...
4072 (wide_int_binop): ...wide int code here.
4073 (poly_int_binop): ...poly int code here.
4074 Abstract the rest of int_const_binop_1 into int_const_binop.
4075 * fold-const.h (wide_int_binop): New.
4076 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
4077 Remove useless PLUS/MINUS_EXPR case.
4078 (zero_nonzero_bits_from_vr): Move wide int code...
4079 (zero_nonzero_bits_from_bounds): ...here.
4080 (extract_range_from_binary_expr_1): Move mask optimization code...
4081 (range_easy_mask_min_max): ...here.
4082 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4083 (range_easy_mask_min_max): New.
4085 2018-07-15 Jeff Law <law@redhat.com>
4088 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4091 2018-07-14 Jim Wilson <jimw@sifive.com>
4093 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4095 2018-07-14 Paul Koning <ni1d@arrl.net>
4097 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4099 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
4101 * lto-streamer-out.c (copy_function_or_variable): Dump info about
4104 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
4105 Steve Munroe <munroesj52@gmail.com>
4107 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4108 (_mm_andnot_si128): Likewise.
4109 (_mm_or_si128): Likewise.
4110 (_mm_xor_si128): Likewise.
4112 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
4115 * builtins.c (expand_builtin_memcmp): Inline the calls first
4116 when result_eq is false.
4117 (expand_builtin_strcmp): Inline the calls first.
4118 (expand_builtin_strncmp): Likewise.
4119 (inline_string_cmp): New routine. Expand a string compare
4120 call by using a sequence of char comparison.
4121 (inline_expand_builtin_string_cmp): New routine. Inline expansion
4122 a call to str(n)cmp/memcmp.
4123 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4125 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4127 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
4129 * config/arm/driver-arm.c: Include arm-native.h.
4130 (host_detect_local_cpu): Use auto-generated data tables.
4131 (vendors, arm_cpu_table): Delete. Move part information to ...
4132 * config/arm/arm-cpus.in: ... here.
4133 * config/arm/parsecpu.awk (gen_native): New function.
4134 (vendor, part): New CPU fields.
4135 (END): Add support for building the native CPU detection tables.
4136 * config/arm/t-arm (arm-native.h): Add build rule.
4137 (driver-arm.o): Add dependency on arm-native.h.
4139 2018-07-13 Richard Biener <rguenther@suse.de>
4142 * match.pd (addr1 - addr2): Allow either of the operand to
4145 2018-07-13 Tom de Vries <tdevries@suse.de>
4147 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4150 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
4152 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4153 arrays instead of numbered variables.
4155 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
4157 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4158 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4160 2018-07-13 Richard Biener <rguenther@suse.de>
4163 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4164 instead of get_context_die.
4166 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
4167 Richard Biener <rguenther@suse.de>
4170 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4171 that the loop latch destination where phi is defined.
4173 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
4175 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4176 (riscv_expand_epilogue): Add assertion to check interrupt mode.
4177 (riscv_set_current_function): Extract getting interrupt type to new
4179 (riscv_get_interrupt_type): New function.
4180 (riscv_merge_decl_attributes): New function, checking interrupt type is
4182 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4184 2018-07-12 Paul Koning <ni1d@arrl.net>
4186 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4189 2018-07-12 Paul Koning <ni1d@arrl.net>
4191 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4192 zero reference, add doloop_end instead.
4193 * doc/md.texi (decrement_and_branch_until_zero): Remove.
4194 (Looping patterns): Remove decrement_and_branch_until_zero. Add
4195 detail for doloop_end.
4197 2018-07-12 Martin Sebor <msebor@redhat.com>
4200 * attribs.c (decl_attributes): Reject conflicting attributes before
4201 calling attribute handlers.
4203 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4205 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4207 (gcc::dump_manager::get_dump_file_name): likewise.
4208 (dump_begin): Likewise.
4209 * dumpfile.h (dump_begin): Update prototype.
4210 (gcc::dump_manager::get_dump_file_name,
4211 gcc::dump_manager::get_dump_file_name): Update prototype.
4213 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4215 * internal-fn.h (vectorizable_internal_fn_p): New function.
4216 * tree-vect-slp.c (compatible_calls_p): Likewise.
4217 (vect_build_slp_tree_1): Remove nops argument. Handle calls
4218 to internal functions.
4219 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4221 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4223 * fold-const.h (inverse_conditions_p): Declare.
4224 * fold-const.c (inverse_conditions_p): New function.
4225 * match.pd: Use inverse_conditions_p. Add folds of view_converts
4226 that test the inverse condition of a conditional internal function.
4227 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4228 * internal-fn.c (internal_fn_mask_index): Handle conditional
4230 (vectorized_internal_fn_supported_p): New function.
4231 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4232 (any_pred_load_store): Replace with...
4233 (need_to_predicate): ...this new variable.
4234 (redundant_ssa_names): New variable.
4235 (ifcvt_can_use_mask_load_store): Move initial checks to...
4236 (ifcvt_can_predicate): ...this new function. Handle tree codes
4237 for which a conditional internal function exists.
4238 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4239 instead of ifcvt_can_use_mask_load_store. Update after variable
4241 (predicate_load_or_store): New function, split out from
4242 predicate_mem_writes.
4243 (check_redundant_cond_expr): New function.
4244 (value_available_p): Likewise.
4245 (predicate_rhs_code): Likewise.
4246 (predicate_mem_writes): Rename to...
4247 (predicate_statements): ...this. Use predicate_load_or_store
4248 and predicate_rhs_code.
4249 (combine_blocks, tree_if_conversion): Update after above name changes.
4250 (ifcvt_local_dce): Handle redundant_ssa_names.
4251 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4252 general conditional functions.
4253 * tree-vect-stmts.c (vectorizable_call): Likewise.
4255 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4256 Alan Hayward <alan.hayward@arm.com>
4257 David Sherwood <david.sherwood@arm.com>
4259 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4260 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4261 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4262 plus and minus and convert them into IFN_COND_FMA-based sequences.
4263 (convert_mult_to_fma): Handle conditional plus and minus.
4265 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4267 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4268 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4269 (cond_fnms_optab): New optabs.
4270 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4272 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4273 * internal-fn.h (get_conditional_internal_fn): Declare.
4274 (get_unconditional_internal_fn): Likewise.
4275 * internal-fn.c (cond_ternary_direct): New macro.
4276 (expand_cond_ternary_optab_fn): Likewise.
4277 (direct_cond_ternary_optab_supported_p): Likewise.
4278 (FOR_EACH_COND_FN_PAIR): Likewise.
4279 (get_conditional_internal_fn): New function.
4280 (get_unconditional_internal_fn): Likewise.
4281 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4282 (gimple_match_op::gimple_match_op): Add a new overload for 5
4284 (gimple_match_op::set_op): Likewise.
4285 (gimple_resimplify5): Declare.
4286 * genmatch.c (decision_tree::gen): Generate simplifications for
4288 * gimple-match-head.c (gimple_simplify): Define an overload for
4289 5 operands. Handle calls with 5 arguments in the top-level overload.
4290 (convert_conditional_op): Handle conversions from unconditional
4291 internal functions to conditional ones.
4292 (gimple_resimplify5): New function.
4293 (build_call_internal): Pass a fifth operand.
4294 (maybe_push_res_to_seq): Likewise.
4295 (try_conditional_simplification): Try converting conditional
4296 internal functions to unconditional internal functions.
4297 Handle 3-operand unconditional forms.
4298 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4299 Define ternary equivalents of the current rules for binary conditional
4301 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4303 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4304 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4305 (optab): Handle them.
4306 (SVE_COND_FP_TERNARY): New int iterator.
4307 (sve_fmla_op, sve_fmad_op): New int attributes.
4308 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4309 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4310 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4312 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
4314 * target.def (preferred_else_value): New target hook.
4315 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4316 * doc/tm.texi: Regenerate.
4317 * targhooks.h (default_preferred_else_value): Declare.
4318 * targhooks.c (default_preferred_else_value): New function.
4319 * internal-fn.h (conditional_internal_fn_code): Declare.
4320 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4321 (get_conditional_internal_fn): Use it.
4322 (conditional_internal_fn_code): New function.
4323 * gimple-match.h (gimple_match_cond): New struct.
4324 (gimple_match_op): Add a cond member function.
4325 (gimple_match_op::gimple_match_op): Update all forms to take a
4327 * genmatch.c (expr::gen_transform): Use the same condition as res_op
4328 for the suboperation, but don't specify a particular else_value.
4329 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4330 (visit_nary_op, visit_reference_op_load): Pass
4331 gimple_match_cond::UNCOND to the gimple_match_op constructor.
4332 * gimple-match-head.c: Include tree-eh.h
4333 (convert_conditional_op): New function.
4334 (maybe_resimplify_conditional_op): Likewise.
4335 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4336 (gimple_resimplify2): Likewise.
4337 (gimple_resimplify3): Likewise.
4338 (gimple_resimplify4): Likewise.
4339 (maybe_push_res_to_seq): Return null for conditional operations.
4340 (try_conditional_simplification): New function.
4341 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
4343 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4345 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4347 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4349 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
4351 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4353 (hash_tree): Do not hash DECL_FCONTEXT
4354 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4355 Do not stream DECL_FCONTEXT.
4356 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4357 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4359 2018-07-12 Richard Biener <rguenther@suse.de>
4362 * dwarf2out.c (gen_block_die): Only output blocks when they have
4363 at least one !DECL_IGNORED_P variable.
4365 2018-07-12 Richard Biener <rguenther@suse.de>
4368 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4369 Remove -mieee-fp handling.
4371 2018-07-12 Richard Biener <rguenther@suse.de>
4373 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4374 left-over from last patch.
4376 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4378 PR tree-optimization/86492
4379 * gimple-ssa-store-merging.c
4380 (imm_store_chain_info::coalesce_immediate_stores): Call
4381 check_no_overlap even for the merge_overlapping case. Formatting fix.
4383 2018-07-12 Richard Biener <rguenther@suse.de>
4386 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4387 move possibly trapping operations into the conditional.
4389 2018-07-12 Richard Biener <rguenther@suse.de>
4391 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4392 (vn_lookup_simplify_result): Remove recursion limit applied
4394 (vn_nary_build_or_lookup_1): Adjust.
4395 (try_to_simplify): Likewise.
4396 * gimple-match-head.c (gimple_resimplify1): Instead apply one
4398 (gimple_resimplify2): Likewise.
4399 (gimple_resimplify3): Likewise.
4400 (gimple_resimplify4): Likewise.
4402 2018-07-11 Jakub Jelinek <jakub@redhat.com>
4404 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4405 Use __mmask64 type instead of __mmask8 for __M argument.
4406 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4407 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4409 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4410 __mmask16 for __M argument.
4411 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4412 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4413 to __mmask16 instead of __mmask8.
4414 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4415 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4416 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4417 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4418 instead of __mmask16 for __U argument.
4419 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4420 __mmask16 instead of __mmask8 for __U argument.
4421 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4423 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4425 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4427 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4429 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4431 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4433 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4435 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4437 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4439 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4441 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4442 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4443 return type as well as __M argument type and all casts from __mmask8
4445 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4446 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4447 return type as well as __M argument type and all casts from __mmask8
4449 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4450 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4451 return type as well as __M argument type and all casts from __mmask8
4453 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4454 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4455 return type as well as __M argument type and all casts from __mmask8
4457 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4458 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4461 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
4463 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4464 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4467 2018-07-11 Paul Koning <ni1d@arrl.net>
4469 * doc/md.texi (define_subst): Document how multiple occurrences of
4470 the same argument in the replacement pattern are handled.
4472 2018-07-11 Paul Koning <ni1d@arrl.net>
4474 * doc/extend.texi (Common Variable Attributes): Move "mode" into
4476 (Common Type Attributes): Add "mode" attribute.
4478 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
4480 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4481 stream DECL_ORIGINAL_TYPE.
4482 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4483 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4484 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4485 Do not walk original type.
4486 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4488 (write_ts_decl_non_common_tree_pointers): Do not stream
4490 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4491 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4493 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4495 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4496 thread twice from the same starting edge.
4498 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
4500 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4501 * gimple.c (gimple_call_nonnull_result_p): ...here...
4502 (gimple_call_nonnull_arg): ...and here.
4503 * gimple.h (gimple_call_nonnull_result_p): New.
4504 (gimple_call_nonnull_arg): New.
4506 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
4508 * config/arm/arm-cpus.in: Move information from fpu field of each
4509 cpu definition to the isa field.
4510 * config/arm/parsecpu.awk (fpu): Delete match rule.
4511 (gen_comm_data): Don't add bits from the CPU's FPU entry.
4513 2018-07-11 Richard Biener <rguenther@suse.de>
4516 * dwarf2out.c (init_sections_and_labels): Use
4517 output_asm_line_debug_info consistently.
4518 (dwarf2out_early_finish): Likewise.
4519 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4522 2018-07-11 Richard Biener <rguenther@suse.de>
4524 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4525 Rework father_bb setting in a way to avoid propagating constants
4526 multiple times on a loop body.
4528 2018-07-10 Mark Wielaard <mark@klomp.org>
4531 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4533 2018-07-10 Richard Biener <rguenther@suse.de>
4535 * hash-map.h (hash_map::iterator::operator*): Return
4536 references to key and value.
4538 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4541 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4542 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4543 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4544 (gimplify_omp_for): For composite loops, move outer
4545 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4546 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
4547 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
4548 TREE_LIST for both the original class iterator and the "last" helper
4549 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
4550 loop, remember has_decl_expr from outer composite loops for the
4551 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4553 2018-07-09 Martin Sebor <msebor@redhat.com>
4557 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4558 accessing implicitly initialized array elements.
4559 * expr.c (string_constant): Handle string initializers of
4560 character arrays within aggregates.
4561 * gimple-fold.c (fold_array_ctor_reference): Add argument.
4562 Store element offset. As a special case, handle zero size.
4563 (fold_nonarray_ctor_reference): Same.
4564 (fold_ctor_reference): Add argument. Store subobject offset.
4565 * gimple-fold.h (fold_ctor_reference): Add argument.
4567 2018-07-09 Paul Koning <ni1d@arrl.net>
4569 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4570 (pdp11_insn_cost): New function.
4571 (pdp11_md_asm_adjust): New function.
4572 (TARGET_INVALID_WITHIN_DOLOOP): Define.
4573 (pdp11_rtx_costs): Update to match machine better.
4574 (output_addr_const_pdp11): Correct format mismatch warnings.
4575 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4576 * config/pdp11/pdp11.md: General change to add base_cost and/or
4577 length attributes for use by new pdp11_insn_cost function.
4578 (MIN_BRANCH): Correct definition.
4580 (doloop_end): Use standard pattern name for looping pattern.
4581 (doloop_end_nocc): New.
4582 (movsf): Add another constraint alternative.
4583 (zero_extendqihi2): Add constraint alternatives for not in place
4585 (zero_extendhisi2): Remove.
4586 (shift patterns): Add CC handling variants.
4590 (define_peephole2): New peephole to recognize mov that sets CC for
4593 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4595 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4596 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4599 2018-07-09 Jakub Jelinek <jakub@redhat.com>
4602 * real.c (real_nextafter): Return true if result is denormal.
4604 2018-07-09 Martin Liska <mliska@suse.cz>
4606 * common.opt: Add back wrongly removed attribute.
4608 2018-07-09 Richard Biener <rguenther@suse.de>
4611 * dwarf2out.c (gen_block_die): For an early generated DIE
4612 always output high/low PC attributes.
4614 2018-07-09 Tom de Vries <tdevries@suse.de>
4616 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4617 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4618 onto VAR_DECL with abstract origin.
4620 2018-07-07 Jim Wilson <jimw@sifive.com>
4622 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4624 2018-07-07 Tom de Vries <tdevries@suse.de>
4626 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4628 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
4630 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4632 (combine_bound): Use wide-int overflow calculation instead of
4634 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4636 * fold-const.c (int_const_binop_2): Same.
4637 (extract_muldiv_1): Same.
4638 (fold_div_compare): Same.
4639 (fold_abs_const): Same.
4641 * poly-int.h (add): Same.
4645 * predict.c (predict_iv_comparison): Same.
4646 * profile-count.c (slow_safe_scale_64bit): Same.
4647 * simplify-rtx.c (simplify_const_binary_operation): Same.
4648 * tree-chrec.c (tree_fold_binomial): Same.
4649 * tree-data-ref.c (split_constant_offset_1): Same.
4650 * tree-if-conv.c (idx_within_array_bound): Same.
4651 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4652 * tree-ssa-phiopt.c (minmax_replacement): Same.
4653 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4654 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4655 * vr-values.c (vr_values::adjust_range_with_scev): Same.
4656 * wide-int.cc (wi::add_large): Same.
4657 (wi::mul_internal): Same.
4658 (wi::sub_large): Same.
4659 (wi::divmod_internal): Same.
4660 * wide-int.h: Change overflow type to overflow_type for neg, add,
4661 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4662 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4663 mul_internal, divmod_internal.
4664 (overflow_type): New enum.
4665 (accumulate_overflow): New.
4667 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
4669 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4670 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4672 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4674 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4675 argument is checked for zero before entering loop, avoid checking again.
4677 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
4679 * gimplify.h (generic_expr_could_trap_p): Set as global function.
4680 * gimplify.h (generic_expr_could_trap_p): Likwise.
4681 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4683 2018-07-06 Jakub Jelinek <jakub@redhat.com>
4685 PR tree-optimization/86401
4686 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4687 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4688 (fold_bit_and_mask): ... here. New helper function for match.pd.
4689 * fold-const.h (fold_bit_and_mask): Declare.
4690 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4692 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4695 * target.def (translate_mode_attribute): New hook.
4696 * targhooks.h (default_translate_mode_attribute): Declare.
4697 * targhooks.c (default_translate_mode_attribute): New function.
4698 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4699 * doc/tm.texi: Regenerate.
4700 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4701 (rs6000_translate_mode_attribute): New function.
4703 2018-07-06 Paul Koning <ni1d@arrl.net>
4705 * doc/md.texi (define_split): Document DONE and FAIL.
4706 (define_peephole2): Ditto.
4708 2018-07-05 Jeff Law <law@redhat.com>
4710 PR tree-optimization/86010
4711 * tree-ssa-dse.c (compute_trims): More aggressively trim at
4712 both the head and tail of mem* and str* calls.
4714 2018-07-05 Jim Wilson <jimw@sifive.com>
4716 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4718 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
4720 * config/aarch64/aarch64-simd.md: correct flags text for
4721 MIN_EXPR replacement.
4723 2018-07-05 James Clarke <jrtc27@jrtc27.com>
4725 * configure: Regenerated.
4727 2018-07-05 Carl Love <cel@us.ibm.com>
4729 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4730 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4731 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4732 VSX_BUILTIN_DOUBLEL_V4SF.
4734 2018-07-05 Martin Sebor <msebor@redhat.com>
4737 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4738 than its domain to compute its the upper bound of a char array.
4740 2018-07-05 Nathan Sidwell <nathan@acm.org>
4742 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4743 * doc/cpp.texi: Update comment.
4744 * doc/tm.texi: Rebuilt.
4745 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4746 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4747 * doc/extend.texi (Backwards Compatibility): Clarify it is system
4748 headers affected by extern "C".
4749 * system.h: Poison NO_IMPLICIT_EXTERN_C.
4750 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4751 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4752 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4753 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4754 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4755 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4756 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4757 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4758 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4759 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4760 config/sparc/sp64-elf.h, config/spu/spu.h,
4761 config/stormy16/stormy16.h, config/v850/v850.h,
4762 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4763 define NO_IMPLICIT_EXTERN_C.
4764 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4766 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4769 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4770 instead of GET_MODE_SIZE when comparing Units.
4772 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4775 * rtlanal.c (set_noop_p): Constrain on mode change,
4776 include hard-reg-set.h
4778 2018-07-05 Tamar Christina <tamar.christina@arm.com>
4780 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4782 2018-07-05 Jakub Jelinek <jakub@redhat.com>
4785 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4788 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4790 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4792 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
4795 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4797 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4799 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
4802 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4804 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
4806 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4807 neg_*_op* variables.
4809 2018-07-04 Martin Liska <mliska@suse.cz>
4811 * tree-switch-conversion.c: Define
4812 max_ratio_for_speed and max_ratio_for_size constants.
4814 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4815 Martin Liska <mliska@suse.cz>
4820 * common.opt: Rename align options with 'str_' prefix.
4821 * common/config/i386/i386-common.c (set_malign_value): New
4823 (ix86_handle_option): Use it to set -falign-* options/
4824 * config/aarch64/aarch64-protos.h (struct tune_params): Change
4825 type from int to string.
4826 * config/aarch64/aarch64.c: Update default values from int
4828 * config/alpha/alpha.c (alpha_override_options_after_change):
4830 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4831 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4832 max skip conditionally.
4833 * config/i386/freebsd.h (SUBALIGN_LOG): New.
4834 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4835 max skip conditionally.
4836 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4837 max skip conditionally.
4838 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4839 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4840 max skip conditionally.
4841 * config/i386/i386.c (struct ptt): Change type from int to
4843 (ix86_default_align): Set default values.
4844 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4845 max skip conditionally.
4846 * config/i386/iamcu.h (SUBALIGN_LOG): New.
4847 (ASM_OUTPUT_MAX_SKIP_ALIGN):
4848 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4849 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4850 max skip conditionally.
4851 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4852 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4853 * config/i386/x86-64.h (SUBALIGN_LOG): New.
4854 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4855 max skip conditionally.
4856 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4857 * config/ia64/ia64.c (ia64_option_override): Set default values
4858 for alignment options.
4859 * config/m68k/m68k.c: Handle new str_align_* options.
4860 * config/mips/mips.c (mips_set_compression_mode): Change
4862 (mips_option_override): Set default values for options.
4863 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4865 * config/rs6000/rs6000.c (rs6000_option_override_internal):
4867 * config/rx/rx.c (rx_option_override): Likewise.
4868 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4869 (LABEL_ALIGN): Use align_labels_log.
4870 (LOOP_ALIGN): Use align_loops_align.
4871 * config/s390/s390.c (s390_asm_output_function_label): Use new
4873 * config/sh/sh.c (sh_override_options_after_change):
4874 Change type of constants.
4875 * config/spu/spu.c (spu_sched_init): Likewise.
4876 * config/sparc/sparc.c (sparc_option_override): Set default
4878 * config/visium/visium.c (visium_option_override): Likewise.
4879 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4880 emit p2align format with last argument if it's not needed.
4881 * doc/invoke.texi: Document extended format of -falign-*.
4882 * final.c: Use align_labels alignment.
4883 * flags.h (struct target_flag_state): Change type to use
4885 (struct align_flags_tuple): New.
4886 (struct align_flags): Likewise.
4887 (align_loops_log): Redefine macro to use new types.
4888 (align_loops_max_skip): Redefine macro to use new types.
4889 (align_jumps_log): Redefine macro to use new types.
4890 (align_jumps_max_skip): Redefine macro to use new types.
4891 (align_labels_log): Redefine macro to use new types.
4892 (align_labels_max_skip): Redefine macro to use new types.
4893 (align_functions_log): Redefine macro to use new types.
4894 (align_loops): Redefine macro to use new types.
4895 (align_jumps): Redefine macro to use new types.
4896 (align_labels): Redefine macro to use new types.
4897 (align_functions): Redefine macro to use new types.
4898 (align_functions_max_skip): Redefine macro to use new types.
4899 (align_loops_value): New macro.
4900 (align_jumps_value): New macro.
4901 (align_labels_value): New macro.
4902 (align_functions_value): New macro.
4903 * function.c (invoke_set_current_function_hook): Propagate
4904 alignment values from flags to global variables default in
4906 * ipa-icf.c (sem_function::equals_wpa): Use
4907 cl_optimization_option_eq instead of memcmp.
4908 * lto-streamer.h (cl_optimization_stream_out): Support streaming
4910 (cl_optimization_stream_in): Likewise.
4911 * optc-save-gen.awk: Support strings in cl_optimization.
4912 * opth-gen.awk: Likewise.
4913 * opts.c (finish_options): Remove error checking of invalid
4915 (MAX_CODE_ALIGN): Remove.
4916 (MAX_CODE_ALIGN_VALUE): Likewise.
4917 (parse_and_check_align_values): New function.
4918 (check_alignment_argument): Likewise.
4919 (common_handle_option): Use check_alignment_argument.
4920 * opts.h (parse_and_check_align_values): Declare.
4921 * toplev.c (init_alignments): Remove.
4922 (read_log_maxskip): New.
4923 (parse_N_M): Likewise.
4924 (parse_alignment_opts): Likewise.
4925 (backend_init_target): Remove usage of init_alignments.
4926 * toplev.h (parse_alignment_opts): Declare.
4927 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4929 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4930 * tree.c (cl_option_hasher::equal): New.
4931 * varasm.c: Use new global macros.
4933 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
4935 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4936 Use a simpler align directive also if MAXSKIP = ALIGN-1.
4937 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4938 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4939 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4940 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4941 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4942 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4943 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4944 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4945 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4946 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4947 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4949 2018-07-04 Martin Liska <mliska@suse.cz>
4950 Jonathan Wakely <jwakely@redhat.com>
4952 * coverage.c: Use correct type.
4953 * doc/invoke.texi: Language correction.
4955 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
4958 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4959 ENDBRANCH for non-tail call which may return via indirect branch.
4960 * doc/extend.texi: Document indirect_return attribute.
4962 2018-07-03 Martin Sebor <msebor@redhat.com>
4964 PR tree-optimization/86274
4965 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4967 (format_floating): Correct handling of infinities and NaNs.
4969 2018-07-03 Martin Sebor <msebor@redhat.com>
4971 * print-tree.c (print_real_cst): New function.
4972 (print_node_brief): Call it.
4973 (print_node): Ditto.
4975 2018-07-03 Jeff Law <law@redhat.com>
4977 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4978 into a single pattern.
4980 * config/h8300/h8300.md (ors code_iterator): New.
4981 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4982 a single pattern and single splitter.
4983 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4984 (iorqi3_1, xorqi3_1): Likewise.
4985 (iorqi3, xorqi3 expanders): Similarly.
4987 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4988 (movmd_internal) into a single pattern using the P mode iterator.
4989 (movmd splitters): Similarly.
4990 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4991 (movsd splitters): Similarly.
4993 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4994 ADDB, ADDW and ADDL into a single ADD attribute which selects the
4995 right table based on the size of the operand.
4996 * config/h8300/h8300.md (length_table): Corresponding changes. All
4997 references to "addb", "addw" and "addl" changed to "add".
4998 (btst patterns): Merge two variants into a single pattern.
4999 (tstqi, tsthi): Likewise.
5000 (addhi3_incdec, addsi3_incdec): Likewise.
5001 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
5002 (mulhi3, mulsi3): Likewise.
5003 (udivhi3, udivsi3): Likewise.
5004 (divhi3, divsi3): Likewise.
5005 (andorqi3, andorhi3, andorsi3): Likewise.
5007 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
5010 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
5011 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
5013 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5015 PR tree-optimization/85694
5016 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
5017 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
5019 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
5020 (<u>avg<mode>3_ceil): New patterns.
5022 2018-07-03 David Malcolm <dmalcolm@redhat.com>
5024 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
5025 scan-tree-dump directive.
5026 * gcc.dg/vect/slp-perm-2.c: Likewise.
5027 * gcc.dg/vect/slp-perm-3.c: Likewise.
5028 * gcc.dg/vect/slp-perm-5.c: Likewise.
5029 * gcc.dg/vect/slp-perm-6.c: Likewise.
5030 * gcc.dg/vect/slp-perm-7.c: Likewise.
5031 * gcc.dg/vect/slp-perm-8.c: Likewise.
5033 2018-07-03 Marek Polacek <polacek@redhat.com>
5036 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
5038 2018-07-03 Richard Biener <rguenther@suse.de>
5041 * tree-ssa-structalias.c (find_func_clobbers): Properly
5042 handle indirect calls.
5044 2018-07-03 Jeff Law <law@redhat.com>
5046 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
5047 (shifts): New code iterator.
5048 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
5049 expander. Fix HImode handling on H8/SX.
5050 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
5051 (subqi3, subhi3, subsi3 expanders): Likewise.
5052 (andqi3, andhi3, andsi3 expanders): Likewise.
5053 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
5054 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
5055 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
5056 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
5057 (zero_extendqihi2, zero_extendqisi2): Likewise.
5058 (extendqihi2, extendqisi2): Likewise.
5059 (rotlqi3, rotlhi3, rotlsi3): Likewise.
5060 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
5061 (rotlqi3_1, rotlhi3_1): Likewise.
5062 (logicalhi3_sn, logicalsi3_sn): Likewise.
5063 (logicalhi3, logicalsi3): Likewise.
5065 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5067 * tree-vect-patterns.c (vect_recog_rotate_pattern)
5068 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5069 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
5070 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
5071 type to append_pattern_def_seq instead of creating a stmt_vec_info
5073 (build_mask_conversion): Likewise. Remove vinfo argument.
5074 (vect_add_conversion_to_patterm): Likewise, renaming to...
5075 (vect_add_conversion_to_pattern): ...this.
5076 (vect_recog_mask_conversion_pattern): Update call to
5077 build_mask_conversion. Pass the vector type to
5078 append_pattern_def_seq here too.
5079 (vect_recog_gather_scatter_pattern): Update call to
5080 vect_add_conversion_to_pattern.
5082 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5084 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5085 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5086 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5087 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5088 STMT_VINFO_PATTERN_DEF_SEQ to null here.
5089 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5090 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5091 append_pattern_def_seq instead of new_pattern_def_seq.
5092 (vect_recog_divmod_pattern): Do both of the above.
5093 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5096 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5098 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5099 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5100 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5101 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5102 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5103 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5104 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5105 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5106 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5107 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5108 parameter with a single stmt_vec_info.
5109 (vect_recog_func_ptr): Likewise.
5110 (vect_recog_gather_scatter_pattern): Likewise, folding in...
5111 (vect_try_gather_scatter_pattern): ...this.
5112 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5113 the stmt_vec_info of the statement to be matched. Don't clear
5114 STMT_VINFO_RELATED_STMT.
5115 (vect_pattern_recog): Update call accordingly.
5117 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5119 PR tree-optimization/85694
5120 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5121 (uavgM3_ceil): Document new optabs.
5122 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5123 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5125 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5126 (savg_ceil_optab): New optabs.
5127 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5128 (vect_vect_recog_func_ptrs): Add it.
5129 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5130 constant directly from the associated lhs.
5132 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5134 * tree-vect-patterns.c (vect_split_statement): New function.
5135 (vect_convert_input): Use it to try to split an existing cast.
5137 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5139 * poly-int.h (print_hex): New function.
5140 * dumpfile.h (dump_dec, dump_hex): Declare.
5141 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5142 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5143 min_input_precision, operation_precision and operation_sign.
5144 * tree-vect-patterns.c (vect_get_range_info): New function.
5145 (vect_same_loop_or_bb_p, vect_single_imm_use)
5146 (vect_operation_fits_smaller_type): Delete.
5147 (vect_look_through_possible_promotion): Add an optional
5148 single_use_p parameter.
5149 (vect_recog_over_widening_pattern): Rewrite to use new
5150 stmt_vec_info infomration. Handle one operation at a time.
5151 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5152 (vect_truncatable_operation_p, vect_set_operation_type)
5153 (vect_set_min_input_precision): New functions.
5154 (vect_determine_min_output_precision_1): Likewise.
5155 (vect_determine_min_output_precision): Likewise.
5156 (vect_determine_precisions_from_range): Likewise.
5157 (vect_determine_precisions_from_users): Likewise.
5158 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5159 (vect_vect_recog_func_ptrs): Put over_widening first.
5161 (vect_pattern_recog): Call vect_determine_precisions.
5163 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
5165 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5166 statements that have been replaced by further pattern statements.
5167 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5169 2018-07-03 Richard Biener <rguenther@suse.de>
5171 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5172 always set *dt. Dump vectype in vectype overload.
5173 * dumpfile.h (dump_gimple_expr): New function.
5174 (dump_gimple_expr_loc): Likewise.
5175 * dumpfile.c (dump_gimple_expr): New function.
5176 (dump_gimple_expr_loc): Likewise.
5178 2018-07-02 Jeff Law <law@redhat.com>
5180 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5181 the H8/300, H8/300H and H8/S variants into a single pattern.
5182 (movhi_h8300, movqi_h8300hs): Similarly.
5183 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5184 (QHI mode iterator): New.
5186 * config/h8300/h8300.md: Remove trailing whitespace.
5188 2018-07-02 Jim Wilson <jimw@sifive.com>
5190 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5191 instead of emit_insn for interrupt returns.
5192 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5193 (riscv_sret, riscv_uret): Likewise.
5195 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5197 * pretty-print.c (selftest::test_pp_format): Move save and restore
5198 of quotes to class auto_fix_quotes, and add an instance.
5199 * selftest.c: Include "intl.h".
5200 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5201 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5202 * selftest.h (selftest::auto_fix_quotes): New class.
5204 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
5206 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5207 (aarch64_sve_prepare_conditional_op): Remove.
5208 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5209 Allow aarch64_simd_reg_or_zero as select operand; remove
5210 the aarch64_sve_prepare_conditional_op call.
5211 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5212 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5213 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5214 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5215 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5216 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5217 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5218 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5219 and a splitters to match all of the *_any patterns.
5220 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5222 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5223 (SVE_COND_FP_BINARY_REV): Remove.
5224 (sve_int_op_rev, sve_fp_op_rev): New.
5225 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5226 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5227 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5228 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5229 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5230 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5231 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5232 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5233 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5235 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5236 Remove match_dup 1 from the inner unspec.
5237 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5239 * config/aarch64/aarch64.md (movprfx): New attr.
5240 (length): Default movprfx to 8.
5241 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5242 (*madd<SVE_I>, *msub<SVE_I): Likewise.
5243 (*<su>mul<SVE_I>3_highpart): Likewise.
5244 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5245 (*v<ASHIFT><SVE_I>3): Likewise.
5246 (*<su><MAXMIN><SVE_I>3): Likewise.
5247 (*<su><MAXMIN><SVE_F>3): Likewise.
5248 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5249 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5250 (*div<SVE_F>4): Likewise.
5252 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
5254 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5257 2018-07-02 Richard Biener <rguenther@suse.de>
5259 PR tree-optimization/86363
5260 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5261 memset argument refers to a non-variable address.
5263 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5265 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5266 {PLUS,MINUS}_EXPR code to...
5267 (adjust_symbolic_bound): ...here,
5268 (combine_bound): ...here,
5269 (set_value_range_with_overflow): ...and here.
5271 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
5273 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5275 (extract_range_from_abs_expr): ...here.
5277 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
5279 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5280 -fno-omit-frame-pointer when not optimizing.
5282 2018-07-02 Martin Liska <mliska@suse.cz>
5285 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5286 (propagate_nothrow): Likewise.
5288 2018-07-02 Martin Liska <mliska@suse.cz>
5291 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5293 2018-07-02 David Malcolm <dmalcolm@redhat.com>
5295 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5296 function in r262149, changing "loc" param from source_location to
5297 const dump_location_t &.
5298 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5299 declaration, as above.
5301 2018-07-01 Paul Koning <ni1d@arrl.net>
5303 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5304 -munit-asm, -mgnu-asm, -mdec-asm.
5305 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5306 (pdp11_output_labelref): New.
5307 (pdp11_output_def): New.
5308 (pdp11_output_addr_vec_elt): New.
5309 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
5310 %# and %@ format codes.
5311 (pdp11_option_override): New.
5312 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5313 (pdp11_output_ident): New.
5314 (pdp11_asm_named_section): New.
5315 (pdp11_asm_init_sections): New.
5316 (pdp11_file_start): New.
5317 (pdp11_file_end): New.
5318 (output_ascii): Use .ascii/.asciz for -mdec-asm.
5319 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
5320 %o, like %c but octal.
5321 (pdp11_option_override): New.
5322 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5324 (DATA_SECTION_ASM_OP): Ditto.
5325 (READONLY_DATA_SECTION_ASM_OP): New.
5326 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5327 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5328 (ASM_OUTPUT_LABELREF): Ditto.
5329 (ASM_OUTPUT_DEF): Ditto.
5330 (ASM_OUTPUT_EXTERNAL): New.
5331 (ASM_OUTPUT_SOURCE_FILENAME): New.
5332 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5333 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5334 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
5335 %# and %@ format codes.
5336 * config/pdp11/pdp11.opt (mgnu-asm): New.
5337 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5338 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5339 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5341 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
5343 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5344 dereferencing path[] beyond its length.
5346 (debug_all_paths): New.
5347 (rewire_first_differing_edge): New.
5348 (adjust_paths_after_duplication): New.
5349 (duplicate_thread_path): Call adjust_paths_after_duplication.
5351 (thread_through_all_blocks): Add new argument to
5352 duplicate_thread_path.
5354 2018-06-30 Jim Wilson <jimw@sifive.com>
5356 * config/riscv/predicates.md (p2m1_shift_operand): New.
5357 (high_mask_shift_operand): New.
5358 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5359 pattern using p2m1_shift_operand.
5360 (lshsi3_zero_extend_3+2): New combiner pattern using
5361 high_mask_shift_operand.
5363 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5365 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5367 (vect_recog_rotate_pattern): ...here.
5368 (vect_convert_input): Try to insert casts of invariants in the
5370 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5371 preheader to be empty.
5373 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5375 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5376 vector type. If given, install it in the new statement's
5378 (vect_element_precision): New function.
5379 (vect_unpromoted_value): New struct.
5380 (vect_unpromoted_value::vect_unpromoted_value): New function.
5381 (vect_unpromoted_value::set_op): Likewise.
5382 (vect_look_through_possible_promotion): Likewise.
5383 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5384 (vect_widened_op_tree, vect_convert_input): Likewise.
5385 (vect_convert_inputs, vect_convert_output): Likewise.
5386 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5387 to handle the optional cast of the multiplication result and
5388 vect_widened_op_tree to detect the widened multiplication itself.
5389 Do not require the input and output of promotion casts to have
5390 the same sign, but base the signedness of the operation on the
5391 input rather than the result. If the pattern includes two
5392 promotions, check that those promotions have the same sign.
5393 Do not restrict the MULT_EXPR handling to a double-width result;
5394 handle quadruple-width results and wider. Use vect_convert_inputs
5395 to convert the inputs to the common type.
5396 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
5397 to handle the optional cast of the ABS result. Also allow a sign
5398 change or a sign extension between the ABS and MINUS.
5399 Use vect_widened_op_tree to detect the widened subtraction and use
5400 vect_convert_inputs to convert the inputs to the common type.
5401 (vect_handle_widen_op_by_const): Delete.
5402 (vect_recog_widen_op_pattern): New function.
5403 (vect_recog_widen_mult_pattern): Use it.
5404 (vect_recog_widen_shift_pattern): Likewise.
5405 (vect_recog_widen_sum_pattern): Use
5406 vect_look_through_possible_promotion to handle the promoted
5409 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5411 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5412 the containing gimple_seq *.
5413 * gimple-iterator.h (gsi_for_stmt): Declare it.
5414 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5415 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5416 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5417 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5418 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5420 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5422 (vect_mark_pattern_stmts): ...here. Handle cases in which the
5423 statement being replaced is part of an existing pattern
5424 definition sequence, inserting the new pattern statements before
5426 (vect_pattern_recog_1): Don't return a bool. If the statement
5427 is already part of a pattern, instead apply pattern matching
5428 to the pattern definition statements. Don't clear the
5429 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5430 (vect_pattern_recog): Don't break after the first match;
5431 continue processing the pattern definition statements instead.
5432 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5434 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5436 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5437 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5438 (vect_recog_widen_sum_pattern): Use it.
5440 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5442 * tree-vect-loop.c (vectorizable_reduction): Assert that the
5443 phi is not a pattern statement and has not been replaced by
5444 a pattern statement.
5445 * tree-vect-patterns.c (type_conversion_p): Don't check
5446 STMT_VINFO_IN_PATTERN_P.
5447 (vect_recog_vector_vector_shift_pattern): Likewise.
5448 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5449 the pattern statement rather than the original statement; check
5450 directly for a WIDEN_MULT_EXPR here.
5451 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5452 vect_is_simple_use to return the pattern statement rather
5453 than the original statement; use is_pattern_stmt_p to check
5454 for such a pattern statement.
5455 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5456 to return the pattern statement rather than the original statement;
5457 don't do the same transformation here.
5458 (vect_is_simple_use): If the defining statement has been replaced
5459 by a pattern statement, return the pattern statement instead.
5460 Remove the corresponding (local) transformation from the vectype
5463 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
5465 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5466 end and default to null.
5467 * tree-vect-loop.c (vect_create_epilog_for_reduction)
5468 (vectorizable_reduction): Update calls accordingly, dropping the
5469 gimple ** argument if the passed-back statement isn't needed.
5470 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5471 (vect_recog_rotate_pattern): Likewise.
5472 (vect_recog_mask_conversion_pattern): Likewise.
5473 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5474 (vect_mask_constant_operand_p): Likewise.
5475 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5476 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5477 (get_group_load_store_type, get_load_store_type): Likewise.
5478 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5479 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5480 (vectorizable_conversion, vectorizable_assignment): Likewise.
5481 (vectorizable_shift, vectorizable_operation): Likewise.
5482 (vectorizable_store, vect_is_simple_cond): Likewise.
5483 (vectorizable_condition, vectorizable_comparison): Likewise.
5484 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5485 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5486 and move it to the end. Cope with null def_stmt_outs.
5488 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5490 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5492 2018-06-29 Jeff Law <law@redhat.com>
5494 * config/v850/v850.c (v850_legitimate_address_p): Handle large
5495 displacements for TARGET_V850E2V3 and newer.
5496 (TARGET_LRA_P): Remove. Defaults to LRA now.
5497 * config/v850/v850.md (sign23byte_load): Remove.
5498 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5499 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5501 2018-06-29 Martin Liska <mliska@suse.cz>
5504 * coverage.c (coverage_init): Mangle full path name.
5505 * doc/invoke.texi: Document the change.
5506 * gcov-io.c (mangle_path): New.
5507 * gcov-io.h (mangle_path): Likewise.
5508 * gcov.c (mangle_name): Use mangle_path for path mangling.
5510 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5512 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5513 if starting source register is not even.
5515 2018-06-29 Martin Liska <mliska@suse.cz>
5517 PR tree-optimization/86263
5518 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5519 Make edge redirection.
5521 2018-06-29 David Malcolm <dmalcolm@redhat.com>
5523 * dumpfile.c (dump_loc): Add indentation based on scope depth.
5524 (dump_scope_depth): New variable.
5525 (get_dump_scope_depth): New function.
5526 (dump_begin_scope): New function.
5527 (dump_end_scope): New function.
5528 * dumpfile.h (get_dump_scope_depth): New declaration.
5529 (dump_begin_scope): New declaration.
5530 (dump_end_scope): New declaration.
5531 (class auto_dump_scope): New class.
5532 (AUTO_DUMP_SCOPE): New macro.
5533 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5536 2018-06-29 Richard Biener <rguenther@suse.de>
5538 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5539 compute_all_dependences succeeds.
5540 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5541 exceed --param loop-max-datarefs-for-datadeps.
5543 2018-06-29 Jakub Jelinek <jakub@redhat.com>
5545 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5547 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
5550 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5551 alternative 0 in preferred_for_speed attribute.
5553 2018-06-28 Paul Koning <ni1d@arrl.net>
5555 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5556 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5557 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5558 * config/pdp11/pdp11.md: Correct "length" attribute calculation
5559 for shift insn patterns.
5561 2018-06-28 David Malcolm <dmalcolm@redhat.com>
5563 * cgraph.c (cgraph_node::get_body): Replace assignments to
5564 "dump_file" with calls to set_dump_file.
5565 * dumpfile.c (alt_dump_file): Make static, and group with...
5566 (alt_flags): ...this definition.
5567 (dumps_are_enabled): New variable.
5568 (refresh_dumps_are_enabled): New function.
5569 (set_dump_file): New function.
5570 (set_alt_dump_file): New function.
5571 (gcc::dump_manager::dump_start): Replace assignments to
5572 "dump_file" and "alt_dump_file" with calls to set_dump_file and
5574 (gcc::dump_manager::dump_finish): Likewise.
5575 * dumpfile.h (alt_dump_file): Delete decl.
5576 (dumps_are_enabled): New variable decl.
5577 (set_dump_file): New function decl.
5578 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5580 * tree-nested.c (lower_nested_functions): Replace assignments to
5581 "dump_file" with calls to set_dump_file.
5583 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5585 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5586 goto_locus of each outgoing edge of each basic block.
5588 2018-06-28 Richard Biener <rguenther@suse.de>
5590 * dwarf2out.c (decl_scope_table): Remove.
5591 (push_decl_scope): Likewise.
5592 (pop_decl_scope): Likewise.
5593 (gen_type_die_for_member): Do not call push/pop_decl_scope.
5594 (gen_struct_or_union_type_die): Likewise.
5595 (gen_tagged_type_die): Likewise.
5596 (dwarf2out_init): Do not initialize decl_scope_table.
5597 (dwarf2out_c_finalize): Do not free it.
5599 2018-06-28 Richard Biener <rguenther@suse.de>
5601 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5602 deciding whether to not re-use a DIE.
5604 2018-06-28 Richard Biener <rguenther@suse.de>
5606 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5607 DW_AT_abstract_origin attribute.
5609 2018-06-28 Martin Liska <mliska@suse.cz>
5611 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5612 Use newly introduced constants.
5613 * tree-switch-conversion.h (struct jump_table_cluster):
5614 Define max_ratio_for_size and max_ratio_for_speed.
5616 2018-06-28 Martin Liska <mliska@suse.cz>
5618 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5619 Add new checking assert to catch invalid state.
5620 (jump_table_cluster::can_be_handled): Handle single case
5622 (jump_table_cluster::is_beneficial): Bail out for such case.
5623 (bit_test_cluster::find_bit_tests):
5624 Add new checking assert to catch invalid state.
5625 (bit_test_cluster::can_be_handled): Handle single case
5627 (bit_test_cluster::is_beneficial): Bail out for such case.
5628 (switch_decision_tree::analyze_switch_statement):
5631 2018-06-28 Martin Liska <mliska@suse.cz>
5633 * common.opt: Introduce -completion option.
5634 * gcc.c (driver_handle_option): Handle it.
5635 (driver::main): Print completions if completion
5637 * opt-suggestions.c (option_proposer::get_completions):
5639 (option_proposer::suggest_completion): Likewise.
5640 (option_proposer::find_param_completions): Likewise.
5641 (verify_autocompletions): Likewise.
5642 (test_completion_valid_options): Likewise.
5643 (test_completion_valid_params): Likewise.
5644 (in_completion_p): Likewise.
5645 (empty_completion_p): Likewise.
5646 (test_completion_partial_match): Likewise.
5647 (test_completion_garbage): Likewise.
5648 (opt_proposer_c_tests): Likewise.
5649 * opt-suggestions.h: Declare new functions.
5650 * opts.c (common_handle_option): Handle OPT__completion_.
5651 * selftest-run-tests.c (selftest::run_tests): Add
5652 opt_proposer_c_tests.
5653 * selftest.c (assert_str_startswith): New.
5654 * selftest.h (assert_str_startswith): Likewise.
5655 (opt_proposer_c_tests): New.
5656 (ASSERT_STR_STARTSWITH): Likewise.
5658 2018-06-28 Martin Liska <mliska@suse.cz>
5660 * Makefile.in: Add opt-suggestions.o.
5661 * gcc-main.c: Include opt-suggestions.h.
5662 * gcc.c (driver::driver): Likewise.
5663 (driver::~driver): Remove m_option_suggestions.
5664 (driver::build_option_suggestions): Moved to option_proposer.
5665 (driver::suggest_option): Likewise.
5666 (driver::handle_unrecognized_options): Use option_proposer.
5667 * gcc.h (class driver): Add new memver m_option_proposer.
5668 * opt-suggestions.c: New file.
5669 * opt-suggestions.h: New file.
5671 2018-06-28 Martin Liska <mliska@suse.cz>
5673 * vec.h (class auto_string_vec): New (moved from auto_argvec).
5674 (auto_string_vec::~auto_string_vec): Likewise.
5676 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
5678 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5679 prevent_decl_creation_for_types fields up and add reset_location field.
5680 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5681 statement if id->reset_location is true.
5682 (copy_edges_for_bb): Do not set goto_locus on the new edges if
5683 id->reset_location is true.
5684 (copy_phis_for_bb): Force input_location on the arguments if
5685 id->reset_location is true.
5686 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5687 is set on the function to be inlined.
5689 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
5691 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5693 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
5695 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5696 registers for Pmode.
5697 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5698 hard registers for the clobbered pseudo.
5700 2018-06-27 Paul Koning <ni1d@arrl.net>
5702 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5703 mutually exclusive options.
5704 * config/pdp11/constraints.md (h): New constraint.
5705 (O): Update definition to match shift code generation.
5706 (D): New constraint.
5707 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5709 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5711 (output_jump): Change arguments.
5712 (pdp11_fixed_cc_regs): New function.
5713 (pdp11_cc_mode): Ditto.
5714 (pdp11_expand_shift): Ditto.
5715 (pdp11_assemble_shift): Ditto.
5716 (pdp11_small_shift): Ditto.
5717 (pdp11_branch_cost): Remove.
5718 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5720 (pdp11_register_move_cost): Update for CC registers.
5721 (pdp11_rtx_costs): Add case for LSHIFTRT.
5722 (pdp11_output_jump): Add CCNZ mode conditional branches.
5723 (notice_update_cc_on_set): Remove.
5724 (pdp11_cc_mode): New function.
5725 (simple_memory_operand): Correct pre/post decrement case.
5726 (no_side_effect_operand): New function.
5727 (pdp11_regno_reg_class): Add CC_REGS class.
5728 (pdp11_fixed_cc_regs): New function.
5729 (pdp11_small_shift): New function.
5730 (pdp11_expand_shift): New function to expand shift insns.
5731 (pdp11_assemble_shift): New function to output shifts.
5732 (pdp11_branch_cost): Remove.
5733 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5734 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5735 (WCHAR_TYPE): Ditto.
5736 (PTRDIFF_TYPE): Ditto.
5737 (ADJUST_INSN_LENGTH): New macro.
5738 (FIXED_REGISTERS): Add CC registers.
5739 (CALL_USED_REGISTERS): Ditto.
5741 (REG_CLASS_NAMES): Ditto.
5742 (REG_CLASS_CONTENTS): Ditto.
5743 (SELECT_CC_MODE): Use new function.
5744 (TARGET_FLAGS_REGNUM): New macro.
5745 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5746 (cc0_reg_rtx): Remove.
5747 (CC_STATUS_MDEP): Remove.
5748 (CC_STATUS_MDEFP_INIT): Remove.
5749 (CC_IN_FPU): Remove.
5750 (NOTICE_UPDATE_CC): Remove.
5751 (REGISTER_NAMES): Add CC registers.
5752 (BRANCH_COST): Change to constant 1.
5753 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5755 * config/pdp11/pdp11.opt (mbcopy): Remove.
5756 (mbcopy-builtin): Remove.
5757 (mbranch-cheap): Remove.
5758 (mbranch-expensive): Remove.
5759 * config/pdp11/predicates.md (expand_shift_operand): Update to
5760 match shift code generation.
5761 (ccnz_operator): New predicate.
5762 * doc/invoke.texi (PDP-11 Options): Remove deleted options
5763 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5764 Remove non-existent option -mabshi, -mno-abshi. Document mutually
5766 * doc/md.texi (PDP-11): Document new D and h constraints. Update
5767 description of O constraint.
5769 2018-06-27 Jeff Law <law@redhat.com>
5770 Austin Law <austinklaw@gmail.com>
5772 * config/v850/v850.md (addsi3_set_flags): New pattern.
5773 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5774 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5775 (zero_extendhisi2_v850_set_flags): Likewise.
5776 (zero_extendqisi2_v850_set_flags): Likewise.
5777 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5778 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5779 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5781 * config/v850/v850-protos.h (notice_update_cc): Remove.
5782 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5783 (v850_print_operand): Handle 'D' and "d".
5784 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5785 Add handling of arithmetic/logical operations compared against zero.
5786 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5787 Do not look at v850_compare_op, instead get mode from last argument.
5788 (v850_gen_compare): Remove
5789 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5790 after reload for prologue insns.
5791 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5793 (construct_save_jarl): Likewise.
5794 (TARGET_FLAGS_REGNUM): Define.
5795 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5796 (NOTICE_UPDATE_CC): Remove.
5797 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5798 than cc0. Conditionalize on reload_completed.
5799 (cmpsi_insn, setfcc_insn): Likewise.
5800 (tst1 splitter): Turn into define_and_split which sets the flags
5802 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5803 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5804 (cstoresf4, cstoredf4): Clobber the flags.
5805 (cmpsi, cmpsf, cmpdf): Remove expanders.
5806 (setf_insn): Remove pattern.
5807 (addsi3): Turn into define_and_split which clobbers the flags after
5808 reload and a suitable pattern (addsi3_clobber_flags) for use after
5810 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5811 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5812 (ashrsi3, ashrsi3_v850e2): Likewise.
5813 (bins): Clobber the flags.
5814 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5815 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5816 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5817 (call_value_internal_short, call_value_internal_long): Likewise.
5818 (callt_save_interrupt, callt_return_interrupt): Likewise.
5819 (save_interrupt, return_interrupt): Likewise.
5820 (callt_save_all_interrupt, save_all_interrupt): Likewise.
5821 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5822 (restore_all_interrupt, _restore_all_interrupt): Likewise.
5823 (All FP comparisons): Only allow after reload has completed.
5825 (divh, divhu): Tweak output template.
5826 (branch_z_normal, branch_z_invert): Remove
5827 (branch_nz_normal, branch_nz_invert): Likewise.
5828 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5830 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5831 * config/v850/v850.c (notice_update_cc): Remove.
5832 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
5833 (CC_NO_CARRY): Likewise.
5834 (NOTICE_UPDATE_CC): Define to nothing.
5835 * config/v850/v850.md: Remove block comment on cc0 handling
5836 Remove "cc" attribute from all patterns. Remove cc_status handling
5837 from all patterns. Minor formatting fixes.
5839 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5841 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5842 (cortex-a76.cortex-a55): Likewise.
5843 * config/aarch64/aarch64-tune.md: Regenerate.
5844 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5845 cortex-a76.cortex-a55.
5847 2018-06-27 Jeff Law <law@redhat.com>
5849 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5850 (MULTILIB_DIRNAMES): Similarly.
5852 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
5854 * gimple.h (gimple_return_retbnd): Delete.
5855 (gimple_return_set_retbnd): Likewise.
5856 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5857 gimple_return_set_retbnd.
5858 * gimple-pretty-print.c (dump_gimple_return): Remove call to
5859 gimple_return_retbnd and adjust.
5860 * tree-inline.h (struct copy_body_data): Remove retbnd field.
5861 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5862 Explicitly return NULL in a couple more cases. Move assertion
5863 on debug statements and remove unreachable code.
5864 (reset_debug_binding): Do not test id->retbnd.
5865 (expand_call_inline): Do not set it.
5867 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
5869 * configure.ac: Add --disable-gcov option.
5870 * configure: Regenerate.
5871 * Makefile.in: Honour @enable_gcov@.
5872 * doc/install.texi: Document --disable-gcov.
5874 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5876 * config/arm/arm-cpus.in (cortex-a76): New entry.
5877 (cortex-a76.cortex-a55): Likewise.
5878 * config/arm/arm-tables.opt: Regenerate.
5879 * config/arm/arm-tune.md: Likewise.
5880 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5881 * doc/invoke.texi (ARM Options): Document cortex-a76 and
5882 cortex-a76.cortex-a55.
5884 2018-06-27 Tamar Christina <tamar.christina@arm.com>
5887 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5889 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
5891 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5893 (EPILOGUE_USES): Likewise.
5895 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
5897 * tree-inline.c (remap_location): New function extracted from...
5898 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
5899 (copy_phis_for_bb): ...here. Call remap_location.
5900 (copy_cfg_body): Adjust call to copy_edges_for_bb.
5902 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
5904 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5905 unaligned vsx for 16B memset.
5907 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
5910 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5911 ieee128_float_type_node to long_double_type_node unless
5912 TARGET_LONG_DOUBLE_128 is set.
5914 2018-06-26 David Malcolm <dmalcolm@redhat.com>
5916 * cfgloop.c (get_loop_location): Convert return type from
5917 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5918 by implicit construction from rtx_insn *, and using
5919 dump_user_location_t::from_function_decl for the fallback case.
5920 * cfgloop.h (get_loop_location): Convert return type from
5921 location_t to dump_user_location_t.
5922 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5923 dump_printf_loc to pass in a dump_location_t rather than a
5924 location_t, via the gimple stmt.
5925 * coverage.c (get_coverage_counts): Update calls to
5926 dump_printf_loc to pass in dump_location_t rather than a
5928 * doc/optinfo.texi (Dump types): Convert example of
5929 dump_printf_loc from taking "locus" to taking "insn". Update
5930 description of the "_loc" calls to cover dump_location_t.
5931 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5933 (dump_user_location_t::dump_user_location_t): New constructors,
5934 from gimple *stmt and rtx_insn *.
5935 (dump_user_location_t::from_function_decl): New function.
5936 (dump_loc): Make static.
5937 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5938 const dump_location_t &.
5939 (dump_generic_expr_loc): Delete.
5940 (dump_printf_loc): Convert param "loc" from location_t to
5941 const dump_location_t &.
5942 (selftest::test_impl_location): New function.
5943 (selftest::dumpfile_c_tests): New function.
5944 * dumpfile.h: Include "profile-count.h".
5945 (class dump_user_location_t): New class.
5946 (struct dump_impl_location_t): New struct.
5947 (class dump_location_t): New class.
5948 (dump_printf_loc): Convert 2nd param from source_location to
5949 const dump_location_t &.
5950 (dump_generic_expr_loc): Delete.
5951 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5952 const dump_location_t &.
5953 * gimple-fold.c (fold_gimple_assign): Update call to
5954 dump_printf_loc to pass in a dump_location_t rather than a
5955 location_t, via the gimple stmt.
5956 (gimple_fold_call): Likewise.
5957 * gimple-loop-interchange.cc
5958 (loop_cand::analyze_iloop_reduction_var): Update for change to
5959 check_reduction_path.
5960 (tree_loop_interchange::interchange): Update for change to
5962 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5963 change in return-type of find_loop_location.
5964 (graphite_regenerate_ast_isl): Likewise.
5965 * graphite-optimize-isl.c (optimize_isl): Likewise.
5966 * graphite.c (graphite_transform_loops): Likewise.
5967 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5968 pass in a dump_location_t rather than a location_t, via the
5970 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5971 * ipa.c (walk_polymorphic_call_targets): Likewise.
5972 * loop-unroll.c (report_unroll): Convert "locus" param from
5973 location_t to dump_location_t.
5974 (decide_unrolling): Update for change to get_loop_location's
5976 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5977 location_t to dump_user_location_t.
5978 (grid_find_single_omp_among_assignments_1): Updates calls to
5979 dump_printf_loc to pass in a dump_location_t rather than a
5980 location_t, via the gimple stmt.
5981 (grid_parallel_clauses_gridifiable): Convert "tloc" from
5982 location_t to dump_location_t. Updates calls to dump_printf_loc
5983 to pass in a dump_location_t rather than a location_t, via the
5985 (grid_inner_loop_gridifiable_p): Likewise.
5986 (grid_dist_follows_simple_pattern): Likewise.
5987 (grid_gfor_follows_tiling_pattern): Likewise.
5988 (grid_target_follows_gridifiable_pattern): Likewise.
5989 (grid_attempt_target_gridification): Convert initialization
5990 of local "grid" from memset to zero-initialization; FIXME: does
5991 this require C++11? Update call to dump_printf_loc to pass in a
5992 optinfo_location rather than a location_t, via the gimple stmt.
5993 * profile.c (read_profile_edge_counts): Updates call to
5994 dump_printf_loc to pass in a dump_location_t rather than a
5996 (compute_branch_probabilities): Likewise.
5997 * selftest-run-tests.c (selftest::run_tests): Call
5999 * selftest.h (dumpfile_c_tests): New decl.
6000 * tree-loop-distribution.c (pass_loop_distribution::execute):
6001 Update for change in return type of find_loop_location.
6002 * tree-parloops.c (parallelize_loops): Likewise.
6003 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
6004 "locus" from location_t to dump_user_location_t.
6005 (canonicalize_loop_induction_variables): Likewise.
6006 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
6007 for change in return type of find_loop_location.
6008 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
6009 to dump_printf_loc to pass in a dump_location_t rather than a
6010 location_t, via the stmt.
6011 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
6013 * tree-vect-loop-manip.c (find_loop_location): Convert return
6014 type from source_location to dump_user_location_t.
6015 (vect_do_peeling): Update for above change.
6016 (vect_loop_versioning): Update for change in type of
6018 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
6019 from location_t to dump_user_location_t.
6020 (vect_estimate_min_profitable_iters): Update for change in type
6022 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
6023 location_t to dump_location_t.
6024 (vect_slp_bb): Update for change in type of vect_location.
6025 * tree-vectorizer.c (vect_location): Convert from source_location
6026 to dump_user_location_t.
6027 (try_vectorize_loop_1): Update for change in vect_location's type.
6028 (vectorize_loops): Likewise.
6029 (increase_alignment): Likewise.
6030 * tree-vectorizer.h (vect_location): Convert from source_location
6031 to dump_user_location_t.
6032 (find_loop_location): Convert return type from source_location to
6033 dump_user_location_t.
6034 (check_reduction_path): Convert 1st param from location_t to
6035 dump_user_location_t.
6036 * value-prof.c (check_counter): Update call to dump_printf_loc to
6037 pass in a dump_user_location_t rather than a location_t; update
6038 call to error_at for change in type of "locus".
6039 (check_ic_target): Update call to dump_printf_loc to
6040 pass in a dump_user_location_t rather than a location_t, via the
6043 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
6045 * config/s390/s390.h (enum processor_flags): Do not use
6046 default tune parameter when -march was specified.
6048 2018-06-26 Jakub Jelinek <jakub@redhat.com>
6051 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
6052 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
6055 2018-06-26 Richard Biener <rguenther@suse.de>
6057 PR tree-optimization/86287
6059 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
6060 (vect_analyze_loop): Initialize n_stmts.
6062 2018-06-26 Richard Biener <rguenther@suse.de>
6065 * fold-const.c (fold_convertible_p): Pointer extension
6068 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
6071 * dwarf2out.c (loc_list_has_views): Adjust comments.
6072 (dw_loc_list): Split single cross-partition range with
6075 2018-06-25 Jeff Law <law@redhat.com>
6077 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
6078 on -mbig-switch by default.
6080 * config/v850/predicates.md (const_float_1_operand): Fix match_code
6082 (const_float_0_operand): Remove unused predicate.
6083 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6084 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6085 (recipsf2): New expander. Original pattern now called
6087 (recipdf2, recipdf2_insn): Similarly.
6088 (rsqrtsf2, rsqrtsf2_insn): Similarly
6089 (rsqrtdf2, rsqrtdf2_insn): Similarly
6091 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
6093 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6094 Simplify logic for FreeBSD (twice).
6096 2018-06-25 Martin Sebor <msebor@redhat.com>
6098 PR tree-optimization/86204
6099 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6100 a strnlen result if it's less than the length of the string.
6102 2018-06-25 Martin Sebor <msebor@redhat.com>
6104 PR tree-optimization/85700
6105 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6106 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6107 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6109 2018-06-25 Martin Sebor <msebor@redhat.com>
6111 * doc/extend.texi (Zero-length arrays): Update and clarify.
6113 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
6115 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6116 added IEEE/IBM long double multilib support on PowerPC little
6117 endian Linux systems.
6118 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6119 (MULTILIB_DEFAULTS): Likewise.
6120 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6122 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6123 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6124 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6126 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
6129 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6130 (REORDER_45): Likewise.
6132 2018-06-25 Jeff Law <law@redhat.com>
6134 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6135 dividend to 32 bits. Adjust length.
6136 (udivmodhi4): Cleanup output template. Fix length.
6138 2018-06-25 Carl Love <cel@us.ibm.com>
6140 * config/rs6000/vsx.md: Change word selector to prefered location.
6142 2018-06-25 Richard Biener <rguenther@suse.de>
6144 PR tree-optimization/86304
6145 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6146 epilogue-if-converted loops as well.
6148 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
6150 * lto-section-out.c (lto_begin_section): Do not print section
6151 name for noaddr and unnumbered dumps.
6153 2018-06-25 Richard Biener <rguenther@suse.de>
6155 * tree-vectorizer.h (struct vec_info_shared): New structure
6156 with parts split out from struct vec_info and loop_nest from
6157 struct _loop_vec_info.
6158 (struct vec_info): Adjust accordingly.
6159 (struct _loop_vec_info): Likewise.
6160 (LOOP_VINFO_LOOP_NEST): Adjust.
6161 (LOOP_VINFO_DATAREFS): Likewise.
6162 (LOOP_VINFO_DDRS): Likewise.
6163 (struct _bb_vec_info): Likewise.
6164 (BB_VINFO_DATAREFS): Likewise.
6165 (BB_VINFO_DDRS): Likewise.
6166 (struct _stmt_vec_info): Add dr_aux member.
6167 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6168 (DR_MISALIGNMENT_UNINITIALIZED): New.
6169 (set_dr_misalignment): Adjust.
6170 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6171 (vect_analyze_loop): Adjust prototype.
6172 (vect_analyze_loop_form): Likewise.
6173 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6174 Compute dependences lazily.
6175 (vect_record_base_alignments): Use shared datarefs/ddrs.
6176 (vect_verify_datarefs_alignment): Likewise.
6177 (vect_analyze_data_refs_alignment): Likewise.
6178 (vect_analyze_data_ref_accesses): Likewise.
6179 (vect_analyze_data_refs): Likewise.
6180 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6181 constructor parameter for shared part.
6182 (vect_analyze_loop_form): Pass in shared part and adjust.
6183 (vect_analyze_loop_2): Pass in storage for the number of
6184 stmts. Move loop nest finding to the caller. Compute
6186 (vect_analyze_loop): Pass in shared part.
6187 (vect_transform_loop): Verify shared datarefs are unchanged.
6188 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6189 constructor parameter for shared part.
6190 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6191 (vect_slp_bb): Verify shared datarefs are unchanged before
6193 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6195 (new_stmt_vec_info): Initialize DR_AUX misalignment to
6196 DR_MISALIGNMENT_UNINITIALIZED.
6197 * tree-vectorizer.c (vec_info::vec_info): Add constructor
6198 parameter for shared part.
6199 (vec_info::~vec_info): Adjust.
6200 (vec_info_shared::vec_info_shared): New.
6201 (vec_info_shared::~vec_info_shared): Likewise.
6202 (vec_info_shared::save_datarefs): Likewise.
6203 (vec_info_shared::check_datarefs): Likewise.
6204 (try_vectorize_loop_1): Construct shared part live for analyses
6205 of a single loop for multiple vector sizes.
6206 * tree-parloops.c (gather_scalar_reductions): Adjust.
6208 2018-06-25 Richard Biener <rguenther@suse.de>
6210 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6211 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6212 (vect_analyze_data_refs): Remove similar code from here and
6213 simplify accordingly.
6215 2018-06-25 Richard Biener <rguenther@suse.de>
6217 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6218 for reverse storage order accesses rather than asserting
6219 they cannot happen here.
6221 2018-06-25 Tom de Vries <tdevries@suse.de>
6224 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6225 Use data16 instead of .byte for insn prefix.
6227 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
6230 * parser.c (make_char_string_pack): Pass this literal chars
6231 through cpp_interpret_string.
6232 (cp_parser_userdef_numeric_literal): Check the result of
6233 make_char_string_pack.
6235 2018-06-24 Maya Rashish <coypu@sdf.org>
6237 * ginclude/stddef.h: Simplify conditions around avoiding
6238 re-definition of __size_t.
6240 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6242 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6243 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6245 2018-06-22 Maya Rashish <coypu@sdf.org>
6247 * doc/invoke.texi (mno-fancy-math-387): Update for changes
6248 made to OpenBSD and NetBSD through the years.
6250 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6252 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6253 behavior of vec_pack (vector double, vector double) to match
6254 behavior of vec_float2 (vector double, vector double).
6256 2018-06-22 Olivier Hainque <hainque@adacore.com>
6258 * gimplify.c (gimplify_function_tree): Prevent creation
6259 of a trampoline for the address of the current function
6260 passed to entry/exit instrumentation hooks.
6262 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
6265 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6268 2018-06-22 Martin Liska <mliska@suse.cz>
6270 PR tree-optimization/86263
6271 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6272 Bail out if is_enabled is false.
6273 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6275 (jump_table_cluster::is_enabled): New function.
6277 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6279 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6280 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6281 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6282 (lto_input_ts_binfo_tree_pointers): Likewise.
6283 * tree-streamer-out.c (streamer_write_tree_bitfields,
6284 write_ts_binfo_tree_pointers): Likewise.
6285 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6287 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
6289 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6291 2018-06-22 Martin Liska <mliska@suse.cz>
6293 * symbol-summary.h (get): Make it pure and inline move
6294 functionality from ::get function.
6295 (get): Remove and inline into ::get and ::get_create.
6296 (get_create): Move code from ::get function.
6298 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6301 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6302 -x assembler-with-cpp.
6304 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6306 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6307 _FILE_OFFSET_BITS=64 for C++.
6309 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
6311 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6312 conversion insn that shows up when pr85657-3.c is compiled using
6313 IEEE 128-bit long double.
6314 (neg<mode>2_internal): Use the correct mode to check whether the
6315 mode is IBM extended.
6316 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6317 multiply and divide external functions from being created more
6320 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6322 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6324 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
6325 the edge can be forwarded.
6326 (cfg_layout_merge_blocks): Likewise.
6328 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6330 * except.c (finish_eh_generation): Commit edge insertions only after
6331 the EH edges have been redirected from post-landing to landing pads.
6333 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6335 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6336 create_tmp_var_for to create the FRAME decl.
6337 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6339 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
6341 * tree-inline.c (copy_edges_for_bb): Minor tweak.
6342 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6343 debug statement when resetting its value.
6344 (expand_call_inline): Copy the locus of the call onto the assignment
6345 of the return value, if any. Use local variable in more cases.
6347 2018-06-21 Martin Liska <mliska@suse.cz>
6349 * ipa-pure-const.c (propagate_nothrow): Use
6350 funct_state_summaries->get.
6351 (dump_malloc_lattice): Likewise.
6352 (propagate_malloc): Likewise.
6354 2018-06-21 Richard Biener <rguenther@suse.de>
6356 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6357 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6358 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6360 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6361 BLOCK_ABSTRACT_ORIGIN unconditionally.
6363 2018-06-21 David Malcolm <dmalcolm@redhat.com>
6365 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6367 * ipa-reference.c (ipa_reference_c_finalize): Delete
6368 ipa_ref_opt_sum_summaries and set it to NULL.
6370 2018-06-21 Tom de Vries <tdevries@suse.de>
6372 PR tree-optimization/85859
6373 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6374 test with comment from bb_no_side_effects_p.
6376 2018-06-21 Richard Biener <rguenther@suse.de>
6378 PR tree-optimization/86232
6379 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6380 max for constant niter.
6382 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6384 * config/aarch64/aarch64-simd.md
6385 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6387 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
6389 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6390 Make opernads of the unspec commutative.
6392 2018-06-21 Richard Biener <rguenther@suse.de>
6394 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6395 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6396 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6397 (vect_analyze_data_ref_dependence): Re-order checks to deal with
6399 (vect_record_base_alignments): Do not record base alignment
6400 for gathers or scatters.
6401 (vect_compute_data_ref_alignment): Drop return value that is always
6402 true. Bail out early for gathers or scatters.
6403 (vect_enhance_data_refs_alignment): Bail out early for gathers
6405 (vect_find_same_alignment_drs): Likewise.
6406 (vect_analyze_data_refs_alignment): Remove dead code.
6407 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6408 (vect_analyze_data_refs): For possible gathers or scatters do
6409 not create an alternate DR, just check their possible validity
6410 and mark them. Adjust DECL_NONALIASED handling to not rely
6412 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6413 update inits of gathers or scatters.
6414 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6415 Also copy gather/scatter flag to pattern vinfo.
6417 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
6419 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6420 behavior of vec_packsu (vector unsigned long long, vector unsigned
6421 long long) to match behavior of vec_packs with same signature.
6423 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
6424 Thomas Schwinge <thomas@codesourcery.com>
6425 Cesar Philippidis <cesar@codesourcery.com>
6427 * gimplify.c (gimplify_scan_omp_clauses): Add support for
6428 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6429 (gimplify_adjust_omp_clauses): Likewise.
6430 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6431 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6432 (gimplify_omp_target_update): Update handling of acc update and
6434 * omp-low.c (install_var_field): Remove unused parameter
6435 base_pointers_restrict.
6436 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6437 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6439 (omp_target_base_pointers_restrict_p): Delete.
6440 (scan_omp_target): Update call to scan_sharing_clauses.
6441 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6443 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6444 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6445 (convert_local_omp_clauses): Likewise.
6446 * tree-pretty-print.c (dump_omp_clause): Likewise.
6447 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
6449 (omp_clause_code_name): Likewise.
6451 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6454 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6457 PR tree-optimization/86231
6458 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
6459 anti-range don't overwrite *vr0min before using it to compute *vr0max.
6461 2018-06-20 Tom de Vries <tdevries@suse.de>
6463 PR tree-optimization/86097
6464 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6465 iv type if signedness of iv type is not the same as that of *nit.
6467 2018-06-20 Jakub Jelinek <jakub@redhat.com>
6469 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
6470 EDGE_EH edges, verify they are all EDGE_EH.
6472 2018-06-20 Maya Rashish <coypu@sdf.org>
6474 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6476 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6478 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6479 * config/aarch64/aarch64.c (xgene1_tunings): Add
6480 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6481 (aarch64_mode_valid_for_sched_fusion_p):
6482 Allow 16-byte modes.
6483 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6484 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6486 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6488 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6489 * config/aarch64/iterators.md (VQ2): New mode iterator.
6491 2018-06-20 Martin Liska <mliska@suse.cz>
6493 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6494 Change default ratio from 10 to 8.
6496 2018-06-20 Martin Liska <mliska@suse.cz>
6498 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6500 (bit_test_cluster::find_bit_tests): Likewise.
6501 (switch_decision_tree::analyze_switch_statement): Find clusters.
6502 * tree-switch-conversion.h (struct jump_table_cluster): Document
6505 2018-06-20 Martin Liska <mliska@suse.cz>
6507 * tree-switch-conversion.c (switch_conversion::collect):
6508 Record m_uniq property.
6509 (switch_conversion::expand): Bail out for special conditions.
6510 (group_cluster::~group_cluster): New.
6511 (group_cluster::group_cluster): Likewise.
6512 (group_cluster::dump): Likewise.
6513 (jump_table_cluster::emit): New.
6514 (switch_decision_tree::fix_phi_operands_for_edges): New.
6515 (struct case_node): Remove struct.
6516 (jump_table_cluster::can_be_handled): New.
6517 (case_values_threshold): Moved to header.
6518 (reset_out_edges_aux): Likewise.
6519 (jump_table_cluster::is_beneficial): New.
6520 (bit_test_cluster::can_be_handled): Likewise.
6521 (add_case_node): Remove.
6522 (bit_test_cluster::is_beneficial): New.
6523 (case_bit_test::cmp): New.
6524 (bit_test_cluster::emit): New.
6525 (expand_switch_as_decision_tree_p): Remove.
6526 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6527 (fix_phi_operands_for_edge): Likewise.
6528 (switch_decision_tree::analyze_switch_statement): New.
6529 (compute_cases_per_edge): Move ...
6530 (switch_decision_tree::compute_cases_per_edge): ... here.
6531 (try_switch_expansion): Likewise.
6532 (switch_decision_tree::try_switch_expansion): Likewise.
6533 (record_phi_operand_mapping): Likewise.
6534 (switch_decision_tree::record_phi_operand_mapping): Likewise.
6535 (emit_case_decision_tree): Likewise.
6536 (switch_decision_tree::emit): Likewise.
6537 (balance_case_nodes): Likewise.
6538 (switch_decision_tree::balance_case_nodes): Likewise.
6539 (dump_case_nodes): Likewise.
6540 (switch_decision_tree::dump_case_nodes): Likewise.
6541 (emit_jump): Likewise.
6542 (switch_decision_tree::emit_jump): Likewise.
6543 (emit_cmp_and_jump_insns): Likewise.
6544 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6545 (emit_case_nodes): Likewise.
6546 (switch_decision_tree::emit_case_nodes): Likewise.
6547 (conditional_probability): Remove.
6548 * tree-switch-conversion.h (enum cluster_type): New.
6550 (struct cluster): Likewise.
6551 (cluster::cluster): Likewise.
6552 (struct simple_cluster): Likewise.
6553 (simple_cluster::simple_cluster): Likewise.
6554 (struct group_cluster): Likewise.
6555 (struct jump_table_cluster): Likewise.
6556 (struct bit_test_cluster): Likewise.
6557 (struct min_cluster_item): Likewise.
6558 (struct case_tree_node): Likewise.
6559 (case_tree_node::case_tree_node): Likewise.
6560 (jump_table_cluster::case_values_threshold): Likewise.
6561 (struct case_bit_test): Likewise.
6562 (struct switch_decision_tree): Likewise.
6563 (struct switch_conversion): Likewise.
6564 (switch_decision_tree::reset_out_edges_aux): Likewise.
6566 2018-06-20 Martin Liska <mliska@suse.cz>
6568 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6569 (hoist_edge_and_branch_if_true): Likewise.
6570 (expand_switch_using_bit_tests_p): Likewise.
6571 (struct case_bit_test): Likewise.
6572 (case_bit_test_cmp): Likewise.
6573 (emit_case_bit_tests): Likewise.
6574 (switch_conversion::switch_conversion): New class.
6575 (struct switch_conv_info): Remove old struct.
6576 (collect_switch_conv_info): More to ...
6577 (switch_conversion::collect): ... this.
6578 (check_range): Likewise.
6579 (switch_conversion::check_range): Likewise.
6580 (check_all_empty_except_final): Likewise.
6581 (switch_conversion::check_all_empty_except_final): Likewise.
6582 (check_final_bb): Likewise.
6583 (switch_conversion::check_final_bb): Likewise.
6584 (create_temp_arrays): Likewise.
6585 (switch_conversion::create_temp_arrays): Likewise.
6586 (free_temp_arrays): Likewise.
6587 (gather_default_values): Likewise.
6588 (switch_conversion::gather_default_values): Likewise.
6589 (build_constructors): Likewise.
6590 (switch_conversion::build_constructors): Likewise.
6591 (constructor_contains_same_values_p): Likewise.
6592 (switch_conversion::contains_same_values_p): Likewise.
6593 (array_value_type): Likewise.
6594 (switch_conversion::array_value_type): Likewise.
6595 (build_one_array): Likewise.
6596 (switch_conversion::build_one_array): Likewise.
6597 (build_arrays): Likewise.
6598 (switch_conversion::build_arrays): Likewise.
6599 (gen_def_assigns): Likewise.
6600 (switch_conversion::gen_def_assigns): Likewise.
6601 (prune_bbs): Likewise.
6602 (switch_conversion::prune_bbs): Likewise.
6603 (fix_phi_nodes): Likewise.
6604 (switch_conversion::fix_phi_nodes): Likewise.
6605 (gen_inbound_check): Likewise.
6606 (switch_conversion::gen_inbound_check): Likewise.
6607 (process_switch): Use the newly created class.
6608 (switch_conversion::expand): New.
6609 (switch_conversion::~switch_conversion): New.
6610 * tree-switch-conversion.h: New file.
6612 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6614 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6615 tree-vect-patterns.c.
6616 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6617 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
6618 (vect_recog_sad_pattern): Likewise.
6619 (vect_recog_widen_sum_pattern): Likewise.
6620 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
6621 (vect_recog_widen_shift_pattern): Remove the type_in argument.
6622 (vect_recog_rotate_pattern): Likewise.
6623 (vect_recog_mult_pattern): Likewise.
6624 (vect_recog_vector_vector_shift_pattern): Likewise.
6625 (vect_recog_divmod_pattern): Likewise.
6626 (vect_recog_mixed_size_cond_pattern): Likewise.
6627 (vect_recog_bool_pattern): Likewise.
6628 (vect_recog_mask_conversion_pattern): Likewise.
6629 (vect_try_gather_scatter_pattern): Likewise.
6630 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
6631 (vect_recog_over_widening_pattern): Likewise.
6632 (vect_recog_gather_scatter_pattern): Likewise.
6633 (vect_recog_func_ptr): Move from tree-vectorizer.h
6634 (vect_vect_recog_func_ptrs): Move further down the file.
6635 (vect_recog_func): Likewise. Remove the third argument.
6636 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6637 (vect_pattern_recog_1): Expect the pattern function to do any
6638 necessary target tests. Also expect it to provide a vector type.
6639 Remove the type_in handling.
6641 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6643 * tree-vect-patterns.c (vect_pattern_detected): New function.
6644 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6645 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6646 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6647 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6648 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6649 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6650 (vect_recog_mask_conversion_pattern)
6651 (vect_try_gather_scatter_pattern): Likewise.
6653 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6655 * tree-vect-patterns.c (vect_get_internal_def): New function.
6656 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6657 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6658 (search_type_for_mask_1): Use it.
6660 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6662 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6663 redundant WIDEN_SUM_EXPR handling.
6664 (vect_recog_sad_pattern): Likewise.
6666 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6668 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6669 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6670 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6671 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6672 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6674 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6676 * tree-vect-stmts.c (vectorizable_call): Make sure that we
6677 use the stmt_vec_info of the original bb statement for the
6678 new zero assignment, even if the call is part of a pattern.
6680 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6682 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6683 that the sequence is attached to the original statement rather
6684 than the pattern statement.
6685 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6686 PATTERN_DEF_SEQ from the original statement rather than
6687 the main pattern statement.
6688 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6689 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6690 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6692 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
6694 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6695 definition statements before the early exit for statements that aren't
6697 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6699 (vect_transform_loop): ...here. Process pattern definition
6700 statements without first checking whether the main pattern
6701 statement is live or relevant.
6703 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6705 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6706 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6708 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
6710 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6711 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6712 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6713 (expand_block_compare): Change select_block_compare_mode call.
6714 (expand_strncmp_align_check): Use new functions, fix comment.
6715 (emit_final_str_compare_gpr): New function.
6716 (expand_strn_compare): Refactor and clean up code.
6717 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6719 2018-06-19 Tony Reix <tony.reix@atos.com>
6720 Damien Bergamini <damien.bergamini@atos.com>
6721 David Edelsohn <dje.gcc@gmail.com>
6723 * collect2.c (static_obj): New variable.
6724 (static_libs): New variable.
6725 (is_in_list): Uncomment declaration.
6726 (main): Track AIX libraries linked statically.
6727 (is_in_list): Uncomment definition.
6728 (scan_prog_file): Don't add AIX shared libraries initializer
6729 to constructor list if linking statically.
6731 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
6733 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6735 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6737 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
6739 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6742 2018-06-19 Martin Liska <mliska@suse.cz>
6744 * config/i386/i386.c (ix86_can_inline_p): Do not use
6745 ipa_fn_summaries::get_create.
6746 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6748 (devirtualization_time_bonus): Likewise.
6749 (ipcp_propagate_stage): Likewise.
6750 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6751 (edge_set_predicate): Likewise.
6752 (evaluate_conditions_for_known_args): Likewise.
6753 (evaluate_properties_for_edge): Likewise.
6754 (ipa_call_summary::reset): Tranform to ...
6755 (ipa_call_summary::~ipa_call_summary): ... this.
6756 (ipa_fn_summary::reset): Transform to ...
6757 (ipa_fn_summary::~ipa_fn_summary): ... this.
6758 (ipa_fn_summary_t::remove): Rename to ...
6759 (ipa_fn_summary_t::remove_callees): ... this.
6760 (ipa_fn_summary_t::duplicate): Use placement new
6761 instead of memory copy.
6762 (ipa_call_summary_t::duplicate): Likewise.
6763 (ipa_call_summary_t::remove): Remove.
6764 (dump_ipa_call_summary): Change get_create to get.
6765 (ipa_dump_fn_summary): Dump only when summary exists.
6766 (analyze_function_body): Use symbol_summary::get instead
6768 (compute_fn_summary): Likewise.
6769 (estimate_edge_devirt_benefit): Likewise.
6770 (estimate_edge_size_and_time): Likewise.
6771 (inline_update_callee_summaries): Likewise.
6772 (remap_edge_change_prob): Likewise.
6773 (remap_edge_summaries): Likewise.
6774 (ipa_merge_fn_summary_after_inlining): Likewise.
6775 (write_ipa_call_summary): Likewise.
6776 (ipa_fn_summary_write): Likewise.
6777 (ipa_free_fn_summary): Likewise.
6778 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6779 (struct ipa_call_summary): Likewise.
6780 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6782 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6783 (estimate_size_after_inlining): Likewise.
6784 (estimate_growth): Likewise.
6785 (growth_likely_positive): Likewise.
6786 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6787 (inline_call): Likewise.
6788 * ipa-inline.c (caller_growth_limits): Likewise.
6789 (can_inline_edge_p): Likewise.
6790 (can_inline_edge_by_limits_p): Likewise.
6791 (compute_uninlined_call_time): Likewise.
6792 (compute_inlined_call_time): Likewise.
6793 (want_inline_small_function_p): Likewise.
6794 (edge_badness): Likewise.
6795 (update_caller_keys): Likewise.
6796 (update_callee_keys): Likewise.
6797 (inline_small_functions): Likewise.
6798 (inline_to_all_callers_1): Likewise.
6799 (dump_overall_stats): Likewise.
6800 (early_inline_small_functions): Likewise.
6801 (early_inliner): Likewise.
6802 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6803 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6804 * ipa-pure-const.c (malloc_candidate_p): Likewise.
6805 * ipa-split.c (execute_split_functions): Likewise.
6806 * symbol-summary.h: Likewise.
6807 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6809 2018-06-19 Richard Biener <rguenther@suse.de>
6811 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6812 (vectorize_loops): ... here. Fix dbgcnt handling.
6813 (try_vectorize_loop): Wrap try_vectorize_loop_1.
6815 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
6818 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6819 ieee128 argument takes up only one (vector) register, not two (floating
6822 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
6824 * gimplify.c (gimplify_init_constructor): Really never clear for an
6825 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6827 2018-06-19 Richard Biener <rguenther@suse.de>
6829 PR tree-optimization/86179
6830 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6831 after failed recognition.
6833 2018-06-18 Martin Sebor <msebor@redhat.com>
6836 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6837 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6838 Handle integer subtraction.
6839 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6840 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6842 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6844 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6845 param from rtx to rtx_insn *.
6846 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6848 (frv_ifcvt_modify_insn): Likwise.
6849 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6850 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
6851 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6852 as_a <rtx_insn *> cast to local "unprotected_region" once
6853 it's been established that it's not NULL or pc_rtx.
6854 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6855 param "sethi" from rtx to rtx_insn *.
6856 (nds32_group_float_insns): Likewise for param "insn".
6857 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6859 (vax_output_int_subtract): Likewise.
6860 * config/vax/vax.c (vax_output_int_add): Likewise for param
6862 (vax_output_int_subtract): Likewise.
6863 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6864 (emit_pattern_after): Likewise for param "after".
6865 (emit_insn_after): Likewise.
6866 (emit_jump_insn_after): Likewise.
6867 (emit_call_insn_after): Likewise.
6868 (emit_debug_insn_after): Likewise.
6869 (emit_pattern_before): Likewise for param "before".
6870 (emit_insn_before): Likewise.
6871 (emit_jump_insn_before): Likewise.
6872 * final.c (get_insn_template): Likewise for param "insn", removing
6874 * output.h (get_insn_template): Likewise for 2nd param.
6875 * rtl.h (emit_insn_before): Likewise.
6876 (emit_jump_insn_before): Likewise.
6877 (emit_debug_insn_before_noloc): Likewise.
6878 (emit_insn_after): Likewise.
6879 (emit_jump_insn_after): Likewise.
6880 (emit_call_insn_after): Likewise.
6881 (emit_debug_insn_after): Likewise.
6882 (set_insn_deleted): Likewise for param.
6884 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
6887 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6888 floating point modes, so that IFmode is numerically greater than
6889 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6890 to declare the ordering. This prevents IFmode from being
6891 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6892 machine. Include rs6000-modes.h to share the fractional values
6893 between genmodes* and the rest of the compiler.
6897 * config/rs6000/rs6000-modes.h: New file.
6898 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6899 meaning of rs6000_long_double_size so that 126..128 selects an
6900 appropriate 128-bit floating point type.
6901 (rs6000_option_override_internal): Likewise.
6902 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6903 (TARGET_LONG_DOUBLE_128): Change the meaning of
6904 rs6000_long_double_size so that 126..128 selects an appropriate
6905 128-bit floating point type.
6906 (LONG_DOUBLE_TYPE_SIZE): Update comment.
6907 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6908 source and destination to match the standard usage.
6909 (truncifkf2): Likewise.
6910 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6911 ISA 2.07 to use an explicit clobber, instead of passing in a
6913 (copysign<mode>3_soft): Likewise.
6915 2018-06-18 David Malcolm <dmalcolm@redhat.com>
6917 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6918 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6919 (vect_slp_analyze_instance_dependence): Likewise.
6920 (vect_enhance_data_refs_alignment): Likewise.
6921 (vect_analyze_data_refs_alignment): Likewise.
6922 (vect_slp_analyze_and_verify_instance_alignment
6923 (vect_analyze_data_ref_accesses): Likewise.
6924 (vect_prune_runtime_alias_test_list): Likewise.
6925 (vect_analyze_data_refs): Likewise.
6926 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6927 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6928 (vect_analyze_scalar_cycles_1): Likewise.
6929 (vect_get_loop_niters): Likewise.
6930 (vect_analyze_loop_form_1): Likewise.
6931 (vect_update_vf_for_slp): Likewise.
6932 (vect_analyze_loop_operations): Likewise.
6933 (vect_analyze_loop): Likewise.
6934 (vectorizable_induction): Likewise.
6935 (vect_transform_loop): Likewise.
6936 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6937 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6938 (vect_make_slp_decision): Likewise.
6939 (vect_detect_hybrid_slp): Likewise.
6940 (vect_slp_analyze_operations): Likewise.
6941 (vect_slp_bb): Likewise.
6942 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6943 (vectorizable_bswap): Likewise.
6944 (vectorizable_call): Likewise.
6945 (vectorizable_simd_clone_call): Likewise.
6946 (vectorizable_conversion): Likewise.
6947 (vectorizable_assignment): Likewise.
6948 (vectorizable_shift): Likewise.
6949 (vectorizable_operation): Likewise.
6950 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6952 2018-06-18 Martin Sebor <msebor@redhat.com>
6954 PR tree-optimization/81384
6955 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6956 * builtins.c (expand_builtin_strnlen): New function.
6957 (expand_builtin): Call it.
6958 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6959 * builtins.def (BUILT_IN_STRNLEN): New.
6960 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6961 Warn for bounds in excess of maximum object size.
6962 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6963 single-value ranges. Handle strnlen.
6964 (handle_builtin_strlen): Handle strnlen.
6965 (strlen_check_and_optimize_stmt): Same.
6966 * doc/extend.texi (Other Builtins): Document strnlen.
6968 2018-06-18 Maya Rashish <coypu@sdf.org>
6970 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6971 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6972 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6974 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6976 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6978 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6980 * tree.c (escaped_string::escape): Replace cast to char * by
6981 const_cast<char *> (unescaped).
6983 2018-06-18 Nick Clifton <nickc@redhat.com>
6986 * tree.c (escaped_string): New class. Converts an unescaped
6987 string into its escaped equivalent.
6988 (warn_deprecated_use): Use the new class to convert the
6989 deprecation message, if present.
6990 (test_escaped_strings): New self test.
6991 (test_c_tests): Add test_escaped_strings.
6992 * doc/extend.texi (deprecated): Add a note that the
6993 deprecation message is affected by the -fmessage-length
6994 option, and that control characters will be escaped.
6995 (#pragma GCC error): Document this pragma.
6996 (#pragma GCC warning): Likewise.
6997 * doc/invoke.texi (-fmessage-length): Document this option's
6998 effect on the #warning and #error preprocessor directives and
6999 the deprecated attribute.
7001 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
7003 * tree.c (decl_value_expr_lookup): Revert latest change.
7004 (decl_value_expr_insert): Likewise.
7006 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
7008 * gimplify.c (nonlocal_vlas): Delete.
7009 (nonlocal_vla_vars): Likewise.
7010 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
7012 (gimplify_body): Do not create and destroy nonlocal_vlas.
7013 * tree-nested.c: Include diagnostic.h.
7014 (use_pointer_in_frame): Tweak.
7015 (lookup_field_for_decl): Add assertion and declare the transformation.
7016 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
7017 internal error when the reference is in a wrong context. Do not
7018 create a debug decl by default.
7019 (note_nonlocal_block_vlas): Delete.
7020 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
7021 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
7022 create a debug decl by default.
7023 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
7024 call is in a wrong context.
7025 (fixup_vla_decls): New function.
7026 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
7027 debug variables were created.
7028 * tree.c (decl_value_expr_lookup): Add checking assertion.
7029 (decl_value_expr_insert): Likewise.
7031 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7034 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
7035 * tree-scalar-evolution.c (interpret_expr): Likewise.
7036 (expression_expensive_p): Likewise.
7037 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
7038 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
7039 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
7040 (ssa_defined_by_minus_one_stmt_p): New.
7042 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
7045 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
7046 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
7047 * dojump.c (do_jump): Likewise.
7048 * expr.c (expand_expr_real_2): Check operand type's sign.
7049 * fold-const.c (const_unop): Handle ABSU_EXPR.
7050 (fold_abs_const): Likewise.
7051 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
7052 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
7053 (strip_sign_op_1): Likesise.
7054 * match.pd: Add new pattern to generate ABSU_EXPR.
7055 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
7056 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
7057 * tree-eh.c (operation_could_trap_helper_p): Likewise.
7058 * tree-inline.c (estimate_operator_cost): Likewise.
7059 * tree-pretty-print.c (dump_generic_node): Likewise.
7060 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
7061 * tree.def (ABSU_EXPR): New.
7063 2018-06-16 Jakub Jelinek <jakub@redhat.com>
7066 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
7067 documented as preserved for backward compatibility only.
7068 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
7070 PR rtl-optimization/86108
7071 * bb-reorder.c (create_forwarder_block): Renamed to ...
7072 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
7073 jump from new landing pad to the second part.
7074 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
7077 2018-06-15 Jakub Jelinek <jakub@redhat.com>
7080 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7081 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7082 Only call store_expr for halves if the mode is the same.
7085 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7086 Fix up comment formatting.
7088 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
7090 * typed-splay-tree.h (typed_splay_tree::remove): New function.
7091 (typed_splay_tree::closure,
7092 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7093 (typed_splay_tree::typed_splay_tree,
7094 typed_splay_tree::operator =): Declared private.
7095 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7096 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7097 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7098 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7099 typed_splay_tree::splay_tree_splay,
7100 typed_splay_tree::splay_tree_foreach_helper,
7101 typed_splay_tree::splay_tree_insert,
7102 typed_splay_tree::splay_tree_remove,
7103 typed_splay_tree::splay_tree_lookup,
7104 typed_splay_tree::splay_tree_predecessor,
7105 typed_splay_tree::splay_tree_successor,
7106 typed_splay_tree::splay_tree_min,
7107 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7108 (typed_splay_tree::root, typed_splay_tree::comp,
7109 typed_splay_tree::delete_key,
7110 typed_splay_tree::delete_value): New data members.
7111 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7112 typed_splay_tree::remove.
7114 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
7116 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7117 -mginv and -mno-ginv to the assembler.
7118 * config/mips/mips.opt (-mcrc): New option.
7120 * doc/invoke.text (-mcrc): Document.
7123 2018-06-15 Nick Clifton <nickc@redhat.com>
7126 * tree.c (escaped_string): New class. Converts an unescaped
7127 string into its escaped equivalent.
7128 (warn_deprecated_use): Use the new class to convert the
7129 deprecation message, if present.
7130 (test_escaped_strings): New self test.
7131 (test_c_tests): Add test_escaped_strings.
7132 * doc/extend.texi (deprecated): Add a note that the
7133 deprecation message is affected by the -fmessage-length
7134 option, and that control characters will be escaped.
7135 (#pragma GCC error): Document this pragma.
7136 (#pragma GCC warning): Likewise.
7137 * doc/invoke.texi (-fmessage-length): Document this option's
7138 effect on the #warning and #error preprocessor directives and
7139 the deprecated attribute.
7141 2018-06-15 Richard Biener <rguenther@suse.de>
7143 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7144 here, also noting vector size used.
7145 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
7146 size used in MSG_OPTIMIZED_LOCATIONS dump.
7147 (pass_slp_vectorize::execute): Adjust.
7149 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
7152 * config/arc/arc.c (arc_return_address_register): Fix
7155 2018-06-15 Richard Biener <rguenther@suse.de>
7158 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7159 leave useless conversion stripping to force_gimple_operand_gsi.
7160 (gimplify_build2): Likewise.
7161 (gimplify_build1): Likewise.
7163 2018-06-15 Richard Biener <rguenther@suse.de>
7166 * tree-cfg.c (move_stmt_op): unshare invariant addresses
7167 before adjusting their block.
7169 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
7171 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7172 multilibs for *-*-rtems*.
7173 * config/riscv/t-rtems: New file.
7175 2018-06-14 Jakub Jelinek <jakub@redhat.com>
7178 * match.pd ((A +- CST1) +- CST2): Punt if last resort
7179 unsigned_type_for returns NULL.
7182 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7183 subregs of multi-word pseudos unless the float mode has word size.
7185 2018-06-14 Richard Biener <rguenther@suse.de>
7188 * tree-vect-generic.c (build_word_mode_vector_type): Remove
7189 duplicate and harmful type_hash_canon.
7190 * tree.c (type_hash_canon): Assert we didn't find ourselves.
7192 2018-06-14 Richard Biener <rguenther@suse.de>
7195 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7198 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
7200 * config/rtems.h (STDINT_LONG32): Define.
7202 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
7203 Prachi Godbole <prachi.godbole@imgtec.com>
7205 * config/mips/mips-cpus.def: Define P6600.
7206 * config/mips/mips-tables.opt: Regenerate.
7207 * config/mips/mips.c (mips_ucbranch_type): New enum.
7208 (mips_rtx_cost_data): Add support for P6600.
7209 (mips_issue_rate): Likewise.
7210 (mips_multipass_dfa_lookahead): Likewise.
7211 (mips_avoid_hazard): Likewise.
7212 (mips_reorg_process_insns): Likewise.
7213 (mips_classify_branch_p6600): New function.
7214 * config/mips/mips.h (TUNE_P6600): New define.
7215 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7216 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7217 * config/mips/mips.md: Include p6600.md.
7218 (processor): Add p6600.
7219 * config/mips/p6600.md: New file.
7220 * doc/invoke.texi: Add p6600 to supported architectures.
7222 2018-06-13 Martin Sebor <msebor@redhat.com>
7224 PR tree-optimization/86114
7225 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7227 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7229 2018-06-13 Richard Biener <rguenther@suse.de>
7231 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7232 Properly set vector type of the intermediate stmt.
7233 * tree-vect-stmts.c (vectorizable_operation): The destination
7234 var always has vectype_out type.
7236 2018-06-13 Jeff Law <law@redhat.com>
7238 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7239 integer 0 for argument to print_rtl_with_bb.
7240 (rl78_reorg): Likewise.
7242 2018-06-13 David Malcolm <dmalcolm@redhat.com>
7244 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7245 from rtx to rtx_insn *.
7246 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7248 (add_sched_insns_for_speculation): Likewise for local "target",
7249 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7250 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7251 from rtx_insn ** to rtx_code_label **.
7252 (reorg_emit_nops): Likewise.
7253 (c6x_reorg): Likewise for local "call_labels".
7254 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7256 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7257 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7258 the loops over LABEL_REFS.
7259 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7261 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7262 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7263 (split_branches): Strengthen local "olabel" from rtx to
7264 rtx_insn *, adding a safe_as_a cast.
7265 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7267 (add_insn_after): Likewise for first two params.
7268 (add_insn_before): Likewise.
7269 (remove_insn): Likewise for param.
7270 (emit_pattern_before_noloc): Likewise for second and third params.
7271 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7272 (emit_call_insn_before_noloc): Likewise.
7273 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7275 (emit_barrier_before): Likewise.
7276 (emit_label_before): Strengthen "label" param from "rtx" to
7277 "rtx_code_label *". Strengthen "before" param from "rtx" to
7279 (emit_insn_after_1): Strengthen "after" param from "rtx" to
7281 (emit_pattern_after_noloc): Likewise.
7282 (emit_insn_after_noloc): Likewise.
7283 (emit_jump_insn_after_noloc): Likewise.
7284 (emit_call_insn_after_noloc): Likewise.
7285 (emit_debug_insn_after_noloc): Likewise.
7286 (emit_barrier_after): Likewise.
7287 (emit_label_after): Likewise for both params.
7288 (emit_pattern_after_setloc): Likewise for "after" param. Convert
7289 "loc" param from "int" to "location_t".
7290 (emit_insn_after_setloc): Likewise.
7291 (emit_jump_insn_after_setloc): Likewise.
7292 (emit_call_insn_after_setloc): Likewise.
7293 (emit_debug_insn_after_setloc): Likewise.
7294 (emit_pattern_before_setloc): Likewise for "before" param. Convert
7295 "loc" param from "int" to "location_t".
7296 (emit_pattern_before): Convert NULL_RTX to NULL.
7297 (emit_insn_before_setloc): Convert "loc" param from "int" to
7299 (emit_jump_insn_before_setloc): Likewise.
7300 (emit_call_insn_before_setloc): Likewise.
7301 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7302 rtx_insn *. Convert "loc" param from "int" to "location_t".
7303 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7304 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7305 Convert 3rd param from "int" to "location_t".
7306 (emit_barrier_before, emit_barrier_after, next_real_insn):
7307 Strengthen param from rtx to rtx_insn *.
7308 (emit_label_before): Strengthen 1st param from "rtx" to
7309 "rtx_code_label *". Strengthen 2nd param from "rtx" to
7311 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7312 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7313 Strengthen 2nd param from "rtx" to "rtx_insn *".
7314 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7315 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7316 Likewise. Convert 3rd param from "int" to "location_t".
7317 (emit_label_after): Strengthen 1st param from "rtx" to
7319 (next_real_insn, remove_insn): Strengthen param from "rtx" to
7321 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7322 from "rtx" to "rtx_insn *".
7324 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
7326 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7327 bodies streamed in with -Q.
7328 * dumpfile.c (dump_files): Add lto-stream-out dump file.
7329 * dumpfile.h (tree_dump_index): Add lto_stream_out.
7330 * gimple-streamer-out.c: Include gimple-pretty-print.h
7331 (output_bb): Dump stmts streamed.
7332 * lto-section-out.c: Include print-tree.h
7333 (lto_begin_section): Dump sections created.
7334 (lto_output_decl_index): Dump decl encoded.
7335 * lto-streamer-out.c: Include print-tree.h
7336 (create_output_block): Dump output block created.
7337 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7338 (output_function): Dump function output.
7339 (output_constructor): Dump constructor streamed.
7340 (write_global_stream): Output indexes encoded.
7341 (produce_asm_for_decls): Dump streams encoded.
7342 * lto-streamer.c (streamer_dump_file): New global var.
7343 * lto-streamer.h (streamer_dump_file): Declare.
7344 * passes.c (ipa_write_summaries): Initialize streamer dump.
7345 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7348 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
7351 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7352 offsets for register save directives. Emit a second batch of save
7353 directives, if need be, when the function accesses prior frames.
7355 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7357 * config/arc/fpu.md (fmasf4): Force operand to register.
7358 (fnmasf4): Likewise.
7360 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7362 * config/arc/arc-protos.h (arc_pad_return): Remove.
7363 * config/arc/arc.c (machine_function): Remove force_short_suffix
7365 (arc_print_operand): Adjust printing of '&'.
7366 (arc_verify_short): Remove conditional printing of short suffix.
7367 (arc_final_prescan_insn): Remove reference to size_reason.
7368 (pad_return): New function.
7369 (arc_reorg): Call pad_return.
7370 (arc_pad_return): Remove.
7371 (arc_init_machine_status): Remove reference to force_short_suffix.
7372 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7373 (attr length): When attribute iscompact is true force to 2
7374 regardless; in the case of maybe check if we want to force the
7375 instruction to have 4 bytes length.
7376 (nopv): Change it to generate 4 byte long nop as well.
7377 (blockage): New pattern.
7378 (simple_return): Remove call to arc_pad_return.
7379 (p_return_i): Likewise.
7381 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7383 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7385 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7387 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7390 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7392 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7393 for ARC700 and ARCv2.
7395 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
7398 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7399 operands[2] instead of operands[1].
7402 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7404 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7405 case, check whether the outer register overlaps an unallocatable
7406 register, not just whether it fits the required class.
7408 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
7410 * poly-int.h (can_div_trunc_p): Add new overload in which all values
7412 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7413 (memrefs_conflict_p): Likewise.
7414 (init_alias_analysis): Likewise.
7415 * cfgexpand.c (expand_debug_expr): Likewise.
7416 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7417 * cse.c (fold_rtx): Likewise.
7418 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7419 * expr.c (emit_block_move_hints): Likewise.
7420 (clear_storage_hints, push_block, emit_push_insn): Likewise.
7421 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7422 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7423 (emit_group_store): Likewise.
7424 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
7425 to read the PRE/POST_MODIFY increment.
7426 * calls.c (store_one_arg): Use strip_offset.
7427 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7429 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7431 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7432 (simplify_binary_operation_1): Extend CONST_INT handling to
7434 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7435 than a HOST_WIDE_INT.
7436 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7438 (adjust_mems, add_stores): Update accodingly.
7439 (vt_canonicalize_addr): Track polynomial offsets.
7440 (emit_note_insn_var_location): Likewise.
7441 (vt_add_function_parameter): Likewise.
7442 (vt_initialize): Likewise.
7444 2018-06-12 Jeff Law <law@redhat.com>
7446 * config.gcc (alpha*-*-freebsd*): Remove.
7447 * config/alpha/freebsd.h: Remove.
7449 2018-06-12 David Malcolm <dmalcolm@redhat.com>
7452 * spellcheck-tree.c (levenshtein_distance): Rename to...
7453 (get_edit_distance): ...this, and update for underlying renaming.
7454 * spellcheck-tree.h (levenshtein_distance): Rename to...
7455 (get_edit_distance): ...this.
7456 * spellcheck.c (levenshtein_distance): Rename to...
7457 (get_edit_distance): ...this. Convert from Levenshtein distance
7458 to Damerau-Levenshtein distance by supporting transpositions of
7459 adjacent characters. Rename "v1" to "v_next" and "v0" to
7461 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7462 (selftest::test_edit_distance_unit_test_oneway): ...this, and
7463 update for underlying renaming.
7464 (selftest::levenshtein_distance_unit_test): Rename to...
7465 (selftest::test_get_edit_distance_unit): ...this, and update for
7466 underlying renaming.
7467 (selftest::test_find_closest_string): Add example from PR 69968
7468 where transposition helps
7469 (selftest::test_metric_conditions): Update for renaming.
7470 (selftest::test_metric_conditions): Likewise.
7471 (selftest::spellcheck_c_tests): Likewise.
7472 * spellcheck.h (levenshtein_distance): Rename both overloads to...
7473 (get_edit_distance): ...this.
7474 (best_match::consider): Update for renaming.
7476 2018-06-12 Martin Sebor <msebor@redhat.com>
7478 PR tree-optimization/85259
7479 * builtins.c (compute_objsize): Handle constant offsets.
7480 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7481 true iff a warning has been issued.
7482 * gimple.h (gimple_nonartificial_location): New function.
7483 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7484 gimple_nonartificial_location and handle -Wno-system-headers.
7485 (handle_builtin_stxncpy): Same.
7487 2018-06-12 Martin Sebor <msebor@redhat.com>
7490 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7492 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
7494 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7495 BUILTIN_VEC_XST entries for pointer to double and long long.
7497 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
7500 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7502 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7505 2018-06-12 Martin Liska <mliska@suse.cz>
7507 * doc/options.texi: Document IntegerRange.
7509 2018-06-12 Martin Liska <mliska@suse.cz>
7511 * config/i386/i386.opt: Make MPX-related options as Deprecated.
7512 * opt-functions.awk: Handle Deprecated flag.
7513 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7515 (read_cmdline_option): Report warning for a deprecated option.
7516 * opts.h (struct cl_option): Add new field cl_deprecated.
7517 (CL_ERR_DEPRECATED): New.
7519 2018-06-12 Martin Liska <mliska@suse.cz>
7521 * doc/options.texi: Document Deprecated option flag.
7523 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7525 * config/arc/arc-arch.h (arc_extras): New enum.
7526 (arc_cpu_t):Add field extra.
7527 (arc_cpu_types): Consider the extras.
7528 * config/arc/arc-cpus.def: Add extras info.
7529 * config/arc/arc-opts.h (processor_type): Consider extra field.
7530 * config/arc/arc.c (arc_override_options): Handle extra field.
7532 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
7534 * config/arc/arc-arch.h: Update ARC_OPTX macro.
7535 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7537 * config/arc/arc.c (arc_init): Update pic warning.
7538 (irq_range): Update irq range parsing warnings.
7539 (arc_override_options): Update various warning messages.
7540 (arc_handle_aux_attribute): Likewise.
7542 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
7544 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7546 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7548 * doc/sourcebuild.texi: Document usage of line number 0 in verify
7549 compiler messages directives.
7551 2018-06-12 Matthew Fortune <mfortune@gmail.com>
7553 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7554 * config/mips/mips-tables.opt: Regenerate.
7555 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7557 * doc/invoke.texi: Document -march=i6500.
7559 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
7561 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7562 (i6400_gpmul): Add cpu_unit.
7563 (i6400_gpdiv): Likewise.
7564 (i6400_msa_add_d): Update reservations.
7565 (i6400_msa_int_add) Likewise.
7566 (i6400_msa_short_logic3) Likewise.
7567 (i6400_msa_short_logic2) Likewise.
7568 (i6400_msa_short_logic) Likewise.
7569 (i6400_msa_move) Likewise.
7570 (i6400_msa_cmp) Likewise.
7571 (i6400_msa_short_float2) Likewise.
7572 (i6400_msa_div_d) Likewise.
7573 (i6400_msa_long_logic1) Likewise.
7574 (i6400_msa_long_logic2) Likewise.
7575 (i6400_msa_mult) Likewise.
7576 (i6400_msa_long_float2) Likewise.
7577 (i6400_msa_long_float4) Likewise.
7578 (i6400_msa_long_float5) Likewise.
7579 (i6400_msa_long_float8) Likewise.
7580 (i6400_fpu_fadd): Include frint type.
7581 (i6400_fpu_store): New define_insn_reservation.
7582 (i6400_fpu_load): Likewise.
7583 (i6400_fpu_move): Likewise.
7584 (i6400_fpu_fcmp): Likewise.
7585 (i6400_fpu_fmadd): Likewise.
7586 (i6400_int_mult): Include imul3nc type and update reservation.
7587 (i6400_int_div): Include idiv3 type and update reservation.
7588 (i6400_int_load): Update to check type not move_type.
7589 (i6400_int_store): Likewise.
7590 (i6400_int_prefetch): Set zero latency.
7592 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
7594 * gcc.c: Document new %@{...} sequence.
7595 (LINK_COMMAND_SPEC): Use it for the -L switches.
7596 (cpp_unique_options): Use it for the -I switches.
7597 (at_file_argbuf): New global variable.
7598 (in_at_file): Likewise.
7599 (alloc_args): Create at_file_argbuf.
7600 (clear_args): Truncate at_file_argbuf.
7601 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7602 (open_at_file): New function.
7603 (close_at_file): Likewise.
7604 (create_at_file): Delete.
7605 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7608 (validate_switches_from_spec): Deal with %@{...} sequence.
7609 (validate_switches): Likewise.
7610 (driver::finalize): Call clear_args.
7612 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
7614 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7616 2018-06-11 Martin Sebor <msebor@redhat.com>
7618 * doc/invoke.texi (-Wall): List -Wc++17-compat.
7619 (Wno-class-memaccess): Add @opindex.
7620 (Wno-templates, Wno-multiple-inheritance): Same.
7621 (Wno-virtual-inheritance, Wno-namespaces): Same.
7622 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7623 (Wno-format-overflow, Wno-format-truncation): Same.
7624 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7625 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7626 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7627 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7628 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7629 (Wno-misspelled-isr): Same.
7631 2018-06-11 Martin Sebor <msebor@redhat.com>
7633 * PR tree-optimization/86083
7634 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7636 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
7638 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7640 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
7643 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7644 on the correct operand.
7645 (*movdi_internal64): Ditto.
7647 2018-06-11 Martin Liska <mliska@suse.cz>
7649 PR tree-optimization/86089
7650 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7652 2018-06-11 Julia Koval <julia.koval@intel.com>
7654 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7655 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7656 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7658 2018-06-11 Olivier Hainque <hainque@adacore.com>
7660 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7661 for Ada with strict dwarf2.
7663 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
7666 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7669 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
7671 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7673 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
7675 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7678 2018-06-08 Martin Liska <mliska@suse.cz>
7680 * tree-cfg.h (debug_function): Fix argument type to match
7683 2018-06-08 Martin Liska <mliska@suse.cz>
7685 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7686 Remove usage of MPX-related (and removed) fields.
7687 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7689 2018-06-08 David Malcolm <dmalcolm@redhat.com>
7691 * cfg.c (debug): Use TDF_NONE rather than 0.
7692 * cfghooks.c (debug): Likewise.
7693 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7694 (struct dump_option_value_info): Convert to...
7695 (struct kv_pair): ...this template type.
7696 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7698 (optinfo_verbosity_options): Likewise.
7699 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7701 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7702 than int for "optgroup_flags" param.
7703 (dump_generic_expr_loc): Use dump_flags_t rather than int for
7705 (dump_dec): Likewise.
7706 (dump_finish): Use TDF_NONE rather than 0.
7707 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7708 rather than int for "optgroup_flags" param. Use TDF_NONE rather
7709 than 0. Update for change to option_ptr.
7710 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7711 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
7712 0. Update for changes to optinfo_verbosity_options and
7714 (opt_info_switch_p): Convert optgroup_flags from int to
7716 (dump_basic_block): Use dump_flags_t rather than int
7717 for "dump_kind" param.
7718 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7719 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7720 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7721 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7722 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7723 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7724 TDF_NONE): Convert from macros to...
7725 (enum dump_flag): ...this new enum.
7726 (dump_flags_t): Update to use enum.
7727 (operator|, operator&, operator~, operator|=, operator&=):
7728 Implement for dump_flags_t.
7729 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7730 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7731 Convert from macros to...
7732 (enum optgroup_flag): ...this new enum.
7733 (optgroup_flags_t): New typedef.
7734 (operator|, operator|=): Implement for optgroup_flags_t.
7735 (struct dump_file_info): Convert field "alt_flags" to
7736 dump_flags_t. Convert field "optgroup_flags" to
7738 (dump_basic_block): Use dump_flags_t rather than int for param.
7739 (dump_generic_expr_loc): Likewise.
7740 (dump_dec): Likewise.
7741 (dump_register): Convert param "optgroup_flags" to
7743 (opt_info_enable_passes): Likewise.
7744 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7746 * gimple-pretty-print.c (debug): Likewise.
7747 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7748 (merged_store_group::apply_stores): Likewise.
7749 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7750 * gimple.c (verify_gimple_pp): Likewise.
7751 * graphite-poly.c (print_pbb_body): Likewise.
7752 * passes.c (pass_manager::register_one_dump_file): Convert
7753 local "optgroup_flags" to optgroup_flags_t.
7754 * print-tree.c (print_node): Use TDF_NONE rather than 0.
7756 (debug_body): Likewise.
7757 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7758 to optgroup_flags_t.
7759 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7761 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7762 (convert_mult_to_fma): Likewise.
7763 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7764 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7765 * tree-vect-data-refs.c (dump_lower_bound): Convert param
7766 "dump_kind" to dump_flags_t.
7768 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7770 * config/rs6000/rs6000.c (min, max): Delete.
7772 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
7774 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7775 -mabi=spe and -mabi=no-spe.
7777 2018-06-08 Martin Liska <mliska@suse.cz>
7779 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7780 where we expect an existing summary.
7782 2018-06-08 Martin Liska <mliska@suse.cz>
7784 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7785 * ipa-inline.h (estimate_edge_growth): Likewise.
7787 2018-06-08 Martin Liska <mliska@suse.cz>
7789 * cgraph.c (function_version_hasher::hash): Use
7790 cgraph_node::get_uid ().
7791 (function_version_hasher::equal):
7792 * cgraph.h (cgraph_node::get_uid): New method.
7793 * ipa-inline.c (update_caller_keys): Use
7794 cgraph_node::get_uid ().
7795 (update_callee_keys): Likewise.
7796 * ipa-utils.c (searchc): Likewise.
7797 (ipa_reduced_postorder): Likewise.
7798 * lto-cgraph.c (input_node): Likewise.
7799 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7800 * symbol-summary.h (symtab_insertion): Likewise.
7801 (symtab_removal): Likewise.
7802 (symtab_duplication): Likewise.
7803 * tree-pretty-print.c (dump_function_header): Likewise.
7804 * tree-sra.c (convert_callers_for_node): Likewise.
7806 2018-06-08 Martin Liska <mliska@suse.cz>
7808 * cgraph.c (symbol_table::create_edge): Always assign a new
7810 (symbol_table::free_edge): Do not recycle numbers.
7811 * cgraph.h (cgraph_edge::get): New method.
7812 * symbol-summary.h (symtab_removal): Use it.
7813 (symtab_duplication): Likewise.
7814 (call_summary::hashable_uid): Remove.
7816 2018-06-08 Martin Liska <mliska@suse.cz>
7818 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7819 (initialize_growth_caches): Remove.
7820 (free_growth_caches): Likewise.
7821 (do_estimate_edge_time): Use edge_growth_cache.
7822 (do_estimate_edge_size): Likewise.
7823 (do_estimate_edge_hints): Likewise.
7824 * ipa-inline.c (reset_edge_caches): Likewise.
7825 (recursive_inlining): Likewise.
7826 (inline_small_functions): Likewise.
7827 * ipa-inline.h (initialize_growth_caches): Remove.
7828 (estimate_edge_size): Likewise.
7829 (estimate_edge_time): Likewise.
7830 (estimate_edge_hints): Likewise.
7831 (reset_edge_growth_cache): Likewise.
7832 * symbol-summary.h (call_summary::remove): New method.
7834 2018-06-08 Martin Liska <mliska@suse.cz>
7836 * ipa-cp.c (class edge_clone_summary): New summary.
7837 (grow_edge_clone_vectors): Remove.
7838 (ipcp_edge_duplication_hook): Remove.
7839 (class edge_clone_summary_t): New call_summary class.
7840 (ipcp_edge_removal_hook): Remove.
7841 (edge_clone_summary_t::duplicate): New function.
7842 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7843 (create_specialized_node): Likewise.
7844 (ipcp_driver): Initialize edge_clone_summaries and do not
7847 2018-06-08 Martin Liska <mliska@suse.cz>
7849 * symbol-summary.h (get): New function.
7850 (call_summary::m_initialize_when_cloning): New class member.
7852 2018-06-08 Martin Liska <mliska@suse.cz>
7854 * cgraph.c (cgraph_node::remove): Do not recycle uid.
7855 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7856 (symbol_table::allocate_cgraph_symbol): Do not set uid.
7857 * passes.c (uid_hash_t): Record removed_nodes by their uids.
7858 (remove_cgraph_node_from_order): Use the removed_nodes set.
7859 (do_per_function_toporder): Likwise.
7860 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7861 instead of summary_uid.
7862 (symtab_removal): Likewise.
7863 (symtab_duplication): Likewise.
7865 2018-06-08 Martin Liska <mliska@suse.cz>
7867 * ipa-cp.c (ipcp_store_bits_results): Use
7868 ipcp_transformation_sum.
7869 (ipcp_store_vr_results): Likewise.
7870 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7872 (ipcp_transformation_initialize): ... this.
7873 (ipa_set_node_agg_value_chain):
7874 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7875 (write_ipcp_transformation_info): Likewise.
7876 (read_ipcp_transformation_info): Likewise.
7877 (ipcp_update_bits): Likewise.
7878 (ipcp_update_vr): Likewise.
7879 (ipcp_transform_function): Likewise.
7880 * ipa-prop.h: Rename ipcp_transformation_summary to
7881 ipcp_transformation.
7882 (class ipcp_transformation_t): New function summary.
7883 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7884 (ipa_get_agg_replacements_for_node): Likewise.
7886 2018-06-08 Martin Liska <mliska@suse.cz>
7888 * ipa-pure-const.c (struct funct_state_d): Do it class instead
7890 (class funct_state_summary_t): New function_summary class.
7891 (has_function_state): Remove.
7892 (get_function_state): Likewise.
7893 (set_function_state): Likewise.
7894 (add_new_function): Likewise.
7895 (funct_state_summary_t::insert): New function.
7896 (duplicate_node_data): Remove.
7897 (remove_node_data): Remove.
7898 (funct_state_summary_t::duplicate): New function.
7899 (register_hooks): Create new funct_state_summaries.
7900 (pure_const_generate_summary): Use it.
7901 (pure_const_write_summary): Likewise.
7902 (pure_const_read_summary): Likewise.
7903 (propagate_pure_const): Likewise.
7904 (propagate_nothrow): Likewise.
7905 (dump_malloc_lattice): Likewise.
7906 (propagate_malloc): Likewise.
7907 (execute): Do not register hooks, just remove summary
7909 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7912 2018-06-08 Martin Liska <mliska@suse.cz>
7914 * ipa-reference.c (remove_node_data): Remove.
7915 (duplicate_node_data): Likewise.
7916 (class ipa_ref_var_info_summary_t): New class.
7917 (class ipa_ref_opt_summary_t): Likewise.
7918 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7919 (get_reference_optimization_summary): Use
7920 ipa_ref_opt_sum_summaries.
7921 (set_reference_vars_info): Remove.
7922 (set_reference_optimization_summary): Likewise.
7923 (ipa_init): Create summaries.
7924 (init_function_info): Use function summary.
7925 (ipa_ref_opt_summary_t::duplicate): New function.
7926 (ipa_ref_opt_summary_t::remove): New function.
7927 (get_read_write_all_from_node): Fix GNU coding style.
7928 (propagate): Use function summary.
7929 (write_node_summary_p): Fix GNU coding style.
7930 (stream_out_bitmap): Likewise.
7931 (ipa_reference_read_optimization_summary): Use function summary.
7932 (ipa_reference_c_finalize): Do not release hooks.
7934 2018-06-08 Martin Liska <mliska@suse.cz>
7936 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7937 (analyze_function_body): Extract multiple calls of get_create.
7938 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7939 * ipa-inline.c (recursive_inlining): Use ::get method.
7940 * ipa-inline.h (estimate_edge_growth): Likewise.
7942 2018-06-08 Martin Liska <mliska@suse.cz>
7944 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7946 (hsa_function_summary::hsa_function_summary): Use the new enum
7948 (hsa_gpu_implementation_p): Use hsa_summaries::get.
7949 * hsa-gen.c (hsa_get_host_function): Likewise.
7950 (get_brig_function_name): Likewise.
7951 * ipa-hsa.c (process_hsa_functions): Likewise.
7952 (ipa_hsa_write_summary): Likewise.
7953 * symbol-summary.h (symtab_duplication): Use ::get function/
7954 (get): New function.
7956 2018-06-08 Martin Liska <mliska@suse.cz>
7958 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7960 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7961 (hsa_register_kernel): Likewise.
7962 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7963 * hsa-gen.c (hsa_get_host_function): Likewise.
7964 (get_brig_function_name): Likewise.
7965 (generate_hsa): Likewise.
7966 (pass_gen_hsail::execute): Likewise.
7967 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7968 (devirtualization_time_bonus): Likewise.
7969 (ipcp_propagate_stage): Likewise.
7970 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7971 (edge_set_predicate): Likewise.
7972 (evaluate_conditions_for_known_args): Likewise.
7973 (evaluate_properties_for_edge): Likewise.
7974 (ipa_fn_summary::reset): Likewise.
7975 (ipa_fn_summary_t::duplicate): Likewise.
7976 (dump_ipa_call_summary): Likewise.
7977 (ipa_dump_fn_summary): Likewise.
7978 (analyze_function_body): Likewise.
7979 (compute_fn_summary): Likewise.
7980 (estimate_edge_devirt_benefit): Likewise.
7981 (estimate_edge_size_and_time): Likewise.
7982 (estimate_calls_size_and_time): Likewise.
7983 (estimate_node_size_and_time): Likewise.
7984 (inline_update_callee_summaries): Likewise.
7985 (remap_edge_change_prob): Likewise.
7986 (remap_edge_summaries): Likewise.
7987 (ipa_merge_fn_summary_after_inlining): Likewise.
7988 (ipa_update_overall_fn_summary): Likewise.
7989 (read_ipa_call_summary): Likewise.
7990 (inline_read_section): Likewise.
7991 (write_ipa_call_summary): Likewise.
7992 (ipa_fn_summary_write): Likewise.
7993 (ipa_free_fn_summary): Likewise.
7994 * ipa-hsa.c (process_hsa_functions): Likewise.
7995 (ipa_hsa_write_summary): Likewise.
7996 (ipa_hsa_read_section): Likewise.
7997 * ipa-icf.c (sem_function::merge): Likewise.
7998 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7999 (do_estimate_edge_time): Likewise.
8000 (estimate_size_after_inlining): Likewise.
8001 (estimate_growth): Likewise.
8002 (growth_likely_positive): Likewise.
8003 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8004 (inline_call): Likewise.
8005 * ipa-inline.c (caller_growth_limits): Likewise.
8006 (can_inline_edge_p): Likewise.
8007 (can_inline_edge_by_limits_p): Likewise.
8008 (compute_uninlined_call_time): Likewise.
8009 (compute_inlined_call_time): Likewise.
8010 (want_inline_small_function_p): Likewise.
8011 (edge_badness): Likewise.
8012 (update_caller_keys): Likewise.
8013 (update_callee_keys): Likewise.
8014 (recursive_inlining): Likewise.
8015 (inline_small_functions): Likewise.
8016 (inline_to_all_callers_1): Likewise.
8017 (dump_overall_stats): Likewise.
8018 (early_inline_small_functions): Likewise.
8019 (early_inliner): Likewise.
8020 * ipa-inline.h (estimate_edge_growth): Likewise.
8021 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8022 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8023 * ipa-prop.h (IPA_NODE_REF): Likewise.
8024 (IPA_EDGE_REF): Likewise.
8025 * ipa-pure-const.c (malloc_candidate_p): Likewise.
8026 (propagate_malloc): Likewise.
8027 * ipa-split.c (execute_split_functions): Likewise.
8028 * symbol-summary.h: Rename get to get_create.
8030 (get_create): Likewise.
8031 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8033 2018-06-08 Martin Liska <mliska@suse.cz>
8035 * symbol-summary.h (release): Move definition out of class
8037 (symtab_removal): Likewise.
8038 (symtab_duplication): Likewise.
8040 2018-06-08 Martin Liska <mliska@suse.cz>
8042 * symbol-summary.h (function_summary): Move constructor
8043 implementation out of class declaration.
8044 (release): Likewise.
8045 (symtab_insertion): Likewise.
8046 (symtab_removal): Likewise.
8047 (symtab_duplication): Likewise.
8050 2018-06-08 Martin Liska <mliska@suse.cz>
8052 * Makefile.in: Remove support for MPX (macros, related functions,
8053 fields in cgraph_node, ...).
8054 * builtin-types.def (BT_BND): Likewise.
8055 (BT_FN_BND_CONST_PTR): Likewise.
8056 (BT_FN_CONST_PTR_BND): Likewise.
8057 (BT_FN_VOID_PTR_BND): Likewise.
8058 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
8059 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
8060 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
8061 (expand_builtin_mempcpy_with_bounds): Likewise.
8062 (expand_builtin_memset_with_bounds): Likewise.
8063 (expand_builtin_memset_args): Likewise.
8064 (std_expand_builtin_va_start): Likewise.
8065 (expand_builtin): Likewise.
8066 (expand_builtin_with_bounds): Likewise.
8067 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
8068 (DEF_LIB_BUILTIN_CHKP): Likewise.
8069 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
8070 (DEF_CHKP_BUILTIN): Likewise.
8071 (BUILT_IN_MEMCPY): Likewise.
8072 (BUILT_IN_MEMMOVE): Likewise.
8073 (BUILT_IN_MEMPCPY): Likewise.
8074 (BUILT_IN_MEMSET): Likewise.
8075 (BUILT_IN_STPCPY): Likewise.
8076 (BUILT_IN_STRCAT): Likewise.
8077 (BUILT_IN_STRCHR): Likewise.
8078 (BUILT_IN_STRCPY): Likewise.
8079 (BUILT_IN_STRLEN): Likewise.
8080 (BUILT_IN_MEMCPY_CHK): Likewise.
8081 (BUILT_IN_MEMMOVE_CHK): Likewise.
8082 (BUILT_IN_MEMPCPY_CHK): Likewise.
8083 (BUILT_IN_MEMSET_CHK): Likewise.
8084 (BUILT_IN_STPCPY_CHK): Likewise.
8085 (BUILT_IN_STRCAT_CHK): Likewise.
8086 (BUILT_IN_STRCPY_CHK): Likewise.
8087 * calls.c (store_bounds): Likewise.
8088 (emit_call_1): Likewise.
8089 (special_function_p): Likewise.
8090 (maybe_warn_nonstring_arg): Likewise.
8091 (initialize_argument_information): Likewise.
8092 (finalize_must_preallocate): Likewise.
8093 (compute_argument_addresses): Likewise.
8094 (expand_call): Likewise.
8095 * cfgexpand.c (expand_call_stmt): Likewise.
8096 (expand_return): Likewise.
8097 (expand_gimple_stmt_1): Likewise.
8098 (pass_expand::execute): Likewise.
8099 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8100 (cgraph_node::remove): Likewise.
8101 (cgraph_node::dump): Likewise.
8102 (cgraph_node::verify_node): Likewise.
8103 * cgraph.h (chkp_function_instrumented_p): Likewise.
8104 (symtab_node::get_alias_target): Likewise.
8105 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8106 (cgraph_local_p): Likewise.
8107 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8108 (cgraph_edge::rebuild_references): Likewise.
8109 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8110 (walk_polymorphic_call_targets): Likewise.
8111 (cgraph_node::expand_thunk): Likewise.
8112 (symbol_table::output_weakrefs): Likewise.
8113 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8114 (ix86_handle_option): Likewise.
8115 * config/i386/constraints.md: Likewise.
8116 * config/i386/i386-builtin-types.def (BND): Likewise.
8120 * config/i386/i386-builtin.def (BDESC_END): Likewise.
8121 (BDESC_FIRST): Likewise.
8123 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8124 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8125 * config/i386/i386.c (enum reg_class): Likewise.
8126 (ix86_target_string): Likewise.
8127 (ix86_option_override_internal): Likewise.
8128 (ix86_conditional_register_usage): Likewise.
8129 (ix86_valid_target_attribute_inner_p): Likewise.
8130 (ix86_set_indirect_branch_type): Likewise.
8131 (ix86_set_current_function): Likewise.
8132 (ix86_function_arg_regno_p): Likewise.
8133 (init_cumulative_args): Likewise.
8134 (ix86_function_arg_advance): Likewise.
8135 (ix86_function_arg): Likewise.
8136 (ix86_pass_by_reference): Likewise.
8137 (ix86_function_value_regno_p): Likewise.
8138 (ix86_function_value_1): Likewise.
8139 (ix86_function_value_bounds): Likewise.
8140 (ix86_return_in_memory): Likewise.
8141 (ix86_setup_incoming_vararg_bounds): Likewise.
8142 (ix86_va_start): Likewise.
8143 (indirect_thunk_need_prefix): Likewise.
8144 (print_reg): Likewise.
8145 (ix86_print_operand): Likewise.
8146 (ix86_expand_call): Likewise.
8147 (ix86_output_function_return): Likewise.
8148 (reg_encoded_number): Likewise.
8149 (BDESC_VERIFYS): Likewise.
8150 (ix86_init_mpx_builtins): Likewise.
8151 (ix86_init_builtins): Likewise.
8152 (ix86_emit_cmove): Likewise.
8153 (ix86_emit_move_max): Likewise.
8154 (ix86_expand_builtin): Likewise.
8155 (ix86_builtin_mpx_function): Likewise.
8156 (ix86_get_arg_address_for_bt): Likewise.
8157 (ix86_load_bounds): Likewise.
8158 (ix86_store_bounds): Likewise.
8159 (ix86_load_returned_bounds): Likewise.
8160 (ix86_store_returned_bounds): Likewise.
8161 (ix86_class_likely_spilled_p): Likewise.
8162 (ix86_hard_regno_mode_ok): Likewise.
8163 (x86_order_regs_for_local_alloc): Likewise.
8164 (ix86_mitigate_rop): Likewise.
8165 (ix86_bnd_prefixed_insn_p): Likewise.
8166 (ix86_mpx_bound_mode): Likewise.
8167 (ix86_make_bounds_constant): Likewise.
8168 (ix86_initialize_bounds): Likewise.
8169 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8170 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8171 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8172 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8173 (TARGET_CHKP_BOUND_MODE): Likewise.
8174 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8175 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8176 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8177 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8178 * config/i386/i386.h (TARGET_MPX): Likewise.
8179 (TARGET_MPX_P): Likewise.
8180 (VALID_BND_REG_MODE): Likewise.
8181 (FIRST_BND_REG): Likewise.
8182 (LAST_BND_REG): Likewise.
8183 (enum reg_class): Likewise.
8184 (BND_REG_P): Likewise.
8185 (BND_REGNO_P): Likewise.
8186 (BNDmode): Likewise.
8187 (ADJUST_INSN_LENGTH): Likewise.
8188 * config/i386/i386.md: Likewise.
8189 * config/i386/i386.opt: Likewise.
8190 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8191 (defined): Likewise.
8192 (LINK_MPX): Likewise.
8193 (MPX_SPEC): Likewise.
8194 (LIBMPX_SPEC): Likewise.
8195 (LIBMPXWRAPPERS_SPEC): Likewise.
8196 (CHKP_SPEC): Likewise.
8197 * config/i386/predicates.md: Likewise.
8198 * dbxout.c (dbxout_type): Likewise.
8199 * doc/extend.texi: Likewise.
8200 * doc/invoke.texi: Likewise.
8201 * doc/md.texi: Likewise.
8202 * doc/tm.texi: Likewise.
8203 * doc/tm.texi.in: Likewise.
8204 * dwarf2out.c (is_base_type): Likewise.
8205 (gen_formal_types_die): Likewise.
8206 (gen_subprogram_die): Likewise.
8207 (gen_type_die_with_usage): Likewise.
8208 (gen_decl_die): Likewise.
8209 (dwarf2out_late_global_decl): Likewise.
8210 * expr.c (expand_assignment): Likewise.
8211 (emit_storent_insn): Likewise.
8212 (store_expr_with_bounds): Likewise.
8213 (store_expr): Likewise.
8214 (expand_expr_real_1): Likewise.
8215 * expr.h (store_expr_with_bounds): Likewise.
8216 * function.c (use_register_for_decl): Likewise.
8217 (struct bounds_parm_data): Likewise.
8218 (assign_parms_augmented_arg_list): Likewise.
8219 (assign_parm_find_entry_rtl): Likewise.
8220 (assign_parm_is_stack_parm): Likewise.
8221 (assign_parm_load_bounds): Likewise.
8222 (assign_bounds): Likewise.
8223 (assign_parms): Likewise.
8224 (expand_function_start): Likewise.
8225 * gcc.c (CHKP_SPEC): Likewise.
8226 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8227 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8228 (wrestrict_dom_walker::check_call): Likewise.
8229 * gimple.c (gimple_build_call_from_tree): Likewise.
8230 * gimple.h (enum gf_mask): Likewise.
8231 (gimple_call_with_bounds_p): Likewise.
8232 (gimple_call_set_with_bounds): Likewise.
8233 * gimplify.c (gimplify_init_constructor): Likewise.
8234 * ipa-cp.c (initialize_node_lattices): Likewise.
8235 (propagate_constants_across_call): Likewise.
8236 (find_more_scalar_values_for_callers_subset): Likewise.
8237 * ipa-hsa.c (process_hsa_functions): Likewise.
8238 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8239 * ipa-icf.c (sem_function::merge): Likewise.
8240 * ipa-inline.c (early_inliner): Likewise.
8241 * ipa-pure-const.c (warn_function_noreturn): Likewise.
8242 (warn_function_cold): Likewise.
8243 (propagate_pure_const): Likewise.
8244 * ipa-ref.h (enum GTY): Likewise.
8245 * ipa-split.c (find_retbnd): Likewise.
8246 (consider_split): Likewise.
8247 (split_function): Likewise.
8248 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8249 * ipa.c (walk_polymorphic_call_targets): Likewise.
8250 (symbol_table::remove_unreachable_nodes): Likewise.
8251 (process_references): Likewise.
8252 (cgraph_build_static_cdtor_1): Likewise.
8253 * lto-cgraph.c (lto_output_node): Likewise.
8254 (output_refs): Likewise.
8255 (compute_ltrans_boundary): Likewise.
8256 (input_overwrite_node): Likewise.
8257 (input_node): Likewise.
8258 (input_cgraph_1): Likewise.
8259 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8260 * passes.c (pass_manager::execute_early_local_passes): Likewise.
8261 (class pass_chkp_instrumentation_passes): Likewise.
8262 (make_pass_chkp_instrumentation_passes): Likewise.
8263 * passes.def: Likewise.
8264 * rtl.h (struct GTY): Likewise.
8265 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8266 * stor-layout.c (layout_type): Likewise.
8267 * symtab.c: Likewise.
8268 * target.def: Likewise.
8269 * targhooks.c (default_chkp_bound_type): Likewise.
8270 (default_chkp_bound_mode): Likewise.
8271 (default_builtin_chkp_function): Likewise.
8272 (default_chkp_function_value_bounds): Likewise.
8273 (default_chkp_make_bounds_constant): Likewise.
8274 (default_chkp_initialize_bounds): Likewise.
8275 * targhooks.h (default_chkp_bound_type): Likewise.
8276 (default_chkp_bound_mode): Likewise.
8277 (default_builtin_chkp_function): Likewise.
8278 (default_chkp_function_value_bounds): Likewise.
8279 (default_chkp_make_bounds_constant): Likewise.
8280 (default_chkp_initialize_bounds): Likewise.
8281 * toplev.c (compile_file): Likewise.
8282 (process_options): Likewise.
8283 * tree-core.h (DEF_BUILTIN): Likewise.
8284 (DEF_BUILTIN_CHKP): Likewise.
8285 * tree-inline.c (declare_return_variable): Likewise.
8286 (remap_gimple_stmt): Likewise.
8287 (copy_bb): Likewise.
8288 (initialize_inlined_parameters): Likewise.
8289 (expand_call_inline): Likewise.
8290 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8291 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8292 (make_pass_ipa_chkp_produce_thunks): Likewise.
8293 (make_pass_chkp): Likewise.
8294 (make_pass_chkp_opt): Likewise.
8295 (make_pass_chkp_instrumentation_passes): Likewise.
8296 * tree-pretty-print.c (dump_generic_node): Likewise.
8297 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8298 * tree-ssa-dce.c (propagate_necessity): Likewise.
8299 (eliminate_unnecessary_stmts): Likewise.
8300 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8301 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8302 * tree-ssa-sccvn.h: Likewise.
8303 * tree-ssa-strlen.c (get_string_length): Likewise.
8304 (valid_builtin_call): Likewise.
8305 (adjust_last_stmt): Likewise.
8306 (handle_builtin_strchr): Likewise.
8307 (handle_builtin_strcpy): Likewise.
8308 (handle_builtin_stxncpy): Likewise.
8309 (handle_builtin_memcpy): Likewise.
8310 (handle_builtin_strcat): Likewise.
8311 (strlen_check_and_optimize_stmt): Likewise.
8312 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8313 * tree-streamer-in.c: Likewise.
8314 * tree-streamer.c (record_common_node): Likewise.
8315 * tree.c (tree_code_size): Likewise.
8316 (wide_int_to_tree_1): Likewise.
8317 (type_contains_placeholder_1): Likewise.
8318 (build_common_tree_nodes): Likewise.
8319 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8320 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8321 (POINTER_BOUNDS_P): Likewise.
8322 (BOUNDED_TYPE_P): Likewise.
8323 (BOUNDED_P): Likewise.
8324 (CALL_WITH_BOUNDS_P): Likewise.
8325 (pointer_bounds_type_node): Likewise.
8326 * value-prof.c (gimple_ic): Likewise.
8327 * var-tracking.c (vt_add_function_parameters): Likewise.
8328 * varasm.c (make_decl_rtl): Likewise.
8329 (assemble_start_function): Likewise.
8330 (output_constant): Likewise.
8331 (maybe_assemble_visibility): Likewise.
8332 * varpool.c (ctor_for_folding): Likewise.
8333 * chkp-builtins.def: Remove.
8334 * ipa-chkp.c: Remove.
8335 * ipa-chkp.h: Remove.
8336 * rtl-chkp.c: Remove.
8337 * rtl-chkp.h: Remove.
8338 * tree-chkp-opt.c: Remove.
8339 * tree-chkp.c: Remove.
8340 * tree-chkp.h: Remove.
8342 2018-06-07 Carl Love <cel@us.ibm.com>
8344 * config/rs6000/vsx.md (vextract_fp_from_shorth,
8345 vextract_fp_from_shortl): Add BE support.
8347 2018-06-07 Paul Koning <ni1d@arrl.net>
8349 * compare-elim.c (try_merge_compare): Don't merge compare if
8350 address contains a side effect.
8351 (try_eliminate_compare): Likewise.
8353 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
8355 * config.gcc: Support "tremont".
8356 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8357 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8359 * config/i386/i386.c (m_TREMONT): Define.
8360 (processor_target_table): Add "tremont".
8361 (PTA_TREMONT): Define.
8362 (ix86_lea_outperforms): Add TARGET_TREMONT.
8363 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8364 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8365 and M_INTEL_GOLDMONT_PLUS.
8366 (fold_builtin_cpu): Add "tremont".
8367 (ix86_add_stmt_cost): Add TARGET_TREMONT.
8368 (ix86_option_override_internal): Add "tremont".
8369 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8370 (processor_type): Add PROCESSOR_TREMONT.
8371 * config/i386/x86-tune.def: Add m_TREMONT.
8372 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8374 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8376 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8377 symbol defined for msp430i* devices to be lower case.
8379 2018-06-07 Richard Biener <rguenther@suse.de>
8381 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8382 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
8383 Properly wrap signed arithmetic if overflow wraps.
8385 2018-06-07 Jakub Jelinek <jakub@redhat.com>
8387 PR tree-optimization/69615
8388 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8389 of a cast from a same precision integral SSA_NAME in a bb dominated
8390 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
8391 cast to utype if rhs2 has already a compatible type.
8393 2018-06-07 Richard Biener <rguenther@suse.de>
8395 PR tree-optimization/85935
8396 * graphite-scop-detection.c (find_params_in_bb): Analyze
8397 condition operands with respect to the correct loop. Assert
8398 the analysis doesn't fail.
8400 2018-06-04 Carl Love <cel@us.ibm.com>
8402 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8403 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
8404 as it is slightly cheaper.
8405 (first_match_or_eos_index_<mode>):
8406 Calculate index using natural element order.
8407 (first_match_index_<mode>):
8408 Calculate index using natural element order.
8409 (first_match_or_eos_index_<mode>):
8410 Calculate index using natural order.
8411 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8412 for BE and LE modes.
8413 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8414 P9V_BUILTIN_VCLZLSBB_V16QI.
8415 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8418 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8420 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8421 indentation and line wrap for many prototypes. Add missing
8422 @smallexample directives around block of prototypes for vec_xl and
8425 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
8427 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8428 track if we pass or return IEEE 128-bit floating point.
8429 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8430 C++ mangling that is compatible with GCC 8.1.
8431 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8432 (init_cumulative_args): Note if we pass or return IEEE 128-bit
8433 floating point types.
8434 (rs6000_function_arg_advance_1): Likewise.
8435 (rs6000_mangle_type): Optionally generate mangled names that match
8436 what GCC 8.1 generated for IEEE 128-bit floating point types.
8437 (rs6000_globalize_decl_name): If we have an external function that
8438 passes or returns IEEE 128-bit types, generate a weak reference
8439 from the mangled name used in GCC 8.1 to the current mangled
8441 (rs6000_init_builtins): Make __ibm128 use the long double type if
8442 long double is IBM extended double. Make __float128 use the long
8443 double type if long double is IEEE 128-bit.
8446 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8447 macro for __ibm128 built-in functions.
8448 (PACK_IF): Add __ibm128 pack/unpack functions.
8449 (UNPACK_IF): Likewise.
8450 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8451 enable long double built-in functions if long double is IEEE
8452 128-bit floating point.
8453 (rs6000_invalid_builtin): Update long double built-in function
8455 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8456 functions, adjust the built-in function to use the long double
8457 built-in function if __ibm128 and long double are the same type.
8458 * doc/extend.texi (PowerPC builtins): Update documention for
8459 __builtin_{,un}pack_longdouble. Add documentation for
8460 __builtin_{,un}pack_ibm128.
8462 2018-06-06 Jim Wilson <jimw@sifive.com>
8464 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8465 (struct machine_function): New field interrupt_mode.
8466 (riscv_handle_type_attribute): New function. Add forward declaration.
8467 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8468 (riscv_expand_epilogue): Check interrupt_mode field.
8469 (riscv_set_current_function): Check interrupt attribute args and
8470 set interrupt_mode field.
8471 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8472 (riscv_sret, riscv_uret): New.
8473 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8474 new arguments to interrupt attribute.
8476 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
8479 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8480 Don't handle -mcpu=power8 if -mpower9-vector is also used.
8482 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
8484 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8485 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8486 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8487 several redundant entries.
8489 2018-06-06 David Malcolm <dmalcolm@redhat.com>
8491 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8492 type from "rtx" to "rtx_insn *".
8493 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8494 for local "call_insn", removing cast.
8495 (ix86_expand_call): Likewise, introducing a "call_insn" local.
8497 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
8499 PR tree-optimization/86066
8500 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8501 for BIT_INSERT_EXPR stores.
8503 2018-06-06 Richard Biener <rguenther@suse.de>
8505 PR tree-optimization/86062
8506 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8507 component refs ontop
8508 of to be offsetted base.
8510 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8512 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8513 to be static and remove check on interrupt attribute name.
8515 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
8517 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8518 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8520 2018-06-05 Steve Ellcey <sellcey@cavium.com>
8523 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8525 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8526 Remove second argument, change how error is called.
8527 (aarch64_layout_arg): Remove second argument from
8528 aarch64_err_no_fpadvsimd call.
8529 (aarch64_init_cumulative_args): Ditto.
8530 (aarch64_gimplify_va_arg_expr): Ditto.
8531 * config/aarch64/aarch64.md (mov<mode>): Ditto.
8533 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
8535 * config/i386/i386.md (simple_return_indirect_internal): New expander.
8536 (*simple_return_indirect_internal<mode>): Rename from
8537 simple_return_indirect_internal. Use W mode iterator.
8538 (rstorssp): New expander.
8539 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
8540 (clrssbsy): New expander.
8541 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
8543 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
8545 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8547 (cmse_check_pointed_object): Likewise.
8549 2018-06-05 Martin Liska <mliska@suse.cz>
8551 PR gcov-profile/47618
8552 * doc/invoke.texi: Document how -fprofile-dir format
8555 2018-06-05 Richard Biener <rguenther@suse.de>
8557 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8558 removal pretend DOM info isn't available so we do not update
8559 it and only remove edges, not dominated blocks. Actually free
8560 DOM info in case we removed something. Remove unreachable blocks.
8561 (mfb_keep_latches): Work with either DOM info or marked backedges.
8562 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8563 first. Mark backedges if DOM info isn't available.
8564 (Re-)compute DOM info after cleanup_control_flow_pre.
8566 2018-06-05 Richard Biener <rguenther@suse.de>
8568 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8569 (locus_discrim_hasher::hash): Adjust.
8570 (locus_discrim_hasher::equal): Likewise.
8571 (next_discriminator_for_locus): Work on line directly.
8572 (same_line_p): Pass in expanded locus1 as well.
8573 (assign_discriminators): Avoid redundant location expansions.
8575 2018-06-05 Richard Biener <rguenther@suse.de>
8577 PR tree-optimization/86046
8578 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8579 if required after clearing TREE_ADDRESSABLE.
8581 2018-06-05 Richard Biener <rguenther@suse.de>
8583 PR tree-optimization/86047
8584 * tree-ssa-loop.c (for_each_index): Glob handling of all
8585 decls and constants and really handle all of them.
8587 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8590 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8591 qualifier_void_pointer and qualifier_const_void_pointer.
8592 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8593 (arm_init_builtins): Handle the above.
8594 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8595 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8596 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8599 2018-06-05 Martin Liska <mliska@suse.cz>
8601 * auto-profile.c (read_autofdo_file): Do not use
8602 gcov_ctr_summary struct.
8603 (afdo_callsite_hot_enough_for_early_inline): Likewise.
8604 * coverage.c (struct counts_entry): Likewise.
8605 (read_counts_file): Read just single summary entry.
8606 (get_coverage_counts): Use gcov_summary struct.
8607 * coverage.h (get_coverage_counts): Likewise.
8608 * gcov-dump.c (dump_working_sets): Likewise.
8609 (tag_summary): Dump just single summary.
8610 * gcov-io.c (gcov_write_summary): Write just histogram
8612 (gcov_read_summary): Read just single summary.
8613 (compute_working_sets): Use gcov_summary struct.
8614 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8615 of GCOV_COUNTERS_SUMMABLE.
8616 (GCOV_COUNTERS_SUMMABLE): Remove.
8617 (GCOV_FIRST_VALUE_COUNTER): Replace with
8618 GCOV_COUNTER_V_INTERVAL.
8619 (struct gcov_ctr_summary): Remove.
8620 (struct gcov_summary): Directly use fields of former
8622 (compute_working_sets): Use gcov_summary struct.
8623 * gcov.c (read_count_file): Do not use ctrs fields.
8624 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8626 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8628 * profile.c: Likewise.
8629 * profile.h: Likewise.
8631 2018-06-05 Martin Liska <mliska@suse.cz>
8633 PR gcov-profile/84846
8634 * gcov.c (output_lines): Print working directory only
8635 in intermediate format.
8637 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
8639 * config/s390/s390-builtin-types.def: Add void function type.
8640 * config/s390/s390-builtins.def: Use the function type for the
8643 2018-06-04 Jim Wilson <jimw@sifive.com>
8645 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8647 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8648 and maybe_eh_return. Change regno to unsigned int. Use new args to
8649 handle EH_RETURN_DATA_REGNO registers properly.
8650 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8651 (riscv_expand_epilogue): Update comment. Change argument name and
8652 type. Update code to use new name and type. Pass new args to
8653 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
8655 * config/riscv/riscv.md (NORMAL_RETURN): New.
8656 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8657 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8658 (eh_return): Call gen_eh_return_internal and emit barrier.
8659 (eh_return_internal): Call riscv_expand_epilogue.
8661 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
8663 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8664 bit_insertion field and declare can_be_merged_into method.
8665 (merged_store_group::can_be_merged_into): New method.
8666 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8667 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
8668 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8670 2018-06-04 Richard Biener <rguenther@suse.de>
8672 PR tree-optimization/85955
8673 * builtins.c (fold_builtin_sincos): Convert pointers to
8674 destination to appropriate type before dereferencing.
8676 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
8678 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8680 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
8682 * expr.c (expand_expr_real_1): Force the operand into memory if
8683 its TYPE_MODE is BLKmode and if there is no integer mode for
8684 the number of bits being extracted.
8686 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8690 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8691 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8693 2018-06-04 Richard Biener <rguenther@suse.de>
8695 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8696 (cleanup_tree_cfg_noloop): ... single caller. Do
8697 start_recording_case_labels later.
8699 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
8701 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8702 to _IMMINTRIN_H_INCLUDED.
8703 * config/i386/pconfigintrin.h: Ditto.
8704 * config/i386/waitpkgintrin.h: Ditto.
8705 * config/i386/immintrin.h: Add includes for sgxintrin.h,
8706 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8707 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8708 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8709 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8710 waitpkgintrin.h and cldemoteintrin.h.
8712 2018-06-04 Richard Biener <rguenther@suse.de>
8714 PR tree-optimization/86038
8715 * tracer.c (find_best_successor): Check probability for
8716 being initialized, bail out if not.
8718 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
8721 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8722 of bits to ignore when comparing architectures.
8724 2018-06-04 Jakub Jelinek <jakub@redhat.com>
8726 PR tree-optimization/69615
8727 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8728 maximum or minimum of the type, try to merge it also as if
8729 range1 is + [-, x - 1] or + [x + 1, -].
8732 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8734 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
8736 PR tree-optimization/86034
8737 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8738 the unsigned bitfield type in a bit insertion sequence if it does not
8739 have a larger precision than the bitfield size.
8740 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8742 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
8744 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8746 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8748 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8749 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8750 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8751 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8753 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
8755 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8756 Disable -fdelete-null-pointer-checks for ELF toolchain.
8758 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8759 Kito Cheng <kito.cheng@gmail.com>
8761 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8762 (nds32le-*-*, nds32be-*-*): Integrate checking process.
8763 (nds32*-*-*): Add glibc and uclibc conditions.
8764 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8765 (TARGET_EXCEPT_UNWIND_INFO): Define.
8766 * config/nds32/elf.h: New file.
8767 * config/nds32/linux.h: New file.
8768 * config/nds32/nds32-elf.opt: New file.
8769 * config/nds32/nds32-linux.opt: New file.
8770 * config/nds32/nds32-fp-as-gp.c
8771 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8772 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8774 (nds32_asm_file_end): Ditto.
8775 (nds32_print_operand): Ditto.
8776 (nds32_insert_attributes): Ditto.
8777 (nds32_init_libfuncs): New function.
8778 (TARGET_HAVE_TLS): Define.
8779 (TARGET_INIT_LIBFUNCS): Define.
8780 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8782 (TARGET_ELF): Apply different mcmodel setting.
8783 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8784 been migrated into elf.h and linux.h files.
8785 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8786 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8787 (mcmodel): The content has been migrated into nds32-elf.opt and
8788 nds32-linux.opt files.
8789 * config/nds32/t-elf: New file.
8790 * config/nds32/t-linux: New file.
8792 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
8793 Shiva Chen <shiva0217@gmail.com>
8795 * config/nds32/constants.md (unspec_volatile_element): Add
8796 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8797 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8799 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8800 (make_pass_nds32_fp_as_gp): Declare.
8801 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8803 (nds32_asm_function_end_prologue): Remove unused asm output.
8804 (nds32_asm_function_begin_epilogue): Remove unused asm output.
8805 (nds32_asm_file_start): Output necessary fp_as_gp information.
8806 (nds32_option_override): Adjust register usage.
8807 (nds32_expand_prologue): Consider fp_as_gp situation.
8808 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8809 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8812 (simple_return): Ditto.
8813 (omit_fp_begin): Output special directive for fp_as_gp.
8814 (omit_fp_end): Output special directive for fp_as_gp.
8815 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8816 mforbid-fp-as-gp): New options.
8818 2018-06-01 Mark Wielaard <mark@klomp.org>
8820 * dwarf2out.c (dwarf2out_finish): Remove generation of
8821 DW_AT_loclists_base.
8823 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
8825 * gimple-ssa-store-merging.c: Include gimple-fold.h.
8826 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8827 (struct merged_store_group): Add bit_insertion field.
8828 (dump_char_array): Use standard hexadecimal format.
8829 (merged_store_group::merged_store_group): Set bit_insertion to false.
8830 (merged_store_group::apply_stores): Use optimal buffer size. Deal
8831 with BIT_INSERT_EXPR stores. Move up code updating the mask and
8832 also print the mask in the dump file.
8833 (pass_store_merging::gate): Minor tweak.
8834 (imm_store_chain_info::coalesce_immediate): Fix wrong association
8835 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
8836 stores with INTEGER_CST stores.
8837 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8838 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8839 and use it throughout. Generate bit insertion sequences if need be.
8840 (pass_store_merging::process_store): Remove redundant condition.
8841 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8843 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
8845 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8846 the 128-bit floating point types. Fix function comment.
8848 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8850 * config/aarch64/aarch64-simd.md
8851 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8853 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8856 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8858 PR tree-optimization/85989
8859 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8861 (backprop::intersect_uses): Check it when deciding whether this
8862 is a backedge reference.
8863 (backprop::process_block): Add each phi to m_visited_phis
8864 after visiting it, then clear it at the end.
8866 2018-06-01 Richard Biener <rguenther@suse.de>
8868 * tree-vectorizer.h (vect_dr_stmt): New function.
8869 (vect_get_load_cost): Adjust.
8870 (vect_get_store_cost): Likewise.
8871 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8872 Use vect_dr_stmt instead of DR_SMTT.
8873 (vect_record_base_alignments): Likewise.
8874 (vect_calculate_target_alignment): Likewise.
8875 (vect_compute_data_ref_alignment): Likewise and make static.
8876 (vect_update_misalignment_for_peel): Likewise.
8877 (vect_verify_datarefs_alignment): Likewise.
8878 (vector_alignment_reachable_p): Likewise.
8879 (vect_get_data_access_cost): Likewise. Pass down
8880 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8881 (vect_get_peeling_costs_all_drs): Likewise.
8882 (vect_peeling_hash_get_lowest_cost): Likewise.
8883 (vect_enhance_data_refs_alignment): Likewise.
8884 (vect_find_same_alignment_drs): Likewise.
8885 (vect_analyze_data_refs_alignment): Likewise.
8886 (vect_analyze_group_access_1): Likewise.
8887 (vect_analyze_group_access): Likewise.
8888 (vect_analyze_data_ref_access): Likewise.
8889 (vect_analyze_data_ref_accesses): Likewise.
8890 (vect_vfa_segment_size): Likewise.
8891 (vect_small_gap_p): Likewise.
8892 (vectorizable_with_step_bound_p): Likewise.
8893 (vect_prune_runtime_alias_test_list): Likewise.
8894 (vect_analyze_data_refs): Likewise.
8895 (vect_supportable_dr_alignment): Likewise.
8896 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8897 (vect_gen_prolog_loop_niters): Likewise.
8898 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8899 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8901 (vect_recog_mask_conversion_pattern): Likewise.
8902 (vect_try_gather_scatter_pattern): Likewise.
8903 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8904 to vect_get_store_cost.
8905 (vect_get_store_cost): Get stmt_info instead of DR.
8906 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8907 (vect_get_load_cost): Get stmt_info instead of DR.
8909 2018-06-01 Richard Biener <rguenther@suse.de>
8912 * gimple-fold.c (var_decl_component_p): Also allow offsetted
8913 vars wrapped in MEM_REFs.
8915 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
8917 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8918 Fix subreg tests so that we only return a choice between
8919 GENERAL_REGS and FP_REGS if the original classes included both.
8921 2018-06-01 Richard Biener <rguenther@suse.de>
8924 * tree-ssa-structalias.c (get_function_part_constraint):
8925 Handle NULL fi->decl.
8926 (find_func_aliases_for_call): Properly handle indirect
8927 fi from direct call.
8928 (find_func_clobbers): Likewise.
8929 (ipa_pta_execute): Likewise.
8930 (create_variable_info_for): For functions that are ifunc_resolver
8931 resolve to a varinfo that contains the result of the resolver call.
8932 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8935 2018-05-31 Michael Collison <michael.collison@arm.com>
8937 * config/aarch64/aarch64.md:
8938 (*fix_to_zero_extenddfdi2): New pattern.
8939 * gcc.target/aarch64/fix_extend1.c: New testcase.
8941 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
8945 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8946 and BUILT_IN_STRNCMP_EQ.
8947 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8948 BUILT_IN_STRNCMP_EQ.
8949 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8950 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8951 (gimple_fold_builtin): Likewise.
8952 * tree-ssa-strlen.c (compute_string_length): New function.
8953 (determine_min_obsize): New function.
8954 (handle_builtin_string_cmp): New function to handle calls to
8955 string compare functions.
8956 (strlen_optimize_stmt): Add handling to builtin string compare
8958 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8959 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8960 * tree.c (build_common_builtin_nodes): Add new defines of
8961 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8963 2018-05-31 Jakub Jelinek <jakub@redhat.com>
8966 * bb-reorder.c (pass_partition_blocks::gate): Return false for
8967 functions with naked attribute.
8969 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
8971 * config/i386/sse.md (avx_vec_concat<mode>):
8972 Substitute concat_tg_mode mode attribute with xtg_mode.
8973 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8974 (concat_tg_mode): Remove mode attribute.
8976 2018-05-31 Martin Sebor <msebor@redhat.com>
8979 * calls.c (alloc_max_size): Correct a logic error/typo.
8980 Treat excessive arguments as infinite. Warn for invalid arguments.
8981 * doc/invoke.texi (-Walloc-size-larger-than): Update.
8983 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
8986 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8987 and movx for Haswell.
8989 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
8990 Cesar Philippidis <cesar@codesourcery.com>
8993 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8994 when emitting error on private/firstprivate reductions.
8995 * omp-low.c (lower_omp_target): Avoid reference-type processing
8996 on pointers for firstprivate clause.
8998 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9000 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
9003 * config/aarch64/aarch64-simd.md
9004 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
9005 (aarch64_ld1_x3_<mode>): Likewise
9006 (aarch64_st1x2<VALLDIF:mode>): Likewise
9007 (aarch64_st1_x2_<mode>): Likewise
9008 (aarch64_st1x3<VALLDIF:mode>): Likewise
9009 (aarch64_st1_x3_<mode>): Likewise
9010 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
9011 (vld1_s8_x3): Likewise.
9012 (vld1_u16_x3): Likewise.
9013 (vld1_s16_x3): Likewise.
9014 (vld1_u32_x3): Likewise.
9015 (vld1_s32_x3): Likewise.
9016 (vld1_u64_x3): Likewise.
9017 (vld1_s64_x3): Likewise.
9018 (vld1_f16_x3): Likewise.
9019 (vld1_f32_x3): Likewise.
9020 (vld1_f64_x3): Likewise.
9021 (vld1_p8_x3): Likewise.
9022 (vld1_p16_x3): Likewise.
9023 (vld1_p64_x3): Likewise.
9024 (vld1q_u8_x3): Likewise.
9025 (vld1q_s8_x3): Likewise.
9026 (vld1q_u16_x3): Likewise.
9027 (vld1q_s16_x3): Likewise.
9028 (vld1q_u32_x3): Likewise.
9029 (vld1q_s32_x3): Likewise.
9030 (vld1q_u64_x3): Likewise.
9031 (vld1q_s64_x3): Likewise.
9032 (vld1q_f16_x3): Likewise.
9033 (vld1q_f32_x3): Likewise.
9034 (vld1q_f64_x3): Likewise.
9035 (vld1q_p8_x3): Likewise.
9036 (vld1q_p16_x3): Likewise.
9037 (vld1q_p64_x3): Likewise.
9038 (vst1_s64_x2): Likewise.
9039 (vst1_u64_x2): Likewise.
9040 (vst1_f64_x2): Likewise.
9041 (vst1_s8_x2): Likewise.
9042 (vst1_p8_x2): Likewise.
9043 (vst1_s16_x2): Likewise.
9044 (vst1_p16_x2): Likewise.
9045 (vst1_s32_x2): Likewise.
9046 (vst1_u8_x2): Likewise.
9047 (vst1_u16_x2): Likewise.
9048 (vst1_u32_x2): Likewise.
9049 (vst1_f16_x2): Likewise.
9050 (vst1_f32_x2): Likewise.
9051 (vst1_p64_x2): Likewise.
9052 (vst1q_s8_x2): Likewise.
9053 (vst1q_p8_x2): Likewise.
9054 (vst1q_s16_x2): Likewise.
9055 (vst1q_p16_x2): Likewise.
9056 (vst1q_s32_x2): Likewise.
9057 (vst1q_s64_x2): Likewise.
9058 (vst1q_u8_x2): Likewise.
9059 (vst1q_u16_x2): Likewise.
9060 (vst1q_u32_x2): Likewise.
9061 (vst1q_u64_x2): Likewise.
9062 (vst1q_f16_x2): Likewise.
9063 (vst1q_f32_x2): Likewise.
9064 (vst1q_f64_x2): Likewise.
9065 (vst1q_p64_x2): Likewise.
9066 (vst1_s64_x3): Likewise.
9067 (vst1_u64_x3): Likewise.
9068 (vst1_f64_x3): Likewise.
9069 (vst1_s8_x3): Likewise.
9070 (vst1_p8_x3): Likewise.
9071 (vst1_s16_x3): Likewise.
9072 (vst1_p16_x3): Likewise.
9073 (vst1_s32_x3): Likewise.
9074 (vst1_u8_x3): Likewise.
9075 (vst1_u16_x3): Likewise.
9076 (vst1_u32_x3): Likewise.
9077 (vst1_f16_x3): Likewise.
9078 (vst1_f32_x3): Likewise.
9079 (vst1_p64_x3): Likewise.
9080 (vst1q_s8_x3): Likewise.
9081 (vst1q_p8_x3): Likewise.
9082 (vst1q_s16_x3): Likewise.
9083 (vst1q_p16_x3): Likewise.
9084 (vst1q_s32_x3): Likewise.
9085 (vst1q_s64_x3): Likewise.
9086 (vst1q_u8_x3): Likewise.
9087 (vst1q_u16_x3): Likewise.
9088 (vst1q_u32_x3): Likewise.
9089 (vst1q_u64_x3): Likewise.
9090 (vst1q_f16_x3): Likewise.
9091 (vst1q_f32_x3): Likewise.
9092 (vst1q_f64_x3): Likewise.
9093 (vst1q_p64_x3): Likewise.
9095 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9097 * config/msp430/msp430.c (msp430_output_labelref): Prepend
9098 user_label_prefix to name.
9100 * tree-core.h: Update comment about the format of NAME string
9101 passed to handler in attribute_spec.
9103 * config/msp430/msp430.md: Remove erroneous subreg expression from
9104 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9105 zero_extend{q,h}isi2.
9107 2018-05-30 Borislav Petkov <bp@suse.de>
9109 * doc/extend.texi: Document some architecture specific
9110 constraints and sort entries.
9112 2018-05-30 Martin Sebor <msebor@redhat.com>
9115 * builtins.c (expand_builtin_stpcpy_1): New function.
9116 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9117 only if the former succeeds.
9119 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
9121 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9124 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9126 * doc/invoke.texi (-flinker-output): Document
9128 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9130 * passes.c (ipa_write_summaries): Only modify statements if body
9132 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9133 incrementally linking.
9134 (ipa_passes): Likewise.
9135 * lto-cgraph.c (lto_output_node): When incrementally linking do not
9136 pass down resolution info.
9137 * common.opt (flag_incremental_link): Update info.
9138 * gcc.c (plugin specs): Turn flinker-output=* to
9139 -plugin-opt=-linker-output-known
9140 * toplev.c (compile_file): Also cut compilation when doing incremental
9142 * flag-types. (enum lto_partition_model): Add
9143 LTO_LINKER_OUTPUT_NOLTOREL.
9144 (invoke.texi): Add -flinker-output docs.
9145 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9146 link same way as WPA; do not stream in dead initializers.
9148 * dwarf2out.c (dwarf2out_die_ref_for_decl,
9149 darf2out_register_external_decl): Support incremental link.
9151 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9153 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9155 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
9157 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9158 it down to simple_object_copy_lto_debug_sections.
9159 (run_gcc): Determine incremental LTO link time and configure
9160 lto1 into non-wpa mode, disable renaming of debug sections.
9162 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
9164 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9165 descriptions of various incorrectly documented functions.
9167 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
9170 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9171 address check not strict.
9173 2018-05-30 Richard Biener <rguenther@suse.de>
9175 PR tree-optimization/85964
9176 * tracer.c (better_p): Drop initialized count check, we only
9177 call the function with initialized counts now.
9178 (find_best_successor): Do find a best edge if one
9179 has uninitialized count.
9180 (find_best_predecessor): Likewise. Do BB frequency check only
9181 if count is initialized.
9183 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
9185 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9186 (aarch64_ldrstr_offset_compare): New.
9187 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9188 load/store orderings.
9189 (aarch64_gen_adjusted_ldpstp): Likewise.
9191 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
9193 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9194 Check for subset of GENERAL_REGS and FP_REGS.
9195 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9198 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
9200 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9201 and wi::to_poly_offset. Add the current offset and then check
9202 whether the sum fits, rather than using an unchecked addition of
9203 a checked term. Check for a shwi rather than a uhwi.
9204 * expr.c (get_bit_range): Use tree_to_poly_uint64.
9205 (store_constructor): Use poly_int_tree_p.
9206 (expand_expr_real_1): Likewise.
9207 * function.c (assign_temp): Likewise.
9208 * fold-const.c (const_binop): Use poly_int_tree_p and
9210 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
9212 * ipa-icf-gimple.c (func_checker::compare_operand): Use
9213 to_poly_offset for MEM offsets.
9214 * ipa-icf.c (sem_variable::equals): Likewise.
9215 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9216 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9217 wi::to_poly_offset for BIT_FIELD_REF offsets.
9218 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9220 * var-tracking.c (emit_note_insn_var_location): Use
9221 tree_to_poly_uint64.
9223 2018-05-29 Jim Wilson <jimw@sifive.com>
9225 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9227 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
9230 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9231 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9233 (sse4_1_round<mode>2): Use nonimmediate_operand
9234 for operand 1 predicate.
9236 2018-05-29 Martin Sebor <msebor@redhat.com>
9237 Richard Biener <rguenther@suse.de>
9240 * calls.c (get_size_range): Call determine_value_range instead
9241 of get_value_range..
9242 * tree-vrp.h (determine_value_range): Declared new function.
9243 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9245 2018-05-29 Richard Biener <rguenther@suse.de>
9247 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9248 sure to use non-pattern stmts for get_earlier_stmt arguments.
9249 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9250 called on pattern stmts.
9251 (get_later_stmt): Likewise.
9253 2018-05-29 Martin Liska <mliska@suse.cz>
9255 PR gcov-profile/85759
9256 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9259 2018-05-29 Jakub Jelinek <jakub@redhat.com>
9261 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9263 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9267 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9268 VEC_PACK_FLOAT_EXPR): New tree codes.
9269 * tree-pretty-print.c (op_code_prio): Handle
9270 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9271 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9272 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9273 * tree-inline.c (estimate_operator_cost): Likewise.
9274 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9275 * fold-const.c (const_binop): Likewise.
9276 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9277 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9278 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9279 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9280 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9281 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9282 * expr.c (expand_expr_real_2): Likewise.
9283 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9284 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9285 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9287 * optabs.c (expand_widen_pattern_expr): For
9288 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9289 sign from result type rather than operand's type.
9290 (expand_binop_directly): For vec_packu_float_optab and
9291 vec_packs_float_optab allow result type to be different from operand's
9293 * optabs-tree.c (optab_for_tree_code): Handle
9294 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9295 VEC_PACK_FLOAT_EXPR. Formatting fixes.
9296 * tree-vect-generic.c (expand_vector_operations_1): Handle
9297 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9298 VEC_PACK_FLOAT_EXPR.
9299 * tree-vect-stmts.c (supportable_widening_operation): Handle
9301 (supportable_narrowing_operation): Handle FLOAT_EXPR.
9302 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9303 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9304 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
9305 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9307 (vec_pack<floatprefix>_float_<mode>): New expander.
9308 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9310 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9311 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9312 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9313 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9314 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9316 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9317 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9318 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9319 VEC_PACK_FLOAT_EXPR): Document.
9321 2018-05-29 Richard Biener <rguenther@suse.de>
9323 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9325 (stmt_vec_info_vec): Make pointer.
9326 (init_stmt_vec_info_vec): Remove.
9327 (free_stmt_vec_info_vec): Likewise.
9328 (set_stmt_vec_info_vec): New function.
9329 (free_stmt_vec_infos): Likewise.
9330 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9331 (set_vinfo_for_stmt): Likewise.
9332 (get_earlier_stmt): Likewise.
9333 (get_later_stmt): Likewise.
9334 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9335 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9336 (vec_info::~vec_info): Free stmt_vec_infos.
9337 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9338 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9339 (pass_slp_vectorize::execute): Likewise.
9340 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9341 (free_stmt_vec_info_vec): Likewise.
9342 (set_stmt_vec_info_vec): New function.
9343 (free_stmt_vec_infos): Likewise.
9344 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9345 the global stmt_vec_info_vec.
9346 * tree-parloops.c (gather_scalar_reductions): Use
9347 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9350 2018-05-29 Richard Biener <rguenther@suse.de>
9352 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9354 2018-05-29 Martin Liska <mliska@suse.cz>
9355 David Malcolm <dmalcolm@redhat.com>
9357 * vec.c (test_reverse): New.
9358 (vec_c_tests): Add new test.
9359 * vec.h (vl_ptr>::reverse): New function.
9361 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
9363 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9365 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9368 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
9370 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9372 2018-05-28 Richard Biener <rguenther@suse.de>
9374 PR tree-optimization/85933
9375 * tree-vect-data-refs.c (vect_record_base_alignments): Only
9376 look at stmts marked as vectorizable.
9378 2018-05-28 Richard Biener <rguenther@suse.de>
9380 PR tree-optimization/85934
9381 * tree-vect-generic.c (expand_vector_operations_1): Hoist
9382 vector boolean check before scalar optimization.
9384 2018-05-28 Jakub Jelinek <jakub@redhat.com>
9386 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9389 2018-05-28 Mark Wielaard <mark@klomp.org>
9391 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9392 if it is an expression containing a minus sign.
9394 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
9396 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9398 2018-05-27 Paul Koning <ni1d@arrl.net>
9400 * config/pdp11/pdp11.md (truncsihi2): Remove.
9402 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
9403 Chung-Ju Wu <jasonwucj@gmail.com>
9405 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9407 (unaligned_store_dw): Ditto.
9408 * config/nds32/nds32-memory-manipulation.c
9409 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9410 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9411 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9412 (emit_setmem_word_loop): Rename to ...
9413 (emit_setmem_doubleword_loop): ... this.
9414 (nds32_gen_dup_4_byte_to_word_value): New function.
9415 (nds32_gen_dup_8_byte_to_double_word_value): New function.
9416 (nds32_expand_setmem_loop): Refine implementation.
9417 (nds32_expand_setmem_loop_v3m): Ditto.
9418 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9421 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9423 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9425 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
9427 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9428 (nds32_init_machine_status): Initialize machine->attr_naked_p and
9429 machine->attr_no_prologue_p.
9430 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9431 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9432 (nds32_expand_epilogue): Consider attr_naked_p.
9433 (nds32_expand_epilogue_v3pop): Likewise.
9434 (nds32_can_use_return_insn): Likewise.
9435 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9436 attr_no_prologue_p fields.
9437 * config/nds32/nds32.opt (mret-in-naked-func): New option.
9439 2018-05-27 Jakub Jelinek <jakub@redhat.com>
9442 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9444 * config/i386/sse.md
9445 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9447 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9449 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9451 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9453 (*<floatsuffix>floatv2div2sf2): Rename to ...
9454 (*float<floatunssuffix>v2div2sf2): ... this.
9455 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9456 (float<floatunssuffix>v2div2sf2_mask): ... this.
9457 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9458 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9459 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9461 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9463 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9465 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9467 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9469 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9471 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9472 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9473 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9474 gen_ufix_truncv8dfv8si2.
9475 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9476 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9477 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9478 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9479 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9480 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9481 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9482 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9484 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9488 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9490 2018-05-25 Jim Wilson <jimw@sifive.com>
9492 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9493 * config/riscv/riscv.c (struct machine_function): Add
9494 interrupt_handler_p and attribute_checked_p fields.
9495 (riscv_attribute_table): Add interrupt.
9496 (riscv_interrupt_type_p): New.
9497 (riscv_save_reg_p): Save extra regs for interrupt handler.
9498 (riscv_use_save_libcall): Return false for interrupt handler.
9499 (riscv_first_stack_step): Add forward declaration.
9500 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
9501 for interrupt handler with large frame. Use it for saved reg list.
9502 (riscv_expand_prologue): Move flag_stack_usage_info support to
9503 eliminate duplication.
9504 (riscv_expand_epilogue): Generate mret for interrupt handler.
9505 (riscv_epilogue_uses): New.
9506 (riscv_can_use_return_insn): Return false for interrupt handler.
9507 (riscv_function_ok_for_sibcall): Likewise.
9508 (riscv_set_current_function): Add interrupt handler support.
9509 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9510 * config/riscv/riscv.md (UNSPECV_MRET): New.
9512 (riscv_frflags, riscv_fsflags): Use tab after opcode.
9514 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9516 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
9518 PR tree-optimization/85712
9519 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9520 this candidate has already been replaced in-situ by a copy.
9522 2018-05-25 Jason Merrill <jason@redhat.com>
9524 PR c++/80485 - inline function non-zero address.
9525 * symtab.c (nonzero_address): Check DECL_COMDAT.
9527 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
9530 * config/alpha/alpha.md (ashlsi3): New insn pattern.
9531 (*ashlsi_se): Rename from *ashldi_se. Define as sign
9532 extension of SImode operation. Use const123_operand predicate.
9533 (*saddsi_1): Remove.
9534 (*saddl_se_1): Ditto.
9536 (*ssubl_se_1): Ditto.
9537 * config/alpha/predicates.md (const123_operand): New predicate.
9538 * config/alpha/constraints.md (P): Use IN_RANGE.
9540 2018-05-25 Richard Biener <rguenther@suse.de>
9542 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9544 (ref_maybe_used_by_stmt_p): Likewise.
9545 (stmt_may_clobber_ref_p): Likewise.
9546 (stmt_may_clobber_ref_p_1): Likewise.
9547 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9549 (ref_maybe_used_by_stmt_p): Likewise.
9550 (stmt_may_clobber_ref_p): Likewise.
9551 (stmt_may_clobber_ref_p_1): Likewise.
9552 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9553 the alias oracle to disambiguate DRs with stmts DR analysis
9555 (vect_analyze_data_refs): Do not give up on not analyzable
9556 DRs for BB vectorization. Remove code truncating the dataref
9559 2018-05-25 Jakub Jelinek <jakub@redhat.com>
9562 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9563 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
9564 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9566 2018-05-25 Richard Biener <rguenther@suse.de>
9568 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9569 function, combining stmt data ref gathering and fatal analysis
9571 (vect_analyze_data_refs): Remove now redudnant code and simplify.
9572 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9573 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9574 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9575 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9577 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9579 PR tree-optimization/85720
9580 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9581 SCC if all partitions are builtins.
9582 (version_loop_by_alias_check): New parameter. Generate cancelable
9583 runtime alias check if all partitions are builtins.
9584 (distribute_loop): Update call to above function.
9586 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9588 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9589 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9590 (parm_default_def_partition_arg): Ditto.
9591 (set_parm_default_def_partition): Ditto.
9592 (get_parm_default_def_partitions): Ditto and make it static.
9593 (get_undefined_value_partitions): Ditto and make it static.
9594 (remove_ssa_form): Refactor call to init_var_map here.
9595 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9596 computation for loop region.
9597 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9598 (register_default_def): Delete.
9599 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9600 (parm_default_def_partition_arg): Ditto.
9601 (set_parm_default_def_partition): Ditto.
9602 (get_parm_default_def_partitions): Ditto and make it static.
9603 (get_undefined_value_partitions): Ditto and make it static.
9604 (coalesce_with_default, coalesce_with_default): Update comment.
9605 (create_coalesce_list_for_region): New func factored out from
9606 create_outofssa_var_map.
9607 (populate_coalesce_list_for_outofssa): New func factored out from
9608 create_outofssa_var_map and coalesce_ssa_name.
9609 (create_outofssa_var_map): Delete.
9610 (coalesce_ssa_name): Refactor to support live range computation.
9611 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9612 (get_parm_default_def_partitions): Delete.
9613 (get_undefined_value_partitions): Ditto.
9614 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9615 computation for loop region.
9616 (new_tree_live_info, loe_visit_block): Ditto.
9617 (live_worklist, set_var_live_on_entry): Ditto.
9618 (calculate_live_on_exit, verify_live_on_entry): Ditto.
9619 * tree-ssa-live.h (struct _var_map): New fields.
9620 (init_var_map): Change decl.
9621 (region_contains_p): New.
9623 2018-05-25 Bin Cheng <bin.cheng@arm.com>
9625 * tree-ssa-live.h (live_merge_and_clear): Delete.
9627 2018-05-25 Richard Biener <rguenther@suse.de>
9630 * tree-dump.c (dequeue_and_dump): Remove access to removed
9631 operand 2 of a SWITCH_EXPR.
9633 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9635 * doc/sourcebuild.texi (vect_double_cond_arith): Include
9636 multiplication and division.
9637 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9638 (cond_udiv@var{m}, cond_umod@var{m}): Document.
9639 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9640 (cond_udiv_optab, cond_umod_optab): New optabs.
9641 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9642 (IFN_COND_RDIV): New internal functions.
9643 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9644 TRUNC_MOD_EXPR and RDIV_EXPR.
9645 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9646 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9648 (SVE_INT_BINARY): Include mult.
9649 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9650 (optab, sve_int_op): Handle mult.
9651 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9653 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9654 for SVE_INT_BINARY_SD.
9656 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9658 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9659 (optab, sve_int_op): Handle div and udiv.
9660 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9661 for SVE_INT_BINARY_SD.
9662 (*<optab><mode>3): New insn for the same.
9664 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9666 * tree-vect-patterns.c: Include predict.h.
9667 (vect_recog_divmod_pattern): Restrict check for division support
9668 to when optimizing for size.
9670 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9672 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9673 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9674 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9675 (gimple_match_op::set_op): Likewise.
9676 (gimple_resimplify4): Declare.
9677 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9678 (expr::gen_transform): Likewise.
9679 (decision_tree::gen): Generate a simplification routine for 4 operands.
9680 * gimple-match-head.c (gimple_simplify): Add an overload for
9681 4 operands. In the top-level function, handle up to 4 call
9682 arguments and call gimple_resimplify4.
9683 (gimple_resimplify4): New function.
9684 (build_call_internal): Pass a fourth operand.
9685 (maybe_push_to_seq): Likewise.
9686 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9687 Fold VEC_COND_EXPRs of an operation and a default value into
9688 an IFN_COND_* function if possible.
9689 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9691 (SVE_COND_FP_BINARY): Include them.
9692 (optab, sve_fp_op): Handle them.
9693 (SVE_INT_BINARY_REV): New code iterator.
9694 (SVE_COND_FP_BINARY_REV): New int iterator.
9695 (commutative): New int attribute.
9696 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9698 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9700 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9701 (*cond_<optab><mode>): New patterns for reversed operands.
9703 2018-05-25 Richard Biener <rguenther@suse.de>
9705 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9706 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9707 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9708 (STMT_VINFO_GROUPED_ACCESS): Adjust.
9709 * tree-vect-data-refs.c (everywhere): Adjust users.
9710 * tree-vect-loop.c (everywhere): Likewise.
9711 * tree-vect-slp.c (everywhere): Likewise.
9712 * tree-vect-stmts.c (everywhere): Likewise.
9713 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9715 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9717 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9719 (gcc_cv_as_section_exclude): ... this.
9720 Try Solaris as #exclude syntax.
9721 * configure: Regenerate.
9722 * config.in: Regenerate.
9723 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9725 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9726 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9728 * varasm.c (default_elf_asm_named_section): Don't check if
9729 HAVE_GAS_SECTION_EXCLUDE is defined.
9731 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9733 * doc/md.texi: Update the documentation of the cond_* optabs
9734 to mention the new final operand. Fix GET_MODE_NUNITS call.
9735 Describe the scalar case too.
9736 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9737 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9739 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9740 (get_conditional_internal_fn): Update comment.
9741 * tree-vect-loop.c (vectorizable_reduction): Pass the original
9742 accumulator value as a final argument to conditional functions.
9743 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9744 a define_expand and add an "else" operand. Assert for now that
9745 the else operand is equal to operand 2. Use SVE_INT_BINARY and
9746 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9747 (*cond_<optab><mode>): New patterns.
9748 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9749 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9750 (UNSPEC_COND_EOR): Delete.
9751 (optab): Remove associated mappings.
9752 (SVE_INT_BINARY): New code iterator.
9753 (sve_int_op): Remove int attribute and add "minus" to the code
9755 (SVE_COND_INT_OP): Delete.
9756 (SVE_COND_FP_OP): Rename to...
9757 (SVE_COND_FP_BINARY): ...this.
9759 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
9761 * optabs.c (can_reuse_operands_p): New function.
9762 (maybe_legitimize_operands): Try to reuse the results for
9765 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9767 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9768 Add {q} suffix to insn mnemonic.
9770 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9772 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9773 (msp430_warn_func_return): New.
9775 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
9777 * fold-const.c (tree_nonzero_bits): New function.
9778 * fold-const.h (tree_nonzero_bits): Likewise.
9779 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9780 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9782 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
9786 * varasm.c (assemble_alias): Check ifunc_resolver only on
9789 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
9792 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9793 when memory input operand is handled.
9795 2018-05-24 Luis Machado <luis.machado@linaro.org>
9797 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9799 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9801 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9803 * match.pd: Delay FMA folds until after vectorization.
9805 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
9808 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9809 address check not strict.
9811 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
9813 * gimple-match.h (gimple_match_op): New class.
9814 (mprts_hook): Replace parameters with a gimple_match_op *.
9815 (maybe_build_generic_op): Likewise.
9816 (gimple_simplified_result_is_gimple_val): Replace parameters with
9817 a const gimple_match_op *.
9818 (gimple_simplify): Replace code_helper * and tree * parameters with
9819 a gimple_match_op * parameter.
9820 (gimple_resimplify1): Replace code_helper *, tree and tree *
9821 parameters with a gimple_match_op * parameter.
9822 (gimple_resimplify2): Likewise.
9823 (gimple_resimplify3): Likewise.
9824 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9825 parameters with a gimple_match_op * parameter.
9826 * gimple-match-head.c (gimple_simplify): Change prototypes of
9827 auto-generated functions to take a gimple_match_op * instead of
9828 separate code_helper * and tree * parameters. Make the same
9829 change in the top-level overload and update calls to the
9830 gimple_resimplify routines. Update calls to the auto-generated
9831 functions and to maybe_push_res_to_seq in the publicly-facing
9832 operation-specific gimple_simplify overloads.
9833 (gimple_match_op::MAX_NUM_OPS): Define.
9834 (gimple_resimplify1): Replace rcode and ops with a single res_op
9835 parameter. Update call to gimple_simplify.
9836 (gimple_resimplify2): Likewise.
9837 (gimple_resimplify3): Likewise.
9838 (mprts_hook): Replace parameters with a gimple_match_op *.
9839 (maybe_build_generic_op): Likewise.
9840 (build_call_internal): Replace type, nargs and ops with
9841 a gimple_match_op *.
9842 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9843 with a single gimple_match_op *. Update calls to mprts_hook,
9844 build_call_internal and gimple_simplified_result_is_gimple_val.
9845 Factor out code that is common to the tree_code and combined_fn cases.
9846 * genmatch.c (expr::gen_transform): Replace tem_code and
9847 tem_ops with a gimple_match_op called tem_op. Update calls
9848 to the gimple_resimplify functions and maybe_push_res_to_seq.
9849 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9850 res_ops. Update call to the gimple_resimplify functions.
9851 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9852 (decision_tree::gen): Make the functions take a gimple_match_op *
9853 called res_op instead of separate res_code and res_ops parameters.
9854 Update call accordingly.
9855 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9856 and ops with a single res_op parameter. Update calls to
9857 maybe_build_generic_op and maybe_push_res_to_seq.
9858 (fold_stmt_1): Update calls to gimple_simplify and
9859 replace_stmt_with_simplification.
9860 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9861 and gimple_simplified_result_is_gimple_val.
9862 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9864 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9865 with a gimple_match_op *.
9866 (vn_nary_build_or_lookup): Likewise. Update call to
9867 vn_nary_build_or_lookup_1.
9868 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9869 gimple_match_op *. Update calls to the gimple_resimplify routines
9870 and to gimple_simplified_result_is_gimple_val.
9871 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9872 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9873 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9874 (visit_nary_op): Likewise.
9875 (visit_reference_op_load): Likewise.
9877 2018-05-23 Luis Machado <luis.machado@linaro.org>
9879 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9880 modifier for printing the step amount.
9882 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
9885 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9888 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
9890 * doc/sourcebuild.texi (Endianness): New subsubsection.
9892 2018-05-23 Luis Machado <luis.machado@linaro.org>
9894 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9895 <prefetch_dynamic_strides>: New const bool field.
9896 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9897 prefetch_dynamic_strides.
9898 (exynosm1_prefetch_tune): Likewise.
9899 (thunderxt88_prefetch_tune): Likewise.
9900 (thunderx_prefetch_tune): Likewise.
9901 (thunderx2t99_prefetch_tune): Likewise.
9902 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9904 (aarch64_override_options_internal): Update to set
9905 PARAM_PREFETCH_DYNAMIC_STRIDES.
9906 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9907 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9908 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9909 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9910 prefetch-dynamic-strides setting.
9912 2018-05-23 Luis Machado <luis.machado@linaro.org>
9914 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9915 <minimum_stride>: New const int field.
9916 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9917 minimum_stride field defaulting to -1.
9918 (exynosm1_prefetch_tune): Likewise.
9919 (thunderxt88_prefetch_tune): Likewise.
9920 (thunderx_prefetch_tune): Likewise.
9921 (thunderx2t99_prefetch_tune): Likewise.
9922 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9923 <default_opt_level>: Set to 3.
9924 (aarch64_override_options_internal): Update to set
9925 PARAM_PREFETCH_MINIMUM_STRIDE.
9926 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9927 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9928 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9929 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9930 stride is constant and is below the minimum stride threshold.
9932 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9934 * config/arm/arm-cpus.in (mode26): Delete.
9935 (armv4): Delete mode26 reference.
9936 * config/arm/arm.c (arm_configure_build_target): Delete use of
9939 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9941 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9943 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9944 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
9946 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
9947 (floatunsdidf2): Ditto.
9949 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
9951 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9952 (fixuns_trunc<mode>si2_avx512f): Ditto.
9953 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9954 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9955 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9957 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9959 PR rtl-optimization/79985
9960 * df-scan.c (df_insn_refs_collect): Remove special case for
9961 global registers and asm statements.
9963 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
9965 * extend.texi (Global Register Variables): Rewrite the bullet list.
9966 Note that the register is available for allocation. Note that access
9967 via inline asm must use constraints. Add note about async-signal
9968 handlers. Remove paragraph about automagic register selection.
9970 2018-05-23 Richard Biener <rguenther@suse.de>
9972 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9973 of fixed offset from memset VN.
9975 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
9977 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9979 (alloc_cand_and_find_basis): Initialize first_interp field.
9980 (slsr_process_mul): Modify first_interp field.
9981 (slsr_process_add): Likewise.
9982 (slsr_process_cast): Modify first_interp field for each new
9984 (slsr_process_copy): Likewise.
9985 (dump_candidate): Dump first_interp field.
9986 (replace_mult_candidate): Process all interpretations, not just
9988 (replace_rhs_if_not_dup): Likewise.
9989 (replace_one_candidate): Likewise.
9991 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
9993 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9995 (aarch64_needs_frame_chain): New function.
9996 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9998 2018-05-23 Sudakshina Das <sudi.das@arm.com>
10001 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
10002 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
10003 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
10004 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
10005 as true for strict-align.
10006 (aarch64_can_inline_p): Perform checks even when callee has no
10007 attributes to check for strict alignment.
10008 * doc/extend.texi (AArch64 Function Attributes): Document
10010 * doc/invoke.texi: (AArch64 Options): Likewise.
10012 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
10014 PR tree-optimization/85853
10015 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
10016 the handling of the root of the node to...
10017 (vect_slp_analyze_node_operations_1): ...this new function,
10018 and run the whole thing with the child nodes' def types
10019 set according to their SLP node's def type.
10021 2018-05-23 Richard Biener <rguenther@suse.de>
10023 PR middle-end/85874
10024 * tree-data-ref.c (create_runtime_alias_checks): Defer
10025 and ignore overflow warnings.
10027 2018-05-23 Yury Gribov <tetra2005@gmail.com>
10029 PR tree-optimization/85822
10030 * tree-vrp.c (is_masked_range_test): Fix handling of negative
10033 2018-05-23 Richard Biener <rguenther@suse.de>
10035 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10036 memset constants via native_interpret_expr.
10038 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
10041 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
10043 (cgraph_node::create_alias): Likewise.
10044 (cgraph_node::get_availability): Check ifunc_resolver instead
10045 of looking up ifunc attribute.
10046 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10047 * varasm.c (do_assemble_alias): Likewise.
10048 (assemble_alias): Likewise.
10049 (default_binds_local_p_3): Likewise.
10050 * cgraph.h (cgraph_node): Add ifunc_resolver.
10051 (cgraph_node::only_called_directly_or_aliased_p): Return false
10052 for IFUNC resolver.
10053 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
10055 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
10056 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
10057 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
10058 instead of looking up ifunc attribute.
10060 2018-05-22 Luis Machado <luis.machado@linaro.org>
10062 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
10064 2018-05-22 Martin Sebor <msebor@redhat.com>
10066 PR middle-end/85359
10067 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
10068 only when expasion succeeds.
10069 (expand_builtin_strcmp): Same.
10070 (expand_builtin_strncmp): Same.
10072 2018-05-22 Martin Sebor <msebor@redhat.com>
10074 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
10076 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10077 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10079 * config/aarch64/aarch64-ldpstp.md: Replace uses of
10080 aarch64_mem_pair_operand with memory_operand and delete operand swapping
10082 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10083 Add check for legitimate_address.
10084 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10085 (aarch64_swap_ldrstr_operands): New.
10086 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10089 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
10090 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10092 * config/aarch64/aarch64.md: New patterns to generate stp
10094 (store_pair_sw, store_pair_dw): New patterns to generate stp for
10095 single words and double words.
10096 (load_pair_sw, load_pair_dw): Likewise.
10097 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10099 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10101 * config/aarch64/aarch64-ldpstp.md: Modify peephole
10102 for different mode ldpstp and add peephole for merged zero stores.
10103 Likewise for loads.
10104 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10106 (aarch64_gen_store_pair): Rename calls to match new patterns.
10107 (aarch64_gen_load_pair): Rename calls to match new patterns.
10108 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10109 (load_pair<DREG:mode><DREG2:mode>): ... This.
10110 (store_pair<mode>): Rename to...
10111 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10112 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10113 New mode iterators.
10114 (V_INT_EQUIV): Handle SImode.
10115 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10118 2018-05-22 Martin Sebor <msebor@redhat.com>
10121 * calls.c (maybe_warn_nonstring_arg): Use string length to set
10122 or ajust the presumed bound on an operation to avoid unnecessary
10125 2018-05-22 Martin Sebor <msebor@redhat.com>
10127 PR tree-optimization/85826
10128 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10129 assuming that a DECL necesarily has a constant size.
10131 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
10133 PR middle-end/85862
10134 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10136 2018-05-22 Richard Biener <rguenther@suse.de>
10138 PR tree-optimization/85834
10139 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10140 non-constant and non-zero memset arguments.
10142 2018-05-22 Martin Liska <mliska@suse.cz>
10145 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10147 2018-05-22 Richard Biener <rguenther@suse.de>
10149 PR tree-optimization/85863
10150 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10151 comparisons when vectype is specified.
10152 (vectorizable_condition): Do not specify vectype for
10153 vect_is_simple_cond when SLP vectorizing.
10155 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
10158 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10159 define __ibm128 as long double.
10160 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10161 as a distinct type when IEEE 128-bit support is enabled.
10162 (init_float128_ieee): Fix up conversions between IFmode and IEEE
10163 128-bit types to use the correct functions.
10164 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10165 convert between 128-bit floating point types that have different
10166 modes but the same representation, instead of using gen_lowpart to
10168 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10170 (IFKF_reg): New attributes to give the register constraints for
10172 (extend<mode>tf2_internal): New insns to mark an explicit
10173 conversion between 128-bit floating point types that have a
10174 different mode but share the same representation.
10176 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
10178 PR tree-optimization/85814
10179 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10180 a null return from get_strinfo when unsharing the next
10181 strinfo in the chain.
10183 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10186 * varasm.c (weak_finish): Clean up weak_decls.
10188 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10190 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10191 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10192 UNSPEC_UADALP values.
10193 * config/aarch64/iterators.md (ABAL): New int iterator.
10196 (sur): Add mappings for the above.
10197 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10199 (aarch64_<sur>abal<mode>_4): Likewise.
10200 (aarch64_<sur>adalp<mode>_3): Likewise.
10201 (<sur>sadv16qi): New define_expand.
10203 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
10205 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10206 (*movdf_internal): Ditto.
10207 (*rcpsf2_sse): Ditto.
10208 (*rsqrtsf2_sse): Ditto.
10209 (*sqrt<mode>2_sse): Ditto.
10211 2018-05-21 Tamar Christina <tamar.christina@arm.com>
10213 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10215 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10216 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10217 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10218 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10220 * config/aarch64/arm_neon.h: Likewise.
10221 * config/aarch64/iterators.md (VQ_I): New.
10223 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
10225 * config.gcc: Add arc/t-multilib-linux to tmake_file for
10227 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10230 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10232 * config/nds32/constraints.md (S): New constraint.
10233 * config/nds32/nds32.md (call_internal): Use constraint S.
10234 (call_value_internal): Likewise.
10235 (sibcall_internal): Likewise.
10236 (sibcall_value_internal): Likewise.
10238 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10239 Chung-Ju Wu <jasonwucj@gmail.com>
10241 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10242 into consideration.
10244 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
10245 Chung-Ju Wu <jasonwucj@gmail.com>
10247 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10248 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10249 (nds32_rtx_costs_impl): Simplify.
10250 (nds32_address_cost_impl): Simplify.
10251 (nds32_init_rtx_costs): New function.
10252 (nds32_rtx_costs_speed_prefer): Likewise.
10253 (nds32_rtx_costs_size_prefer): Likewise.
10254 (nds32_address_cost_speed_prefer): Likewise.
10255 (nds32_address_cost_speed_fwprop): Likewise.
10256 (nds32_address_cost_size_prefer): Likewise.
10257 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10258 * config/nds32/nds32.c (nds32_option_override): Use
10259 nds32_init_rtx_costs function.
10261 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
10263 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10264 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10265 (TARGET_PIPELINE_N8): Likewise.
10266 (TARGET_PIPELINE_N10): Likewise.
10267 (TARGET_PIPELINE_N13): Likewise.
10268 (TARGET_PIPELINE_GRAYWOLF): Likewise.
10270 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
10272 * config/nds32/nds32-fpu.md: Update copyright year.
10274 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10276 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10278 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10280 * config/nds32/nds32.c
10281 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10282 * config/nds32/nds32.opt (minline-asm-r15): New option.
10284 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10286 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10288 * config/nds32/nds32.md (abssi2): New pattern.
10290 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
10292 * config/i386/i386.md (rex64namesuffix): New mode attribute.
10293 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10294 Merge insn pattern from sse_cvtsi2ss<round_name> and
10295 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10296 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10297 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10298 using SWI48 mode iterator.
10299 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10300 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10301 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10302 pattern from sse_cvttss2si<round_saeonly_name>
10303 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10304 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10305 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10306 using SWI48 mode iterator.
10307 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10308 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10309 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10310 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10311 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10312 using SWI48 mode iterator.
10313 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10314 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10315 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10316 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10317 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10318 SWI48 mode iterator.
10319 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10320 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10321 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10322 pattern from sse_cvttsd2si<round_saeonly_name>
10323 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10325 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10327 * config/nds32/nds32-md-auxiliary.c
10328 (nds32_valid_smw_lwm_base_p): Refine.
10329 (nds32_output_smw_single_word): Refine.
10330 (nds32_output_smw_double_word): New.
10331 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10333 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10335 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10336 (nds32_output_stack_pop): Refine.
10337 (nds32_expand_unaligned_load): Refine.
10338 (nds32_expand_unaligned_store): Refine.
10340 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10341 Chung-Ju Wu <jasonwucj@gmail.com>
10343 * config/nds32/constants.md: Add TP_REGNUM constant.
10344 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10345 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10347 * config/nds32/nds32-doubleword.md: Consider flag_pic.
10348 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10349 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10350 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10351 and PIC code generation.
10352 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10354 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10356 * config/nds32/nds32.md: Support TLS and PIC.
10357 * config/nds32/nds32.c: Support TLS and PIC.
10358 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10359 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10362 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
10364 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10365 mode with E_ prefix.
10367 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
10368 Chung-Ju Wu <jasonwucj@gmail.com>
10370 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10371 * config/nds32/nds32-md-auxiliary.c
10372 (symbolic_reference_mentioned_p): New.
10373 (nds32_legitimize_ict_address): New.
10374 (nds32_expand_ict_move): New.
10375 (nds32_indirect_call_referenced_p): New.
10376 (nds32_symbol_binds_local_p): Delete.
10377 (nds32_long_call_p): Modify.
10378 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10379 * config/nds32/nds32-protos.h
10380 (symbolic_reference_mentioned_p): Declare.
10381 (nds32_legitimize_ict_address): Declare.
10382 (nds32_expand_ict_move): Declare.
10383 (nds32_indirect_call_referenced_p): Declare.
10384 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10385 (nds32_relax_group): Use nds32_ict_const_p as condition.
10386 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10387 (nds32_asm_file_start): Output ict_model directive in asm code.
10388 (nds32_legitimate_address_p): Consider indirect call.
10389 (nds32_print_operand): Consider indirect call.
10390 (nds32_print_operand_address): Consider indirect call.
10391 (nds32_insert_attributes): Handle "indirect_call" attribute.
10392 (TARGET_LEGITIMATE_ADDRESS_P): Define.
10393 (TARGET_LEGITIMATE_CONSTANT_P): Define.
10394 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10395 (TARGET_DELEGITIMIZE_ADDRESS): Define.
10396 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10397 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10398 (TARGET_ICT_MODEL_SMALL): Define.
10399 (TARGET_ICT_MODEL_LARGE): Define.
10400 * config/nds32/nds32.md (movsi): Consider ict model.
10401 (call, call_value): Consider ict model.
10402 (sibcall, sibcall_value): Consider ict model.
10403 * config/nds32/nds32.opt (mict-model): New option.
10404 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10407 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
10408 Monk Chiang <sh.chiang04@gmail.com>
10409 Jim Wilson <jimw@sifive.com>
10411 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10412 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
10413 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10414 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10415 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
10416 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10417 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10418 compute save_libcall_adjustment properly.
10419 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10420 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10421 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10422 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10423 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10424 (ABI_SPEC): Handle mabi=ilp32e.
10425 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10426 (RVE): Add RVE mask.
10427 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10428 <-march>: Add rv32e as an example.
10430 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
10433 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10434 (intra_create_variable_infos): Handle C++ constructors.
10436 2018-05-18 Martin Liska <mliska@suse.cz>
10438 * passes.def: Remove a redundant pass.
10440 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
10443 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10445 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10447 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10449 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10451 (armv2, armv2a, armv3, armv3m): Delete architectures.
10452 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10453 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10454 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10456 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10457 (*mulsidi3adddi): Likewise.
10458 (mulsidi3): Likewise.
10459 (*mulsidi3_nov6): Likewise.
10460 (umulsidi3): Likewise.
10461 (umulsidi3_nov6): Likewise.
10462 (umaddsidi4): Likewise.
10463 (*umulsidi3adddi): Likewise.
10464 (smulsi3_highpart): Likewise.
10465 (*smulsi3_highpart_nov6): Likewise.
10466 (umulsi3_highpart): Likewise.
10467 (*umulsi3_highpart_nov6): Likewise.
10468 * config/arm/arm.h (arm_arch3m): Delete.
10469 * config/arm/arm.c (arm_arch3m): Delete.
10470 (arm_option_override_internal): Update armv3-related comment.
10471 (arm_configure_build_target): Delete use of isa_bit_mode32.
10472 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10473 (arm_rtx_costs_internal): Delete check of arm_arch3m.
10474 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10475 (mulsa3): Likewise.
10476 (mulusa3): Likewise.
10477 * config/arm/arm-protos.h (arm_arch3m): Delete.
10478 * config/arm/arm-tables.opt: Regenerate.
10479 * config/arm/arm-tune.md: Likewise.
10480 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10481 deleted architectures.
10483 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10485 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10486 (armv5t, armv5te): New features.
10487 (ARMv5, ARMv5e): Delete fgroups.
10488 (ARMv5t, ARMv5te): Adjust for above changes.
10489 (ARMv6m): Likewise.
10490 (armv5, armv5e): Delete arches.
10491 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10493 (*call_reg_arm): Likewise.
10494 (*call_value_reg_armv5): Likewise.
10495 (*call_value_reg_arm): Likewise.
10496 (*call_symbol): Likewise.
10497 (*call_value_symbol): Likewise.
10498 (*sibcall_insn): Likewise.
10499 (*sibcall_value_insn): Likewise.
10500 (clzsi2): Likewise.
10501 (prefetch): Likewise.
10502 (define_split and define_peephole2 dependent on arm_arch5):
10504 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10506 (TARGET_ARM_QBIT): Likewise.
10507 (TARGET_DSP_MULTIPLY): Likewise.
10508 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10509 (arm_arch5, arm_arch5e): Delete.
10510 (arm_arch5t, arm_arch5te): Declare.
10511 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10512 (arm_arch5t): Declare.
10513 (arm_option_reconfigure_globals): Update for the above.
10514 (arm_options_perform_arch_sanity_checks): Update comment, replace
10515 use of arm_arch5 with arm_arch5t.
10516 (use_return_insn): Likewise.
10517 (arm_emit_call_insn): Likewise.
10518 (output_return_instruction): Likewise.
10519 (arm_final_prescan_insn): Likewise.
10520 (arm_coproc_builtin_available): Likewise.
10521 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10522 arm_arch5e with arm_arch5t and arm_arch5te.
10523 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10524 (arm_arch5t, arm_arch5te): Declare.
10525 * config/arm/arm-tables.opt: Regenerate.
10526 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10527 * config/arm/t-multilib: Likewise.
10528 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10529 instead of arm_arch5.
10530 (*call_reg_thumb1): Likewise.
10531 (*call_value_reg_thumb1_v5): Likewise.
10532 (*call_value_reg_thumb1): Likewise.
10533 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10535 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10537 2018-05-18 Martin Liska <mliska@suse.cz>
10539 PR gcov-profile/84846
10540 * doc/gcov.texi: Document -t option of gcov tool.
10542 2018-05-18 Martin Liska <mliska@suse.cz>
10544 PR gcov-profile/84846
10545 * gcov.c (print_usage): Add new -t option.
10546 (process_args): Handle the option.
10547 (generate_results): Use stdout as output when requested by
10550 2018-05-18 Martin Liska <mliska@suse.cz>
10552 PR gcov-profile/84846
10553 * coverage.c (coverage_init): Write PWD to .gcno file.
10554 * doc/gcov.texi: Document how working directory is printed.
10555 * gcov-dump.c (dump_gcov_file): Print PWD.
10556 * gcov.c (output_intermediate_file): Likewise.
10557 (read_graph_file): Read PWD string.
10558 (output_lines): Print PWD.
10560 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10562 PR middle-end/85817
10563 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10564 for retval and return false if all args to phi are zero.
10566 2018-05-18 Richard Biener <rguenther@suse.de>
10568 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10570 (evrp_dom_walker::before_dom_children): Call it.
10572 2018-05-18 Richard Biener <rguenther@suse.de>
10574 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10575 results when processing array refs with variable index.
10577 2018-05-18 Toon Moene <toon@moene.org>
10579 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10580 directly after that of -floop-interchange. Indicate that both
10581 options are enabled by default when specifying -O3.
10583 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10585 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10586 iterator. Delete separate integer-mode vec_set<mode> expander.
10587 (aarch64_simd_vec_setv2di): Delete.
10588 (vec_setv2di): Delete.
10589 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10590 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
10591 the "w, r" alternative.
10593 2018-05-18 Martin Liska <mliska@suse.cz>
10595 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10596 * tree-pass.h (make_pass_lower_switch_O0): New function.
10597 * tree-switch-conversion.c (node_has_low_bound): Remove.
10598 (node_has_high_bound): Likewise.
10599 (node_is_bounded): Likewise.
10600 (class pass_lower_switch): Make it a template type and create
10602 (pass_lower_switch::execute): Add template argument.
10603 (make_pass_lower_switch): New function.
10604 (make_pass_lower_switch_O0): New function.
10605 (do_jump_if_equal): Remove.
10606 (emit_case_nodes): Simplify to just handle all 3 cases and leave
10607 all the hard work to tree optimization passes.
10609 2018-05-18 Martin Liska <mliska@suse.cz>
10611 * dbgcnt.c (limit_low): Renamed from limit.
10612 (limit_high): New variable.
10613 (dbg_cnt_is_enabled): Check for upper limit.
10614 (dbg_cnt): Adjust dumping.
10615 (dbg_cnt_set_limit_by_index): Add new argument for high
10617 (dbg_cnt_set_limit_by_name): Likewise.
10618 (dbg_cnt_process_single_pair): Parse new format.
10619 (dbg_cnt_process_opt): Use strtok.
10620 (dbg_cnt_list_all_counters): Remove 'value' and add
10622 * doc/invoke.texi: Document changes.
10624 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
10626 * doc/sourcebuild.texi (scalar_all_fma): Document.
10627 * tree.def (FMA_EXPR): Delete.
10628 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10629 * internal-fn.c (ternary_direct): New macro.
10630 (expand_ternary_optab_fn): Likewise.
10631 (direct_ternary_optab_supported_p): Likewise.
10632 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10633 * builtins.c (fold_builtin_fma): Delete.
10634 (fold_builtin_3): Don't call it.
10635 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10636 * expr.c (expand_expr_real_2): Likewise.
10637 * fold-const.c (operand_equal_p): Likewise.
10638 (fold_ternary_loc): Likewise.
10639 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10640 * gimple.c (DEFTREECODE): Likewise.
10641 * gimplify.c (gimplify_expr): Likewise.
10642 * optabs-tree.c (optab_for_tree_code): Likewise.
10643 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10644 * tree-eh.c (operation_could_trap_p): Likewise.
10645 (stmt_could_throw_1_p): Likewise.
10646 * tree-inline.c (estimate_operator_cost): Likewise.
10647 * tree-pretty-print.c (dump_generic_node): Likewise.
10648 (op_code_prio): Likewise.
10649 * tree-ssa-loop-im.c (stmt_cost): Likewise.
10650 * tree-ssa-operands.c (get_expr_operands): Likewise.
10651 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10652 * fold-const-call.h (fold_fma): Delete.
10653 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10654 CFN_FNMA and CFN_FNMS.
10655 (fold_fma): Delete.
10656 * genmatch.c (combined_fn): New enum.
10657 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10658 (commutative_op): New function.
10659 (commutate): Use it. Handle more than 2 operands.
10660 (dt_operand::gen_gimple_expr): Use commutative_op.
10661 (parser::parse_expr): Allow :c to be used with non-binary
10662 operators if the commutative operand is known.
10663 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10664 CFN_FMS, CFN_FNMA and CFN_FNMS.
10665 (backprop::process_assign_use): Remove FMA_EXPR handling.
10666 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10667 (gen_hsa_fma): New function.
10668 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10669 IFN_FNMA and IFN_FNMS.
10670 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10671 * gimple-fold.h (follow_all_ssa_edges): Declare.
10672 * gimple-fold.c (follow_all_ssa_edges): New function.
10673 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10674 gimple_build interface and use follow_all_ssa_edges to fold the result.
10675 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10676 instead of checking for optabs directly.
10677 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10678 rather than FMA_EXPRs.
10679 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10680 call to IFN_FMA instead of an FMA_EXPR.
10682 2018-05-17 Jim Wilson <jimw@sifive.com>
10684 * expr.c (do_tablejump): When converting index to Pmode, if we have a
10685 sign extended promoted subreg, and the range does not have the sign bit
10686 set, then do a sign extend.
10688 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10689 test, check for sign extended subreg and/or constant operands, and
10690 do a sign extend in that case.
10692 2018-05-17 Steve Ellcey <sellcey@cavium.com>
10694 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10695 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10697 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10698 Change logics_shift_reg to logics_shift_imm.
10699 (thunderx2t99_fp_loadpair_basic): Delete.
10700 (thunderx2t99_fp_storepair_basic): Delete.
10701 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10702 (thunderx2t99_asimd_polynomial): Delete.
10703 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10704 and neon_fp_mul_d_scalar_q.
10705 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10706 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10707 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10708 (thunderx2t99_asimd_lut): Add missing tbl types.
10709 (thunderx2t99_asimd_ext): Delete.
10710 (thunderx2t99_asimd_load1_1_mult): Delete.
10711 (thunderx2t99_asimd_load1_2_mult): Delete.
10712 (thunderx2t99_asimd_load1_ldp): New.
10713 (thunderx2t99_asimd_load1): New.
10714 (thunderx2t99_asimd_load2): Add missing *load2* types.
10715 (thunderx2t99_asimd_load3): New.
10716 (thunderx2t99_asimd_load4): New.
10717 (thunderx2t99_asimd_store1_1_mult): Delete.
10718 (thunderx2t99_asimd_store1_2_mult): Delete.
10719 (thunderx2t99_asimd_store2_mult): Delete.
10720 (thunderx2t99_asimd_store2_onelane): Delete.
10721 (thunderx2t99_asimd_store_stp): New.
10722 (thunderx2t99_asimd_store1): New.
10723 (thunderx2t99_asimd_store2): New.
10724 (thunderx2t99_asimd_store3): New.
10725 (thunderx2t99_asimd_store4): New.
10727 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
10729 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10730 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
10732 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
10733 Segher Boessenkool <segher@kernel.crashing.org>
10736 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10739 2018-05-17 Richard Biener <rguenther@suse.de>
10741 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10742 for pruning loop and prune defs feeding only already visited PHIs.
10744 2018-05-17 Richard Biener <rguenther@suse.de>
10746 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10748 2018-05-17 Bin Cheng <bin.cheng@arm.com>
10749 Richard Biener <rguenther@suse.de>
10751 PR tree-optimization/85793
10752 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10753 for VMAT_ELEMENTWISE.
10755 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10757 * internal-fn.h (lookup_internal_fn): Declare
10758 * internal-fn.c (lookup_internal_fn): New function.
10759 * gimple.c (gimple_build_call_from_tree): Handle calls to
10760 internal functions.
10761 * gimple-pretty-print.c (dump_gimple_call): Print "." before
10762 internal function names.
10763 * tree-pretty-print.c (dump_generic_node): Likewise.
10764 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10766 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
10768 * gimple-fold.h (gimple_build): Make the function forms take
10769 combined_fn rather than built_in_function.
10770 (gimple_simplify): Likewise.
10771 * gimple-match-head.c (gimple_simplify): Likewise.
10772 * gimple-fold.c (gimple_build): Likewise.
10773 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10774 rather than gimple_build_call_internal.
10775 (get_initial_defs_for_reduction): Likewise.
10776 (vect_create_epilog_for_reduction): Likewise.
10777 (vectorizable_live_operation): Likewise.
10779 2018-05-17 Martin Liska <mliska@suse.cz>
10781 * gimple-ssa-sprintf.c (format_directive): Do not use
10782 space in between 'G_' and '('.
10784 2018-05-17 Jakub Jelinek <jakub@redhat.com>
10787 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10788 even if the mask is not all ones.
10791 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10793 (ix86_gimple_fold_builtin): Likewise.
10796 * config/i386/i386.c: Include tree-vector-builder.h.
10797 (ix86_vector_shift_count): New function.
10798 (ix86_fold_builtin): Fold shift builtins by scalar count.
10799 (ix86_gimple_fold_builtin): Likewise.
10801 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10802 _mm512_setzero): New intrinsics.
10804 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
10805 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10807 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10808 code generation for cases where splatting a value is not useful.
10809 * simplify-rtx.c (simplify_ternary_operation): Simplify
10810 vec_merge across a vec_duplicate and a paradoxical subreg forming
10811 a vector mode to a vec_concat.
10813 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
10815 * config.gcc: Support "goldmont-plus".
10816 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10818 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10819 PROCESSOR_GOLDMONT_PLUS.
10820 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10821 (processor_target_table): Add "goldmont-plus".
10822 (PTA_GOLDMONT_PLUS): Define.
10823 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10824 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10825 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10826 (fold_builtin_cpu): Add "goldmont-plus".
10827 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10828 (ix86_option_override_internal): Add "goldmont-plus".
10829 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10830 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10831 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10832 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10834 2018-05-17 Richard Biener <rguenther@suse.de>
10836 PR tree-optimization/85757
10837 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10838 remove defs that only feed that PHI from further processing.
10840 2018-05-16 Jim Wilson <jimw@sifive.com>
10842 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10844 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10846 2018-05-16 Mark Wielaard <mark@klomp.org>
10848 * dwarf2out.c (count_index_strings): New function.
10849 (output_indirect_strings): Call count_index_strings and generate
10850 header for dwarf_version >= 5.
10852 2018-05-16 Mark Wielaard <mark@klomp.org>
10854 * dwarf2out.c (dwarf_FORM): New function.
10855 (set_indirect_string): Use dwarf_FORM.
10856 (reset_indirect_string): Likewise.
10857 (size_of_die): Likewise.
10858 (value_format): Likewise.
10859 (output_die): Likewise.
10860 (add_skeleton_AT_string): Likewise.
10861 (output_macinfo_op): Likewise.
10862 (index_string): Likewise.
10863 (output_index_string_offset): Likewise.
10864 (output_index_string): Likewise.
10865 (count_index_strings): Likewise.
10867 2018-05-16 Carl Love <cel@us.ibm.com>
10869 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10870 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10872 2018-05-16 Martin Jambor <mjambor@suse.cz>
10874 * ipa-prop.c (ipa_free_all_edge_args): Remove.
10875 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10877 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
10879 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10880 (fnma<mode>4): Likewise.
10881 (fms<mode>4): Likewise.
10882 (fnms<mode>4): Likewise.
10883 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10884 (aarch64_fnma<mode>4): Likewise.
10885 (aarch64_fms<mode>4): Likewise.
10886 (aarch64_fnms<mode>4): Likewise.
10887 (aarch64_fnmadd<mode>4): Likewise.
10889 2018-05-16 Jason Merrill <jason@redhat.com>
10891 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
10893 2018-05-16 Richard Biener <rguenther@suse.de>
10895 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10896 (dump_stmt_cost): Declare.
10897 (add_stmt_cost): Dump cost we add.
10898 (add_stmt_costs): New function.
10899 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10900 No longer exported.
10901 (vect_analyze_stmt): Adjust prototype.
10902 (vectorizable_condition): Likewise.
10903 (vectorizable_live_operation): Likewise.
10904 (vectorizable_reduction): Likewise.
10905 (vectorizable_induction): Likewise.
10906 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10907 cost vector to pass to vectorizable_ and record afterwards.
10908 (vect_model_reduction_cost): Take cost vector argument and adjust.
10909 (vect_model_induction_cost): Likewise.
10910 (vectorizable_reduction): Likewise.
10911 (vectorizable_induction): Likewise.
10912 (vectorizable_live_operation): Likewise.
10913 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10914 SLP_TREE_NUMBER_OF_VEC_STMTS.
10915 (vect_analyze_slp_cost_1): Remove.
10916 (vect_analyze_slp_cost): Likewise.
10917 (vect_slp_analyze_node_operations): Take visited args and
10918 a target cost vector. Avoid processing already visited stmt sets.
10919 (vect_slp_analyze_operations): Use a local cost vector to gather
10920 costs and register those of non-discarded instances.
10921 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10922 (vect_schedule_slp_instance): Remove copying of
10923 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
10925 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10926 adding cost. Record cost entry location.
10927 (vect_prologue_cost_for_slp_op): Function to compute cost of
10928 a constant or invariant generated for SLP vect in the prologue,
10929 split out from vect_analyze_slp_cost_1.
10930 (vect_model_simple_cost): Make static. Adjust for SLP costing.
10931 (vect_model_promotion_demotion_cost): Likewise.
10932 (vect_model_store_cost): Likewise, make static.
10933 (vect_model_load_cost): Likewise.
10934 (vectorizable_bswap): Add cost vector arg and adjust.
10935 (vectorizable_call): Likewise.
10936 (vectorizable_simd_clone_call): Likewise.
10937 (vectorizable_conversion): Likewise.
10938 (vectorizable_assignment): Likewise.
10939 (vectorizable_shift): Likewise.
10940 (vectorizable_operation): Likewise.
10941 (vectorizable_store): Likewise.
10942 (vectorizable_load): Likewise.
10943 (vectorizable_condition): Likewise.
10944 (vectorizable_comparison): Likewise.
10945 (can_vectorize_live_stmts): Likewise.
10946 (vect_analyze_stmt): Likewise.
10947 (vect_transform_stmt): Adjust calls to vectorizable_*.
10948 * tree-vectorizer.c: Include gimple-pretty-print.h.
10949 (dump_stmt_cost): New function.
10951 2018-05-16 Richard Biener <rguenther@suse.de>
10953 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10954 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10955 * tree-ssa-dse.c: Include tree-ssa-loop.h.
10956 (check_name): New callback.
10957 (dse_classify_store): Track cycles via a visited bitmap of PHI
10958 defs and simplify handling of in-loop and across loop dead stores
10959 and properly fail for loop-variant refs. Handle byte-tracking with
10960 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10963 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
10965 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10966 (vect_get_mask_type_for_stmt): Likewise.
10967 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10969 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
10970 to determine the statement's vector type and the vector type that
10971 should be used for calculating nunits. Deal with cases in which
10972 the type has to be deferred.
10973 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10974 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10975 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10976 (vect_determine_vf_for_stmt): New functions, split out from...
10977 (vect_determine_vectorization_factor): ...here.
10978 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10979 (vect_get_mask_type_for_stmt): New functions, split out from
10980 vect_determine_vectorization_factor.
10982 2018-05-16 Richard Biener <rguenther@suse.de>
10984 * tree-cfg.c (verify_gimple_assign_ternary): Properly
10985 verify the [VEC_]COND_EXPR embedded comparison.
10987 2018-05-15 Martin Sebor <msebor@redhat.com>
10989 PR tree-optimization/85753
10990 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10991 RECORD_TYPE in addition to ARRAY_TYPE.
10993 2018-05-15 Martin Sebor <msebor@redhat.com>
10995 PR middle-end/85643
10996 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10998 2018-05-15 Richard Biener <rguenther@suse.de>
11000 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
11001 add by_clobber_p one. Change algorithm to collect all defs
11002 representing uses we need to walk and try reducing them to
11003 a single one before failing.
11004 (dse_dom_walker::dse_optimize_stmt): Adjust.
11006 2018-05-13 Mark Wielaard <mark@klomp.org>
11008 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
11009 (size_of_loc_descr): Likewise.
11010 (output_loc_operands): Likewise.
11011 (output_loc_operands_raw): Likewise.
11012 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
11013 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
11014 (hash_loc_operands): Likewise.
11015 (compare_loc_operands): Likewise.
11017 2018-05-14 Mark Wielaard <mark@klomp.org>
11019 * dwarf2out.c (count_index_addrs): New function.
11020 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
11022 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11024 PR tree-optimization/83648
11025 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
11026 return value as malloc candidate.
11028 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11031 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
11032 param as true in call to suggest_attribute.
11034 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
11036 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
11037 -mreadonly-in-sdata.
11039 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11041 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
11043 (aarch64_crypto_aesd_fused): Likewise.
11045 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
11047 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
11048 (movsi_aarch64): Likewise.
11049 (load_pairsi): Likewise.
11050 (load_pairdi): Likewise.
11051 (store_pairsi): Likewise.
11052 (store_pairdi): Likewise.
11053 (load_pairsf): Likewise.
11054 (load_pairdf): Likewise.
11055 (store_pairsf): Likewise.
11056 (store_pairdf): Likewise.
11057 (zero_extend): Likewise.
11058 (trunc): Swap alternatives.
11059 (fcvt_target): Add '?' to prefer w over r.
11061 2018-05-14 Jakub Jelinek <jakub@redhat.com>
11064 * config/i386/i386.md: Disallow non-commutative arithmetics in
11065 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
11066 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
11067 in the peephole2 before it.
11069 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
11071 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
11072 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
11073 (ix86_handle_option): Handle -mcldemote.
11074 * config.gcc: New header.
11075 * config/i386/cldemoteintrin.h: New file.
11076 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
11077 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
11079 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11080 OPTION_MASK_ISA_CLDEMOTE.
11081 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11082 (ix86_valid_target_attribute_inner_p): Ditto.
11083 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11084 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11085 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11086 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11087 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11089 * config/i386/i386.opt: Add -mcldemote.
11090 * config/i386/x86intrin.h: New header.
11091 * doc/invoke.texi: Add -mcldemote.
11093 2018-05-14 Richard Biener <rguenther@suse.de>
11095 * doc/match-and-simplify.texi: Adjust :s documentation.
11097 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
11099 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11100 intended memcpy size.
11101 (REORDER_45): Likewise.
11103 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
11105 * sort.cc: New file.
11106 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11107 * vec.c (qsort_chk): Use gcc_qsort.
11108 * Makefile.in (OBJS-libcommon): Add sort.o.
11109 (build/sort.o): New target. Use it...
11110 (BUILD_RTL): ... here, and...
11111 (build/gencfn-macros): ... here, and...
11112 (build/genmatch): ... here.
11114 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11115 Chung-Ju Wu <jasonwucj@gmail.com>
11117 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11118 * config/nds32/nds32-graywolf.md: New file.
11119 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11120 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11122 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11123 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11124 * config/nds32/nds32.md (pipeline_model): Add graywolf.
11125 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11126 * config/nds32/pipelines.md: Include n15 settings.
11128 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11129 Chung-Ju Wu <jasonwucj@gmail.com>
11131 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11132 * config/nds32/nds32-n13.md: New file.
11133 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11134 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11136 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11137 * config/nds32/nds32.md (pipeline_model): Add n13.
11138 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11139 * config/nds32/pipelines.md: Include n13 settings.
11141 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
11142 Chung-Ju Wu <jasonwucj@gmail.com>
11144 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11145 * config/nds32/nds32-n10.md: New file.
11146 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11147 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11149 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11150 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11151 * config/nds32/nds32.md (pipeline_model): Add n10.
11152 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11153 * config/nds32/pipelines.md: Include n10 settings.
11155 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
11156 Kito Cheng <kito.cheng@gmail.com>
11157 Chung-Ju Wu <jasonwucj@gmail.com>
11159 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11160 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11161 Add enum values for DSP extension instructions.
11162 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11164 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11165 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11166 New code iterators.
11167 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11168 * config/nds32/nds32-dspext.md: New file for DSP implementation.
11169 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11170 * config/nds32/nds32-intrinsic.md: Likewise.
11171 * config/nds32/nds32_intrinsic.h: Likewise.
11172 * config/nds32/nds32-md-auxiliary.c: Likewise.
11173 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11174 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11175 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11176 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11177 * config/nds32/nds32-protos.h: New declarations for DSP extension.
11178 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11179 TYPE_DMAC in switch statement.
11180 * config/nds32/nds32.c: New checking and implementation for DSP
11181 extension instructions.
11182 * config/nds32/nds32.h: Likewise.
11183 * config/nds32/nds32.md: Likewise.
11184 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11185 * config/nds32/predicates.md: Implement new predicates for DSP
11188 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11190 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11191 Reformat alternatives and attributes so it is easier to identify
11192 which constraints/attributes go with which instruction.
11193 (mov<mode>_hardfloat32, FMOVE64): Likewise.
11194 (mov<mode>_softfloat32, FMOVE64): Likewise.
11195 (mov<mode>_hardfloat64, FMOVE64): Likewise.
11196 (mov<mode>_softfloat64, FMOVE64): Likewise.
11198 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
11200 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11202 (Basic PowerPC Built-in Functions): The new name of the
11203 subsection previously known as "PowerPC Built-in Functions".
11204 (Basic PowerPC Built-in Functions Available on all Configurations):
11206 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11207 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11208 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11209 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11211 2018-05-11 Martin Jambor <mjambor@suse.cz>
11214 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11217 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11220 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11222 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
11224 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11225 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11226 (ix86_handle_option): Handle -mwaitpkg.
11227 * config.gcc: New header.
11228 * config/i386/cpuid.h (bit_WAITPKG): New bit.
11229 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11230 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11232 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11233 OPTION_MASK_ISA_WAITPKG.
11234 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11235 (ix86_option_override_internal): Add PTA_WAITPKG.
11236 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11237 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11238 IX86_BUILTIN_TPAUSE.
11239 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11240 __builtin_ia32_umwait and __builtin_ia32_tpause.
11241 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11242 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11243 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11244 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11245 UNSPECV_TPAUSE): New.
11246 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11247 * config/i386/i386.opt: Add -mwaitpkg.
11248 * config/i386/waitpkgintrin.h: New file.
11249 * config/i386/x86intrin.h: New header.
11250 * doc/invoke.texi: Add -mwaitpkg.
11252 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
11255 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11257 (cortex-m0): Use armv6s-m isa.
11258 (cortex-m0plus): Likewise.
11259 (cortex-m1): Likewise.
11260 (cortex-m0.small-multiply): Likewise.
11261 (cortex-m0plus.small-multiply): Likewise.
11262 (cortex-m1.small-multiply): Likewise.
11264 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
11265 Jakub Jelinek <jakub@redhat.com>
11267 PR tree-optimization/85692
11268 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11269 source permute as well.
11271 2018-05-11 Martin Liska <mliska@suse.cz>
11274 * doc/extend.texi: Document LLVM style format for no_sanitize
11277 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11279 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11280 mode_supports_vsx_dform_quad to mode_supports_dq_form.
11281 (mode_supports_vsx_dform_quad): Likewise.
11282 (mode_supports_vmx_dform): Move these functions to be next to the
11283 other mode_supports functions.
11284 (mode_supports_dq_form): Likewise.
11285 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11286 mode_supports_dq_form.
11287 (reg_offset_addressing_ok_p): Likewise.
11288 (offsettable_ok_by_alignment): Likewise.
11289 (rs6000_legitimate_offset_address_p): Likewise.
11290 (legitimate_lo_sum_address_p): Likewise.
11291 (rs6000_legitimize_address): Likewise.
11292 (rs6000_legitimize_reload_address): Likewise.
11293 (rs6000_secondary_reload_inner): Likewise.
11294 (rs6000_preferred_reload_class): Likewise.
11295 (rs6000_output_move_128bit): Likewise.
11297 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11299 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11300 Generate SImode target register for null target.
11301 <case IX86_BUILTIN_XGETBV>: Ditto.
11302 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11303 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11305 2018-05-10 Carl Love <cel@us.ibm.com>
11307 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11308 dcbtt and dcbtstt if operands[2] is 0.
11310 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
11313 * config/i386/sse.md (usadv64qi): New expander.
11315 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
11317 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11318 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11319 -maltivec=be support.
11320 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11321 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11322 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11323 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11324 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11325 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11326 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11327 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11328 altivec_vsumsws): Adjust.
11329 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11330 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11331 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11333 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11334 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11335 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11336 (altivec_lve<VI_char>x): Delete expand.
11337 (*altivec_lve<VI_char>x_internal): Rename to...
11338 (altivec_lve<VI_char>x): ... this.
11339 (altivec_lvxl_<mode>): Delete expand.
11340 (*altivec_lvxl_<mode>_internal): Rename to ...
11341 (altivec_lvxl_<mode>): ... this.
11342 (altivec_stvxl_<mode>): Delete expand.
11343 (*altivec_stvxl_<mode>_internal): Rename to ...
11344 (altivec_stvxl_<mode>): ... this.
11345 (altivec_stve<VI_char>x): Delete expand.
11346 (*altivec_stve<VI_char>x_internal): Rename to ...
11347 (altivec_stve<VI_char>x): ... this.
11348 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11349 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11350 reduc_plus_scal_<mode>): Adjust.
11351 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11353 (rs6000_cpu_cpp_builtins): Adjust.
11354 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11355 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11356 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11357 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11358 -maltivec=be support.
11359 (rs6000_split_vec_extract_var): Adjust.
11360 (rs6000_split_v4si_init): Adjust.
11361 (swap_selector_for_mode): Delete.
11362 (altivec_expand_lvx_be, altivec_expand_stvx_be,
11363 altivec_expand_stvex_be): Delete.
11364 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11365 -maltivec=be support.
11366 (rs6000_gimple_fold_builtin): Ditto.
11367 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11369 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11370 (TARGET_DIRECT_MOVE_64BIT): Adjust.
11371 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11372 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11373 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11374 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11375 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11376 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11377 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11378 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11379 anonymous split): Adjust.
11380 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11381 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11383 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
11385 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11386 when --with-gxx-include-dir is also specified.
11387 * configure: Regenerate.
11389 2018-05-09 Jim Wilson <jimw@sifive.com>
11392 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11393 * config/riscv/t-withmultilib: New.
11394 * config/riscv/withmultilib.h: New.
11395 * doc/install.texi: Document RISC-V --with-multilib-list support.
11397 2018-05-09 Richard Biener <rguenther@suse.de>
11399 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11401 (vect_bb_vectorization_profitable_p): Adjust. Compute
11402 actual scalar cost using the cost vector and the add_stmt_cost
11405 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11407 PR rtl-optimization/85645
11408 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11409 in the REG_CFA_REGISTER note for LR, don't leave it empty.
11411 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11413 PR rtl-optimization/85645
11414 * shrink-wrap.c (spread_components): Return a boolean saying if
11415 anything was changed.
11416 (try_shrink_wrapping_separate): Iterate spread_components until
11417 nothing changes anymore.
11419 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11421 PR rtl-optimization/85645
11422 * regrename.c (build_def_use): Also kill the chains that include the
11423 destination of a REG_CFA_REGISTER note.
11425 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
11427 PR rtl-optimization/85645
11428 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11429 insn that has a REG_CFA_REGISTER note.
11431 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
11433 * cfgexpand.c (expand_clobber): New function.
11434 (expand_gimple_stmt_1): Use it.
11435 * tree-vect-stmts.c (vect_clobber_variable): New function,
11437 (vectorizable_simd_clone_call): ...here.
11438 (vectorizable_store): Emit a clobber either side of an
11439 IFN_STORE_LANES sequence.
11440 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11442 2018-05-09 Tom de Vries <tom@codesourcery.com>
11445 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11446 (define_insn "trap_if_false"): Add exit after trap.
11448 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
11450 PR rtl-optimization/85638
11451 * bb-reorder.c: Include common/common-target.h.
11452 (create_forwarder_block): New function extracted from...
11453 (fix_up_crossing_landing_pad): ...here. Rename into...
11454 (dw2_fix_up_crossing_landing_pad): ...this.
11455 (sjlj_fix_up_crossing_landing_pad): New function.
11456 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11457 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11458 from both partitions and exit the loop after one iteration.
11460 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11463 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11465 (Basic PowerPC Built-in Functions): The new name of the
11466 subsection previously known as "PowerPC Built-in Functions".
11467 (Basic PowerPC Built-in Functions Available on all Configurations):
11469 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11471 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11473 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11475 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11478 2018-05-08 Jim Wilson <jimw@sifive.com>
11480 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11481 (LD_EMUL_SUFFIX): New.
11482 (LINK_SPEC): Use it.
11484 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
11486 * doc/extend.texi (PowerPC Built-in Functions): Rename this
11488 (Basic PowerPC Built-in Functions): The new name of the
11489 subsection previously known as "PowerPC Built-in Functions".
11490 (Basic PowerPC Built-in Functions Available on all Configurations):
11492 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11494 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11496 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11498 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11501 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11504 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11505 after cmpelim optimization.
11507 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
11509 * config.gcc: Support "goldmont".
11510 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11511 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11512 PROCESSOR_GOLDMONT.
11513 * config/i386/i386.c (m_GOLDMONT): Define.
11514 (processor_target_table): Add "goldmont".
11515 (PTA_GOLDMONT): Define.
11516 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11517 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11518 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11519 (fold_builtin_cpu): Add "goldmont".
11520 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11521 (ix86_option_override_internal): Add "goldmont".
11522 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11523 (processor_type): Add PROCESSOR_GOLDMONT.
11524 * config/i386/i386.md: Add CPU "glm".
11525 * config/i386/glm.md: New file.
11526 * config/i386/x86-tune.def: Add m_GOLDMONT.
11527 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11529 2018-05-08 Jakub Jelinek <jakub@redhat.com>
11532 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11534 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11535 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
11536 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
11539 * config/i386/i386.c (ix86_fold_builtin): Handle
11540 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11543 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11544 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11546 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
11549 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11550 (check_arch): Likewise.
11551 (check_fpu): Return the result rather than printing it.
11552 (end arch): Fix operator precedence.
11553 (end cpu): Likewise.
11554 (END): Print the result from check_fpu.
11556 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11557 Alan Hayward <alan.hayward@arm.com>
11558 David Sherwood <david.sherwood@arm.com>
11560 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11561 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11562 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11563 (*fcmuo<mode>_and): New patterns.
11565 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
11567 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11568 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11569 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11570 (cmp_op, sve_imm_con): New code attributes.
11571 (SVE_COND_INT_CMP, imm_con): Delete.
11572 (cmp_op): Remove above unspecs from int attribute.
11573 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11575 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
11576 comparison-specific unspecs.
11577 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11578 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11579 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11580 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11581 (*vec_fcm<cmp_op><mode>): Rename to...
11582 (*fcm<cmp_op><mode>): ...this and adjust likewise.
11583 (*vec_fcmuo<mode>): Rename to...
11584 (*fcmuo<mode>): ...this and adjust likewise.
11585 (*pred_fcm<cmp_op><mode>): New pattern.
11586 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11587 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11589 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11591 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11592 (aarch64_emit_sve_predicated_cond): New function.
11593 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11594 (aarch64_emit_unspec_cond_or): Replace with...
11595 (aarch64_emit_sve_or_conds): ...this new function. Use
11596 aarch64_emit_sve_ptrue_op for the individual comparisons and
11597 aarch64_emit_binop to OR them together.
11598 (aarch64_emit_inverted_unspec_cond): Replace with...
11599 (aarch64_emit_sve_inverted_cond): ...this new function. Use
11600 aarch64_emit_sve_ptrue_op for the comparison and
11601 aarch64_emit_unop to invert the result.
11602 (aarch64_expand_sve_vec_cmp_float): Update after the above
11603 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
11605 2018-05-07 Nathan Sidwell <nathan@acm.org>
11607 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11608 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11609 (Backwards Compatibility): Likewise.
11611 2018-05-07 Luis Machado <luis.machado@linaro.org>
11615 2018-05-07 Luis Machado <luis.machado@linaro.org>
11617 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11618 <prefetch_dynamic_strides>: New const bool field.
11619 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11620 prefetch_dynamic_strides.
11621 (exynosm1_prefetch_tune): Likewise.
11622 (thunderxt88_prefetch_tune): Likewise.
11623 (thunderx_prefetch_tune): Likewise.
11624 (thunderx2t99_prefetch_tune): Likewise.
11625 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11627 (aarch64_override_options_internal): Update to set
11628 PARAM_PREFETCH_DYNAMIC_STRIDES.
11629 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11630 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11631 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11632 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11633 prefetch-dynamic-strides setting.
11635 2018-05-07 Luis Machado <luis.machado@linaro.org>
11637 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11638 <minimum_stride>: New const int field.
11639 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11640 minimum_stride field.
11641 (exynosm1_prefetch_tune): Likewise.
11642 (thunderxt88_prefetch_tune): Likewise.
11643 (thunderx_prefetch_tune): Likewise.
11644 (thunderx2t99_prefetch_tune): Likewise.
11645 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11646 (aarch64_override_options_internal): Update to set
11647 PARAM_PREFETCH_MINIMUM_STRIDE.
11648 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11649 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11650 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11651 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11652 stride is constant and is below the minimum stride threshold.
11654 2018-05-07 Luis Machado <luis.machado@linaro.org>
11656 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11659 2018-05-07 Luis Machado <luis.machado@linaro.org>
11661 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11662 <prefetch_dynamic_strides>: New const bool field.
11663 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11664 prefetch_dynamic_strides.
11665 (exynosm1_prefetch_tune): Likewise.
11666 (thunderxt88_prefetch_tune): Likewise.
11667 (thunderx_prefetch_tune): Likewise.
11668 (thunderx2t99_prefetch_tune): Likewise.
11669 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11671 (aarch64_override_options_internal): Update to set
11672 PARAM_PREFETCH_DYNAMIC_STRIDES.
11673 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11674 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11675 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11676 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11677 prefetch-dynamic-strides setting.
11679 2018-05-07 Luis Machado <luis.machado@linaro.org>
11681 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11682 <minimum_stride>: New const int field.
11683 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11684 minimum_stride field.
11685 (exynosm1_prefetch_tune): Likewise.
11686 (thunderxt88_prefetch_tune): Likewise.
11687 (thunderx_prefetch_tune): Likewise.
11688 (thunderx2t99_prefetch_tune): Likewise.
11689 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11690 (aarch64_override_options_internal): Update to set
11691 PARAM_PREFETCH_MINIMUM_STRIDE.
11692 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11693 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11694 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11695 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11696 stride is constant and is below the minimum stride threshold.
11698 2018-05-06 Jakub Jelinek <jakub@redhat.com>
11701 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11702 the type is addressable. Don't force op into register if it has
11705 2018-05-05 Roland McGrath <mcgrathr@google.com>
11708 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11709 any section for which we don't know a specific type it should have,
11710 regardless of name. Previously this was done only for the exact
11711 names ".init_array", ".fini_array", and ".preinit_array".
11712 (default_elf_asm_named_section): Add comment about
11713 relationship with default_section_type_flags and SECTION_NOTYPE.
11714 (get_section): Don't consider it a type conflict if one side has
11715 SECTION_NOTYPE and the other doesn't, as long as neither has the
11716 SECTION_BSS et al used in the default_section_type_flags logic.
11718 2018-05-05 Tom de Vries <tom@codesourcery.com>
11721 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11722 (workaround_barsyncs): New function.
11723 (nvptx_reorg): Use workaround_barsyncs.
11724 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11725 (define_expand "nvptx_membar_cta"): New define_expand.
11726 (define_insn "*nvptx_membar_cta"): New insn.
11728 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
11730 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11731 To improve optimization opportunities.
11732 * builtin-types.def: The new needed builtin types for the above.
11734 2018-05-04 Richard Biener <rguenther@suse.de>
11736 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11737 * gimple-ssa-store-merging.c
11738 (imm_store_chain_info::output_merged_store): Remove redundant create,
11739 release split_store vector contents on failure.
11740 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11741 scalar stmt vector on cache hit.
11743 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
11745 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11747 * config.gcc (powerpc-xilinx-eabi*): Remove.
11748 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11750 (fusion_addis_mem_combo_load): Ditto.
11751 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11753 (rs6000_cpu_cpp_builtins): Ditto.
11754 * config/rs6000/rs6000-linux.c
11755 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11756 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11757 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11759 (rs6000_setup_reg_addr_masks): Ditto.
11760 (rs6000_init_hard_regno_mode_ok): Ditto.
11761 (rs6000_option_override_internal): Ditto.
11762 (legitimate_lo_sum_address_p): Ditto.
11763 (rs6000_legitimize_address): Ditto.
11764 (rs6000_legitimize_reload_address): Ditto.
11765 (rs6000_legitimate_address_p): Ditto.
11766 (abi_v4_pass_in_fpr): Ditto.
11767 (setup_incoming_varargs): Ditto.
11768 (rs6000_gimplify_va_arg): Ditto.
11769 (rs6000_split_multireg_move): Ditto.
11770 (rs6000_savres_strategy): Ditto.
11771 (rs6000_emit_prologue_components): Ditto.
11772 (rs6000_emit_epilogue_components): Ditto.
11773 (rs6000_emit_prologue): Ditto.
11774 (rs6000_emit_epilogue): Ditto.
11775 (rs6000_elf_file_end): Ditto.
11776 (rs6000_function_value): Ditto.
11777 (rs6000_libcall_value): Ditto.
11778 * config/rs6000/rs6000.h: Ditto.
11779 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11780 (TARGET_MINMAX): ... this. New.
11781 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11782 * config/rs6000/rs6000.md: Remove Xilinx FP support.
11783 (*movsi_internal1_single): Delete.
11784 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11785 mfpu=, mxilinx-fpu): Delete.
11786 * config/rs6000/singlefp.h: Delete.
11787 * config/rs6000/sysv4.h: Remove Xilinx FP support.
11788 * config/rs6000/t-rs6000: Ditto.
11789 * config/rs6000/t-xilinx: Delete.
11790 * config/rs6000/titan.md: Adjust for fp_type removal.
11791 * config/rs6000/vsx.md: Remove Xilinx FP support.
11792 (VStype_simple): Delete.
11793 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11794 * config/rs6000/xfpu.h: Delete.
11795 * config/rs6000/xfpu.md: Delete.
11796 * config/rs6000/xilinx.h: Delete.
11797 * config/rs6000/xilinx.opt: Delete.
11798 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11799 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11801 2018-05-04 Tom de Vries <tom@codesourcery.com>
11804 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11807 2018-05-04 Richard Biener <rguenther@suse.de>
11809 PR middle-end/85627
11810 * tree-complex.c (update_complex_assignment): We are always in SSA form.
11811 (expand_complex_div_wide): Likewise.
11812 (expand_complex_operations_1): Likewise.
11813 (expand_complex_libcall): Preserve EH info of the original stmt.
11814 (tree_lower_complex): Handle removed blocks.
11815 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11816 on complex multiplication and division libcall builtins.
11818 2018-05-04 Richard Biener <rguenther@suse.de>
11820 PR middle-end/85574
11821 * fold-const.c (negate_expr_p): Restrict negation of operand
11822 zero of a division to when we know that can happen without
11824 (fold_negate_expr_1): Likewise.
11826 2018-05-04 Jakub Jelinek <jakub@redhat.com>
11829 * real.h (real_nextafter): Declare.
11830 * real.c (real_nextafter): New function.
11831 * fold-const-call.c (fold_const_nextafter): New function.
11832 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11833 CASE_CFN_NEXTTOWARD.
11834 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11835 even when arg1_mode is different from arg0_mode.
11837 2018-05-03 Nathan Sidwell <nathan@acm.org>
11839 * doc/extend.texi (Deprecated Features): Remove
11840 -ffriend-injection.
11841 (Backwards Compatibility): Likewise.
11842 * doc/invoke.texi (C++ Language Options): Likewise.
11843 (C++ Dialect Options): Likewise.
11845 2018-05-03 Jakub Jelinek <jakub@redhat.com>
11848 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11849 _mm512_mask_mullox_epi64): New intrinsics.
11851 2018-05-03 Tom de Vries <tom@codesourcery.com>
11854 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11855 dump files): Add offload-tree.
11857 2018-05-03 Richard Biener <rguenther@suse.de>
11859 PR tree-optimization/85615
11860 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11861 to loops not nested in BBs loop father to avoid creating multi-entry
11864 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11866 PR tree-optimization/70291
11867 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11868 arguments. Change return type to tree. Emit libcall as a new
11869 statement rather than replacing existing one when inplace_p is true.
11870 (expand_complex_multiplication_components): New function.
11871 (expand_complex_multiplication): Expand floating-point complex
11872 multiplication using the above.
11873 (expand_complex_division): Rename inner_type parameter to type.
11874 Update expand_complex_libcall call-site.
11875 (expand_complex_operations_1): Update expand_complex_multiplication
11876 and expand_complex_division call-sites.
11878 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11881 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11882 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11883 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11884 the highest significant bit of the shift count mask is clear. In
11885 check whether and[sq]i3 is needed verify that all significant bits
11886 of the shift count other than the highest are set.
11888 2018-05-02 Tom de Vries <tom@codesourcery.com>
11891 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11892 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11893 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11894 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11895 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11896 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11897 __builtin_goacc_parlevel_size.
11899 2018-05-02 Richard Biener <rguenther@suse.de>
11901 PR tree-optimization/85597
11902 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11903 do not use split vect_get_vec_defs call but call vect_get_slp_defs
11906 2018-05-02 Tom de Vries <tom@codesourcery.com>
11909 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11910 dump files): Add ltrans-tree.
11912 2018-05-02 Tom de Vries <tom@codesourcery.com>
11915 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11916 dump files): Add wpa-ipa.
11918 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
11920 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
11921 powerpc*-*-linux*paired* target.
11922 * config/rs6000/750cl.h: Delete.
11923 * config/rs6000/paired.h: Delete.
11924 * config/rs6000/paired.md: Delete.
11925 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11927 * config/rs6000/rs6000-builtin.def: Remove paired float support.
11928 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11929 comment. Remove paired float support.
11930 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11931 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11933 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11934 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11936 * config/rs6000/rs6000.c: Remove paired float support.
11937 (paired_expand_vector_init, paired_expand_vector_move,
11938 paired_emit_vector_compare, paired_emit_vector_cond_expr,
11939 (paired_expand_lv_builtin, paired_expand_stv_builtin,
11940 paired_expand_builtin, paired_expand_predicate_builtin,
11941 paired_init_builtins): Delete.
11942 * config/rs6000/rs6000.h: Remove paired float support.
11943 * config/rs6000/rs6000.md: Remove paired float support.
11944 (move_from_CR_ov_bit): Delete.
11945 * config/rs6000/rs6000.opt (mpaired): Delete.
11946 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11947 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11949 2018-05-02 Richard Biener <rguenther@suse.de>
11951 PR middle-end/85567
11952 * gimplify.c (gimplify_save_expr): When in SSA form allow
11953 SAVE_EXPRs to compute to SSA vars.
11955 2018-05-02 Jakub Jelinek <jakub@redhat.com>
11958 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11959 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11960 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11961 clobber operands[2], instead use a new pseudo. Formatting fixes.
11963 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
11965 PR tree-optimization/85586
11966 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11967 exit early for statements in the same group if the accesses are
11970 2018-05-02 Tom de Vries <tom@codesourcery.com>
11973 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11976 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
11978 PR tree-optimization/85143
11979 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11981 2018-05-01 Tom de Vries <tom@codesourcery.com>
11984 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11985 not found" error message.
11987 2018-05-01 Tom de Vries <tom@codesourcery.com>
11990 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11991 * vec.c (test_ordered_remove_if): New function.
11992 (vec_c_tests): Call test_ordered_remove_if.
11993 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11994 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11995 * tree-vect-patterns.c (vect_pattern_recog_1): Use
11996 VEC_ORDERED_REMOVE_IF.
11998 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12000 PR tree-optimization/82665
12001 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
12002 pointer subtraction where arguments come from a memchr call.
12004 2018-05-01 Jakub Jelinek <jakub@redhat.com>
12006 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
12007 --push-state --as-needed and --pop-state instead of --as-needed and
12008 --no-as-needed if ld supports it.
12009 * configure: Regenerated.
12012 * doc/install.texi2html: Replace _002d with - and _002a with * in
12013 generated html files using sed.
12015 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12018 * gcc-rich-location.c (blank_line_before_p): New function.
12019 (use_new_line): New function.
12020 (gcc_rich_location::add_fixit_insert_formatted): New function.
12021 * gcc-rich-location.h
12022 (gcc_rich_location::add_fixit_insert_formatted): New function.
12024 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12026 * selftest.c (assert_streq): Rename "expected" and "actual" to
12027 "val1" and "val2". Extend NULL-handling to cover both inputs
12028 symmetrically, while still requiring both to be non-NULL for a pass.
12029 * selftest.h (assert_streq): Rename "expected" and "actual" to
12031 (ASSERT_EQ): Likewise.
12032 (ASSERT_EQ_AT): Likewise.
12033 (ASSERT_KNOWN_EQ): Likewise.
12034 (ASSERT_KNOWN_EQ_AT): Likewise.
12035 (ASSERT_NE): Likewise.
12036 (ASSERT_MAYBE_NE): Likewise.
12037 (ASSERT_MAYBE_NE_AT): Likewise.
12038 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
12039 the assertion to pass.
12040 (ASSERT_STREQ_AT): Likewise.
12042 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12044 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
12045 interaction with -pie.
12047 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12049 * selftest.h: Fix alphabetization of per-source-file selftest
12052 2018-04-30 Jason Merrill <jason@redhat.com>
12054 PR c++/61982 - dead stores to destroyed objects.
12055 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
12058 2018-04-30 Jason Merrill <jason@redhat.com>
12060 * tree.c (build_clobber): New.
12061 * tree.h: Declare it.
12062 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
12064 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12066 * diagnostic-show-locus.c (layout::layout): Update for
12067 location_get_source_line returning a char_span.
12068 (struct char_span): Move to input.h.
12069 (struct correction): Update for fields in char_span becoming
12071 (struct source_line): Update for location_get_source_line
12072 returning a char_span.
12073 (layout::print_line): Likewise.
12074 * edit-context.c (edited_file::print_content): Likewise.
12075 (edited_file::print_diff_hunk): Likewise.
12076 (edited_file::print_run_of_changed_lines): Likewise.
12077 (edited_file::get_num_lines): Likewise.
12078 (edited_line::edited_line): Likewise.
12079 * final.c (asm_show_source): Likewise.
12080 * input.c (location_get_source_line): Convert return type
12081 from const char * to char_span, losing the final "line_len"
12083 (dump_location_info): Update for the above.
12084 (get_substring_ranges_for_loc): Likewise. Use a char_span
12085 when handling the literal within the line.
12086 (test_reading_source_line): Update for location_get_source_line
12087 returning a char_span.
12088 * input.h (class char_span): Move here from
12089 diagnostic-show-locus.c, converting from a struct to a class.
12090 Make data members private.
12091 (char_span::operator bool): New.
12092 (char_span::length): New.
12093 (char_span::get_buffer): New.
12094 (char_span::operator[]): New.
12095 (char_span::subspan): Make const.
12096 (char_span::xstrdup): New.
12097 (location_get_source_line): Convert return type from const char *
12098 to char_span, losing the final "line_size" param.
12100 2018-04-30 Jan Hubicka <jh@suse.cz>
12102 * lto-wrapper.c (ltrans_priorities): New static var.
12103 (cmp_priority): New.
12104 (run_gcc): Read priorities and if doing parallel build order
12105 the Makefile by them.
12107 2018-04-30 David Malcolm <dmalcolm@redhat.com>
12109 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12111 2018-04-30 Richard Biener <rguenther@suse.de>
12113 * tree-cfg.c (verify_address): Remove base argument, add
12114 flag whether to check TREE_ADDRESSABLE and do that.
12115 (verify_expr): Remove.
12116 (verify_types_in_gimple_reference): Add pieces from verify_expr.
12117 (verify_gimple_assign_single): Likewise.
12118 (verify_gimple_switch): Likewise.
12119 (verify_expr_location_1): Dereference tp once. Add (disabled)
12120 piece from verify_expr.
12121 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12123 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12125 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12127 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12129 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12130 (small_data_pattern): Likewise.
12131 (arc_rewrite_small_data): Likewise.
12132 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12133 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12134 (get_symbol_alignment): New function.
12135 (legitimate_small_data_address_p): Likewise.
12136 (legitimate_scaled_address): Update, call
12137 legitimate_small_data_address_p.
12138 (output_sdata): New static variable.
12139 (arc_print_operand): Update how we handle small data operands.
12140 (arc_print_operand_address): Likewise.
12141 (arc_legitimate_address_p): Update, use
12142 legitimate_small_data_address_p.
12143 (arc_rewrite_small_data_p): Remove.
12144 (arc_rewrite_small_data_1): Likewise.
12145 (arc_rewrite_small_data): Likewise.
12146 (small_data_pattern): Likewise.
12147 (compact_sda_memory_operand): Update to use
12148 legitimate_small_data_address_p and get_symbol_alignment.
12149 (prepare_move_operands): Don't rewite sdata pattern.
12150 (prepare_extend_operands): Remove.
12151 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12153 (zero_extendqisi2): Likewise.
12154 (zero_extendhisi2): Likewise.
12155 (extendqihi2): Likewise.
12156 (extendqisi2): Likewise.
12157 (extendhisi2): Likewise.
12158 (addsi3): Likewise.
12159 (subsi3): Likewise.
12160 (andsi3): Likewise.
12161 * config/arc/constraints.md (Usd): Change it to memory constraint.
12163 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
12165 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12166 as source of std instructions.
12167 * config/arc/arc.md (movsi_insn): Update pattern predicate to
12168 allow 6-bit constants as source for store instructions.
12169 (movdi_insn): Update instruction pattern to allow 6-bit constants
12170 as source for store instructions.
12172 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
12174 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12176 2018-04-30 Nathan Sidwell <nathan@acm.org>
12177 Sandra Loosemore <sandra@codesourcery.com>
12179 * dumpfile.c (dump_open): Allow '-' for stdout.
12180 * doc/invoke.texi (Developer Options): Document dump filename
12181 determination early. Document stdin/stdout selection.
12183 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
12185 Microblaze Target: PIC data text relative
12187 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12188 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12190 * config/microblaze/microblaze.h (microblaze_constant_address_p):
12191 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12192 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12193 New addressing mode for data-text relative position indepenedent code.
12194 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12195 'ADDRESS_SYMBOLIC_TXT_REL'.
12196 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12197 (microblaze_legitimate_pic_operand): Exclude function calls from
12198 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12199 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12201 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12202 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12203 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12204 for 'address + offset'.
12205 (microblaze_expand_prologue): Add new function prologue call for
12207 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12208 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12209 table in case of TARGET_PIC_DATA_TEXT_REL.
12210 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12211 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12212 Add new macros 'UNSPEC_TEXT',
12213 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12214 + exclude function calls from 'UNSPEC_PLT' in case of data text
12216 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12217 new target hook for generating address diff vector tables in case of
12219 * doc/tm.texi : Regenerate.
12220 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12221 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12222 of addr diff vector generation.
12223 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12224 target hook definition.
12225 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12226 Add default function for generate_pic_addr_diff_vec -> flag_pic.
12227 * doc/invoke.texi (Add new pic option): Add new microblaze pic
12228 option for data text relative.
12230 2018-04-30 Richard Biener <rguenther@suse.de>
12232 * tree-chrec.h (evolution_function_is_constant_p): Remove
12234 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12236 2018-04-30 Richard Biener <rguenther@suse.de>
12239 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12241 2018-04-30 Richard Biener <rguenther@suse.de>
12243 PR tree-optimization/28364
12244 PR tree-optimization/85275
12245 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12246 copying first exit test.
12248 2018-04-28 Mark Wielaard <mark@klomp.org>
12250 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12251 dwarf_version >= 5.
12252 (dwarf_AT): Handle DW_AT_addr_base.
12253 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12255 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
12258 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12259 (*ashl<dwi>3_doubleword_mask_1): Ditto.
12260 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12261 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12263 2018-04-28 Richard Biener <rguenther@suse.de>
12265 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12266 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12267 to reflect use. Only add interesting stmts.
12269 2018-04-27 Martin Jambor <mjambor@suse.cz>
12272 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12273 the jump function allows for passing through aggregate values.
12275 2018-04-27 David Malcolm <dmalcolm@redhat.com>
12277 * input.h (in_system_header_at): Convert from macro to inline
12279 (from_macro_expansion_at): Likewise.
12280 (from_macro_definition_at): Likewise.
12282 2018-04-27 Jeff Law <law@redhat.com>
12284 * config.gcc: Mark tile* targets as deprecated/obsolete.
12286 2018-04-27 Richard Biener <rguenther@suse.de>
12288 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12291 2018-04-27 Richard Biener <rguenther@suse.de>
12293 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12295 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
12297 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12298 with Yd constraint. Set "preferred_for_speed" attribute from
12299 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12300 with Yd constraint.
12301 (*movdi_internal): Ditto.
12302 (movti_interunit splitters): Remove
12303 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12304 (movdi_interunit splitters): Ditto.
12305 * config/i386/constraints.md (Ye): Remove.
12306 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12308 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12311 * config/aarch64/constraints.md (Usg): Limit to 31.
12312 (Usj): Limit to 63.
12314 2018-04-27 Jakub Jelinek <jakub@redhat.com>
12316 PR tree-optimization/85529
12317 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12318 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12319 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12320 zero extension or masking of the MSB bit.
12321 (optimize_range_tests): Add FIRST_BB argument, pass it through
12322 to optimize_range_tests_var_bound.
12323 (maybe_optimize_range_tests, reassociate_bb): Adjust
12324 optimize_range_tests callers.
12326 2018-04-26 Richard Biener <rguenther@suse.de>
12327 Jakub Jelinek <jakub@redhat.com>
12329 * cgraph.h (symbol_table): Just declare debug method here.
12330 * symtab.c (symbol_table::debug): Define.
12332 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
12334 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12336 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
12338 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12339 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12340 (*movdi_internal): Substitute Yi and Yj constraint with x
12341 and Ym and Yn constraint with y constraint. Update "isa"
12342 attribute and set "preferred_for_speed" attribute from
12343 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12344 (*movsi_internal): Ditto.
12345 (*movdf_internal): Ditto.
12346 (*movsf_internal): Ditto.
12347 (*zero_extendsidi2): Ditto.
12348 * config/i386/sse.md (vec_set<mode>_0): Ditto.
12349 (sse2_loadld): Ditto.
12350 (*vec_extract<ssevecmodelower>_0): Ditto.
12351 (*vec_extractv4si_0_zext_sse4): Ditto.
12352 (vec_concatv2di): Ditto.
12353 (*vec_dup<mode>): Ditto.
12354 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12355 * config/i386/constraints.md (Yi): Remove.
12360 2018-04-26 Nathan Sidwell <nathan@acm.org>
12362 * dumpfile.c (dump_open): New.
12363 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12364 (dump_finish): Detect stdio/stderr by value not name.
12366 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
12368 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12370 2018-04-26 Tom de Vries <tom@codesourcery.com>
12373 * config/nvptx/nvptx.c (verify_neutering_jumps)
12374 (verify_neutering_labels): New function
12375 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12377 2018-04-26 Tom de Vries <tom@codesourcery.com>
12380 * config/nvptx/nvptx.c (needs_neutering_p): New function.
12381 (nvptx_single): Use needs_neutering_p to skip over insns that do not
12384 2018-04-26 Richard Biener <rguenther@suse.de>
12385 Tom de Vries <tom@codesourcery.com>
12388 * lto-streamer-out.c (output_function): Fixup loops if required to match
12389 discovery done in the reader.
12391 2018-04-26 Richard Biener <rguenther@suse.de>
12393 PR tree-optimization/85116
12394 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12395 have a loop exit from the single latch predecessor. Remove
12396 case of header with just condition.
12397 (ch_base::copy_headers): Exclude infinite loops from any
12399 (pass_ch::execute): Record exits.
12401 2018-04-26 Richard Biener <rguenther@suse.de>
12403 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12404 prologue cost vector and pass it to vect_get_load_cost.
12405 (vect_get_peeling_costs_all_drs): Likewise.
12406 (vect_peeling_hash_get_lowest_cost): Likewise.
12407 (vect_enhance_data_refs_alignment): Likewise.
12409 2018-04-26 Richard Biener <rguenther@suse.de>
12411 PR middle-end/85450
12412 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12413 checking of integer<->pointer conversions.
12414 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12415 sign-/zero-extending pointer types.
12416 (expand_omp_for_static_chunk): Likewise.
12418 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
12419 Jean Lee <xiaoyur347@gmail.com>
12421 * config/mips/mips.c (mips_asan_shadow_offset): New function.
12422 (TARGET_ASAN_SHADOW_OFFSET): Define.
12423 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12424 true for -fsanitize=address.
12426 2018-04-25 Mark Wielaard <mark@klomp.org>
12428 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12431 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12433 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12434 than "alu", remove explicit "memory" and "imm_disp" attributes.
12435 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12437 PR middle-end/85414
12438 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12439 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12440 gen_lowpart_no_emit.
12442 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
12445 * config/i386/i386.c (ix86_expand_builtin): Change memory
12446 operand to XI, extend p0 to Pmode.
12447 * config/i386/i386.md: Change unspec volatile and operand
12448 1 mode to XI, change operand 0 mode to P.
12450 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12452 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12453 GET_MODE_MASK before any checking.
12454 (nds32_can_use_bset_p): Likewise.
12455 (nds32_can_use_btgl_p): Likewise.
12457 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12459 * config/nds32/nds32-doubleword.md: New define_split pattern for
12460 illegal register number.
12462 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12464 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12466 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
12468 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12470 2018-04-25 Richard Biener <rguenther@suse.de>
12472 * lto-streamer.h (LTO_major_version): Bump to 8.
12474 2018-04-25 Jakub Jelinek <jakub@redhat.com>
12476 * BASE-VER: Set to 9.0.0.
12478 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
12480 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12481 in __abskf2 and __powikf2.
12483 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12486 * config/aarch64/constraints.md (Usg, Usj): New constraints.
12487 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12488 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12489 Use the above on operand 2. Reindent.
12490 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12492 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12495 * common/config/i386/i386-common.c (ix86_handle_option): Don't
12497 * config/i386/i386.opt (mcet): Removed.
12498 * doc/install.texi: Remove -mcet documentation.
12499 * doc/invoke.texi: Likewise.
12501 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
12504 * doc/install.texi: Remove -mcet from bootstrap-cet.
12506 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12509 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12510 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12514 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12515 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12516 containing a CONST_VECTOR.
12518 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
12520 * doc/install.texi: Update newlib dependency for nvptx.
12522 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12525 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12526 instead of INTVAL when shifting x left.
12528 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
12530 PR tree-optimization/85478
12531 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12532 vect_grouped_store_supported for single element vectors.
12534 2018-04-24 Richard Biener <rguenther@suse.de>
12537 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12538 load cost increase to the case of non-constant step.
12540 2018-04-24 Jakub Jelinek <jakub@redhat.com>
12543 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12544 destination if any_malformed_asm.
12546 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
12548 PR middle-end/85496
12549 * expr.c (store_field): In the bitfield case, if the value comes from
12550 a function call and is returned in registers by means of a PARALLEL,
12551 do not change the mode of the temporary unless BLKmode and VOIDmode.
12553 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
12555 PR rtl-optimization/85423
12556 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12557 dependencies to debug insns when the previous insn is non-debug.
12559 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12561 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12562 enums into a single definition.
12563 (fls): Fix predicates and printing.
12566 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
12568 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12569 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12570 and short u6 immediate.
12571 (check_if_valid_sleep_operand): Remove.
12572 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12574 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12576 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12577 flag_always_save_lp condition.
12578 * config/nds32/nds32.opt (malways-save-lp): New option.
12580 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12582 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12583 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12584 * config/nds32/nds32.h
12585 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12586 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12588 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12590 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12591 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12593 2018-04-22 Shiva Chen <shiva0217@gmail.com>
12594 Chung-Ju Wu <jasonwucj@gmail.com>
12596 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12598 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12599 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12601 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12603 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12605 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12607 * config/nds32/nds32-protos.h (nds32_data_alignment,
12608 nds32_local_alignment): Declare.
12609 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12610 nds32_local_alignment): New functions.
12611 (TARGET_CONSTANT_ALIGNMENT): Define.
12612 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12614 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12616 * config/nds32/nds32.c
12617 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12618 (TARGET_MODES_TIEABLE_P): Likewise.
12620 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
12622 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12623 level Ofast and Og.
12625 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
12626 Chung-Ju Wu <jasonwucj@gmail.com>
12628 * config/nds32/constants.md (unspec_volatile_element): Add enum values
12629 for unaligned access.
12630 * config/nds32/nds32-intrinsic.c: Implementation of expanding
12632 * config/nds32/nds32-intrinsic.md: Likewise.
12633 * config/nds32/nds32_intrinsic.h: Likewise.
12634 * config/nds32/nds32.h (nds32_builtins): Likewise.
12635 * config/nds32/nds32.opt (munaligned-access): New option.
12636 * config/nds32/nds32.c (nds32_asm_file_start): Display
12637 flag_unaligned_access status.
12639 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12641 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12642 -mno-relax is present.
12643 * config/riscv/linux.h (LINK_SPEC): Ditto.
12645 2018-04-20 Martin Sebor <msebor@redhat.com>
12648 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12650 (gimple_fold_builtin_stxcpy_chk): Same.
12651 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12653 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
12656 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12657 __powikf2 when long double is IEEE 128-bit.
12659 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
12661 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12662 step to make sure stack always aligned.
12664 2018-04-20 Carl Love <cel@us.ibm.com>
12667 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12668 size check for arg0.
12670 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
12671 Tom de Vries <tom@codesourcery.com>
12674 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12675 Emit insns for calls too.
12676 (nvptx_find_par): Always look for worker-level predecessor insn.
12677 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
12679 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12680 (nvptx_process_pars): Propagate frames for calls.
12682 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
12685 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12687 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12688 (ix86_handle_option): Don't handle OPT_mibt.
12689 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12691 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12693 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12694 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12695 (ix86_target_macros): Define __CET__ with flag_cf_protection
12696 for -fcf-protection.
12697 * config/i386/i386.c (isa2_opts): Remove -mibt.
12698 * config/i386/i386.h (TARGET_IBT): Removed.
12699 (TARGET_IBT_P): Likewise.
12700 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12701 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12702 * config/i386/i386.opt (mcet): Update help message.
12703 (mshstk): Likewise.
12705 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
12706 -mcet as an alias for -mshstk.
12708 2018-04-20 Richard Biener <rguenther@suse.de>
12710 PR middle-end/85475
12711 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12712 complexity by forcing a single use of the multiply operand.
12714 2018-04-20 Martin Jambor <mjambor@suse.cz>
12717 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12718 recursion dependency to only apply to non-clones.
12720 2018-04-20 Martin Jambor <mjambor@suse.cz>
12723 * ipa-cp.c (create_specialized_node): Check that clones of
12724 self-recursive edges exist during IPA-CP.
12726 2018-04-19 Toon Moene <toon@moene.org>
12728 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12731 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12733 PR tree-optimization/85467
12734 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12735 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
12736 VECTOR_CST element to type.
12738 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12741 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12742 * config/i386/i386.md (builtin_setjmp_setup): Removed.
12743 (builtin_longjmp): Likewise.
12744 (save_stack_nonlocal): New pattern.
12745 (restore_stack_nonlocal): Likewise.
12747 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12750 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12751 Replace ASM_OUTPUT_LABEL with fprintf.
12753 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
12756 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12757 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12758 * config/i386/i386-c.c (ix86_target_macros_internal): Also
12759 define __IBT__ and __SHSTK__ for -fcf-protection.
12760 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12762 (ix86_trampoline_init): Likewise.
12763 (x86_output_mi_thunk): Likewise.
12764 (ix86_notrack_prefixed_insn_p): Likewise.
12765 (ix86_option_override_internal): Don't disallow -fcf-protection.
12766 * config/i386/i386.md (rdssp<mode>): Also enable for
12768 (incssp<mode>): Likewise.
12769 (nop_endbr): Likewise.
12770 * config/i386/i386.opt (mcet): Change help message to built-in
12773 (mshstk): Likewise.
12774 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12775 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
12776 enable CET built-in functions.
12778 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
12780 * common/config/i386/i386-common.c
12781 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12782 OPTION_MASK_ISA_MOVDIRI_UNSET,
12783 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12784 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12785 * config.gcc (movdirintrin.h): New header.
12786 * config/i386/cpuid.h (bit_MOVDIRI,
12787 bit_MOVDIR64B): New bits.
12788 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12790 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12791 (VOID, PVOID, PCVOID)): New function types.
12792 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12793 __builtin_ia32_directstoreu_u64,
12794 __builtin_ia32_movdir64b): New builtins.
12795 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12796 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12798 (ix86_valid_target_attribute_inner_p): Ditto.
12799 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12800 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12801 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12802 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12803 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12804 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12805 (movdiri<mode>, movdir64b_<mode>): New.
12806 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12807 * config/i386/immintrin.h: Include movdirintrin.h.
12808 * config/i386/movdirintrin.h: New file.
12809 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12811 2018-04-19 Richard Biener <rguenther@suse.de>
12813 PR middle-end/85455
12814 * cfg.c (clear_bb_flags): When loop state says we have
12815 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12817 2018-04-19 Richard Biener <rguenther@suse.de>
12819 PR tree-optimization/84737
12820 * tree-vect-data-refs.c (vect_copy_ref_info): New function
12821 copying restrict info.
12822 (vect_setup_realignment): Use it.
12823 * tree-vectorizer.h (vect_copy_ref_info): Declare.
12824 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12825 the first DR to all generated stores.
12826 (vectorizable_load): Likewise for loads.
12828 2018-04-19 Jakub Jelinek <jakub@redhat.com>
12830 PR tree-optimization/85446
12831 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12832 the integral and pointer types to have the same precision.
12834 * doc/install.texi: Document --disable-cet being the default and
12837 2018-04-18 Martin Liska <mliska@suse.cz>
12839 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12842 2018-04-18 Martin Liska <mliska@suse.cz>
12845 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
12848 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12849 arguments if they are comparable.
12851 2018-04-18 Martin Liska <mliska@suse.cz>
12854 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
12857 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12860 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
12863 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12864 ENDBR after calling __morestack.
12866 2018-04-18 David Malcolm <dmalcolm@redhat.com>
12869 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12870 by using gcc_base_ver to generate a gcc_driver_version, and use
12871 it when generating GCC_DRIVER_NAME.
12872 * configure: Regenerate.
12874 2018-04-18 Jakub Jelinek <jakub@redhat.com>
12877 * config.gcc: Obsolete powerpc*-*-*spe*.
12879 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12882 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12883 (stabstr_D): Change type of unum from unsigned int to
12884 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
12887 2018-04-17 Jim Wilson <jimw@sifive.com>
12890 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12891 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12892 Set arg_pointer_offset after using pretend_args_size.
12894 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12896 PR rtl-optimization/85431
12897 * dse.c (record_store): Ignore zero width stores.
12900 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
12901 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12902 __builtin_stack_restore rather than after it.
12903 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12904 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12905 argument instead of virtual_dynamic_stack_rtx.
12907 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
12909 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12911 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12912 Add note to error message to explain internal mapping of overloaded
12913 built-in function name to non-overloaded built-in function name.
12914 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12917 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
12920 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12921 where the inputs overlap with the output.
12923 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12925 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12926 (=v, v) alternative and explicit "memory" attribute.
12927 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
12928 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12930 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12931 "sselog1" type instead of "sselog".
12932 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12933 "sselog". Remove explicit "memory" attribute.
12934 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12935 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12937 (vec_extract_hi_v32hi): Merge all alternatives into one, use
12938 "sselog1" type instead of "sselog". Remove explicit "memory"
12940 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12941 use "sselog1" type instead of "sselog". Remove explicit "memory"
12943 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12944 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12946 (vec_extract_hi_v64qi): Merge all alternatives into one, use
12947 "sselog1" type instead of "sselog". Remove explicit "memory"
12949 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12950 use "sselog1" type instead of "sselog". Remove explicit "memory"
12954 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12956 PR middle-end/85414
12957 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12960 2018-04-17 Martin Jambor <mjambor@suse.cz>
12963 * ipa-cp.c (create_specialized_node): Call
12964 expand_all_artificial_thunks if necessary.
12966 2018-04-17 Martin Liska <mliska@suse.cz>
12969 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12970 in message, remote space in between '_G' and '('.
12972 2018-04-17 Jakub Jelinek <jakub@redhat.com>
12975 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12976 avx512f_vmcmp<mode>3<round_saeonly_name>,
12977 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12978 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12979 avx512f_rndscale<mode><round_saeonly_name>,
12980 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12981 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12982 Use %<iptr>2 instead of %2 for -masm=intel.
12983 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12984 avx512f_vcvttss2usi<round_saeonly_name>,
12985 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12987 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12988 avx512f_vcvttsd2usi<round_saeonly_name>,
12989 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12990 Use %q1 instead of %1 for -masm=intel.
12991 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12992 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12993 of %3 for -masm=intel.
12994 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12996 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12998 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
13000 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
13001 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
13003 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
13005 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
13006 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
13007 %g1 and one with %0 and %1.
13008 (avx512er_vmrcp28<mode><round_saeonly_name>,
13009 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
13010 %1 for -masm=intel.
13011 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
13012 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
13013 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
13014 of %0 and %{%4%} for -masm=intel.
13015 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
13016 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
13017 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
13018 order of %0 and %{%5%}%{z%} for -masm=intel.
13020 2018-04-17 Jan Hubicka <jh@suse.cz>
13023 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
13025 2018-04-17 Martin Liska <mliska@suse.cz>
13028 * multiple_target.c (create_dispatcher_calls): Set apostrophes
13029 for target_clone error message. Make default implementation
13030 clone to be a local declaration.
13031 (separate_attrs): Add new argument and check for an empty
13033 (expand_target_clones): Handle it.
13034 (ipa_target_clone): Make redirection just for target_clones
13037 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
13038 Tom de Vries <tom@codesourcery.com>
13040 PR middle-end/84955
13041 * omp-expand.c (expand_oacc_for): Add dummy false branch for
13042 tiled basic blocks without omp continue statements.
13044 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
13047 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
13048 vec_extract expression as having side effects to make sure it gets
13051 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
13054 * config/i386/i386.c (get_builtin_code_for_version): Check
13057 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
13060 * config.gcc: Support "skylake".
13061 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13063 * config/i386/i386.c (m_SKYLAKE): Define.
13064 (processor_target_table): Add "skylake".
13065 (ix86_option_override_internal): Add "skylake".
13066 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
13067 PROCESSOR_CANNONLAKE.
13068 (get_builtin_code_for_version): Fix priority for
13069 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
13070 PROCESSOR_SKYLAKE-AVX512.
13071 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
13072 (processor_type): Add PROCESSOR_SKYLAKE.
13074 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
13075 Jason Merrill <jason@redhat.com>
13078 * convert.c (convert_to_integer_1): Use direct recursion for
13079 enumeral types and types with a precision less than the number
13080 of bits in their mode.
13082 2018-04-16 Julia Koval <julia.koval@intel.com>
13085 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13086 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13088 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
13091 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13092 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13093 and -mno-direct-move.
13095 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
13098 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13099 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13100 Ensure negative shifts result in {0}.
13102 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
13104 PR rtl-optimization/79916
13105 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13106 regs (if any) to define how to gnerate SD moves when LRA is in
13109 2018-04-13 Jakub Jelinek <jakub@redhat.com>
13111 PR rtl-optimization/85393
13112 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13113 * except.c (expand_dw2_landing_pad_for_region): Make static.
13114 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13115 a label and unconditional jump to old_bb, rather than
13116 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13119 PR rtl-optimization/85376
13120 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13121 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13122 instead of a specific value.
13124 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13125 Bin Cheng <bin.cheng@arm.com>
13127 PR tree-optimization/82965
13128 PR tree-optimization/83991
13129 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13130 by_profile_only parameter.
13131 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13132 information if the loop was predicted to iterate too many times.
13133 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13135 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
13138 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13141 2018-04-13 Martin Liska <mliska@suse.cz>
13142 Jakub Jelinek <jakub@redhat.com>
13144 PR middle-end/81657
13145 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13146 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13147 * builtins.c (expand_builtin_memory_copy_args): Use
13148 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13149 handle dest_addr == pc_rtx.
13151 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
13154 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13155 asked to not generate direct moves.
13156 (fix_trunc<mode>si2_stfiwx): Similar.
13157 (fix_trunc<mode>si2_internal): Similar.
13159 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13162 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13163 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13164 lookup if dest in some wider mode is known to be const0_rtx and
13165 if so, record permanent equivalence for it to be ZERO_EXTEND of
13166 the narrower mode destination.
13168 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13170 * lto-streamer-out.c (output_function): Revert 259346.
13171 * omp-expand.c (expand_oacc_for): Likewise.
13173 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
13175 PR rtl-optimization/85354
13176 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13177 * sel-sched.c (sel_global_init): ... here.
13179 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
13182 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13183 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13184 mode for PE-COFF targets.
13185 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13186 (i386_pe_asm_lto_end): Likewise.
13187 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13188 (TARGET_ASM_LTO_END): Likewise.
13189 * config/i386/winnt.c (saved_debug_info_level): New static variable.
13190 (i386_pe_asm_lto_start): New function.
13191 (i386_pe_asm_lto_end): Likewise.
13193 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
13194 Richard Biener <rguenther@suse.de>
13196 PR middle-end/84955
13197 * lto-streamer-out.c (output_function): Fix CFG loop state before
13199 * omp-expand.c (expand_oacc_for): Handle calls to internal
13200 functions like regular functions.
13202 2018-04-12 Richard Biener <rguenther@suse.de>
13205 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13206 for the early LTO debug to properly generate references to it
13207 during DIE emission. Do not re-use that for the skeleton for
13209 (dwarf2out_early_finish): Likewise.
13211 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13214 * config/i386/sse.md
13215 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13216 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13217 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13218 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13219 and output is a reg, avoid creating invalid lowpart subreg, but
13220 instead split into a 512-bit move. Don't split if not AVX512VL,
13221 input is xmm16+ reg and output is a mem.
13222 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13223 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13224 xmm16+ reg and output is a mem.
13226 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13228 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13229 also for flag_dwarf2_cfi_asm.
13231 2018-04-12 Jakub Jelinek <jakub@redhat.com>
13233 PR rtl-optimization/85342
13234 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13235 a bool scalar var inside of the loop instead. Don't try to update
13236 recog_data.operand after failed apply_change_group.
13238 2018-04-12 Tom de Vries <tom@codesourcery.com>
13241 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13242 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
13243 array with flexible array member as array without given dimension.
13244 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13245 argument for undefined param to true.
13247 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
13250 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13251 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13252 from PowerPC section.
13253 * config/rs6000/sysv4.opt (mcall-): Improve help text.
13254 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13255 help text that is too long.
13256 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13257 help text that is too long.
13258 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13259 help text that is too long.
13261 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
13263 * config/alpha/alpha.md (stack_probe_internal): Rename
13264 from "probe_stack". Update all callers.
13266 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13268 PR rtl-optimization/84566
13269 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13270 sched_macro_fuse_insns.
13272 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13275 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13276 (compute_block_dependences): ... from here.
13278 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13280 PR tree-optimization/85331
13281 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13282 from int to HOST_WIDE_INT.
13284 2018-04-11 Martin Jambor <mjambor@suse.cz>
13287 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13288 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13289 not the same as the source val.
13290 (cgraph_edge_brings_value_p): New parameter.
13291 (gather_edges_for_value): Pass destination value to
13292 cgraph_edge_brings_value_p.
13293 (perhaps_add_new_callers): Likewise.
13294 (get_info_about_necessary_edges): Likewise and exclude values brought
13295 only by self-recursive edges.
13296 (create_specialized_node): Redirect only clones of self-calling edges.
13297 (+self_recursive_pass_through_p): New function.
13298 (find_more_scalar_values_for_callers_subset): Use it.
13299 (find_aggregate_values_for_callers_subset): Likewise.
13300 (known_aggs_to_agg_replacement_list): Removed.
13301 (decide_whether_version_node): Re-calculate known constants for all
13302 remaining context clones.
13304 2018-04-11 Richard Biener <rguenther@suse.de>
13307 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13308 from early DWARF output.
13309 (dwarf2out_early_finish): Output line info unconditionally into
13310 early DWARF and add reference to it.
13312 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13315 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13316 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13317 other than V2DFmode using iptr mode attribute.
13318 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13320 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
13322 PR rtl-optimization/84659
13323 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13325 2018-04-11 Jakub Jelinek <jakub@redhat.com>
13328 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13330 (output_loc_list): Pass address of a dummy size variable even in the
13331 locview handling loop.
13332 (index_location_lists): Add comment on why skip_loc_list_entry can't
13335 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
13338 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13341 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
13344 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13345 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13346 and -mstring-compare-inline-limit.
13348 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13351 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13352 for stack clash protection in a register whenever we need it to be in
13355 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13357 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13358 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13360 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
13363 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13365 (mlong-double-): Ditto.
13366 * config/rs6000/sysv4.opt (msdata=): Ditto.
13367 (mtls-size=): Ditto.
13369 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
13371 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13372 erroneous entries for
13373 "vector int vec_ldl (int, long int *)", and
13374 "vector unsigned int vec_ldl (int, unsigned long int *)".
13375 Add comments and entries for
13376 "vector bool char vec_ldl (int, bool char *)",
13377 "vector bool short vec_ldl (int, bool short *)",
13378 "vector bool int vec_ldl (int, bool int *)",
13379 "vector bool long long vec_ldl (int, bool long long *)",
13380 "vector pixel vec_ldl (int, pixel *)",
13381 "vector long long vec_ldl (int, long long *)",
13382 "vector unsigned long long vec_ldl (int, unsigned long long *)".
13383 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13384 type tree bool_long_long_type_node and correct definition of
13385 bool_V2DI_type_node to make reference to this new type tree.
13386 (rs6000_mangle_type): Replace erroneous reference to
13387 bool_long_type_node with bool_long_long_type_node.
13388 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13389 comments to emphasize sign distinctions for char and int types and
13390 replace RS6000_BTI_bool_long constant with
13391 RS6000_BTI_bool_long_long constant. Also add comment to restrict
13392 use of RS6000_BTI_pixel.
13393 (bool_long_type_node): Remove this macro definition.
13394 (bool_long_long_type_node): New macro definition
13396 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13398 PR rtl-optimization/85300
13399 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13400 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13401 simplify_unary_operation fails.
13403 2018-04-10 Martin Liska <mliska@suse.cz>
13405 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13406 cgraph_edge and ipa_ref.
13408 2018-04-10 Jakub Jelinek <jakub@redhat.com>
13412 * config/i386/sse.md
13413 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13414 computation of the VEC_MERGE selector from mask.
13415 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13416 Fix decoding of the VEC_MERGE selector into mask.
13418 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13420 PR tree-optimization/85286
13421 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13423 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
13425 * final.c (final_1): Set insn_last_address as well as
13426 insn_current_address.
13428 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13431 * explow.c (emit_stack_probe): Call validize_mem on memory location
13432 before passing it to gen_probe_stack. Create address operand and
13433 legitimize it for the probe_stack_address case.
13435 2018-04-09 Jan Hubicka <jh@suse.cz>
13438 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13439 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13440 * tree.c (free_lang_data_in_type): Fix handling of binfos;
13442 (free_lang_data): Rebuild type inheritance graph.
13444 2018-04-09 Martin Sebor <msebor@redhat.com>
13446 * invoke.texi (-finline-small-functions): Mention other optimization
13448 (-findirect-inlining, -fpartial-inlining): Same.
13449 (-finline-functions-called-once): Same.
13450 (-freorder-blocks-and-partition): Same.
13452 2018-04-09 Jan Hubicka <jh@suse.cz>
13455 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13456 jumps; choose last target that matches the criteria (i.e.
13457 no partition changes for non-crossing jumps).
13458 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13459 support for redirecting crossing jumps to non-crossing.
13461 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
13463 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13464 also for naked functions.
13466 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
13468 * config/arc/arc.md (add_shift): New pattern.
13469 (add_shift2): Likewise.
13470 (sub_shift): Likewise.
13471 (sub_shift_cmp0_noout): Likewise.
13472 (compare_si_ashiftsi): Likewise.
13473 (xbfu_cmp0_noout): New combine pattern.
13474 (xbfu_cmp0"): Likewise.
13475 (movsi_set_cc_insn): Place the predicable variant first.
13476 (commutative_binary_cmp0_noout): Remove clobber.
13477 (commutative_binary_cmp0): New pattern.
13478 (noncommutative_binary_cmp0): Likewise.
13479 (noncommutative_binary_cmp0_noout): Likewise.
13480 (noncommutative_binary_comparison_result_used): Removed.
13481 (rsub_cmp0): New pattern.
13482 (rsub_cmp0_noout): Likewise.
13483 (extzvsi): Changed, keep only meaningful variants.
13484 (SQH, SEZ): New iterators.
13485 (SQH_postfix): New mode attribute.
13486 (SEZ_prefix): New code attribute.
13487 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13488 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13489 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13490 of numerical value.
13491 (noncommutative_operator): Check the availability of barrel
13494 2018-04-09 Richard Biener <rguenther@suse.de>
13496 PR tree-optimization/85284
13497 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13498 Only use the niter constraining form of simple_iv when the exit
13499 is always executed.
13501 2018-04-09 Tom de Vries <tom@codesourcery.com>
13504 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13505 (define_expand "*memory_barrier"): New define_expand.
13506 (define_insn "memory_barrier"): New insn.
13508 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13510 PR rtl-optimization/80463
13511 PR rtl-optimization/83972
13512 PR rtl-optimization/83480
13514 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13515 correct producer for the insn.
13516 (tidy_control_flow): Fixup seqnos in case of debug insns.
13518 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13520 PR rtl-optimization/83913
13522 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13523 different sched-times when merging exprs.
13525 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13527 PR rtl-optimization/83962
13529 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13530 tidy_fallthru_edge and tidy_control_flow.
13532 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
13534 PR rtl-optimization/83530
13536 * sel-sched.c (force_next_insn): New global variable.
13537 (remove_insn_for_debug): When force_next_insn is true, also leave only
13538 next insn in the ready list.
13539 (sel_sched_region): When the region wasn't scheduled, make another pass
13540 over it with force_next_insn set to 1.
13542 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13544 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13546 * config/nds32/constants.md (unspec_volatile_element): Add enum values
13547 for interrupt control.
13548 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13549 functions for interrupt control.
13550 * config/nds32/nds32-intrinsic.md: Likewise.
13551 * config/nds32/nds32_intrinsic.h: Likewise.
13552 * config/nds32/nds32.h (nds32_builtins): Likewise.
13554 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13556 * config/nds32/nds32.c (nds32_init_machine_status,
13557 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13558 strict_aligned_p field.
13559 (nds32_expand_to_rtl_hook): New function.
13560 (TARGET_EXPAND_TO_RTL_HOOK): Define.
13561 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13563 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13564 Chung-Ju Wu <jasonwucj@gmail.com>
13566 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13567 * config/nds32/nds32-n7.md: New file.
13568 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13569 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13571 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13572 * config/nds32/nds32.md (pipeline_model): Add n7.
13573 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13574 * config/nds32/pipelines.md: Include n7 settings.
13576 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13577 Chung-Ju Wu <jasonwucj@gmail.com>
13579 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13580 * config/nds32/nds32-e8.md: New file.
13581 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13582 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13584 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13585 * config/nds32/nds32.md (pipeline_model): Add e8.
13586 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13587 * config/nds32/pipelines.md: Include e8 settings.
13589 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13590 Chung-Ju Wu <jasonwucj@gmail.com>
13592 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13593 * config/nds32/nds32-n8.md: New file.
13594 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13595 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13597 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13598 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13599 * config/nds32/nds32.md (pipeline_model): Add n8.
13600 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13601 * config/nds32/pipelines.md: Include n8 settings.
13603 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
13604 Chung-Ju Wu <jasonwucj@gmail.com>
13606 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13607 * config/nds32/nds32-n9-2r1w.md: New file.
13608 * config/nds32/nds32-n9-3r2w.md: New file.
13609 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13610 nds32_register_ports): New or modify for cpu n9.
13611 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13613 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13614 * config/nds32/nds32-utils.c: New file.
13615 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13616 TARGET_MUL_SLOW): Define.
13617 * config/nds32/nds32.md (pipeline_model): New attribute.
13618 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13619 New options that support cpu n9.
13620 * config/nds32/pipelines.md: Include n9 settings.
13621 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13623 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
13625 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13626 information if necessary.
13627 (output_cond_branch_compare_zero): Likewise.
13628 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13629 (nds32_target_alignment): Refine for alignment.
13630 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13631 (FUNCTION_BOUNDARY): Modify.
13632 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13634 * config/nds32/nds32.opt (malways-align, malign-functions): New.
13636 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
13638 * config/nds32/constants.md (unspec_volatile_element): Add values for
13639 TLB operation and data prefetch.
13640 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13641 functions for TLB operation and data prefetch.
13642 * config/nds32/nds32-intrinsic.md: Likewise.
13643 * config/nds32/nds32_intrinsic.h: Likewise.
13644 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13645 (nds32_print_operand): Likewise.
13646 * config/nds32/nds32.h (nds32_builtins): Likewise.
13648 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
13649 Andrew Pinski <pinsika@gcc.gnu.org>
13651 PR middle-end/82976
13652 * match.pd: Use constant_boolean_node of correct type instead of
13653 boolean_true_node or boolean_false_node for simplifying
13654 pointer comparisons to zero.
13656 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13658 PR tree-optimization/80021
13659 * tree.c (verify_type_variant): Make error call in verify_variant_match
13660 translatable and remove final full stop.
13662 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13664 * config/nds32/constants.md (unspec_volatile_element): Add
13665 UNSPEC_VOLATILE_EH_RETURN.
13666 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13667 nds32_output_stack_pop): Support dwarf exception handling process.
13668 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13669 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13670 exception handling process.
13671 (nds32_compute_stack_frame): Likewise.
13672 (nds32_return_addr_rtx): Likewise.
13673 (nds32_initial_elimination_offset): Likewise.
13674 (nds32_expand_prologue): Likewise.
13675 (nds32_expand_epilogue): Likewise.
13676 (nds32_dynamic_chain_address): New function.
13677 * config/nds32/nds32.h (machine_function): Add fields for dwarf
13678 exception handling.
13679 (DYNAMIC_CHAIN_ADDRESS): Define.
13680 (EH_RETURN_DATA_REGNO): Define.
13681 (EH_RETURN_STACKADJ_RTX): Define.
13682 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13683 patterns for dwarf exception handling.
13685 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13687 * config/nds32/nds32.h: Clean up obsolete macros.
13689 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13691 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13692 Add enum values for particular instructions.
13693 * config/nds32/nds32-intrinsic.c: Implementation of expanding
13694 particular intrinsic functions.
13695 * config/nds32/nds32-intrinsic.md: Likewise.
13696 * config/nds32/nds32_intrinsic.h: Likewise.
13697 * config/nds32/nds32.h (nds32_builtins): Likewise.
13698 * config/nds32/nds32.md (type): Add pbsad and pbsada.
13699 (btst, ave): New patterns for particular instructions.
13701 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13703 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13704 Add enum values for atomic load/store and memory sync.
13705 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13707 * config/nds32/nds32-intrinsic.md: Likewise.
13708 * config/nds32/nds32_intrinsic.h: Likewise.
13709 * config/nds32/nds32.h (nds32_builtins): Likewise.
13711 2018-04-07 Jakub Jelinek <jakub@redhat.com>
13713 PR tree-optimization/85257
13714 * fold-const.c (native_encode_vector): If not all elts could fit
13715 and off is -1, return 0 rather than offset.
13716 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13717 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13718 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
13719 adjust buffer in native_interpret_expr call.
13721 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13723 * config/nds32/constants.md (unspec_volatile_element): Add cache
13724 control enum values.
13725 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13726 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13727 * config/nds32/nds32.c (nds32_cctl_names): New.
13728 (nds32_print_operand): Handle cache control register names.
13729 * config/nds32/nds32.h (nds32_builtins): New enum values.
13730 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13732 * config/nds32/nds32.md (type): Add mmu.
13733 * config/nds32/pipelines.md (simple_insn): Add mmu.
13735 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13737 * config/nds32/nds32.md (type): Remove call.
13738 * config/nds32/pipelines.md (simple_insn): Likewise.
13740 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13742 * config/nds32/constants.md (unspec_volatile_element): Add
13743 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13744 UNSPEC_VOLATILE_FMFCFG.
13745 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13746 description for fmfcfg and fmfcsr.
13747 (bdesc_1arg): Add fmtcsr.
13748 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13749 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13750 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13751 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13752 unspec_fmfcfg): New patterns.
13753 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13754 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13755 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13756 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13757 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13758 __nds32__fmfcfg): Define.
13760 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
13762 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13763 intrinsic register names.
13764 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13765 intrinsic register enum values and macros.
13767 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
13769 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13770 for load/store addressing form.
13771 (nds32_print_operand_address): Likewise.
13773 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
13776 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13777 based on LABEL_REF. Remove useless assertion.
13778 (pic_address_needs_scratch): Fix formatting.
13779 (sparc_legitimize_pic_address): Minor tweaks.
13780 (sparc_delegitimize_address): Adjust assertion accordingly.
13781 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13782 into symbolic_operand.
13783 (movsi_high_pic_label_ref): Likewise.
13784 (movsi_lo_sum_pic_label_ref): Likewise.
13785 (movdi_pic_label_ref): Likewise.
13786 (movdi_high_pic_label_ref): Likewise.
13787 (movdi_lo_sum_pic_label_ref): Likewise.
13789 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
13791 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13792 custom LIB_SPEC setup.
13794 2018-04-06 Ruslan Bukin <br@bsdpad.com>
13795 Kito Cheng <kito.cheng@gmail.com>
13797 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13798 * config/riscv/freebsd.h: New.
13800 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13802 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13803 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13806 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13807 Kito Cheng <kito.cheng@gmail.com>
13809 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13810 nds32_output_call, nds32_symbol_binds_local_p): New functions.
13811 * config/nds32/nds32-protos.h (nds32_output_call,
13812 nds32_output_return): Declare.
13813 * config/nds32/nds32.md: Refine all the call and return patterns.
13815 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13818 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13819 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13821 PR rtl-optimization/84872
13822 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13823 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13824 EDGE_CROSSING edge.
13826 2018-04-06 Tamar Christina <tamar.christina@arm.com>
13828 * expr.c (copy_blkmode_to_reg): Revert 254862.
13829 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13831 2018-04-06 Richard Biener <rguenther@suse.de>
13833 PR middle-end/85244
13834 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13835 after seeing a component reference with an adjacent field. Treat
13836 refs to arrays at struct end of external decls similar to
13837 refs to unconstrained commons.
13839 2018-04-06 Jakub Jelinek <jakub@redhat.com>
13842 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13843 look through SAVE_EXPRs with non-side-effects argument. Adjust
13845 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13848 2018-04-06 Richard Biener <rguenther@suse.de>
13850 PR middle-end/85180
13851 * alias.c (find_base_term): New wrapper around find_base_term
13852 unwinding CSELIB_VAL_PTR changes.
13853 (find_base_term): Do not restore CSELIB_VAL_PTR during the
13856 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
13858 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13860 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13861 constant definitions.
13862 ("nop"): lr 0,0 -> nopr r0
13863 ("nop_lr0", "nop_lr1"): New insn definitions.
13865 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
13867 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13868 NDS32_V3PUSH_AVAILABLE_P macro.
13870 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
13871 Chung-Ju Wu <jasonwucj@gmail.com>
13873 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13874 (nds32*-*-*): Add float and fpu_config into supported_defaults.
13875 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13876 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13877 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13878 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13879 * config/nds32/constraints.md: New constraints and checking for hard
13880 float configuration.
13881 * config/nds32/iterators.md: New mode iterator and attribute for hard
13882 float configuration.
13883 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13885 * config/nds32/nds32-fpu.md: New file.
13886 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13887 deal with hard float code generation.
13888 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13890 (abi_type, float_reg_number): New enum type.
13891 * config/nds32/nds32-predicates.c: New predicates for hard float.
13892 * config/nds32/nds32-protos.h: Declare functions for hard float.
13893 * config/nds32/nds32.c: Implementation for hard float configuration.
13894 * config/nds32/nds32.h: Definitions for hard float configuration.
13895 * config/nds32/nds32.md: Include hard float machine description and
13896 modify patterns for hard float configuration.
13897 * config/nds32/nds32.opt: New options for hard float configuration.
13898 * config/nds32/predicates.md: New predicates for hard float
13901 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
13903 * common/config/nds32/nds32-common.c
13904 (nds32_option_optimization_table): Enable -mreleax-hint by default.
13906 2018-04-05 Jakub Jelinek <jakub@redhat.com>
13908 PR middle-end/85195
13909 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13910 CONSTRUCTOR_ELT (ctor, ...)->value.
13912 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
13915 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13917 2018-04-05 Tom de Vries <tom@codesourcery.com>
13920 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13923 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13924 Kito Cheng <kito.cheng@gmail.com>
13926 * config/nds32/constraints.md (U33): Fine-tune checking condition.
13927 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13928 * config/nds32/nds32.h (nds32_16bit_address_type): Add
13929 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13931 2018-04-05 Shiva Chen <shiva0217@gmail.com>
13932 Kito Cheng <kito.cheng@gmail.com>
13934 * config/nds32/constraints.md (Ufe): New memory constraint.
13935 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13936 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13937 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13939 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13940 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13942 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13944 * config/nds32/nds32.md: Use optimize_size in the condition for
13945 alu-shift instructions.
13947 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13949 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13951 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13953 * config/nds32/nds32.md (negsi2): Refine pattern.
13955 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13956 Chung-Ju Wu <jasonwucj@gmail.com>
13958 * config/nds32/iterators.md (shift_rotate): New code iterator.
13959 (shift): New code attribute.
13960 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13961 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13962 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13963 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13964 bit-wise operations.
13965 (andsi3, *andsi3): Ditto.
13966 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13967 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13968 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13969 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13970 nds32_ior_operand, nds32_xor_operand): New predicates.
13972 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13974 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13975 (addsi3, subsi3): ... this.
13977 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13979 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13981 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13983 * config/nds32/nds32.md: Adjust indention.
13985 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
13987 * config/nds32/nds32.md (feature): New attribute.
13989 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
13991 * config/nds32/nds32.md (subtype): New attribute.
13993 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
13996 * config/arm/arm-builtins.c (arm_expand_builtin): Change
13997 expansion to perform a bitwise AND of the argument followed by a
13998 boolean negation of the result.
14000 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
14002 PR rtl-optimization/84878
14003 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
14004 the basic block. Assert the use reference is not artificial and that
14005 it has an associated insn.
14007 2018-04-04 Michael Matz <matz@suse.de>
14009 * builtins.c (compute_objsize): Pass correct operand
14010 to array_at_struct_end_p.
14012 2018-04-04 Richard Biener <rguenther@suse.de>
14015 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
14016 from contexts for DINFO_LEVEL_TERSE and below.
14018 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14020 * config/nds32/nds32-doubleword.md (move_<mode>): Require
14021 resiter_operand condition.
14022 * config/nds32/nds32.md (*move<mode>): Ditto.
14024 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14025 Monk Chiang <sh.chiang04@gmail.com>
14027 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
14029 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14031 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
14033 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14034 Kito Cheng <kito.cheng@gmail.com>
14036 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
14037 nds32_cond_code_str, output_cond_branch,
14038 output_cond_branch_compare_zero, nds32_expand_cbranch,
14039 nds32_expand_cstore, nds32_expand_movcc,
14040 nds32_output_cbranchsi4_equality_zero,
14041 nds32_output_cbranchsi4_equality_reg,
14042 nds32_output_cbranchsi4_equality_reg_or_const_int,
14043 nds32_output_cbranchsi4_greater_less_zero: New functions.
14044 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
14045 nds32_expand_cstore, nds32_expand_movcc,
14046 nds32_output_cbranchsi4_equality_zero,
14047 nds32_output_cbranchsi4_equality_reg,
14048 nds32_output_cbranchsi4_equality_reg_or_const_int,
14049 nds32_output_cbranchsi4_greater_less_zero): Declare.
14050 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
14051 nds32_rimm11s_operand): New predicates.
14052 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
14053 * config/nds32/nds32.md: Rewrite all the branch and conditional move
14056 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
14058 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
14059 * config/nds32/nds32.md: Ditto.
14060 * config/nds32/pipelines.md: Ditto.
14062 2018-04-04 Richard Biener <rguenther@suse.de>
14064 PR tree-optimization/85168
14065 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
14066 propagating abnormals.
14068 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14070 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
14072 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
14073 Kito Cheng <kito.cheng@gmail.com>
14075 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
14076 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
14077 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
14078 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
14079 * config/nds32/nds32.md (sibcall_internal): New.
14080 (sibcall_register): Remove.
14081 (sibcall_immediate): Remove.
14082 (sibcall_value_internal): New.
14083 (sibcall_value_register): Remove.
14084 (sibcall_value_immediate): Remove.
14085 * config/nds32/predicates.md (nds32_general_register_operand): New.
14086 (nds32_call_address_operand): New.
14088 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14090 PR rtl-optimization/85167
14091 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14092 bb_defs if *split_p, instead preinitialize it to NULL.
14094 PR tree-optimization/85156
14095 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14096 evaluating the argument multiple times.
14098 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
14100 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14102 (_mm_cvtpd_ps): Likewise.
14103 (_mm_cvttpd_epi32): Likewise.
14104 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14105 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14106 vector, pixel, and bool following altivec.h include.
14108 2018-04-03 Martin Sebor <msebor@redhat.com>
14110 * doc/extend.texi (Common Function Attributes): Clarify.
14111 (const attribute): Likewise.
14112 (pure attribute): Likewise.
14114 2018-04-03 Jakub Jelinek <jakub@redhat.com>
14117 * config/i386/i386.c (ix86_expand_vector_set): Use
14118 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
14120 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
14122 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14123 instructions when changing rounding bits to preserve precision bits
14124 in the x87 control word.
14126 2018-04-03 Martin Liska <mliska@suse.cz>
14128 PR tree-optimization/82491
14129 * rtl.h (strip_offset_and_add): Replace += suboffset with
14130 poly_uint64 () + suboffset.
14132 2018-03-29 Martin Liska <mliska@suse.cz>
14133 Martin Jambor <mjambor@suse.cz>
14136 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14137 param_type is not an integral or pointer type.
14139 2018-04-03 Richard Biener <rguenther@suse.de>
14141 * sese.h (recompute_all_dominators): Remove.
14143 2018-04-02 Martin Sebor <msebor@redhat.com>
14145 * doc/invoke.texi (-Wrestrict): Fix typos.
14147 2018-04-02 Jim Wilson <jimw@sifive.com>
14149 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14150 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14151 (<optab>di3, <optab>si3_extend): Likewise.
14152 (<optab>si3_mask, <optab>si3_mask_1): New.
14153 (<optab>di3_mask, <optab>di3_mask_1): New.
14154 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14155 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14156 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14158 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
14160 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14163 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
14165 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14166 (nds32_canonicalize_comparison): New function.
14168 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14169 Kito Cheng <kito.cheng@gmail.com>
14170 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14172 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14173 * config/nds32/constants.md (unspec_volatile_element): Add
14174 UNSPEC_VOLATILE_RELAX_GROUP.
14175 * config/nds32/nds32-relax-opt.c: New file.
14176 * config/nds32/nds32-predicates.c
14177 (nds32_symbol_load_store_p): New function.
14178 * config/nds32/nds32-protos.h
14179 (nds32_symbol_load_store_p): Declare function.
14180 (make_pass_nds32_relax_opt): Declare new rtl pass function.
14181 * config/nds32/nds32.c
14182 (nds32_register_pass): New function to register pass.
14183 (nds32_register_passes): New function to register passes.
14184 * config/nds32/nds32.md (relax_group): New pattern.
14185 * config/nds32/nds32.opt (mrelax-hint): New option.
14186 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14188 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
14190 * config/nds32/t-nds32: Modify files dependency.
14192 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14194 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14195 (PROFILE_HOOK): Define its implementation.
14197 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
14199 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14200 type and 32-bit size.
14202 2018-04-01 Jakub Jelinek <jakub@redhat.com>
14204 PR middle-end/85090
14205 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14206 (V_128_256): New mode iterator.
14207 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14208 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14209 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14211 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14212 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14214 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
14217 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14218 NaN inputs correctly.
14220 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
14223 * config/rs6000/vsx.md (??r): New mode attribute.
14224 (*vsx_mov<mode>_64bit): Use it.
14225 (*vsx_mov<mode>_32bit): Likewise.
14227 2018-03-30 Martin Sebor <msebor@redhat.com>
14229 PR tree-optimization/84818
14230 * builtins.c (check_access): Use warning_n.
14232 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14235 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14237 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14240 2018-03-30 Julia Koval <julia.koval@intel.com>
14243 * x86-tune.def (movx, partial_reg_dependency): Enable for
14246 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
14248 PR inline-asm/84985
14249 * lra-constraints.c (process_alt_operands): Move setting
14250 this_alternative_matches below.
14252 2018-03-29 Martin Liska <mliska@suse.cz>
14255 * doc/invoke.texi: Document how LTO works with debug info.
14256 Describe auto-load support of binutils. Mention 'x86-64'
14257 as valid option value of -march option.
14259 2018-03-29 Jakub Jelinek <jakub@redhat.com>
14261 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14264 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14265 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14266 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14269 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14272 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14273 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14274 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14275 for RS6000_BTM_POWERPC64.
14276 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14277 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14278 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14281 (DIVDEU): Likewise.
14283 2018-03-28 Carl Love <cel@us.ibm.com>
14286 2017-09-27 Carl Love <cel@us.ibm.com>
14288 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14289 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14290 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14293 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14295 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14296 instead of __vector bool.
14297 (_mm_max_pu8): Likewise.
14298 (_mm_min_pi16): Likewise.
14300 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
14303 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14304 (DIVWEUO): Likewise.
14305 (DIVDEO): Likewise.
14306 (DIVDEUO): Likewise.
14307 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14308 DIVWEUO and DIVDEUO.
14309 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14310 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14311 (div_extend): Likewise.
14312 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14314 (__builtin_divweuo): Likewise.
14315 (__builtin_divdeo): Likewise.
14316 (__builtin_divdeuo): Likewise.
14318 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14321 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14322 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14324 PR tree-optimization/82004
14325 * gimple-match-head.c (optimize_pow_to_exp): New function.
14326 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14327 Don't fold to exp if optimize_pow_to_exp is false.
14329 2018-03-28 Martin Liska <mliska@suse.cz>
14332 * calls.c (initialize_argument_information): Fix trailing space.
14333 * common.opt: Fix typo and provide better explanation for
14334 -fsanitize-coverage option.
14335 * config/i386/i386.opt: Fix typo.
14337 2018-03-28 Jakub Jelinek <jakub@redhat.com>
14338 Martin Liska <mliska@suse.cz>
14341 * gimplify.c (asan_poison_variable): Don't do the check for
14342 gimplify_omp_ctxp here.
14343 (gimplify_decl_expr): Do it here.
14344 (gimplify_target_expr): Likewise.
14346 2018-03-28 Martin Liska <mliska@suse.cz>
14349 * config/i386/i386.c (ix86_function_arg_advance): Do not call
14350 chkp_type_bounds_count if MPX is not enabled.
14352 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
14354 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14356 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
14359 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14360 function to create the function decl for complex long double
14361 multiply and divide for -mabi=ieeelongdouble.
14362 (init_float128_ieee): Call it.
14364 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
14367 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14368 -fcf-protection=branch -mibt.
14369 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14371 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14374 * config/arm/arm.c (arm_valid_symbolic_address): Handle
14375 arm_word_relocations.
14377 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
14380 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14381 extern array declarations.
14383 2018-03-27 Richard Biener <rguenther@suse.de>
14385 PR middle-end/84067
14386 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14387 explicit single_use checks.
14389 2018-03-27 Richard Biener <rguenther@suse.de>
14391 PR tree-optimization/85082
14392 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14395 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14397 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14398 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14399 Turn on fasynchronous-unwind-tables and funwind-tables.
14401 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
14404 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14405 (*bmi_blsr_<mode>_ccz): Ditto.
14407 2018-03-26 Tom de Vries <tom@codesourcery.com>
14409 PR tree-optimization/85063
14410 * omp-general.c (offloading_function_p): New function. Factor out
14412 * omp-offload.c (pass_omp_target_link::gate): ... here.
14413 * omp-general.h (offloading_function_p): Declare.
14414 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14415 with attribute omp declare target for offloading functions.
14417 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
14419 PR tree-optimization/84005
14420 * tree-data-ref.h (get_base_for_alignment): Declare.
14421 * tree-data-ref.c (get_base_for_alignment_1): New function.
14422 (get_base_for_alignment): Likewise.
14423 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14424 get_base_for_alignment to find a suitable base object, instead
14425 of always using drb->base_address.
14427 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14429 PR inline-asm/85022
14430 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14431 known size by default.
14433 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
14435 PR inline-asm/85030
14436 * lra-constraints.c (process_alt_operands): Don't match BLKmode
14437 and non BLKmode operands.
14439 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14442 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14443 Clean up attributes.
14445 2018-03-23 Richard Biener <rguenther@suse.de>
14448 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14449 we are going to emit early debug for LTO.
14451 2018-03-23 Jakub Jelinek <jakub@redhat.com>
14453 PR inline-asm/85034
14454 * function.c (match_asm_constraints_1): Don't optimize if input
14455 doesn't satisfy general_operand predicate for output's mode.
14457 PR inline-asm/85022
14458 * alias.c (write_dependence_p): Don't require for x_canonicalized
14459 non-VOIDmode if x has VOIDmode.
14462 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14463 just don't try to optimize it rather than assert it never happens.
14465 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14467 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14468 macro expansions for definition of ST_INTERNAL_<mode> and
14469 LD_INTERNAL_<mode> builtins.
14470 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14472 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14474 (altivec_expand_st_builtin): Likewise.
14475 (altivec_expand_builtin): Remove calls to deleted functions.
14476 (rs6000_address_for_altivec): Delete this function.
14477 * config/rs6000/vector.md: Remove expands for
14478 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14480 2018-03-22 Sudakshina Das <sudi.das@arm.com>
14483 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14484 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14485 re-computing once computed.
14486 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14487 (arm_init_machine_status): Initialize
14488 machine->static_chain_stack_bytes.
14490 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14493 * doc/extend.texi: Add four new prototypes for vec_ld.
14494 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14495 definitions for more logical presentation.
14496 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14497 entries for V1TI variants of __builtin_altivec_ld builtin.
14498 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14499 handling of V1TI variant of LVX icode pattern.
14500 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14501 (rs6000_gimple_fold_builtin): Likewise.
14502 (altivec_init_builtins): Add code to define
14503 __builtin_altivec_lvx_v1ti function.
14505 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14507 PR inline-asm/84941
14508 * function.c (match_asm_constraints_1): Don't do the optimization
14509 if input isn't a REG, SUBREG, MEM or constant.
14511 2018-03-22 Tom de Vries <tom@codesourcery.com>
14513 PR tree-optimization/84956
14514 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14515 bb_has_abnormal_pred.
14517 2018-03-22 Jakub Jelinek <jakub@redhat.com>
14520 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14521 DECL_INITIAL (decl) to decl at the end.
14522 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14523 adjust the comment.
14525 2018-03-21 Joseph Myers <joseph@codesourcery.com>
14527 * doc/extend.texi (__builtin_tgmath): Document when complex
14528 integer types are treated as _Complex _Float64.
14530 2018-03-21 Tom de Vries <tom@codesourcery.com>
14532 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14534 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14536 PR tree-optimization/84960
14537 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14538 if it is ENTRY block, move them into single succ of ENTRY in that case.
14540 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
14542 PR tree-optimization/84811
14543 * poly-int.h (poly_span_traits): Remove the T3 parameter and
14544 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14545 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14546 (known_subrange_p): Update accordingly. Cast each value involved
14547 in the size comparison, rather than casting the result of the
14550 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14552 PR tree-optimization/84982
14553 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14554 by flipping the least significant bit rather than all bits from
14555 bitpos to bitpos + bitsize - 1.
14557 2018-03-21 Nathan Sidwell <nathan@acm.org>
14559 * doc/extend.texi (Deprecated Features): Remove mention of
14560 long-deleted deprecations.
14562 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14565 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14566 * configure: Regenerate.
14568 2018-03-21 Tom de Vries <tom@codesourcery.com>
14570 PR tree-optimization/83126
14571 * tree-parloops.c (num_phis): New function.
14572 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14574 2018-03-21 Nathan Sidwell <nathan@acm.org>
14576 * doc/extend.texi (Deprecated Features): Update deprecated flags,
14577 mention anon-struct/union members and trailing attributes.
14579 2018-03-21 Bin Cheng <bin.cheng@arm.com>
14581 PR tree-optimization/84969
14582 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14583 builtin memset partitions if they set different rhs values.
14585 2018-03-21 Jakub Jelinek <jakub@redhat.com>
14587 PR rtl-optimization/84989
14588 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14589 VEC_DUPLICATE with scalar result mode.
14591 2018-03-21 Martin Liska <mliska@suse.cz>
14594 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14595 not intended return statement.
14597 2018-03-21 Martin Liska <mliska@suse.cz>
14600 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14601 (chkp_find_bound_slots_1): Limit number of iterations.
14603 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
14606 * Minor grammar fixes for x86 options.
14608 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14611 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14612 holding REG_CFA_RESTORE notes, instead turn them into a USE.
14614 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
14617 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14618 (altivec_lvx_<mode>_1op): Likewise.
14619 (altivec_stvx_<mode>_2op): Likewise.
14620 (altivec_stvx_<mode>_1op): Likewise.
14621 (altivec_lvx_<VM2:mode>): New define_expand.
14622 (altivec_stvx_<VM2:mode>): Likewise.
14623 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14624 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14625 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14626 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14627 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14628 (rs6000_gen_lvx): Likewise.
14629 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14630 (altivec_expand_stv_builtin): Likewise.
14631 (altivec_expand_builtin): Likewise.
14632 * config/rs6000/vector.md: Likewise.
14634 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14637 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14640 2018-03-20 Richard Biener <rguenther@suse.de>
14643 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14644 sign-conversions as zero, fall back to standard scalar_stmt
14647 2018-03-20 Martin Liska <mliska@suse.cz>
14650 * predict.c (rebuild_frequencies): Handle case when we have
14651 PROFILE_ABSENT, but flag_guess_branch_prob is false.
14653 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14656 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14657 flag_section_anchors.
14658 * varasm.c (use_blocks_for_decl_p): Remove hack for
14659 dw2_force_const_mem.
14662 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14664 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
14665 be created, use lowpart_subreg of operands[0] rather than operands[0]
14667 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14668 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14669 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14670 and n constraint instead of aarch64_shift_imm_di and Usd.
14671 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14672 (*aarch64_<optab>_reg_minus<mode>3): ... this.
14674 2018-03-20 Sudakshina Das <sudi.das@arm.com>
14677 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14678 to favor GPR over NEON registers.
14679 (<shift>di3_neon): Likewise.
14681 2018-03-20 Tom de Vries <tom@codesourcery.com>
14684 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14685 (nvptx_process_pars): Emit bar.sync asap and alap.
14687 2018-03-20 Tom de Vries <tom@codesourcery.com>
14690 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14691 seen_label if seen_label is already set.
14693 2018-03-20 Jakub Jelinek <jakub@redhat.com>
14696 * config/i386/i386.c (fold_builtin_cpu): For features above 31
14697 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14698 Use 1U instead of 1. Formatting fixes.
14701 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14702 instead of TREE_TYPE (s1) for the return value.
14704 2018-03-19 Jakub Jelinek <jakub@redhat.com>
14706 PR tree-optimization/84946
14707 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14708 bitsize + bitsize in poly_uint64 rather than poly_int64.
14711 * dwarf2asm.c: Include fold-const.c.
14712 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14713 of decl rather than decl itself.
14715 PR rtl-optimization/84643
14716 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14718 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
14721 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14722 calling assemble_variable.
14724 2018-03-19 Sudakshina Das <sudi.das@arm.com>
14727 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14728 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14730 2018-03-19 Jim Wilson <jimw@sifive.com>
14733 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14734 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14735 (riscv_first_stack_step): Likewise.
14736 (riscv_option_override): Use STACK_BOUNDARY instead of
14737 MIN_STACK_BOUNDARY.
14738 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14739 MIN_STACK_BOUNDARY.
14740 (BIGGEST_ALIGNMENT): Set to 128.
14741 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14742 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14745 2018-03-19 Richard Biener <rguenther@suse.de>
14747 PR tree-optimization/84933
14748 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14749 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14751 2018-03-19 Richard Biener <rguenther@suse.de>
14753 PR tree-optimization/84859
14754 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14755 (cond_if_else_store_replacement): Perform sinking operation on
14756 single-store BBs regardless of MAX_STORES_TO_SINK setting.
14757 Generalize what a BB with a single eligible store is.
14759 2018-03-19 Richard Biener <rguenther@suse.de>
14761 PR tree-optimization/84929
14762 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14763 chrec_is_positive against non-chrec arg.
14765 2018-03-19 Tamar Christina <tamar.christina@arm.com>
14768 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14770 2018-03-18 Martin Liska <mliska@suse.cz>
14772 PR rtl-optimization/84635
14773 * regrename.c (build_def_use): Use matches_mode only when
14776 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
14778 PR tree-optimization/84913
14779 * tree-vect-loop.c (vectorizable_reduction): Don't try to
14780 vectorize chains of COND_EXPRs.
14782 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14784 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14786 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14788 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14790 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
14792 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14794 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14795 Kito Cheng <kito.cheng@gmail.com>
14797 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14798 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14799 (nds32_adjust_reg_alloc_order): New function.
14800 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14802 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
14804 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14805 nds32_print_operand, nds32_print_operand_address): Use
14806 HOST_WIDE_INT_PRINT_DEC instead.
14808 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
14810 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14812 2018-03-17 Jakub Jelinek <jakub@redhat.com>
14815 * config/i386/i386.c (initial_ix86_tune_features,
14816 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14817 unsigned long long.
14818 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14819 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14820 rather than 1u << ix86_tune. Formatting fix.
14821 (ix86_option_override_internal): Change ix86_arch_mask from
14822 unsigned int to unsigned HOST_WIDE_INT, initialize to
14823 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14824 (ix86_function_specific_restore): Likewise.
14826 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14829 * postreload.c (reload_combine_recognize_pattern): Perform
14830 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14831 truncate_int_for_mode the result for the destination's mode.
14834 * hsa-gen.c (mem_type_for_type): Fix comment typo.
14835 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14837 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14840 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
14843 * lra-assigns.c (lra_split_hard_reg_for): Don't use
14844 regno_allocno_class_array and sorted_pseudos.
14845 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14846 insns where regno is used.
14848 2018-03-16 Martin Liska <mliska@suse.cz>
14851 * multiple_target.c (create_dispatcher_calls): Redirect
14852 reference in the symbol table.
14854 2018-03-16 Martin Liska <mliska@suse.cz>
14857 * multiple_target.c (create_dispatcher_calls): Redirect also
14860 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14864 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14865 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14866 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14868 2018-03-16 Julia Koval <julia.koval@intel.com>
14870 * doc/invoke.texi (Skylake Server): Add CLWB.
14871 Cannonlake): Remove CLWB.
14873 2018-03-16 Jakub Jelinek <jakub@redhat.com>
14875 PR tree-optimization/84841
14876 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14878 (FLOAT_ONE_CONST_TYPE): Define.
14879 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14880 (sort_by_operand_rank): Put entries with higher constant_type last
14881 rather than first to match comments.
14883 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
14885 * config/nios2/nios2.md (movsi_internal): Fix thinko in
14888 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14891 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14892 check and use address of target always.
14894 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
14897 * config/i386/i386.c (indirect_thunk_needed): Update comments.
14898 (indirect_thunk_bnd_needed): Likewise.
14899 (indirect_thunks_used): Likewise.
14900 (indirect_thunks_bnd_used): Likewise.
14901 (indirect_return_needed): New.
14902 (indirect_return_bnd_needed): Likewise.
14903 (output_indirect_thunk_function): Add a bool argument for
14905 (output_indirect_thunk_function): Don't generate alias for
14906 function return thunk.
14907 (ix86_code_end): Call output_indirect_thunk_function to generate
14908 function return thunks.
14909 (ix86_output_function_return): Set indirect_return_bnd_needed
14910 and indirect_return_needed instead of indirect_thunk_bnd_needed
14911 and indirect_thunk_needed.
14913 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
14915 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14916 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14917 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14919 2018-03-15 David Malcolm <dmalcolm@redhat.com>
14920 Paul Hua <paul.hua.gm@gmail.com>
14923 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14925 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
14927 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14928 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14929 resp. SFmode cases.
14931 2018-03-15 Tamar Christina <tamar.christina@arm.com>
14934 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14935 instead of GET_MODE_SIZE when comparing Units.
14937 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14940 * varasm.c (hash_section): Return an unchangeble hash value
14941 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14942 Return !aarch64_can_use_per_function_literal_pools_p ().
14944 2018-03-15 Jakub Jelinek <jakub@redhat.com>
14947 * optabs.c (emit_conditional_move): Pass address of cmode's copy
14948 rather than address of cmode as last argument to prepare_cmp_insn.
14950 2018-03-15 Julia Koval <julia.koval@intel.com>
14952 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14953 F_AVX512VNNI, F_AVX512BITALG): New.
14955 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
14958 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
14959 insn for floating-point loads and stores.
14961 2018-03-14 Carl Love <cel@us.ibm.com>
14963 * config/rs6000/rs6000-c.c: Add macro definitions for
14964 ALTIVEC_BUILTIN_VEC_PERMXOR.
14965 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14966 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14967 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14968 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14970 * config/doc/extend.texi: Add prototypes for vec_permxor.
14972 2018-03-14 David Malcolm <dmalcolm@redhat.com>
14975 * diagnostic-show-locus.c (class layout_point): Convert m_line
14976 from int to linenum_type.
14977 (line_span::comparator): Use linenum "compare" function when
14978 comparing line numbers.
14979 (test_line_span): New function.
14980 (layout_range::contains_point): Convert param "row" from int to
14982 (layout_range::intersects_line_p): Likewise.
14983 (layout::will_show_line_p): Likewise.
14984 (layout::print_source_line): Likewise.
14985 (layout::should_print_annotation_line_p): Likewise.
14986 (layout::print_annotation_line): Likewise.
14987 (layout::print_leading_fixits): Likewise.
14988 (layout::annotation_line_showed_range_p): Likewise.
14989 (struct line_corrections): Likewise for field m_row.
14990 (line_corrections::line_corrections): Likewise for param "row".
14991 (layout::print_trailing_fixits): Likewise.
14992 (layout::get_state_at_point): Likewise.
14993 (layout::get_x_bound_for_row): Likewise.
14994 (layout::print_line): Likewise.
14995 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14996 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14997 * input.c (selftest::test_linenum_comparisons): New function.
14998 (selftest::input_c_tests): Call it.
14999 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
15000 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
15001 * selftest.h (ASSERT_GT): New macro.
15002 (ASSERT_GT_AT): New macro.
15003 (ASSERT_LT): New macro.
15004 (ASSERT_LT_AT): New macro.
15006 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
15008 PR rtl-optimization/84780
15009 * combine.c (distribute_links): Don't make a link based on pc_rtx.
15011 2018-03-14 Martin Liska <mliska@suse.cz>
15013 * tree.c (record_node_allocation_statistics): Use
15014 get_stats_node_kind.
15015 (get_stats_node_kind): New function extracted from
15016 record_node_allocation_statistics.
15017 (free_node): Use get_stats_node_kind.
15019 2018-03-14 Richard Biener <rguenther@suse.de>
15021 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
15022 that the value-set of ANTIC_IN doesn't grow.
15025 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15027 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15028 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15030 2018-03-14 Julia Koval <julia.koval@intel.com>
15032 * config.gcc (icelake-client, icelake-server): New.
15034 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
15035 (initial_ix86_arch_features): Ditto.
15036 (PTA_SKYLAKE): Add SGX.
15037 (PTA_ICELAKE): Remove.
15038 (PTA_ICELAKE_CLIENT): New.
15039 (PTA_ICELAKE_SERVER): New.
15040 (ix86_option_override_internal): Split up icelake on icelake client and
15042 (get_builtin_code_for_version): Ditto.
15043 (fold_builtin_cpu): Ditto.
15044 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
15045 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
15046 * config/i386/i386.h (processor_type): Ditto.
15047 * doc/invoke.texi: Ditto.
15049 2018-03-14 Jakub Jelinek <jakub@redhat.com>
15052 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
15053 INTEGER_CST offset, add it together with bitpos / 8 and
15054 sign extend based on POINTER_SIZE.
15058 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
15061 * config/i386/constraints.md (Yc): New register constraint.
15062 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
15063 Use Yc constraint for alternative 2 of operand 0. Remove
15064 preferred_for_speed attribute.
15066 2018-03-14 Richard Biener <rguenther@suse.de>
15068 PR tree-optimization/84830
15069 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
15070 with the old one to avoid oscillations.
15072 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
15075 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
15077 (assign_by_spills): Return a flag of reload assignment failure.
15078 Do not process the reload assignment failures. Do not spill other
15079 reload pseudos if they has the same reg class. Update n if
15081 (lra_assign): Add a return arg. Set up from the result of
15082 assign_by_spills call.
15083 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15084 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15085 usage_insns if it is not NULL.
15086 (spill_hard_reg_in_range): New function.
15087 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15088 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15089 function prototypes.
15090 (lra_assign): Change prototype.
15091 * lra.c (lra): Add code to deal with fails by splitting hard reg
15094 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
15096 * config/riscv/riscv.opt (mrelax): New option.
15097 * config/riscv/riscv.c (riscv_file_start): Emit ".option
15098 "norelax" when riscv_mrelax is disabled.
15099 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15101 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15104 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15105 reassociation for int modes.
15107 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15109 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15110 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15112 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15113 * config/aarch64/aarch64-sve.md
15114 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15115 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15116 (*extend<mode><Vwide>2): Rename to...
15117 (aarch64_sve_extend<mode><Vwide>2): ...this.
15118 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15119 renaming the old pattern to...
15120 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
15122 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15123 define_expand, renaming the old pattern to...
15124 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15125 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15126 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15127 account when deciding which SVE instruction the optab should use.
15128 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15130 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15132 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15133 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15134 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15135 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15136 (tlsdesc_small_<mode>): Turn a define_expand and use
15137 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
15138 (tlsdesc_small_advsimd_<mode>): ...this.
15139 (tlsdesc_small_sve_<mode>): New pattern.
15141 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
15143 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15144 (UNSPEC_UMUL_HIGHPART): New constants.
15145 (MUL_HIGHPART): New int iteraor.
15146 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15147 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15149 (*<su>mul<mode>3_highpart): New define_insn.
15151 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
15154 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15157 2018-03-13 Martin Liska <mliska@suse.cz>
15160 * (sem_item_optimizer::sem_item_optimizer): Initialize new
15162 (sem_item_optimizer::~sem_item_optimizer): Release it.
15163 (sem_item_optimizer::merge_classes): Register variable aliases.
15164 (sem_item_optimizer::fixup_pt_set): New function.
15165 (sem_item_optimizer::fixup_points_to_sets): Likewise.
15166 * ipa-icf.h: Declare new variables and functions.
15168 2018-03-13 Jakub Jelinek <jakub@redhat.com>
15170 PR middle-end/84834
15171 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15172 integer_pow2p@2 and test integer_pow2p in condition.
15173 (A < 0 ? C : 0): Similarly for @1.
15175 PR middle-end/84831
15176 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15177 characters starting at p contain '\0' character, don't look beyond
15181 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15182 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15185 * reg-stack.c (change_stack): Change update_end var from int to
15186 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15187 also call set_block_for_insn on the newly added insns and rescan.
15190 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15191 on the last operand.
15194 * tree.c (stabilize_reference_1): Return save_expr (e) for
15195 STATEMENT_LIST even if it doesn't have side-effects.
15197 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
15199 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15201 2018-03-12 Renlin Li <renlin.li@arm.com>
15203 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15204 aarch64_output_scalar_simd_mov_immediate.
15206 2018-03-12 Martin Sebor <msebor@redhat.com>
15208 PR tree-optimization/83456
15209 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15210 for perfectly overlapping calls to memcpy.
15211 (gimple_fold_builtin_memory_chk): Same.
15212 (gimple_fold_builtin_strcpy): Handle no-warning.
15213 (gimple_fold_builtin_stxcpy_chk): Same.
15214 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15216 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15218 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15219 parameter. Use it for SFmode.
15220 (rs6000_function_arg_advance_1): Adjust.
15221 (rs6000_function_arg): Adjust.
15222 (rs6000_gimplify_va_arg): Pass false for that new parameter.
15224 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
15226 PR rtl-optimization/84169
15227 PR rtl-optimization/84780
15228 * combine.c (can_combine_p): Check for a 2-insn combination whether
15229 the destination register is used between the two insns, too.
15231 2018-03-12 Richard Biener <rguenther@suse.de>
15233 PR tree-optimization/84803
15234 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15235 for refs DR analysis didn't process.
15237 2018-03-12 Richard Biener <rguenther@suse.de>
15239 PR tree-optimization/84777
15240 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15241 force-vectorize loops ignore whether we are optimizing for size.
15243 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
15245 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15246 (TARGET_MD_ASM_ADJUST): Define.
15248 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
15249 Kito Cheng <kito.cheng@gmail.com>
15250 Chung-Ju Wu <jasonwucj@gmail.com>
15252 * config/nds32/nds32.c (nds32_compute_stack_frame,
15253 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15254 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15255 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15256 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15257 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15258 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15259 * config/nds32/nds32.md (prologue, epilogue): Use macro
15260 NDS32_V3PUSH_AVAILABLE_P to do checking.
15262 2018-03-11 Jakub Jelinek <jakub@redhat.com>
15265 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15266 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15267 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
15268 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
15269 addition of most attributes on !orig_type_die or the attribute not
15270 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15272 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15273 Chung-Ju Wu <jasonwucj@gmail.com>
15275 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15276 __NDS32_VH__ macro.
15277 * config/nds32/nds32.opt (mvh): New option.
15279 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15280 Chung-Ju Wu <jasonwucj@gmail.com>
15282 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15284 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15285 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15288 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
15289 Chung-Ju Wu <jasonwucj@gmail.com>
15291 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15293 * config/nds32/nds32-multiple.md (strlensi): New pattern.
15294 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15296 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
15297 Kito Cheng <kito.cheng@gmail.com>
15298 Chung-Ju Wu <jasonwucj@gmail.com>
15300 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15301 UNSPEC_FFMISM and UNSPEC_FLMISM.
15302 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15303 for ffb, ffmism and flmism.
15304 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15305 (unspec_ffmism): Ditto.
15306 (unspec_flmism): Ditto.
15307 (nds32_expand_builtin_impl): Check if string extension is available.
15308 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15309 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15311 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
15314 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15317 * lra-assigns.c (assign_by_spills): Return a flag of reload
15318 assignment failure. Do not process the reload assignment
15319 failures. Do not spill other reload pseudos if they has the same
15321 (lra_assign): Add a return arg. Set up from the result of
15322 assign_by_spills call.
15323 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15324 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15325 usage_insns if it is not NULL.
15326 (spill_hard_reg_in_range): New function.
15327 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15328 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15329 function prototypes.
15330 (lra_assign): Change prototype.
15331 * lra.c (lra): Add code to deal with fails by splitting hard reg
15334 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
15337 * config/i386/i386.opt: Replace Enforcment with Enforcement.
15339 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
15342 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15343 (dw_val_node): Add val_symbolic_view.
15344 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15345 (symview_upper_bound): New.
15346 (new_line_info_table): Initialize symviews_since_reset.
15347 (dwarf2out_source_line): Count symviews_since_reset and set
15348 symview_upper_bound.
15349 (dw_val_equal_p): Handle symview.
15350 (add_AT_symview): New.
15351 (print_dw_val): Handle symview.
15352 (attr_checksum, attr_checksum_ordered): Likewise.
15353 (same_dw_val_p, size_of_die): Likewise.
15354 (value_format, output_die): Likewise.
15355 (add_high_low_attributes): Use add_AT_symview for entry_view.
15356 (dwarf2out_finish): Reset symview_upper_bound, clear
15359 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
15362 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15363 Add strict argument and use it.
15364 (rs6000_split_multireg_move): Update for new strict argument.
15365 (mem_operand_gpr): Disallow all non-offsettable addresses.
15366 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15368 2018-03-09 Jakub Jelinek <jakub@redhat.com>
15371 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15372 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15373 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15376 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15377 decl, use remap_type if we want to use the type.
15379 2018-03-09 Martin Sebor <msebor@redhat.com>
15381 PR tree-optimization/84526
15382 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15384 (builtin_access::generic_overlap): Be prepared to handle non-array
15387 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
15389 PR rtl-optimization/84682
15390 * lra-constraints.c (process_address_1): Check is_address flag
15391 for address constraints.
15392 (process_alt_operands): Likewise.
15393 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15394 preprocess_constraints.
15395 * recog.h (preprocess_constraints): Add oploc parameter.
15397 * recog.c (preprocess_constraints): Test address_operand for
15398 CT_ADDRESS constraints.
15400 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
15403 * lra-assigns.c (assign_by_spills): Return a flag of reload
15404 assignment failure. Do not process the reload assignment
15405 failures. Do not spill other reload pseudos if they has the same
15407 (lra_assign): Add a return arg. Set up from the result of
15408 assign_by_spills call.
15409 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15410 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
15411 usage_insns if it is not NULL.
15412 (spill_hard_reg_in_range): New function.
15413 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15414 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15415 function prototypes.
15416 (lra_assign): Change prototype.
15417 * lra.c (lra): Add code to deal with fails by splitting hard reg
15420 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15423 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15424 Accept complain bool parameter. Only emit errors if it is true.
15425 (arm_parse_cpu_option_name): Likewise.
15426 (arm_target_thumb_only): Adjust callers of the above.
15427 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15428 prototype to take a default true bool parameter.
15429 (arm_parse_arch_option_name): Likewise.
15431 2018-03-09 David Malcolm <dmalcolm@redhat.com>
15432 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
15436 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15437 * configure: Regenerate.
15438 * configure.ac ("linker --version-script option"): New.
15439 ("linker soname option"): New.
15441 2018-03-09 Richard Biener <rguenther@suse.de>
15443 PR tree-optimization/84775
15444 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15445 immediate uses of predicate stmts and mark them modified.
15448 PR tree-optimization/84178
15449 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15451 (version_loop_for_if_conversion): Delay update_ssa call.
15452 (tree_if_conversion): Delay update_ssa until after predicate
15455 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
15458 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15459 when the function accesses prior frames.
15461 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15464 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15465 gen_llsym, otherwise call maybe_gen_llsym.
15467 PR inline-asm/84742
15468 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15469 has ',' character inside of it.
15471 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15474 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15475 as clobbering CC_REGNUM.
15477 2018-03-08 Richard Biener <rguenther@suse.de>
15479 PR middle-end/84552
15480 * tree-scalar-evolution.c: Include tree-into-ssa.h.
15481 (follow_copies_to_constant): Do not follow SSA names registered
15484 2018-03-08 Richard Biener <rguenther@suse.de>
15486 PR tree-optimization/84178
15487 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15489 (version_loop_for_if_conversion): Delay update_ssa call.
15490 (tree_if_conversion): Delay update_ssa until after predicate
15493 2018-03-08 David Malcolm <dmalcolm@redhat.com>
15495 PR tree-optimization/84178
15496 * tree-if-conv.c (release_bb_predicate): Remove the
15497 the assertion that the stmts have NULL use_ops.
15498 Discard the statements, asserting that they haven't
15499 yet been added to a BB.
15501 2018-03-08 Richard Biener <rguenther@suse.de>
15503 PR tree-optimization/84746
15504 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15505 (phi_translate): Pass in destination ANTIC_OUT set.
15506 (phi_translate_1): Likewise. For a simplified result lookup
15507 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15508 (phi_translate_set): Adjust.
15509 (do_pre_regular_insertion): Likewise.
15510 (do_pre_partial_partial_insertion): Likewise.
15512 2018-03-08 Martin Liska <mliska@suse.cz>
15514 PR gcov-profile/84735
15515 * doc/gcov.texi: Document usage of profile files.
15516 * gcov-io.h: Document changes in the format.
15518 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
15522 * dwarf2out.c (struct dw_line_info_table): Update comments for
15524 (FORCE_RESET_NEXT_VIEW): New.
15525 (FORCE_RESETTING_VIEW_P): New.
15526 (RESETTING_VIEW_P): Check for -1 too.
15527 (ZERO_VIEW_P): Likewise.
15528 (new_line_info_table): Force-reset next view.
15529 (dwarf2out_begin_function): Likewise.
15530 (dwarf2out_source_line): Simplify zero_view_p initialization.
15531 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15532 view directly. Omit view when omitting .loc at line 0.
15534 2018-03-08 Jakub Jelinek <jakub@redhat.com>
15536 PR tree-optimization/84740
15537 * tree-switch-conversion.c (process_switch): Call build_constructors
15538 only if info.phi_count is non-zero.
15540 PR tree-optimization/84739
15541 * tree-tailcall.c (find_tail_calls): Check call arguments against
15542 DECL_ARGUMENTS (current_function_decl) rather than
15543 DECL_ARGUMENTS (func) when checking for tail recursion.
15545 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15547 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15548 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15549 Volker Reichelt's entry and add entries for people that perform
15550 GCC fuzzy testing and report numerous bugs.
15552 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
15555 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15556 readonly data in sdata, if that is disabled.
15557 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15558 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15559 -mreadonly-in-sdata option.
15561 2018-03-07 Martin Sebor <msebor@redhat.com>
15563 PR tree-optimization/84468
15564 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15565 basic block when looking for nul assignment.
15567 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
15570 * except.h (output_function_exception_table): Adjust prototype.
15571 * except.c (output_function_exception_table): Remove FNNAME parameter
15572 and add SECTION parameter. Ouput one part of the table at a time.
15573 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15574 the first part of the exception table and emit unwind directives.
15575 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15576 (i386_pe_seh_cold_init): Likewise.
15577 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15578 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15579 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15580 (ix86_output_call_insn): Emit a nop in one more case for SEH.
15581 * config/i386/winnt.c: Include except.h.
15582 (struct seh_frame_state): Add reg_offset, after_prologue and
15583 in_cold_section fields.
15584 (i386_pe_seh_end_prologue): Set seh->after_prologue.
15585 (i386_pe_seh_cold_init): New function.
15586 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15587 to seh->in_cold_section.
15588 (seh_emit_push): Record the offset of the push.
15589 (seh_emit_save): Record the offet of the save.
15590 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15591 Test seh->after_prologue to disregard the epilogue.
15592 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15593 (i386_pe_end_cold_function): New function.
15595 2018-03-07 Jakub Jelinek <jakub@redhat.com>
15598 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15599 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15602 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15604 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15605 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15607 PR middle-end/84723
15608 * multiple_target.c: Include tree-inline.h and intl.h.
15609 (expand_target_clones): Diagnose and fail if node->definition and
15610 !tree_versionable_function_p (node->decl).
15612 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
15614 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15616 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15617 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15618 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15620 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15623 * combine.c (try_combine): Use reg_or_subregno instead of handling
15624 just paradoxical SUBREGs and REGs.
15626 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
15628 * config/arc/arc.c (arc_finalize_pic): Remove function.
15629 (arc_must_save_register): We use single base PIC register, remove
15630 checks to save/restore the PIC register.
15631 (arc_expand_prologue): Likewise.
15632 * config/arc/arc-protos.h (arc_set_default_type_attributes):
15634 (arc_verify_short): Likewise.
15635 (arc_attr_type): Likewise.
15636 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15637 (walk_stores): Likewise.
15638 (arc_address_cost): Make it static.
15639 (arc_verify_short): Likewise.
15640 (branch_dest): Likewise.
15641 (arc_attr_type): Likewise.
15642 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15643 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15644 (arc_final_prescan_insn): Remove inserting the nops due to
15645 hardware hazards. It is done in reorg step.
15646 (insn_length_variant_t): Remove.
15647 (insn_length_parameters_t): Likewise.
15648 (arc_insn_length_parameters): Likewise.
15649 (arc_get_insn_variants): Likewise.
15650 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15652 2018-03-06 Jakub Jelinek <jakub@redhat.com>
15654 PR inline-asm/84683
15655 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15658 PR tree-optimization/84687
15659 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15661 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15663 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15665 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15666 Rename to ppc_speculation_barrier.
15667 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15668 __builtin_ppc_speculation_barrier.
15670 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15673 * combine.c (combine_simplify_rtx): Don't try to simplify if
15674 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15677 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
15679 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15680 to 32 bytes when compiling for POWER9.
15682 2018-03-05 Jakub Jelinek <jakub@redhat.com>
15685 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15686 regparm >= 3 with no arg reg available also for calls with
15687 flag_force_indirect_call. Pass decl to ix86_function_regparm.
15690 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15692 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
15694 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
15697 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15699 2018-03-05 Richard Biener <rguenther@suse.de>
15701 PR tree-optimization/84486
15702 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15703 When inserting a __builtin_assume_aligned call set the LHS
15704 SSA name alignment info accordingly.
15706 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
15708 PR tree-optimization/84114
15709 * config/aarch64/aarch64.c (aarch64_reassociation_width)
15710 Avoid reassociation of FLOAT_MODE addition.
15712 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
15714 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15715 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15716 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15717 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15718 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15719 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15720 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15722 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15723 __builtin_ia32_wbinvd): New builtins.
15724 (SPECIAL_ARGS2): New.
15725 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15726 (SPECIAL_ARGS2): New.
15727 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15728 (ix86_valid_target_attribute_inner_p): Ditto.
15729 (ix86_init_mmx_sse_builtins): Add special_args2.
15730 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15731 TARGET_WBNOINVD_P): New.
15732 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15733 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15734 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15735 * config/i386/immintrin.h (_wbinvd): New intrinsic.
15736 * config/i386/pconfigintrin.h: New file.
15737 * config/i386/wbnoinvdintrin.h: Ditto.
15738 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15740 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15742 2018-03-05 Richard Biener <rguenther@suse.de>
15744 PR tree-optimization/84670
15745 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15747 (BB_VISITED_WITH_VISITED_SUCCS): New define.
15748 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15749 (compute_antic_aux): Only assert the number of values in ANTIC_IN
15750 doesn't grow if all successors (recursively) were visited at least
15753 2018-03-05 Richard Biener <rguenther@suse.de>
15755 PR tree-optimization/84650
15756 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15757 if executed in the loop pipeline.
15759 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
15761 * doc/configfiles.texi (Configuration Files): Move info about
15762 conditionalizing $target-protos.h to...
15763 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
15764 differs from $target-protos.h.
15766 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
15767 Chung-Ju Wu <jasonwucj@gmail.com>
15769 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15770 * config/nds32/nds32-multiple.md (setmemsi): Define.
15771 * config/nds32/nds32-memory-manipulation.c
15772 (nds32_gen_dup_4_byte_to_word_value): New.
15773 (emit_setmem_word_loop): New.
15774 (emit_setmem_byte_loop): New.
15775 (nds32_expand_setmem_loop): New.
15776 (nds32_expand_setmem_loop_v3m): New.
15777 (nds32_expand_setmem_unroll): New.
15778 (nds32_expand_setmem): New.
15780 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15781 Chung-Ju Wu <jasonwucj@gmail.com>
15783 * config/nds32/nds32-memory-manipulation.c
15784 (nds32_emit_load_store): New.
15785 (nds32_emit_post_inc_load_store): New.
15786 (nds32_emit_mem_move): New.
15787 (nds32_emit_mem_move_block): New.
15788 (nds32_expand_movmemsi_loop_unknown_size): New.
15789 (nds32_expand_movmemsi_loop_known_size): New.
15790 (nds32_expand_movmemsi_loop): New.
15791 (nds32_expand_movmemsi_unroll): New.
15792 (nds32_expand_movmemqi): Rename ...
15793 (nds32_expand_movmemsi): ... to this.
15794 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15795 (movmemsi): ... to this.
15796 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15797 (nds32_expand_movmemsi): ... to this.
15799 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15800 Monk Chiang <sh.chiang04@gmail.com>
15801 Chung-Ju Wu <jasonwucj@gmail.com>
15803 * config/nds32/nds32-protos.h
15804 (nds32_expand_load_multiple): New arguments.
15805 (nds32_expand_store_multiple): Ditto.
15806 (nds32_valid_multiple_load_store): Rename ...
15807 (nds32_valid_multiple_load_store_p): ... to this.
15808 * config/nds32/nds32-memory-manipulation.c
15809 (nds32_expand_load_multiple): Refine implementation.
15810 (nds32_expand_store_multiple): Ditto.
15811 * config/nds32/nds32-multiple.md
15812 (load_multiple): Update nds32_expand_load_multiple interface.
15813 (store_multiple): Update nds32_expand_store_multiple interface.
15814 * config/nds32/nds32-predicates.c
15815 (nds32_valid_multiple_load_store): Rename ...
15816 (nds32_valid_multiple_load_store_p): ... to this and refine
15818 * config/nds32/predicates.md
15819 (nds32_load_multiple_and_update_address_operation): New predicate.
15820 (nds32_store_multiple_and_update_address_operation): New predicate.
15822 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
15823 Chung-Ju Wu <jasonwucj@gmail.com>
15825 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15826 (combo): New attribute.
15827 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15829 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
15831 * config/nds32/nds32.opt: Change -mcmodel= default value.
15833 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
15834 Monk Chiang <sh.chiang04@gmail.com>
15835 Chung-Ju Wu <jasonwucj@gmail.com>
15837 * config/nds32/constants.md (unspec_element): New enum.
15838 * config/nds32/constraints.md (Umw): New constraint.
15839 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15840 * config/nds32/nds32-intrinsic.md: Likewise.
15841 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15842 (nds32_valid_smw_lwm_base_p): New.
15843 (nds32_output_smw_single_word): New.
15844 (nds32_output_lmw_single_word): New.
15845 (nds32_expand_unaligned_load): New.
15846 (nds32_expand_unaligned_store): New.
15847 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15848 (nds32_output_smw_single_word): Declare.
15849 (nds32_output_lmw_single_word): Declare.
15850 (nds32_expand_unaligned_load): Declare.
15851 (nds32_expand_unaligned_store): Declare.
15852 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15853 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15854 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15855 NDS32_BUILTIN_UASTORE_DW.
15856 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15859 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
15860 Kito Cheng <kito.cheng@gmail.com>
15861 Chung-Ju Wu <jasonwucj@gmail.com>
15863 * config/nds32/nds32-intrinsic.c
15864 (nds32_expand_builtin_null_ftype_reg): Delete.
15865 (nds32_expand_builtin_reg_ftype_imm): Ditto.
15866 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15867 (nds32_read_argument): New.
15868 (nds32_legitimize_target): Ditto.
15869 (nds32_legitimize_argument): Ditto.
15870 (nds32_check_constant_argument): Ditto.
15871 (nds32_expand_unop_builtin): Ditto.
15872 (nds32_expand_unopimm_builtin): Ditto.
15873 (nds32_expand_binop_builtin): Ditto.
15874 (nds32_builtin_decl_impl): Ditto.
15875 (builtin_description): Ditto.
15876 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15877 (nds32_init_builtins_impl): Ditto.
15878 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15879 (nds32_builtin_decl): New.
15880 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15881 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15883 2018-03-02 Jeff Law <law@redhat.com>
15885 * reorg.c (stop_search_p): Handle DEBUG_INSN.
15886 (redundant_insn, fill_simple_delay_slots): Likewise.
15887 (fill_slots_from_thread): Likewise.
15888 * resource.c (mark_referenced_resources): Likewise.
15889 (mark_set_resources, find_dead_or_set_registers): Likewise.
15891 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15893 * substring-locations.h (format_warning_va): Formatting fix for
15894 ATTRIBUTE_GCC_DIAG.
15895 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15897 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15898 * substring-locations.c: Include intl.h.
15899 (format_warning_va): Turned into small wrapper around
15900 format_warning_n_va, renamed to ...
15901 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15902 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15904 (format_warning_at_substring_n): New function.
15905 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15906 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
15907 format_warning_at_substring with just a shorter name instead of
15908 const function pointer.
15909 (fmtwarn_n): New function.
15910 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15911 appropriate, get rid of all the fmtstr temporaries, move conditionals
15912 with G_() wrapped string literals directly into fmtwarn arguments,
15913 cast dir.len to (int), formatting fixes.
15915 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
15917 * doc/invoke.texi: Remove "Cilk Plus" references.
15919 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15920 Richard Biener <rguenther@suse.de>
15923 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15924 for error or warning attributes if CALL_FROM_THUNK_P is set.
15927 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15930 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15931 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15934 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15935 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15937 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15938 instead of -1U in last predictors element's probability member.
15940 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
15943 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15944 arguments if they are comparable.
15946 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15948 PR tree-optimization/84634
15949 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15950 masks and masked_loop_p with a single loop_masks, making sure it's
15951 null for bb vectorization.
15953 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
15955 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15956 (vect_analyze_data_ref_access): Use loop->safe_len rather than
15957 loop->force_vectorize to check whether there is no alias.
15959 2018-03-02 Jakub Jelinek <jakub@redhat.com>
15962 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15964 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15966 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15967 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15968 instead of a loop around prev_real_insn.
15969 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15972 PR inline-asm/84625
15973 * config/i386/i386.c (ix86_print_operand): Use conditional
15974 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15977 2018-03-02 Richard Biener <rguenther@suse.de>
15979 PR tree-optimization/84427
15980 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15981 (bitmap_set_subtract_values): Rewrite to handle multiple
15984 (prune_clobbered_mems): Likewise.
15985 (phi_translate): Take edge instead of pred/phiblock.
15986 (phi_translate_1): Likewise.
15987 (phi_translate_set): Likewise. Insert all translated
15988 exprs for a value into the set, keeping possibly multiple
15989 expressions per value.
15990 (compute_antic_aux): Adjust for phi_translate changes.
15991 When intersecting union the expressions and prune those
15992 not in the final value set, keeping possibly multiple
15993 expressions per value. Do not use value-insertion
15994 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15995 all expressions. Add verification that the value-sets
15996 only shrink during iteration.
15997 (compute_partial_antic_aux): Adjust for the phi_translate changes.
15998 (do_pre_regular_insertion): Likewise.
15999 (do_pre_partial_partial_insertion): Likewise.
16001 2018-03-02 Richard Biener <rguenther@suse.de>
16004 * config/darwin.c (saved_debug_info_level): New static global.
16005 (darwin_asm_lto_start): Disable debug info generation for LTO out.
16006 (darwin_asm_lto_end): Restore debug info generation settings.
16008 2018-03-01 Martin Liska <mliska@suse.cz>
16011 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
16012 volatile arguments.
16014 2018-03-01 Richard Biener <rguenther@suse.de>
16017 * dwarf2out.c (gen_variable_die): Properly handle late VLA
16018 type annotation with LTO when debug was disabled at compile-time.
16020 2018-03-01 Matthew Fortune <mfortune@gmail.com>
16022 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
16024 (mips_final_postscan_insn): Likewise.
16026 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
16028 PR rtl-optimization/84528
16029 * alias.c (init_alias_target): Add commentary.
16030 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
16031 a unique base value if the frame pointer is not eliminated
16032 to the stack pointer.
16034 2018-03-01 Tom de Vries <tom@codesourcery.com>
16036 PR rtl-optimization/83327
16037 * lra-int.h (hard_regs_spilled_into): Declare.
16038 * lra.c (hard_regs_spilled_into): Define.
16039 (init_reg_info): Init hard_regs_spilled_into.
16040 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
16041 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
16042 (process_bb_lives): Handle hard_regs_spilled_into.
16043 (lra_create_live_ranges_1): Before doing liveness propagation, clear
16044 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
16046 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
16048 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
16049 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
16050 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
16051 * config/rs6000/aix72.h: New file.
16053 2018-02-28 Jakub Jelinek <jakub@redhat.com>
16055 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
16056 instead of warning_at with conditional singular and plural messages
16060 * stor-layout.c (update_alignment_for_field): For
16061 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
16062 && !DECL_PACKED (field), do the alignment update, just use
16063 only desired_align instead of MAX (type_align, desired_align)
16065 (place_field): Don't do known_align < desired_align handling
16066 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
16067 is non-NULL, instead do it after rli->prev_field handling and
16068 only if not within a bitfield word. For DECL_PACKED (field)
16069 use type_align of BITS_PER_UNIT.
16071 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
16073 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
16074 superfluous parentheses and trailing spaces.
16076 2018-02-28 Richard Biener <rguenther@suse.de>
16078 PR tree-optimization/84584
16079 * graphite-scop-detection.c (scop_detection::add_scop): Discard
16080 SCoPs with fake exit edge.
16082 2018-02-28 Martin Liska <mliska@suse.cz>
16085 * timevar.c (timer::print): Fix format to properly print 100%
16088 2018-02-28 Richard Biener <rguenther@suse.de>
16090 PR middle-end/84607
16091 * genmatch.c (capture_info::walk_match): Do not mark
16092 captured expressions without operands as expr_p given
16093 they act more like predicates and should be subject to
16094 "lost tail" side-effect preserving.
16096 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
16098 PR rtl-optimization/81611
16099 * auto-inc-dec.c (attempt_change): Move dead note from
16100 mem_insn if it's the next use of regno
16101 (find_address): Take address use of reg holding
16102 non-incremented value. Add parm to limit search to the named
16104 (merge_in_block): Attempt to use a mem insn that is the next
16105 use of the original regno.
16107 2018-02-27 Martin Sebor <msebor@redhat.com>
16110 * doc/invoke.texi (-Wmissing-attributes): New option.
16111 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16113 2018-02-27 Martin Sebor <msebor@redhat.com>
16115 PR translation/84207
16116 * diagnostic-core.h (warning_n, error_n, inform_n): Change
16117 n argument to unsigned HOST_WIDE_INT.
16118 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16119 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
16120 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16121 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16123 2018-02-27 Richard Biener <rguenther@suse.de>
16125 PR tree-optimization/84512
16126 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16127 Do not use the estimate returned from record_stmt_cost for
16128 the scalar iteration cost but sum properly using add_stmt_cost.
16130 2018-02-27 Richard Biener <rguenther@suse.de>
16132 PR tree-optimization/84466
16133 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16134 Adjust last change to less strictly validate use operands.
16136 2018-02-27 Martin Liska <mliska@suse.cz>
16138 PR gcov-profile/84548
16139 * gcov.c (process_file): Allow partial overlap and consider it
16140 also as group functions.
16141 (output_lines): Properly calculate range of lines for a group.
16143 2018-02-27 Martin Liska <mliska@suse.cz>
16145 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16146 'ggc' suffixes. Change first column width.
16147 (timer::print): Fix formatting of the column.
16149 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
16151 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16152 preserve inline entry blocks for the sake of debug inline
16153 entry point markers alone.
16154 (remove_unused_locals): Suggest in comments a better place to
16155 force the preservation of inline entry blocks that are
16156 otherwise unused, but do not preserve them.
16158 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16160 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16162 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16165 * config/i386/constraints.md (Bs): Replace
16166 ix86_indirect_branch_register with
16167 TARGET_INDIRECT_BRANCH_REGISTER.
16169 * config/i386/i386.md (indirect_jump): Likewise.
16170 (tablejump): Likewise.
16171 (*sibcall_memory): Likewise.
16172 (*sibcall_value_memory): Likewise.
16173 Peepholes of indirect call and jump via memory: Likewise.
16174 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16175 (*sibcall_value_GOT_32): Likewise.
16176 * config/i386/predicates.md (indirect_branch_operand): Likewise.
16177 (GOT_memory_operand): Likewise.
16178 (call_insn_operand): Likewise.
16179 (sibcall_insn_operand): Likewise.
16180 (GOT32_symbol_operand): Likewise.
16181 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16183 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16185 PR rtl-optimization/83496
16186 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16187 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
16188 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16189 redundant insn, if any.
16190 (relax_delay_slots): Likewise.
16191 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16193 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
16195 PR tree-optimization/83965
16196 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16197 that grouped statements are part of a reduction chain. Return
16198 true if the statement is not marked as a reduction itself but
16199 is part of a group.
16200 (vect_recog_dot_prod_pattern): Don't check whether the statement
16201 is part of a group here.
16202 (vect_recog_sad_pattern): Likewise.
16203 (vect_recog_widen_sum_pattern): Likewise.
16205 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
16208 * final.c (rest_of_clean_state): Also look for calls inside sequences.
16210 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
16213 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16215 (ix86_output_indirect_function_return): New prototype.
16216 (ix86_split_simple_return_pop_internal): Likewise.
16217 * config/i386/i386.c (indirect_return_via_cx): New.
16218 (indirect_return_via_cx_bnd): Likewise.
16219 (indirect_thunk_name): Handle return va CX_REG.
16220 (output_indirect_thunk_function): Create alias for
16221 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16222 (ix86_output_indirect_jmp): Remove the bool argument.
16223 (ix86_output_indirect_function_return): New function.
16224 (ix86_split_simple_return_pop_internal): Likewise.
16225 * config/i386/i386.md (*indirect_jump): Don't pass false
16226 to ix86_output_indirect_jmp.
16227 (*tablejump_1): Likewise.
16228 (simple_return_pop_internal): Change it to define_insn_and_split.
16229 Call ix86_split_simple_return_pop_internal to split it for
16230 -mfunction-return=.
16231 (simple_return_indirect_internal): Call
16232 ix86_output_indirect_function_return instead of
16233 ix86_output_indirect_jmp.
16235 2018-02-26 Jakub Jelinek <jakub@redhat.com>
16238 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16239 memset and value initialization afterwards.
16241 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
16243 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16245 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
16248 * common/config/aarch64/aarch64-common.c
16249 (aarch_option_optimization_table[]): Switch
16250 off fomit-frame-pointer
16252 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16253 Chung-Ju Wu <jasonwucj@gmail.com>
16255 * config/nds32/nds32-multiple.md (load_multiple): Disallow
16257 (store_multiple): Ditto.
16259 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
16261 * config.gcc: Add --with-cpu support for nds32 target.
16262 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16263 * config/nds32/nds32.opt: Add -mcpu= option.
16265 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
16267 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16268 isel=yes): Warn for these deprecated options.
16270 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
16272 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16273 ISA_2_5_MASKS_EMBEDDED.
16275 2018-02-23 Jakub Jelinek <jakub@redhat.com>
16277 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16278 p->max as pointers rather than using iterative_hash_expr.
16280 2018-02-23 Carl Love <cel@us.ibm.com>
16282 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16283 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16285 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16286 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16287 P8V_BUILTIN_VEC_VUNSIGNED2.
16289 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
16292 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16293 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16295 * lra-constraints.c (curr_insn_transform): Set up
16296 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
16298 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16299 * lra-eliminations.c (spill_pseudos): Ditto.
16300 (process_insn_for_elimination): Ditto.
16301 * lra-lives.c (reg_early_clobber_p): Use the new macros.
16302 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16303 LRA_NON_CLOBBERED_ALT.
16305 2018-02-22 Martin Sebor <msebor@redhat.com>
16307 PR tree-optimization/84480
16308 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16309 to maybe_diag_stxncpy_trunc. Call it.
16310 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16311 from gimple_fold_builtin_strcpy. Print inlining stack.
16312 (handle_builtin_stxncpy): Print inlining stack.
16313 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16315 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
16318 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16319 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16320 and -fcheck-pointer-bounds are used together.
16321 (indirect_thunk_prefix): New enum.
16322 (indirect_thunk_need_prefix): New function.
16323 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
16324 "_nt" instead of "_bnd" for NOTRACK prefix.
16325 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16326 (output_indirect_thunk_function): Likewise.
16328 (ix86_code_end): Update output_indirect_thunk_function calls.
16329 (ix86_output_indirect_branch_via_reg): Replace
16330 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16331 (ix86_output_indirect_branch_via_push): Likewise.
16332 (ix86_output_function_return): Likewise.
16333 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16334 incompatible with -fcf-protection=branch and
16335 -fcheck-pointer-bounds.
16337 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16340 * config/aarch64/aarch64.c (aarch64_print_address_internal):
16341 Change gcc_assert call to output_operand_lossage.
16343 2018-02-22 Steve Ellcey <sellcey@cavium.com>
16345 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16347 2018-02-22 DJ Delorie <dj@redhat.com>
16348 Sebastian Perta <sebastian.perta@renesas.com>
16349 Oleg Endo <olegendo@gcc.gnu.org>
16351 * config/rx/rx.c (rx_rtx_costs): New function.
16352 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16354 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
16356 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16358 2018-02-22 Martin Liska <mliska@suse.cz>
16361 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16362 Add "native" as a possible value.
16364 2018-02-22 Martin Liska <mliska@suse.cz>
16367 * config/i386/i386.c (ix86_option_override_internal):
16368 Add "native" as a possible value for -march and -mtune.
16370 2018-02-22 Jakub Jelinek <jakub@redhat.com>
16373 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16374 to all type variants.
16376 PR tree-optimization/84503
16377 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16378 width as info->bitpos + info->bitsize - start.
16379 (merged_store_group::merge_overlapping): Simplify width computation.
16380 (check_no_overlap): New function.
16381 (imm_store_chain_info::try_coalesce_bswap): Compute expected
16382 start + width and last_order of the group, fail if check_no_overlap
16384 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16385 to group if check_no_overlap fails.
16387 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16389 * config/rs6000/altivec.md: Delete contraint arguments to
16390 define_expand, define_split, and define_peephole2, and in
16391 define_insn_and_split if always unused.
16392 * config/rs6000/darwin.md: Ditto.
16393 * config/rs6000/dfp.md: Ditto.
16394 * config/rs6000/rs6000.md: Ditto.
16395 * config/rs6000/sync.md: Ditto.
16396 * config/rs6000/vector.md: Ditto.
16397 * config/rs6000/vsx.md: Ditto.
16399 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
16401 * config/rs6000/altivec.md: Write output control strings as braced
16402 blocks instead of double-quoted strings.
16403 * config/rs6000/darwin.md: Ditto.
16404 * config/rs6000/rs6000.md: Ditto.
16405 * config/rs6000/vector.md: Ditto.
16406 * config/rs6000/vsx.md: Ditto.
16408 2018-02-21 Jason Merrill <jason@redhat.com>
16410 PR c++/84314 - ICE with templates and fastcall attribute.
16411 * attribs.c (build_type_attribute_qual_variant): Remove assert.
16413 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16415 * ipa-cp.c (determine_versionability): Fix comment typos.
16417 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
16420 * ipa-cp.c (determine_versionability): Do not version functions caling
16423 2018-02-21 Martin Liska <mliska@suse.cz>
16426 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16427 Add "native" as a possible value.
16428 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
16429 the macro when native cpu detection is available.
16431 2018-02-21 Martin Liska <mliska@suse.cz>
16434 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16435 Add "native" as a possible value.
16436 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16437 when native cpu detection is available.
16439 2018-02-21 Jakub Jelinek <jakub@redhat.com>
16440 Martin Sebor <msebor@redhat.com>
16442 PR tree-optimization/84478
16443 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16445 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16446 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16447 support which is conservatively correct, for 2 only stay conservative
16448 for maxlen. Formatting and comment capitalization fixes. Add STRICT
16449 argument to the 2 argument get_range_strlen, adjust 6 arg
16450 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16452 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16453 (gimple_fold_builtin_strlen): Pass true as last argument to
16456 2018-02-20 Martin Sebor <msebor@redhat.com>
16458 PR middle-end/84095
16459 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16460 (builtin_memref::set_base_and_offset): Same. Handle inner references.
16461 (builtin_memref::builtin_memref): Factor out parts into
16462 set_base_and_offset and call it.
16464 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16466 PR middle-end/84406
16467 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16468 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16469 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
16470 search at the associated MODE_INT.
16472 2018-02-20 Jeff Law <law@redhat.com>
16474 PR middle-end/82123
16475 PR tree-optimization/81592
16476 PR middle-end/79257
16477 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16478 for range data rather than using global data.
16479 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16480 range data rather than using global data.
16481 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16482 pass it to children as needed.
16483 (struct directive::fmtresult): Similarly.
16484 (struct directive::set_width): Similarly.
16485 (struct directive::set_precision): Similarly.
16486 (format_integer, format_directive, parse_directive): Similarly.
16487 (format_none): Accept unnamed vr_values parameter.
16488 (format_percent, format_floating, format_character): Similarly.
16489 (format_string, format_plain): Similarly.
16490 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16491 the EVRP range analyzer for range data rather than using global data.
16492 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16493 gimple-ssa-evrp-analyze.h
16494 (class sprintf_dom_walker): Add after_dom_children member function.
16495 Add evrp_range_analyzer member.
16496 (sprintf_dom_walker::before_dom_children): Call into the EVRP
16497 range analyzer as needed.
16498 (sprintf_dom_walker::after_dom_children): New member function.
16499 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16501 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16502 (evrp_range_analyzer::pop_to_marker): Likewise.
16504 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
16506 PR tree-optimization/84419
16507 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16508 with the required type if its current type is compatible but
16511 2018-02-20 Jakub Jelinek <jakub@redhat.com>
16513 PR middle-end/82004
16514 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16515 after vectorization.
16517 2018-02-20 Martin Liska <mliska@suse.cz>
16520 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16521 possible values if we don't have a hint.
16523 2018-02-20 Martin Liska <mliska@suse.cz>
16527 * final.c (shorten_branches): Build align_tab array with one
16529 * opts.c (finish_options): Add alignment option limit check.
16530 (MAX_CODE_ALIGN): Likewise.
16531 (MAX_CODE_ALIGN_VALUE): Likewise.
16532 * doc/invoke.texi: Document maximum allowed option value for
16533 all -falign-* options.
16535 2018-02-19 Jakub Jelinek <jakub@redhat.com>
16538 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16539 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16540 * var-tracking.c (emit_note_insn_var_location): Remove all references
16541 to NOTE_INSN_CALL_ARG_LOCATION.
16542 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16543 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16544 Use copy_rtx_if_shared.
16545 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16546 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16547 (dwarf2out_var_location): Remove handling of
16548 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16550 * final.c (final_scan_insn): Remove all references to
16551 NOTE_INSN_CALL_ARG_LOCATION.
16552 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
16553 before dumping final insns.
16554 * except.c (emit_note_eh_region_end): Remove all references to
16555 NOTE_INSN_CALL_ARG_LOCATION.
16556 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16557 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16558 * config/arc/arc.c (hwloop_optimize): Likewise.
16559 * config/arm/arm.c (create_fix_barrier): Likewise.
16560 * config/s390/s390.c (s390_chunkify_start): Likewise.
16561 * config/sh/sh.c (find_barrier): Likewise.
16562 * config/i386/i386.c (rest_of_insert_endbranch,
16563 ix86_seh_fixup_eh_fallthru): Likewise.
16564 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16565 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16566 * config/frv/frv.c (frv_function_prologue): Likewise.
16567 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
16569 (note_outside_basic_block_p): Remove all references to
16570 NOTE_INSN_CALL_ARG_LOCATION.
16571 * gengtype.c (adjust_field_rtx_def): Likewise.
16572 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16574 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16575 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16578 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16581 PR tree-optimization/84452
16582 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16583 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16586 2018-02-19 Martin Liska <mliska@suse.cz>
16589 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16591 2018-02-19 Martin Liska <mliska@suse.cz>
16592 Richard Sandiford <richard.sandiford@linaro.org>
16594 PR tree-optimization/82491
16595 * gimple-fold.c (get_base_constructor): Make earlier bail out
16598 2018-02-19 Carl Love <cel@us.ibm.com>
16600 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16601 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16603 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16604 P8V_BUILTIN_VEC_NEG.
16606 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
16608 * config/rl78/rl78.md (movdf): New define expand.
16610 2018-02-19 Martin Liska <mliska@suse.cz>
16613 * doc/invoke.texi: Fix typo.
16614 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16616 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
16618 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16619 handle rs6000_single_float and rs6000_double_float specially for
16622 2018-02-16 Jeff Law <law@redhat.com>
16624 * config/rx/rx.c (add_pop_cfi_notes): New function.;
16625 (pop_regs): Use it.
16627 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16630 * ipa-inline.c (inline_small_functions): Fix a typo.
16632 2018-02-16 Nathan Sidwell <nathan@acm.org>
16634 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16636 2018-02-16 Carl Love <cel@us.ibm.com>
16638 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16639 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16640 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16641 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16642 expansion to P8V_BUILTIN_VEC_FLOAT2.
16644 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
16646 PR rtl-optimization/70023
16647 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16648 src_regno into account.
16650 2018-02-16 Carl Love <cel@us.ibm.com>
16652 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16653 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16654 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16655 * config/rs6000/rs6000.c: Remove case statements for
16656 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16657 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16658 and P9V_BUILTIN_VEC_VINSERT4B.
16659 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16660 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16661 * config/rs6000/vsx.md:
16662 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16665 2018-02-16 Carl Love <cel@us.ibm.com>
16667 * config/rs6000/altivec.h: Add builtin names vec_extract4b
16669 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16671 * config/rs6000/rs6000-c.c: Add the definitions for
16672 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16673 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16674 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16675 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
16676 definition for insert4b and define insn *insert3b_internal.
16677 * doc/extend.texi: Add documentation for vec_extract4b.
16679 2018-02-16 Nathan Sidwell <nathan@acm.org>
16681 * doc/extend.texi (Backwards Compatibility): Mention friend
16682 injection. Note for-scope is deprecated.
16683 * doc/invoke.texi (-ffriend-injection): Deprecate.
16685 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
16687 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16688 that moved to I2, also allow destinations that are a paradoxical
16689 subreg (instead of a normal reg).
16691 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
16694 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16697 2018-02-16 Richard Biener <rguenther@suse.de>
16699 PR tree-optimization/84037
16700 PR tree-optimization/84016
16702 * config/i386/i386.c (ix86_builtin_vectorization_cost):
16703 Adjust vec_construct for the fact we need additional higher latency
16704 128bit inserts for AVX256 and AVX512 vector builds.
16705 (ix86_add_stmt_cost): Scale vector construction cost for
16708 2018-02-16 Richard Biener <rguenther@suse.de>
16710 PR tree-optimization/84417
16711 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16712 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16713 (non_rewritable_lvalue_p): Likewise, use poly-ints.
16715 2018-02-16 Martin Liska <mliska@suse.cz>
16718 * internal-fn.def (ASAN_CHECK): Set proper flags.
16719 (ASAN_MARK): Likewise.
16721 2018-02-16 Julia Koval <julia.koval@intel.com>
16723 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16724 from PTA_CANNONLAKE.
16726 2018-02-16 Jakub Jelinek <jakub@redhat.com>
16729 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16730 Use ++iter rather than iter++ for std::list iterators.
16731 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
16732 defer deleting them until all nodes in the forest are processed. Do
16733 free even leaf nodes. Change to_process into auto_vec.
16736 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16737 * vec.h (vec_default_construct): Use memset instead of placement new
16738 if BROKEN_VALUE_INITIALIZATION is defined.
16739 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16740 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16743 PR rtl-optimization/83723
16744 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16745 * lra.c (lra_substitute_pseudo): Likewise. If true, use
16746 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
16748 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16750 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16752 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
16754 PR rtl-optimization/81443
16755 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16756 from inner REGs to paradoxical SUBREGs.
16758 2018-02-16 Richard Biener <rguenther@suse.de>
16760 PR tree-optimization/84399
16761 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16762 For operands we can analyze at their definition make sure we can
16763 analyze them at each use as well.
16765 2018-02-16 Richard Biener <rguenther@suse.de>
16767 PR tree-optimization/84190
16768 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16769 volatile accesses if the decl isn't volatile.
16771 2018-02-15 Jason Merrill <jason@redhat.com>
16773 PR c++/84314 - ICE with templates and fastcall attribute.
16774 * attribs.c (build_type_attribute_qual_variant): Don't clobber
16775 TYPE_CANONICAL on an existing type.
16777 2018-02-15 Jakub Jelinek <jakub@redhat.com>
16779 PR tree-optimization/84383
16780 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16781 dstoff nor call operand_equal_p if dstbase is NULL.
16783 PR tree-optimization/84334
16784 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16785 also a CONSTANT_CLASS_P, punt.
16787 2018-02-14 Jim Wilson <jimw@sifive.com>
16789 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16790 first SMALL_OPERAND check. New local min_second_step. Move assert
16791 to where locals are set. Add TARGET_RVC support.
16792 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16794 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
16796 * doc/invoke.texi: Correct -Wformat-overflow code sample.
16798 2018-02-14 Martin Sebor <msebor@redhat.com>
16800 PR tree-optimization/83698
16801 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16802 arrays constrain the offset range to their bounds.
16803 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16804 (builtin_access::overlap): Avoid setting the size of overlap if it's
16806 (maybe_diag_overlap): Also consider arrays when deciding what values
16807 of offsets to include in diagnostics.
16809 2018-02-14 Martin Sebor <msebor@redhat.com>
16812 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16813 that correspond to the kind of a declaration.
16815 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
16818 * config/pa/pa.md: Load address of PIC label using the linkage table
16819 if the label is nonlocal.
16821 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
16823 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16824 warning message if user requests -maltivec=be.
16825 * doc/invoke.texi: Document deprecation of -maltivec=be.
16827 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
16830 * config/rs6000/rs6000-c.c: Update definitions for
16831 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16832 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16834 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
16837 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16838 add _get_ssp intrinsics. Remove argument from
16839 __builtin_ia32_rdssp[d|q].
16840 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16841 * config/i386/i386-builtin.def: Remove argument from
16842 __builtin_ia32_rdssp[d|q].
16843 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16844 ix86_expand_special_args_builtin for _rdssp[d|q].
16845 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16846 Clear register before usage.
16847 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16848 Add documentation for new _get_ssp and _inc_ssp intrinsics.
16850 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
16852 PR tree-optimization/84357
16853 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16854 operand 1 of an ARRAY_REF too.
16856 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
16859 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16860 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16862 (set_of_reg): New struct.
16863 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16864 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16865 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16867 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16868 Split into bitclr, bitset, bitinvert patterns if appropriate.
16869 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16870 use rx_fuse_in_memory_bitop.
16871 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16872 to named insn, correct maximum insn length.
16874 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
16877 * machmode.def: Define a complex mode for PARTIAL_INT.
16878 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16880 * doc/rtl.texi: Document CSPImode.
16881 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16883 (msp430_hard_regno_nregs_with_padding): Likewise.
16885 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
16888 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16890 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
16892 PR rtl-optimization/84169
16893 * combine.c (try_combine): New variable split_i2i3. Set it to true if
16894 we generated a parallel as new i3 and we split that to new i2 and i3
16895 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
16896 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
16897 those to i2, not i1. Partially rewrite this scan code.
16899 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16902 * stor-layout.c (place_field): For variable length fields, adjust
16903 offset_align afterwards not just based on the field's alignment,
16904 but also on the size.
16906 PR middle-end/84309
16907 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16908 of exps and logs in the use_exp2 case.
16910 2018-02-13 Jeff Law <law@redhat.com>
16912 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16913 entry for "vector".
16915 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16918 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
16922 * common.opt (gas-loc-support, gas-locview-support): New.
16923 (ginline-points, ginternal-reset-location-views): New.
16924 * doc/invoke.texi: Document them. Use @itemx where intended.
16925 (gvariable-location-views): Adjust.
16926 * target.def (reset_location_view): New.
16927 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16928 (TARGET_RESET_LOCATION_VIEW): New.
16929 * doc/tm.texi: Rebuilt.
16930 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16931 (dwarf2out_default_as_locview_support): New.
16932 (output_asm_line_debug_info): Use option variables.
16933 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16934 (output_loc_list): Likewise.
16935 (add_high_low_attributes): Check option variables.
16936 Don't output entry view attribute in strict mode.
16937 (gen_inlined_subroutine_die): Check option variables.
16938 (dwarf2out_inline_entry): Likewise.
16939 (init_sections_and_labels): Likewise.
16940 (dwarf2out_early_finish): Likewise.
16941 (maybe_reset_location_view): New, from...
16942 (dwarf2out_var_location): ... here. Call it.
16943 * debug.h (dwarf2out_default_as_loc_support): Declare.
16944 (dwarf2out_default_as_locview_support): Declare.
16945 * hooks.c (hook_int_rtx_insn_0): New.
16946 * hooks.h (hook_int_rtx_insn_0): Declare.
16947 * toplev.c (process_options): Take -gas-loc-support and
16948 -gas-locview-support from dwarf2out. Enable
16949 -gvariable-location-views by default only with locview
16950 assembler support. Enable -ginternal-reset-location-views by
16951 default only if the target defines the corresponding hook.
16952 Enable -ginline-points by default if location views are
16953 enabled; force it disabled if statement frontiers are
16955 * tree-inline.c (expand_call_inline): Check option variables.
16956 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16958 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
16960 PR tree-optimization/84321
16961 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16962 handling. Also check whether the anti-range contains any values
16963 that satisfy the mask; switch to a VR_RANGE if not.
16965 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
16968 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16970 2018-02-13 Martin Jambor <mjambor@suse.cz>
16973 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16974 of call statements, also set location of a load to a temporary.
16976 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
16978 * config/rl78/rl78.c (add_vector_labels): New function.
16979 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16980 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16981 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16982 which checks that no arguments are passed.
16983 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16984 * doc/extend.texi: Documentation for the new attribute.
16986 2018-02-13 Andreas Schwab <schwab@suse.de>
16988 * config/riscv/linux.h (CPP_SPEC): Define.
16990 2018-02-13 Jakub Jelinek <jakub@redhat.com>
16993 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16994 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16995 OPTION_MASK_ISA_AES as first argument to def_builtin_const
16996 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16997 instead of OPTION_MASK_ISA_PCLMUL as first argument to
16998 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16999 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
17000 temporarily for AES and PCLMUL builtins.
17002 PR tree-optimization/84339
17003 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
17004 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
17007 PR middle-end/84309
17008 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
17009 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
17010 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
17012 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
17014 * omp-simd-clone.h: New file.
17015 * omp-simd-clone.c: Include omp-simd-clone.h.
17016 (expand_simd_clones): No longer static.
17017 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
17018 cgraph.h and omp-simd-clone.h.
17019 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
17020 (vect_recog_widen_shift_pattern): Formatting fix.
17021 (vect_pattern_recog_1): Don't check optab for calls.
17024 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
17025 operands[2] into a REG before using gen_lowpart on it.
17027 2018-02-12 Jeff Law <law@redhat.com>
17030 * config/sh/sh.c (find_barrier): Consider a sibling call
17033 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
17034 successfully back substituting a reg.
17036 2018-02-12 Richard Biener <rguenther@suse.de>
17038 PR tree-optimization/84037
17039 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
17040 parameter, move visited init to caller.
17041 (vect_slp_analyze_operations): Separate cost from validity
17042 check, initialize visited once for all instances.
17043 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
17045 * tree-vect-stmts.c (vect_model_simple_cost): Make early
17047 (vect_model_promotion_demotion_cost): Likewise.
17048 (vectorizable_bswap): Guard cost modeling with !slp_node
17049 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
17051 (vectorizable_call): Likewise.
17052 (vectorizable_conversion): Likewise.
17053 (vectorizable_assignment): Likewise.
17054 (vectorizable_shift): Likewise.
17055 (vectorizable_operation): Likewise.
17056 (vectorizable_store): Likewise.
17057 (vectorizable_load): Likewise.
17058 (vectorizable_condition): Likewise.
17059 (vectorizable_comparison): Likewise.
17061 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
17064 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
17065 (ASAN_MARK): Fix fnspec to account for return value, change pointer
17066 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
17068 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17070 PR middle-end/83665
17071 * params.def (inline-min-speedup): Increase from 8 to 15.
17072 (max-inline-insns-auto): Decrease from 40 to 30.
17073 * ipa-split.c (consider_split): Add some buffer for function to
17074 be considered inlining candidate.
17075 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
17078 2018-02-12 Richard Biener <rguenther@suse.de>
17080 PR tree-optimization/84037
17081 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17082 matched stmts if we cannot swap the non-matched ones.
17084 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17086 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17087 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17088 _mm_maskz_scalef_round_ss): New intrinsics.
17089 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17090 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17091 __builtin_ia32_scalefss_round): Remove.
17092 (__builtin_ia32_scalefsd_mask_round,
17093 __builtin_ia32_scalefss_mask_round): New intrinsics.
17094 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17095 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17096 ((match_operand:VF_128 2 "<round_nimm_predicate>"
17097 "<round_constraint>")): Changed to ...
17098 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17099 "<round_scalar_constraint>")): ... this.
17100 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17101 %0, %1, %2<round_op3>}"): Changed to ...
17102 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17103 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17104 %2<round_scalar_mask_op3>}"): ... this.
17105 * config/i386/subst.md (round_scalar_nimm_predicate): New.
17107 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
17109 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17110 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17111 (_mm_maskz_sqrt_round_ss): New intrinsics.
17112 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17113 (__builtin_ia32_sqrtsd_mask_round)
17114 (__builtin_ia32_sqrtss_mask_round): New builtins.
17115 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17116 (__builtin_ia32_sqrtss_round): Remove.
17117 (__builtin_ia32_sqrtsd_mask_round)
17118 (__builtin_ia32_sqrtss_mask_round): New builtins.
17119 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17120 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17121 ((match_operand:VF_128 1 "vector_operand"
17122 "xBm,<round_constraint>")): Changed to ...
17123 ((match_operand:VF_128 1 "vector_operand"
17124 "xBm,<round_scalar_constraint>")): ... this.
17125 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17126 %0, %2, %<iptr>1<round_op3>}): Changed to ...
17127 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17128 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17129 %<iptr>1<round_scalar_mask_op3>}): ... this.
17130 ((set_attr "prefix" "<round_prefix>")): Changed to ...
17131 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17133 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
17136 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17137 Cast vec_cmpeq result to correct type.
17138 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17139 Cast vec_cmpgt result to correct type.
17141 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
17143 * final.c (final_scan_insn_1): Renamed from...
17144 (final_scan_insn): ... this. New wrapper, to recover
17145 seen from the outermost call in recursive ones.
17146 * config/sparc/sparc.c (output_return): Drop seen from call.
17147 (output_sibcall): Likewise.
17148 * config/visium/visium.c (output_branch): Likewise.
17150 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
17152 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17155 2018-02-10 Alan Modra <amodra@gmail.com>
17158 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17159 Specify LR as an input.
17161 2018-02-10 Jakub Jelinek <jakub@redhat.com>
17164 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17165 remove_member_access_dummy_vars): New functions.
17166 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17167 lower_omp_1, execute_lower_omp): Use them.
17169 PR rtl-optimization/84308
17170 * shrink-wrap.c (spread_components): Release todo vector.
17172 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
17174 PR rtl-optimization/57193
17175 * ira-color.c (struct allocno_color_data): Add member
17176 conflict_allocno_hard_prefs.
17177 (update_conflict_allocno_hard_prefs): New.
17178 (bucket_allocno_compare_func): Add a preference based on
17179 conflict_allocno_hard_prefs.
17180 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17181 (color_allocnos): Remove a dead code. Initiate
17182 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
17184 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17187 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17188 constraint from =wa to wa. Avoid a subreg on the output operand,
17189 instead use a pseudo and subreg it in a move.
17190 (p9_xxbrd_<mode>): Changed to ...
17191 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17192 (p9_xxbrd_v2df): New expander.
17193 (p9_xxbrw_<mode>): Changed to ...
17194 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17195 (p9_xxbrw_v4sf): New expander.
17197 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17199 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17201 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
17204 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17205 multiply in 32-bit mode.
17206 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17207 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17210 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
17212 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17213 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17214 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17215 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17217 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
17220 * dwarf2out.c (is_trivial_indirect_ref): New function.
17221 (dwarf2out_late_global_decl): Do not generate a location
17222 attribute for variables that have a non-trivial DECL_VALUE_EXPR
17223 and that are not defined in the current unit.
17225 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17227 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17228 instead of a libcall for UNORDERED.
17230 2018-02-09 Tamar Christina <tamar.christina@arm.com>
17233 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17234 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17236 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17239 * config/s390/s390.c (s390_set_current_function): Invoke
17240 s390_indirect_branch_settings also if fndecl didn't change.
17242 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17244 * config/rs6000/rs6000.md (blockage): Set length to zero.
17246 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
17248 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17250 2018-02-09 Jakub Jelinek <jakub@redhat.com>
17253 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17254 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17258 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17259 PARALLEL incoming that failed vt_get_decl_and_offset check.
17261 PR middle-end/84237
17262 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17263 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17265 (get_variable_section): For decls in named .bss* sections pass true as
17266 second argument to bss_initializer_p.
17268 2018-02-09 Marek Polacek <polacek@redhat.com>
17269 Jakub Jelinek <jakub@redhat.com>
17272 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17273 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
17274 Sync some changes from cxx_fold_indirect_ref.
17276 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
17278 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17280 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17281 (BLOCK_INLINE_ENTRY_LABEL): New.
17282 (dwarf2out_var_location): Disregard inline entry markers.
17283 (inline_entry_data): New struct.
17284 (inline_entry_data_hasher): New hashtable type.
17285 (inline_entry_data_hasher::hash): New.
17286 (inline_entry_data_hasher::equal): New.
17287 (inline_entry_data_table): New variable.
17288 (add_high_low_attributes): Add DW_AT_entry_pc and
17289 DW_AT_GNU_entry_view attributes if a pending entry is found
17290 in inline_entry_data_table. Add old entry_pc attribute only
17291 if debug nonbinding markers are disabled.
17292 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17293 markers are enabled.
17294 (block_within_block_p, dwarf2out_inline_entry): New.
17295 (dwarf2out_finish): Check that no entries remained in
17296 inline_entry_data_table.
17297 * final.c (reemit_insn_block_notes): Handle inline entry notes.
17298 (final_scan_insn, notice_source_line): Likewise.
17299 (rest_of_clean_state): Skip inline entry markers.
17300 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17302 * gimple.c (gimple_build_debug_inline_entry): New.
17303 * gimple.h (enum gimple_debug_subcode): Add
17304 GIMPLE_DEBUG_INLINE_ENTRY.
17305 (gimple_build_debug_inline_entry): Declare.
17306 (gimple_debug_inline_entry_p): New.
17307 (gimple_debug_nonbind_marker_p): Adjust.
17308 * insn-notes.def (INLINE_ENTRY): New.
17309 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17310 inline entry marker notes.
17311 (print_insn): Likewise.
17312 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17313 (INSN_DEBUG_MARKER_KIND): Likewise.
17314 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17315 * tree-inline.c (expand_call_inline): Build and insert
17316 debug_inline_entry stmt.
17317 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17318 inline entry blocks early, if nonbind markers are enabled.
17319 (dump_scope_block): Dump fragment info.
17320 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17321 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17322 (gimple_build_debug_inline_entry): New.
17323 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17324 Enable/disable inline entry points too.
17325 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17326 (DEBUG_INSN): Describe inline entry markers.
17328 * common.opt (gvariable-location-views): New.
17329 (gvariable-location-views=incompat5): New.
17330 * config.in: Rebuilt.
17331 * configure: Rebuilt.
17332 * configure.ac: Test assembler for view support.
17333 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17334 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17335 * dwarf2out.c (var_loc_view): New typedef.
17336 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17337 (dwarf2out_locviews_in_attribute): New.
17338 (dwarf2out_locviews_in_loclist): New.
17339 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17340 (enum dw_line_info_opcode): Add LI_adv_address.
17341 (struct dw_line_info_table): Add view.
17342 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17343 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17344 (zero_view_p): New variable.
17345 (ZERO_VIEW_P): New macro.
17346 (output_asm_line_debug_info): New.
17347 (struct var_loc_node): Add view.
17348 (add_AT_view_list, AT_loc_list): New.
17349 (add_var_loc_to_decl): Add view param. Test it against last.
17350 (new_loc_list): Add view params. Record them.
17351 (AT_loc_list_ptr): Handle loc and view lists.
17352 (view_list_to_loc_list_val_node): New.
17353 (print_dw_val): Handle dw_val_class_view_list.
17354 (size_of_die): Likewise.
17355 (value_format): Likewise.
17356 (loc_list_has_views): New.
17357 (gen_llsym): Set vl_symbol too.
17358 (maybe_gen_llsym, skip_loc_list_entry): New.
17359 (dwarf2out_maybe_output_loclist_view_pair): New.
17360 (output_loc_list): Output view list or entries too.
17361 (output_view_list_offset): New.
17362 (output_die): Handle dw_val_class_view_list.
17363 (output_dwarf_version): New.
17364 (output_compilation_unit_header): Use it.
17365 (output_skeleton_debug_sections): Likewise.
17366 (output_rnglists, output_line_info): Likewise.
17367 (output_pubnames, output_aranges): Update version comments.
17368 (output_one_line_info_table): Output view numbers in asm comments.
17369 (dw_loc_list): Determine current endview, pass it to new_loc_list.
17370 Call maybe_gen_llsym.
17371 (loc_list_from_tree_1): Adjust.
17372 (add_AT_location_description): Create view list attribute if
17373 needed, check it's absent otherwise.
17374 (convert_cfa_to_fb_loc_list): Adjust.
17375 (maybe_emit_file): Call output_asm_line_debug_info for test.
17376 (dwarf2out_var_location): Reset views as needed. Precompute
17377 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
17378 attribute. Set view.
17379 (new_line_info_table): Reset next view.
17380 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17381 (dwarf2out_source_line): Likewise. Output view resets and labels to
17382 the assembler, or select appropriate line info opcodes.
17383 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17384 (optimize_string_length): Catch it. Adjust.
17385 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
17386 dw_val_class_view_list, and remove it if no longer needed.
17387 (hash_loc_list): Hash view numbers.
17388 (loc_list_hasher::equal): Compare them.
17389 (optimize_location_lists): Check whether a view list symbol is
17390 needed, and whether the locview attribute is present, and
17391 whether they match. Remove the locview attribute if no longer
17393 (index_location_lists): Call skip_loc_list_entry for test.
17394 (dwarf2out_finish): Call output_asm_line_debug_info for test.
17395 Use output_dwarf_version.
17396 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17397 (struct dw_val_node): Add val_view_list.
17398 * final.c (SEEN_NEXT_VIEW): New.
17399 (set_next_view_needed): New.
17400 (clear_next_view_needed): New.
17401 (maybe_output_next_view): New.
17402 (final_start_function): Rename to...
17403 (final_start_function_1): ... this. Take pointer to FIRST,
17404 add SEEN parameter. Emit param bindings in the initial view.
17405 (final_start_function): Reintroduce SEEN-less interface.
17406 (final): Rename to...
17407 (final_1): ... this. Take SEEN parameter. Output final pending
17408 next view at the end.
17409 (final): Reintroduce seen-less interface.
17410 (final_scan_insn): Output pending next view before switching
17411 sections or ending a block. Mark the next view as needed when
17412 outputting variable locations. Notify debug backend of section
17413 changes, and of location view changes.
17414 (rest_of_handle_final): Adjust.
17415 * toplev.c (process_options): Autodetect value for debug variable
17416 location views option. Warn on incompat5 without -gdwarf-5.
17417 * doc/invoke.texi (gvariable-location-views): New.
17418 (gvariable-location-views=incompat5): New.
17419 (gno-variable-location-views): New.
17421 2018-02-08 David Malcolm <dmalcolm@redhat.com>
17423 PR tree-optimization/84136
17424 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17425 that the result of find_edge is non-NULL.
17427 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17430 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17431 storing integer register in SImode. Fix cost of 256 and 512
17432 byte aligned SSE register store.
17434 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
17436 * config/i386/i386.c (ix86_multiplication_cost): Fix
17437 multiplication cost for TARGET_AVX512DQ.
17439 2018-02-08 Marek Polacek <polacek@redhat.com>
17441 PR tree-optimization/84238
17442 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17445 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17447 PR tree-optimization/84265
17448 * tree-vect-stmts.c (vectorizable_store): Don't treat
17449 VMAT_CONTIGUOUS accesses as grouped.
17450 (vectorizable_load): Likewise.
17452 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17454 PR tree-optimization/81635
17455 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17456 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17457 (test_round_for_mask): New functions.
17458 (wide_int_cc_tests): Call test_round_for_mask.
17459 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17460 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17461 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17462 range returned by get_range_info.
17464 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
17467 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17468 * symtab.c: Include builtins.h
17469 (symtab_node::output_to_lto_symbol_table_p): Move here
17470 from lto-streamer-out.c:output_symbol_p.
17471 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17472 (output_symbol_p): Move all logic to symtab.c
17473 (produce_symtab): Update.
17475 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17477 * config/s390/s390-opts.h (enum indirect_branch): Define.
17478 * config/s390/s390-protos.h (s390_return_addr_from_memory)
17479 (s390_indirect_branch_via_thunk)
17480 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17481 (enum s390_indirect_branch_type): Define.
17482 * config/s390/s390.c (struct s390_frame_layout, struct
17483 machine_function): Remove.
17484 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17485 (indirect_branch_table_label_no, indirect_branch_table_name):
17487 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17488 (enum s390_indirect_branch_option): Define.
17489 (s390_return_addr_from_memory): New function.
17490 (s390_handle_string_attribute): New function.
17491 (s390_attribute_table): Add new attribute handler.
17492 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17493 (s390_indirect_branch_via_thunk): New function.
17494 (s390_indirect_branch_via_inline_thunk): New function.
17495 (s390_function_ok_for_sibcall): When jumping via thunk disallow
17496 sibling call optimization for non z10 compiles.
17497 (s390_emit_call): Force indirect branch target to be a single
17498 register. Add r1 clobber for non-z10 compiles.
17499 (s390_emit_epilogue): Emit return jump via return_use expander.
17500 (s390_reorg): Handle JUMP_INSNs as execute targets.
17501 (s390_option_override_internal): Perform validity checks for the
17502 new command line options.
17503 (s390_indirect_branch_attrvalue): New function.
17504 (s390_indirect_branch_settings): New function.
17505 (s390_set_current_function): Invoke s390_indirect_branch_settings.
17506 (s390_output_indirect_thunk_function): New function.
17507 (s390_code_end): Implement target hook.
17508 (s390_case_values_threshold): Implement target hook.
17509 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17511 * config/s390/s390.h (struct s390_frame_layout)
17512 (struct machine_function): Move here from s390.c.
17513 (TARGET_INDIRECT_BRANCH_NOBP_RET)
17514 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17515 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17516 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17517 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17518 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17519 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17520 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17521 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17522 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17523 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17524 (mnemonic attribute): Add values which aren't recognized
17526 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17527 pattern for branch conversion. Fix mnemonic attribute.
17528 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17529 indirect branch via thunk if requested.
17530 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17531 ("*indirect_jump"): Disable for branch conversion using out of
17533 ("indirect_jump_via_thunk<mode>_z10")
17534 ("indirect_jump_via_thunk<mode>")
17535 ("indirect_jump_via_inlinethunk<mode>_z10")
17536 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17537 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17538 ("casesi_jump_via_inlinethunk<mode>_z10")
17539 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17540 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17541 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17542 ("*indirect2_jump"): Disable for branch conversion.
17543 ("casesi_jump"): Turn into expander and expand patterns for branch
17545 ("return_use"): New expander.
17546 ("*return"): Emit return via thunk and rename it to ...
17547 ("*return<mode>"): ... this one.
17548 * config/s390/s390.opt: Add new options and and enum for the
17551 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
17553 * lra-constraints.c (match_reload): Unconditionally use
17554 gen_lowpart_SUBREG, rather than selecting between that
17555 and equivalent gen_rtx_SUBREG code.
17557 2018-02-08 Richard Biener <rguenther@suse.de>
17559 PR tree-optimization/84233
17560 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17561 changed flag instead of boguously re-using phi_inserted.
17563 2018-02-08 Martin Jambor <mjambor@suse.cz>
17565 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17566 static local variables.
17568 2018-02-08 Richard Biener <rguenther@suse.de>
17570 PR tree-optimization/84278
17571 * tree-vect-stmts.c (vectorizable_store): When looking for
17572 smaller vector types to perform grouped strided loads/stores
17573 make sure the mode is supported by the target.
17574 (vectorizable_load): Likewise.
17576 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17578 * config/aarch64/aarch64.c (aarch64_components_for_bb):
17579 Increase LDP/STP opportunities by adding adjacent callee-saves.
17581 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
17583 PR rtl-optimization/84068
17584 PR rtl-optimization/83459
17585 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17587 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
17589 PR tree-optimization/84224
17590 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17591 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17592 non-zero arguments.
17594 2018-02-07 Iain Sandoe <iain@codesourcery.com>
17597 * config/rs6000/altivec.md (*restore_world): Remove LR use.
17598 * config/rs6000/predicates.md (restore_world_operation): Adjust op
17599 count, remove one USE.
17601 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
17603 * doc/install.texi (Configuration): Document the
17604 --with-long-double-format={ibm,ieee} PowerPC configuration
17608 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17609 Convert from define_expand to be define_insn_and_split. Rework
17610 float/double/_Float128 conversions to QI/HI/SImode to work with
17611 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
17612 conversions to QI/HImode types did a store and then a load to
17613 truncate the value. For conversions to VSX registers, don't split
17614 the insn, instead emit the code directly. Use the code iterator
17615 any_fix to combine signed and unsigned conversions.
17616 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17617 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17618 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17619 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17620 (fix_<mode>di2_hw): Likewise.
17621 (fixuns_<mode>di2_hw): Likewise.
17622 (fix_<mode>si2_hw): Likewise.
17623 (fixuns_<mode>si2_hw): Likewise.
17624 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17625 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17626 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17627 fix<uns>_trunc<SFDF:mode>si2_p8.
17628 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17629 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17630 (fix<uns>_<mode>_mem): Likewise.
17631 (fctiw<u>z_<mode>_mem): Likewise.
17632 (fix<uns>_<mode>_mem): Likewise.
17633 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17634 the register allocator from doing a direct move to the GPRs to do
17635 a store, and instead use the ISA 3.0 store byte/half-word from
17636 vector register instruction. For IEEE 128-bit floating point,
17637 also optimize stores of 32-bit ints.
17638 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17640 2018-02-07 Alan Hayward <alan.hayward@arm.com>
17642 * genextract.c (push_pathstr_operand): New function to support
17644 (walk_rtx): Call push_pathstr_operand.
17645 (print_path): Support [a-zA-Z].
17647 2018-02-07 Richard Biener <rguenther@suse.de>
17649 PR tree-optimization/84037
17650 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17651 (cse_and_gimplify_to_preheader): Declare.
17652 (vect_get_place_in_interleaving_chain): Likewise.
17653 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17655 (_loop_vec_info::~_loop_vec_info): Delete it.
17656 (cse_and_gimplify_to_preheader): New function.
17657 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17658 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17659 (vectorizable_load): Likewise. For grouped stores always base
17660 the IV on the first element.
17661 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17662 condition before gimplifying.
17664 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17666 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17667 *DIV_EXPR and *MOD_EXPR.
17669 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
17672 * config/i386/i386.c (ix86_option_override_internal): Mask out
17673 the CF_SET bit when checking -fcf-protection.
17675 2018-02-07 Tom de Vries <tom@codesourcery.com>
17678 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17681 2018-02-07 Richard Biener <rguenther@suse.de>
17683 PR tree-optimization/84204
17684 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17687 PR tree-optimization/84205
17688 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17689 special-case isl_ast_op_zdiv_r.
17691 PR tree-optimization/84223
17692 * graphite-scop-detection.c (gather_bbs::before_dom_children):
17693 Only add conditions from within the region.
17694 (gather_bbs::after_dom_children): Adjust.
17696 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
17699 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17700 * config/avr/avr.md: Only post-reload split REG-REG moves if
17701 either register is GENERAL_REG_P.
17703 2018-02-07 Jakub Jelinek <jakub@redhat.com>
17705 PR tree-optimization/84235
17706 * tree-ssa-scopedtables.c
17707 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17708 if the subtraction is performed in floating point type where NaNs are
17709 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17710 build 1. Formatting fix.
17712 2018-02-06 Jakub Jelinek <jakub@redhat.com>
17715 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17716 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17717 and skip it regardless of bb boundaries. Use CALL_P macro,
17718 don't test INSN_P (insn) together with CALL_P or JUMP_P check
17719 unnecessarily, formatting fix.
17721 2018-02-06 Michael Collison <michael.collison@arm.com>
17723 * config/arm/thumb2.md:
17724 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17725 (*thumb_mov_notscc): Ditto.
17727 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
17730 * config/rs6000/rs6000.md (su code attribute): Use "u" for
17731 unsigned_fix, not "s".
17733 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17735 * configure.ac (gcc_fn_eh_frame_ro): New function.
17736 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17737 correct .eh_frame permissions.
17738 * configure: Regenerate.
17740 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
17742 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17743 irrelevant options.
17745 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17747 * config/rs6000/rs6000.c (rs6000_option_override_internal):
17748 Display warning message for -mno-speculate-indirect-jumps.
17750 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
17752 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17754 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17756 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
17758 PR tree-optimization/84225
17759 * tree-eh.c (find_trapping_overflow): Only call
17760 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17762 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17765 * config/i386/i386.c: Reimplement the check of possible options
17766 -mibt/-mshstk conbination. Change error messages.
17767 * doc/invoke.texi: Fix a typo: remove extra '='.
17769 2018-02-06 Marek Polacek <polacek@redhat.com>
17771 PR tree-optimization/84228
17772 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17774 2018-02-06 Tamar Christina <tamar.christina@arm.com>
17777 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17778 emitted arch directives.
17779 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17780 __ARM_FEATURE_COPROC before changing architectures.
17782 2018-02-06 Richard Biener <rguenther@suse.de>
17784 * config/i386/i386.c (print_reg): Fix typo.
17785 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17787 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
17789 * configure: Regenerate.
17791 2018-02-05 Martin Sebor <msebor@redhat.com>
17793 PR tree-optimization/83369
17794 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17797 2018-02-05 Martin Liska <mliska@suse.cz>
17799 * doc/invoke.texi: Cherry-pick upstream r323995.
17801 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
17803 * ira.c (ira_init_register_move_cost): Adjust comment.
17805 2018-02-05 Martin Liska <mliska@suse.cz>
17807 PR gcov-profile/84137
17808 * doc/gcov.texi: Fix typo in documentation.
17810 2018-02-05 Martin Liska <mliska@suse.cz>
17812 PR gcov-profile/83879
17813 * doc/gcov.texi: Document necessity of --dynamic-list-data when
17814 using dlopen functionality.
17816 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
17818 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17819 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17820 _mm_maskz_range_ss, _mm_mask_range_round_ss,
17821 _mm_maskz_range_round_ss): New intrinsics.
17822 (__builtin_ia32_rangesd128_round)
17823 (__builtin_ia32_rangess128_round): Remove.
17824 (__builtin_ia32_rangesd128_mask_round,
17825 __builtin_ia32_rangess128_mask_round): New builtins.
17826 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17827 __builtin_ia32_rangess128_round): Remove.
17828 (__builtin_ia32_rangesd128_mask_round,
17829 __builtin_ia32_rangess128_mask_round): New builtins.
17830 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17831 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17832 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17833 "<round_saeonly_constraint>")): Changed to ...
17834 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17835 "<round_saeonly_scalar_constraint>")): ... this.
17836 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17837 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17838 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17839 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17840 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17842 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
17844 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17846 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17847 Remove all values except native, 8540 and 8548.
17849 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
17851 * config/i386/i386.c (ix86_output_function_return): Pass
17852 INVALID_REGNUM, instead of -1, as invalid register number to
17853 indirect_thunk_name and output_indirect_thunk.
17855 2018-02-02 Julia Koval <julia.koval@intel.com>
17857 * config.gcc: Add -march=icelake.
17858 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17859 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17860 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17861 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17862 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17863 (processor_target_table): Add icelake.
17864 (ix86_option_override_internal): Handle new PTAs.
17865 (get_builtin_code_for_version): Handle icelake.
17866 (M_INTEL_COREI7_ICELAKE): New.
17867 (fold_builtin_cpu): Handle icelake.
17868 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17869 * doc/invoke.texi: Add -march=icelake.
17871 2018-02-02 Julia Koval <julia.koval@intel.com>
17873 * config/i386/i386.c (ix86_option_override_internal): Change flags type
17874 to wide_int_bitmask.
17875 * wide-int-bitmask.h: New.
17877 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
17880 * config/i386/i386.md: Replace Pmode with word_mode in
17881 builtin_setjmp_setup and builtin_longjmp to support x32.
17883 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
17887 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17889 (rs6000_supported_cpu_names): New static variable.
17890 (linux_cpu_translation_table): Likewise.
17891 (elf_platform) <cpu>: Define new static variable and use it.
17892 Translate kernel AT_PLATFORM name to canonical name if needed.
17893 Error if platform name is unknown.
17895 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
17898 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17900 2018-02-01 Jeff Law <law@redhat.com>
17903 * config/i386/i386.c (release_scratch_register_on_entry): Add new
17904 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
17905 the scratch if RELEASE_VIA_POP is false.
17906 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17907 If we have to save a temporary register, decrement SIZE appropriately.
17908 Pass new arguments to release_scratch_register_on_entry.
17909 (ix86_adjust_stack_and_probe): Likewise.
17910 (ix86_emit_probe_stack_range): Pass new arguments to
17911 release_scratch_register_on_entry.
17913 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
17915 PR rtl-optimization/84157
17916 * combine.c (change_zero_ext): Use REG_P predicate in
17917 front of HARD_REGISTER_P predicate.
17919 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
17921 * config/avr/avr.c (avr_option_override): Move disabling of
17922 -fdelete-null-pointer-checks to...
17923 * common/config/avr/avr-common.c (avr_option_optimization_table):
17926 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17928 PR tree-optimization/81635
17929 * tree-data-ref.c (split_constant_offset_1): For types that
17930 wrap on overflow, try to use range info to prove that wrapping
17933 2018-02-01 Renlin Li <renlin.li@arm.com>
17936 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17937 TAILCALL_ADDR_REGS.
17938 (aarch64_register_move_cost): Likewise.
17939 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17940 TAILCALL_ADDR_REGS.
17941 (REG_CLASS_NAMES): Likewise.
17942 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17943 TAILCALL_ADDR_REGS. Remove IP registers.
17944 * config/aarch64/aarch64.md (Ucs): Update register constraint.
17946 2018-02-01 Richard Biener <rguenther@suse.de>
17948 * domwalk.h (dom_walker::dom_walker): Add additional constructor
17949 for specifying RPO order and allow NULL for that.
17950 * domwalk.c (dom_walker::dom_walker): Likewise.
17951 (dom_walker::walk): Handle NULL RPO order.
17952 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17954 (rewrite_update_dom_walker): Likewise.
17955 (mark_def_dom_walker): Likewise.
17957 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17959 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17960 (aarch64_maybe_expand_sve_subreg_move): Declare.
17961 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17962 * config/aarch64/predicates.md (aarch64_any_register_operand): New
17964 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17965 that are semantically a reverse operation.
17966 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17967 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17968 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17970 (aarch64_can_change_mode_class): For big-endian, forbid changes
17971 between two SVE modes if they have different element sizes.
17973 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17975 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17976 the TImode handling for big-endian targets.
17978 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17980 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17981 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
17983 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17984 Remove BSWAP handing for big-endian targets and use the form of
17985 LD1RQ appropariate for the mode.
17987 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17989 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17990 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17991 duplicated element.
17993 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
17996 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17997 check for operands that need to go through aarch64_sve_reload_be.
17999 2018-02-01 Jakub Jelinek <jakub@redhat.com>
18001 PR tree-optimization/81661
18002 PR tree-optimization/84117
18003 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
18004 * tree-eh.c: Include gimplify.h.
18005 (find_trapping_overflow, replace_trapping_overflow,
18006 rewrite_to_non_trapping_overflow): New functions.
18007 * tree-vect-loop.c: Include tree-eh.h.
18008 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
18009 * tree-data-ref.c: Include tree-eh.h.
18010 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
18012 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
18014 PR rtl-optimization/84123
18015 * combine.c (change_zero_ext): Check if hard register satisfies
18016 can_change_dest_mode before calling gen_lowpart_SUBREG.
18018 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
18021 * ira.c (ira_init_register_move_cost): Remove assert.
18023 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18025 PR rtl-optimization/84071
18026 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
18027 * doc/tm.texi: Regenerate.
18029 2018-01-31 Richard Biener <rguenther@suse.de>
18031 PR tree-optimization/84132
18032 * tree-data-ref.c (analyze_miv_subscript): Properly
18033 check whether evolution_function_is_affine_multivariate_p
18034 before calling gcd_of_steps_may_divide_p.
18036 2018-01-31 Julia Koval <julia.koval@intel.com>
18039 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
18040 * config/i386/i386.md (rdpid_rex64) New.
18041 (rdpid): Make 32bit only.
18043 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
18046 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
18047 an IDENTIFIER_NODE for FUNCTION_TYPE's.
18049 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18052 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
18054 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
18056 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
18058 PR rtl-optimization/84071
18059 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
18060 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
18062 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18064 * config/arc/arc.c (arc_handle_aux_attribute): New function.
18065 (arc_attribute_table): Add 'aux' attribute.
18066 (arc_in_small_data_p): Consider aux like variables.
18067 (arc_is_aux_reg_p): New function.
18068 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
18069 (arc_get_aux_arg): New function.
18070 (prepare_move_operands): Handle aux-register access.
18071 (arc_handle_aux_attribute): New function.
18072 * doc/extend.texi (ARC Variable attributes): Add subsection.
18074 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
18076 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
18077 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
18078 (arc_attribute_table): Add 'uncached' attribute.
18079 (arc_print_operand): Print '.di' flag for uncached memory
18081 (arc_in_small_data_p): Do not consider for small data the uncached
18083 (arc_is_uncached_mem_p): New function.
18084 * config/arc/predicates.md (compact_store_memory_operand): Check
18085 for uncached memory accesses.
18086 (nonvol_nonimm_operand): Likewise.
18087 * doc/extend.texi (ARC Type Attribute): New subsection.
18089 2018-01-31 Jakub Jelinek <jakub@redhat.com>
18092 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18093 falign-loops=): Add Optimization flag.
18095 2018-01-30 Jeff Law <law@redhat.com>
18098 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18099 INT_REGISTERS_SAVED. Check it prior to calling
18100 get_scratch_register_on_entry.
18101 (ix86_adjust_stack_and_probe): Similarly.
18102 (ix86_emit_probe_stack_range): Similarly.
18103 (ix86_expand_prologue): Corresponding changes.
18105 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18108 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18109 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18111 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
18114 * lra-constraints.c (curr_insn_transform): Process AND in the
18117 2018-01-30 Jakub Jelinek <jakub@redhat.com>
18119 PR rtl-optimization/83986
18120 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18121 dependence against last_pending_memory_flush in addition to
18122 pending_jump_insns.
18124 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
18126 PR tree-optimization/81611
18127 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18130 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18133 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18136 2018-01-30 Richard Biener <rguenther@suse.de>
18137 Jakub Jelinek <jakub@redhat.com>
18139 PR tree-optimization/84111
18140 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18141 inner loops added during recursion, as they don't have up-to-date
18144 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18147 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18148 (can_inline_edge_by_limits_p): ... here.
18149 (can_early_inline_edge_p, check_callers,
18150 update_caller_keys, update_callee_keys, recursive_inlining,
18151 add_new_edges_to_heap, speculation_useful_p,
18152 inline_small_functions,
18153 inline_small_functions, flatten_function,
18154 inline_to_all_callers_1): Update.
18156 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
18158 * profile-count.c (profile_count::combine_with_ipa_count): Handle
18161 2018-01-30 Richard Biener <rguenther@suse.de>
18163 PR tree-optimization/83008
18164 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18165 invariant and constant vector uses in stmts when they need
18166 more than one stmt.
18168 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18171 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18172 * configure: Regenerate.
18174 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18176 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18178 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18179 Use gen_rtx_REG rather than gen_lowpart.
18181 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18183 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18184 rather than 0 when creating partial subregs.
18186 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
18188 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18191 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
18194 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18195 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18196 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18197 flags. This restores the settings used before the 2017-07-24.
18198 Turning off pre increment/decrement/modify allows IVOPTS to
18199 optimize DF/SF loops where the index is an int.
18201 2018-01-29 Richard Biener <rguenther@suse.de>
18202 Kelvin Nilsen <kelvin@gcc.gnu.org>
18205 * tree-vect-stmts.c (vectorizable_call): Don't call
18206 targetm.vectorize_builtin_md_vectorized_function if callee is
18209 2018-01-22 Carl Love <cel@us.ibm.com>
18211 * doc/extend.tex: Fix typo in second arg in
18212 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18214 2018-01-29 Richard Biener <rguenther@suse.de>
18216 PR tree-optimization/84086
18217 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18218 (flush_ssaname_freelist): When SSA names were released reset
18219 the SCEV hash table.
18221 2018-01-29 Richard Biener <rguenther@suse.de>
18223 PR tree-optimization/84057
18224 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18225 removed paths when removing edges.
18227 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
18229 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18230 -mfunction-return=@var{choice}.
18232 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
18234 PR diagnostic/84034
18235 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18236 Handle CR like TAB.
18237 (layout::print_source_line): Likewise.
18238 (test_get_line_width_without_trailing_whitespace): Add test cases.
18240 2018-01-27 Jakub Jelinek <jakub@redhat.com>
18242 PR middle-end/84040
18243 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18246 2018-01-26 Jim Wilson <jimw@sifive.com>
18248 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18250 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18253 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18255 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18256 and CMP + SUB-immediate -> SUBS.
18258 2018-01-26 Martin Sebor <msebor@redhat.com>
18260 PR tree-optimization/83896
18261 * tree-ssa-strlen.c (get_string_len): Rename...
18262 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
18263 Avoid assuming length is constant.
18264 (handle_char_store): Use HOST_WIDE_INT for string length.
18266 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
18269 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18270 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18272 2018-01-26 Richard Biener <rguenther@suse.de>
18274 PR rtl-optimization/84003
18275 * dse.c (record_store): Only record redundant stores when
18276 the earlier store aliases at least all accesses the later one does.
18278 2018-01-26 Jakub Jelinek <jakub@redhat.com>
18280 PR rtl-optimization/83985
18281 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18282 REG_CFA_RESTORE insns.
18283 (delete_unmarked_insns): Don't ignore separate shrink wrapping
18284 REG_CFA_RESTORE insns here.
18287 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18288 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18290 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18292 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18293 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18294 (arc_init): Likewise.
18295 (arc_override_options): Likewise.
18296 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18298 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18300 * config/arc/arc.h (TARGET_DBNZ): Define.
18301 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18302 properly set the tune attribute.
18303 (dbnz): Use TARGET_DBNZ guard.
18304 * config/arc/arc.opt (mtune): Add core3 option.
18306 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18308 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18309 recognize new pic like addresses.
18310 (arc_delegitimize_address): Clean up.
18312 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18314 * config/arc/arc-arches.def: Option mrf16 valid for all
18316 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18317 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18318 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18319 * config/arc/arc-tables.opt: Regenerate.
18320 * config/arc/arc.c (arc_conditional_register_usage): Handle
18321 reduced register file case.
18322 (arc_file_start): Set must have build attributes.
18323 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18324 mrf16 option value.
18325 * config/arc/arc.opt (mrf16): Add new option.
18326 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18327 * config/arc/genmultilib.awk: Handle new mrf16 option.
18328 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18329 * config/arc/t-multilib: Regenerate.
18330 * doc/invoke.texi (ARC Options): Document mrf16 option.
18332 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18334 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18335 * config/arc/arc.c (arc_handle_secure_attribute): New function.
18336 (arc_attribute_table): Add 'secure_call' attribute.
18337 (arc_print_operand): Print secure call operand.
18338 (arc_function_ok_for_sibcall): Don't optimize tail calls when
18340 (arc_is_secure_call_p): New function. * config/arc/arc.md
18341 (call_i): Add support for sjli instruction.
18342 (call_value_i): Likewise.
18343 * config/arc/constraints.md (Csc): New constraint.
18345 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
18346 John Eric Martin <John.Martin@emmicro-us.com>
18348 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18349 * config/arc/arc.c (_arc_jli_section): New struct.
18350 (arc_jli_section): New type.
18351 (rc_jli_sections): New static variable.
18352 (arc_handle_jli_attribute): New function.
18353 (arc_attribute_table): Add jli_always and jli_fixed attribute.
18354 (arc_file_end): New function.
18355 (TARGET_ASM_FILE_END): Define.
18356 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18357 (arc_add_jli_section): New function.
18358 (jli_call_scan): Likewise.
18359 (arc_reorg): Call jli_call_scan.
18360 (arc_output_addsi): Remove 'S' from printing asm operand.
18361 (arc_is_jli_call_p): New function.
18362 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18364 (movhi_insn): Likewise.
18365 (movsi_insn): Likewise.
18366 (movsi_set_cc_insn): Likewise.
18367 (loadqi_update): Likewise.
18368 (load_zeroextendqisi_update): Likewise.
18369 (load_signextendqisi_update): Likewise.
18370 (loadhi_update): Likewise.
18371 (load_zeroextendhisi_update): Likewise.
18372 (load_signextendhisi_update): Likewise.
18373 (loadsi_update): Likewise.
18374 (loadsf_update): Likewise.
18375 (movsicc_insn): Likewise.
18376 (bset_insn): Likewise.
18377 (bxor_insn): Likewise.
18378 (bclr_insn): Likewise.
18379 (bmsk_insn): Likewise.
18380 (bicsi3_insn): Likewise.
18381 (cmpsi_cc_c_insn): Likewise.
18382 (movsi_ne): Likewise.
18383 (movsi_cond_exec): Likewise.
18384 (clrsbsi2): Likewise.
18385 (norm_f): Likewise.
18395 (call_i): Remove 'S' asm letter, add jli instruction.
18396 (call_value_i): Likewise.
18397 * config/arc/arc.op (mjli-always): New option.
18398 * config/arc/constraints.md (Cji): New constraint.
18399 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18401 (subsf3_fpx): Likewise.
18402 (mulsf3_fpx): Likewise.
18403 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18405 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18406 function attrbutes.
18407 * doc/invoke.texi (ARC): Document mjli-always option.
18409 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
18411 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18412 avoid addition with 0 and use incw and decw where possible.
18414 2018-01-26 Richard Biener <rguenther@suse.de>
18416 PR tree-optimization/81082
18417 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18418 association if it requires casting to unsigned.
18419 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18420 from fold_plusminus_mult_expr to catch important cases late when
18421 range info is available.
18423 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18425 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18426 * configure.ac (hidden_linkonce): New test.
18427 * configure: Regenerate.
18428 * config.in: Regenerate.
18430 2018-01-26 Julia Koval <julia.koval@intel.com>
18432 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18433 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18434 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18435 _mm_mask_bitshuffle_epi64_mask): Fix type.
18436 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18437 USI_FTYPE_V4DI_V4DI_USI): Remove.
18438 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18439 __builtin_ia32_vpshufbitqmb256_mask,
18440 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18441 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18442 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18444 2018-01-26 Alan Modra <amodra@gmail.com>
18447 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18448 UNSPEC_VBPERMQ. Sort other unspecs.
18450 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
18452 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18454 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
18456 PR middle-end/83055
18457 * predict.c (drop_profile): Do not push/pop cfun; update also
18459 (handle_missing_profiles): Fix logic looking for zero profiles.
18461 2018-01-25 Jakub Jelinek <jakub@redhat.com>
18463 PR middle-end/83977
18464 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18465 on functions with #pragma omp declare simd or functions with simd
18467 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18468 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18469 Remove trailing \n from warning_at calls.
18471 2018-01-25 Tom de Vries <tom@codesourcery.com>
18474 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18475 for neutered workers.
18477 2018-01-24 Joseph Myers <joseph@codesourcery.com>
18480 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18481 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18483 2018-01-24 Jeff Law <law@redhat.com>
18486 * i386.c (get_probe_interval): Move to earlier point.
18487 (ix86_compute_frame_layout): If -fstack-clash-protection and
18488 the frame is larger than the probe interval, then use pushes
18489 to save registers rather than reg->mem moves.
18490 (ix86_expand_prologue): Remove conditional for int_registers_saved
18493 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
18496 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18497 min/max for never referenced object.
18499 2018-01-24 Jakub Jelinek <jakub@redhat.com>
18501 PR middle-end/83977
18502 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18504 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18505 attributes from DECL_ATTRIBUTES (decl) without affecting
18506 DECL_ATTRIBUTES (current_function_decl).
18507 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18508 functions with non-NULL DECL_ABSTRACT_ORIGIN.
18510 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
18512 PR tree-optimization/83979
18513 * fold-const.c (fold_comparison): Use constant_boolean_node
18514 instead of boolean_{true,false}_node.
18516 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
18518 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18521 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18523 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18524 Simplify the clause that sets the length attribute.
18525 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18526 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18527 clause that sets the length attribute.
18528 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18530 2018-01-24 Tom de Vries <tom@codesourcery.com>
18533 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18534 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18535 Add strict parameter.
18536 (prevent_branch_around_nothing): Insert dummy insn between branch to
18537 label and label with no ptx insn inbetween.
18538 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18540 2018-01-24 Tom de Vries <tom@codesourcery.com>
18543 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18544 for neutered threads in warp.
18545 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18547 2018-01-24 Richard Biener <rguenther@suse.de>
18549 PR tree-optimization/83176
18550 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18553 2018-01-24 Richard Biener <rguenther@suse.de>
18555 PR tree-optimization/82819
18556 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18557 code generating pluses that are no-ops in the target precision.
18559 2018-01-24 Richard Biener <rguenther@suse.de>
18561 PR middle-end/84000
18562 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18564 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18566 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18567 to merge probabilities.
18568 * predict.c (probably_never_executed): Also mark as cold functions
18569 with global 0 profile and guessed local profile.
18570 * profile-count.c (profile_probability::combine_with_count): New
18572 * profile-count.h (profile_probability::operator*,
18573 profile_probability::operator*=, profile_probability::operator/,
18574 profile_probability::operator/=): Reduce precision to adjusted
18575 and set value to guessed on contradictory divisions.
18576 (profile_probability::combine_with_freq): Remove.
18577 (profile_probability::combine_wiht_count): Declare.
18578 (profile_count::force_nonzero):: Set to adjusted.
18579 (profile_count::probability_in):: Set quality to adjusted.
18580 * tree-ssa-tail-merge.c (replace_block_by): Use
18581 combine_with_count.
18583 2018-01-23 Andrew Waterman <andrew@sifive.com>
18584 Jim Wilson <jimw@sifive.com>
18586 * config/riscv/riscv.c (riscv_stack_boundary): New.
18587 (riscv_option_override): Set riscv_stack_boundary. Handle
18588 riscv_preferred_stack_boundary_arg.
18589 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18590 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18591 (STACK_BOUNDARY): Set to riscv_stack_boundary.
18592 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18593 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18594 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18596 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
18599 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18600 of struct ix86_frame.
18601 (ix86_expand_epilogue): Likewise. Add a local variable for
18602 the reg_save_offset field in struct ix86_frame.
18604 2018-01-23 Bin Cheng <bin.cheng@arm.com>
18606 PR tree-optimization/82604
18607 * tree-loop-distribution.c (enum partition_kind): New enum item
18608 PKIND_PARTIAL_MEMSET.
18609 (partition_builtin_p): Support above new enum item.
18610 (generate_code_for_partition): Ditto.
18611 (compute_access_range): Differentiate cases that equality can be
18612 proven at all loops, the innermost loops or no loops.
18613 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18614 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
18615 (finalize_partitions, distribute_loop): Don't fuse partition of
18616 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18617 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18618 parloop is enabled.
18620 2018-01-23 Martin Liska <mliska@suse.cz>
18622 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18623 order to ignore the predictor.
18624 (PRED_POLYMORPHIC_CALL): Likewise.
18625 (PRED_RECURSIVE_CALL): Likewise.
18627 2018-01-23 Martin Liska <mliska@suse.cz>
18629 * tree-profile.c (tree_profiling): Print function header to
18630 aware reader which function we are working on.
18631 * value-prof.c (gimple_find_values_to_profile): Do not print
18632 not interesting value histograms.
18634 2018-01-23 Martin Liska <mliska@suse.cz>
18636 * profile-count.h (enum profile_quality): Add
18637 profile_uninitialized as the first value. Do not number values
18638 as they are zero based.
18639 (profile_count::verify): Update sanity check.
18640 (profile_probability::verify): Likewise.
18642 2018-01-23 Nathan Sidwell <nathan@acm.org>
18644 * doc/invoke.texi (ffor-scope): Deprecate.
18646 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18648 PR tree-optimization/83510
18649 * domwalk.c (set_all_edges_as_executable): New function.
18650 (dom_walker::dom_walker): Convert bool param
18651 "skip_unreachable_blocks" to enum reachability. Move setup of
18652 edge flags to set_all_edges_as_executable and only do it when
18653 reachability is REACHABLE_BLOCKS.
18654 * domwalk.h (enum dom_walker::reachability): New enum.
18655 (dom_walker::dom_walker): Convert bool param
18656 "skip_unreachable_blocks" to enum reachability.
18657 (set_all_edges_as_executable): New decl.
18658 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
18659 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18661 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18662 but converting true to REACHABLE_BLOCKS.
18663 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18665 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18666 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18667 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18669 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18670 if check_all_array_refs will be called.
18672 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18674 * tree.c (selftest::test_location_wrappers): Add more test
18677 2018-01-23 David Malcolm <dmalcolm@redhat.com>
18679 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18680 (selftest::test_bit_in_range): Likewise.
18682 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18685 * doc/sourcebuild.texi (vect_float): Say that the selector
18686 only describes the situation when -funsafe-math-optimizations is on.
18687 (vect_float_strict): Document.
18689 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
18691 PR tree-optimization/83965
18692 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18693 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18694 instead of checking only for a reduction.
18695 (vect_recog_widen_sum_pattern): Likewise.
18697 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18699 * predict.c (probably_never_executed): Only use precise profile info.
18700 (compute_function_frequency): Skip after inlining hack since we now
18701 have quality checking.
18703 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
18705 * profile-count.h (profile_probability::very_unlikely,
18706 profile_probability::unlikely, profile_probability::even): Set
18707 precision to guessed.
18709 2018-01-23 Richard Biener <rguenther@suse.de>
18711 PR tree-optimization/83963
18712 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18713 Properly terminate dominator walk when crossing the exit edge not
18714 when visiting its source block.
18716 2018-01-23 Jakub Jelinek <jakub@redhat.com>
18719 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18720 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18722 2018-01-22 Jakub Jelinek <jakub@redhat.com>
18724 PR tree-optimization/83957
18725 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
18726 semicolon after for body surrounded by braces.
18728 PR tree-optimization/83081
18729 * profile-count.h (profile_probability::split): New method.
18730 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18731 Use profile_probability::split.
18732 (do_compare_rtx_and_jump): Fix adjustment of probabilities
18733 when splitting a single conditional jump into 2.
18735 2018-01-22 David Malcolm <dmalcolm@redhat.com>
18737 PR tree-optimization/69452
18738 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18741 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18743 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18744 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18745 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18747 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18749 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18751 * config/rl78/rl78.md (movdi): New define_expand.
18752 * config/rl78/rl78.c (rl78_split_movdi): New function.
18754 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
18757 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18759 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18760 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18761 128-bit to produce an UNSPEC move to get the double word with the
18762 signbit and then a shift directly to do signbit.
18763 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18764 implementation with a new version that just does either a direct
18765 move or a regular move. Move memory interface to separate insns.
18766 Move insns so they are next to the expander.
18767 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18768 with signbit move. Split big and little endian case.
18769 (signbit<mode>2_dm_mem_le): Likewise.
18770 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18771 (signbit<mode>2_dm2): Likewise.
18773 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18775 * config/rl78/rl78.md (anddi3): New define_expand.
18777 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18779 * config/rl78/rl78.md (umindi3): New define_expand.
18781 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18783 * config/rl78/rl78.md (smindi3): New define_expand.
18785 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18787 * config/rl78/rl78.md (smaxdi3): New define_expand.
18789 2018-01-22 Carl Love <cel@us.ibm.com>
18791 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18792 LVX_V1TI): Add macro expansion.
18793 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18794 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18795 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18796 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18797 Change check to determine if the instruction is a byte reversing
18798 entry. Fix typo in comment.
18799 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18800 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18801 Add def_builtin calls for new builtins.
18802 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18803 Add define_insn expansion.
18805 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18807 * config/rl78/rl78.md (umaxdi3): New define_expand.
18809 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
18811 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18812 for non-QImode registers.
18814 2018-01-22 Richard Biener <rguenther@suse.de>
18816 PR tree-optimization/83963
18817 * graphite-scop-detection.c (scop_detection::get_sese): Delay
18818 including the loop exit block.
18819 (scop_detection::merge_sese): Likewise.
18820 (scop_detection::add_scop): Do it here instead.
18822 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18824 * doc/sourcebuild.texi (arm_softfloat): Document.
18826 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
18829 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18830 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18831 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18833 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18834 David Edelsohn <dje.gcc@gmail.com>
18837 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18838 Change "crset eq" to "crset 2".
18839 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18840 (*call_indirect_aix<mode>_nospec): Likewise.
18841 (*call_value_indirect_aix<mode>_nospec): Likewise.
18842 (*call_indirect_elfv2<mode>_nospec): Likewise.
18843 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18844 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18845 change assembly output from . to $.
18846 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18847 (indirect_jump<mode>_nospec): Change assembly output from . to $.
18848 (*tablejump<mode>_internal1_nospec): Likewise.
18850 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
18853 * config/sh/sh_optimize_sett_clrt.cc:
18854 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18856 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
18858 PR tree-optimization/83940
18859 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18860 offset_dt to vect_constant_def rather than vect_unknown_def_type.
18861 (vect_check_load_store_mask): Add a mask_dt_out parameter and
18862 use it to pass back the definition type.
18863 (vect_check_store_rhs): Likewise rhs_dt_out.
18864 (vect_build_gather_load_calls): Add a mask_dt argument and use
18865 it instead of a call to vect_is_simple_use.
18866 (vectorizable_store): Update calls to vect_check_load_store_mask
18867 and vect_check_store_rhs. Use the dt returned by the latter instead
18868 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
18869 instead of calls to vect_is_simple_use. Pass the scalar rather
18870 than the vector operand to vect_is_simple_use when handling
18871 second and subsequent copies of an rhs value.
18872 (vectorizable_load): Update calls to vect_check_load_store_mask
18873 and vect_build_gather_load_calls. Use the cached mask_dt and
18874 gs_info.offset_dt instead of calls to vect_is_simple_use.
18876 2018-01-20 Jakub Jelinek <jakub@redhat.com>
18878 PR middle-end/83945
18879 * tree-emutls.c: Include gimplify.h.
18880 (lower_emutls_2): New function.
18881 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18882 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18883 it before further processing.
18886 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18887 UINTVAL (trueop1) instead of INTVAL (op1).
18889 2018-01-19 Jakub Jelinek <jakub@redhat.com>
18893 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18894 INCOMING_FRAME_SP_OFFSET if not defined.
18895 (scan_trace): Add ENTRY argument. If true and
18896 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18897 emit a note to adjust the CFA offset.
18898 (create_cfi_notes): Adjust scan_trace callers.
18899 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18900 INCOMING_FRAME_SP_OFFSET in the CIE.
18901 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18902 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18904 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18905 * doc/tm.texi: Regenerated.
18907 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18909 PR rtl-optimization/83147
18910 * lra-constraints.c (remove_inheritance_pseudos): Use
18911 lra_substitute_pseudo_within_insn.
18913 2018-01-19 Tom de Vries <tom@codesourcery.com>
18914 Cesar Philippidis <cesar@codesourcery.com>
18917 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18919 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
18922 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18923 spaces for function labels.
18925 2018-01-19 Martin Liska <mliska@suse.cz>
18927 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18928 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18929 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18930 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18931 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18932 (PRED_CONST_RETURN): Change from 69 to 65.
18933 (PRED_NULL_RETURN): Change from 91 to 71.
18934 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18935 (PRED_LOOP_GUARD): Change from 66 to 73.
18937 2018-01-19 Martin Liska <mliska@suse.cz>
18939 * predict.c (predict_insn_def): Add new assert.
18940 (struct branch_predictor): Change type to signed integer.
18941 (test_prediction_value_range): Amend test to cover
18942 PROB_UNINITIALIZED.
18943 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18944 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18945 (PRED_LOOP_ITERATIONS_MAX): Likewise.
18946 (PRED_LOOP_IV_COMPARE): Likewise.
18947 * predict.h (PROB_UNINITIALIZED): Define new constant.
18949 2018-01-19 Martin Liska <mliska@suse.cz>
18951 * predict.c (dump_prediction): Add new format for
18952 analyze_brprob.py script which is enabled with -details
18954 * profile-count.h (precise_p): New function.
18956 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18958 PR tree-optimization/83922
18959 * tree-vect-loop.c (vect_verify_full_masking): Return false if
18960 there are no statements that need masking.
18961 (vect_active_double_reduction_p): New function.
18962 (vect_analyze_loop_operations): Use it when handling phis that
18963 are not in the loop header.
18965 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
18967 PR tree-optimization/83914
18968 * tree-vect-loop.c (vectorizable_induction): Don't convert
18969 init_expr or apply the peeling adjustment for inductions
18970 that are nested within the vectorized loop.
18972 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18974 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18977 2018-01-18 Jakub Jelinek <jakub@redhat.com>
18981 * function.h (gimplify_parameters): Add gimple_seq * argument.
18982 * function.c: Include gimple.h and options.h.
18983 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18984 for the added local temporaries if needed.
18985 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18986 if there are any parameter cleanups, wrap whole body into a
18987 try/finally with the cleanups.
18989 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
18992 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18993 Use GET_MODE_CLASS for scalar floating point.
18995 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
18999 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
19000 Fix call of call_cgraph_insertion_hooks.
19002 2018-01-18 Martin Sebor <msebor@redhat.com>
19004 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
19006 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
19009 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
19012 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
19015 * common.opt: (-ffile-prefix-map): New option.
19016 * opts.c (common_handle_option): Defer it.
19017 * opts-global.c (handle_common_deferred_options): Handle it.
19018 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
19019 * file-prefix-map.h: New file.
19020 (remap_debug_filename, add_debug_prefix_map): ...here.
19021 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
19022 * final.c (debug_prefix_map, add_debug_prefix_map
19023 remap_debug_filename): Move to...
19024 * file-prefix-map.c: New file.
19025 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
19026 generalize, get rid of alloca(), use strrchr() instead of strchr().
19027 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
19028 Implement in terms of add_prefix_map().
19029 (remap_macro_filename, remap_debug_filename): Implement in term of
19031 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
19032 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
19033 * dbxout.c: Include file-prefix-map.h.
19034 * varasm.c: Likewise.
19035 * vmsdbgout.c: Likewise.
19036 * xcoffout.c: Likewise.
19037 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
19038 * doc/cppopts.texi (-fmacro-prefix-map): Document.
19039 * doc/invoke.texi (-ffile-prefix-map): Document.
19040 (-fdebug-prefix-map): Update description.
19042 2018-01-18 Martin Liska <mliska@suse.cz>
19044 * config/i386/i386.c (indirect_thunk_name): Document that also
19046 (output_indirect_thunk): Document why both instructions
19047 (pause and lfence) are generated.
19049 2018-01-18 Richard Biener <rguenther@suse.de>
19051 PR tree-optimization/83887
19052 * graphite-scop-detection.c
19053 (scop_detection::get_nearest_dom_with_single_entry): Remove.
19054 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
19055 (scop_detection::merge_sese): Re-implement with a flood-fill
19056 algorithm that properly finds a SESE region if it exists.
19058 2018-01-18 Jakub Jelinek <jakub@redhat.com>
19061 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
19062 pointer_diff optimizations use view_convert instead of convert.
19064 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19066 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
19067 Generate different code for -mno-speculate-indirect-jumps.
19068 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
19069 (*call_indirect_aix<mode>): Disable for
19070 -mno-speculate-indirect-jumps.
19071 (*call_indirect_aix<mode>_nospec): New define_insn.
19072 (*call_value_indirect_aix<mode>): Disable for
19073 -mno-speculate-indirect-jumps.
19074 (*call_value_indirect_aix<mode>_nospec): New define_insn.
19075 (*sibcall_nonlocal_sysv<mode>): Generate different code for
19076 -mno-speculate-indirect-jumps.
19077 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
19079 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19081 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19082 long double type, set the flags for noting the default long double
19083 type, even if we don't pass or return a long double type.
19085 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
19088 * ipa-inline.c (flatten_function): Do not overwrite final inlining
19091 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
19093 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19094 support for merge[hl].
19095 (fold_mergehl_helper): New helper function.
19096 (tree-vector-builder.h): New #include for tree_vector_builder usage.
19097 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19098 (altivec_vmrglw_direct): Add xxmrglw insn.
19100 2018-01-17 Andrew Waterman <andrew@sifive.com>
19102 * config/riscv/riscv.c (riscv_conditional_register_usage): If
19103 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19105 2018-01-17 David Malcolm <dmalcolm@redhat.com>
19108 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19109 call the lto_location_cache before reading the
19110 DECL_SOURCE_LOCATION of the types.
19112 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
19113 Richard Sandiford <richard.sandiford@linaro.org>
19115 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19116 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19117 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19118 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19119 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19121 * config/aarch64/constraints.md (aarch64_movti_operand):
19123 * config/aarch64/predicates.md (Uti): Add new constraint.
19125 2018-01-17 Carl Love <cel@us.ibm.com>
19127 * config/rs6000/vsx.md (define_expand xl_len_r,
19128 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19129 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19131 (define_expand, define_insn): Move the shift left from the
19132 define_insn to the define_expand for lxvl and stxvl instructions.
19133 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19134 and XL_LEN_R definitions to PURE.
19136 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
19138 * config/i386/i386.c (indirect_thunk_name): Declare regno
19139 as unsigned int. Compare regno with INVALID_REGNUM.
19140 (output_indirect_thunk): Ditto.
19141 (output_indirect_thunk_function): Ditto.
19142 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
19143 in the call to output_indirect_thunk_function.
19145 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
19147 PR middle-end/83884
19148 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19149 rather than the size of inner_type to determine the stack slot size
19150 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19152 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
19155 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19158 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
19160 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19161 endian Linux systems to optionally enable multilibs for selecting
19162 the long double type if the user configured an explicit type.
19163 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19164 have no long double multilibs if not defined.
19165 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19166 warn if the user used -mabi={ieee,ibm}longdouble and we built
19167 multilibs for long double.
19168 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19169 appropriate multilib option.
19170 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19172 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19173 for building long double multilibs.
19174 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19176 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
19178 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19181 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19183 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19186 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19189 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19192 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19194 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19195 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19197 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
19199 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19200 different rtl trees depending on TARGET_64BIT.
19201 (rs6000_gen_lvx): Likewise.
19203 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
19205 * config/visium/visium.md (nop): Tweak comment.
19206 (hazard_nop): Likewise.
19208 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19210 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19211 -mspeculate-indirect-jumps.
19212 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19213 for -mno-speculate-indirect-jumps.
19214 (*call_indirect_elfv2<mode>_nospec): New define_insn.
19215 (*call_value_indirect_elfv2<mode>): Disable for
19216 -mno-speculate-indirect-jumps.
19217 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19218 (indirect_jump): Emit different RTL for
19219 -mno-speculate-indirect-jumps.
19220 (*indirect_jump<mode>): Disable for
19221 -mno-speculate-indirect-jumps.
19222 (*indirect_jump<mode>_nospec): New define_insn.
19223 (tablejump): Emit different RTL for
19224 -mno-speculate-indirect-jumps.
19225 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19226 (tablejumpsi_nospec): New define_expand.
19227 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19228 (tablejumpdi_nospec): New define_expand.
19229 (*tablejump<mode>_internal1): Disable for
19230 -mno-speculate-indirect-jumps.
19231 (*tablejump<mode>_internal1_nospec): New define_insn.
19232 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19235 2018-01-16 Artyom Skrobov tyomitch@gmail.com
19237 * caller-save.c (insert_save): Drop unnecessary parameter. All
19240 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19241 Richard Biener <rguenth@suse.de>
19244 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19245 return early, inline manually is_gimple_sizepos. Make sure if we
19246 call gimplify_expr we don't end up with a gimple constant.
19247 * tree.c (variably_modified_type_p): Don't return true for
19248 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
19249 * gimplify.h (is_gimple_sizepos): Remove.
19251 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19253 PR tree-optimization/83857
19254 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19255 vectorizable_live_operation for pure SLP statements.
19256 (vectorizable_live_operation): Handle PHIs.
19258 2018-01-16 Richard Biener <rguenther@suse.de>
19260 PR tree-optimization/83867
19261 * tree-vect-stmts.c (vect_transform_stmt): Precompute
19262 nested_in_vect_loop_p since the scalar stmt may get invalidated.
19264 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19267 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19268 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19269 If off is not INTEGER_CST, issue a may not be aligned warning
19270 rather than isn't aligned. Use isn%'t rather than isn't.
19271 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19273 <case MULT_EXPR>: Improve the case when bottom and one of the
19274 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19275 operand, in that case check if the other operand is multiple of
19276 bottom divided by the INTEGER_CST operand.
19278 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19281 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19282 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19283 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19284 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19285 * config/pa/pa.c (pa_function_arg_advance): Likewise.
19286 (pa_function_arg, pa_arg_partial_bytes): Likewise.
19287 (pa_function_arg_size): New function.
19289 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19291 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19292 in a separate statement.
19294 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
19296 PR tree-optimization/83847
19297 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19298 group gathers and scatters.
19300 2018-01-16 Jakub Jelinek <jakub@redhat.com>
19302 PR rtl-optimization/86620
19303 * params.def (max-sched-ready-insns): Bump minimum value to 1.
19305 PR rtl-optimization/83213
19306 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19307 to last if both are JUMP_INSNs.
19309 PR tree-optimization/83843
19310 * gimple-ssa-store-merging.c
19311 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19312 store_immediate_info for bswap/nop orig_stores.
19314 2018-01-15 Andrew Waterman <andrew@sifive.com>
19316 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19318 <UDIV>: Increase cost if !TARGET_DIV.
19320 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
19322 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19323 (define_attr "cr_logical_3op"): New.
19324 (cceq_ior_compare): Adjust.
19325 (cceq_ior_compare_complement): Adjust.
19326 (*cceq_rev_compare): Adjust.
19327 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19328 (is_cracked_insn): Adjust.
19329 (insn_must_be_first_in_group): Adjust.
19330 * config/rs6000/40x.md: Adjust.
19331 * config/rs6000/440.md: Adjust.
19332 * config/rs6000/476.md: Adjust.
19333 * config/rs6000/601.md: Adjust.
19334 * config/rs6000/603.md: Adjust.
19335 * config/rs6000/6xx.md: Adjust.
19336 * config/rs6000/7450.md: Adjust.
19337 * config/rs6000/7xx.md: Adjust.
19338 * config/rs6000/8540.md: Adjust.
19339 * config/rs6000/cell.md: Adjust.
19340 * config/rs6000/e300c2c3.md: Adjust.
19341 * config/rs6000/e500mc.md: Adjust.
19342 * config/rs6000/e500mc64.md: Adjust.
19343 * config/rs6000/e5500.md: Adjust.
19344 * config/rs6000/e6500.md: Adjust.
19345 * config/rs6000/mpc.md: Adjust.
19346 * config/rs6000/power4.md: Adjust.
19347 * config/rs6000/power5.md: Adjust.
19348 * config/rs6000/power6.md: Adjust.
19349 * config/rs6000/power7.md: Adjust.
19350 * config/rs6000/power8.md: Adjust.
19351 * config/rs6000/power9.md: Adjust.
19352 * config/rs6000/rs64.md: Adjust.
19353 * config/rs6000/titan.md: Adjust.
19355 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19357 * config/i386/predicates.md (indirect_branch_operand): Rewrite
19358 ix86_indirect_branch_register logic.
19360 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19362 * config/i386/constraints.md (Bs): Update
19363 ix86_indirect_branch_register check. Don't check
19364 ix86_indirect_branch_register with GOT_memory_operand.
19366 * config/i386/predicates.md (GOT_memory_operand): Don't check
19367 ix86_indirect_branch_register here.
19368 (GOT32_symbol_operand): Likewise.
19370 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19372 * config/i386/predicates.md (constant_call_address_operand):
19373 Rewrite ix86_indirect_branch_register logic.
19374 (sibcall_insn_operand): Likewise.
19376 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19378 * config/i386/constraints.md (Bs): Replace
19379 ix86_indirect_branch_thunk_register with
19380 ix86_indirect_branch_register.
19382 * config/i386/i386.md (indirect_jump): Likewise.
19383 (tablejump): Likewise.
19384 (*sibcall_memory): Likewise.
19385 (*sibcall_value_memory): Likewise.
19386 Peepholes of indirect call and jump via memory: Likewise.
19387 * config/i386/i386.opt: Likewise.
19388 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19389 (GOT_memory_operand): Likewise.
19390 (call_insn_operand): Likewise.
19391 (sibcall_insn_operand): Likewise.
19392 (GOT32_symbol_operand): Likewise.
19394 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19396 PR middle-end/83837
19397 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19398 type rather than type addr's type points to.
19399 (expand_omp_atomic_mutex): Likewise.
19400 (expand_omp_atomic): Likewise.
19402 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
19405 * config/i386/i386.c (output_indirect_thunk_function): Use
19406 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19407 for __x86_return_thunk.
19409 2018-01-15 Richard Biener <rguenther@suse.de>
19411 PR middle-end/83850
19412 * expmed.c (extract_bit_field_1): Fix typo.
19414 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19417 * config/arm/iterators.md (VF): New mode iterator.
19418 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19419 Remove integer-related logic from pattern.
19420 (neon_vabd<mode>_3): Likewise.
19422 2018-01-15 Jakub Jelinek <jakub@redhat.com>
19424 PR middle-end/82694
19425 * common.opt (fstrict-overflow): No longer an alias.
19426 (fwrapv-pointer): New option.
19427 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19428 also for pointer types based on flag_wrapv_pointer.
19429 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19430 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19431 opts->x_flag_wrapv got set.
19432 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19433 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19434 POINTER_TYPE_OVERFLOW_UNDEFINED.
19435 * match.pd: Likewise in address comparison pattern.
19436 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19438 2018-01-15 Richard Biener <rguenther@suse.de>
19441 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19442 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
19443 Reset type names to their identifier if their TYPE_DECL doesn't
19444 have linkage (and thus is used for ODR and devirt).
19445 (save_debug_info_for_decl): Remove.
19446 (save_debug_info_for_type): Likewise.
19447 (add_tree_to_fld_list): Adjust.
19448 * tree-pretty-print.c (dump_generic_node): Make dumping of
19449 type names more robust.
19451 2018-01-15 Richard Biener <rguenther@suse.de>
19453 * BASE-VER: Bump to 8.0.1.
19455 2018-01-14 Martin Sebor <msebor@redhat.com>
19458 * builtins.c (check_access): Avoid warning when the no-warning bit
19461 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
19463 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19464 * ira-color (allocno_hard_regs_compare): Likewise.
19466 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
19469 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19470 Use .pushsection/.popsection.
19472 2018-01-14 Martin Sebor <msebor@redhat.com>
19475 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19477 2018-01-14 Jakub Jelinek <jakub@redhat.com>
19479 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19480 entry from extra_headers.
19481 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19482 extra_headers, make the list bitwise identical to the i?86-*-* one.
19484 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19486 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19487 -mcmodel=large with -mindirect-branch=thunk,
19488 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19489 -mfunction-return=thunk-extern.
19490 * doc/invoke.texi: Document -mcmodel=large is incompatible with
19491 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19492 -mfunction-return=thunk and -mfunction-return=thunk-extern.
19494 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19496 * config/i386/i386.c (print_reg): Print the name of the full
19497 integer register without '%'.
19498 (ix86_print_operand): Handle 'V'.
19499 * doc/extend.texi: Document 'V' modifier.
19501 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19503 * config/i386/constraints.md (Bs): Disallow memory operand for
19504 -mindirect-branch-register.
19506 * config/i386/predicates.md (indirect_branch_operand): Likewise.
19507 (GOT_memory_operand): Likewise.
19508 (call_insn_operand): Likewise.
19509 (sibcall_insn_operand): Likewise.
19510 (GOT32_symbol_operand): Likewise.
19511 * config/i386/i386.md (indirect_jump): Call convert_memory_address
19512 for -mindirect-branch-register.
19513 (tablejump): Likewise.
19514 (*sibcall_memory): Likewise.
19515 (*sibcall_value_memory): Likewise.
19516 Disallow peepholes of indirect call and jump via memory for
19517 -mindirect-branch-register.
19518 (*call_pop): Replace m with Bw.
19519 (*call_value_pop): Likewise.
19520 (*sibcall_pop_memory): Replace m with Bs.
19521 * config/i386/i386.opt (mindirect-branch-register): New option.
19522 * doc/invoke.texi: Document -mindirect-branch-register option.
19524 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19526 * config/i386/i386-protos.h (ix86_output_function_return): New.
19527 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19528 set function_return_type.
19529 (indirect_thunk_name): Add ret_p to indicate thunk for function
19531 (output_indirect_thunk_function): Pass false to
19532 indirect_thunk_name.
19533 (ix86_output_indirect_branch_via_reg): Likewise.
19534 (ix86_output_indirect_branch_via_push): Likewise.
19535 (output_indirect_thunk_function): Create alias for function
19536 return thunk if regno < 0.
19537 (ix86_output_function_return): New function.
19538 (ix86_handle_fndecl_attribute): Handle function_return.
19539 (ix86_attribute_table): Add function_return.
19540 * config/i386/i386.h (machine_function): Add
19541 function_return_type.
19542 * config/i386/i386.md (simple_return_internal): Use
19543 ix86_output_function_return.
19544 (simple_return_internal_long): Likewise.
19545 * config/i386/i386.opt (mfunction-return=): New option.
19546 (indirect_branch): Mention -mfunction-return=.
19547 * doc/extend.texi: Document function_return function attribute.
19548 * doc/invoke.texi: Document -mfunction-return= option.
19550 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
19552 * config/i386/i386-opts.h (indirect_branch): New.
19553 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19554 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19555 with local indirect jump when converting indirect call and jump.
19556 (ix86_set_indirect_branch_type): New.
19557 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19558 (indirectlabelno): New.
19559 (indirect_thunk_needed): Likewise.
19560 (indirect_thunk_bnd_needed): Likewise.
19561 (indirect_thunks_used): Likewise.
19562 (indirect_thunks_bnd_used): Likewise.
19563 (INDIRECT_LABEL): Likewise.
19564 (indirect_thunk_name): Likewise.
19565 (output_indirect_thunk): Likewise.
19566 (output_indirect_thunk_function): Likewise.
19567 (ix86_output_indirect_branch_via_reg): Likewise.
19568 (ix86_output_indirect_branch_via_push): Likewise.
19569 (ix86_output_indirect_branch): Likewise.
19570 (ix86_output_indirect_jmp): Likewise.
19571 (ix86_code_end): Call output_indirect_thunk_function if needed.
19572 (ix86_output_call_insn): Call ix86_output_indirect_branch if
19574 (ix86_handle_fndecl_attribute): Handle indirect_branch.
19575 (ix86_attribute_table): Add indirect_branch.
19576 * config/i386/i386.h (machine_function): Add indirect_branch_type
19577 and has_local_indirect_jump.
19578 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19580 (tablejump): Likewise.
19581 (*indirect_jump): Use ix86_output_indirect_jmp.
19582 (*tablejump_1): Likewise.
19583 (simple_return_indirect_internal): Likewise.
19584 * config/i386/i386.opt (mindirect-branch=): New option.
19585 (indirect_branch): New.
19588 (thunk-inline): Likewise.
19589 (thunk-extern): Likewise.
19590 * doc/extend.texi: Document indirect_branch function attribute.
19591 * doc/invoke.texi: Document -mindirect-branch= option.
19593 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
19596 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19598 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
19600 * ipa-inline.c (want_inline_small_function_p): Return false if
19601 inlining has already failed with CIF_FINAL_ERROR.
19602 (update_caller_keys): Call want_inline_small_function_p before
19604 (update_callee_keys): Likewise.
19606 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19608 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19610 (rs6000_quadword_masked_address_p): Likewise.
19611 (quad_aligned_load_p): Likewise.
19612 (quad_aligned_store_p): Likewise.
19613 (const_load_sequence_p): Add comment to describe the outer-most loop.
19614 (mimic_memory_attributes_and_flags): New function.
19615 (rs6000_gen_stvx): Likewise.
19616 (replace_swapped_aligned_store): Likewise.
19617 (rs6000_gen_lvx): Likewise.
19618 (replace_swapped_aligned_load): Likewise.
19619 (replace_swapped_load_constant): Capitalize argument name in
19620 comment describing this function.
19621 (rs6000_analyze_swaps): Add a third pass to search for vector loads
19622 and stores that access quad-word aligned addresses and replace
19623 with stvx or lvx instructions when appropriate.
19624 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19625 New function prototype.
19626 (rs6000_quadword_masked_address_p): Likewise.
19627 (rs6000_gen_lvx): Likewise.
19628 (rs6000_gen_stvx): Likewise.
19629 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19630 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19631 when memory address is aligned.
19632 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19633 this split to select lvx instruction when memory address is aligned.
19634 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19635 instruction when memory address is aligned.
19636 (*vsx_le_perm_load_v16qi): Likewise.
19637 (four unnamed splitters): Modify to select the stvx instruction
19638 when memory is aligned.
19640 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
19642 * predict.c (determine_unlikely_bbs): Handle correctly BBs
19643 which appears in the queue multiple times.
19645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19646 Alan Hayward <alan.hayward@arm.com>
19647 David Sherwood <david.sherwood@arm.com>
19649 * tree-vectorizer.h (vec_lower_bound): New structure.
19650 (_loop_vec_info): Add check_nonzero and lower_bounds.
19651 (LOOP_VINFO_CHECK_NONZERO): New macro.
19652 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19653 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19654 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19655 fields. Make seg_len the distance travelled, not including the
19657 (dr_direction_indicator): Declare.
19658 (dr_zero_step_indicator): Likewise.
19659 (dr_known_forward_stride_p): Likewise.
19660 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19662 (runtime_alias_check_p): Allow runtime alias checks with
19664 (operator ==): Compare access_size and align.
19665 (prune_runtime_alias_test_list): Rework for new distinction between
19666 the access_size and seg_len.
19667 (create_intersect_range_checks_index): Likewise. Cope with polynomial
19669 (get_segment_min_max): New function.
19670 (create_intersect_range_checks): Use it.
19671 (dr_step_indicator): New function.
19672 (dr_direction_indicator): Likewise.
19673 (dr_zero_step_indicator): Likewise.
19674 (dr_known_forward_stride_p): Likewise.
19675 * tree-loop-distribution.c (data_ref_segment_size): Return
19676 DR_STEP * (niters - 1).
19677 (compute_alias_check_pairs): Update call to the dr_with_seg_len
19679 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19680 (vect_preserves_scalar_order_p): New function, split out from...
19681 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
19682 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19683 (vect_vfa_access_size): New function.
19684 (vect_vfa_align): Likewise.
19685 (vect_compile_time_alias): Take access_size_a and access_b arguments.
19686 (dump_lower_bound): New function.
19687 (vect_check_lower_bound): Likewise.
19688 (vect_small_gap_p): Likewise.
19689 (vectorizable_with_step_bound_p): Likewise.
19690 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19691 depencies if the vectorization factor is 1. Convert the checks
19692 for nonzero steps into checks on the bounds of DR_STEP. Try using
19693 a bunds check for variable steps if the minimum required step is
19694 relatively small. Update calls to the dr_with_seg_len
19695 constructor and to vect_compile_time_alias.
19696 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19698 (vect_loop_versioning): Call it.
19699 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19701 (vect_estimate_min_profitable_iters): Account for any bounds checks.
19703 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19704 Alan Hayward <alan.hayward@arm.com>
19705 David Sherwood <david.sherwood@arm.com>
19707 * doc/sourcebuild.texi (vect_scatter_store): Document.
19708 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19710 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19712 * genopinit.c (main): Add supports_vec_scatter_store and
19713 supports_vec_scatter_store_cached to target_optabs.
19714 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19715 IFN_MASK_SCATTER_STORE.
19716 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19718 * internal-fn.h (internal_store_fn_p): Declare.
19719 (internal_fn_stored_value_index): Likewise.
19720 * internal-fn.c (scatter_store_direct): New macro.
19721 (expand_scatter_store_optab_fn): New function.
19722 (direct_scatter_store_optab_supported_p): New macro.
19723 (internal_store_fn_p): New function.
19724 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19725 IFN_MASK_SCATTER_STORE.
19726 (internal_fn_mask_index): Likewise.
19727 (internal_fn_stored_value_index): New function.
19728 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19729 for scatter stores.
19730 * optabs-query.h (supports_vec_scatter_store_p): Declare.
19731 * optabs-query.c (supports_vec_scatter_store_p): New function.
19732 * tree-vectorizer.h (vect_get_store_rhs): Declare.
19733 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19734 true for scatter stores.
19735 (vect_gather_scatter_fn_p): Handle scatter stores too.
19736 (vect_check_gather_scatter): Consider using scatter stores if
19737 supports_vec_scatter_store_p.
19738 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19739 scatter stores too.
19740 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19741 internal_fn_stored_value_index.
19742 (check_load_store_masking): Handle scatter stores too.
19743 (vect_get_store_rhs): Make public.
19744 (vectorizable_call): Use internal_store_fn_p.
19745 (vectorizable_store): Handle scatter store internal functions.
19746 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19747 when deciding whether the end of the group has been reached.
19748 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19749 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19750 (mask_scatter_store<mode>): New insns.
19752 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19753 Alan Hayward <alan.hayward@arm.com>
19754 David Sherwood <david.sherwood@arm.com>
19756 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19757 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19758 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19760 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19761 Use vect_truncate_gather_scatter_offset if we can't treat the
19762 operation as a normal gather load or scatter store.
19763 (get_group_load_store_type): Take the gather_scatter_info
19764 as argument. Try using a gather load or scatter store for
19765 single-element groups.
19766 (get_load_store_type): Update calls to get_group_load_store_type
19767 and vect_use_strided_gather_scatters_p.
19769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19770 Alan Hayward <alan.hayward@arm.com>
19771 David Sherwood <david.sherwood@arm.com>
19773 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19774 optional tree argument.
19775 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19777 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19778 but continue to use the current value as a fallback.
19779 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19780 to compare the updates.
19781 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19782 (get_load_store_type): Use it when handling a strided access.
19783 (vect_get_strided_load_store_ops): New function.
19784 (vect_get_data_ptr_increment): Likewise.
19785 (vectorizable_load): Handle strided gather loads. Always pass
19786 a step to vect_create_data_ref_ptr and bump_vector_ptr.
19788 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19789 Alan Hayward <alan.hayward@arm.com>
19790 David Sherwood <david.sherwood@arm.com>
19792 * doc/md.texi (gather_load@var{m}): Document.
19793 (mask_gather_load@var{m}): Likewise.
19794 * genopinit.c (main): Add supports_vec_gather_load and
19795 supports_vec_gather_load_cached to target_optabs.
19796 * optabs-tree.c (init_tree_optimization_optabs): Use
19797 ggc_cleared_alloc to allocate target_optabs.
19798 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19799 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19801 * internal-fn.h (internal_load_fn_p): Declare.
19802 (internal_gather_scatter_fn_p): Likewise.
19803 (internal_fn_mask_index): Likewise.
19804 (internal_gather_scatter_fn_supported_p): Likewise.
19805 * internal-fn.c (gather_load_direct): New macro.
19806 (expand_gather_load_optab_fn): New function.
19807 (direct_gather_load_optab_supported_p): New macro.
19808 (direct_internal_fn_optab): New function.
19809 (internal_load_fn_p): Likewise.
19810 (internal_gather_scatter_fn_p): Likewise.
19811 (internal_fn_mask_index): Likewise.
19812 (internal_gather_scatter_fn_supported_p): Likewise.
19813 * optabs-query.c (supports_at_least_one_mode_p): New function.
19814 (supports_vec_gather_load_p): Likewise.
19815 * optabs-query.h (supports_vec_gather_load_p): Declare.
19816 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19817 and memory_type field.
19818 (NUM_PATTERNS): Bump to 15.
19819 * tree-vect-data-refs.c: Include internal-fn.h.
19820 (vect_gather_scatter_fn_p): New function.
19821 (vect_describe_gather_scatter_call): Likewise.
19822 (vect_check_gather_scatter): Try using internal functions for
19823 gather loads. Recognize existing calls to a gather load function.
19824 (vect_analyze_data_refs): Consider using gather loads if
19825 supports_vec_gather_load_p.
19826 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19827 (vect_get_gather_scatter_offset_type): Likewise.
19828 (vect_convert_mask_for_vectype): Likewise.
19829 (vect_add_conversion_to_patterm): Likewise.
19830 (vect_try_gather_scatter_pattern): Likewise.
19831 (vect_recog_gather_scatter_pattern): New pattern recognizer.
19832 (vect_vect_recog_func_ptrs): Add it.
19833 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19834 internal_fn_mask_index and internal_gather_scatter_fn_p.
19835 (check_load_store_masking): Take the gather_scatter_info as an
19836 argument and handle gather loads.
19837 (vect_get_gather_scatter_ops): New function.
19838 (vectorizable_call): Check internal_load_fn_p.
19839 (vectorizable_load): Likewise. Handle gather load internal
19841 (vectorizable_store): Update call to check_load_store_masking.
19842 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19843 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19844 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19845 (aarch64_gather_scale_operand_d): New predicates.
19846 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19847 (mask_gather_load<mode>): New insns.
19849 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19850 Alan Hayward <alan.hayward@arm.com>
19851 David Sherwood <david.sherwood@arm.com>
19853 * optabs.def (fold_left_plus_optab): New optab.
19854 * doc/md.texi (fold_left_plus_@var{m}): Document.
19855 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19856 * internal-fn.c (fold_left_direct): Define.
19857 (expand_fold_left_optab_fn): Likewise.
19858 (direct_fold_left_optab_supported_p): Likewise.
19859 * fold-const-call.c (fold_const_fold_left): New function.
19860 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19861 * tree-parloops.c (valid_reduction_p): New function.
19862 (gather_scalar_reductions): Use it.
19863 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19864 (vect_finish_replace_stmt): Declare.
19865 * tree-vect-loop.c (fold_left_reduction_fn): New function.
19866 (needs_fold_left_reduction_p): New function, split out from...
19867 (vect_is_simple_reduction): ...here. Accept reductions that
19868 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19869 (vect_force_simple_reduction): Also store the reduction type in
19870 the assignment's STMT_VINFO_REDUC_TYPE.
19871 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19872 (merge_with_identity): New function.
19873 (vect_expand_fold_left): Likewise.
19874 (vectorize_fold_left_reduction): Likewise.
19875 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
19876 scalar phi in place for it. Check for target support and reject
19877 cases that would reassociate the operation. Defer the transform
19878 phase to vectorize_fold_left_reduction.
19879 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19880 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19881 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19883 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19885 * tree-if-conv.c (predicate_mem_writes): Remove redundant
19886 call to ifc_temp_var.
19888 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19889 Alan Hayward <alan.hayward@arm.com>
19890 David Sherwood <david.sherwood@arm.com>
19892 * target.def (legitimize_address_displacement): Take the original
19893 offset as a poly_int.
19894 * targhooks.h (default_legitimize_address_displacement): Update
19896 * targhooks.c (default_legitimize_address_displacement): Likewise.
19897 * doc/tm.texi: Regenerate.
19898 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19899 as an argument, moving assert of ad->disp == ad->disp_term to...
19900 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
19901 Try calling targetm.legitimize_address_displacement before expanding
19902 the address rather than afterwards, and adjust for the new interface.
19903 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19904 Match the new hook interface. Handle SVE addresses.
19905 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19906 new hook interface.
19908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19910 * Makefile.in (OBJS): Add early-remat.o.
19911 * target.def (select_early_remat_modes): New hook.
19912 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19913 * doc/tm.texi: Regenerate.
19914 * targhooks.h (default_select_early_remat_modes): Declare.
19915 * targhooks.c (default_select_early_remat_modes): New function.
19916 * timevar.def (TV_EARLY_REMAT): New timevar.
19917 * passes.def (pass_early_remat): New pass.
19918 * tree-pass.h (make_pass_early_remat): Declare.
19919 * early-remat.c: New file.
19920 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19922 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19924 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19925 Alan Hayward <alan.hayward@arm.com>
19926 David Sherwood <david.sherwood@arm.com>
19928 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19929 vfm1 with a bound_epilog parameter.
19930 (vect_do_peeling): Update calls accordingly, and move the prologue
19931 call earlier in the function. Treat the base bound_epilog as 0 for
19932 fully-masked loops and retain vf - 1 for other loops. Add 1 to
19933 this base when peeling for gaps.
19934 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19935 with fully-masked loops.
19936 (vect_estimate_min_profitable_iters): Handle the single peeled
19937 iteration in that case.
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-data-refs.c (vect_analyze_group_access_1): Allow
19944 single-element interleaving even if the size is not a power of 2.
19945 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19946 accesses for single-element interleaving if the group size is
19949 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19950 Alan Hayward <alan.hayward@arm.com>
19951 David Sherwood <david.sherwood@arm.com>
19953 * doc/md.texi (fold_extract_last_@var{m}): Document.
19954 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19955 * optabs.def (fold_extract_last_optab): New optab.
19956 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19957 * internal-fn.c (fold_extract_direct): New macro.
19958 (expand_fold_extract_optab_fn): Likewise.
19959 (direct_fold_extract_optab_supported_p): Likewise.
19960 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19961 * tree-vect-loop.c (vect_model_reduction_cost): Handle
19962 EXTRACT_LAST_REDUCTION.
19963 (get_initial_def_for_reduction): Do not create an initial vector
19964 for EXTRACT_LAST_REDUCTION reductions.
19965 (vectorizable_reduction): Leave the scalar phi in place for
19966 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
19967 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
19968 epilogue code for EXTRACT_LAST_REDUCTION and defer the
19969 transform phase to vectorizable_condition.
19970 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19972 (vect_finish_stmt_generation): ...here.
19973 (vect_finish_replace_stmt): New function.
19974 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19975 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19977 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19979 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19980 Alan Hayward <alan.hayward@arm.com>
19981 David Sherwood <david.sherwood@arm.com>
19983 * doc/md.texi (extract_last_@var{m}): Document.
19984 * optabs.def (extract_last_optab): New optab.
19985 * internal-fn.def (EXTRACT_LAST): New internal function.
19986 * internal-fn.c (cond_unary_direct): New macro.
19987 (expand_cond_unary_optab_fn): Likewise.
19988 (direct_cond_unary_optab_supported_p): Likewise.
19989 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19990 loops using EXTRACT_LAST.
19991 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19992 (extract_last_<mode>): ...this optab.
19993 (vec_extract<mode><Vel>): Update accordingly.
19995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
19996 Alan Hayward <alan.hayward@arm.com>
19997 David Sherwood <david.sherwood@arm.com>
19999 * target.def (empty_mask_is_expensive): New hook.
20000 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
20001 * doc/tm.texi: Regenerate.
20002 * targhooks.h (default_empty_mask_is_expensive): Declare.
20003 * targhooks.c (default_empty_mask_is_expensive): New function.
20004 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
20005 if the target says that empty masks are expensive.
20006 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
20008 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
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 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
20015 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
20016 (vect_use_loop_mask_for_alignment_p): New function.
20017 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
20018 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
20019 niters_skip argument. Make sure that the first niters_skip elements
20020 of the first iteration are inactive.
20021 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
20022 Update call to vect_set_loop_masks_directly.
20023 (get_misalign_in_elems): New function, split out from...
20024 (vect_gen_prolog_loop_niters): ...here.
20025 (vect_update_init_of_dr): Take a code argument that specifies whether
20026 the adjustment should be added or subtracted.
20027 (vect_update_init_of_drs): Likewise.
20028 (vect_prepare_for_masked_peels): New function.
20029 (vect_do_peeling): Skip prologue peeling if we're using a mask
20030 instead. Update call to vect_update_inits_of_drs.
20031 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20033 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
20034 alignment. Do not include the number of peeled iterations in
20035 the minimum threshold in that case.
20036 (vectorizable_induction): Adjust the start value down by
20037 LOOP_VINFO_MASK_SKIP_NITERS iterations.
20038 (vect_transform_loop): Call vect_prepare_for_masked_peels.
20039 Take the number of skipped iterations into account when calculating
20041 * tree-vect-stmts.c (vect_gen_while_not): New function.
20043 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20044 Alan Hayward <alan.hayward@arm.com>
20045 David Sherwood <david.sherwood@arm.com>
20047 * doc/sourcebuild.texi (vect_fully_masked): Document.
20048 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
20049 default value to 0.
20050 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
20052 (vect_analyze_loop_2): ...here. Don't check the vectorization
20053 factor against the number of loop iterations if the loop is
20056 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20057 Alan Hayward <alan.hayward@arm.com>
20058 David Sherwood <david.sherwood@arm.com>
20060 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
20061 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
20062 (dump_groups): Update accordingly.
20063 (iv_use::mem_type): New member variable.
20064 (address_p): New function.
20065 (record_use): Add a mem_type argument and initialize the new
20067 (record_group_use): Add a mem_type argument. Use address_p.
20068 Remove obsolete null checks of base_object. Update call to record_use.
20069 (find_interesting_uses_op): Update call to record_group_use.
20070 (find_interesting_uses_cond): Likewise.
20071 (find_interesting_uses_address): Likewise.
20072 (get_mem_type_for_internal_fn): New function.
20073 (find_address_like_use): Likewise.
20074 (find_interesting_uses_stmt): Try find_address_like_use before
20075 calling find_interesting_uses_op.
20076 (addr_offset_valid_p): Use the iv mem_type field as the type
20077 of the addressed memory.
20078 (add_autoinc_candidates): Likewise.
20079 (get_address_cost): Likewise.
20080 (split_small_address_groups_p): Use address_p.
20081 (split_address_groups): Likewise.
20082 (add_iv_candidate_for_use): Likewise.
20083 (autoinc_possible_for_pair): Likewise.
20084 (rewrite_groups): Likewise.
20085 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20086 (determine_group_iv_cost): Update after split of USE_ADDRESS.
20087 (get_alias_ptr_type_for_ptr_address): New function.
20088 (rewrite_use_address): Rewrite address uses in calls that were
20089 identified by find_address_like_use.
20091 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20092 Alan Hayward <alan.hayward@arm.com>
20093 David Sherwood <david.sherwood@arm.com>
20095 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20097 * gimple-expr.h (is_gimple_addressable: Likewise.
20098 * gimple-expr.c (is_gimple_address): Likewise.
20099 * internal-fn.c (expand_call_mem_ref): New function.
20100 (expand_mask_load_optab_fn): Use it.
20101 (expand_mask_store_optab_fn): Likewise.
20103 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20104 Alan Hayward <alan.hayward@arm.com>
20105 David Sherwood <david.sherwood@arm.com>
20107 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20108 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20109 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20110 (cond_umax@var{mode}): Document.
20111 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20112 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20113 (cond_umin_optab, cond_umax_optab): New optabs.
20114 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20115 (COND_IOR, COND_XOR): New internal functions.
20116 * internal-fn.h (get_conditional_internal_fn): Declare.
20117 * internal-fn.c (cond_binary_direct): New macro.
20118 (expand_cond_binary_optab_fn): Likewise.
20119 (direct_cond_binary_optab_supported_p): Likewise.
20120 (get_conditional_internal_fn): New function.
20121 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20122 Cope with reduction statements that are vectorized as calls rather
20124 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20125 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20126 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20127 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20128 (UNSPEC_COND_EOR): New unspecs.
20129 (optab): Add mappings for them.
20130 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20131 (sve_int_op, sve_fp_op): New int attributes.
20133 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20134 Alan Hayward <alan.hayward@arm.com>
20135 David Sherwood <david.sherwood@arm.com>
20137 * optabs.def (while_ult_optab): New optab.
20138 * doc/md.texi (while_ult@var{m}@var{n}): Document.
20139 * internal-fn.def (WHILE_ULT): New internal function.
20140 * internal-fn.h (direct_internal_fn_supported_p): New override
20141 that takes two types as argument.
20142 * internal-fn.c (while_direct): New macro.
20143 (expand_while_optab_fn): New function.
20144 (convert_optab_supported_p): Likewise.
20145 (direct_while_optab_supported_p): New macro.
20146 * wide-int.h (wi::udiv_ceil): New function.
20147 * tree-vectorizer.h (rgroup_masks): New structure.
20148 (vec_loop_masks): New typedef.
20149 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20150 and fully_masked_p.
20151 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20152 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20153 (vect_max_vf): New function.
20154 (slpeel_make_loop_iterate_ntimes): Delete.
20155 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20156 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20157 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20158 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20159 internal-fn.h, stor-layout.h and optabs-query.h.
20160 (vect_set_loop_mask): New function.
20161 (add_preheader_seq): Likewise.
20162 (add_header_seq): Likewise.
20163 (interleave_supported_p): Likewise.
20164 (vect_maybe_permute_loop_masks): Likewise.
20165 (vect_set_loop_masks_directly): Likewise.
20166 (vect_set_loop_condition_masked): Likewise.
20167 (vect_set_loop_condition_unmasked): New function, split out from
20168 slpeel_make_loop_iterate_ntimes.
20169 (slpeel_make_loop_iterate_ntimes): Rename to..
20170 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
20171 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20172 (vect_do_peeling): Update call accordingly.
20173 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20175 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20176 mask_compare_type, can_fully_mask_p and fully_masked_p.
20177 (release_vec_loop_masks): New function.
20178 (_loop_vec_info): Use it to free the loop masks.
20179 (can_produce_all_loop_masks_p): New function.
20180 (vect_get_max_nscalars_per_iter): Likewise.
20181 (vect_verify_full_masking): Likewise.
20182 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20183 retries, and free the mask rgroups before retrying. Check loop-wide
20184 reasons for disallowing fully-masked loops. Make the final decision
20185 about whether use a fully-masked loop or not.
20186 (vect_estimate_min_profitable_iters): Do not assume that peeling
20187 for the number of iterations will be needed for fully-masked loops.
20188 (vectorizable_reduction): Disable fully-masked loops.
20189 (vectorizable_live_operation): Likewise.
20190 (vect_halve_mask_nunits): New function.
20191 (vect_double_mask_nunits): Likewise.
20192 (vect_record_loop_mask): Likewise.
20193 (vect_get_loop_mask): Likewise.
20194 (vect_transform_loop): Handle the case in which the final loop
20195 iteration might handle a partial vector. Call vect_set_loop_condition
20196 instead of slpeel_make_loop_iterate_ntimes.
20197 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20198 (check_load_store_masking): New function.
20199 (prepare_load_store_mask): Likewise.
20200 (vectorizable_store): Handle fully-masked loops.
20201 (vectorizable_load): Likewise.
20202 (supportable_widening_operation): Use vect_halve_mask_nunits for
20204 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20205 (vect_gen_while): New function.
20206 * config/aarch64/aarch64.md (umax<mode>3): New expander.
20207 (aarch64_uqdec<mode>): New insn.
20209 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20210 Alan Hayward <alan.hayward@arm.com>
20211 David Sherwood <david.sherwood@arm.com>
20213 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20214 (reduc_xor_scal_optab): New optabs.
20215 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20216 (reduc_xor_scal_@var{m}): Document.
20217 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20218 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20219 internal functions.
20220 * fold-const-call.c (fold_const_call): Handle them.
20221 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20222 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20223 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20224 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20225 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20226 (UNSPEC_XORV): New unspecs.
20227 (optab): Add entries for them.
20228 (BITWISEV): New int iterator.
20229 (bit_reduc_op): New int attributes.
20231 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20232 Alan Hayward <alan.hayward@arm.com>
20233 David Sherwood <david.sherwood@arm.com>
20235 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20236 * internal-fn.def (VEC_SHL_INSERT): New internal function.
20237 * optabs.def (vec_shl_insert_optab): New optab.
20238 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20239 (duplicate_and_interleave): Likewise.
20240 * tree-vect-loop.c: Include internal-fn.h.
20241 (neutral_op_for_slp_reduction): New function, split out from
20242 get_initial_defs_for_reduction.
20243 (get_initial_def_for_reduction): Handle option 2 for variable-length
20244 vectors by loading the neutral value into a vector and then shifting
20245 the initial value into element 0.
20246 (get_initial_defs_for_reduction): Replace the code argument with
20247 the neutral value calculated by neutral_op_for_slp_reduction.
20248 Use gimple_build_vector for constant-length vectors.
20249 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20250 but the first group_size elements have a neutral value.
20251 Use duplicate_and_interleave otherwise.
20252 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20253 Update call to get_initial_defs_for_reduction. Handle SLP
20254 reductions for variable-length vectors by creating one vector
20255 result for each scalar result, with the elements associated
20256 with other scalar results stubbed out with the neutral value.
20257 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20258 Require IFN_VEC_SHL_INSERT for double reductions on
20259 variable-length vectors, or SLP reductions that have
20260 a neutral value. Require can_duplicate_and_interleave_p
20261 support for variable-length unchained SLP reductions if there
20262 is no neutral value, such as for MIN/MAX reductions. Also require
20263 the number of vector elements to be a multiple of the number of
20264 SLP statements when doing variable-length unchained SLP reductions.
20265 Update call to vect_create_epilog_for_reduction.
20266 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20267 and remove initial values.
20268 (duplicate_and_interleave): Make public.
20269 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20270 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20273 Alan Hayward <alan.hayward@arm.com>
20274 David Sherwood <david.sherwood@arm.com>
20276 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20277 (can_duplicate_and_interleave_p): New function.
20278 (vect_get_and_check_slp_defs): Take the vector of statements
20279 rather than just the current one. Remove excess parentheses.
20280 Restriction rejectinon of vect_constant_def and vect_external_def
20281 for variable-length vectors to boolean types, or types for which
20282 can_duplicate_and_interleave_p is false.
20283 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20284 (duplicate_and_interleave): New function.
20285 (vect_get_constant_vectors): Use gimple_build_vector for
20286 constant-length vectors and suitable variable-length constant
20287 vectors. Use duplicate_and_interleave for other variable-length
20288 vectors. Don't defer the update when inserting new statements.
20290 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20291 Alan Hayward <alan.hayward@arm.com>
20292 David Sherwood <david.sherwood@arm.com>
20294 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20295 min_profitable_iters doesn't go negative.
20297 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20298 Alan Hayward <alan.hayward@arm.com>
20299 David Sherwood <david.sherwood@arm.com>
20301 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20302 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20303 * optabs.def (vec_mask_load_lanes_optab): New optab.
20304 (vec_mask_store_lanes_optab): Likewise.
20305 * internal-fn.def (MASK_LOAD_LANES): New internal function.
20306 (MASK_STORE_LANES): Likewise.
20307 * internal-fn.c (mask_load_lanes_direct): New macro.
20308 (mask_store_lanes_direct): Likewise.
20309 (expand_mask_load_optab_fn): Handle masked operations.
20310 (expand_mask_load_lanes_optab_fn): New macro.
20311 (expand_mask_store_optab_fn): Handle masked operations.
20312 (expand_mask_store_lanes_optab_fn): New macro.
20313 (direct_mask_load_lanes_optab_supported_p): Likewise.
20314 (direct_mask_store_lanes_optab_supported_p): Likewise.
20315 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20317 (vect_load_lanes_supported): Likewise.
20318 * tree-vect-data-refs.c (strip_conversion): New function.
20319 (can_group_stmts_p): Likewise.
20320 (vect_analyze_data_ref_accesses): Use it instead of checking
20321 for a pair of assignments.
20322 (vect_store_lanes_supported): Take a masked_p parameter.
20323 (vect_load_lanes_supported): Likewise.
20324 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20325 vect_store_lanes_supported and vect_load_lanes_supported.
20326 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20327 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20328 parameter. Don't allow gaps for masked accesses.
20329 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
20330 and vect_load_lanes_supported.
20331 (get_load_store_type): Take a masked_p parameter and update
20332 call to get_group_load_store_type.
20333 (vectorizable_store): Update call to get_load_store_type.
20334 Handle IFN_MASK_STORE_LANES.
20335 (vectorizable_load): Update call to get_load_store_type.
20336 Handle IFN_MASK_LOAD_LANES.
20338 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20339 Alan Hayward <alan.hayward@arm.com>
20340 David Sherwood <david.sherwood@arm.com>
20342 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20344 * config/aarch64/aarch64-protos.h
20345 (aarch64_sve_struct_memory_operand_p): Declare.
20346 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20347 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20348 (VPRED, vpred): Handle SVE structure modes.
20349 * config/aarch64/constraints.md (Utx): New constraint.
20350 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20351 (aarch64_sve_struct_nonimmediate_operand): New predicates.
20352 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20353 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20354 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20355 structure modes. Split into pieces after RA.
20356 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20357 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20359 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20360 SVE structure modes.
20361 (aarch64_classify_address): Likewise.
20362 (sizetochar): Move earlier in file.
20363 (aarch64_print_operand): Handle SVE register lists.
20364 (aarch64_array_mode): New function.
20365 (aarch64_sve_struct_memory_operand_p): Likewise.
20366 (TARGET_ARRAY_MODE): Redefine.
20368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20369 Alan Hayward <alan.hayward@arm.com>
20370 David Sherwood <david.sherwood@arm.com>
20372 * target.def (array_mode): New target hook.
20373 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20374 * doc/tm.texi: Regenerate.
20375 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20376 * hooks.c (hook_optmode_mode_uhwi_none): New function.
20377 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20378 targetm.array_mode.
20379 * stor-layout.c (mode_for_array): Likewise. Support polynomial
20382 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20383 Alan Hayward <alan.hayward@arm.com>
20384 David Sherwood <david.sherwood@arm.com>
20386 * fold-const.c (fold_binary_loc): Check the argument types
20387 rather than the result type when testing for a vector operation.
20389 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20391 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20392 * doc/tm.texi: Regenerate.
20394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20395 Alan Hayward <alan.hayward@arm.com>
20396 David Sherwood <david.sherwood@arm.com>
20398 * doc/invoke.texi (-msve-vector-bits=): Document new option.
20399 (sve): Document new AArch64 extension.
20400 * doc/md.texi (w): Extend the description of the AArch64
20401 constraint to include SVE vectors.
20402 (Upl, Upa): Document new AArch64 predicate constraints.
20403 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20405 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20406 (msve-vector-bits=): New option.
20407 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20408 SVE when these are disabled.
20409 (sve): New extension.
20410 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20411 modes. Adjust their number of units based on aarch64_sve_vg.
20412 (MAX_BITSIZE_MODE_ANY_MODE): Define.
20413 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20414 aarch64_addr_query_type.
20415 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20416 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20417 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20418 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20419 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20420 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20421 (aarch64_simd_imm_zero_p): Delete.
20422 (aarch64_check_zero_based_sve_index_immediate): Declare.
20423 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20424 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20425 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20426 (aarch64_sve_float_mul_immediate_p): Likewise.
20427 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20428 rather than an rtx.
20429 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20430 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20431 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20432 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20433 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20434 (aarch64_regmode_natural_size): Likewise.
20435 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20436 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20438 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20439 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20440 for VG and the SVE predicate registers.
20441 (V_ALIASES): Add a "z"-prefixed alias.
20442 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20443 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20444 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20445 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20446 (REG_CLASS_NAMES): Add entries for them.
20447 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
20448 and the predicate registers.
20449 (aarch64_sve_vg): Declare.
20450 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20451 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20452 (REGMODE_NATURAL_SIZE): Define.
20453 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20455 * config/aarch64/aarch64.c: Include cfgrtl.h.
20456 (simd_immediate_info): Add a constructor for series vectors,
20457 and an associated step field.
20458 (aarch64_sve_vg): New variable.
20459 (aarch64_dbx_register_number): Handle VG and the predicate registers.
20460 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20461 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20462 (VEC_ANY_DATA, VEC_STRUCT): New constants.
20463 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20464 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20465 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20466 (aarch64_get_mask_mode): New functions.
20467 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20468 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20469 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
20470 predicate modes and predicate registers. Explicitly restrict
20471 GPRs to modes of 16 bytes or smaller. Only allow FP registers
20472 to store a vector mode if it is recognized by
20473 aarch64_classify_vector_mode.
20474 (aarch64_regmode_natural_size): New function.
20475 (aarch64_hard_regno_caller_save_mode): Return the original mode
20477 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20478 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20479 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20480 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20482 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
20483 does not overlap dest if the function is frame-related. Handle
20485 (aarch64_split_add_offset): New function.
20486 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20487 them aarch64_add_offset.
20488 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20489 and update call to aarch64_sub_sp.
20490 (aarch64_add_cfa_expression): New function.
20491 (aarch64_expand_prologue): Pass extra temporary registers to the
20492 functions above. Handle the case in which we need to emit new
20493 DW_CFA_expressions for registers that were originally saved
20494 relative to the stack pointer, but now have to be expressed
20495 relative to the frame pointer.
20496 (aarch64_output_mi_thunk): Pass extra temporary registers to the
20498 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
20499 IP0 and IP1 values for SVE frames.
20500 (aarch64_expand_vec_series): New function.
20501 (aarch64_expand_sve_widened_duplicate): Likewise.
20502 (aarch64_expand_sve_const_vector): Likewise.
20503 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20504 Handle SVE constants. Use emit_move_insn to move a force_const_mem
20505 into the register, rather than emitting a SET directly.
20506 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20507 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20508 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20509 (offset_9bit_signed_scaled_p): New functions.
20510 (aarch64_replicate_bitmask_imm): New function.
20511 (aarch64_bitmask_imm): Use it.
20512 (aarch64_cannot_force_const_mem): Reject expressions involving
20513 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
20514 (aarch64_classify_index): Handle SVE indices, by requiring
20515 a plain register index with a scale that matches the element size.
20516 (aarch64_classify_address): Handle SVE addresses. Assert that
20517 the mode of the address is VOIDmode or an integer mode.
20518 Update call to aarch64_classify_symbol.
20519 (aarch64_classify_symbolic_expression): Update call to
20520 aarch64_classify_symbol.
20521 (aarch64_const_vec_all_in_range_p): New function.
20522 (aarch64_print_vector_float_operand): Likewise.
20523 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
20524 "vN" for FP registers with SVE modes. Handle (const ...) vectors
20525 and the FP immediates 1.0 and 0.5.
20526 (aarch64_print_address_internal): Handle SVE addresses.
20527 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20528 (aarch64_regno_regclass): Handle predicate registers.
20529 (aarch64_secondary_reload): Handle big-endian reloads of SVE
20531 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20532 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20533 (aarch64_convert_sve_vector_bits): New function.
20534 (aarch64_override_options): Use it to handle -msve-vector-bits=.
20535 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20536 rather than an rtx.
20537 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20538 Handle SVE vector and predicate modes. Accept VL-based constants
20539 that need only one temporary register, and VL offsets that require
20540 no temporary registers.
20541 (aarch64_conditional_register_usage): Mark the predicate registers
20542 as fixed if SVE isn't available.
20543 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20544 Return true for SVE vector and predicate modes.
20545 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20546 rather than an unsigned int. Handle SVE modes.
20547 (aarch64_preferred_simd_mode): Update call accordingly. Handle
20549 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20551 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20552 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20553 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20554 (aarch64_sve_float_mul_immediate_p): New functions.
20555 (aarch64_sve_valid_immediate): New function.
20556 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20557 Explicitly reject structure modes. Check for INDEX constants.
20558 Handle PTRUE and PFALSE constants.
20559 (aarch64_check_zero_based_sve_index_immediate): New function.
20560 (aarch64_simd_imm_zero_p): Delete.
20561 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20562 vector modes. Accept constants in the range of CNT[BHWD].
20563 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20564 ask for an Advanced SIMD mode.
20565 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20566 (aarch64_simd_vector_alignment): Handle SVE predicates.
20567 (aarch64_vectorize_preferred_vector_alignment): New function.
20568 (aarch64_simd_vector_alignment_reachable): Use it instead of
20570 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20571 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20573 (MAX_VECT_LEN): Delete.
20574 (expand_vec_perm_d): Add a vec_flags field.
20575 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20576 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20577 (aarch64_evpc_ext): Don't apply a big-endian lane correction
20579 (aarch64_evpc_rev): Rename to...
20580 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
20581 (aarch64_evpc_rev_global): New function.
20582 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20583 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20585 (aarch64_evpc_sve_tbl): New function.
20586 (aarch64_expand_vec_perm_const_1): Update after rename of
20587 aarch64_evpc_rev. Handle SVE permutes too, trying
20588 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20589 than aarch64_evpc_tbl.
20590 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20591 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20592 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20593 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20594 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20595 (aarch64_expand_sve_vcond): New functions.
20596 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20597 of aarch64_vector_mode_p.
20598 (aarch64_dwarf_poly_indeterminate_value): New function.
20599 (aarch64_compute_pressure_classes): Likewise.
20600 (aarch64_can_change_mode_class): Likewise.
20601 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20602 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20603 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20604 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20605 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20606 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20607 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20608 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20610 (Dn, Dl, Dr): Accept const as well as const_vector.
20611 (Dz): Likewise. Compare against CONST0_RTX.
20612 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20613 of "vector" where appropriate.
20614 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20615 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20616 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20617 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20618 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20619 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20620 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20621 (v_int_equiv): Extend to SVE modes.
20622 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20624 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20625 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20626 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20627 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20628 (SVE_COND_FP_CMP): New int iterators.
20629 (perm_hilo): Handle the new unpack unspecs.
20630 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20632 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20633 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20634 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20635 (aarch64_equality_operator, aarch64_constant_vector_operand)
20636 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20637 (aarch64_sve_nonimmediate_operand): Likewise.
20638 (aarch64_sve_general_operand): Likewise.
20639 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20640 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20641 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20642 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20643 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20644 (aarch64_sve_float_arith_immediate): Likewise.
20645 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20646 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20647 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20648 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20649 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20650 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20651 (aarch64_sve_float_arith_operand): Likewise.
20652 (aarch64_sve_float_arith_with_sub_operand): Likewise.
20653 (aarch64_sve_float_mul_operand): Likewise.
20654 (aarch64_sve_vec_perm_operand): Likewise.
20655 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20656 (aarch64_mov_operand): Accept const_poly_int and const_vector.
20657 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20658 as well as const_vector.
20659 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20660 in file. Use CONST0_RTX and CONSTM1_RTX.
20661 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
20662 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20663 Use aarch64_simd_imm_zero.
20664 * config/aarch64/aarch64-sve.md: New file.
20665 * config/aarch64/aarch64.md: Include it.
20666 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20667 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20668 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20669 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20670 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20671 (sve): New attribute.
20672 (enabled): Disable instructions with the sve attribute unless
20674 (movqi, movhi): Pass CONST_POLY_INT operaneds through
20675 aarch64_expand_mov_immediate.
20676 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20677 CNT[BHSD] immediates.
20678 (movti): Split CONST_POLY_INT moves into two halves.
20679 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20680 Split additions that need a temporary here if the destination
20681 is the stack pointer.
20682 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20683 (*add<mode>3_poly_1): New instruction.
20684 (set_clobber_cc): New expander.
20686 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20688 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20689 parameter and use it instead of GET_MODE_SIZE (innermode). Use
20690 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20691 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20692 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
20693 Change innermode from fixed_mode_size to machine_mode.
20694 (simplify_subreg): Update call accordingly. Handle a constant-sized
20695 subreg of a variable-length CONST_VECTOR.
20697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
20698 Alan Hayward <alan.hayward@arm.com>
20699 David Sherwood <david.sherwood@arm.com>
20701 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20702 (add_offset_to_base): New function, split out from...
20703 (create_mem_ref): ...here. When handling a scale other than 1,
20704 check first whether the address is valid without the offset.
20705 Add it into the base if so, leaving the index and scale as-is.
20707 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20710 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20711 fold_for_warn before checking if arg2 is INTEGER_CST.
20713 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
20715 * config/rs6000/predicates.md (load_multiple_operation): Delete.
20716 (store_multiple_operation): Delete.
20717 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20718 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20719 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20720 guarded by TARGET_STRING.
20721 (rs6000_output_load_multiple): Delete.
20722 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20723 OPTION_MASK_STRING / TARGET_STRING handling.
20724 (print_operand) <'N', 'O'>: Add comment that these are unused now.
20725 (const rs6000_opt_masks) <"string">: Change mask to 0.
20726 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20727 (MASK_STRING): Delete.
20728 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20730 (load_multiple): Delete.
20737 (store_multiple): Delete.
20744 (movmemsi_8reg): Delete.
20745 (corresponding unnamed define_insn): Delete.
20746 (movmemsi_6reg): Delete.
20747 (corresponding unnamed define_insn): Delete.
20748 (movmemsi_4reg): Delete.
20749 (corresponding unnamed define_insn): Delete.
20750 (movmemsi_2reg): Delete.
20751 (corresponding unnamed define_insn): Delete.
20752 (movmemsi_1reg): Delete.
20753 (corresponding unnamed define_insn): Delete.
20754 * config/rs6000/rs6000.opt (mno-string): New.
20755 (mstring): Replace by deprecation warning stub.
20756 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20758 2018-01-12 Jakub Jelinek <jakub@redhat.com>
20760 * regrename.c (regrename_do_replace): If replacing the same
20761 reg multiple times, try to reuse last created gen_raw_REG.
20764 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20765 main to workaround a bug in GDB.
20767 2018-01-12 Tom de Vries <tom@codesourcery.com>
20770 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20772 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
20774 PR rtl-optimization/80481
20775 * ira-color.c (get_cap_member): New function.
20776 (allocnos_conflict_by_live_ranges_p): Use it.
20777 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20778 (setup_slot_coalesced_allocno_live_ranges): Ditto.
20780 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
20783 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20784 (*saddl_se_1): Ditto.
20785 (*ssubsi_1): Ditto.
20786 (*ssubl_se_1): Ditto.
20788 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20790 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20791 rather than wi::to_widest for DR_INITs.
20792 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20793 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20794 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20796 (vect_analyze_group_access_1): Note that here.
20798 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20800 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20801 polynomial type sizes.
20803 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
20805 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20806 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20807 (gimple_add_tmp_var): Likewise.
20809 2018-01-12 Martin Liska <mliska@suse.cz>
20811 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20812 (gimple_alloc_sizes): Likewise.
20813 (dump_gimple_statistics): Use PRIu64 in printf format.
20814 * gimple.h: Change uint64_t to int.
20816 2018-01-12 Martin Liska <mliska@suse.cz>
20818 * tree-core.h: Use uint64_t instead of int.
20819 * tree.c (tree_node_counts): Likewise.
20820 (tree_node_sizes): Likewise.
20821 (dump_tree_statistics): Use PRIu64 in printf format.
20823 2018-01-12 Martin Liska <mliska@suse.cz>
20825 * Makefile.in: As qsort_chk is implemented in vec.c, add
20826 vec.o to linkage of gencfn-macros.
20827 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20828 passing the info to record_node_allocation_statistics.
20829 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20831 * ggc-common.c (struct ggc_usage): Add operator== and use
20832 it in operator< and compare function.
20833 * mem-stats.h (struct mem_usage): Likewise.
20834 * vec.c (struct vec_usage): Remove operator< and compare
20835 function. Can be simply inherited.
20837 2018-01-12 Martin Jambor <mjambor@suse.cz>
20840 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20841 * tree-ssa-math-opts.c: Include domwalk.h.
20842 (convert_mult_to_fma_1): New function.
20843 (fma_transformation_info): New type.
20844 (fma_deferring_state): Likewise.
20845 (cancel_fma_deferring): New function.
20846 (result_of_phi): Likewise.
20847 (last_fma_candidate_feeds_initial_phi): Likewise.
20848 (convert_mult_to_fma): Added deferring logic, split actual
20849 transformation to convert_mult_to_fma_1.
20850 (math_opts_dom_walker): New type.
20851 (math_opts_dom_walker::after_dom_children): New method, body moved
20852 here from pass_optimize_widening_mul::execute, added deferring logic
20854 (pass_optimize_widening_mul::execute): Moved most of code to
20855 math_opts_dom_walker::after_dom_children.
20856 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20857 * config/i386/i386.c (ix86_option_override_internal): Added
20858 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20860 2018-01-12 Richard Biener <rguenther@suse.de>
20863 * dwarf2out.c (gen_variable_die): Do not reset old_die for
20864 inline instance vars.
20866 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
20869 * config/rx/rx.c (rx_is_restricted_memory_address):
20870 Handle SUBREG case.
20872 2018-01-12 Richard Biener <rguenther@suse.de>
20874 PR tree-optimization/80846
20875 * target.def (split_reduction): New target hook.
20876 * targhooks.c (default_split_reduction): New function.
20877 * targhooks.h (default_split_reduction): Declare.
20878 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20879 target requests first reduce vectors by combining low and high
20881 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20882 (get_vectype_for_scalar_type_and_size): Export.
20883 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20884 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20885 * doc/tm.texi: Regenerate.
20886 * config/i386/i386.c (ix86_split_reduction): Implement
20887 TARGET_VECTORIZE_SPLIT_REDUCTION.
20889 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20892 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20893 in PIC mode except for TARGET_VXWORKS_RTP.
20894 * config/sparc/sparc.c: Include cfgrtl.h.
20895 (TARGET_INIT_PIC_REG): Define.
20896 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20897 (sparc_pic_register_p): New predicate.
20898 (sparc_legitimate_address_p): Use it.
20899 (sparc_legitimize_pic_address): Likewise.
20900 (sparc_delegitimize_address): Likewise.
20901 (sparc_mode_dependent_address_p): Likewise.
20902 (gen_load_pcrel_sym): Remove 4th parameter.
20903 (load_got_register): Adjust call to above. Remove obsolete stuff.
20904 (sparc_expand_prologue): Do not call load_got_register here.
20905 (sparc_flat_expand_prologue): Likewise.
20906 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20907 (sparc_use_pseudo_pic_reg): New function.
20908 (sparc_init_pic_reg): Likewise.
20909 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20910 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20912 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
20914 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20915 Add item for branch_cost.
20917 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
20919 PR rtl-optimization/83565
20920 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20921 not extend the result to a larger mode for rotate operations.
20922 (num_sign_bit_copies1): Likewise.
20924 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20927 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20929 Use values-Xc.o for -pedantic.
20930 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20932 2018-01-12 Martin Liska <mliska@suse.cz>
20935 * ipa-devirt.c (final_warning_record::grow_type_warnings):
20937 (possible_polymorphic_call_targets): Use it.
20938 (ipa_devirt): Likewise.
20940 2018-01-12 Martin Liska <mliska@suse.cz>
20942 * profile-count.h (enum profile_quality): Use 0 as invalid
20943 enum value of profile_quality.
20945 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
20947 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20948 -mext-string options.
20950 2018-01-12 Richard Biener <rguenther@suse.de>
20952 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20953 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20954 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20956 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20958 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
20960 * configure.ac (--with-long-double-format): Add support for the
20961 configuration option to change the default long double format on
20963 * config.gcc (powerpc*-linux*-*): Likewise.
20964 * configure: Regenerate.
20965 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20966 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20967 used without modification.
20969 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20971 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20972 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20973 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20974 MISC_BUILTIN_SPEC_BARRIER.
20975 (rs6000_init_builtins): Likewise.
20976 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20978 (speculation_barrier): New define_insn.
20979 * doc/extend.texi: Document __builtin_speculation_barrier.
20981 2018-01-11 Jakub Jelinek <jakub@redhat.com>
20984 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20985 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20986 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20988 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
20989 integral modes instead of "ss" and "sd".
20990 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20991 vectors with 32-bit and 64-bit elements.
20992 (vecdupssescalarmodesuffix): New mode attribute.
20993 (vec_dup<mode>): Use it.
20995 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
20998 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20999 frame if argument is passed on stack.
21001 2018-01-11 Jakub Jelinek <jakub@redhat.com>
21004 * ree.c (combine_reaching_defs): Optimize also
21005 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
21006 reg2=any_extend(exp); reg1=reg2;, formatting fix.
21008 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21010 PR middle-end/83189
21011 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
21013 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
21015 PR middle-end/83718
21016 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
21017 after they are computed.
21019 2018-01-11 Bin Cheng <bin.cheng@arm.com>
21021 PR tree-optimization/83695
21022 * gimple-loop-linterchange.cc
21023 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
21024 reset cached scev information after interchange.
21025 (pass_linterchange::execute): Remove call to scev_reset_htab.
21027 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21029 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
21030 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
21031 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
21032 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
21033 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
21034 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
21035 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
21036 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
21037 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
21038 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
21039 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
21040 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
21041 (V_lane_reg): Likewise.
21042 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
21044 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
21045 (vfmal_lane_low<mode>_intrinsic,
21046 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
21047 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
21048 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
21049 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
21050 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
21051 vfmsl_lane_high<mode>_intrinsic): New define_insns.
21053 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21055 * config/arm/arm-cpus.in (fp16fml): New feature.
21056 (ALL_SIMD): Add fp16fml.
21057 (armv8.2-a): Add fp16fml as an option.
21058 (armv8.3-a): Likewise.
21059 (armv8.4-a): Add fp16fml as part of fp16.
21060 * config/arm/arm.h (TARGET_FP16FML): Define.
21061 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
21063 * config/arm/arm-modes.def (V2HF): Define.
21064 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
21065 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
21066 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
21067 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
21068 vfmsl_low, vfmsl_high): New set of builtins.
21069 * config/arm/iterators.md (PLUSMINUS): New code iterator.
21070 (vfml_op): New code attribute.
21071 (VFMLHALVES): New int iterator.
21072 (VFML, VFMLSEL): New mode attributes.
21073 (V_reg): Define mapping for V2HF.
21074 (V_hi, V_lo): New mode attributes.
21075 (VF_constraint): Likewise.
21076 (vfml_half, vfml_half_selector): New int attributes.
21077 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
21079 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
21080 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21082 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21083 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21084 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21085 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
21087 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21088 Document new effective target and option set.
21090 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21092 * config/arm/arm-cpus.in (armv8_4): New feature.
21093 (ARMv8_4a): New fgroup.
21094 (armv8.4-a): New arch.
21095 * config/arm/arm-tables.opt: Regenerate.
21096 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21097 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21098 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21099 Add matching rules for -march=armv8.4-a and extensions.
21100 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21102 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
21105 * config/rx/rx.md (BW): New mode attribute.
21106 (sync_lock_test_and_setsi): Add mode suffix to insn output.
21108 2018-01-11 Richard Biener <rguenther@suse.de>
21110 PR tree-optimization/83435
21111 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21112 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21113 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21115 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21116 Alan Hayward <alan.hayward@arm.com>
21117 David Sherwood <david.sherwood@arm.com>
21119 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21121 (aarch64_classify_address): Initialize it. Track polynomial offsets.
21122 (aarch64_print_address_internal): Use it to check for a zero offset.
21124 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21125 Alan Hayward <alan.hayward@arm.com>
21126 David Sherwood <david.sherwood@arm.com>
21128 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21129 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21130 Return a poly_int64 rather than a HOST_WIDE_INT.
21131 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21132 rather than a HOST_WIDE_INT.
21133 * config/aarch64/aarch64.h (aarch64_frame): Protect with
21134 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
21135 hard_fp_offset, frame_size, initial_adjust, callee_offset and
21136 final_offset from HOST_WIDE_INT to poly_int64.
21137 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21138 to_constant when getting the number of units in an Advanced SIMD
21140 (aarch64_builtin_vectorized_function): Check for a constant number
21142 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21144 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21145 attribute instead of GET_MODE_NUNITS.
21146 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21147 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21148 GET_MODE_SIZE for fixed-size registers.
21149 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21150 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21151 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21152 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21153 (aarch64_print_operand, aarch64_print_address_internal)
21154 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21155 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21156 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21157 Handle polynomial GET_MODE_SIZE.
21158 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
21159 wider than SImode without modification.
21160 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21161 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21162 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21163 passing and returning SVE modes.
21164 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21165 rather than GEN_INT.
21166 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21167 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21168 (aarch64_allocate_and_probe_stack_space): Likewise.
21169 (aarch64_layout_frame): Cope with polynomial offsets.
21170 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21171 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
21172 polynomial offsets.
21173 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21174 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21175 poly_int64 rather than a HOST_WIDE_INT.
21176 (aarch64_get_separate_components, aarch64_process_components)
21177 (aarch64_expand_prologue, aarch64_expand_epilogue)
21178 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21179 (aarch64_anchor_offset): New function, split out from...
21180 (aarch64_legitimize_address): ...here.
21181 (aarch64_builtin_vectorization_cost): Handle polynomial
21182 TYPE_VECTOR_SUBPARTS.
21183 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21185 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21186 number of elements from the PARALLEL rather than the mode.
21187 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21188 rather than GET_MODE_BITSIZE.
21189 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21190 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21191 (aarch64_expand_vec_perm_const_1): Handle polynomial
21192 d->perm.length () and d->perm elements.
21193 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
21194 Apply to_constant to d->perm elements.
21195 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21196 polynomial CONST_VECTOR_NUNITS.
21197 (aarch64_move_pointer): Take amount as a poly_int64 rather
21199 (aarch64_progress_pointer): Avoid temporary variable.
21200 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21201 the mode attribute instead of GET_MODE.
21203 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21204 Alan Hayward <alan.hayward@arm.com>
21205 David Sherwood <david.sherwood@arm.com>
21207 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21208 x exists before using it.
21209 (aarch64_add_constant_internal): Rename to...
21210 (aarch64_add_offset_1): ...this. Replace regnum with separate
21211 src and dest rtxes. Handle the case in which they're different,
21212 including when the offset is zero. Replace scratchreg with an rtx.
21213 Use 2 additions if there is no spare register into which we can
21214 move a 16-bit constant.
21215 (aarch64_add_constant): Delete.
21216 (aarch64_add_offset): Replace reg with separate src and dest
21217 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
21218 Use aarch64_add_offset_1.
21219 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21220 an rtx rather than an int. Take the delta as a poly_int64
21221 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
21222 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21223 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21224 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21225 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21226 and aarch64_add_sp.
21227 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21228 aarch64_add_constant.
21230 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21232 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21233 Use scalar_float_mode.
21235 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21237 * config/aarch64/aarch64-simd.md
21238 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21239 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21240 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21241 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21242 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21243 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21244 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21245 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21246 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21247 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21249 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21252 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21253 targ_options->x_arm_arch_string is non NULL.
21255 2018-01-11 Tamar Christina <tamar.christina@arm.com>
21257 * config/aarch64/aarch64.h
21258 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
21260 2018-01-11 Sudakshina Das <sudi.das@arm.com>
21263 * expmed.c (emit_store_flag_force): Swap if const op0
21264 and change VOIDmode to mode of op0.
21266 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
21268 PR rtl-optimization/83761
21269 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21270 than bytes to mode_for_size.
21272 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21274 PR middle-end/83189
21275 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21276 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21279 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21281 PR middle-end/83575
21282 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21283 when in layout mode.
21284 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21285 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21288 2018-01-10 Michael Collison <michael.collison@arm.com>
21290 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21291 * config/aarch64/aarch64-option-extension.def: Add
21292 AARCH64_OPT_EXTENSION of 'fp16fml'.
21293 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21294 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21295 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21296 * config/aarch64/constraints.md (Ui7): New constraint.
21297 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21298 (VFMLA_SEL_W): Ditto.
21301 (VFMLA16_LOW): New int iterator.
21302 (VFMLA16_HIGH): Ditto.
21303 (UNSPEC_FMLAL): New unspec.
21304 (UNSPEC_FMLSL): Ditto.
21305 (UNSPEC_FMLAL2): Ditto.
21306 (UNSPEC_FMLSL2): Ditto.
21307 (f16mac): New code attribute.
21308 * config/aarch64/aarch64-simd-builtins.def
21309 (aarch64_fmlal_lowv2sf): Ditto.
21310 (aarch64_fmlsl_lowv2sf): Ditto.
21311 (aarch64_fmlalq_lowv4sf): Ditto.
21312 (aarch64_fmlslq_lowv4sf): Ditto.
21313 (aarch64_fmlal_highv2sf): Ditto.
21314 (aarch64_fmlsl_highv2sf): Ditto.
21315 (aarch64_fmlalq_highv4sf): Ditto.
21316 (aarch64_fmlslq_highv4sf): Ditto.
21317 (aarch64_fmlal_lane_lowv2sf): Ditto.
21318 (aarch64_fmlsl_lane_lowv2sf): Ditto.
21319 (aarch64_fmlal_laneq_lowv2sf): Ditto.
21320 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21321 (aarch64_fmlalq_lane_lowv4sf): Ditto.
21322 (aarch64_fmlsl_lane_lowv4sf): Ditto.
21323 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21324 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21325 (aarch64_fmlal_lane_highv2sf): Ditto.
21326 (aarch64_fmlsl_lane_highv2sf): Ditto.
21327 (aarch64_fmlal_laneq_highv2sf): Ditto.
21328 (aarch64_fmlsl_laneq_highv2sf): Ditto.
21329 (aarch64_fmlalq_lane_highv4sf): Ditto.
21330 (aarch64_fmlsl_lane_highv4sf): Ditto.
21331 (aarch64_fmlalq_laneq_highv4sf): Ditto.
21332 (aarch64_fmlsl_laneq_highv4sf): Ditto.
21333 * config/aarch64/aarch64-simd.md:
21334 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21335 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21336 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21337 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21338 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21339 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21340 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21341 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21342 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21343 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21344 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21345 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21346 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21347 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21348 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21349 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21350 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21351 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21352 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21353 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21354 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21355 (vfmlsl_low_u32): Ditto.
21356 (vfmlalq_low_u32): Ditto.
21357 (vfmlslq_low_u32): Ditto.
21358 (vfmlal_high_u32): Ditto.
21359 (vfmlsl_high_u32): Ditto.
21360 (vfmlalq_high_u32): Ditto.
21361 (vfmlslq_high_u32): Ditto.
21362 (vfmlal_lane_low_u32): Ditto.
21363 (vfmlsl_lane_low_u32): Ditto.
21364 (vfmlal_laneq_low_u32): Ditto.
21365 (vfmlsl_laneq_low_u32): Ditto.
21366 (vfmlalq_lane_low_u32): Ditto.
21367 (vfmlslq_lane_low_u32): Ditto.
21368 (vfmlalq_laneq_low_u32): Ditto.
21369 (vfmlslq_laneq_low_u32): Ditto.
21370 (vfmlal_lane_high_u32): Ditto.
21371 (vfmlsl_lane_high_u32): Ditto.
21372 (vfmlal_laneq_high_u32): Ditto.
21373 (vfmlsl_laneq_high_u32): Ditto.
21374 (vfmlalq_lane_high_u32): Ditto.
21375 (vfmlslq_lane_high_u32): Ditto.
21376 (vfmlalq_laneq_high_u32): Ditto.
21377 (vfmlslq_laneq_high_u32): Ditto.
21378 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21379 (AARCH64_FL_FOR_ARCH8_4): New.
21380 (AARCH64_ISA_F16FML): New ISA flag.
21381 (TARGET_F16FML): New feature flag for fp16fml.
21382 (doc/invoke.texi): Document new fp16fml option.
21384 2018-01-10 Michael Collison <michael.collison@arm.com>
21386 * config/aarch64/aarch64-builtins.c:
21387 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21388 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21389 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21390 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21391 (AARCH64_ISA_SHA3): New ISA flag.
21392 (TARGET_SHA3): New feature flag for sha3.
21393 * config/aarch64/iterators.md (sha512_op): New int attribute.
21394 (CRYPTO_SHA512): New int iterator.
21395 (UNSPEC_SHA512H): New unspec.
21396 (UNSPEC_SHA512H2): Ditto.
21397 (UNSPEC_SHA512SU0): Ditto.
21398 (UNSPEC_SHA512SU1): Ditto.
21399 * config/aarch64/aarch64-simd-builtins.def
21400 (aarch64_crypto_sha512hqv2di): New builtin.
21401 (aarch64_crypto_sha512h2qv2di): Ditto.
21402 (aarch64_crypto_sha512su0qv2di): Ditto.
21403 (aarch64_crypto_sha512su1qv2di): Ditto.
21404 (aarch64_eor3qv8hi): Ditto.
21405 (aarch64_rax1qv2di): Ditto.
21406 (aarch64_xarqv2di): Ditto.
21407 (aarch64_bcaxqv8hi): Ditto.
21408 * config/aarch64/aarch64-simd.md:
21409 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21410 (aarch64_crypto_sha512su0qv2di): Ditto.
21411 (aarch64_crypto_sha512su1qv2di): Ditto.
21412 (aarch64_eor3qv8hi): Ditto.
21413 (aarch64_rax1qv2di): Ditto.
21414 (aarch64_xarqv2di): Ditto.
21415 (aarch64_bcaxqv8hi): Ditto.
21416 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21417 (vsha512h2q_u64): Ditto.
21418 (vsha512su0q_u64): Ditto.
21419 (vsha512su1q_u64): Ditto.
21420 (veor3q_u16): Ditto.
21421 (vrax1q_u64): Ditto.
21422 (vxarq_u64): Ditto.
21423 (vbcaxq_u16): Ditto.
21424 * config/arm/types.md (crypto_sha512): New type attribute.
21425 (crypto_sha3): Ditto.
21426 (doc/invoke.texi): Document new sha3 option.
21428 2018-01-10 Michael Collison <michael.collison@arm.com>
21430 * config/aarch64/aarch64-builtins.c:
21431 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21432 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21433 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21434 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21435 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21436 (AARCH64_ISA_SM4): New ISA flag.
21437 (TARGET_SM4): New feature flag for sm4.
21438 * config/aarch64/aarch64-simd-builtins.def
21439 (aarch64_sm3ss1qv4si): Ditto.
21440 (aarch64_sm3tt1aq4si): Ditto.
21441 (aarch64_sm3tt1bq4si): Ditto.
21442 (aarch64_sm3tt2aq4si): Ditto.
21443 (aarch64_sm3tt2bq4si): Ditto.
21444 (aarch64_sm3partw1qv4si): Ditto.
21445 (aarch64_sm3partw2qv4si): Ditto.
21446 (aarch64_sm4eqv4si): Ditto.
21447 (aarch64_sm4ekeyqv4si): Ditto.
21448 * config/aarch64/aarch64-simd.md:
21449 (aarch64_sm3ss1qv4si): Ditto.
21450 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21451 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21452 (aarch64_sm4eqv4si): Ditto.
21453 (aarch64_sm4ekeyqv4si): Ditto.
21454 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21455 (sm3part_op): Ditto.
21456 (CRYPTO_SM3TT): Ditto.
21457 (CRYPTO_SM3PART): Ditto.
21458 (UNSPEC_SM3SS1): New unspec.
21459 (UNSPEC_SM3TT1A): Ditto.
21460 (UNSPEC_SM3TT1B): Ditto.
21461 (UNSPEC_SM3TT2A): Ditto.
21462 (UNSPEC_SM3TT2B): Ditto.
21463 (UNSPEC_SM3PARTW1): Ditto.
21464 (UNSPEC_SM3PARTW2): Ditto.
21465 (UNSPEC_SM4E): Ditto.
21466 (UNSPEC_SM4EKEY): Ditto.
21467 * config/aarch64/constraints.md (Ui2): New constraint.
21468 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21469 * config/arm/types.md (crypto_sm3): New type attribute.
21470 (crypto_sm4): Ditto.
21471 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21472 (vsm3tt1aq_u32): Ditto.
21473 (vsm3tt1bq_u32): Ditto.
21474 (vsm3tt2aq_u32): Ditto.
21475 (vsm3tt2bq_u32): Ditto.
21476 (vsm3partw1q_u32): Ditto.
21477 (vsm3partw2q_u32): Ditto.
21478 (vsm4eq_u32): Ditto.
21479 (vsm4ekeyq_u32): Ditto.
21480 (doc/invoke.texi): Document new sm4 option.
21482 2018-01-10 Michael Collison <michael.collison@arm.com>
21484 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21485 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21486 (AARCH64_FL_FOR_ARCH8_4): New.
21487 (AARCH64_FL_V8_4): New flag.
21488 (doc/invoke.texi): Document new armv8.4-a option.
21490 2018-01-10 Michael Collison <michael.collison@arm.com>
21492 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21493 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21494 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21495 * config/aarch64/aarch64-option-extension.def: Add
21496 AARCH64_OPT_EXTENSION of 'sha2'.
21497 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21498 (crypto): Disable sha2 and aes if crypto disabled.
21499 (crypto): Enable aes and sha2 if enabled.
21500 (simd): Disable sha2 and aes if simd disabled.
21501 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21503 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21504 (TARGET_SHA2): New feature flag for sha2.
21505 (TARGET_AES): New feature flag for aes.
21506 * config/aarch64/aarch64-simd.md:
21507 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21508 conditional on TARGET_AES.
21509 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21510 (aarch64_crypto_sha1hsi): Make pattern conditional
21512 (aarch64_crypto_sha1hv4si): Ditto.
21513 (aarch64_be_crypto_sha1hv4si): Ditto.
21514 (aarch64_crypto_sha1su1v4si): Ditto.
21515 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21516 (aarch64_crypto_sha1su0v4si): Ditto.
21517 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21518 (aarch64_crypto_sha256su0v4si): Ditto.
21519 (aarch64_crypto_sha256su1v4si): Ditto.
21520 (doc/invoke.texi): Document new aes and sha2 options.
21522 2018-01-10 Martin Sebor <msebor@redhat.com>
21524 PR tree-optimization/83781
21525 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21528 2018-01-11 Martin Sebor <msebor@gmail.com>
21529 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21531 PR tree-optimization/83501
21532 PR tree-optimization/81703
21534 * tree-ssa-strlen.c (get_string_cst): Rename...
21535 (get_string_len): ...to this. Handle global constants.
21536 (handle_char_store): Adjust.
21538 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
21539 Jim Wilson <jimw@sifive.com>
21541 * config/riscv/riscv-protos.h (riscv_output_return): New.
21542 * config/riscv/riscv.c (struct machine_function): New naked_p field.
21543 (riscv_attribute_table, riscv_output_return),
21544 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21545 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21546 (riscv_compute_frame_info): Only compute frame->mask if not a naked
21548 (riscv_expand_prologue): Add early return for naked function.
21549 (riscv_expand_epilogue): Likewise.
21550 (riscv_function_ok_for_sibcall): Return false for naked function.
21551 (riscv_set_current_function): New.
21552 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21553 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21554 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21555 * doc/extend.texi (RISC-V Function Attributes): New.
21557 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21559 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21560 check for 128-bit long double before checking TCmode.
21561 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21562 128-bit long doubles before checking TFmode or TCmode.
21563 (FLOAT128_IBM_P): Likewise.
21565 2018-01-10 Martin Sebor <msebor@redhat.com>
21567 PR tree-optimization/83671
21568 * builtins.c (c_strlen): Unconditionally return zero for the empty
21570 Use -Warray-bounds for warnings.
21571 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21572 for non-constant array indices with COMPONENT_REF, arrays of
21573 arrays, and pointers to arrays.
21574 (gimple_fold_builtin_strlen): Determine and set length range for
21575 non-constant character arrays.
21577 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
21579 PR middle-end/81897
21580 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21583 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
21585 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21587 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21590 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21591 VECTOR_MEM_ALTIVEC_OR_VSX_P.
21592 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21593 indexed_or_indirect_operand predicate.
21594 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21595 (*vsx_le_perm_load_v8hi): Likewise.
21596 (*vsx_le_perm_load_v16qi): Likewise.
21597 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21598 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21599 (*vsx_le_perm_store_v8hi): Likewise.
21600 (*vsx_le_perm_store_v16qi): Likewise.
21601 (eight unnamed splitters): Likewise.
21603 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
21605 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21606 * config/rs6000/emmintrin.h: Likewise.
21607 * config/rs6000/mmintrin.h: Likewise.
21608 * config/rs6000/xmmintrin.h: Likewise.
21610 2018-01-10 David Malcolm <dmalcolm@redhat.com>
21613 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21615 * tree.c (tree_nop_conversion): Return true for location wrapper
21617 (maybe_wrap_with_location): New function.
21618 (selftest::check_strip_nops): New function.
21619 (selftest::test_location_wrappers): New function.
21620 (selftest::tree_c_tests): Call it.
21621 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21622 (maybe_wrap_with_location): New decl.
21623 (EXPR_LOCATION_WRAPPER_P): New macro.
21624 (location_wrapper_p): New inline function.
21625 (tree_strip_any_location_wrapper): New inline function.
21627 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
21630 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21631 stack_realign_offset for the largest alignment of stack slot
21633 (ix86_find_max_used_stack_alignment): New function.
21634 (ix86_finalize_stack_frame_flags): Use it. Set
21635 max_used_stack_alignment if we don't realign stack.
21636 * config/i386/i386.h (machine_function): Add
21637 max_used_stack_alignment.
21639 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
21641 * config/arm/arm.opt (-mbranch-cost): New option.
21642 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21645 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
21648 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21649 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21651 2018-01-10 Richard Biener <rguenther@suse.de>
21654 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21655 early out so it also covers the case where we have a non-NULL
21658 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21660 PR tree-optimization/83753
21661 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21662 for non-strided grouped accesses if the number of elements is 1.
21664 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
21667 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21668 * i386.h (TARGET_USE_GATHER): Define.
21669 * x86-tune.def (X86_TUNE_USE_GATHER): New.
21671 2018-01-10 Martin Liska <mliska@suse.cz>
21674 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21675 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21677 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21678 CLEANUP_NO_PARTITIONING is not set.
21680 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
21682 * doc/rtl.texi: Remove documentation of (const ...) wrappers
21683 for vectors, as a partial revert of r254296.
21684 * rtl.h (const_vec_p): Delete.
21685 (const_vec_duplicate_p): Don't test for vector CONSTs.
21686 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21687 * expmed.c (make_tree): Likewise.
21690 * common.md (E, F): Use CONSTANT_P instead of checking for
21692 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21693 checking for CONST_VECTOR.
21695 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21697 PR middle-end/83575
21698 * predict.c (force_edge_cold): Handle in more sane way edges
21699 with no prediction.
21701 2018-01-09 Carl Love <cel@us.ibm.com>
21703 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21705 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21706 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21707 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21708 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
21709 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21710 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
21711 * config/rs6000/rs6000-protos.h: Add extern defition for
21712 rs6000_generate_float2_double_code.
21713 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21715 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21716 (float2_v2df): Add define_expand.
21718 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
21721 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21722 op_mode in the force_to_mode call.
21724 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21726 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21727 instead of checking each element individually.
21728 (aarch64_evpc_uzp): Likewise.
21729 (aarch64_evpc_zip): Likewise.
21730 (aarch64_evpc_ext): Likewise.
21731 (aarch64_evpc_rev): Likewise.
21732 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21733 instead of checking each element individually. Return true without
21735 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21736 whether all selected elements come from the same input, instead of
21737 checking each element individually. Remove calls to gen_rtx_REG,
21738 start_sequence and end_sequence and instead assert that no rtl is
21741 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21743 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21744 order of HIGH and CONST checks.
21746 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
21748 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21749 if the destination isn't an SSA_NAME.
21751 2018-01-09 Richard Biener <rguenther@suse.de>
21753 PR tree-optimization/83668
21754 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21756 (canonicalize_loop_form): ... here, renamed from ...
21757 (canonicalize_loop_closed_ssa_form): ... this and amended to
21758 swap successor edges for loop exit blocks to make us use
21759 the RPO order we need for initial schedule generation.
21761 2018-01-09 Joseph Myers <joseph@codesourcery.com>
21763 PR tree-optimization/64811
21764 * match.pd: When optimizing comparisons with Inf, avoid
21765 introducing or losing exceptions from comparisons with NaN.
21767 2018-01-09 Martin Liska <mliska@suse.cz>
21770 * asan.c (shadow_mem_size): Add gcc_assert.
21772 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
21774 Don't save registers in main().
21777 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21778 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21779 * config/avr/avr.c (avr_set_current_function): Don't error if
21780 naked, OS_task or OS_main are specified at the same time.
21781 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21783 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21785 * common/config/avr/avr-common.c (avr_option_optimization_table):
21786 Switch on -mmain-is-OS_task for optimizing compilations.
21788 2018-01-09 Richard Biener <rguenther@suse.de>
21790 PR tree-optimization/83572
21791 * graphite.c: Include cfganal.h.
21792 (graphite_transform_loops): Connect infinite loops to exit
21793 and remove fake edges at the end.
21795 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21797 * ipa-inline.c (edge_badness): Revert accidental checkin.
21799 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
21802 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21803 symbols; not inline clones.
21805 2018-01-09 Jakub Jelinek <jakub@redhat.com>
21808 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21809 hard registers. Formatting fixes.
21811 PR preprocessor/83722
21812 * gcc.c (try_generate_repro): Pass
21813 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21814 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21817 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
21818 Kito Cheng <kito.cheng@gmail.com>
21820 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21821 (riscv_leaf_function_p): Delete.
21822 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21824 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21826 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21828 (do_ifelse): New function.
21829 (do_isel): New function.
21830 (do_sub3): New function.
21831 (do_add3): New function.
21832 (do_load_mask_compare): New function.
21833 (do_overlap_load_compare): New function.
21834 (expand_compare_loop): New function.
21835 (expand_block_compare): Call expand_compare_loop() when appropriate.
21836 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21837 option description.
21838 (-mblock-compare-inline-loop-limit): New option.
21840 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21843 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21844 Reverse order of second and third operands in first alternative.
21845 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21846 of first and second elements in UNSPEC_VPERMR vector.
21847 (altivec_expand_vec_perm_le): Likewise.
21849 2018-01-08 Jeff Law <law@redhat.com>
21851 PR rtl-optimizatin/81308
21852 * tree-switch-conversion.c (cfg_altered): New file scoped static.
21853 (process_switch): If group_case_labels makes a change, then set
21855 (pass_convert_switch::execute): If a switch is converted, then
21856 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
21858 PR rtl-optimization/81308
21859 * recog.c (split_all_insns): Conditionally cleanup the CFG after
21862 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
21864 PR target/83663 - Revert r255946
21865 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21866 generation for cases where splatting a value is not useful.
21867 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21868 across a vec_duplicate and a paradoxical subreg forming a vector
21869 mode to a vec_concat.
21871 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21873 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21874 -march=armv8.3-a variants.
21875 * config/arm/t-multilib: Likewise.
21876 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
21878 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21880 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21882 (cceq_ior_compare_complement): Give it a name so I can use it, and
21883 change boolean_or_operator predicate to boolean_operator so it can
21884 be used to generate a crand.
21885 (eqne): New code iterator.
21886 (bd/bd_neg): New code_attrs.
21887 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21888 a single define_insn.
21889 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21890 decrement (bdnzt/bdnzf/bdzt/bdzf).
21891 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21892 with the new names of the branch decrement patterns, and added the
21893 names of the branch decrement conditional patterns.
21895 2018-01-08 Richard Biener <rguenther@suse.de>
21897 PR tree-optimization/83563
21898 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21901 2018-01-08 Richard Biener <rguenther@suse.de>
21903 PR middle-end/83713
21904 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21906 2018-01-08 Richard Biener <rguenther@suse.de>
21908 PR tree-optimization/83685
21909 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21910 references to abnormals.
21912 2018-01-08 Richard Biener <rguenther@suse.de>
21915 * dwarf2out.c (output_indirect_strings): Handle empty
21916 skeleton_debug_str_hash.
21917 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21919 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21921 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21922 (emit_store_direct): Likewise.
21923 (arc_trampoline_adjust_address): Likewise.
21924 (arc_asm_trampoline_template): New function.
21925 (arc_initialize_trampoline): Use asm_trampoline_template.
21926 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21927 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21928 * config/arc/arc.md (flush_icache): Delete pattern.
21930 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
21932 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21933 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21936 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21939 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21940 by not USED_FOR_TARGET.
21941 (make_pass_resolve_sw_modes): Likewise.
21943 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
21945 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21948 2018-01-08 Richard Biener <rguenther@suse.de>
21950 PR middle-end/83580
21951 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21953 2018-01-08 Richard Biener <rguenther@suse.de>
21955 PR middle-end/83517
21956 * match.pd ((t * 2) / 2) -> t): Add missing :c.
21958 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
21960 PR middle-end/81897
21961 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21962 basic blocks with a small number of successors.
21963 (convert_control_dep_chain_into_preds): Improve handling of
21965 (dump_predicates): Split apart into...
21966 (dump_pred_chain): ...here...
21967 (dump_pred_info): ...and here.
21968 (can_one_predicate_be_invalidated_p): Add debugging printfs.
21969 (can_chain_union_be_invalidated_p): Improve check for invalidation
21971 (uninit_uses_cannot_happen): Avoid unnecessary if
21972 convert_control_dep_chain_into_preds yielded nothing.
21974 2018-01-06 Martin Sebor <msebor@redhat.com>
21976 PR tree-optimization/83640
21977 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21978 subtracting negative offset from size.
21979 (builtin_access::overlap): Adjust offset bounds of the access to fall
21980 within the size of the object if possible.
21982 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
21984 PR rtl-optimization/83699
21985 * expmed.c (extract_bit_field_1): Restrict the vector usage of
21986 extract_bit_field_as_subreg to cases in which the extracted
21987 value is also a vector.
21989 * lra-constraints.c (process_alt_operands): Test for the equivalence
21990 substitutions when detecting a possible reload cycle.
21992 2018-01-06 Jakub Jelinek <jakub@redhat.com>
21995 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21996 by default if flag_selective_schedling{,2}. Formatting fixes.
21998 PR rtl-optimization/83682
21999 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
22000 if it has non-VECTOR_MODE element mode.
22001 (vec_duplicate_p): Likewise.
22003 PR middle-end/83694
22004 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
22005 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
22007 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22010 * config/i386/i386-builtin.def
22011 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
22012 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
22013 Require also OPTION_MASK_ISA_AVX512F in addition to
22014 OPTION_MASK_ISA_GFNI.
22015 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
22016 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
22017 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
22018 to OPTION_MASK_ISA_GFNI.
22019 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
22020 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
22021 OPTION_MASK_ISA_AVX512BW.
22022 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
22023 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
22024 addition to OPTION_MASK_ISA_GFNI.
22025 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
22026 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
22027 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
22028 to OPTION_MASK_ISA_GFNI.
22029 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
22030 a requirement for all ISAs rather than any of them with a few
22032 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
22034 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
22035 bitmasks to be enabled with 3 exceptions, instead of requiring any
22036 enabled ISA with lots of exceptions.
22037 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
22038 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
22039 Change avx512bw in isa attribute to avx512f.
22040 * config/i386/sgxintrin.h: Add license boilerplate.
22041 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
22042 to __AVX512F__ and __AVX512VL to __AVX512VL__.
22043 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
22044 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
22046 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
22047 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
22048 temporarily sse2 rather than sse if not enabled already.
22051 * config/i386/sse.md (VI248_VLBW): Rename to ...
22052 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
22053 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
22054 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
22055 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
22056 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
22057 mode iterator instead of VI248_VLBW.
22059 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
22061 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
22062 (record_modified): Skip clobbers; add debug output.
22063 (param_change_prob): Use sreal frequencies.
22065 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22067 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22068 punt for user-aligned variables.
22070 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
22072 * tree-chrec.c (chrec_contains_symbols): Return true for
22075 2018-01-05 Sudakshina Das <sudi.das@arm.com>
22078 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
22079 of (x|y) == x for BICS pattern.
22081 2018-01-05 Jakub Jelinek <jakub@redhat.com>
22083 PR tree-optimization/83605
22084 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22085 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22088 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
22090 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22091 * config/epiphany/rtems.h: New file.
22093 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22094 Uros Bizjak <ubizjak@gmail.com>
22097 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22098 QIreg_operand instead of register_operand predicate.
22099 * config/i386/i386.c (ix86_rop_should_change_byte_p,
22100 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22101 comments instead of -fmitigate[-_]rop.
22103 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22106 * cgraphunit.c (symbol_table::compile): Switch to text_section
22107 before calling assembly_start debug hook.
22108 * run-rtl-passes.c (run_rtl_passes): Likewise.
22111 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22113 * tree-vrp.c (extract_range_from_binary_expr_1): Check
22114 range_int_cst_p rather than !symbolic_range_p before calling
22115 extract_range_from_multiplicative_op_1.
22117 2018-01-04 Jeff Law <law@redhat.com>
22119 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22120 redundant test in assertion.
22122 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22124 * doc/rtl.texi: Document machine_mode wrapper classes.
22126 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22128 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22129 using tree_to_uhwi.
22131 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22133 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22134 the VEC_PERM_EXPR fold to fail.
22136 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22139 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22140 to switched_sections.
22142 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22145 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22146 test for d.testing.
22148 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
22151 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22152 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22154 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22157 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22158 is BLKmode and bitpos not zero or mode change is needed.
22160 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
22163 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22166 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
22169 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22170 instead of MULT rtx. Update all corresponding splitters.
22171 (*saddl_se): Ditto.
22172 (*ssub<modesuffix>): Ditto.
22173 (*ssubl_se): Ditto.
22174 (*cmp_sadd_di): Update split patterns.
22175 (*cmp_sadd_si): Ditto.
22176 (*cmp_sadd_sidi): Ditto.
22177 (*cmp_ssub_di): Ditto.
22178 (*cmp_ssub_si): Ditto.
22179 (*cmp_ssub_sidi): Ditto.
22180 * config/alpha/predicates.md (const23_operand): New predicate.
22181 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22182 Look for ASHIFT, not MULT inner operand.
22183 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22185 2018-01-04 Martin Liska <mliska@suse.cz>
22187 PR gcov-profile/83669
22188 * gcov.c (output_intermediate_file): Add version to intermediate
22190 * doc/gcov.texi: Document new field 'version' in intermediate
22191 file format. Fix location of '-k' option of gcov command.
22193 2018-01-04 Martin Liska <mliska@suse.cz>
22196 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22198 2018-01-04 Jakub Jelinek <jakub@redhat.com>
22200 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22202 2018-01-03 Martin Sebor <msebor@redhat.com>
22204 PR tree-optimization/83655
22205 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22206 checking calls with invalid arguments.
22208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22210 * tree-vect-stmts.c (vect_get_store_rhs): New function.
22211 (vectorizable_mask_load_store): Delete.
22212 (vectorizable_call): Return false for masked loads and stores.
22213 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
22214 instead of gimple_assign_rhs1.
22215 (vectorizable_load): Handle IFN_MASK_LOAD.
22216 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22220 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22222 (vectorizable_mask_load_store): ...here.
22223 (vectorizable_load): ...and here.
22225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22227 * tree-vect-stmts.c (vect_build_all_ones_mask)
22228 (vect_build_zero_merge_argument): New functions, split out from...
22229 (vectorizable_load): ...here.
22231 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22233 * tree-vect-stmts.c (vect_check_store_rhs): New function,
22235 (vectorizable_mask_load_store): ...here.
22236 (vectorizable_store): ...and here.
22238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22240 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22242 (vectorizable_mask_load_store): ...here.
22244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22246 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22247 (vect_model_store_cost): Take a vec_load_store_type instead of a
22249 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22250 (vect_model_store_cost): Take a vec_load_store_type instead of a
22252 (vectorizable_mask_load_store): Update accordingly.
22253 (vectorizable_store): Likewise.
22254 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22258 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22259 IFN_MASK_LOAD calls here rather than...
22260 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22263 Alan Hayward <alan.hayward@arm.com>
22264 David Sherwood <david.sherwood@arm.com>
22266 * expmed.c (extract_bit_field_1): For vector extracts,
22267 fall back to extract_bit_field_as_subreg if vec_extract
22270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22271 Alan Hayward <alan.hayward@arm.com>
22272 David Sherwood <david.sherwood@arm.com>
22274 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22275 they are variable or constant sized.
22276 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22277 slots for constant-sized data.
22279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22280 Alan Hayward <alan.hayward@arm.com>
22281 David Sherwood <david.sherwood@arm.com>
22283 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22284 handling COND_EXPRs with boolean comparisons, try to find a better
22285 basis for the mask type than the boolean itself.
22287 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22289 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22290 is calculated and how it can be overridden.
22291 * genmodes.c (max_bitsize_mode_any_mode): New variable.
22292 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22294 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22298 Alan Hayward <alan.hayward@arm.com>
22299 David Sherwood <david.sherwood@arm.com>
22301 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22302 Remove the mode argument.
22303 (aarch64_simd_valid_immediate): Remove the mode and inverse
22305 * config/aarch64/iterators.md (bitsize): New iterator.
22306 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22307 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22308 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22309 aarch64_simd_valid_immediate.
22310 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22311 (aarch64_reg_or_bic_imm): Likewise.
22312 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22313 with an insn_type enum and msl with a modifier_type enum.
22314 Replace element_width with a scalar_mode. Change the shift
22315 to unsigned int. Add constructors for scalar_float_mode and
22316 scalar_int_mode elements.
22317 (aarch64_vect_float_const_representable_p): Delete.
22318 (aarch64_can_const_movi_rtx_p)
22319 (aarch64_simd_scalar_immediate_valid_for_move)
22320 (aarch64_simd_make_constant): Update call to
22321 aarch64_simd_valid_immediate.
22322 (aarch64_advsimd_valid_immediate_hs): New function.
22323 (aarch64_advsimd_valid_immediate): Likewise.
22324 (aarch64_simd_valid_immediate): Remove mode and inverse
22325 arguments. Rewrite to use the above. Use const_vec_duplicate_p
22326 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22327 and aarch64_float_const_representable_p on the result.
22328 (aarch64_output_simd_mov_immediate): Remove mode argument.
22329 Update call to aarch64_simd_valid_immediate and use of
22330 simd_immediate_info.
22331 (aarch64_output_scalar_simd_mov_immediate): Update call
22334 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22335 Alan Hayward <alan.hayward@arm.com>
22336 David Sherwood <david.sherwood@arm.com>
22338 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22339 (mode_nunits): Likewise CONST_MODE_NUNITS.
22340 * machmode.def (ADJUST_NUNITS): Document.
22341 * genmodes.c (mode_data::need_nunits_adj): New field.
22342 (blank_mode): Update accordingly.
22343 (adj_nunits): New variable.
22344 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22346 (emit_mode_size_inline): Set need_bytesize_adj for all modes
22347 listed in adj_nunits.
22348 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22349 listed in adj_nunits. Don't emit case statements for such modes.
22350 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22351 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
22352 nothing if adj_nunits is nonnull.
22353 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22354 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22355 (emit_mode_fbit): Update use of print_maybe_const_decl.
22356 (emit_move_size): Likewise. Treat the array as non-const
22358 (emit_mode_adjustments): Handle adj_nunits.
22360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22362 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22363 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22364 (VECTOR_MODES): Use it.
22365 (make_vector_modes): Take the prefix as an argument.
22367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22368 Alan Hayward <alan.hayward@arm.com>
22369 David Sherwood <david.sherwood@arm.com>
22371 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22372 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22373 for MODE_VECTOR_BOOL.
22374 * machmode.def (VECTOR_BOOL_MODE): Document.
22375 * genmodes.c (VECTOR_BOOL_MODE): New macro.
22376 (make_vector_bool_mode): New function.
22377 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22379 * lto-streamer-in.c (lto_input_mode_table): Likewise.
22380 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22382 * stor-layout.c (int_mode_for_mode): Likewise.
22383 * tree.c (build_vector_type_for_mode): Likewise.
22384 * varasm.c (output_constant_pool_2): Likewise.
22385 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22386 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
22387 for MODE_VECTOR_BOOL.
22388 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22389 of mode class checks.
22390 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22391 instead of a list of mode class checks.
22392 (expand_vector_scalar_condition): Likewise.
22393 (type_for_widest_vector_mode): Handle BImode as an inner mode.
22395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22396 Alan Hayward <alan.hayward@arm.com>
22397 David Sherwood <david.sherwood@arm.com>
22399 * machmode.h (mode_size): Change from unsigned short to
22401 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22402 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22403 or if measurement_type is not polynomial.
22404 (fixed_size_mode::includes_p): Check for constant-sized modes.
22405 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22406 return a poly_uint16 rather than an unsigned short.
22407 (emit_mode_size): Change the type of mode_size from unsigned short
22408 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
22409 (emit_mode_adjustments): Cope with polynomial vector sizes.
22410 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22412 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22414 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22415 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22416 * caller-save.c (setup_save_areas): Likewise.
22417 (replace_reg_with_saved_mem): Likewise.
22418 * calls.c (emit_library_call_value_1): Likewise.
22419 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22420 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22421 (gen_lowpart_for_combine): Likewise.
22422 * convert.c (convert_to_integer_1): Likewise.
22423 * cse.c (equiv_constant, cse_insn): Likewise.
22424 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22425 (cselib_subst_to_values): Likewise.
22426 * dce.c (word_dce_process_block): Likewise.
22427 * df-problems.c (df_word_lr_mark_ref): Likewise.
22428 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22429 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22430 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22431 (rtl_for_decl_location): Likewise.
22432 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22433 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22434 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22435 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22436 (expand_expr_real_1): Likewise.
22437 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22438 (pad_below): Likewise.
22439 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22440 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22441 * ira.c (get_subreg_tracking_sizes): Likewise.
22442 * ira-build.c (ira_create_allocno_objects): Likewise.
22443 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22444 (ira_sort_regnos_for_alter_reg): Likewise.
22445 * ira-costs.c (record_operand_costs): Likewise.
22446 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22447 (resolve_simple_move): Likewise.
22448 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22449 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22450 (lra_constraints): Likewise.
22451 (CONST_POOL_OK_P): Reject variable-sized modes.
22452 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22453 (add_pseudo_to_slot, lra_spill): Likewise.
22454 * omp-low.c (omp_clause_aligned_alignment): Likewise.
22455 * optabs-query.c (get_best_extraction_insn): Likewise.
22456 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22457 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22458 (expand_mult_highpart, valid_multiword_target_p): Likewise.
22459 * recog.c (offsettable_address_addr_space_p): Likewise.
22460 * regcprop.c (maybe_mode_change): Likewise.
22461 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22462 * regrename.c (build_def_use): Likewise.
22463 * regstat.c (dump_reg_info): Likewise.
22464 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22465 (find_reloads, find_reloads_subreg_address): Likewise.
22466 * reload1.c (eliminate_regs_1): Likewise.
22467 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22468 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22469 (simplify_binary_operation_1, simplify_subreg): Likewise.
22470 * targhooks.c (default_function_arg_padding): Likewise.
22471 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22472 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22473 (verify_gimple_assign_ternary): Likewise.
22474 * tree-inline.c (estimate_move_cost): Likewise.
22475 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22476 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22477 (get_address_cost_ainc): Likewise.
22478 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22479 (vect_supportable_dr_alignment): Likewise.
22480 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22481 (vectorizable_reduction): Likewise.
22482 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22483 (vectorizable_operation, vectorizable_load): Likewise.
22484 * tree.c (build_same_sized_truth_vector_type): Likewise.
22485 * valtrack.c (cleanup_auto_inc_dec): Likewise.
22486 * var-tracking.c (emit_note_insn_var_location): Likewise.
22487 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22488 (ADDR_VEC_ALIGN): Likewise.
22490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22491 Alan Hayward <alan.hayward@arm.com>
22492 David Sherwood <david.sherwood@arm.com>
22494 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22496 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22497 or if measurement_type is polynomial.
22498 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22499 * combine.c (make_extraction): Likewise.
22500 * dse.c (find_shift_sequence): Likewise.
22501 * dwarf2out.c (mem_loc_descriptor): Likewise.
22502 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22503 (extract_bit_field, extract_low_bits): Likewise.
22504 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22505 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22506 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22507 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22508 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22509 * reload.c (find_reloads): Likewise.
22510 * reload1.c (alter_reg): Likewise.
22511 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22512 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22513 * tree-if-conv.c (predicate_mem_writes): Likewise.
22514 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22515 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22516 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22517 * valtrack.c (dead_debug_insert_temp): Likewise.
22518 * varasm.c (mergeable_constant_section): Likewise.
22519 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22522 Alan Hayward <alan.hayward@arm.com>
22523 David Sherwood <david.sherwood@arm.com>
22525 * expr.c (expand_assignment): Cope with polynomial mode sizes
22526 when assigning to a CONCAT.
22528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22529 Alan Hayward <alan.hayward@arm.com>
22530 David Sherwood <david.sherwood@arm.com>
22532 * machmode.h (mode_precision): Change from unsigned short to
22534 (mode_to_precision): Return a poly_uint16 rather than an unsigned
22536 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22537 or if measurement_type is not polynomial.
22538 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
22539 in which the mode is already known to be a scalar_int_mode.
22540 * genmodes.c (emit_mode_precision): Change the type of mode_precision
22541 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
22543 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22544 for GET_MODE_PRECISION.
22545 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22546 for GET_MODE_PRECISION.
22547 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22549 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22550 (expand_field_assignment, make_extraction): Likewise.
22551 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22552 (get_last_value): Likewise.
22553 * convert.c (convert_to_integer_1): Likewise.
22554 * cse.c (cse_insn): Likewise.
22555 * expr.c (expand_expr_real_1): Likewise.
22556 * lra-constraints.c (simplify_operand_subreg): Likewise.
22557 * optabs-query.c (can_atomic_load_p): Likewise.
22558 * optabs.c (expand_atomic_load): Likewise.
22559 (expand_atomic_store): Likewise.
22560 * ree.c (combine_reaching_defs): Likewise.
22561 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22562 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22563 * tree.h (type_has_mode_precision_p): Likewise.
22564 * ubsan.c (instrument_si_overflow): Likewise.
22566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22567 Alan Hayward <alan.hayward@arm.com>
22568 David Sherwood <david.sherwood@arm.com>
22570 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22571 polynomial numbers of units.
22572 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22573 (valid_vector_subparts_p): New function.
22574 (build_vector_type): Remove temporary shim and take the number
22575 of units as a poly_uint64 rather than an int.
22576 (build_opaque_vector_type): Take the number of units as a
22577 poly_uint64 rather than an int.
22578 * tree.c (build_vector_from_ctor): Handle polynomial
22579 TYPE_VECTOR_SUBPARTS.
22580 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22581 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22582 (build_vector_from_val): If the number of units is variable,
22583 use build_vec_duplicate_cst for constant operands and
22584 VEC_DUPLICATE_EXPR otherwise.
22585 (make_vector_type): Remove temporary is_constant ().
22586 (build_vector_type, build_opaque_vector_type): Take the number of
22587 units as a poly_uint64 rather than an int.
22588 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22590 * cfgexpand.c (expand_debug_expr): Likewise.
22591 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22592 (store_constructor, expand_expr_real_1): Likewise.
22593 (const_scalar_mask_from_tree): Likewise.
22594 * fold-const-call.c (fold_const_reduction): Likewise.
22595 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22596 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22597 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22598 (fold_relational_const): Likewise.
22599 (native_interpret_vector): Likewise. Change the size from an
22600 int to an unsigned int.
22601 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22602 TYPE_VECTOR_SUBPARTS.
22603 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22604 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22605 duplicating a non-constant operand into a variable-length vector.
22606 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22607 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22608 * ipa-icf.c (sem_variable::equals): Likewise.
22609 * match.pd: Likewise.
22610 * omp-simd-clone.c (simd_clone_subparts): Likewise.
22611 * print-tree.c (print_node): Likewise.
22612 * stor-layout.c (layout_type): Likewise.
22613 * targhooks.c (default_builtin_vectorization_cost): Likewise.
22614 * tree-cfg.c (verify_gimple_comparison): Likewise.
22615 (verify_gimple_assign_binary): Likewise.
22616 (verify_gimple_assign_ternary): Likewise.
22617 (verify_gimple_assign_single): Likewise.
22618 * tree-pretty-print.c (dump_generic_node): Likewise.
22619 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22620 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22621 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22622 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22623 (vect_shift_permute_load_chain): Likewise.
22624 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22625 (expand_vector_condition, optimize_vector_constructor): Likewise.
22626 (lower_vec_perm, get_compute_type): Likewise.
22627 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22628 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22629 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22630 (vect_recog_mask_conversion_pattern): Likewise.
22631 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22632 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22633 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22634 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22635 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22636 (vectorizable_shift, vectorizable_operation, vectorizable_store)
22637 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22638 (supportable_widening_operation): Likewise.
22639 (supportable_narrowing_operation): Likewise.
22640 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22642 * varasm.c (output_constant): Likewise.
22644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22645 Alan Hayward <alan.hayward@arm.com>
22646 David Sherwood <david.sherwood@arm.com>
22648 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22649 so that both the length == 3 and length != 3 cases set up their
22650 own permute vectors. Add comments explaining why we know the
22651 number of elements is constant.
22652 (vect_permute_load_chain): Likewise.
22654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22655 Alan Hayward <alan.hayward@arm.com>
22656 David Sherwood <david.sherwood@arm.com>
22658 * machmode.h (mode_nunits): Change from unsigned char to
22660 (ONLY_FIXED_SIZE_MODES): New macro.
22661 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22662 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22663 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22665 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22666 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22667 or if measurement_type is not polynomial.
22668 * genmodes.c (ZERO_COEFFS): New macro.
22669 (emit_mode_nunits_inline): Make mode_nunits_inline return a
22671 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22672 Use ZERO_COEFFS when emitting initializers.
22673 * data-streamer.h (bp_pack_poly_value): New function.
22674 (bp_unpack_poly_value): Likewise.
22675 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22676 for GET_MODE_NUNITS.
22677 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22678 for GET_MODE_NUNITS.
22679 * tree.c (make_vector_type): Remove temporary shim and make
22680 the real function take the number of units as a poly_uint64
22681 rather than an int.
22682 (build_vector_type_for_mode): Handle polynomial nunits.
22683 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22684 * emit-rtl.c (const_vec_series_p_1): Likewise.
22685 (gen_rtx_CONST_VECTOR): Likewise.
22686 * fold-const.c (test_vec_duplicate_folding): Likewise.
22687 * genrecog.c (validate_pattern): Likewise.
22688 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22689 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22690 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22691 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22692 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22693 * rtlanal.c (subreg_get_info): Likewise.
22694 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22695 (vect_grouped_load_supported): Likewise.
22696 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22697 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22698 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22699 (simplify_const_unary_operation, simplify_binary_operation_1)
22700 (simplify_const_binary_operation, simplify_ternary_operation)
22701 (test_vector_ops_duplicate, test_vector_ops): Likewise.
22702 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22703 instead of CONST_VECTOR_NUNITS.
22704 * varasm.c (output_constant_pool_2): Likewise.
22705 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22706 explicit-encoded elements in the XVEC for variable-length vectors.
22708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22710 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22713 Alan Hayward <alan.hayward@arm.com>
22714 David Sherwood <david.sherwood@arm.com>
22716 * coretypes.h (fixed_size_mode): Declare.
22717 (fixed_size_mode_pod): New typedef.
22718 * builtins.h (target_builtins::x_apply_args_mode)
22719 (target_builtins::x_apply_result_mode): Change type to
22720 fixed_size_mode_pod.
22721 * builtins.c (apply_args_size, apply_result_size, result_vector)
22722 (expand_builtin_apply_args_1, expand_builtin_apply)
22723 (expand_builtin_return): Update accordingly.
22725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22727 * cse.c (hash_rtx_cb): Hash only the encoded elements.
22728 * cselib.c (cselib_hash_rtx): Likewise.
22729 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22730 CONST_VECTOR encoding.
22732 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22733 Jeff Law <law@redhat.com>
22736 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22737 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22738 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22739 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22742 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22743 explicitly probe *sp in a noreturn function if there were any callee
22744 register saves or frame pointer is needed.
22746 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22749 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22750 BLKmode for ternary, binary or unary expressions.
22753 * var-tracking.c (delete_vta_debug_insn): New inline function.
22754 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22755 insns from get_insns () to NULL instead of each bb separately.
22756 Use delete_vta_debug_insn. No longer static.
22757 (vt_debug_insns_local, variable_tracking_main_1): Adjust
22758 delete_vta_debug_insns callers.
22759 * rtl.h (delete_vta_debug_insns): Declare.
22760 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22761 instead of variable_tracking_main.
22763 2018-01-03 Martin Sebor <msebor@redhat.com>
22765 PR tree-optimization/83603
22766 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22767 arguments past the endof the argument list in functions declared
22768 without a prototype.
22769 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22770 Avoid checking when arguments are null.
22772 2018-01-03 Martin Sebor <msebor@redhat.com>
22775 * doc/extend.texi (attribute const): Fix a typo.
22776 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22777 issuing -Wsuggest-attribute for void functions.
22779 2018-01-03 Martin Sebor <msebor@redhat.com>
22781 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22782 offset_int::from instead of wide_int::to_shwi.
22783 (maybe_diag_overlap): Remove assertion.
22784 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22785 * gimple-ssa-sprintf.c (format_directive): Same.
22786 (parse_directive): Same.
22787 (sprintf_dom_walker::compute_format_length): Same.
22788 (try_substitute_return_value): Same.
22790 2018-01-03 Jeff Law <law@redhat.com>
22792 PR middle-end/83654
22793 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22794 non-constant residual for zero at runtime and avoid probing in
22795 that case. Reorganize code for trailing problem to mirror handling
22798 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22800 PR tree-optimization/83501
22801 * tree-ssa-strlen.c (get_string_cst): New.
22802 (handle_char_store): Call get_string_cst.
22804 2018-01-03 Martin Liska <mliska@suse.cz>
22806 PR tree-optimization/83593
22807 * tree-ssa-strlen.c: Include tree-cfg.h.
22808 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22809 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22810 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22812 (strlen_dom_walker::before_dom_children): Call
22813 gimple_purge_dead_eh_edges. Dump tranformation with details
22815 (strlen_dom_walker::before_dom_children): Update call by adding
22816 new argument cleanup_eh.
22817 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22819 2018-01-03 Martin Liska <mliska@suse.cz>
22822 * cif-code.def (VARIADIC_THUNK): New enum value.
22823 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22826 2018-01-03 Jan Beulich <jbeulich@suse.com>
22828 * sse.md (mov<mode>_internal): Tighten condition for when to use
22829 vmovdqu<ssescalarsize> for TI and OI modes.
22831 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22833 Update copyright years.
22835 2018-01-03 Martin Liska <mliska@suse.cz>
22838 * ipa-visibility.c (function_and_variable_visibility): Skip
22839 functions with noipa attribure.
22841 2018-01-03 Jakub Jelinek <jakub@redhat.com>
22843 * gcc.c (process_command): Update copyright notice dates.
22844 * gcov-dump.c (print_version): Ditto.
22845 * gcov.c (print_version): Ditto.
22846 * gcov-tool.c (print_version): Ditto.
22847 * gengtype.c (create_file): Ditto.
22848 * doc/cpp.texi: Bump @copying's copyright year.
22849 * doc/cppinternals.texi: Ditto.
22850 * doc/gcc.texi: Ditto.
22851 * doc/gccint.texi: Ditto.
22852 * doc/gcov.texi: Ditto.
22853 * doc/install.texi: Ditto.
22854 * doc/invoke.texi: Ditto.
22856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22858 * vector-builder.h (vector_builder::m_full_nelts): Change from
22859 unsigned int to poly_uint64.
22860 (vector_builder::full_nelts): Update prototype accordingly.
22861 (vector_builder::new_vector): Likewise.
22862 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22863 (vector_builder::operator ==): Likewise.
22864 (vector_builder::finalize): Likewise.
22865 * int-vector-builder.h (int_vector_builder::int_vector_builder):
22866 Take the number of elements as a poly_uint64 rather than an
22868 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22869 from unsigned int to poly_uint64.
22870 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22871 (vec_perm_indices::new_vector): Likewise.
22872 (vec_perm_indices::length): Likewise.
22873 (vec_perm_indices::nelts_per_input): Likewise.
22874 (vec_perm_indices::input_nelts): Likewise.
22875 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22876 number of elements per input as a poly_uint64 rather than an
22877 unsigned int. Use the original encoding for variable-length
22878 vectors, rather than clamping each individual element.
22879 For the second and subsequent elements in each pattern,
22880 clamp the step and base before clamping their sum.
22881 (vec_perm_indices::series_p): Handle polynomial element counts.
22882 (vec_perm_indices::all_in_range_p): Likewise.
22883 (vec_perm_indices_to_tree): Likewise.
22884 (vec_perm_indices_to_rtx): Likewise.
22885 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22886 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22887 (tree_vector_builder::new_binary_operation): Handle polynomial
22888 element counts. Return false if we need to know the number
22889 of elements at compile time.
22890 * fold-const.c (fold_vec_perm): Punt if the number of elements
22891 isn't known at compile time.
22893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22895 * vec-perm-indices.h (vec_perm_builder): Change element type
22896 from HOST_WIDE_INT to poly_int64.
22897 (vec_perm_indices::element_type): Update accordingly.
22898 (vec_perm_indices::clamp): Handle polynomial element_types.
22899 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22900 (vec_perm_indices::all_in_range_p): Likewise.
22901 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22903 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22904 polynomial vec_perm_indices element types.
22905 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22906 * fold-const.c (fold_vec_perm): Likewise.
22907 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22908 * tree-vect-generic.c (lower_vec_perm): Likewise.
22909 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22910 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22911 element type to HOST_WIDE_INT.
22913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22914 Alan Hayward <alan.hayward@arm.com>
22915 David Sherwood <david.sherwood@arm.com>
22917 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22918 rather than an int. Use plus_constant.
22919 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22920 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22922 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22923 Alan Hayward <alan.hayward@arm.com>
22924 David Sherwood <david.sherwood@arm.com>
22926 * calls.c (emit_call_1, expand_call): Change struct_value_size from
22927 a HOST_WIDE_INT to a poly_int64.
22929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22930 Alan Hayward <alan.hayward@arm.com>
22931 David Sherwood <david.sherwood@arm.com>
22933 * calls.c (load_register_parameters): Cope with polynomial
22934 mode sizes. Require a constant size for BLKmode parameters
22935 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
22936 forces a parameter to be padded at the lsb end in order to
22937 fill a complete number of words, require the parameter size
22938 to be ordered wrt UNITS_PER_WORD.
22940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22941 Alan Hayward <alan.hayward@arm.com>
22942 David Sherwood <david.sherwood@arm.com>
22944 * reload1.c (spill_stack_slot_width): Change element type
22945 from unsigned int to poly_uint64_pod.
22946 (alter_reg): Treat mode sizes as polynomial.
22948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22949 Alan Hayward <alan.hayward@arm.com>
22950 David Sherwood <david.sherwood@arm.com>
22952 * reload.c (complex_word_subreg_p): New function.
22953 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
22960 operands whose sizes aren't ordered.
22961 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22968 that the mode size is in the set {1, 2, 4, 8, 16}.
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 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22975 Use plus_constant instead of gen_rtx_PLUS.
22977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
22978 Alan Hayward <alan.hayward@arm.com>
22979 David Sherwood <david.sherwood@arm.com>
22981 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22982 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22983 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22984 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22985 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22986 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22987 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22988 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22989 * config/i386/i386.c (ix86_push_rounding): ...this new function.
22990 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22992 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22993 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22994 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22995 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22996 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22997 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22998 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22999 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
23000 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
23001 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
23003 * expr.c (emit_move_resolve_push): Treat the input and result
23004 of PUSH_ROUNDING as a poly_int64.
23005 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
23006 (emit_push_insn): Likewise.
23007 * lra-eliminations.c (mark_not_eliminable): Likewise.
23008 * recog.c (push_operand): Likewise.
23009 * reload1.c (elimination_effects): Likewise.
23010 * rtlanal.c (nonzero_bits1): Likewise.
23011 * calls.c (store_one_arg): Likewise. Require the padding to be
23012 known at compile time.
23014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23015 Alan Hayward <alan.hayward@arm.com>
23016 David Sherwood <david.sherwood@arm.com>
23018 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
23019 Use plus_constant instead of gen_rtx_PLUS.
23021 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23022 Alan Hayward <alan.hayward@arm.com>
23023 David Sherwood <david.sherwood@arm.com>
23025 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
23026 rather than an int.
23028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23029 Alan Hayward <alan.hayward@arm.com>
23030 David Sherwood <david.sherwood@arm.com>
23032 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
23033 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
23034 via stack temporaries. Treat the mode size as polynomial too.
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 * expr.c (expand_expr_real_2): When handling conversions involving
23041 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
23042 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
23043 as a poly_uint64 too.
23045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23046 Alan Hayward <alan.hayward@arm.com>
23047 David Sherwood <david.sherwood@arm.com>
23049 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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 * combine.c (can_change_dest_mode): Handle polynomial
23056 REGMODE_NATURAL_SIZE.
23057 * expmed.c (store_bit_field_1): Likewise.
23058 * expr.c (store_constructor): Likewise.
23059 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
23060 and polynomial REGMODE_NATURAL_SIZE.
23061 (gen_lowpart_common): Likewise.
23062 * reginfo.c (record_subregs_of_mode): Likewise.
23063 * rtlanal.c (read_modify_subreg_p): Likewise.
23065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23066 Alan Hayward <alan.hayward@arm.com>
23067 David Sherwood <david.sherwood@arm.com>
23069 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
23070 numbers of elements.
23072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23073 Alan Hayward <alan.hayward@arm.com>
23074 David Sherwood <david.sherwood@arm.com>
23076 * match.pd: Cope with polynomial numbers of vector elements.
23078 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23079 Alan Hayward <alan.hayward@arm.com>
23080 David Sherwood <david.sherwood@arm.com>
23082 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23083 in a POINTER_PLUS_EXPR.
23085 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23086 Alan Hayward <alan.hayward@arm.com>
23087 David Sherwood <david.sherwood@arm.com>
23089 * omp-simd-clone.c (simd_clone_subparts): New function.
23090 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23091 (ipa_simd_modify_function_body): Likewise.
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 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23098 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23099 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23100 (expand_vector_condition, vector_element): Likewise.
23101 (subparts_gt): New function.
23102 (get_compute_type): Use subparts_gt.
23103 (count_type_subparts): Delete.
23104 (expand_vector_operations_1): Use subparts_gt instead of
23105 count_type_subparts.
23107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23108 Alan Hayward <alan.hayward@arm.com>
23109 David Sherwood <david.sherwood@arm.com>
23111 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23112 (vect_compile_time_alias): ...this new function. Do the calculation
23113 on poly_ints rather than trees.
23114 (vect_prune_runtime_alias_test_list): Update call accordingly.
23116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23117 Alan Hayward <alan.hayward@arm.com>
23118 David Sherwood <david.sherwood@arm.com>
23120 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23122 (vect_schedule_slp_instance): Likewise.
23124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23125 Alan Hayward <alan.hayward@arm.com>
23126 David Sherwood <david.sherwood@arm.com>
23128 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23129 constant and extern definitions for variable-length vectors.
23130 (vect_get_constant_vectors): Note that the number of units
23131 is known to be constant.
23133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23134 Alan Hayward <alan.hayward@arm.com>
23135 David Sherwood <david.sherwood@arm.com>
23137 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23138 of units as polynomial. Choose between WIDE and NARROW based
23141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23142 Alan Hayward <alan.hayward@arm.com>
23143 David Sherwood <david.sherwood@arm.com>
23145 * tree-vect-stmts.c (simd_clone_subparts): New function.
23146 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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_call): Treat the number of
23153 vectors as polynomial. Use build_index_vector for
23154 IFN_GOMP_SIMD_LANE.
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 (get_load_store_type): Treat the number of
23161 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23162 for variable-length vectors.
23163 (vectorizable_mask_load_store): Treat the number of units as
23164 polynomial, asserting that it is constant if the condition has
23165 already been enforced.
23166 (vectorizable_store, vectorizable_load): Likewise.
23168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23169 Alan Hayward <alan.hayward@arm.com>
23170 David Sherwood <david.sherwood@arm.com>
23172 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23173 of units as polynomial. Punt if we can't tell at compile time
23174 which vector contains the final result.
23176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23177 Alan Hayward <alan.hayward@arm.com>
23178 David Sherwood <david.sherwood@arm.com>
23180 * tree-vect-loop.c (vectorizable_induction): Treat the number
23181 of units as polynomial. Punt on SLP inductions. Use an integer
23182 VEC_SERIES_EXPR for variable-length integer reductions. Use a
23183 cast of such a series for variable-length floating-point
23186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23187 Alan Hayward <alan.hayward@arm.com>
23188 David Sherwood <david.sherwood@arm.com>
23190 * tree.h (build_index_vector): Declare.
23191 * tree.c (build_index_vector): New function.
23192 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23193 of units as polynomial, forcibly converting it to a constant if
23194 vectorizable_reduction has already enforced the condition.
23195 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
23196 to create a {1,2,3,...} vector.
23197 (vectorizable_reduction): Treat the number of units as polynomial.
23198 Choose vectype_in based on the largest scalar element size rather
23199 than the smallest number of units. Enforce the restrictions
23202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23203 Alan Hayward <alan.hayward@arm.com>
23204 David Sherwood <david.sherwood@arm.com>
23206 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23207 number of units as polynomial.
23209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23210 Alan Hayward <alan.hayward@arm.com>
23211 David Sherwood <david.sherwood@arm.com>
23213 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23214 * target.def (autovectorize_vector_sizes): Return the vector sizes
23215 by pointer, using vector_sizes rather than a bitmask.
23216 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23217 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23218 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23220 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23221 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23222 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23223 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23224 * omp-general.c (omp_max_vf): Likewise.
23225 * omp-low.c (omp_clause_aligned_alignment): Likewise.
23226 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23227 * tree-vect-loop.c (vect_analyze_loop): Likewise.
23228 * tree-vect-slp.c (vect_slp_bb): Likewise.
23229 * doc/tm.texi: Regenerate.
23230 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23232 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23233 the vector size as a poly_uint64 rather than an unsigned int.
23234 (current_vector_size): Change from an unsigned int to a poly_uint64.
23235 (get_vectype_for_scalar_type): Update accordingly.
23236 * tree.h (build_truth_vector_type): Take the size and number of
23237 units as a poly_uint64 rather than an unsigned int.
23238 (build_vector_type): Add a temporary overload that takes
23239 the number of units as a poly_uint64 rather than an unsigned int.
23240 * tree.c (make_vector_type): Likewise.
23241 (build_truth_vector_type): Take the number of units as a poly_uint64
23242 rather than an unsigned int.
23244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23245 Alan Hayward <alan.hayward@arm.com>
23246 David Sherwood <david.sherwood@arm.com>
23248 * target.def (get_mask_mode): Take the number of units and length
23249 as poly_uint64s rather than unsigned ints.
23250 * targhooks.h (default_get_mask_mode): Update accordingly.
23251 * targhooks.c (default_get_mask_mode): Likewise.
23252 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23253 * doc/tm.texi: Regenerate.
23255 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23256 Alan Hayward <alan.hayward@arm.com>
23257 David Sherwood <david.sherwood@arm.com>
23259 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23260 * omp-general.c (omp_max_vf): Likewise.
23261 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23262 (expand_omp_simd): Handle polynomial safelen.
23263 * omp-low.c (omplow_simd_context): Add a default constructor.
23264 (omplow_simd_context::max_vf): Change from int to poly_uint64.
23265 (lower_rec_simd_input_clauses): Update accordingly.
23266 (lower_rec_input_clauses): Likewise.
23268 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23269 Alan Hayward <alan.hayward@arm.com>
23270 David Sherwood <david.sherwood@arm.com>
23272 * tree-vectorizer.h (vect_nunits_for_cost): New function.
23273 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23274 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23275 (vect_analyze_slp_cost): Likewise.
23276 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23277 (vect_model_load_cost): Likewise.
23279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23280 Alan Hayward <alan.hayward@arm.com>
23281 David Sherwood <david.sherwood@arm.com>
23283 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23284 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23285 from an unsigned int * to a poly_uint64_pod *.
23286 (calculate_unrolling_factor): New function.
23287 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
23289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23290 Alan Hayward <alan.hayward@arm.com>
23291 David Sherwood <david.sherwood@arm.com>
23293 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23294 from an unsigned int to a poly_uint64.
23295 (_loop_vec_info::slp_unrolling_factor): Likewise.
23296 (_loop_vec_info::vectorization_factor): Change from an int
23298 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23299 (vect_get_num_vectors): New function.
23300 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23301 (vect_get_num_copies): Use vect_get_num_vectors.
23302 (vect_analyze_data_ref_dependences): Change max_vf from an int *
23303 to an unsigned int *.
23304 (vect_analyze_data_refs): Change min_vf from an int * to a
23306 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23307 than an unsigned HOST_WIDE_INT.
23308 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23309 (vect_analyze_data_ref_dependence): Change max_vf from an int *
23310 to an unsigned int *.
23311 (vect_analyze_data_ref_dependences): Likewise.
23312 (vect_compute_data_ref_alignment): Handle polynomial vf.
23313 (vect_enhance_data_refs_alignment): Likewise.
23314 (vect_prune_runtime_alias_test_list): Likewise.
23315 (vect_shift_permute_load_chain): Likewise.
23316 (vect_supportable_dr_alignment): Likewise.
23317 (dependence_distance_ge_vf): Take the vectorization factor as a
23318 poly_uint64 rather than an unsigned HOST_WIDE_INT.
23319 (vect_analyze_data_refs): Change min_vf from an int * to a
23321 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23322 vfm1 as a poly_uint64 rather than an int. Make the same change
23323 for the returned bound_scalar.
23324 (vect_gen_vector_loop_niters): Handle polynomial vf.
23325 (vect_do_peeling): Likewise. Update call to
23326 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23327 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23329 * tree-vect-loop.c (vect_determine_vectorization_factor)
23330 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23331 (vect_get_known_peeling_cost): Likewise.
23332 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23333 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23334 (vect_transform_loop): Likewise. Use the lowest possible VF when
23335 updating the upper bounds of the loop.
23336 (vect_min_worthwhile_factor): Make static. Return an unsigned int
23337 rather than an int.
23338 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23339 polynomial unroll factors.
23340 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23341 (vect_make_slp_decision): Likewise.
23342 (vect_supported_load_permutation_p): Likewise, and polynomial
23344 (vect_analyze_slp_cost): Handle polynomial vf.
23345 (vect_slp_analyze_node_operations): Likewise.
23346 (vect_slp_analyze_bb_1): Likewise.
23347 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23348 than an unsigned HOST_WIDE_INT.
23349 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23350 (vectorizable_load): Handle polynomial vf.
23351 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23353 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23356 Alan Hayward <alan.hayward@arm.com>
23357 David Sherwood <david.sherwood@arm.com>
23359 * match.pd: Handle bit operations involving three constants
23360 and try to fold one pair.
23362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
23364 * tree-vect-loop-manip.c: Include gimple-fold.h.
23365 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23366 niters_maybe_zero parameters. Handle other cases besides a step of 1.
23367 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23368 Add a path that uses a step of VF instead of 1, but disable it
23370 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23371 and niters_no_overflow parameters. Update calls to
23372 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23373 Create a new SSA name if the latter choses to use a ste other
23374 than zero, and return it via niters_vector_mult_vf_var.
23375 * tree-vect-loop.c (vect_transform_loop): Update calls to
23376 vect_do_peeling, vect_gen_vector_loop_niters and
23377 slpeel_make_loop_iterate_ntimes.
23378 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23379 (vect_gen_vector_loop_niters): Update declarations after above changes.
23381 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
23383 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23384 128-bit round to integer instructions.
23385 (ceil<mode>2): Likewise.
23386 (btrunc<mode>2): Likewise.
23387 (round<mode>2): Likewise.
23389 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23391 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23392 unaligned VSX load/store on P8/P9.
23393 (expand_block_clear): Allow the use of unaligned VSX
23394 load/store on P8/P9.
23396 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23398 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23400 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23401 swap associated with both a load and a store.
23403 2018-01-02 Andrew Waterman <andrew@sifive.com>
23405 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23406 * config/riscv/riscv.md (clear_cache): Use it.
23408 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
23410 * web.c: Remove out-of-date comment.
23412 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23414 * expr.c (fixup_args_size_notes): Check that any existing
23415 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23416 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23417 (emit_single_push_insn): ...here.
23419 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23421 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23422 (const_vector_encoded_nelts): New function.
23423 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23424 (const_vector_int_elt, const_vector_elt): Declare.
23425 * emit-rtl.c (const_vector_int_elt_1): New function.
23426 (const_vector_elt): Likewise.
23427 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23428 of CONST_VECTOR_ELT.
23430 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23432 * expr.c: Include rtx-vector-builder.h.
23433 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23434 directly on the tree encoding.
23435 (const_vector_from_tree): Likewise.
23436 * optabs.c: Include rtx-vector-builder.h.
23437 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23438 sequence of "u" values.
23439 * vec-perm-indices.c: Include rtx-vector-builder.h.
23440 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23441 directly on the vec_perm_indices encoding.
23443 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23445 * doc/rtl.texi (const_vector): Describe new encoding scheme.
23446 * Makefile.in (OBJS): Add rtx-vector-builder.o.
23447 * rtx-vector-builder.h: New file.
23448 * rtx-vector-builder.c: Likewise.
23449 * rtl.h (rtx_def::u2): Add a const_vector field.
23450 (CONST_VECTOR_NPATTERNS): New macro.
23451 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23452 (CONST_VECTOR_DUPLICATE_P): Likewise.
23453 (CONST_VECTOR_STEPPED_P): Likewise.
23454 (CONST_VECTOR_ENCODED_ELT): Likewise.
23455 (const_vec_duplicate_p): Check for a duplicated vector encoding.
23456 (unwrap_const_vec_duplicate): Likewise.
23457 (const_vec_series_p): Check for a non-duplicated vector encoding.
23458 Say that the function only returns true for integer vectors.
23459 * emit-rtl.c: Include rtx-vector-builder.h.
23460 (gen_const_vec_duplicate_1): Delete.
23461 (gen_const_vector): Call gen_const_vec_duplicate instead of
23462 gen_const_vec_duplicate_1.
23463 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23464 (gen_const_vec_duplicate): Use rtx_vector_builder.
23465 (gen_const_vec_series): Likewise.
23466 (gen_rtx_CONST_VECTOR): Likewise.
23467 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23468 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23469 Build a new vector rather than modifying a CONST_VECTOR in-place.
23470 (handle_special_swappables): Update call accordingly.
23471 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23472 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23473 Build a new vector rather than modifying a CONST_VECTOR in-place.
23474 (handle_special_swappables): Update call accordingly.
23476 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23478 * simplify-rtx.c (simplify_const_binary_operation): Use
23479 CONST_VECTOR_ELT instead of XVECEXP.
23481 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23483 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23484 the selector elements to be different from the data elements
23485 if the selector is a VECTOR_CST.
23486 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23487 ssizetype for the selector.
23489 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23491 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23492 before testing each element individually.
23493 * tree-vect-generic.c (lower_vec_perm): Likewise.
23495 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23497 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23498 * selftest-run-tests.c (selftest::run_tests): Call it.
23499 * vector-builder.h (vector_builder::operator ==): New function.
23500 (vector_builder::operator !=): Likewise.
23501 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23502 (vec_perm_indices::all_from_input_p): New function.
23503 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23504 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23505 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23506 instead of reading the VECTOR_CST directly. Detect whether both
23507 vector inputs are the same before constructing the vec_perm_indices,
23508 and update the number of inputs argument accordingly. Use the
23509 utility functions added above. Only construct sel2 if we need to.
23511 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23513 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23514 the broadcast of the low byte.
23515 (expand_mult_highpart): Use an explicit encoding for the permutes.
23516 * optabs-query.c (can_mult_highpart_p): Likewise.
23517 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23518 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23519 (vectorizable_bswap): Likewise.
23520 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23521 explicit encoding for the power-of-2 permutes.
23522 (vect_permute_store_chain): Likewise.
23523 (vect_grouped_load_supported): Likewise.
23524 (vect_permute_load_chain): Likewise.
23526 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23528 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23529 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23530 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23531 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23532 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23533 (vect_gen_perm_mask_any): Likewise.
23535 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23537 * int-vector-builder.h: New file.
23538 * vec-perm-indices.h: Include int-vector-builder.h.
23539 (vec_perm_indices): Redefine as an int_vector_builder.
23540 (auto_vec_perm_indices): Delete.
23541 (vec_perm_builder): Redefine as a stand-alone class.
23542 (vec_perm_indices::vec_perm_indices): New function.
23543 (vec_perm_indices::clamp): Likewise.
23544 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23545 (vec_perm_indices::new_vector): New function.
23546 (vec_perm_indices::new_expanded_vector): Update for new
23547 vec_perm_indices class.
23548 (vec_perm_indices::rotate_inputs): New function.
23549 (vec_perm_indices::all_in_range_p): Operate directly on the
23550 encoded form, without computing elided elements.
23551 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23552 encoding. Update for new vec_perm_indices class.
23553 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23554 the given vec_perm_builder.
23555 (expand_vec_perm_var): Update vec_perm_builder constructor.
23556 (expand_mult_highpart): Use vec_perm_builder instead of
23557 auto_vec_perm_indices.
23558 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23559 vec_perm_indices instead of auto_vec_perm_indices. Use a single
23560 or double series encoding as appropriate.
23561 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23562 vec_perm_indices instead of auto_vec_perm_indices.
23563 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23564 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23565 (vect_permute_store_chain): Likewise.
23566 (vect_grouped_load_supported): Likewise.
23567 (vect_permute_load_chain): Likewise.
23568 (vect_shift_permute_load_chain): Likewise.
23569 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23570 (vect_transform_slp_perm_load): Likewise.
23571 (vect_schedule_slp_instance): Likewise.
23572 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23573 (vectorizable_mask_load_store): Likewise.
23574 (vectorizable_bswap): Likewise.
23575 (vectorizable_store): Likewise.
23576 (vectorizable_load): Likewise.
23577 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23578 vec_perm_indices instead of auto_vec_perm_indices. Use
23579 tree_to_vec_perm_builder to read the vector from a tree.
23580 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23581 vec_perm_builder instead of a vec_perm_indices.
23582 (have_whole_vector_shift): Use vec_perm_builder and
23583 vec_perm_indices instead of auto_vec_perm_indices. Leave the
23584 truncation to calc_vec_perm_mask_for_shift.
23585 (vect_create_epilog_for_reduction): Likewise.
23586 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23587 from auto_vec_perm_indices to vec_perm_indices.
23588 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23589 instead of changing individual elements.
23590 (aarch64_vectorize_vec_perm_const): Use new_vector to install
23591 the vector in d.perm.
23592 * config/arm/arm.c (expand_vec_perm_d::perm): Change
23593 from auto_vec_perm_indices to vec_perm_indices.
23594 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23595 instead of changing individual elements.
23596 (arm_vectorize_vec_perm_const): Use new_vector to install
23597 the vector in d.perm.
23598 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23599 Update vec_perm_builder constructor.
23600 (rs6000_expand_interleave): Likewise.
23601 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23602 (rs6000_expand_interleave): Likewise.
23604 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23606 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23607 to qimode could truncate the indices.
23608 * optabs.c (expand_vec_perm_var): Likewise.
23610 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23612 * Makefile.in (OBJS): Add vec-perm-indices.o.
23613 * vec-perm-indices.h: New file.
23614 * vec-perm-indices.c: Likewise.
23615 * target.h (vec_perm_indices): Replace with a forward class
23617 (auto_vec_perm_indices): Move to vec-perm-indices.h.
23618 * optabs.h: Include vec-perm-indices.h.
23619 (expand_vec_perm): Delete.
23620 (selector_fits_mode_p, expand_vec_perm_var): Declare.
23621 (expand_vec_perm_const): Declare.
23622 * target.def (vec_perm_const_ok): Replace with...
23623 (vec_perm_const): ...this new hook.
23624 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23625 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23626 * doc/tm.texi: Regenerate.
23627 * optabs.def (vec_perm_const): Delete.
23628 * doc/md.texi (vec_perm_const): Likewise.
23629 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23630 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23631 expand_vec_perm for constant permutation vectors. Assert that
23632 the mode of variable permutation vectors is the integer equivalent
23633 of the mode that is being permuted.
23634 * optabs-query.h (selector_fits_mode_p): Declare.
23635 * optabs-query.c: Include vec-perm-indices.h.
23636 (selector_fits_mode_p): New function.
23637 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23638 is defined, instead of checking whether the vec_perm_const_optab
23639 exists. Use targetm.vectorize.vec_perm_const instead of
23640 targetm.vectorize.vec_perm_const_ok. Check whether the indices
23641 fit in the vector mode before using a variable permute.
23642 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23643 vec_perm_indices instead of an rtx.
23644 (expand_vec_perm): Replace with...
23645 (expand_vec_perm_const): ...this new function. Take the selector
23646 as a vec_perm_indices rather than an rtx. Also take the mode of
23647 the selector. Update call to shift_amt_for_vec_perm_mask.
23648 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23649 Use vec_perm_indices::new_expanded_vector to expand the original
23650 selector into bytes. Check whether the indices fit in the vector
23651 mode before using a variable permute.
23652 (expand_vec_perm_var): Make global.
23653 (expand_mult_highpart): Use expand_vec_perm_const.
23654 * fold-const.c: Includes vec-perm-indices.h.
23655 * tree-ssa-forwprop.c: Likewise.
23656 * tree-vect-data-refs.c: Likewise.
23657 * tree-vect-generic.c: Likewise.
23658 * tree-vect-loop.c: Likewise.
23659 * tree-vect-slp.c: Likewise.
23660 * tree-vect-stmts.c: Likewise.
23661 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23663 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23664 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23665 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23666 (aarch64_vectorize_vec_perm_const): ...this new function.
23667 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23668 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23669 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23670 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23671 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23672 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23673 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23675 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
23676 check for NEON modes.
23677 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23678 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23679 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23680 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23682 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
23683 the old VEC_PERM_CONST conditions.
23684 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23685 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23686 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23687 (ia64_vectorize_vec_perm_const_ok): Merge into...
23688 (ia64_vectorize_vec_perm_const): ...this new function.
23689 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23690 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23691 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23692 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23693 * config/mips/mips.c (mips_expand_vec_perm_const)
23694 (mips_vectorize_vec_perm_const_ok): Merge into...
23695 (mips_vectorize_vec_perm_const): ...this new function.
23696 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23697 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23698 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23699 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23700 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23701 (rs6000_expand_vec_perm_const): Delete.
23702 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23704 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23705 (altivec_expand_vec_perm_const_le): Take each operand individually.
23706 Operate on constant selectors rather than rtxes.
23707 (altivec_expand_vec_perm_const): Likewise. Update call to
23708 altivec_expand_vec_perm_const_le.
23709 (rs6000_expand_vec_perm_const): Delete.
23710 (rs6000_vectorize_vec_perm_const_ok): Delete.
23711 (rs6000_vectorize_vec_perm_const): New function.
23712 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23713 an element count and rtx array.
23714 (rs6000_expand_extract_even): Update call accordingly.
23715 (rs6000_expand_interleave): Likewise.
23716 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23717 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23718 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23719 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23720 (rs6000_expand_vec_perm_const): Delete.
23721 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23722 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23723 (altivec_expand_vec_perm_const_le): Take each operand individually.
23724 Operate on constant selectors rather than rtxes.
23725 (altivec_expand_vec_perm_const): Likewise. Update call to
23726 altivec_expand_vec_perm_const_le.
23727 (rs6000_expand_vec_perm_const): Delete.
23728 (rs6000_vectorize_vec_perm_const_ok): Delete.
23729 (rs6000_vectorize_vec_perm_const): New function. Remove stray
23730 reference to the SPE evmerge intructions.
23731 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23732 an element count and rtx array.
23733 (rs6000_expand_extract_even): Update call accordingly.
23734 (rs6000_expand_interleave): Likewise.
23735 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23736 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23738 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23740 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23742 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23743 vector mode and that that mode matches the mode of the data
23745 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23746 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
23747 directly using expand_vec_perm_1 when forcing selectors into
23749 (expand_vec_perm_var): New function, split out from expand_vec_perm.
23751 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23753 * optabs-query.h (can_vec_perm_p): Delete.
23754 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23755 * optabs-query.c (can_vec_perm_p): Split into...
23756 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23757 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23758 particular selector is valid.
23759 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23760 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23761 (vect_grouped_load_supported): Likewise.
23762 (vect_shift_permute_load_chain): Likewise.
23763 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23764 (vect_transform_slp_perm_load): Likewise.
23765 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23766 (vectorizable_bswap): Likewise.
23767 (vect_gen_perm_mask_checked): Likewise.
23768 * fold-const.c (fold_ternary_loc): Likewise. Don't take
23769 implementations of variable permutation vectors into account
23770 when deciding which selector to use.
23771 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23772 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23773 with a false third argument.
23774 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23775 to test whether the constant selector is valid and can_vec_perm_var_p
23776 to test whether a variable selector is valid.
23778 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23780 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23781 * optabs-query.c (can_vec_perm_p): Likewise.
23782 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23783 instead of vec_perm_indices.
23784 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23785 (vect_gen_perm_mask_checked): Likewise,
23786 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23787 (vect_gen_perm_mask_checked): Likewise,
23789 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
23791 * optabs-query.h (qimode_for_vec_perm): Declare.
23792 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23793 (qimode_for_vec_perm): ...this new function.
23794 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23796 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23798 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23799 does not have a conditional at the top.
23801 2018-01-02 Richard Biener <rguenther@suse.de>
23803 * ipa-inline.c (big_speedup_p): Fix expression.
23805 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23808 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23811 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
23815 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23816 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23817 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23818 cond_taken_branch_cost 3->4.
23820 2018-01-01 Jakub Jelinek <jakub@redhat.com>
23822 PR tree-optimization/83581
23823 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23824 TODO_cleanup_cfg if any changes have been made.
23826 PR middle-end/83608
23827 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23828 convert_modes if target mode has the right side, but different mode
23831 PR middle-end/83609
23832 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23833 last argument when extracting from CONCAT. If either from_real or
23834 from_imag is NULL, use expansion through memory. If result is not
23835 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23836 the parts directly to inner mode, if even that fails, use expansion
23839 PR middle-end/83623
23840 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23841 check for bswap in mode rather than HImode and use that in expand_unop
23844 Copyright (C) 2018 Free Software Foundation, Inc.
23846 Copying and distribution of this file, with or without modification,
23847 are permitted in any medium without royalty provided the copyright
23848 notice and this notice are preserved.