* tree-ssa-dse.c (compute_trims): Avoid folding away undefined
[official-gcc.git] / gcc / ChangeLog
blobf362c36962bec77a4ad0b8b09e469fe7237295b6
1 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4         behaviour.
6 2018-08-22  Martin Sebor  <msebor@redhat.com>
8         PR middle-end/87052
9         * tree-pretty-print.c (pretty_print_string): Add argument.
10         (dump_generic_node): Call to pretty_print_string with string size.
12 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
14         PR rtl-optimization/86771
15         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
16         of two SETs into those two SETs, one to be placed at i2, if that SETs
17         destination is modified between i2 and i3.
19 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
21         PR tree-optimization/86725
22         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
23         function.
24         (vect_analyze_scalar_cycles_1): Check it.
26 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
28         PR tree-optimization/86725
29         * tree-vect-loop.c (vect_is_simple_reduction): When treating
30         an outer loop phi as a double reduction, make sure that the
31         single user of the phi result is an inner loop phi.
33 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
35         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
36         grouped stores with gaps to a strided group.
38 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
40         * tree-vect-stmts.c (get_group_load_store_type)
41         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
42         first statement in a group.
44 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
46         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
47         the sequence used in gcc/gcc.c.
49 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
51         PR other/704
52         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
53         building it.
55 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
57         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
58         Darwin10-specific unwinder-shim.
59         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
60         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
61         New to cater for Darwin10 Rosetta.
63 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
65         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
66         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
68 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
70         PR bootstrap/81033
71         PR target/81733
72         PR target/52795
73         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
74         (dwarf2out_switch_text_section): Generate a local label for the
75         second function sub-section and apply it as the second FDE start
76         label.
77         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
78         second sub-section start.
80 2018-08-22  Richard Biener  <rguenther@suse.de>
82         PR tree-optimization/86988
83         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
85 2018-08-22  Richard Biener  <rguenther@suse.de>
87         PR tree-optimization/86945
88         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
90 2018-08-22  Alexandre Oliva <oliva@adacore.com>
92         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
93         a comment about how uses of r2 for .sdata2 come about.
95 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
97         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
99 2018-08-21  Marek Polacek  <polacek@redhat.com>
101         PR c++/86981, Implement -Wpessimizing-move.
102         * doc/invoke.texi: Document -Wpessimizing-move.
104 2018-08-21  Jan Hubicka  <jh@suse.cz>
106         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
107         * tree.h (is_redundant_typedef): Remove.
108         * dwarf2out.c (is_redundant_typedef): Turn into static function.
110 2018-08-21  Jan Hubicka  <jh@suse.cz>
112         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
113         when possible.
115 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
117         * expmed.c (extract_low_bits): Reject invalid subregs early.
119 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
121         PR middle-end/86121
122         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
123         behaviour.
125 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
127         * config/vxworks.h: Guard vxworks_asm_out_constructor and
128         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
129         * config/vxworks.c: Likewise.
131 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
133         * config/vxworks.c: Set targetm.have_ctors_dtors
134         if HAVE_INITFINI_ARRAY_SUPPORT.
135         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
136         if HAVE_INITFINI_ARRAY_SUPPORT.
138 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
140         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
141         default search path for VxWorks < 7.
143 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
145         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
146         (get_format_string): Refer to c_getstr.
148 2018-08-21  Tom de Vries  <tdevries@suse.de>
150         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
151         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
152         (debuginfo_early_stop): Declare.
153         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
154         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
155         (debuginfo_early_stop): New function.
156         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
157         and debuginfo_early_stop.
158         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
159         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
160         (general_init): Call debuginfo_early_init.
161         (finalize): Call debuginfo_fini.
162         (do_compile): Call debuginfo_init.
163         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
164         -fdump-early-debug.
165         (@item -fdump-debug, @item -fdump-earlydebug): Add.
167 2018-08-21  Tom de Vries  <tdevries@suse.de>
169         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
170         flag_dump_noaddr and flag_dump_unnumbered.
172 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
174         * wide-int-range.cc (wide_int_range_abs): New.
175         (wide_int_range_order_set): Rename from wide_int_range_min_max.
176         * wide-int-range.h (wide_int_range_abs): New.
177         (wide_int_range_min_max): New.
178         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
179         case to call wide_int_range_abs.
180         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
181         (extract_range_from_abs_expr): Delete.
183 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
185         PR target/87033
186         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
187         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
188         for indexed loads.
190 2018-08-20  Nathan Sidwell  <nathan@acm.org>
191             Jeff Law <law@redhat.com>
193         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
194         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
196 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
198         PR other/84889
199         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
200         (decl_attributes): Likewise.
201         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
202         instance.
203         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
204         * diagnostic-core.h (class auto_diagnostic_group): New class.
205         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
206         (diagnostic_report_diagnostic): Handle the first diagnostics within
207         a group.
208         (emit_diagnostic): Add auto_diagnostic_group instance.
209         (inform): Likewise.
210         (inform_n): Likewise.
211         (warning): Likewise.
212         (warning_at): Likewise.
213         (warning_n): Likewise.
214         (pedwarn): Likewise.
215         (permerror): Likewise.
216         (error): Likewise.
217         (error_n): Likewise.
218         (error_at): Likewise.
219         (sorry): Likewise.
220         (fatal_error): Likewise.
221         (internal_error): Likewise.
222         (internal_error_no_backtrace): Likewise.
223         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
224         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
225         * diagnostic.h (struct diagnostic_context): Add fields
226         "diagnostic_group_nesting_depth",
227         "diagnostic_group_emission_count", "begin_group_cb",
228         "end_group_cb".
229         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
230         Add auto_diagnostic_group instance(s).
231         (find_explicit_erroneous_behavior): Likewise.
232         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
233         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
234         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
235         (gimplify_va_arg_expr): Likewise.
236         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
237         (HSA_SORRY_AT): Likewise.
238         * ipa-devirt.c (compare_virtual_tables): Likewise.
239         (warn_odr): Likewise.
240         * multiple_target.c (expand_target_clones): Likewise.
241         * opts-common.c (cmdline_handle_error): Likewise.
242         * reginfo.c (globalize_reg): Likewise.
243         * substring-locations.c (format_warning_n_va): Likewise.
244         * tree-inline.c (expand_call_inline): Likewise.
245         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
246         * tree-ssa-loop-niter.c
247         (do_warn_aggressive_loop_optimizations): Likewise.
248         * tree-ssa-uninit.c (warn_uninit): Likewise.
249         * tree.c (warn_deprecated_use): Likewise.
251 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
253         PR target/87014
254         * config/i386/i386.md (eh_return): Always update EH return
255         address in word_mode.
257 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
259         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
260         TARGET_SPLIT_COMPLEX_ARG is defined.
262 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
264         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
266 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
268         PR target/86984
269         * expr.c (expand_assignment): Assert that bitpos is positive.
270         (store_field): Likewise
271         (expand_expr_real_1): Make sure that bitpos is positive.
272         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
273         integer overflow.
275 2018-08-20  Nathan Sidwell  <nathan@acm.org>
277         * Makefile.in (CPP_ID_DATA_H): Delete.
278         (CPP_INTERNAL_H): Don't add it.
279         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
280         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
282 2018-08-20  Richard Biener  <rguenther@suse.de>
284         PR tree-optimization/78655
285         * tree-vrp.c (extract_range_from_binary_expr_1): Make
286         pointer + offset nonnull if either operand is nonnull work.
288 2018-08-20  Tom de Vries  <tdevries@suse.de>
290         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
291         unless the referenced die describes the added property using
292         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
293         Otherwise, add a DW_AT_location to the referenced die.
295 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
297         PR target/86994
298         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
299         register_operand when calling ix86_set_reg_reg_cost.
300         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
301         Set *total to 0 for operands that satisfy x86_64_immediate_operand
302         predicate and to 1 otherwise.
304 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
306         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
307         emit a diagnostic that it is not supported and reset the option.
308         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
309         supported and consume the option.  (ASM_FINAL_SPEC): New.
311 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
313         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
314         a sentence.
316 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
318         C-SKY port: Documentation
320         * doc/extend.texi (C-SKY Function Attributes): New section.
321         * doc/invoke.texi (Option Summary): Add C-SKY options.
322         (C-SKY Options): New section.
323         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
325 2018-08-17  Jojo  <jijie_rong@c-sky.com>
326             Huibin Wang  <huibin_wang@c-sky.com>
327             Sandra Loosemore  <sandra@codesourcery.com>
328             Chung-Lin Tang  <cltang@codesourcery.com>
330         C-SKY port: Backend implementation
332         * config/csky/*: New.
333         * common/config/csky/*: New.
335 2018-08-17  Jojo  <jijie_rong@c-sky.com>
336             Huibin Wang  <huibin_wang@c-sky.com>
337             Sandra Loosemore  <sandra@codesourcery.com>
338             Chung-Lin Tang  <cltang@codesourcery.com>
339             Andrew Jenner  <andrew@codesourcery.com>
341         C-SKY port: Configury
343         * config.gcc (csky-*-*): New.
344         * configure.ac: Add csky to targets for dwarf2 debug_line support.
345         * configure: Regenerated.
347 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
349         * dump-context.h: Include "dumpfile.h".
350         (dump_context::dump_printf_va): Convert final param from va_list
351         to va_list *.  Convert from ATTRIBUTE_PRINTF to
352         ATTRIBUTE_GCC_DUMP_PRINTF.
353         (dump_context::dump_printf_loc_va): Likewise.
354         * dumpfile.c: Include "stringpool.h".
355         (make_item_for_dump_printf_va): Delete.
356         (make_item_for_dump_printf): Delete.
357         (class dump_pretty_printer): New class.
358         (dump_pretty_printer::dump_pretty_printer): New ctor.
359         (dump_pretty_printer::emit_items): New member function.
360         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
361         function.
362         (dump_pretty_printer::emit_item): New member function.
363         (dump_pretty_printer::stash_item): New member function.
364         (dump_pretty_printer::format_decoder_cb): New member function.
365         (dump_pretty_printer::decode_format): New member function.
366         (dump_context::dump_printf_va): Reimplement in terms of
367         dump_pretty_printer.
368         (dump_context::dump_printf_loc_va): Convert final param from va_list
369         to va_list *.
370         (dump_context::begin_scope): Reimplement call to
371         make_item_for_dump_printf.
372         (dump_printf): Update for change to dump_printf_va.
373         (dump_printf_loc): Likewise.
374         (selftest::test_capture_of_dump_calls): Convert "stmt" from
375         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
376         with %T, %E, and %G.
377         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
378         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
379         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
380         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
381         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
382         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
383         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
384         within a dump_printf_loc call to "%wu".
385         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
386         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
387         missing space after "=".
388         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
389         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
390         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
391         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
392         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
393         duplicate "vectorized" from message.
395 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
397         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
398         polyNxK_t element's TYPE_STRING_FLAG.
400 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
402         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
403         (they were unnamed before).  Fix comments.
405 2018-08-17  Nathan Sidwell  <nathan@acm.org>
407         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
409 2018-08-17  Richard Biener  <rguenther@suse.de>
411         PR tree-optimization/86841
412         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
414 2018-08-17  Martin Liska  <mliska@suse.cz>
416         * common.opt: Remove Warn, Init and Report for options with
417         Ignore/Deprecated flag. Warning is done automatically for
418         Deprecated flags.
419         * config/i386/i386.opt: Likewise.
420         * config/ia64/ia64.opt: Likewise.
421         * config/rs6000/rs6000.opt: Likewise.
422         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
423         Remove usage of flag_check_pointer_bounds.
424         * lto-wrapper.c (merge_and_complain): Do not handle
425         OPT_fcheck_pointer_bounds.
426         (append_compiler_options): Likewise.
427         * opt-functions.awk: Do not handle Deprecated.
428         * optc-gen.awk: Check that Var, Report and Init are not
429         used for an option with Ignore/Deprecated flag.
430         * opts-common.c (decode_cmdline_option): Do not report
431         CL_ERR_DEPRECATED.
432         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
433         options.
434         * opts.h (struct cl_option): Remove cl_deprecated flag.
435         (CL_ERR_DEPRECATED): Remove error enum value.
437 2018-08-17  Richard Biener  <rguenther@suse.de>
439         PR middle-end/86505
440         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
441         across a va-arg-pack using call adjust its return value accordingly.
443 2018-08-16  Martin Sebor  <msebor@redhat.com>
445         PR tree-optimization/86853
446         * gimple-ssa-sprintf.c (struct format_result): Rename member.
447         (struct fmtresult): Add member and initialize it in ctors.
448         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
449         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
450         (format_directive): Set POSUNDER4K when MAYFAIL is set.
451         (parse_directive): Handle %C same as %c.
452         (sprintf_dom_walker::compute_format_length): Adjust.
453         (is_call_safe): Adjust.
455 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
457         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
458         for determining how to count the elements.
459         * builtins.h (c_strlen): Adjust prototype.
460         * expr.c (string_constant): Add new parameter mem_size.
461         Set *mem_size appropriately.
462         * expr.h (string_constant): Adjust protoype.
463         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
464         * gimple-fold.h (get_range_strlen): Adjust prototype.
465         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
466         (format_string): Call get_string_length with eltsize.
468 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
470         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
471         to emit the span, rather than setting it as the prefix.
473 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
475         * diagnostic-show-locus.c (layout::start_annotation_line): Add
476         "margin_char" parameter, defaulting to space.  Use it in place
477         of pp_space for the initial part of the margin.
478         (layout::print_leading_fixits): Use '+' when filling the margin
479         of line-insertion fix-it hints.
481 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
483         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
484         Delete.
486 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
488         * config/rs6000/altivec.md: Don't set length attribute to the default
489         value.
490         * config/rs6000/darwin.md: Ditto.
491         * config/rs6000/dfp.md: Ditto.
492         * config/rs6000/htm.md: Ditto.
493         * config/rs6000/rs6000.md: Ditto.
494         * config/rs6000/sync.md: Ditto.
495         * config/rs6000/vsx.md: Ditto.
497 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
499         * config/rs6000/altivec.md: Don't set length attribute to the default
500         value, for branch instructions.
501         * config/rs6000/darwin.md: Ditto.
502         * config/rs6000/rs6000.md: Ditto.
504 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
506         * config/rs6000/rs6000.md (length): Always define as const_int 4.
507         (unnamed conditional branch define_insn): Set length to 4 or 8
508         depending on offset.
509         (<bd>_<mode>): Similar, for alternative 0.
510         (<bd>tf_<mode>): Ditto.
512 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
514         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
516 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
518         * doc/rtl.texi: Replace old RTX class names with new names.
521 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
523         * expmed.h (canonicalize_comparison): New declaration.
524         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
525         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
526         * optabs.c (prepare_cmp_insn): Likewise.
527         * rtl.h (unsigned_condition_p): New function which checks if a
528         comparison operator is unsigned.
530 2018-08-16  Nathan Sidwell  <nathan@acm.org>
532         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
533         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
535 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
537         PR target/84711
538         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
539         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
540         (mov<mov>): ..this and enable unconditionally.
542 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
544         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
546 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
548         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
549         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
550         "Common" with "Target".
552 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
554         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
555         * doc/invoke.texi (mmitigate-rop): Remove.
556         * config/i386/i386.c: Do not include "regrename.h".
557         (ix86_rop_should_change_byte_p, reg_encoded_number)
558         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
559         Remove.
560         (ix86_reorg): Remove call to ix86_mitigate_rop.
561         * config/i386/i386.md (attr "modrm_class"): Remove.
562         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
563         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
564         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
566 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
568         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
569         allow folding of mergeh() and mergel() for the float and double types.
570         (fold_mergehl_helper): Rework to handle building a permute tree
571         for float vectors.
573 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
575         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
576         for TARGET_SSE.
578 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
580         * common.opt (fdiagnostics-show-labels): New option.
581         * diagnostic-show-locus.c (class layout_range): Add field
582         "m_label".
583         (class layout): Add field "m_show_labels_p".
584         (layout_range::layout_range): Add param "label" and use it to
585         initialize m_label.
586         (make_range): Pass in NULL for new "label" param of layout_range's
587         ctor.
588         (layout::layout): Initialize m_show_labels_p.
589         (layout::maybe_add_location_range): Pass in loc_range->m_label
590         when constructing layout_range instances.
591         (struct line_label): New struct.
592         (layout::print_any_labels): New member function.
593         (layout::print_line): Call it if label-printing is enabled.
594         (selftest::test_one_liner_labels): New test.
595         (selftest::test_diagnostic_show_locus_one_liner): Call it.
596         * diagnostic.c (diagnostic_initialize): Initialize
597         context->show_labels_p.
598         * diagnostic.h (struct diagnostic_context): Add field
599         "show_labels_p".
600         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
601         -fno-diagnostics-show-labels.
602         * dwarf2out.c (gen_producer_string): Add
603         OPT_fdiagnostics_show_labels to the ignored options.
604         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
605         param.
606         (gcc_rich_location::maybe_add_expr): Likewise.
607         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
608         label" param, defaulting to NULL.
609         (gcc_rich_location::add_expr): Add "label" param.
610         (gcc_rich_location::maybe_add_expr): Likewise.
611         (class text_range_label): New class.
612         (class range_label_for_type_mismatch): New class.
613         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
614         of format_warning_va.
615         (fmtwarn_n): Likewise for new params of format_warning_n_va.
616         * lto-wrapper.c (merge_and_complain): Add
617         OPT_fdiagnostics_show_labels to the "pick one setting" options.
618         (append_compiler_options): Likewise to the dropped options.
619         (append_diag_options): Likewise to the passed-on options.
620         * opts.c (common_handle_option): Handle the new option.
621         * selftest-diagnostic.c
622         (test_diagnostic_context::test_diagnostic_context): Enable
623         show_labels_p.
624         * substring-locations.c: Include "gcc-rich-location.h".
625         (format_warning_n_va): Add "fmt_label" and "param_label" params
626         and use them as appropriate.
627         (format_warning_va): Add "fmt_label" and "param_label" params,
628         passing them on to format_warning_n_va.
629         (format_warning_at_substring): Likewise.
630         (format_warning_at_substring_n): Likewise.
631         * substring-locations.h (format_warning_va): Add "fmt_label" and
632         "param_label" params.
633         (format_warning_n_va): Likewise.
634         (format_warning_at_substring): Likewise.
635         (format_warning_at_substring_n): Likewise.
636         * toplev.c (general_init): Initialize global_dc->show_labels_p.
638 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
640         PR testsuite/86519
641         * builtins.c (expand_builtin_memcmp): Do not expand the call
642         when overflow is detected.
644 2018-08-15  Martin Sebor  <msebor@redhat.com>
646         PR tree-optimization/71625
647         * config/aarch64/aarch64-builtins.c
648         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
650 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
652         * config/s390/s390.c (s390_reorg): Remove loop.
654 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
656         * config/darwin.c
657          (darwin_function_switched_text_sections): Delete.
658         * gcc/config/darwin.h
659          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
661 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
663         PR target/81685
664         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
665         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
666         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
668 2018-08-15  Martin Liska  <mliska@suse.cz>
670         PR tree-optimization/86925
671         * predict.c (expr_expected_value_1): When taking
672         later predictor, assign also probability.
673         Use fold_build2_initializer_loc in order to fold
674         the expression in -frounding-math.
676 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
678         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
679         patterns.
680         (expand_vec_perm_1): Try the new method.
682 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
684         PR target/86547
685         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
686         Check whether lra_live_max_point is 0 before dividing.
688 2018-08-14  Martin Sebor  <msebor@redhat.com>
690         PR tree-optimization/86650
691         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
692         (vrp_prop::check_mem_ref): Same.
694 2018-08-13  Liu Hao <lh_mouse@126.com>
696         * pretty-print.c (eat_esc_sequence): Swap the foreground and
697         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
698         and clear it thereafter, as it only works for DBCS.
700 2018-08-13  Liu Hao <lh_mouse@126.com>
702         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
703         handle returned by _get_osf_handle().
705 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
707         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
708         for folding vec_perm.
710 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
712         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
713         Add support for gimple-folding of vec_pack() and vec_unpack()
714         intrinsics.
716 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
718         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
719         vec_xst variants to the list.
720         (rs6000_gimple_fold_builtin): Add support for folding unaligned
721         vector loads and stores.
723 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
725         * config.gcc (rs6000-ibm-aix4.x): Delete.
726         (rs6000-ibm-aix5.1): Delete.
727         (rs6000-ibm-aix5.2): Delete.
728         (rs6000-ibm-aix5.3): Delete.
729         * config/rs6000/aix43.h: Delete.
730         * config/rs6000/aix51.h: Delete.
731         * config/rs6000/aix52.h: Delete.
732         * config/rs6000/t-aix43: Delete.
734 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
736         * config/s390/s390.c (s390_decompose_constant_pool_ref):
737         New function.
738         (s390_decompose_address): Factor out constant pool ref
739         decomposition.
741 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
743         * config/nds32/nds32-predicates.c
744         (nds32_can_use_bclr_p): Change return type as bool.
745         (nds32_can_use_bset_p): Ditto.
746         (nds32_can_use_btgl_p): Ditto.
747         (nds32_can_use_bitci_p): Ditto.
748         * config/nds32/nds32-protos.h
749         (nds32_can_use_bclr_p): Change declaration.
750         (nds32_can_use_bset_p): Ditto.
751         (nds32_can_use_btgl_p): Ditto.
752         (nds32_can_use_bitci_p): Ditto.
754 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
756         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
757         Support -msched-prolog-epilog option.
758         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
760 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
762         * common/config/nds32/nds32-common.c
763         (nds32_option_optimization_table): Enalbe -malways-align.
765 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
767         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
768         extra_headers.
769         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
770         OPT_misr_secure_ case.
771         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
772         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
773         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
774         secure attribute.
775         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
776         (nds32_isr_info): New field security_level.
777         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
778         * config/nds32/nds32.md (return_internal): Consider critical attribute.
779         * config/nds32/nds32.opt (misr-secure): New option.
780         * config/nds32/nds32_init.inc: New file.
781         * config/nds32/nds32_isr.h: New file.
783 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
785         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
786         Update comment for atomic instructions.
787         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
788         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
789         Remove.
790         (atomic_loaddi): Revise fence expansion to only emit fence prior to
791         load for __ATOMIC_SEQ_CST model.
792         (atomic_loaddi_1): Remove float register target.
793         (atomic_storedi): Handle CONST_INT values.
794         (atomic_storedi_1): Remove float register source.  Add special case
795         for zero value.
796         (memory_barrier): New expander and insn.
798 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
800         PR tree-optimization/86835
801         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
802         new_stmt after def_gsi, make sure to insert new_square_stmt after
803         that stmt, not 2 stmts before it.
805 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
807         PR target/82418
808         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
809         instead of SWI48.
811 2018-08-10  Martin Liska  <mliska@suse.cz>
813         PR target/83610
814         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
815         function type.
816         * builtins.c (expand_builtin_expect_with_probability):
817         New function.
818         (expand_builtin_expect_with_probability): New function.
819         (build_builtin_expect_predicate): Add new argumnet probability
820         for BUILT_IN_EXPECT_WITH_PROBABILITY.
821         (fold_builtin_expect):
822         (fold_builtin_2):
823         (fold_builtin_3):
824         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
825         * builtins.h (fold_builtin_expect): Set new argument.
826         * doc/extend.texi: Document __builtin_expect_with_probability.
827         * doc/invoke.texi: Likewise.
828         * gimple-fold.c (gimple_fold_call): Pass new argument.
829         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
830         also BUILT_IN_EXPECT_WITH_PROBABILITY.
831         * predict.c (get_predictor_value): New function.
832         (expr_expected_value): Add new argument probability. Assume
833         that predictor and probability are always non-null.
834         (expr_expected_value_1): Likewise.  For __builtin_expect and
835         __builtin_expect_with_probability set probability.  Handle
836         combination in binary expressions.
837         (tree_predict_by_opcode): Simplify code by simply calling
838         get_predictor_value.
839         (pass_strip_predict_hints::execute): Add handling of
840         BUILT_IN_EXPECT_WITH_PROBABILITY.
841         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
842         new predictor.
843         * tree.h (DECL_BUILT_IN_P): New function.
845 2018-08-10  Martin Liska  <mliska@suse.cz>
847         PR tree-optimization/85799
848         * passes.def: Add argument for pass_strip_predict_hints.
849         * predict.c (class pass_strip_predict_hints): Add new argument
850         early_p.
851         (strip_predictor_early): New function.
852         (pass_strip_predict_hints::execute): Call the function to
853         strip predictors.
854         (strip_predict_hints): New function.
855         * predict.def: Fix comment.
857 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
859         * Makefile.in: Clarify which tm.texi to copy over to assert the
860         right to grant a GFDL license for all.
862 2018-08-09  Jeff Law  <law@redhat.com>
864         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
865         unused variable.
867 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
869         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
870         prototype.
872 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
874         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
875         reductions for variable-length vectors.
877 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
879         PR other/84889
880         * common.opt (fdiagnostics-show-line-numbers): New option.
881         * diagnostic-show-locus.c (class layout): Add fields
882         "m_show_line_numbers_p" and "m_linenum_width";
883         (num_digits): New function.
884         (test_num_digits): New function.
885         (layout::layout): Initialize new fields.  Update m_x_offset
886         logic to handle any left margin.
887         (layout::print_source_line): Print line number when requested.
888         (layout::start_annotation_line): New member function.
889         (layout::print_annotation_line): Call it.
890         (layout::print_leading_fixits): Likewise.
891         (layout::print_trailing_fixits): Likewise.  Update calls to
892         move_to_column for new parameter.
893         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
894         it to potentially call start_annotation_line.
895         (layout::show_ruler): Call start_annotation_line.
896         (selftest::test_line_numbers_multiline_range): New selftest.
897         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
898         and selftest::test_line_numbers_multiline_range.
899         * diagnostic.c (diagnostic_initialize): Initialize
900         show_line_numbers_p.
901         * diagnostic.h (struct diagnostic_context): Add field
902         "show_line_numbers_p".
903         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
904         -fno-diagnostics-show-line-numbers.
905         * dwarf2out.c (gen_producer_string): Add
906         OPT_fdiagnostics_show_line_numbers to the ignored options.
907         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
908         one setting" options.
909         (append_compiler_options): Likewise to the dropped options.
910         (append_diag_options): Likewise to the passed-on options.
911         * opts.c (common_handle_option): Handle the new option.
912         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
914 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
916         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
917         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
918         third argument of type "const signed char" to descriptions of
919         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
920         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
921         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
922         __builtin_bcdsub_ov functions.
924 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
926         PR tree-optimization/86858
927         * tree-vect-loop.c (vect_is_simple_reduction): Restore
928         flow_bb_inside_loop_p calls.
930 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
932         PR tree-optimization/86871
933         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
934         instead of gimple_assign_lhs.
936 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
938         PR target/86887
939         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
940         register constraint to operand 0.
941         (add<mode>3_carryinC): Likewise.
942         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
944 2018-08-09  Martin Liska  <mliska@suse.cz>
946         PR c/86895
947         * common.opt: Remove extra line.
949 2018-08-09  Martin Liska  <mliska@suse.cz>
951         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
952         at the end of a line, make first letter capital and end up
953         a sentence with a dot.
954         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
955         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
956         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
957         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
958         (PARAM_MAX_ISL_OPERATIONS): Likewise.
959         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
960         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
961         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
962         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
963         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
964         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
965         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
966         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
967         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
968         (PARAM_TREE_REASSOC_WIDTH): Likewise.
969         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
970         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
971         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
973 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
975         PR target/84332
976         * config/s390/s390.c (s390_option_override_internal): Reduce the
977         stack-clash-protection-probe-interval param if it would be too big
978         for z900.
980 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
982         PR target/46179
983         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
984         * config/m68k/m68k.c (handle_move_double): Don't call
985         m68k_final_prescan_insn.
986         (m68k_adjust_decorated_operand): Renamed from
987         m68k_final_prescan_insn, remove first and third operand and
988         simplify.
989         (print_operand): Call it.
990         (print_operand_address): Call it.
992 2018-08-08  Nathan Sidwell  <nathan@acm.org>
994         * diagnostic.c (diagnostic_report_current_module): Use
995         linemap_included_from & linemap_included_from_linemap.
997 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
999         * config/aarch64/aarch64-cores.def: Add phecda core.
1000         * config/aarch64/aarch64-tune.md: Regenerate.
1001         * doc/invoke.texi: Add phecda core.
1003 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1005         PR target/85295
1006         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
1007         definitions.
1008         * config/s390/s390.md ("movti"): Add more alternatives for
1009         constant to GPR copies.
1011 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
1013         * config/s390/s390.c: Fix whitespace damage throughout the file.
1014         * config/s390/s390.h: Likewise.
1015         * config/s390/tpf.h: Likewise.
1017 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1019         * config/s390/s390.c (s390_loadrelative_operand_p):
1020         Remove TARGET_CPU_ZARCH usages.
1021         (s390_rtx_costs): Likewise.
1022         (s390_legitimate_constant_p): Likewise.
1023         (s390_cannot_force_const_mem): Likewise.
1024         (legitimate_reload_constant_p): Likewise.
1025         (s390_preferred_reload_class): Likewise.
1026         (legitimize_pic_address): Likewise.
1027         (legitimize_tls_address): Likewise.
1028         (s390_split_branches): Removed.
1029         (s390_add_execute): Removed.
1030         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
1031         (s390_mainpool_start): Likewise.
1032         (s390_mainpool_finish): Likewise.
1033         (s390_mainpool_cancel): Removed.
1034         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
1035         (s390_chunkify_cancel): Likewise.
1036         (s390_return_addr_rtx): Likewise.
1037         (s390_register_info): Remove split_branches_pending_p uages.
1038         (s390_optimize_register_info): Likewise.
1039         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
1040         split_branches_pending_p usages.
1041         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
1042         (s390_load_got): Likewise.
1043         (s390_expand_split_stack_prologue): Likewise.
1044         (output_asm_nops): Likewise.
1045         (s390_function_profiler): Likewise.
1046         (s390_emit_call): Likewise.
1047         (s390_conditional_register_usage): Likewise.
1048         (s390_optimize_prologue): Likewise.
1049         (s390_reorg): Remove TARGET_CPU_ZARCH and
1050         split_branches_pending_p usages.
1051         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
1052         usages.
1053         (s390_output_indirect_thunk_function): Likewise.
1054         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
1055         (TARGET_CPU_ZARCH_P): Removed.
1056         (struct machine_function): Remove split_branches_pending_p.
1057         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
1059 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
1061         * common/config/s390/s390-common.c (processor_flags_table):
1062         Remove flags.
1063         * config.gcc: Remove with_arch/with_tune support.
1064         * config/s390/2064.md: Remove cpu attribute comparisons.
1065         * config/s390/driver-native.c (s390_host_detect_local_cpu):
1066         Remove MTN.
1067         * config/s390/linux.h (ASM_SPEC):
1068         Remove -march support.
1069         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
1070         Use a table to get an arch level.
1071         * config/s390/s390-opts.h (enum processor_type):
1072         Remove enum values.
1073         * config/s390/s390.c
1074         (processor_table): Remove entries, add arch_level values.
1075         (s390_issue_rate): Remove cases.
1076         (s390_option_override): Adjust
1077         s390_option_override_internal() call.
1078         (s390_option_override_internal): Remove deprecation warning.
1079         (s390_valid_target_attribute_tree): Adjust
1080         s390_option_override_internal() call.
1081         * config/s390/s390.h (struct s390_processor):
1082         Share with s390-c.c, add arch_level field.
1083         * config/s390/s390.md:
1084         Remove occurrences in cpu attribute.
1085         * config/s390/s390.opt: Remove -march/-mtune support.
1086         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
1087         * doc/invoke.texi: Remove deprecation warning.
1089 2018-08-08  Luis Machado  <luis.machado@linaro.org>
1091         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
1092         global.
1093         (qdf24xx_tunings): Set vector cost structure to
1094         qdf24xx_vector_cost.
1096         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
1097         <register_sextend>: Set to 3.
1099 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
1101         PR target/86838
1102         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1103         * config/aarch64/aarch64-simd.md
1104         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1105         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1106         (aarch64_frecpx<mode>): ...this new pattern.
1107         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1108         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1110 2018-08-07  Martin Liska  <mliska@suse.cz>
1112         PR middle-end/83023
1113         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1114         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1115         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1116         * doc/extend.texi: Document that malloc attribute adds
1117         hit to compiler.
1119 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1121         PR target/86785
1122         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1123         Define to speculation_safe_value_not_needed.
1125 2018-08-06  Jeff Law  <law@redhat.com>
1127         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1128         the vr_values instance to cprop_into_stmt.
1129         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1130         (cprop_operand): Also query EVRP to determine if OP is a constant.
1132 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1134         * diagnostic.c (diagnostic_report_current_module): Reroll
1135         included-at loop.  Translate text.
1137 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1139         * function-tests.c (selftest::test_expansion_to_rtl): Call
1140         free_after_compilation.
1142 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1144         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1146 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1148         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1149         loops with memory block operations from getting unrolled.
1151 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1153         PR target/86807
1154         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1155         Define to speculation_safe_value_not_needed.
1157 2018-08-06  Jeff Law  <law@redhat.com>
1159         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1160         assert.
1162 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1164         PR target/86662
1165         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1166         with all enabled __intN types.
1168         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1170 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1172         * alias.c (record_set): Check for clobber high.
1173         * cfgexpand.c (expand_gimple_stmt): Likewise.
1174         * combine-stack-adj.c (single_set_for_csa): Likewise.
1175         * combine.c (find_single_use_1): Likewise.
1176         (set_nonzero_bits_and_sign_copies): Likewise.
1177         (get_combine_src_dest): Likewise.
1178         (is_parallel_of_n_reg_sets): Likewise.
1179         (try_combine): Likewise.
1180         (record_dead_and_set_regs_1): Likewise.
1181         (reg_dead_at_p_1): Likewise.
1182         (reg_dead_at_p): Likewise.
1183         * dce.c (deletable_insn_p): Likewise.
1184         (mark_nonreg_stores_1): Likewise.
1185         (mark_nonreg_stores_2): Likewise.
1186         * df-scan.c (df_find_hard_reg_defs): Likewise.
1187         (df_uses_record): Likewise.
1188         (df_get_call_refs): Likewise.
1189         * dwarf2out.c (mem_loc_descriptor): Likewise.
1190         * haifa-sched.c (haifa_classify_rtx): Likewise.
1191         * ira-build.c (create_insn_allocnos): Likewise.
1192         * ira-costs.c (scan_one_insn): Likewise.
1193         * ira.c (equiv_init_movable_p): Likewise.
1194         (rtx_moveable_p): Likewise.
1195         (interesting_dest_for_shprep): Likewise.
1196         * jump.c (mark_jump_label_1): Likewise.
1197         * postreload-gcse.c (record_opr_changes): Likewise.
1198         * postreload.c (reload_cse_simplify): Likewise.
1199         (struct reg_use): Add source expr.
1200         (reload_combine): Check for clobber high.
1201         (reload_combine_note_use): Likewise.
1202         (reload_cse_move2add): Likewise.
1203         (move2add_note_store): Likewise.
1204         * print-rtl.c (print_pattern): Likewise.
1205         * recog.c (decode_asm_operands): Likewise.
1206         (store_data_bypass_p): Likewise.
1207         (if_test_bypass_p): Likewise.
1208         * regcprop.c (kill_clobbered_value): Likewise.
1209         (kill_set_value): Likewise.
1210         * reginfo.c (reg_scan_mark_refs): Likewise.
1211         * reload1.c (maybe_fix_stack_asms): Likewise.
1212         (eliminate_regs_1): Likewise.
1213         (elimination_effects): Likewise.
1214         (mark_not_eliminable): Likewise.
1215         (scan_paradoxical_subregs): Likewise.
1216         (forget_old_reloads_1): Likewise.
1217         * reorg.c (find_end_label): Likewise.
1218         (try_merge_delay_insns): Likewise.
1219         (redundant_insn): Likewise.
1220         (own_thread_p): Likewise.
1221         (fill_simple_delay_slots): Likewise.
1222         (fill_slots_from_thread): Likewise.
1223         (dbr_schedule): Likewise.
1224         * resource.c (update_live_status): Likewise.
1225         (mark_referenced_resources): Likewise.
1226         (mark_set_resources): Likewise.
1227         * rtl.c (copy_rtx): Likewise.
1228         * rtlanal.c (reg_referenced_p): Likewise.
1229         (single_set_2): Likewise.
1230         (noop_move_p): Likewise.
1231         (note_stores): Likewise.
1232         * sched-deps.c (sched_analyze_reg): Likewise.
1233         (sched_analyze_insn): Likewise.
1235 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1237         * cse.c (invalidate_reg): New function extracted from...
1238         (invalidate): ...here.
1239         (canonicalize_insn): Check for clobber high.
1240         (invalidate_from_clobbers): invalidate clobber highs.
1241         (invalidate_from_sets_and_clobbers): Likewise.
1242         (count_reg_usage): Check for clobber high.
1243         (insn_live_p): Likewise.
1244         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1245         (cselib_invalidate_regno): Check for clobber in setter.
1246         (cselib_invalidate_rtx): Pass through setter.
1247         (cselib_invalidate_rtx_note_stores):
1248         (cselib_process_insn): Check for clobber high.
1249         * cselib.h (cselib_invalidate_rtx): Add operand.
1251 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1253         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1254         (mark_not_eliminable): Likewise.
1255         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1256         * lra-lives.c (process_bb_lives): Check for clobber high.
1257         * lra.c (new_insn_reg): Remember clobber highs.
1258         (collect_non_operand_hard_regs): Check for clobber high.
1259         (lra_set_insn_recog_data): Likewise.
1260         (add_regs_to_insn_regno_info): Likewise.
1261         (lra_update_insn_regno_info): Likewise.
1263 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1265         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1266         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1268 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1270         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1271         (copy_insn_1): Likewise.
1272         (gen_hard_reg_clobber_high): New gen function.
1273         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1274         * genemit.c (gen_exp): Likewise.
1275         (gen_emit_seq): Pass through info.
1276         (gen_insn): Check for CLOBBER_HIGH.
1277         (gen_expand): Pass through info.
1278         (gen_split): Likewise.
1279         (output_add_clobbers): Likewise.
1280         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1281         (remove_clobbers): Likewise.
1282         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1284 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1286         * doc/rtl.texi (clobber_high): Add.
1287         (parallel): Add in clobber high
1288         * rtl.c (rtl_check_failed_code3): Add function.
1289         * rtl.def (CLOBBER_HIGH): Add expression.
1290         * rtl.h (RTL_CHECKC3): Add macro.
1291         (rtl_check_failed_code3): Add declaration.
1292         (XC3EXP): Add macro.
1294 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1296         PR target/86386
1297         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1298         cfun->machine->max_used_stack_alignment if needed.
1300 2018-08-04  Martin Sebor  <msebor@redhat.com>
1302         PR tree-optimization/86571
1303         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1304         NaN output to 4.
1306 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1308         PR target/86799
1309         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1310         Define.
1312 2018-08-03  Jeff Law  <law@redhat.com>
1314         PR target/86795
1315         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1316         Define to speculation_safe_value_not_needed.
1318 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1320         * doc/gcov.texi (-x): Remove duplicate "to".
1321         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1322         (-Wif-not-aligned): Remove duplicate "is".
1323         (-flto): Remove duplicate "the".
1324         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1325         duplicate "v5.00.b".
1326         (MSP430 Options): Remove duplicate "and" from the description
1327         of "-mgprel-sec=regexp".
1328         (x86 Options): Remove duplicate copies of "vmldLog102" and
1329         vmlsLog104 from description of "-mveclibabi=type".
1331 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1333         * internal-fn.h (first_commutative_argument): Declare.
1334         * internal-fn.c (first_commutative_argument): New function.
1335         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1336         restrictions for pattern statements.  Use first_commutative_argument
1337         to look for commutative operands in calls to internal functions.
1339 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1341         * Makefile.in (wide-int-range.o): New.
1342         * tree-vrp.c: Move all the wide_int_* functions to...
1343         * wide-int-range.cc: ...here.
1344         * tree-vrp.h: Move all the wide_int_* prototypes to...
1345         * wide-int-range.h: ...here.
1347 2018-08-03  Tom de Vries  <tdevries@suse.de>
1349         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1350         UI_NONE.
1351         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1352         * except.c (output_function_exception_table): Do early exit if
1353         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1355 2018-08-03  Martin Liska  <mliska@suse.cz>
1357         * predict.c (dump_prediction): Change to 2 digits
1358         in fraction part.
1360 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1362         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1363         neon_dup_q to...
1364         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1366 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1368         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1369         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1370         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1371         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1372         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1374 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1376         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1377         pp_take_prefix when saving the existing prefix.
1378         * diagnostic.c (diagnostic_append_note): Likewise.
1379         * langhooks.c (lhd_print_error_function): Likewise.
1380         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1381         param's type.  Free the existing prefix.
1382         (pp_take_prefix): New function.
1383         (pretty_printer::pretty_printer): Drop the prefix parameter.
1384         Rename the length parameter to match the comment.
1385         (pretty_printer::~pretty_printer): Free the prefix.
1386         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1387         parameter.
1388         (struct pretty_printer): Drop the "const" from "prefix" field's
1389         type and clarify memory management.
1390         (pp_set_prefix): Drop the "const" from the 2nd param.
1391         (pp_take_prefix): New decl.
1393 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1395         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1396         for word_mode_ok here instead of passing as argument.
1397         (expand_block_compare): Change select_block_compare_mode() call.
1398         (expand_strncmp_gpr_sequence): New function.
1399         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1401 2018-08-02  Jeff Law  <law@redhat.com>
1403         PR target/86790
1404         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1405         Define to speculation_safe_value_not_needed.
1407         PR target/86784
1408         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1409         Define to speculation_safe_value_not_needed.
1411 2018-08-02  Tom de Vries  <tdevries@suse.de>
1413         PR target/86660
1414         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1415         function.  Return UI_TARGET unconditionally.
1416         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1417         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1419 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1421         * genemit.c (print_overload_test): Fix typo.
1423 2018-08-02  Richard Biener  <rguenther@suse.de>
1425         PR tree-optimization/86816
1426         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1427         which checks for value availability before querying it.
1428         (gvn_uses_equal): Use it.
1429         (same_succ_hash): Likewise.
1430         (gimple_equal_p): Likewise.
1432 2018-08-02  Nick Clifton  <nickc@redhat.com>
1434         PR target/86813
1435         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1436         Define to speculation_safe_value_not_needed.
1438         PR target/86810
1439         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1440         Define to speculation_safe_value_not_needed.
1442         PR target/86810
1443         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1444         Define to speculation_safe_value_not_needed.
1446         PR target/86803
1447         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1448         Define to speculation_safe_value_not_needed.
1450         PR target/86797
1451         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1452         Define to speculation_safe_value_not_needed.
1454         PR target/86791
1455         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1456         Define to speculation_safe_value_not_needed.
1458         PR target/86789
1459         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1460         Define to speculation_safe_value_not_needed.
1462         PR target/86787
1463         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1464         Define to speculation_safe_value_not_needed.
1466         PR target/86782
1467         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1468         speculation_safe_value_not_needed.
1470         PR target/86781
1471         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1472         to speculation_safe_value_not_needed.
1474 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1476         * doc/md.texi: Expand the documentation of instruction names
1477         to mention port-local uses.  Document '@' in pattern names.
1478         * read-md.h (overloaded_instance, overloaded_name): New structs.
1479         (mapping): Declare.
1480         (md_reader::handle_overloaded_name): New member function.
1481         (md_reader::get_overloads): Likewise.
1482         (md_reader::m_first_overload): New member variable.
1483         (md_reader::m_next_overload_ptr): Likewise.
1484         (md_reader::m_overloads_htab): Likewise.
1485         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1486         m_next_overload_ptr and m_overloads_htab.
1487         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1488         (get_mode_token, get_code_token, get_int_token): New functions.
1489         (map_attr_string): Add an optional argument that passes back
1490         the associated iterator.
1491         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1492         (md_reader::handle_overloaded_name, add_overload_instance): New
1493         functions.
1494         (apply_iterators): Handle '@' names.  Report an error if '@'
1495         is used without iterators.
1496         (initialize_iterators): Initialize the new iterator_group fields.
1497         * genopinit.c (handle_overloaded_code_for)
1498         (handle_overloaded_gen): New functions.
1499         (main): Use them to print declarations of maybe_code_for_* and
1500         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1501         * genemit.c (print_overload_arguments, print_overload_test)
1502         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1503         (main): Use it to print definitions of maybe_code_for_* and
1504         maybe_gen_* functions.
1505         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1506         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1507         instead of explicit mode checks.
1508         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1509         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1510         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1511         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1512         (aarch64_expand_compare_and_swap): Likewise
1513         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1514         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1515         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1516         (aarch64_constant_pool_reload_icode): Delete.
1517         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1518         instead of aarch64_constant_pool_reload_icode.  Use
1519         code_for_aarch64_reload_mov instead of explicit mode checks.
1520         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1521         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1522         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1523         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1524         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1525         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1526         (aarch64_atomic_load_op_code): Delete.
1527         (aarch64_emit_atomic_load_op): Likewise.
1528         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1529         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1530         instead of aarch64_emit_atomic_load_op.
1531         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1532         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1533         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1534         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1535         character before the pattern name.
1536         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1537         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1538         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1539         (aarch64_frecps<mode>): Likewise.
1540         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1541         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1542         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1543         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1544         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1546 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1548         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1549         Allow HFmode constants if TARGET_FP_F16INST.
1551 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1553         PR target/86014
1554         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1555         No longer check last store for clobber of address register.
1557 2018-08-02  Martin Liska  <mliska@suse.cz>
1559         PR gcov-profile/86817
1560         * gcov.c (process_all_functions): New function.
1561         (main): Call it.
1562         (process_file): Move functions processing to
1563         process_all_functions.
1565 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1567         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1568         "const" to the "gimple *" and "rtx_insn *" parameters.
1569         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1570         Likewise.
1571         (dump_location_t::dump_location_t): Likewise.
1573 2018-08-01  Martin Sebor  <msebor@redhat.com>
1575         PR tree-optimization/86650
1576         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1577         rather than a "gcall *".  Directly pass the data of interest
1578         to percent_K_format, rather than building a temporary CALL_EXPR
1579         to hold it.
1580         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1581         (gimple_fold_builtin_strncat): Adjust.
1582         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1583         gcall* argument with gimple*.
1584         * gimple-ssa-warn-restrict.c (check_call): Same.
1585         (wrestrict_dom_walker::before_dom_children): Same.
1586         (builtin_access::builtin_access): Same.
1587         (check_bounds_or_overlap): Same
1588         (maybe_diag_overlap): Same.
1589         (maybe_diag_offset_bounds): Same.
1590         * tree-diagnostic.c (default_tree_printer): Move usage of
1591         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1592         to this callsite.
1593         * tree-pretty-print.c (percent_K_format): Add argument.
1594         * tree-pretty-print.h: Add argument.
1595         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1596         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1597         (maybe_diag_stxncpy_trunc): Same.
1598         (handle_builtin_stxncpy): Same.
1599         (handle_builtin_strcat): Same.
1601 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1603         * match.pd: Optimise pointer range checks.
1605 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1607         PR tree-optimization/86758
1608         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1609         to remove pattern statements.
1611 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1613         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1614         result of dfs_enumerate_from when constructing stmt_vec_infos,
1615         instead of additionally calling get_loop_body.
1617 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1619         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1620         parameter.
1621         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1622         When creating an iv, assert that the step is not known to be zero.
1623         (vect_setup_realignment): Update call accordingly.
1624         * tree-vect-stmts.c (vectorizable_store): Likewise.
1625         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1627 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1629         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1630         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1631         (vectorizable_reduction): Likewise.
1632         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1633         (vect_detect_hybrid_slp_stmts): Likewise.
1634         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1636 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1638         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1639         (wide_int_set_zero_nonzero_bits): ...this.
1640         (zero_nonzero_bits_from_vr): Rename to...
1641         (vrp_set_zero_nonzero_bits): ...this.
1642         (extract_range_from_multiplicative_op_1): Abstract wide int
1643         code...
1644         (wide_int_range_multiplicative_op): ...here.
1645         (extract_range_from_binary_expr_1): Extract wide int binary
1646         operations into their own functions.
1647         (wide_int_range_lshift): New.
1648         (wide_int_range_can_optimize_bit_op): New.
1649         (wide_int_range_shift_undefined_p): New.
1650         (wide_int_range_bit_xor): New.
1651         (wide_int_range_bit_ior): New.
1652         (wide_int_range_bit_and): New.
1653         (wide_int_range_trunc_mod): New.
1654         (extract_range_into_wide_ints): New.
1655         (vrp_shift_undefined_p): New.
1656         (extract_range_from_multiplicative_op): New.
1657         (vrp_can_optimize_bit_op): New.
1658         * tree-vrp.h (value_range::dump): New.
1659         (wide_int_range_multiplicative_op): New.
1660         (wide_int_range_lshift):New.
1661         (wide_int_range_shift_undefined_p): New.
1662         (wide_int_range_bit_xor): New.
1663         (wide_int_range_bit_ior): New.
1664         (wide_int_range_bit_and): New.
1665         (wide_int_range_trunc_mod): New.
1666         (zero_nonzero_bits_from_bounds): Rename to...
1667         (wide_int_set_zero_nonzero_bits): ...this.
1668         (zero_nonzero_bits_from_vr): Rename to...
1669         (vrp_set_zero_nonzero_bits): ...this.
1670         (range_easy_mask_min_max): Rename to...
1671         (wide_int_range_can_optimize_bit_op): this.
1672         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1673         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1675 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1677         * tree-vectorizer.h (vect_orig_stmt): New function.
1678         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1679         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1680         (vect_create_epilog_for_reduction): Likewise.
1681         (vectorizable_live_operation): Likewise.
1682         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1683         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1684         * tree-vect-stmts.c (vectorizable_call): Likewise.
1685         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1687 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1689         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1690         argument.
1691         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1692         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1693         (vect_transform_loop): Likewise.
1694         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1696 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1698         * tree-vectorizer.h (vect_schedule_slp): Return void.
1699         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1700         (vect_schedule_slp): Likewise.
1702 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1704         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1705         argument.
1706         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1707         instances before the main loop, if any exist.
1709 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1711         PR tree-optimization/86749
1712         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1713         If the lhs is used in a COND_EXPR, check that it is being used
1714         as the "then" or "else" value.
1716 2018-08-01  Tom de Vries  <tdevries@suse.de>
1718         PR target/86800
1719         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1720         speculation_safe_value_not_needed.
1722 2018-08-01  Richard Biener  <rguenther@suse.de>
1724         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1725         as base and offset.
1727 2018-08-01  Martin Liska  <mliska@suse.cz>
1729         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1730         format how successful transformation is dumped.
1731         (gimple_mod_pow2_value_transform): Likewise.
1732         (gimple_mod_subtract_transform): Likewise.
1733         (gimple_stringops_transform): Likewise.
1735 2018-08-01  Martin Liska  <mliska@suse.cz>
1737         PR value-prof/35543
1738         * value-prof.c (interesting_stringop_to_profile_p):
1739         Simplify the code and add BUILT_IN_MEMMOVE.
1740         (gimple_stringops_transform): Likewise.
1742 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1744         * config/aarch64/aarch64-simd.md
1745         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1746         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1747         use GPI iterator instead of SI mode.
1749 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1751         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1752         rs6000_speculation_barrier.
1753         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1754         new barrier pattern name.
1756 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1758         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1759         (speculation_barrier): New insn.
1761 2018-08-01  Richard Biener  <rguenther@suse.de>
1763         PR bootstrap/86724
1764         * graphite.h: Include isl/id.h and isl/space.h to allow build
1765         with ISL 0.20.
1767 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1769         PR target/86651
1770         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1771         mode for COFF targets.
1772         * defaults.h (TARGET_COFF): Define.
1773         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1774         TARGET_COFF): Define.
1775         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1776         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1777         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1779 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1781         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1782         * gimple-streamer-out.c (output_bb): Save it.
1783         * lto-streamer-in.c (input_struct_function_base): Restore
1784         instance discriminator if available.  Create map on demand.
1785         * lto-streamer-out.c (output_struct_function_base): Save it if
1786         available.
1787         * final.c (decl_to_instance_map): Document LTO strategy.
1789 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1790             Olivier Hainque  <hainque@adacore.com>
1792         * debug.h (decl_to_instance_map_t): New type.
1793         (decl_to_instance_map): Declare.
1794         (maybe_create_decl_to_instance_map): New inline function.
1795         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1796         to track basic block discriminators.
1797         (final_start_function_1): Initialize them.
1798         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1799         bb_discriminator.
1800         (decl_to_instance_map): New variable.
1801         (map_decl_to_instance, maybe_set_discriminator): New functions.
1802         (notice_source_line): Set discriminator.
1804 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1806         * targhooks.c (default_have_speculation_safe_value): Add
1807         ATTRIBUTE_UNUSED.
1809 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1811         * dump-context.h: Include "pretty-print.h".
1812         (dump_context::refresh_dumps_are_enabled): New decl.
1813         (dump_context::emit_item): New decl.
1814         (class dump_context): Add fields "m_test_pp" and
1815         "m_test_pp_flags".
1816         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1817         (temp_dump_context::get_dumped_text): New decl.
1818         (class temp_dump_context): Add field "m_pp".
1819         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1820         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1821         m_test_pp.
1822         (set_dump_file): Update for above change.
1823         (set_alt_dump_file): Likewise.
1824         (dump_loc): New overload, taking a pretty_printer *.
1825         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1826         to any test pretty-printer.
1827         (make_item_for_dump_gimple_stmt): New function, adapted from
1828         optinfo::add_gimple_stmt.
1829         (dump_context::dump_gimple_stmt): Call it, and use the result,
1830         eliminating the direct usage of dump_file and alt_dump_file in
1831         favor of indirectly using them via emit_item.
1832         (make_item_for_dump_gimple_expr): New function, adapted from
1833         optinfo::add_gimple_expr.
1834         (dump_context::dump_gimple_expr): Call it, and use the result,
1835         eliminating the direct usage of dump_file and alt_dump_file in
1836         favor of indirectly using them via emit_item.
1837         (make_item_for_dump_generic_expr): New function, adapted from
1838         optinfo::add_tree.
1839         (dump_context::dump_generic_expr): Call it, and use the result,
1840         eliminating the direct usage of dump_file and alt_dump_file in
1841         favor of indirectly using them via emit_item.
1842         (make_item_for_dump_printf_va): New function, adapted from
1843         optinfo::add_printf_va.
1844         (make_item_for_dump_printf): New function.
1845         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1846         and use the result, eliminating the direct usage of dump_file and
1847         alt_dump_file in favor of indirectly using them via emit_item.
1848         (make_item_for_dump_dec): New function.
1849         (dump_context::dump_dec): Call it, and use the result,
1850         eliminating the direct usage of dump_file and alt_dump_file in
1851         favor of indirectly using them via emit_item.
1852         (make_item_for_dump_symtab_node): New function, adapted from
1853         optinfo::add_symtab_node.
1854         (dump_context::dump_symtab_node): Call it, and use the result,
1855         eliminating the direct usage of dump_file and alt_dump_file in
1856         favor of indirectly using them via emit_item.
1857         (dump_context::begin_scope): Reimplement, avoiding direct usage
1858         of dump_file and alt_dump_file in favor of indirectly using them
1859         via emit_item.
1860         (dump_context::emit_item): New member function.
1861         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1862         Set up test pretty-printer on the underlying context.  Call
1863         refresh_dumps_are_enabled.
1864         (temp_dump_context::~temp_dump_context): Call
1865         refresh_dumps_are_enabled.
1866         (temp_dump_context::get_dumped_text): New member function.
1867         (selftest::verify_dumped_text): New function.
1868         (ASSERT_DUMPED_TEXT_EQ): New macro.
1869         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1870         and then without optinfo enabled.  Add uses of
1871         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1872         * dumpfile.h: Update comment for the dump_* API.
1873         * optinfo-emit-json.cc
1874         (selftest::test_building_json_from_dump_calls): Update for new
1875         param for temp_dump_context ctor.
1876         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1877         and "m_owned" field.
1878         (optinfo_item::~optinfo_item): Likewise.
1879         (optinfo::add_item): New member function.
1880         (optinfo::emit): Update comment.
1881         (optinfo::add_string): Delete.
1882         (optinfo::add_printf): Delete.
1883         (optinfo::add_printf_va): Delete.
1884         (optinfo::add_gimple_stmt): Delete.
1885         (optinfo::add_gimple_expr): Delete.
1886         (optinfo::add_tree): Delete.
1887         (optinfo::add_symtab_node): Delete.
1888         (optinfo::add_dec): Delete.
1889         * optinfo.h (class dump_context): New forward decl.
1890         (optinfo::add_item): New decl.
1891         (optinfo::add_string): Delete.
1892         (optinfo::add_printf): Delete.
1893         (optinfo::add_printf_va): Delete.
1894         (optinfo::add_gimple_stmt): Delete.
1895         (optinfo::add_gimple_expr): Delete.
1896         (optinfo::add_tree): Delete.
1897         (optinfo::add_symtab_node): Delete.
1898         (optinfo::add_dec): Delete.
1899         (optinfo::add_poly_int): Delete.
1900         (optinfo_item::optinfo_item): Remove "owned" param.
1901         (class optinfo_item): Remove field "m_owned".
1903 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1905         PR middle-end/86705
1906         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1907         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1908         requested variable alignment.
1909         (expand_one_ssa_partition): Likewise.
1910         (expand_one_var): Likewise.
1912 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1914         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1915         to speculation_safe_value_not_needed.
1917 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1919         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1920         * targhooks.c (speculation_safe_value_not_needed): New function.
1921         * target.def (have_speculation_safe_value): Update documentation.
1922         * doc/tm.texi: Regenerated.
1924 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1926         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1927         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1928         expand.
1929         (despeculate_copy<ALLI:mode>_insn): New insn.
1930         (despeculate_copyti_insn): New insn.
1931         (despeculate_simple<ALLI:mode>): New insn
1932         (despeculate_simpleti): New insn.
1933         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1934         function.
1935         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1936         aarch64_speculation_safe_value.
1937         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1939 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1941         * config/aarch64/aarch64-speculation.cc: New file.
1942         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1943         before pass_reorder_blocks.
1944         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1945         prototype.
1946         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1947         X14 and X15 when tracking speculation.
1948         * config/aarch64/aarch64.md (register name constants): Add
1949         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1950         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1951         (speculation_barrier): New insn attribute.
1952         (cmp<mode>): Allow SP in comparisons.
1953         (speculation_tracker): New insn.
1954         (speculation_barrier): Add speculation_barrier attribute.
1955         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1956         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1957         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1959 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1961         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1962         aarch64_track_speculation is true.
1963         (tb<optab><mode>1): Likewise.
1964         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1965         generate CB[N]Z when tracking speculation.
1966         (aarch64_split_compare_and_swap): Likewise.
1967         (aarch64_split_atomic_op): Likewise.
1969 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1971         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1973 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1975         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1976         (speculation_barrier): New insn.
1978 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1980         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1981         * config/arm/arm.md (speculation_barrier): New expand.
1982         (speculation_barrier_insn): New pattern.
1984 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1986         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1987         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1988         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1989         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1990         list.
1991         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1992         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1993         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1994         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1995         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1996         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1997         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1998         * builtins.c (expand_speculation_safe_value): New function.
1999         (expand_builtin): Call it.
2000         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
2001         * doc/extend.texi: Document __builtin_speculation_safe_value.
2002         * doc/md.texi: Document "speculation_barrier" pattern.
2003         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
2004         TARGET_HAVE_SPECULATION_SAFE_VALUE.
2005         * doc/tm.texi: Regenerated.
2006         * target.def (have_speculation_safe_value, speculation_safe_value): New
2007         hooks.
2008         * targhooks.c (default_have_speculation_safe_value): New function.
2009         (default_speculation_safe_value): New function.
2010         * targhooks.h (default_have_speculation_safe_value): Add prototype.
2011         (default_speculation_safe_value): Add prototype.
2013 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
2015         * dump-context.h (dump_context::dump_loc): New decl.
2016         * dumpfile.c (dump_context::dump_loc): New member function.
2017         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
2018         and dump_gimple_stmt.
2019         (dump_context::dump_gimple_expr_loc): Likewise, using
2020         dump_gimple_expr.
2021         (dump_context::dump_generic_expr_loc): Likewise, using
2022         dump_generic_expr.
2023         (dump_context::dump_printf_loc_va): Likewise, using
2024         dump_printf_va.
2025         (dump_context::begin_scope): Explicitly using the global function
2026         "dump_loc", rather than the member function.
2028 2018-07-31  Martin Sebor  <msebor@redhat.com>
2030         PR tree-optimization/86741
2031         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2033 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
2035         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
2036         depend on whether prefetch instructions will be emitted or not.
2037         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
2038         will be emitted or not.
2039         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
2040         (TARGET_SETMEM_PFD): New macros.
2042 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2044         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
2045         (NULL_STMT_VEC_INFO): Delete.
2046         (stmt_vec_info::operator*): Likewise.
2047         (stmt_vec_info::operator gimple *): Likewise.
2048         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
2049         of NULL_STMT_VEC_INFO.
2050         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2051         (vect_reassociating_reduction_p): Likewise.
2052         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2053         (vectorizable_store): Likewise.
2054         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
2055         (vec_info::free_stmt_vec_infos): Likewise.
2057 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2059         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
2060         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2062 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2064         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
2065         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2066         (vec_info::free_stmt_vec_info): New private member functions.
2067         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
2068         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
2069         * tree-parloops.c (gather_scalar_reductions): Remove calls to
2070         set_stmt_vec_info_vec and free_stmt_vec_infos.
2071         * tree-vect-loop.c (_loop_vec_info): Remove call to
2072         set_stmt_vec_info_vec.
2073         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
2074         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
2075         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
2076         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
2077         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
2078         assignments in {vec_info::,}new_stmt_vec_info that are redundant
2079         with the clearing in the xcalloc.
2080         (stmt_vec_info_vec): Delete.
2081         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
2082         (vectorize_loops): Likewise.
2083         (vec_info::~vec_info): Remove argument from call to
2084         free_stmt_vec_infos.
2085         (vec_info::add_stmt): Remove vinfo argument from call to
2086         new_stmt_vec_info.
2088 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2090         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
2091         rather than a gimple stmt.
2092         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
2093         information for pattern statements when passed the original
2094         statement; instead wait to be passed the pattern statement itself.
2095         Don't call set_vinfo_for_stmt here.
2096         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
2097         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
2098         stmt_vec_infos here.
2099         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
2100         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
2101         stmt_vec_infos entry.
2103 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2105         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2106         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2107         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2108         * tree-vect-stmts.c (vectorizable_call): Likewise.
2109         (vectorizable_simd_clone_call): Likewise.
2111 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2113         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2114         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2115         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2116         * tree-vect-loop.c (vect_transform_loop): Likewise.
2117         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2118         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2122         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2123         (vect_dr_stmt): Delete.
2124         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2125         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2126         of DR_VECT_AUX.
2127         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2128         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2129         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2130         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2131         (vect_analyze_data_refs): Likewise.
2132         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2133         argument.
2134         (vect_find_same_alignment_drs): Likewise.
2135         (vect_slp_analyze_node_dependences): Update calls accordingly.
2136         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2137         instead of DR_VECT_AUX.
2138         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2139         of a vector data references.  Use vec_info::lookup_dr instead of
2140         DR_VECT_AUX.
2141         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2142         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2143         instead of DR_VECT_AUX.
2145 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2147         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2148         dr_vec_info.
2149         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2150         accordingly.
2151         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2152         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2153         (vect_gen_prolog_loop_niters): Likewise.
2155 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2157         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2158         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2159         (vect_known_alignment_in_bytes, vect_dr_behavior)
2160         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2161         instead of data_references.  Update calls to other routines for
2162         which the same change has been made.
2163         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2164         dr_vec_infos instead of stmt_vec_infos.
2165         (vect_analyze_data_ref_dependence): Update call accordingly.
2166         (vect_slp_analyze_data_ref_dependence)
2167         (vect_record_base_alignments): Use DR_VECT_AUX.
2168         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2169         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2170         (vector_alignment_reachable_p, vect_get_data_access_cost)
2171         (vect_peeling_supportable, vect_analyze_group_access_1)
2172         (vect_analyze_group_access, vect_analyze_data_ref_access)
2173         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2174         (vect_compile_time_alias, vect_small_gap_p)
2175         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2176         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2177         instead of data_references.  Update calls to other routines for
2178         which the same change has been made.
2179         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2180         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2181         (vect_slp_analyze_and_verify_node_alignment)
2182         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2183         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2184         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2185         above changes.
2186         (_vect_peel_info::dr): Replace with...
2187         (_vect_peel_info::dr_info): ...this new field.
2188         (vect_peeling_hash_get_most_frequent)
2189         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2190         (vect_peeling_hash_get_lowest_cost):
2191         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2192         routines for which the same change has been made.
2193         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2194         data_reference.
2195         * tree-vect-loop-manip.c (get_misalign_in_elems)
2196         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2197         above changes.
2198         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2199         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2200         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2201         (get_group_load_store_type, get_negative_load_store_type)
2202         (vect_get_data_ptr_increment, vectorizable_store)
2203         (vectorizable_load): Likewise.
2204         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2205         Update calls to other routines for which the same change has been made.
2207 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2209         * tree-vectorizer.h (vec_info::move_dr): New member function.
2210         (dataref_aux): Rename to...
2211         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2212         (_stmt_vec_info::dr_aux): Update accordingly.
2213         (_stmt_vec_info::data_ref_info): Delete.
2214         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2215         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2216         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2217         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2218         of data_ref.
2219         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2220         (STMT_VINFO_DR_INFO): New macro.
2221         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2222         (set_dr_misalignment): Update after rename of dataref_aux.
2223         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2224         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2225         initialization of STMT_VINFO_DATA_REF.
2226         * tree-vectorizer.c (vec_info::move_dr): New function.
2227         * tree-vect-patterns.c (vect_recog_bool_pattern)
2228         (vect_recog_mask_conversion_pattern)
2229         (vect_recog_gather_scatter_pattern): Use it.
2230         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2231         the "dr" and "stmt" fields of dr_vec_info instead of
2232         STMT_VINFO_DATA_REF.
2234 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2236         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2237         (is_pattern_stmt_p): Use it.
2238         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2239         on pattern statements.
2241 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2243         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2244         original stmt as a stmt_vec_info rather than a gimple stmt.
2245         (vect_pattern_recog_1): Take the statement directly as a
2246         stmt_vec_info, rather than via a gimple_stmt_iterator.
2247         Update call to vect_mark_pattern_stmts.
2248         (vect_pattern_recog): Update calls accordingly.
2250 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2252         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2253         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2254         a vect_def_type for the first argument.
2255         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2256         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2257         operand if it isn't defined by a vectorized statement.
2258         (vect_build_gather_load_calls): Remove the mask_dt argument and
2259         update calls to vect_get_vec_def_for_stmt_copy.
2260         (vectorizable_bswap): Likewise the dt argument.
2261         (vectorizable_call): Update calls to vectorizable_bswap and
2262         vect_get_vec_def_for_stmt_copy.
2263         (vectorizable_simd_clone_call, vectorizable_assignment)
2264         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2265         (vectorizable_comparison): Update calls to
2266         vect_get_vec_def_for_stmt_copy.
2267         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2268         vect_is_simple_use.
2269         (vect_get_loop_based_defs): Remove dt argument and update call
2270         to vect_get_vec_def_for_stmt_copy.
2271         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2272         and vect_get_vec_def_for_stmt_copy.
2273         (vectorizable_load): Update calls to vect_build_gather_load_calls
2274         and vect_get_vec_def_for_stmt_copy.
2275         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2276         (vectorizable_reduction, vectorizable_live_operation): Update calls
2277         to vect_get_vec_def_for_stmt_copy.
2279 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2281         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2282         and gimple stmt arguments with a stmt_vec_info.
2283         (vect_record_base_alignments): Update calls accordingly.
2284         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2285         and gimple stmt arguments with a stmt_vec_info.
2286         (vect_build_slp_tree_1): Remove vinfo argument and update call
2287         to vect_record_max_nunits.
2288         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2289         and vect_record_max_nunits.
2291 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2293         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2294         file and take a stmt_vec_info instead of a gimple stmt.
2295         (supportable_widening_operation, vect_finish_replace_stmt)
2296         (vect_finish_stmt_generation, vect_get_store_rhs)
2297         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2298         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2299         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2300         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2301         (vect_create_data_ref_ptr, bump_vector_ptr)
2302         (vect_permute_store_chain, vect_setup_realignment)
2303         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2304         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2305         (vectorizable_reduction, vectorizable_induction)
2306         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2307         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2308         than gimple stmts as arguments.
2309         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2310         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2311         (can_group_stmts_p, vect_check_gather_scatter)
2312         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2313         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2314         (vect_permute_load_chain, vect_shift_permute_load_chain)
2315         (vect_transform_grouped_load)
2316         (vect_record_grouped_load_vectors): Likewise.
2317         * tree-vect-loop.c (vect_fixup_reduc_chain)
2318         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2319         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2320         (vectorizable_reduction, vectorizable_induction)
2321         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2322         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2323         (vect_get_load_store_mask): Likewise.
2324         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2325         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2326         * tree-vect-stmts.c (vect_mark_relevant)
2327         (is_simple_and_all_uses_invariant)
2328         (exist_non_indexing_operands_for_use_p, process_use)
2329         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2330         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2331         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2332         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2333         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2334         (get_negative_load_store_type, get_load_store_type)
2335         (vect_check_load_store_mask, vect_check_store_rhs)
2336         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2337         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2338         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2339         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2340         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2341         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2342         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2343         (supportable_widening_operation): Likewise.
2345 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2347         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2348         a stmt_vec_info instead of a gcall.
2349         (vect_check_gather_scatter): Update call accordingly.
2350         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2351         of a gphi.
2352         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2353         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2354         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2355         instead of a gimple stmt.
2356         (vect_transform_loop): Update calls accordingly.
2357         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2358         stmt_vec_infos instead of gimple stmts.
2359         (vect_analyze_slp_instance): Update use accordingly.
2360         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2361         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2362         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2363         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2364         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2365         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2366         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2367         down to subroutines.
2369 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2371         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2372         of the worklist from a vector of gimple stmts to a vector of
2373         stmt_vec_infos.
2374         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2375         (vect_mark_stmts_to_be_vectorized): Likewise
2377 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2379         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2380         statement before passing it to vect_analyze_stmt.
2381         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2382         the chain of phi vector definitions.  Track the exit phi via its
2383         stmt_vec_info.
2384         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2385         STMT_VINFO_REDUC_DEF.
2386         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2387         stmt_vec_infos to handle the statement chains.
2388         (vect_get_slp_defs): Record the first statement in the node
2389         using a stmt_vec_info.
2390         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2391         statements here and pass their stmt_vec_info down to subroutines.
2392         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2393         down to vect_finish_stmt_generation.
2394         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2395         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2396         stmt_vec_infos to subroutines.
2397         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2398         chains.
2400 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2402         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2403         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2404         (vect_permute_store_chain, vect_setup_realignment)
2405         (vect_permute_load_chain, vect_shift_permute_load_chain)
2406         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2407         stmts internally, and when passing values to other vectorizer routines.
2408         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2409         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2410         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2411         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2412         (vectorizable_reduction, vectorizable_induction)
2413         (vectorizable_live_operation, vect_transform_loop_stmt)
2414         (vect_transform_loop): Likewise.
2415         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2416         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2417         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2418         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2419         (vect_slp_analyze_node_operations_1): Likewise.
2420         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2421         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2422         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2423         (vect_finish_stmt_generation_1, get_group_load_store_type)
2424         (get_load_store_type, vect_build_gather_load_calls)
2425         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2426         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2427         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2428         (vectorizable_store, vectorizable_load, vectorizable_condition)
2429         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2430         (supportable_widening_operation): Likewise.
2431         (vect_get_vector_types_for_stmt): Likewise.
2432         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2434 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2436         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2437         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2438         (vect_permute_store_chain, vect_permute_load_chain)
2439         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2440         repeated stmt_vec_info lookups.
2441         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2442         (vect_update_ivs_after_vectorizer): Likewise.
2443         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2444         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2445         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2446         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2447         (vect_bb_slp_scalar_cost): Likewise.
2448         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2450 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2452         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2453         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2454         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2455         to get gassigns and gcalls, rather than operating on generc gimple
2456         stmts.
2457         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2458         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2459         (vectorizable_load, vect_analyze_stmt): Likewise.
2460         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2462 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2464         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2465         return stmt_vec_infos rather than gimple stmts.  Do not accept
2466         null arguments.
2467         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2468         of a gimple stmt.
2469         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2470         Update use of get_later_stmt.
2471         (vect_get_constant_vectors): Update call accordingly.
2472         (vect_schedule_slp_instance): Likewise
2473         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2474         (vect_slp_analyze_instance_dependence): Likewise.
2475         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2477 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2479         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2480         (stmt_info_for_cost::stmt_info): ...this new field.
2481         (add_stmt_costs): Update accordingly.
2482         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2483         (vect_get_known_peeling_cost): Likewise.
2484         (vect_estimate_min_profitable_iters): Likewise.
2485         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2487 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2489         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2490         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2491         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2492         accordingly.
2493         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2497         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2498         a gimple stmt to a stmt_vec_info.
2499         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2501 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2503         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2504         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2505         (_loop_vec_info::reduction_chains): Likewise.
2506         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2507         accordingly.
2508         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2510 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2512         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2513         a gimple stmt to a stmt_vec_info.
2514         (_stmt_vec_info::next_element): Likewise.
2515         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2516         (vect_slp_analyze_and_verify_node_alignment)
2517         (vect_analyze_group_access_1, vect_analyze_group_access)
2518         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2519         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2520         (vect_supportable_dr_alignment): Update accordingly.
2521         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2522         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2523         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2524         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2525         * tree-vect-slp.c (vect_build_slp_tree_1)
2526         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2527         (vect_split_slp_store_group, vect_analyze_slp_instance)
2528         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2529         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2530         (get_group_load_store_type, get_load_store_type)
2531         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2532         (vect_transform_stmt, vect_remove_stores): Likewise.
2534 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2536         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2537         than a gimple stmt.
2538         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2539         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2540         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2541         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2542         (vector_alignment_reachable_p, vect_get_data_access_cost)
2543         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2544         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2545         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2546         (vect_analyze_group_access_1, vect_analyze_group_access)
2547         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2548         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2549         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2550         result of vect_dr_stmt and use the stmt_vec_info instead of
2551         the associated gimple stmt.
2552         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2553         (vect_gen_prolog_loop_niters): Likewise.
2554         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2556 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2558         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2559         to a vec<stmt_vec_info>.
2560         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2561         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2562         vec<stmt_vec_info>.
2563         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2564         to a vec<stmt_vec_info>.
2565         (bst_traits::value_type, bst_traits::value_type): Likewise.
2566         (bst_traits::hash): Update accordingly.
2567         (vect_get_and_check_slp_defs): Change the stmts parameter from
2568         a vec<gimple *> to a vec<stmt_vec_info>.
2569         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2570         (vect_build_slp_tree): Likewise.
2571         (vect_build_slp_tree_2): Likewise.  Update uses of
2572         SLP_TREE_SCALAR_STMTS.
2573         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2574         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2575         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2576         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2577         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2578         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2579         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2580         (vect_get_constant_vectors, vect_get_slp_defs)
2581         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2582         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2583         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2584         instead of gimple stmts.
2585         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2586         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2587         (vect_slp_analyze_instance_dependence): Update uses of
2588         SLP_TREE_SCALAR_STMTS.
2589         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2590         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2591         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2592         (get_initial_defs_for_reduction): Likewise.
2593         (vect_create_epilog_for_reduction): Likewise.
2594         (vectorize_fold_left_reduction): Likewise.
2595         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2596         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2597         (can_vectorize_live_stmts): Likewise.
2599 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2601         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2602         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2603         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2604         than gimple stmts.
2605         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2606         of a gimple stmt.
2607         (gather_scalar_reductions): Update after above interface changes.
2608         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2609         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2610         than gimple stmts.
2611         (vect_force_simple_reduction): Likewise.
2612         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2613         LOOP_VINFO_REDUCTIONS.
2614         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2616 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2618         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2619         a gimple stmt to a stmt_vec_info.
2620         * tree-vect-loop.c (vect_active_double_reduction_p)
2621         (vect_force_simple_reduction, vectorizable_reduction): Update
2622         accordingly.
2624 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2626         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2627         vec<gimple *> to a vec<stmt_vec_info>.
2628         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2629         the reduction_phis argument from a vec<gimple *> to a
2630         vec<stmt_vec_info>.
2631         (vectorizable_reduction): Likewise the phis local variable that
2632         is passed to vect_create_epilog_for_reduction.  Update for new type
2633         of SLP_TREE_VEC_STMTS.
2634         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2635         (vectorizable_live_operation): Likewise.
2636         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2637         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2639 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2641         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2642         a gimple stmt to a stmt_vec_info.
2643         (vectorizable_condition, vectorizable_live_operation)
2644         (vectorizable_reduction, vectorizable_induction): Pass back the
2645         vectorized statement as a stmt_vec_info.
2646         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2647         use of STMT_VINFO_VEC_STMT.
2648         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2649         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2650         as stmt_vec_infos rather than gimple stmts.
2651         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2652         to a stmt_vec_info.
2653         (vectorizable_live_operation): Likewise.
2654         (vectorizable_reduction, vectorizable_induction): Likewise,
2655         updating use of STMT_VINFO_VEC_STMT.
2656         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2657         of STMT_VINFO_VEC_STMT.
2658         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2659         (vectorizable_simd_clone_call, vectorizable_conversion)
2660         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2661         (vectorizable_store, vectorizable_load, vectorizable_condition)
2662         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2663         from a gimple stmt to a stmt_vec_info.
2664         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2665         pointer to a stmt_vec_info to the vectorizable_* routines.
2667 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2669         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2670         a gimple stmt to a stmt_vec_info.
2671         (is_pattern_stmt_p): Update accordingly.
2672         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2673         (vect_record_grouped_load_vectors): Likewise.
2674         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2675         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2676         (vect_model_reduction_cost): Likewise.
2677         (vect_create_epilog_for_reduction): Likewise.
2678         (vectorizable_reduction, vectorizable_induction): Likewise.
2679         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2680         Return the stmt_vec_info for the pattern statement.
2681         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2682         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2683         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2684         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2685         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2686         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2687         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2688         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2690 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2692         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2693         (vect_finish_stmt_generation): Likewise.
2694         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2695         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2696         (vect_build_gather_load_calls): Use the return value of the above
2697         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2698         scopes for the input gimple stmt and wider scopes for the associated
2699         stmt_vec_info.  Use vec_info::lookup_def when setting these
2700         stmt_vec_infos from an SSA_NAME definition.
2701         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2702         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2703         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2704         (vectorizable_store, vectorizable_load, vectorizable_condition)
2705         (vectorizable_comparison): Likewise.
2706         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2707         (vectorizable_reduction): Likewise.
2709 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2711         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2712         stmt_vec_info * parameter before the optional gimple **.
2713         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2714         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2715         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2716         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2717         (vectorizable_live_operation): Likewise.
2718         * tree-vect-patterns.c (type_conversion_p): Likewise.
2719         (vect_look_through_possible_promotion): Likewise.
2720         (vect_recog_rotate_pattern): Likewise.
2721         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2723 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2725         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2726         a typedef to a wrapper class.
2727         (NULL_STMT_VEC_INFO): New macro.
2728         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2729         (stmt_vec_info::operator*): New function.
2730         (stmt_vec_info::operator gimple *): Likewise.
2731         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2732         (add_stmt_costs): Likewise.
2733         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2734         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2735         (vect_get_known_peeling_cost): Likewise.
2736         (vect_estimate_min_profitable_iters): Likewise.
2737         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2738         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2739         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2740         (vectorizable_store, free_stmt_vec_infos): Likewise.
2741         (new_stmt_vec_info): Change return type of xcalloc to
2742         _stmt_vec_info *.
2744 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2746         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2747         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2748         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2749         a single_imm_use-based sequence.
2750         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2752 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2754         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2755         * tree-vectorizer.c (vec_info::lookup_def): New function.
2756         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2757         (vect_widened_op_tree): Likewise.
2758         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2759         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2760         (vectorizable_reduction): Likewise.
2761         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2762         of a gimple *.
2763         (vect_is_slp_reduction): Update calls accordingly.  Use
2764         vec_info::lookup_def.
2765         (vect_is_simple_reduction): Likewise
2766         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2770         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2771         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2772         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2773         of vinfo_for_stmt.
2774         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2775         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2776         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2777         (vect_is_slp_reduction, vectorizable_induction)
2778         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2779         * tree-vect-patterns.c (vect_init_pattern_stmt):
2780         (vect_determine_min_output_precision_1, vect_determine_precisions)
2781         (vect_pattern_recog): Likewise.
2782         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2783         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2784         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2785         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2786         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2787         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2788         info field from a loop to a loop_vec_info.
2790 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2792         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2793         (vec_info::add_stmt): Declare.
2794         * tree-vectorizer.c (vec_info::add_stmt): New function.
2795         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2796         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2797         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2798         (vectorizable_induction): Likewise.
2799         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2800         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2801         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2802         (vectorizable_load): Likewise.
2803         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2804         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2805         (vect_recog_gather_scatter_pattern): Likewise.
2806         (append_pattern_def_seq): Likewise.  Remove a check that is
2807         performed by add_stmt itself.
2809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2811         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2812         which make_ssa_name was called with new_stmt before new_stmt
2813         had been created.
2815 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2817         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2818         split out from...
2819         (vect_is_slp_reduction): ...here...
2820         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2821         that are already known to be false.
2823 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2825         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2826         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2827         STMT_VINFO_NUM_SLP_USES when it's true.
2828         (vect_free_slp_instance): Add a final_p parameter and pass it to
2829         vect_free_slp_tree.
2830         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2831         (vect_analyze_slp_instance): Likewise.
2832         (vect_slp_analyze_operations): Likewise.
2833         (vect_slp_analyze_bb_1): Likewise.
2834         * tree-vectorizer.c (vec_info): Likewise.
2835         * tree-vect-loop.c (vect_transform_loop): Likewise.
2837 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2839         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2840         function is not called for second and subsequent members of
2841         a reduction group.
2843 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2845         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2846         cases for nested loops from here to ...
2847         (vect_create_epilog_for_reduction): ...here.  Only call
2848         vect_is_simple_use for inner-loop reductions.
2850 2018-07-31  Martin Liska  <mliska@suse.cz>
2852         PR gcov-profile/85338
2853         PR gcov-profile/85350
2854         PR gcov-profile/85372
2855         * profile.c (struct location_triplet): New.
2856         (struct location_triplet_hash): Likewise.
2857         (output_location): Do not output a BB that
2858         is already recorded for a line.
2859         (branch_prob): Use streamed_locations.
2861 2018-07-31  Martin Liska  <mliska@suse.cz>
2863         PR gcov-profile/85370
2864         * coverage.c (coverage_begin_function): Do not mark target
2865         clones as artificial functions.
2867 2018-07-31  Martin Liska  <mliska@suse.cz>
2869         PR gcov-profile/83813
2870         PR gcov-profile/84758
2871         PR gcov-profile/85217
2872         PR gcov-profile/85332
2873         * profile.c (branch_prob): Do not record GOTO expressions
2874         for GIMPLE statements which locations are already streamed.
2876 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2878         * gcc.c (handle_spec_function): Accept a soft_matched_part
2879         argument, as do_spec_1.  Pass it down to ...
2880         (eval_spec_function): Accept a soft_matched_part argument,
2881         and pass it down to ...
2882         (do_spec_2): Accept a soft_matched_part argument, and pass
2883         it down to do_spec_1.
2884         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2885         (handle_braces): Update call to handle_spec_function.
2886         (driver::set_up_specs): Update calls to do_spec_2.
2887         (compare_debug_dump_opt_spec_function): Likewise.
2888         (compare_debug_self_opt_spec_function): Likewise.
2890 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2892         * common.opt (nolibc): New option.
2893         * doc/invoke.texi (Link Options): Document it.
2894         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2895         * config/alpha/linux.h: Likewise.
2896         * config/arc/elf.h: Likewise.
2897         * config/arm/uclinux-elf.h: Likewise.
2898         * config/arm/unknown-elf.h: Likewise.
2899         * config/avr/avrlibc.h: Likewise.
2900         * config/bfin/bfin.h: Likewise.
2901         * config/bfin/linux.h: Likewise.
2902         * config/bfin/uclinux.h: Likewise.
2903         * config/darwin.h: Likewise.
2904         * config/darwin10.h: Likewise.
2905         * config/darwin12.h: Likewise.
2906         * config/gnu-user.h: Likewise.
2907         * config/lm32/uclinux-elf.h: Likewise.
2908         * config/pa/pa-hpux11.h: Likewise.
2909         * config/pa/pa64-hpux.h: Likewise.
2910         * config/sparc/sparc.h: Likewise.
2912 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2914         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2915         undefined variables.
2917 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2919         PR target/86640
2920         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2921         instead of GEN_INT.
2923 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2925         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2926         terminated string literal.
2928 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2930         PR rtl-optimization/85160
2931         * combine.c (is_just_move): New function.
2932         (try_combine): Allow combining two instructions into two if neither of
2933         the original instructions was a move.
2935 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2937         PR target/86673
2938         * doc/extend.texi (Global Register Variables): Discourage use of type
2939         qualifiers.
2940         (Local Register Variables): Likewise.
2942 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2944         PR tree-optimization/86506
2945         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2947 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2949         PR target/86547
2950         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2951         hard_regno, make sure no insn between `from` and `to` clobbers it.
2953 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2954             Tom de Vries  <tdevries@suse.de>
2956         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2957         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2958         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2959         PTX_DEFAULT_RUNTIME_DIM.
2960         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2962 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2964         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2965         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2966         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2968 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2970         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2971         used.
2972         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2973         predicate to reflect toc fusion has been deleted.
2974         (toc_fusion_mem_raw): Delete, no longer used.
2975         (toc_fusion_mem_wrapped): Likewise.
2976         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2977         fusion mask bit.
2978         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2979         Delete, no longer used.
2980         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2981         meant to be used for toc fusion.
2982         (rs6000_debug_print_mode): Delete toc fusion debugging.
2983         (rs6000_debug_reg_global): Likewise.
2984         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2985         fusion and secondary reload support that were never used.
2986         (rs6000_option_override_internal): Delete TOC fusion, that was only
2987         partially defined, and it did not work unless you also used the
2988         -mcmodel= switch.
2989         (rs6000_legitimate_address_p): Delete TOC fusion support.
2990         (rs6000_opt_masks): Likewise.
2991         (fusion_wrap_memory_address): Delete function, no longer used.
2992         (fusion_split_address); Delete TOC fusion support.
2993         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2994         longer used with toc fusion being deleted.
2995         (TARGET_TOC_FUSION_FP): Likewise.
2996         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2997         UNSPEC.
2998         (toc fusion spliter): Delete TOC fusion support.
2999         (toc_fusionload_<mode>): Likewise.
3000         (toc_fusionload_di): Likewise.
3001         (fusion_gpr_load_<mode>): Delete generator function, this insn no
3002         longer needs to be named.  Rename predicate to delete TOC fusion.
3003         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3004         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3005         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
3006         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
3007         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
3009 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3011         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
3012         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
3013         __int128 in built-in function prototypes.
3014         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
3015         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
3017 2018-07-27  Martin Sebor  <msebor@redhat.com>
3019         PR tree-optimization/86696
3020         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
3021         types, including enums.
3022         (handle_char_store): Be prepared for the above function to fail.
3024 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
3026         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
3027         when optimization level is lower than 2 or optimize for size.
3029 2018-07-26  Martin Sebor  <msebor@redhat.com>
3031         PR tree-optimization/86043
3032         PR tree-optimization/86042
3033         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
3034         (get_string_cst_length): Rename...
3035         (get_min_string_length): ...to this.  Add argument.
3036         (handle_char_store): Extend to handle multi-character stores by
3037         MEM_REF.
3038         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
3039         * tree.h (initializer_zerop): Add argument.
3041 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
3043         PR middle-end/86660
3044         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3045         declare target to variables if they have always,{to,from,tofrom} map
3046         kinds.
3048 2018-07-26  Martin Liska  <mliska@suse.cz>
3050         PR lto/86548
3051         * lto-wrapper.c: Add linker_output as prefix
3052         for ltrans_output_file.
3054 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
3056         PR rtl-optimization/85805
3057         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
3058         value for hard registers if that was written in the same mode.
3060 2018-07-26  Martin Liska  <mliska@suse.cz>
3062         PR gcov-profile/86536
3063         * gcov.c (format_gcov): Use printf format %.*f directly
3064         and do not handle special values.
3066 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3068         * common/config/arc/arc-common.c (arc_option_optimization_table):
3069         Update default optimizations for size.
3071 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3073         * config/arc/arc.md (movsf_insn): Add short instruction selection.
3074         * config/arc/constraints.md (CfZ): New constraint.
3075         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
3076         (subsf3_fpu): Likewise.
3077         (cmpsf_fpu): Likewise.
3078         (cmpsf_fpu_uneq): Likewise.
3080 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3082         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
3083         accesses as well.
3084         (arc_is_uncached_mem_p): uncached applies to both the variable and
3085         the pointer.
3087 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
3089         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
3090         register names.
3092 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
3094         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
3095         field "m_scopes" from vec to auto_vec.
3097 2018-07-25  Martin Liska  <mliska@suse.cz>
3099         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
3100         return type.
3102 2018-07-25  Richard Biener  <rguenther@suse.de>
3104         PR debug/86654
3105         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3106         special wrt context_die late.
3107         (gen_subprogram_die): Re-use DIEs in local scope.
3109 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3111         PR tree-optimization/86644
3112         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3114 2018-07-25  Martin Liska  <mliska@suse.cz>
3116         PR middle-end/86645
3117         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3118         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3120 2018-07-25  Martin Liska  <mliska@suse.cz>
3122         PR sanitizer/79635
3123         * params.def: Explain ASan abbreviation and provide
3124         a documentation link.
3126 2018-07-24  Martin Sebor  <msebor@redhat.com>
3128         PR tree-optimization/86622
3129         PR tree-optimization/86532
3130         * builtins.h (string_length): Declare.
3131         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3132         (check_access): Be prepared for non-constant length ranges.
3133         (string_length): Make extern.
3134         * expr.c (string_constant): Only handle the minor non-constant
3135         array index.  Use string_constant to compute the length of
3136         a generic string constant.
3138 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3140         PR tree-optimization/86618
3141         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3142         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3144 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3146         PR tree-optimization/86636
3147         * json.cc (json::object::set): Fix comment.  Add assertions.
3148         (json::array::append): Move here from json.h.  Add comment and an
3149         assertion.
3150         (json::string::string): Likewise.
3151         * json.h (json::array::append): Move to json.cc.
3152         (json::string::string): Likewise.
3153         * optinfo-emit-json.cc
3154         (optrecord_json_writer::impl_location_to_json): Assert that we
3155         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3156         wrapper around it.  Expand the location once, rather than three
3157         times.
3158         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3159         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3160         wrappers.
3161         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3162         places.  Fix some overlong lines.
3164 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3166         * config/aarch64/aarch64-simd.md
3167         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3168         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3169         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3170         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3171         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3172         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3173         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3174         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3175         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3177 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3179         PR middle-end/86627
3180         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3181         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3182         and abs_d == d, do the power of two handling if profitable.
3184 2018-07-24  Richard Biener  <rguenther@suse.de>
3186         * match.pd: Add BIT_FIELD_REF canonicalizations.
3188 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3190         PR c/86617
3191         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3193 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3195         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3196         terminated STRING_CST object.
3198 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3200         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3202 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3204         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3205         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3206         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3207         the elements into a register.
3208         (rs6000_split_v4si_init_di_reg): Delete.
3209         (rs6000_split_v4si_init): Delete.
3210         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3211         (vsx_init_v4si): Rewrite as a define_expand.
3213 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3215         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3216         zero_extend argument from memory): New.
3218 2018-07-22  Martin Sebor  <msebor@redhat.com>
3220         PR bootstrap/86621
3221         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3222         diagnosing calls with unknown arguments unless -Walloca-larger-than
3223         is restricted to less than PTRDIFF_MAX bytes.
3225 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3227         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3229 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3231         * pretty-print.c (text_info::set_location): Remove redundant
3232         "line_table" parameter from call to rich_location::set_range.
3234 2018-07-20  Martin Sebor  <msebor@redhat.com>
3236         PR middle-end/82063
3237         * builtins.c (expand_builtin_alloca): Adjust.
3238         * calls.c (alloc_max_size): Simplify.
3239         * cgraphunit.c (cgraph_node::expand): Adjust.
3240         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3241         variables.
3242         (frame_larger_than_size): Same.
3243         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3244         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3245         Initialize.
3246         * doc/invoke.texi (GCC Command Options): Document option arguments.
3247         Explain byte-size arguments and suffixes.
3248         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3249         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3250         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3251         * doc/options.texi (UInteger): Expand.
3252         (Host_Wide_Int, ByteSize): Document new properties.
3253         * final.c (final_start_function_1): Include sizes in an error message.
3254         * function.c (frame_offset_overflow): Same.
3255         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3256         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3257         Diagnose unbounded alloca calls only for limits of less than
3258         PTRDIFF_MAX.
3259         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3260         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3261         for alloca(0).
3262         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3263         only for limits of less than PTRDIFF_MAX.
3264         * langhooks-def.h (lhd_handle_option): Change function argument
3265         to HOST_WIDE_INT.
3266         * langhooks.c (lhd_handle_option): Same.
3267         * langhooks.h (handle_option): Same.
3268         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3269         ByteSize flags.
3270         (var_type, var_type_struct): Same.
3271         (var_set): Handle ByteSize flag.
3272         * optc-gen.awk: Add comments to output to ease debugging.  Make
3273         use of HOST_WIDE_INT where appropriate.
3274         * opts-gen-save.awk:  Use %lx to format unsigned long.
3275         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3276         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3277         arguments.  Parse bytes-size suffixes.
3278         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3279         (enum_value_to_arg): Same.
3280         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3281         (handle_option): Adjust.
3282         (generate_option): Change function argument to HOST_WIDE_INT.
3283         (cmdline_handle_error): Adjust.
3284         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3285         (set_option): Change function argument to HOST_WIDE_INT.
3286         (option_enabled): Handle cl_host_wide_int.
3287         (get_option_state): Handle CLVC_SIZE.
3288         (control_warning_option): Same.
3289         * opts.c (common_handle_option): Change function argument to
3290         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3291         OPT_Wvla_larger_than_.
3292         * opts.h (enum cl_var_type): Add an enumerator.
3293         * stor-layout.c (layout_decl): Print a more meaningful warning.
3294         * toplev.c (output_stack_usage): Adjust.
3296 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3298         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3299         call to inline_expand_builtin_string_cmp.
3300         (expand_builtin_strcmp): Likewise.
3301         (expand_builtin_strncmp): Likewise.
3302         (inline_string_cmp): Delete the last parameter, change char_type_node
3303         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3304         two operands.
3305         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3306         the inlining expansion on target where the type of the call has same or
3307         narrower precision than unsigned char.
3309 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3311         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3312         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3313         * common.opt (fsave-optimization-record): New option.
3314         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3315         * doc/invoke.texi (-fsave-optimization-record): New option.
3316         * dumpfile.c: Include "optinfo-emit-json.h".
3317         (struct kv_pair): Move to coretypes.h.
3318         (optgroup_options): Make non-static.
3319         (dump_context::end_scope): Call
3320         optimization_records_maybe_pop_dump_scope.
3321         * dumpfile.h (optgroup_options): New decl.
3322         * json.cc: New file.
3323         * json.h: New file.
3324         * optinfo-emit-json.cc: New file.
3325         * optinfo-emit-json.h: New file.
3326         * optinfo.cc: Include "optinfo-emit-json.h".
3327         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3328         (optinfo_enabled_p): Check optimization_records_enabled_p.
3329         (optinfo_wants_inlining_info_p): Likewise.
3330         * optinfo.h: Update comment.
3331         * profile-count.c (profile_quality_as_string): New function.
3332         * profile-count.h (profile_quality_as_string): New decl.
3333         (profile_count::quality): New accessor.
3334         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3335         and optinfo_emit_json_cc_tests.
3336         * selftest.h (selftest::json_cc_tests): New decl.
3337         (selftest::optinfo_emit_json_cc_tests): New decl.
3338         * toplev.c: Include "optinfo-emit-json.h".
3339         (compile_file): Call optimization_records_finish.
3340         (do_compile): Call optimization_records_start.
3341         * tree-ssa-live.c: Include optinfo.h.
3342         (remove_unused_scope_block_p): Retain inlining information if
3343         optinfo_wants_inlining_info_p returns true.
3345 2018-07-20  Richard Biener  <rguenther@suse.de>
3347         PR debug/86585
3348         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3349         to cover -flto-partition=none.
3351 2018-07-20  Martin Liska  <mliska@suse.cz>
3353         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3354         (get_decl_source_range): Remove unused function.
3356 2018-07-20  Richard Biener  <rguenther@suse.de>
3358         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3359         (struct vn_phi_s): Likewise.
3360         (struct vn_reference_s): Likewise.
3361         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3362         for searching the slot of an entry known to be in the hash itself.
3363         (vn_phi_hasher::equal): Likewise.
3364         (vn_reference_hasher::equal): Likewise.
3365         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3366         globals.
3367         (optimistic_info, current_info): Remove, keeping only valid_info.
3368         (vn_reference_lookup_1): Remove fallback lookup.
3369         (vn_reference_lookup_2): Likewise.
3370         (vn_nary_op_lookup_1): Likewise.
3371         (vn_phi_lookup): Likewise.
3372         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3373         hash element.
3374         (vn_reference_insert): Adjust, chain the inserted hash element
3375         at last_inserted_ref.
3376         (vn_reference_insert_pieces): Likewise.
3377         (visit_reference_op_call): Likewise.
3378         (vn_nary_op_insert_into): Chain the inserted hash element at
3379         last_inserted_nary.
3380         (vn_nary_op_insert_pieces): Adjust.
3381         (vn_nary_op_insert): Likewise.
3382         (vn_nary_op_insert_stmt): Likewise.
3383         (vn_phi_insert): Adjust, chain the inserted hash element at
3384         last_inserted_phi.
3385         (process_scc): Remove clearing and copying the optimistic
3386         table.  Instead remove elements inserted during an optimistic
3387         iteration from the single table we maintain.
3388         (init_scc_vn): Adjust.
3389         (free_scc_vn): Likewise.
3390         (sccvn_dom_walker::record_cond): Likewise.
3391         (sccvn_dom_walker::after_dom_children): Likewise.
3393 2018-07-19  Martin Sebor  <msebor@redhat.com>
3395         PR tree-optimization/84047
3396         PR tree-optimization/83776
3397         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3398         (check_array_bounds): Call it.
3400 2018-07-19  Martin Sebor  <msebor@redhat.com>
3402         * align.h (align_flags): Use member initialization.
3404 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3406         * Makefile.in (OBJS): Add optinfo.o.
3407         * coretypes.h (class symtab_node): New forward decl.
3408         (struct cgraph_node): New forward decl.
3409         (class varpool_node): New forward decl.
3410         * dump-context.h: New file.
3411         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3412         "tree-pass.h".
3413         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3414         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3415         (set_alt_dump_file): Likewise.
3416         (dump_context::~dump_context): New dtor.
3417         (dump_gimple_stmt): Move implementation to...
3418         (dump_context::dump_gimple_stmt): ...this new member function.
3419         Add the stmt to any pending optinfo, creating one if need be.
3420         (dump_gimple_stmt_loc): Move implementation to...
3421         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3422         Start a new optinfo and add the stmt to it.
3423         (dump_gimple_expr): Move implementation to...
3424         (dump_context::dump_gimple_expr): ...this new member function.
3425         Add the stmt to any pending optinfo, creating one if need be.
3426         (dump_gimple_expr_loc): Move implementation to...
3427         (dump_context::dump_gimple_expr_loc): ...this new member function.
3428         Start a new optinfo and add the stmt to it.
3429         (dump_generic_expr): Move implementation to...
3430         (dump_context::dump_generic_expr): ...this new member function.
3431         Add the tree to any pending optinfo, creating one if need be.
3432         (dump_generic_expr_loc): Move implementation to...
3433         (dump_context::dump_generic_expr_loc): ...this new member
3434         function.  Add the tree to any pending optinfo, creating one if
3435         need be.
3436         (dump_printf): Move implementation to...
3437         (dump_context::dump_printf_va): ...this new member function.  Add
3438         the text to any pending optinfo, creating one if need be.
3439         (dump_printf_loc): Move implementation to...
3440         (dump_context::dump_printf_loc_va): ...this new member function.
3441         Start a new optinfo and add the stmt to it.
3442         (dump_dec): Move implementation to...
3443         (dump_context::dump_dec): ...this new member function.  Add the
3444         value to any pending optinfo, creating one if need be.
3445         (dump_context::dump_symtab_node): New member function.
3446         (dump_context::get_scope_depth): New member function.
3447         (dump_context::begin_scope): New member function.
3448         (dump_context::end_scope): New member function.
3449         (dump_context::ensure_pending_optinfo): New member function.
3450         (dump_context::begin_next_optinfo): New member function.
3451         (dump_context::end_any_optinfo): New member function.
3452         (dump_context::s_current): New global.
3453         (dump_context::s_default): New global.
3454         (dump_scope_depth): Delete global.
3455         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3456         (dump_symtab_node): New function.
3457         (get_dump_scope_depth): Reimplement in terms of dump_context.
3458         (dump_begin_scope): Likewise.
3459         (dump_end_scope): Likewise.
3460         (selftest::temp_dump_context::temp_dump_context): New ctor.
3461         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3462         (selftest::verify_item): New function.
3463         (ASSERT_IS_TEXT): New macro.
3464         (ASSERT_IS_TREE): New macro.
3465         (ASSERT_IS_GIMPLE): New macro.
3466         (selftest::test_capture_of_dump_calls): New test.
3467         (selftest::dumpfile_c_tests): Call it.
3468         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3469         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3470         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3471         descriptive comment.
3472         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3473         (dump_node, dump_bb): Move these unrelated decls.
3474         (class dump_manager): Add leading comment.
3475         * optinfo.cc: New file.
3476         * optinfo.h: New file.
3478 2018-07-19  Michael Collison  <michael.collison@arm.com>
3479             Richard Henderson <rth@redhat.com>
3481         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3482         (subti): Handle op1 zero.
3483         (subvti4, usub4ti4): New.
3484         (*sub<GPI>3_compare1_imm): New.
3485         (sub<GPI>3_carryinCV): New.
3486         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3487         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3489 2018-07-19  Michael Collison  <michael.collison@arm.com>
3490             Richard Henderson <rth@redhat.com>
3492         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3493         (addti3): Create simpler code if low part is already known to be 0.
3494         (addvti4, uaddvti4): New.
3495         (*add<GPI>3_compareC_cconly_imm): New.
3496         (*add<GPI>3_compareC_cconly): New.
3497         (*add<GPI>3_compareC_imm): New.
3498         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3499         handle constants within this pattern..
3500         (*add<GPI>3_compareV_cconly_imm): New.
3501         (*add<GPI>3_compareV_cconly): New.
3502         (*add<GPI>3_compareV_imm): New.
3503         (add<GPI>3_compareV): New.
3504         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3505         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3506         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3507         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3508         with 'comparison' operator.
3509         (*add<GPI>3_compareV_cconly_imm): Ditto.
3510         (*add<GPI>3_compareV_cconly): Ditto.
3511         (*add<GPI>3_compareV_imm): Ditto.
3512         (add<GPI>3_compareV): Ditto.
3513         (add<mode>3_carryinC): Ditto.
3514         (*add<mode>3_carryinC_zero): Ditto.
3515         (*add<mode>3_carryinC): Ditto.
3516         (add<mode>3_carryinV): Ditto.
3517         (*add<mode>3_carryinV_zero): Ditto.
3518         (*add<mode>3_carryinV): Ditto.
3520 2018-07-19  Michael Collison  <michael.collison@arm.com>
3521             Richard Henderson <rth@redhat.com>
3523         * config/aarch64/aarch64-modes.def (CC_V): New.
3524         * config/aarch64/aarch64-protos.h
3525         (aarch64_addti_scratch_regs): Declare
3526         (aarch64_subvti_scratch_regs): Declare.
3527         (aarch64_expand_subvti): Declare.
3528         (aarch64_gen_unlikely_cbranch): Declare
3529         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3530         for signed overflow using CC_Vmode.
3531         (aarch64_get_condition_code_1): Handle CC_Vmode.
3532         (aarch64_gen_unlikely_cbranch): New function.
3533         (aarch64_addti_scratch_regs): New function.
3534         (aarch64_subvti_scratch_regs): New function.
3535         (aarch64_expand_subvti): New function.
3537 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3539         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3540         extension.
3541         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3542         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3543         extension.
3545 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3547         PR target/83009
3548         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3549         address check not strict.
3551 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3553         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3554         Umq with Umn.
3555         (store_pair_lanes<mode>): Likewise.
3556         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3557         enum value 'ADDR_QUERY_LDP_STP_N'.
3558         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3559         (aarch64_print_address_internal): Add declaration.
3560         (aarch64_print_ldpstp_address): Remove.
3561         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3562         (aarch64_print_operand): Change printing of 'y'.
3563         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3564         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3565         'true' rather than '1'.
3566         * config/aarch64/constraints.md (Uml): Likewise.
3567         (Uml): Rename to Umn.
3568         (Umq): Remove.
3570 2018-07-19  Richard Biener  <rguenther@suse.de>
3572         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3573         a trailing array.
3574         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3575         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3576         (vn_reference_hasher): Likewise.
3577         (struct vn_tables_s): Remove obstack and alloc-pool members.
3578         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3579         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3580         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3581         (vn_reference_insert_pieces): Likewise.
3582         (alloc_vn_nary_op_noinit): Adjust.
3583         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3584         (vn_phi_eq): Adjust.
3585         (shared_lookup_phiargs): Remove.
3586         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3587         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3588         (visit_reference_op_call): Likewise.
3589         (copy_nary, copy_phi, copy_reference): Remove.
3590         (process_scc): Rewind the obstack when iterating.  Do not
3591         copy the elements to valid_info but just move them from one
3592         hashtable to the other.
3593         (allocate_vn_table): Adjust.
3594         (free_vn_table): Likewise.
3595         (init_scc_vn): Likewise.
3596         (free_scc_vn): Likewise.
3598 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3600         PR target/86560
3601         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3602         indirect_return as function type attribute.
3603         (ix86_attribute_table): Change indirect_return to function
3604         type attribute.
3605         * doc/extend.texi: Update indirect_return attribute.
3607 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3609         * wide-int.h (widest2_int): New.
3610         * gimple-fold.c (arith_overflowed_p): Use it.
3611         * tree.h (widest2_int_cst): New.
3612         * tree-vrp.c (wide_int_binop_overflow): Rename from
3613         vrp_int_const_binop.
3614         Rewrite to work on trees.
3615         (extract_range_from_multiplicative_op_1): Abstract code to...
3616         (wide_int_range_min_max): ...here.
3617         (wide_int_range_cross_product): ...and here.
3618         (extract_range_from_binary_expr_1): Abstract overflow code to...
3619         (wide_int_range_mult_wrapping): ...here.
3620         * tree-vrp.h (wide_int_range_cross_product): New.
3621         (wide_int_range_mult_wrapping): New.
3623 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3624             Julia Koval  <julia.koval@intel.com>
3626         * config/i386/x86-tune-costs.h (skylake_memcpy,
3627         skylake_memset): Replace rep_prefix with unrolling for size 512.
3629 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3631         PR middle-end/86544
3632         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3633         comparision with EQ_EXPR in last stmt.
3635 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3637         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3638         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3639         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3640         previously known as "PowerPC AltiVec Built-in Functions".  Move
3641         some material to new subsubsections "PowerPC AltiVec Built-in
3642         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3643         ISA 2.07".
3644         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3645         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3646         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3647         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3649 2018-07-18  Richard Biener  <rguenther@suse.de>
3651         PR tree-optimization/86557
3652         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3653         EXACT_DIV_EXPR.
3655 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3657         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3659 2018-07-17  Jeff Law  <law@redhat.com>
3661         * config/arm/arm.c (get_label_padding): Update for recent
3662         changes to label_to_alignment.
3664         PR tree-optimization/86010
3665         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3667         * config/mips/mips.c (vr4130_align_insns): Update for recent
3668         changes to label_to_alignment.
3670         * config/frv/frv.c (frv_label_align): Update for recent changes
3671         to label_to_alignment.
3673         * config/nios2/nios2.c (nios2_label_align): Update for recent
3674         changes which dropped ALIGN_LABELS_LOG.
3676 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3678         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3679         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3681 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3683         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3684         deprecated align_labels_log.
3686 2018-07-17  Richard Biener  <rguenther@suse.de>
3688         PR lto/86456
3689         * dwarf2out.c (init_sections_and_labels): Always generate
3690         a debug_line_str_section for early LTO debug.
3691         (dwarf2out_finish): Reset debug_line_str_hash output early.
3692         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3693         with fat LTO part.
3694         (dwarf2out_early_finish): Output debug_line_str.
3696 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3698         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3699         index register on z196 or later.
3701 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3703         * config/s390/s390.c (s390_default_align): Set default function
3704         alignment to 16.
3705         (s390_override_options_after_change): Call s390_default align.
3706         (s390_option_override_internal): Call s390_default_align.
3707         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3709 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3711         PR middle-end/86542
3712         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3713         to _looptemp_ clauses, other than the first two.
3715 2018-07-17  Martin Liska  <mliska@suse.cz>
3717         * opts.c: Do not enable OPT_falign_* for -Os.
3719 2018-07-17  Martin Liska  <mliska@suse.cz>
3721         * align.h (MAX_CODE_ALIGN): New.
3722         (MAX_CODE_ALIGN_VALUE): New.
3723         * common/config/i386/i386-common.c (ix86_handle_option):
3724         (MAX_CODE_ALIGN): Moved to align.h.
3725         * final.c (MAX_CODE_ALIGN): Likewise.
3726         * opts.c (parse_and_check_align_values):
3727         (MAX_CODE_ALIGN): Likewise.
3728         (MAX_CODE_ALIGN_VALUE): Likewise.
3730 2018-07-17  Martin Liska  <mliska@suse.cz>
3732         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3733         in order to fulfil coding style.
3734         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3735         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3736         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3737         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3738         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3739         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3740         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3741         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3742         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3744 2018-07-17  Martin Liska  <mliska@suse.cz>
3746         * align.h: New file.
3747         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3748         directly.
3749         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3750         align_flags of label_to_alignment.
3751         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3752         align_flags class.
3753         * config/m68k/m68k.c: Do not use removed align_labels_value and
3754         align_loops_value.
3755         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3756         (LOOP_ALIGN): Likewise.
3757         (LABEL_ALIGN): Likewise.
3758         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3759         Remove not used macro.
3760         (rs6000_loop_align): Change return type to align_flags.
3761         (rs6000_loop_align_max_skip): Remove.
3762         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3763         Change return type to align_flags.
3764         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3765         Remove not used macro.
3766         (rs6000_loop_align):  Change return type to align_flags.
3767         (rs6000_loop_align_max_skip): Remove.
3768         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3769         * config/rx/rx-protos.h (rx_align_for_label): Make it
3770         static function.
3771         * config/rx/rx.c (rx_align_for_label): Change return type
3772         to align_flags.
3773         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3774         macro definitions.
3775         into align_flags class.
3776         (LABEL_ALIGN): Likewise.
3777         (LOOP_ALIGN): Likewise.
3778         * config/s390/s390.c (s390_label_align): Use align_flags
3779         class member.
3780         (s390_asm_output_function_label): Likewise.
3781         * config/sh/sh.c (sh_override_options_after_change):
3782         Use align_flags class directly without macros.
3783         (find_barrier): Likewise.
3784         (barrier_align): Likewise.
3785         (sh_loop_align): Likewise.
3786         * config/spu/spu.c (spu_option_override):
3787         Use align_flags_tuple::get_value instead of removed macros.
3788         (spu_sched_init): Likewise.
3789         * config/spu/spu.h (GTY): Likewise.
3790         * config/visium/visium.c (visium_option_override):
3791         Set "8" as default secondary alignment.
3792         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3793         in order to guarantee secondary alignment of 8.
3794         * coretypes.h: Include align.h header file.
3795         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3796         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3797         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3798         * doc/tm.texi.in: Likewise.
3799         * final.c (struct label_alignment): Remove not used structure.
3800         (LABEL_ALIGN): Change type to align_flags.
3801         (LOOP_ALIGN): Likewise.
3802         (JUMP_ALIGN): Likewise.
3803         (default_loop_align_max_skip): Remove.
3804         (default_label_align_max_skip): Likewise.
3805         (default_jump_align_max_skip): Likewise.
3806         (default_label_align_after_barrier_max_skip):
3807         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3808         (LABEL_TO_MAX_SKIP): Remove.
3809         (label_to_alignment): Return align_flags type instead of integer.
3810         (label_to_max_skip): Remove.
3811         (align_fuzz): Use align_flags type.
3812         (compute_alignments): Use align_flags type and use align_flags::max
3813         to combine multiple alignments.
3814         (grow_label_align): Grow vec instead of C array.
3815         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3816         (shorten_branches):  Use align_flags type and use align_flags::max
3817         to combine multiple alignments.
3818         (final_scan_insn_1): Remove usage of secondary alignment that comes
3819         from label alignment, but instead use proper secondary alignment
3820         which is computed in grow_label_align.
3821         * flags.h (struct align_flags_tuple): Move to align.h.
3822         (struct align_flags): Likewise.
3823         (state_align_loops): Rename to align_loops.
3824         (state_align_jumps): Rename to align_jumps.
3825         (state_align_labels): Rename to align_labels.
3826         (state_align_functions): Rename to align_functions.
3827         (align_loops_log): Remove.
3828         (align_jumps_log): Remove.
3829         (align_labels_log): Remove.
3830         (align_functions_log): Remove.
3831         (align_loops_max_skip): Remove.
3832         (align_jumps_max_skip): Remove.
3833         (align_labels_max_skip): Remove.
3834         (align_functions_max_skip): Remove.
3835         (align_loops_value): Remove.
3836         (align_jumps_value): Remove.
3837         (align_labels_value): Remove.
3838         (align_functions_value): Remove.
3839         * output.h (label_to_alignment): Change return type to align_flags.
3840         (label_to_max_skip): Remove.
3841         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3842         jump_align_max_skip macros.
3843         * targhooks.h (default_loop_align_max_skip): Remove.
3844         (default_label_align_max_skip): Likewise.
3845         (default_jump_align_max_skip): Likewise.
3846         (default_label_align_after_barrier_max_skip): Remove.
3847         * toplev.c (read_log_maxskip): Use ::normalize function.
3848         (parse_N_M): Remove not used argument and also call ::normalize.
3849         (parse_alignment_opts): Do not pass unused arguments.
3850         * varasm.c (assemble_start_function): Use directly align_functions
3851         instead of removed macros.
3852         * system.h: Do not poison removed macros.
3854 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3856         PR middle-end/86539
3857         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3858         and cond temporaries don't have reference type if iterator has
3859         pointer type.  For init use &for_pre_body instead of pre_p if
3860         for_pre_body is non-empty.
3862 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3864         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3865         double-double modes to SFmode directly directly.
3866         (trunc<mode>sf2_fprs): Delete.
3868 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3870         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3871         for conversions between IFmode and the decimal floating point modes.
3872         (init_float128_ieee): Use the correct names for conversions between
3873         KFmode and the decimal floating point modes.
3875 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3877         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3878         for the conversions between TDmode and IFmode.
3879         (init_float128_ieee): Use more correct names for the conversions
3880         between TDmode and KFmode.
3882 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3884         PR tree-optimization/86526
3885         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3886         (inline_expand_builtin_string_cmp): Likewise.
3887         (inline_string_cmp): Likewise.  Use c_readstr instead of
3888         builtin_memcpy_read_str.  Add unit_mode temporary.
3890 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3892         PR middle-end/86528
3893         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3894         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3896 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3898         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3899         Alphabetize prototypes of built-in functions, separating out
3900         built-in functions that are listed in this section but should be
3901         described elsewhere.
3903 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3905         PR target/86511
3906         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3907         conditional move when trapping comparison was split to a
3908         non-trapping one (and vice versa).
3910 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3912         * config/s390/s390.c (s390_function_profiler): Generate nops
3913         instead of profiler call sequences.
3914         * config/s390/s390.opt: Add the new option.
3916 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3918         * config/s390/s390.c (s390_function_profiler): Generate
3919         __mcount_loc section.
3920         * config/s390/s390.opt: Add the new option.
3922 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3924         * common.opt: Add the new warning.
3925         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3926         %r0,__fentry__" when -mfentry is specified.
3927         (s390_option_override_internal): Disallow -mfentry for 31-bit
3928         CPUs.
3929         * config/s390/s390.opt: Add the new option.
3931 2018-07-16  Richard Biener  <rguenther@suse.de>
3933         PR lto/86523
3934         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3935         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3937 2018-07-16  Martin Liska  <mliska@suse.cz>
3939         PR ipa/86529
3940         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3941         to ::get_create.
3943 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3945         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3947 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3949         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3950         for ARCHS4x.
3951         * config/arc/arc-cpus.def (hs4x): New cpu.
3952         (hs4xd): Likewise.
3953         * config/arc/arc-tables.opt: Regenerate.
3954         * config/arc/arc.c (arc_sched_issue_rate): New function.
3955         (TARGET_SCHED_ISSUE_RATE): Define.
3956         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3957         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3958         fpu_cvt.
3959         (attr tune): Add ARCHS4x tune values.
3960         (attr tune_dspmpy): Define.
3961         (*tst): Correct instruction type.
3962         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3963         * config/arc/arcHS4x.md: New file.
3964         * config/arc/fpu.md: Update instruction type attributes.
3965         * config/arc/t-multilib: Regenerate.
3967 2018-07-16  Tom de Vries  <tdevries@suse.de>
3969         PR debug/86455
3970         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3972 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3974         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3975         early clobber.
3977 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3979         PR tree-optimization/86514
3980         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3981         conversion to a boolean type from a type with greater precision.
3983 2018-07-16  Tom de Vries  <tdevries@suse.de>
3985         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3986         dump_flags request TDF_SLIM.
3988 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3990         * fold-const.c (int_const_binop_1): Abstract...
3991         (wide_int_binop): ...wide int code here.
3992         (poly_int_binop): ...poly int code here.
3993         Abstract the rest of int_const_binop_1 into int_const_binop.
3994         * fold-const.h (wide_int_binop): New.
3995         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3996         Remove useless PLUS/MINUS_EXPR case.
3997         (zero_nonzero_bits_from_vr): Move wide int code...
3998         (zero_nonzero_bits_from_bounds): ...here.
3999         (extract_range_from_binary_expr_1): Move mask optimization code...
4000         (range_easy_mask_min_max): ...here.
4001         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
4002         (range_easy_mask_min_max): New.
4004 2018-07-15  Jeff Law  <law@redhat.com>
4006         PR target/85993
4007         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
4008         block.
4010 2018-07-14  Jim Wilson  <jimw@sifive.com>
4012         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
4014 2018-07-14  Paul Koning  <ni1d@arrl.net>
4016         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
4018 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
4020         * lto-streamer-out.c (copy_function_or_variable): Dump info about
4021         copying section.
4023 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
4024             Steve Munroe  <munroesj52@gmail.com>
4026         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
4027         (_mm_andnot_si128): Likewise.
4028         (_mm_or_si128): Likewise.
4029         (_mm_xor_si128): Likewise.
4031 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
4033         PR middle-end/78809
4034         * builtins.c (expand_builtin_memcmp): Inline the calls first
4035         when result_eq is false.
4036         (expand_builtin_strcmp): Inline the calls first.
4037         (expand_builtin_strncmp): Likewise.
4038         (inline_string_cmp): New routine. Expand a string compare
4039         call by using a sequence of char comparison.
4040         (inline_expand_builtin_string_cmp): New routine. Inline expansion
4041         a call to str(n)cmp/memcmp.
4042         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
4043         New option.
4044         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
4046 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
4048         * config/arm/driver-arm.c: Include arm-native.h.
4049         (host_detect_local_cpu): Use auto-generated data tables.
4050         (vendors, arm_cpu_table): Delete.  Move part information to ...
4051         * config/arm/arm-cpus.in: ... here.
4052         * config/arm/parsecpu.awk (gen_native): New function.
4053         (vendor, part): New CPU fields.
4054         (END): Add support for building the native CPU detection tables.
4055         * config/arm/t-arm (arm-native.h): Add build rule.
4056         (driver-arm.o): Add dependency on arm-native.h.
4058 2018-07-13  Richard Biener  <rguenther@suse.de>
4060         PR middle-end/85974
4061         * match.pd (addr1 - addr2): Allow either of the operand to
4062         have a conversion.
4064 2018-07-13  Tom de Vries  <tdevries@suse.de>
4066         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
4067         in remap_ssa_name.
4069 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4071         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
4072         arrays instead of numbered variables.
4074 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
4076         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
4077         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
4079 2018-07-13  Richard Biener  <rguenther@suse.de>
4081         PR debug/86452
4082         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
4083         instead of get_context_die.
4085 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4086             Richard Biener  <rguenther@suse.de>
4088         PR middle-end/86489
4089         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
4090         that the loop latch destination where phi is defined.
4092 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
4094         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
4095         (riscv_expand_epilogue): Add assertion to check interrupt mode.
4096         (riscv_set_current_function): Extract getting interrupt type to new
4097         function.
4098         (riscv_get_interrupt_type): New function.
4099         (riscv_merge_decl_attributes): New function, checking interrupt type is
4100         same.
4101         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4103 2018-07-12  Paul Koning  <ni1d@arrl.net>
4105         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4106         directive.
4108 2018-07-12  Paul Koning  <ni1d@arrl.net>
4110         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4111         zero reference, add doloop_end instead.
4112         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4113         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4114         detail for doloop_end.
4116 2018-07-12  Martin Sebor  <msebor@redhat.com>
4118         PR c/86453
4119         * attribs.c (decl_attributes): Reject conflicting attributes before
4120         calling attribute handlers.
4122 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4124         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4125          parameter.
4126         (gcc::dump_manager::get_dump_file_name): likewise.
4127         (dump_begin): Likewise.
4128         * dumpfile.h (dump_begin): Update prototype.
4129         (gcc::dump_manager::get_dump_file_name,
4130         gcc::dump_manager::get_dump_file_name): Update prototype.
4132 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4134         * internal-fn.h (vectorizable_internal_fn_p): New function.
4135         * tree-vect-slp.c (compatible_calls_p): Likewise.
4136         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4137         to internal functions.
4138         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4140 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4142         * fold-const.h (inverse_conditions_p): Declare.
4143         * fold-const.c (inverse_conditions_p): New function.
4144         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4145         that test the inverse condition of a conditional internal function.
4146         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4147         * internal-fn.c (internal_fn_mask_index): Handle conditional
4148         internal functions.
4149         (vectorized_internal_fn_supported_p): New function.
4150         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4151         (any_pred_load_store): Replace with...
4152         (need_to_predicate): ...this new variable.
4153         (redundant_ssa_names): New variable.
4154         (ifcvt_can_use_mask_load_store): Move initial checks to...
4155         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4156         for which a conditional internal function exists.
4157         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4158         instead of ifcvt_can_use_mask_load_store.  Update after variable
4159         name change.
4160         (predicate_load_or_store): New function, split out from
4161         predicate_mem_writes.
4162         (check_redundant_cond_expr): New function.
4163         (value_available_p): Likewise.
4164         (predicate_rhs_code): Likewise.
4165         (predicate_mem_writes): Rename to...
4166         (predicate_statements): ...this.  Use predicate_load_or_store
4167         and predicate_rhs_code.
4168         (combine_blocks, tree_if_conversion): Update after above name changes.
4169         (ifcvt_local_dce): Handle redundant_ssa_names.
4170         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4171         general conditional functions.
4172         * tree-vect-stmts.c (vectorizable_call): Likewise.
4174 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4175             Alan Hayward  <alan.hayward@arm.com>
4176             David Sherwood  <david.sherwood@arm.com>
4178         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4179         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4180         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4181         plus and minus and convert them into IFN_COND_FMA-based sequences.
4182         (convert_mult_to_fma): Handle conditional plus and minus.
4184 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4186         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4187         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4188         (cond_fnms_optab): New optabs.
4189         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4190         internal functions.
4191         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4192         * internal-fn.h (get_conditional_internal_fn): Declare.
4193         (get_unconditional_internal_fn): Likewise.
4194         * internal-fn.c (cond_ternary_direct): New macro.
4195         (expand_cond_ternary_optab_fn): Likewise.
4196         (direct_cond_ternary_optab_supported_p): Likewise.
4197         (FOR_EACH_COND_FN_PAIR): Likewise.
4198         (get_conditional_internal_fn): New function.
4199         (get_unconditional_internal_fn): Likewise.
4200         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4201         (gimple_match_op::gimple_match_op): Add a new overload for 5
4202         operands.
4203         (gimple_match_op::set_op): Likewise.
4204         (gimple_resimplify5): Declare.
4205         * genmatch.c (decision_tree::gen): Generate simplifications for
4206         5 operands.
4207         * gimple-match-head.c (gimple_simplify): Define an overload for
4208         5 operands.  Handle calls with 5 arguments in the top-level overload.
4209         (convert_conditional_op): Handle conversions from unconditional
4210         internal functions to conditional ones.
4211         (gimple_resimplify5): New function.
4212         (build_call_internal): Pass a fifth operand.
4213         (maybe_push_res_to_seq): Likewise.
4214         (try_conditional_simplification): Try converting conditional
4215         internal functions to unconditional internal functions.
4216         Handle 3-operand unconditional forms.
4217         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4218         Define ternary equivalents of the current rules for binary conditional
4219         internal functions.
4220         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4221         ternary operations.
4222         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4223         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4224         (optab): Handle them.
4225         (SVE_COND_FP_TERNARY): New int iterator.
4226         (sve_fmla_op, sve_fmad_op): New int attributes.
4227         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4228         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4229         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4231 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4233         * target.def (preferred_else_value): New target hook.
4234         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4235         * doc/tm.texi: Regenerate.
4236         * targhooks.h (default_preferred_else_value): Declare.
4237         * targhooks.c (default_preferred_else_value): New function.
4238         * internal-fn.h (conditional_internal_fn_code): Declare.
4239         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4240         (get_conditional_internal_fn): Use it.
4241         (conditional_internal_fn_code): New function.
4242         * gimple-match.h (gimple_match_cond): New struct.
4243         (gimple_match_op): Add a cond member function.
4244         (gimple_match_op::gimple_match_op): Update all forms to take a
4245         gimple_match_cond.
4246         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4247         for the suboperation, but don't specify a particular else_value.
4248         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4249         (visit_nary_op, visit_reference_op_load): Pass
4250         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4251         * gimple-match-head.c: Include tree-eh.h
4252         (convert_conditional_op): New function.
4253         (maybe_resimplify_conditional_op): Likewise.
4254         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4255         (gimple_resimplify2): Likewise.
4256         (gimple_resimplify3): Likewise.
4257         (gimple_resimplify4): Likewise.
4258         (maybe_push_res_to_seq): Return null for conditional operations.
4259         (try_conditional_simplification): New function.
4260         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4261         constructor.
4262         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4263         IFN_COND_* call.
4264         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4265         function.
4266         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4268 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4270         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4271         DECL_FCONTEXT
4272         (hash_tree): Do not hash DECL_FCONTEXT
4273         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4274         Do not stream DECL_FCONTEXT.
4275         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4276         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4278 2018-07-12  Richard Biener  <rguenther@suse.de>
4280         PR debug/86462
4281         * dwarf2out.c (gen_block_die): Only output blocks when they have
4282         at least one !DECL_IGNORED_P variable.
4284 2018-07-12  Richard Biener  <rguenther@suse.de>
4286         PR target/84829
4287         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4288         Remove -mieee-fp handling.
4290 2018-07-12  Richard Biener  <rguenther@suse.de>
4292         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4293         left-over from last patch.
4295 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4297         PR tree-optimization/86492
4298         * gimple-ssa-store-merging.c
4299         (imm_store_chain_info::coalesce_immediate_stores): Call
4300         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4302 2018-07-12  Richard Biener  <rguenther@suse.de>
4304         PR middle-end/86479
4305         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4306         move possibly trapping operations into the conditional.
4308 2018-07-12  Richard Biener  <rguenther@suse.de>
4310         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4311         (vn_lookup_simplify_result): Remove recursion limit applied
4312         here.
4313         (vn_nary_build_or_lookup_1): Adjust.
4314         (try_to_simplify): Likewise.
4315         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4316         here.
4317         (gimple_resimplify2): Likewise.
4318         (gimple_resimplify3): Likewise.
4319         (gimple_resimplify4): Likewise.
4321 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4323         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4324         Use __mmask64 type instead of __mmask8 for __M argument.
4325         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4326         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4327         __U argument.
4328         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4329         __mmask16 for __M argument.
4330         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4331         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4332         to __mmask16 instead of __mmask8.
4333         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4334         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4335         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4336         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4337         instead of __mmask16 for __U argument.
4338         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4339         __mmask16 instead of __mmask8 for __U argument.
4340         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4341         __U argument.
4342         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4343         __mmask16.
4344         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4345         argument.
4346         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4347         __U argument.
4348         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4349         __mmask16.
4350         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4351         of __mmask16.
4352         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4353         __U argument.
4354         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4355         __U argument.
4356         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4357         __U argument.
4358         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4359         __U argument.
4360         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4361         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4362         return type as well as __M argument type and all casts from __mmask8
4363         to __mmask32.
4364         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4365         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4366         return type as well as __M argument type and all casts from __mmask8
4367         to __mmask16.
4368         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4369         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4370         return type as well as __M argument type and all casts from __mmask8
4371         to __mmask32.
4372         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4373         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4374         return type as well as __M argument type and all casts from __mmask8
4375         to __mmask16.
4376         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4377         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4378         __mmask16.
4380 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4382         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4383         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4384         for __U argument.
4386 2018-07-11  Paul Koning  <ni1d@arrl.net>
4388         * doc/md.texi (define_subst): Document how multiple occurrences of
4389         the same argument in the replacement pattern are handled.
4391 2018-07-11  Paul Koning  <ni1d@arrl.net>
4393         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4394         alphabetical order.
4395         (Common Type Attributes): Add "mode" attribute.
4397 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4399         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4400         stream DECL_ORIGINAL_TYPE.
4401         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4402         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4403         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4404         Do not walk original type.
4405         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4406         external decls.
4407         (write_ts_decl_non_common_tree_pointers): Do not stream
4408         DECL_ORIGINAL_TYPE
4409         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4410         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4412 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4414         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4415         thread twice from the same starting edge.
4417 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4419         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4420         * gimple.c (gimple_call_nonnull_result_p): ...here...
4421         (gimple_call_nonnull_arg): ...and here.
4422         * gimple.h (gimple_call_nonnull_result_p): New.
4423         (gimple_call_nonnull_arg): New.
4425 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4427         * config/arm/arm-cpus.in: Move information from fpu field of each
4428         cpu definition to the isa field.
4429         * config/arm/parsecpu.awk (fpu): Delete match rule.
4430         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4432 2018-07-11  Richard Biener  <rguenther@suse.de>
4434         PR debug/86457
4435         * dwarf2out.c (init_sections_and_labels): Use
4436         output_asm_line_debug_info consistently.
4437         (dwarf2out_early_finish): Likewise.
4438         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4439         type units.
4441 2018-07-11  Richard Biener  <rguenther@suse.de>
4443         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4444         Rework father_bb setting in a way to avoid propagating constants
4445         multiple times on a loop body.
4447 2018-07-10  Mark Wielaard  <mark@klomp.org>
4449         PR debug/86459
4450         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4452 2018-07-10  Richard Biener  <rguenther@suse.de>
4454         * hash-map.h (hash_map::iterator::operator*): Return
4455         references to key and value.
4457 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4459         PR c++/86443
4460         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4461         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4462         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4463         (gimplify_omp_for): For composite loops, move outer
4464         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4465         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4466         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4467         TREE_LIST for both the original class iterator and the "last" helper
4468         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4469         loop, remember has_decl_expr from outer composite loops for the
4470         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4472 2018-07-09  Martin Sebor  <msebor@redhat.com>
4474         PR middle-end/77357
4475         PR middle-end/86428
4476         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4477         accessing implicitly initialized array elements.
4478         * expr.c (string_constant): Handle string initializers of
4479         character arrays within aggregates.
4480         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4481         Store element offset.  As a special case, handle zero size.
4482         (fold_nonarray_ctor_reference): Same.
4483         (fold_ctor_reference): Add argument.  Store subobject offset.
4484         * gimple-fold.h (fold_ctor_reference): Add argument.
4486 2018-07-09  Paul Koning  <ni1d@arrl.net>
4488         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4489         (pdp11_insn_cost): New function.
4490         (pdp11_md_asm_adjust): New function.
4491         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4492         (pdp11_rtx_costs): Update to match machine better.
4493         (output_addr_const_pdp11): Correct format mismatch warnings.
4494         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4495         * config/pdp11/pdp11.md: General change to add base_cost and/or
4496         length attributes for use by new pdp11_insn_cost function.
4497         (MIN_BRANCH): Correct definition.
4498         (MIN_SOB): Ditto.
4499         (doloop_end): Use standard pattern name for looping pattern.
4500         (doloop_end_nocc): New.
4501         (movsf): Add another constraint alternative.
4502         (zero_extendqihi2): Add constraint alternatives for not in place
4503         extend.
4504         (zero_extendhisi2): Remove.
4505         (shift patterns): Add CC handling variants.
4506         (bswaphi2): New.
4507         (bswapsi2): New.
4508         (rothi3): New.
4509         (define_peephole2): New peephole to recognize mov that sets CC for
4510         subsequent test.
4512 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4514         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4515         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4516         wi::add.
4518 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4520         PR c/86420
4521         * real.c (real_nextafter): Return true if result is denormal.
4523 2018-07-09  Martin Liska  <mliska@suse.cz>
4525         * common.opt: Add back wrongly removed attribute.
4527 2018-07-09  Richard Biener  <rguenther@suse.de>
4529         PR debug/86413
4530         * dwarf2out.c (gen_block_die): For an early generated DIE
4531         always output high/low PC attributes.
4533 2018-07-09  Tom de Vries  <tdevries@suse.de>
4535         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4536         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4537         onto VAR_DECL with abstract origin.
4539 2018-07-07  Jim Wilson  <jimw@sifive.com>
4541         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4543 2018-07-07  Tom de Vries  <tdevries@suse.de>
4545         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4547 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4549         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4550         overflow_type.
4551         (combine_bound): Use wide-int overflow calculation instead of
4552         rolling our own.
4553         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4554         overflow_type.
4555         * fold-const.c (int_const_binop_2): Same.
4556         (extract_muldiv_1): Same.
4557         (fold_div_compare): Same.
4558         (fold_abs_const): Same.
4559         * match.pd: Same.
4560         * poly-int.h (add): Same.
4561         (sub): Same.
4562         (neg): Same.
4563         (mul): Same.
4564         * predict.c (predict_iv_comparison): Same.
4565         * profile-count.c (slow_safe_scale_64bit): Same.
4566         * simplify-rtx.c (simplify_const_binary_operation): Same.
4567         * tree-chrec.c (tree_fold_binomial): Same.
4568         * tree-data-ref.c (split_constant_offset_1): Same.
4569         * tree-if-conv.c (idx_within_array_bound): Same.
4570         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4571         * tree-ssa-phiopt.c (minmax_replacement): Same.
4572         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4573         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4574         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4575         * wide-int.cc (wi::add_large): Same.
4576         (wi::mul_internal): Same.
4577         (wi::sub_large): Same.
4578         (wi::divmod_internal): Same.
4579         * wide-int.h: Change overflow type to overflow_type for neg, add,
4580         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4581         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4582         mul_internal, divmod_internal.
4583         (overflow_type): New enum.
4584         (accumulate_overflow): New.
4586 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4588         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4589         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4591 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4593         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4594         argument is checked for zero before entering loop, avoid checking again.
4596 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4598         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4599         * gimplify.h (generic_expr_could_trap_p): Likwise.
4600         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4602 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4604         PR tree-optimization/86401
4605         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4606         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4607         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4608         * fold-const.h (fold_bit_and_mask): Declare.
4609         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4611 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4613         PR target/86324
4614         * target.def (translate_mode_attribute): New hook.
4615         * targhooks.h (default_translate_mode_attribute): Declare.
4616         * targhooks.c (default_translate_mode_attribute): New function.
4617         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4618         * doc/tm.texi: Regenerate.
4619         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4620         (rs6000_translate_mode_attribute): New function.
4622 2018-07-06  Paul Koning  <ni1d@arrl.net>
4624         * doc/md.texi (define_split): Document DONE and FAIL.
4625         (define_peephole2): Ditto.
4627 2018-07-05  Jeff Law  <law@redhat.com>
4629         PR tree-optimization/86010
4630         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4631         both the head and tail of mem* and str* calls.
4633 2018-07-05  Jim Wilson  <jimw@sifive.com>
4635         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4637 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4639         * config/aarch64/aarch64-simd.md: correct flags text for
4640         MIN_EXPR replacement.
4642 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4644         * configure: Regenerated.
4646 2018-07-05  Carl Love  <cel@us.ibm.com>
4648         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4649         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4650         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4651         VSX_BUILTIN_DOUBLEL_V4SF.
4653 2018-07-05  Martin Sebor  <msebor@redhat.com>
4655         PR c++/86400
4656         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4657         than its domain to compute its the upper bound of a char array.
4659 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4661         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4662         * doc/cpp.texi: Update comment.
4663         * doc/tm.texi: Rebuilt.
4664         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4665         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4666         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4667         headers affected by extern "C".
4668         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4669         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4670         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4671         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4672         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4673         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4674         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4675         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4676         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4677         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4678         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4679         config/sparc/sp64-elf.h, config/spu/spu.h,
4680         config/stormy16/stormy16.h, config/v850/v850.h,
4681         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4682         define NO_IMPLICIT_EXTERN_C.
4683         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4685 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4687         PR target/84711
4688         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4689         instead of GET_MODE_SIZE when comparing Units.
4691 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4693         PR target/84711
4694         * rtlanal.c (set_noop_p): Constrain on mode change,
4695         include hard-reg-set.h
4697 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4699         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4701 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4703         Revert
4704         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4706         PR sanitizer/84250
4707         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4708         libasan.
4709         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4711 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4713         PR sanitizer/84250
4714         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4715         libasan.
4716         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4718 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4720         PR middle-end/86380
4721         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4723 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4725         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4726         neg_*_op* variables.
4728 2018-07-04  Martin Liska  <mliska@suse.cz>
4730         * tree-switch-conversion.c: Define
4731         max_ratio_for_speed and max_ratio_for_size constants.
4733 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4734             Martin Liska  <mliska@suse.cz>
4736         PR middle-end/66240
4737         PR target/45996
4738         PR c/84100
4739         * common.opt: Rename align options with 'str_' prefix.
4740         * common/config/i386/i386-common.c (set_malign_value): New
4741         function.
4742         (ix86_handle_option): Use it to set -falign-* options/
4743         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4744         type from int to string.
4745         * config/aarch64/aarch64.c: Update default values from int
4746         to string.
4747         * config/alpha/alpha.c (alpha_override_options_after_change):
4748         Likewise.
4749         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4750         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4751         max skip conditionally.
4752         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4753         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4754         max skip conditionally.
4755         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4756         max skip conditionally.
4757         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4758         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4759         max skip conditionally.
4760         * config/i386/i386.c (struct ptt): Change type from int to
4761         string.
4762         (ix86_default_align): Set default values.
4763         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4764         max skip conditionally.
4765         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4766         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4767         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4768         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4769         max skip conditionally.
4770         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4771         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4772         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4773         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4774         max skip conditionally.
4775         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4776         * config/ia64/ia64.c (ia64_option_override): Set default values
4777         for alignment options.
4778         * config/m68k/m68k.c: Handle new str_align_* options.
4779         * config/mips/mips.c (mips_set_compression_mode): Change
4780         type of constants.
4781         (mips_option_override): Set default values for options.
4782         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4783         Likewise.
4784         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4785         Likewise.
4786         * config/rx/rx.c (rx_option_override): Likewise.
4787         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4788         (LABEL_ALIGN): Use align_labels_log.
4789         (LOOP_ALIGN): Use align_loops_align.
4790         * config/s390/s390.c (s390_asm_output_function_label): Use new
4791         macros.
4792         * config/sh/sh.c (sh_override_options_after_change):
4793         Change type of constants.
4794         * config/spu/spu.c (spu_sched_init): Likewise.
4795         * config/sparc/sparc.c (sparc_option_override): Set default
4796         values for options.
4797         * config/visium/visium.c (visium_option_override): Likewise.
4798         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4799         emit p2align format with last argument if it's not needed.
4800         * doc/invoke.texi: Document extended format of -falign-*.
4801         * final.c: Use align_labels alignment.
4802         * flags.h (struct target_flag_state): Change type to use
4803         align_flags.
4804         (struct align_flags_tuple): New.
4805         (struct align_flags): Likewise.
4806         (align_loops_log): Redefine macro to use new types.
4807         (align_loops_max_skip): Redefine macro to use new types.
4808         (align_jumps_log): Redefine macro to use new types.
4809         (align_jumps_max_skip): Redefine macro to use new types.
4810         (align_labels_log): Redefine macro to use new types.
4811         (align_labels_max_skip): Redefine macro to use new types.
4812         (align_functions_log): Redefine macro to use new types.
4813         (align_loops): Redefine macro to use new types.
4814         (align_jumps): Redefine macro to use new types.
4815         (align_labels): Redefine macro to use new types.
4816         (align_functions): Redefine macro to use new types.
4817         (align_functions_max_skip): Redefine macro to use new types.
4818         (align_loops_value): New macro.
4819         (align_jumps_value): New macro.
4820         (align_labels_value): New macro.
4821         (align_functions_value): New macro.
4822         * function.c (invoke_set_current_function_hook): Propagate
4823         alignment values from flags to global variables default in
4824         topleev.h.
4825         * ipa-icf.c (sem_function::equals_wpa): Use
4826         cl_optimization_option_eq instead of memcmp.
4827         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4828         of string types.
4829         (cl_optimization_stream_in): Likewise.
4830         * optc-save-gen.awk: Support strings in cl_optimization.
4831         * opth-gen.awk: Likewise.
4832         * opts.c (finish_options): Remove error checking of invalid
4833         value ranges.
4834         (MAX_CODE_ALIGN): Remove.
4835         (MAX_CODE_ALIGN_VALUE): Likewise.
4836         (parse_and_check_align_values): New function.
4837         (check_alignment_argument): Likewise.
4838         (common_handle_option): Use check_alignment_argument.
4839         * opts.h (parse_and_check_align_values): Declare.
4840         * toplev.c (init_alignments): Remove.
4841         (read_log_maxskip): New.
4842         (parse_N_M): Likewise.
4843         (parse_alignment_opts): Likewise.
4844         (backend_init_target): Remove usage of init_alignments.
4845         * toplev.h (parse_alignment_opts): Declare.
4846         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4847         argument.
4848         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4849         * tree.c (cl_option_hasher::equal): New.
4850         * varasm.c: Use new global macros.
4852 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4854         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4855         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4856         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4857         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4858         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4859         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4860         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4861         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4862         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4863         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4864         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4865         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4866         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4868 2018-07-04  Martin Liska  <mliska@suse.cz>
4869             Jonathan Wakely  <jwakely@redhat.com>
4871         * coverage.c: Use correct type.
4872         * doc/invoke.texi: Language correction.
4874 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4876         PR target/85620
4877         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4878         ENDBRANCH for non-tail call which may return via indirect branch.
4879         * doc/extend.texi: Document indirect_return attribute.
4881 2018-07-03  Martin Sebor  <msebor@redhat.com>
4883         PR tree-optimization/86274
4884         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4885         precondition.
4886         (format_floating): Correct handling of infinities and NaNs.
4888 2018-07-03  Martin Sebor  <msebor@redhat.com>
4890         * print-tree.c (print_real_cst): New function.
4891         (print_node_brief): Call it.
4892         (print_node): Ditto.
4894 2018-07-03  Jeff Law  <law@redhat.com>
4896         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4897         into a single pattern.
4899         * config/h8300/h8300.md (ors code_iterator): New.
4900         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4901         a single pattern and single splitter.
4902         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4903         (iorqi3_1, xorqi3_1): Likewise.
4904         (iorqi3, xorqi3 expanders): Similarly.
4906         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4907         (movmd_internal) into a single pattern using the P mode iterator.
4908         (movmd splitters): Similarly.
4909         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4910         (movsd splitters): Similarly.
4912         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4913         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4914         right table based on the size of the operand.
4915         * config/h8300/h8300.md (length_table): Corresponding changes. All
4916         references to "addb", "addw" and "addl" changed to "add".
4917         (btst patterns): Merge two variants into a single pattern.
4918         (tstqi, tsthi): Likewise.
4919         (addhi3_incdec, addsi3_incdec): Likewise.
4920         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4921         (mulhi3, mulsi3): Likewise.
4922         (udivhi3, udivsi3): Likewise.
4923         (divhi3, divsi3): Likewise.
4924         (andorqi3, andorhi3, andorsi3): Likewise.
4926 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4928         PR target/85694
4929         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4930         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4932 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4934         PR tree-optimization/85694
4935         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4936         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4937         UNSPEC_URHADD.
4938         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4939         (<u>avg<mode>3_ceil): New patterns.
4941 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4943         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4944         scan-tree-dump directive.
4945         * gcc.dg/vect/slp-perm-2.c: Likewise.
4946         * gcc.dg/vect/slp-perm-3.c: Likewise.
4947         * gcc.dg/vect/slp-perm-5.c: Likewise.
4948         * gcc.dg/vect/slp-perm-6.c: Likewise.
4949         * gcc.dg/vect/slp-perm-7.c: Likewise.
4950         * gcc.dg/vect/slp-perm-8.c: Likewise.
4952 2018-07-03  Marek Polacek  <polacek@redhat.com>
4954         PR middle-end/86202
4955         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4957 2018-07-03  Richard Biener  <rguenther@suse.de>
4959         PR ipa/86389
4960         * tree-ssa-structalias.c (find_func_clobbers): Properly
4961         handle indirect calls.
4963 2018-07-03  Jeff Law  <law@redhat.com>
4965         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4966         (shifts): New code iterator.
4967         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4968         expander.  Fix HImode handling on H8/SX.
4969         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4970         (subqi3, subhi3, subsi3 expanders): Likewise.
4971         (andqi3, andhi3, andsi3 expanders): Likewise.
4972         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4973         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4974         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4975         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4976         (zero_extendqihi2, zero_extendqisi2): Likewise.
4977         (extendqihi2, extendqisi2): Likewise.
4978         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4979         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4980         (rotlqi3_1, rotlhi3_1): Likewise.
4981         (logicalhi3_sn, logicalsi3_sn): Likewise.
4982         (logicalhi3, logicalsi3): Likewise.
4984 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4986         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4987         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4988         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4989         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4990         type to append_pattern_def_seq instead of creating a stmt_vec_info
4991         directly.
4992         (build_mask_conversion): Likewise.  Remove vinfo argument.
4993         (vect_add_conversion_to_patterm): Likewise, renaming to...
4994         (vect_add_conversion_to_pattern): ...this.
4995         (vect_recog_mask_conversion_pattern): Update call to
4996         build_mask_conversion.  Pass the vector type to
4997         append_pattern_def_seq here too.
4998         (vect_recog_gather_scatter_pattern): Update call to
4999         vect_add_conversion_to_pattern.
5001 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5003         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
5004         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5005         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
5006         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
5007         STMT_VINFO_PATTERN_DEF_SEQ to null here.
5008         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
5009         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
5010         append_pattern_def_seq instead of new_pattern_def_seq.
5011         (vect_recog_divmod_pattern): Do both of the above.
5012         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
5013         is null.
5015 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5017         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
5018         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
5019         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
5020         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
5021         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
5022         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5023         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
5024         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
5025         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
5026         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
5027         parameter with a single stmt_vec_info.
5028         (vect_recog_func_ptr): Likewise.
5029         (vect_recog_gather_scatter_pattern): Likewise, folding in...
5030         (vect_try_gather_scatter_pattern): ...this.
5031         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
5032         the stmt_vec_info of the statement to be matched.  Don't clear
5033         STMT_VINFO_RELATED_STMT.
5034         (vect_pattern_recog): Update call accordingly.
5036 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5038         PR tree-optimization/85694
5039         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
5040         (uavgM3_ceil): Document new optabs.
5041         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
5042         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
5043         functions.
5044         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
5045         (savg_ceil_optab): New optabs.
5046         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
5047         (vect_vect_recog_func_ptrs): Add it.
5048         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
5049         constant directly from the associated lhs.
5051 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5053         * tree-vect-patterns.c (vect_split_statement): New function.
5054         (vect_convert_input): Use it to try to split an existing cast.
5056 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5058         * poly-int.h (print_hex): New function.
5059         * dumpfile.h (dump_dec, dump_hex): Declare.
5060         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
5061         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
5062         min_input_precision, operation_precision and operation_sign.
5063         * tree-vect-patterns.c (vect_get_range_info): New function.
5064         (vect_same_loop_or_bb_p, vect_single_imm_use)
5065         (vect_operation_fits_smaller_type): Delete.
5066         (vect_look_through_possible_promotion): Add an optional
5067         single_use_p parameter.
5068         (vect_recog_over_widening_pattern): Rewrite to use new
5069         stmt_vec_info infomration.  Handle one operation at a time.
5070         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
5071         (vect_truncatable_operation_p, vect_set_operation_type)
5072         (vect_set_min_input_precision): New functions.
5073         (vect_determine_min_output_precision_1): Likewise.
5074         (vect_determine_min_output_precision): Likewise.
5075         (vect_determine_precisions_from_range): Likewise.
5076         (vect_determine_precisions_from_users): Likewise.
5077         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
5078         (vect_vect_recog_func_ptrs): Put over_widening first.
5079         Add cast_forwprop.
5080         (vect_pattern_recog): Call vect_determine_precisions.
5082 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
5084         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
5085         statements that have been replaced by further pattern statements.
5086         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
5088 2018-07-03  Richard Biener  <rguenther@suse.de>
5090         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
5091         always set *dt.  Dump vectype in vectype overload.
5092         * dumpfile.h (dump_gimple_expr): New function.
5093         (dump_gimple_expr_loc): Likewise.
5094         * dumpfile.c (dump_gimple_expr): New function.
5095         (dump_gimple_expr_loc): Likewise.
5097 2018-07-02  Jeff Law  <law@redhat.com>
5099         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
5100         the H8/300, H8/300H and H8/S variants into a single pattern.
5101         (movhi_h8300, movqi_h8300hs): Similarly.
5102         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5103         (QHI mode iterator): New.
5105         * config/h8300/h8300.md: Remove trailing whitespace.
5107 2018-07-02  Jim Wilson  <jimw@sifive.com>
5109         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5110         instead of emit_insn for interrupt returns.
5111         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5112         (riscv_sret, riscv_uret): Likewise.
5114 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5116         * pretty-print.c (selftest::test_pp_format): Move save and restore
5117         of quotes to class auto_fix_quotes, and add an instance.
5118         * selftest.c: Include "intl.h".
5119         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5120         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5121         * selftest.h (selftest::auto_fix_quotes): New class.
5123 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5125         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5126         (aarch64_sve_prepare_conditional_op): Remove.
5127         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5128         Allow aarch64_simd_reg_or_zero as select operand; remove
5129         the aarch64_sve_prepare_conditional_op call.
5130         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5131         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5132         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5133         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5134         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5135         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5136         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5137         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5138         and a splitters to match all of the *_any patterns.
5139         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5141         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5142         (SVE_COND_FP_BINARY_REV): Remove.
5143         (sve_int_op_rev, sve_fp_op_rev): New.
5144         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5145         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5146         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5147         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5148         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5149         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5150         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5151         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5152         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5154         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5155         Remove match_dup 1 from the inner unspec.
5156         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5158         * config/aarch64/aarch64.md (movprfx): New attr.
5159         (length): Default movprfx to 8.
5160         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5161         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5162         (*<su>mul<SVE_I>3_highpart): Likewise.
5163         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5164         (*v<ASHIFT><SVE_I>3): Likewise.
5165         (*<su><MAXMIN><SVE_I>3): Likewise.
5166         (*<su><MAXMIN><SVE_F>3): Likewise.
5167         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5168         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5169         (*div<SVE_F>4): Likewise.
5171 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5173         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5174         in dump string.
5176 2018-07-02  Richard Biener  <rguenther@suse.de>
5178         PR tree-optimization/86363
5179         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5180         memset argument refers to a non-variable address.
5182 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5184         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5185         {PLUS,MINUS}_EXPR code to...
5186         (adjust_symbolic_bound): ...here,
5187         (combine_bound): ...here,
5188         (set_value_range_with_overflow): ...and here.
5190 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5192         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5193         code...
5194         (extract_range_from_abs_expr): ...here.
5196 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5198         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5199         -fno-omit-frame-pointer when not optimizing.
5201 2018-07-02  Martin Liska  <mliska@suse.cz>
5203         PR ipa/86279
5204         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5205         (propagate_nothrow): Likewise.
5207 2018-07-02  Martin Liska  <mliska@suse.cz>
5209         PR ipa/86323
5210         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5212 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5214         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5215         function in r262149, changing "loc" param from source_location to
5216         const dump_location_t &.
5217         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5218         declaration, as above.
5220 2018-07-01  Paul Koning  <ni1d@arrl.net>
5222         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5223         -munit-asm, -mgnu-asm, -mdec-asm.
5224         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5225         (pdp11_output_labelref): New.
5226         (pdp11_output_def): New.
5227         (pdp11_output_addr_vec_elt): New.
5228         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5229         %# and %@ format codes.
5230         (pdp11_option_override): New.
5231         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5232         (pdp11_output_ident): New.
5233         (pdp11_asm_named_section): New.
5234         (pdp11_asm_init_sections): New.
5235         (pdp11_file_start): New.
5236         (pdp11_file_end): New.
5237         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5238         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5239         %o, like %c but octal.
5240         (pdp11_option_override): New.
5241         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5242         -mdec-asm.
5243         (DATA_SECTION_ASM_OP): Ditto.
5244         (READONLY_DATA_SECTION_ASM_OP): New.
5245         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5246         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5247         (ASM_OUTPUT_LABELREF): Ditto.
5248         (ASM_OUTPUT_DEF): Ditto.
5249         (ASM_OUTPUT_EXTERNAL): New.
5250         (ASM_OUTPUT_SOURCE_FILENAME): New.
5251         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5252         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5253         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5254         %# and %@ format codes.
5255         * config/pdp11/pdp11.opt (mgnu-asm): New.
5256         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5257         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5258         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5260 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5262         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5263         dereferencing path[] beyond its length.
5264         (debug_path): New.
5265         (debug_all_paths): New.
5266         (rewire_first_differing_edge): New.
5267         (adjust_paths_after_duplication): New.
5268         (duplicate_thread_path): Call adjust_paths_after_duplication.
5269         Add new argument.
5270         (thread_through_all_blocks): Add new argument to
5271         duplicate_thread_path.
5273 2018-06-30  Jim Wilson  <jimw@sifive.com>
5275         * config/riscv/predicates.md (p2m1_shift_operand): New.
5276         (high_mask_shift_operand): New.
5277         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5278         pattern using p2m1_shift_operand.
5279         (lshsi3_zero_extend_3+2): New combiner pattern using
5280         high_mask_shift_operand.
5282 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5284         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5285         split out from...
5286         (vect_recog_rotate_pattern): ...here.
5287         (vect_convert_input): Try to insert casts of invariants in the
5288         preheader.
5289         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5290         preheader to be empty.
5292 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5294         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5295         vector type.  If given, install it in the new statement's
5296         STMT_VINFO_VECTYPE.
5297         (vect_element_precision): New function.
5298         (vect_unpromoted_value): New struct.
5299         (vect_unpromoted_value::vect_unpromoted_value): New function.
5300         (vect_unpromoted_value::set_op): Likewise.
5301         (vect_look_through_possible_promotion): Likewise.
5302         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5303         (vect_widened_op_tree, vect_convert_input): Likewise.
5304         (vect_convert_inputs, vect_convert_output): Likewise.
5305         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5306         to handle the optional cast of the multiplication result and
5307         vect_widened_op_tree to detect the widened multiplication itself.
5308         Do not require the input and output of promotion casts to have
5309         the same sign, but base the signedness of the operation on the
5310         input rather than the result.  If the pattern includes two
5311         promotions, check that those promotions have the same sign.
5312         Do not restrict the MULT_EXPR handling to a double-width result;
5313         handle quadruple-width results and wider.  Use vect_convert_inputs
5314         to convert the inputs to the common type.
5315         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5316         to handle the optional cast of the ABS result.  Also allow a sign
5317         change or a sign extension between the ABS and MINUS.
5318         Use vect_widened_op_tree to detect the widened subtraction and use
5319         vect_convert_inputs to convert the inputs to the common type.
5320         (vect_handle_widen_op_by_const): Delete.
5321         (vect_recog_widen_op_pattern): New function.
5322         (vect_recog_widen_mult_pattern): Use it.
5323         (vect_recog_widen_shift_pattern): Likewise.
5324         (vect_recog_widen_sum_pattern): Use
5325         vect_look_through_possible_promotion to handle the promoted
5326         PLUS_EXPR operand.
5328 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5330         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5331         the containing gimple_seq *.
5332         * gimple-iterator.h (gsi_for_stmt): Declare it.
5333         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5334         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5335         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5336         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5337         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5338         checks.
5339         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5340         split out from...
5341         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5342         statement being replaced is part of an existing pattern
5343         definition sequence, inserting the new pattern statements before
5344         the original one.
5345         (vect_pattern_recog_1): Don't return a bool.  If the statement
5346         is already part of a pattern, instead apply pattern matching
5347         to the pattern definition statements.  Don't clear the
5348         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5349         (vect_pattern_recog): Don't break after the first match;
5350         continue processing the pattern definition statements instead.
5351         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5353 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5355         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5356         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5357         (vect_recog_widen_sum_pattern): Use it.
5359 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5361         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5362         phi is not a pattern statement and has not been replaced by
5363         a pattern statement.
5364         * tree-vect-patterns.c (type_conversion_p): Don't check
5365         STMT_VINFO_IN_PATTERN_P.
5366         (vect_recog_vector_vector_shift_pattern): Likewise.
5367         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5368         the pattern statement rather than the original statement; check
5369         directly for a WIDEN_MULT_EXPR here.
5370         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5371         vect_is_simple_use to return the pattern statement rather
5372         than the original statement; use is_pattern_stmt_p to check
5373         for such a pattern statement.
5374         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5375         to return the pattern statement rather than the original statement;
5376         don't do the same transformation here.
5377         (vect_is_simple_use): If the defining statement has been replaced
5378         by a pattern statement, return the pattern statement instead.
5379         Remove the corresponding (local) transformation from the vectype
5380         overload.
5382 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5384         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5385         end and default to null.
5386         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5387         (vectorizable_reduction): Update calls accordingly, dropping the
5388         gimple ** argument if the passed-back statement isn't needed.
5389         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5390         (vect_recog_rotate_pattern): Likewise.
5391         (vect_recog_mask_conversion_pattern): Likewise.
5392         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5393         (vect_mask_constant_operand_p): Likewise.
5394         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5395         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5396         (get_group_load_store_type, get_load_store_type): Likewise.
5397         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5398         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5399         (vectorizable_conversion, vectorizable_assignment): Likewise.
5400         (vectorizable_shift, vectorizable_operation): Likewise.
5401         (vectorizable_store, vect_is_simple_cond): Likewise.
5402         (vectorizable_condition, vectorizable_comparison): Likewise.
5403         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5404         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5405         and move it to the end.  Cope with null def_stmt_outs.
5407 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5409         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5411 2018-06-29  Jeff Law  <law@redhat.com>
5413         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5414         displacements for TARGET_V850E2V3 and newer.
5415         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5416         * config/v850/v850.md (sign23byte_load): Remove.
5417         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5418         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5420 2018-06-29  Martin Liska  <mliska@suse.cz>
5422         PR lto/85759
5423         * coverage.c (coverage_init): Mangle full path name.
5424         * doc/invoke.texi: Document the change.
5425         * gcov-io.c (mangle_path): New.
5426         * gcov-io.h (mangle_path): Likewise.
5427         * gcov.c (mangle_name): Use mangle_path for path mangling.
5429 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5431         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5432         if starting source register is not even.
5434 2018-06-29  Martin Liska  <mliska@suse.cz>
5436         PR tree-optimization/86263
5437         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5438         Make edge redirection.
5440 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5442         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5443         (dump_scope_depth): New variable.
5444         (get_dump_scope_depth): New function.
5445         (dump_begin_scope): New function.
5446         (dump_end_scope): New function.
5447         * dumpfile.h (get_dump_scope_depth): New declaration.
5448         (dump_begin_scope): New declaration.
5449         (dump_end_scope): New declaration.
5450         (class auto_dump_scope): New class.
5451         (AUTO_DUMP_SCOPE): New macro.
5452         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5453         AUTO_DUMP_SCOPE.
5455 2018-06-29  Richard Biener  <rguenther@suse.de>
5457         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5458         compute_all_dependences succeeds.
5459         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5460         exceed --param loop-max-datarefs-for-datadeps.
5462 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5464         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5466 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5468         PR target/86348
5469         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5470         alternative 0 in preferred_for_speed attribute.
5472 2018-06-28  Paul Koning  <ni1d@arrl.net>
5474         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5475         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5476         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5477         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5478         for shift insn patterns.
5480 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5482         * cgraph.c (cgraph_node::get_body): Replace assignments to
5483         "dump_file" with calls to set_dump_file.
5484         * dumpfile.c (alt_dump_file): Make static, and group with...
5485         (alt_flags): ...this definition.
5486         (dumps_are_enabled): New variable.
5487         (refresh_dumps_are_enabled): New function.
5488         (set_dump_file): New function.
5489         (set_alt_dump_file): New function.
5490         (gcc::dump_manager::dump_start): Replace assignments to
5491         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5492         set_alt_dump_file.
5493         (gcc::dump_manager::dump_finish): Likewise.
5494         * dumpfile.h (alt_dump_file): Delete decl.
5495         (dumps_are_enabled): New variable decl.
5496         (set_dump_file): New function decl.
5497         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5498         global.
5499         * tree-nested.c (lower_nested_functions): Replace assignments to
5500         "dump_file" with calls to set_dump_file.
5502 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5504         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5505         goto_locus of each outgoing edge of each basic block.
5507 2018-06-28  Richard Biener  <rguenther@suse.de>
5509         * dwarf2out.c (decl_scope_table): Remove.
5510         (push_decl_scope): Likewise.
5511         (pop_decl_scope): Likewise.
5512         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5513         (gen_struct_or_union_type_die): Likewise.
5514         (gen_tagged_type_die): Likewise.
5515         (dwarf2out_init): Do not initialize decl_scope_table.
5516         (dwarf2out_c_finalize): Do not free it.
5518 2018-06-28  Richard Biener  <rguenther@suse.de>
5520         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5521         deciding whether to not re-use a DIE.
5523 2018-06-28  Richard Biener  <rguenther@suse.de>
5525         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5526         DW_AT_abstract_origin attribute.
5528 2018-06-28  Martin Liska  <mliska@suse.cz>
5530         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5531         Use newly introduced constants.
5532         * tree-switch-conversion.h (struct jump_table_cluster):
5533         Define max_ratio_for_size and max_ratio_for_speed.
5535 2018-06-28  Martin Liska  <mliska@suse.cz>
5537         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5538         Add new checking assert to catch invalid state.
5539         (jump_table_cluster::can_be_handled): Handle single case
5540         clusters.
5541         (jump_table_cluster::is_beneficial): Bail out for such case.
5542         (bit_test_cluster::find_bit_tests):
5543         Add new checking assert to catch invalid state.
5544         (bit_test_cluster::can_be_handled): Handle single case
5545         clusters.
5546         (bit_test_cluster::is_beneficial): Bail out for such case.
5547         (switch_decision_tree::analyze_switch_statement):
5548         Fix comment.
5550 2018-06-28  Martin Liska  <mliska@suse.cz>
5552         * common.opt: Introduce -completion option.
5553         * gcc.c (driver_handle_option): Handle it.
5554         (driver::main): Print completions if completion
5555         is set.
5556         * opt-suggestions.c (option_proposer::get_completions):
5557         New function.
5558         (option_proposer::suggest_completion): Likewise.
5559         (option_proposer::find_param_completions): Likewise.
5560         (verify_autocompletions): Likewise.
5561         (test_completion_valid_options): Likewise.
5562         (test_completion_valid_params): Likewise.
5563         (in_completion_p): Likewise.
5564         (empty_completion_p): Likewise.
5565         (test_completion_partial_match): Likewise.
5566         (test_completion_garbage): Likewise.
5567         (opt_proposer_c_tests): Likewise.
5568         * opt-suggestions.h: Declare new functions.
5569         * opts.c (common_handle_option): Handle OPT__completion_.
5570         * selftest-run-tests.c (selftest::run_tests): Add
5571         opt_proposer_c_tests.
5572         * selftest.c (assert_str_startswith): New.
5573         * selftest.h (assert_str_startswith): Likewise.
5574         (opt_proposer_c_tests): New.
5575         (ASSERT_STR_STARTSWITH): Likewise.
5577 2018-06-28  Martin Liska  <mliska@suse.cz>
5579         * Makefile.in: Add opt-suggestions.o.
5580         * gcc-main.c: Include opt-suggestions.h.
5581         * gcc.c (driver::driver): Likewise.
5582         (driver::~driver): Remove m_option_suggestions.
5583         (driver::build_option_suggestions): Moved to option_proposer.
5584         (driver::suggest_option): Likewise.
5585         (driver::handle_unrecognized_options): Use option_proposer.
5586         * gcc.h (class driver): Add new memver m_option_proposer.
5587         * opt-suggestions.c: New file.
5588         * opt-suggestions.h: New file.
5590 2018-06-28  Martin Liska  <mliska@suse.cz>
5592         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5593         (auto_string_vec::~auto_string_vec): Likewise.
5595 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5597         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5598         prevent_decl_creation_for_types fields up and add reset_location field.
5599         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5600         statement if id->reset_location is true.
5601         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5602         id->reset_location is true.
5603         (copy_phis_for_bb): Force input_location on the arguments if
5604         id->reset_location is true.
5605         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5606         is set on the function to be inlined.
5608 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5610         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5612 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5614         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5615         registers for Pmode.
5616         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5617         hard registers for the clobbered pseudo.
5619 2018-06-27  Paul Koning  <ni1d@arrl.net>
5621         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5622         mutually exclusive options.
5623         * config/pdp11/constraints.md (h): New constraint.
5624         (O): Update definition to match shift code generation.
5625         (D): New constraint.
5626         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5627         (CCFP): Remove.
5628         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5629         function.
5630         (output_jump): Change arguments.
5631         (pdp11_fixed_cc_regs): New function.
5632         (pdp11_cc_mode): Ditto.
5633         (pdp11_expand_shift): Ditto.
5634         (pdp11_assemble_shift): Ditto.
5635         (pdp11_small_shift): Ditto.
5636         (pdp11_branch_cost): Remove.
5637         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5638         from output.
5639         (pdp11_register_move_cost): Update for CC registers.
5640         (pdp11_rtx_costs): Add case for LSHIFTRT.
5641         (pdp11_output_jump): Add CCNZ mode conditional branches.
5642         (notice_update_cc_on_set): Remove.
5643         (pdp11_cc_mode): New function.
5644         (simple_memory_operand): Correct pre/post decrement case.
5645         (no_side_effect_operand): New function.
5646         (pdp11_regno_reg_class): Add CC_REGS class.
5647         (pdp11_fixed_cc_regs): New function.
5648         (pdp11_small_shift): New function.
5649         (pdp11_expand_shift): New function to expand shift insns.
5650         (pdp11_assemble_shift): New function to output shifts.
5651         (pdp11_branch_cost): Remove.
5652         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5653         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5654         (WCHAR_TYPE): Ditto.
5655         (PTRDIFF_TYPE): Ditto.
5656         (ADJUST_INSN_LENGTH): New macro.
5657         (FIXED_REGISTERS): Add CC registers.
5658         (CALL_USED_REGISTERS): Ditto.
5659         (reg_class): Ditto.
5660         (REG_CLASS_NAMES): Ditto.
5661         (REG_CLASS_CONTENTS): Ditto.
5662         (SELECT_CC_MODE): Use new function.
5663         (TARGET_FLAGS_REGNUM): New macro.
5664         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5665         (cc0_reg_rtx): Remove.
5666         (CC_STATUS_MDEP): Remove.
5667         (CC_STATUS_MDEFP_INIT): Remove.
5668         (CC_IN_FPU): Remove.
5669         (NOTICE_UPDATE_CC): Remove.
5670         (REGISTER_NAMES): Add CC registers.
5671         (BRANCH_COST): Change to constant 1.
5672         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5673         handling.
5674         * config/pdp11/pdp11.opt (mbcopy): Remove.
5675         (mbcopy-builtin): Remove.
5676         (mbranch-cheap): Remove.
5677         (mbranch-expensive): Remove.
5678         * config/pdp11/predicates.md (expand_shift_operand): Update to
5679         match shift code generation.
5680         (ccnz_operator): New predicate.
5681         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5682         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5683         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5684         exclusive options.
5685         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5686         description of O constraint.
5688 2018-06-27  Jeff Law  <law@redhat.com>
5689             Austin Law  <austinklaw@gmail.com>
5691         * config/v850/v850.md (addsi3_set_flags): New pattern.
5692         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5693         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5694         (zero_extendhisi2_v850_set_flags): Likewise.
5695         (zero_extendqisi2_v850_set_flags): Likewise.
5696         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5697         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5698         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5700         * config/v850/v850-protos.h (notice_update_cc): Remove.
5701         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5702         (v850_print_operand): Handle 'D' and "d".
5703         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5704         Add handling of arithmetic/logical operations compared against zero.
5705         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5706         Do not look at v850_compare_op, instead get mode from last argument.
5707         (v850_gen_compare): Remove
5708         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5709         after reload for prologue insns.
5710         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5711         patterns.
5712         (construct_save_jarl): Likewise.
5713         (TARGET_FLAGS_REGNUM): Define.
5714         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5715         (NOTICE_UPDATE_CC): Remove.
5716         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5717         than cc0.  Conditionalize on reload_completed.
5718         (cmpsi_insn, setfcc_insn): Likewise.
5719         (tst1 splitter): Turn into define_and_split which sets the flags
5720         after reload.
5721         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5722         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5723         (cstoresf4, cstoredf4): Clobber the flags.
5724         (cmpsi, cmpsf, cmpdf): Remove expanders.
5725         (setf_insn): Remove pattern.
5726         (addsi3): Turn into define_and_split which clobbers the flags after
5727         reload and a suitable pattern (addsi3_clobber_flags) for use after
5728         reload.
5729         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5730         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5731         (ashrsi3, ashrsi3_v850e2): Likewise.
5732         (bins): Clobber the flags.
5733         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5734         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5735         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5736         (call_value_internal_short, call_value_internal_long): Likewise.
5737         (callt_save_interrupt, callt_return_interrupt): Likewise.
5738         (save_interrupt, return_interrupt): Likewise.
5739         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5740         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5741         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5742         (All FP comparisons): Only allow after reload has completed.
5743         (trfsr): Likewise.
5744         (divh, divhu): Tweak output template.
5745         (branch_z_normal, branch_z_invert): Remove
5746         (branch_nz_normal, branch_nz_invert): Likewise.
5747         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5749         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5750         * config/v850/v850.c (notice_update_cc): Remove.
5751         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5752         (CC_NO_CARRY): Likewise.
5753         (NOTICE_UPDATE_CC): Define to nothing.
5754         * config/v850/v850.md: Remove block comment on cc0 handling
5755         Remove "cc" attribute from all patterns.  Remove cc_status handling
5756         from all patterns.  Minor formatting fixes.
5758 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5760         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5761         (cortex-a76.cortex-a55): Likewise.
5762         * config/aarch64/aarch64-tune.md: Regenerate.
5763         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5764         cortex-a76.cortex-a55.
5766 2018-06-27  Jeff Law  <law@redhat.com>
5768         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5769         (MULTILIB_DIRNAMES): Similarly.
5771 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5773         * gimple.h (gimple_return_retbnd): Delete.
5774         (gimple_return_set_retbnd): Likewise.
5775         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5776         gimple_return_set_retbnd.
5777         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5778         gimple_return_retbnd and adjust.
5779         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5780         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5781         Explicitly return NULL in a couple more cases.  Move assertion
5782         on debug statements and remove unreachable code.
5783         (reset_debug_binding): Do not test id->retbnd.
5784         (expand_call_inline): Do not set it.
5786 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5788         * configure.ac: Add --disable-gcov option.
5789         * configure: Regenerate.
5790         * Makefile.in: Honour @enable_gcov@.
5791         * doc/install.texi: Document --disable-gcov.
5793 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5795         * config/arm/arm-cpus.in (cortex-a76): New entry.
5796         (cortex-a76.cortex-a55): Likewise.
5797         * config/arm/arm-tables.opt: Regenerate.
5798         * config/arm/arm-tune.md: Likewise.
5799         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5800         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5801         cortex-a76.cortex-a55.
5803 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5805         PR target/85769
5806         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5808 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5810         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5811         comment.
5812         (EPILOGUE_USES): Likewise.
5814 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5816         * tree-inline.c (remap_location): New function extracted from...
5817         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5818         (copy_phis_for_bb): ...here.  Call remap_location.
5819         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5821 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5823         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5824         unaligned vsx for 16B memset.
5826 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5828         PR target/86285
5829         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5830         ieee128_float_type_node to long_double_type_node unless
5831         TARGET_LONG_DOUBLE_128 is set.
5833 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5835         * cfgloop.c (get_loop_location): Convert return type from
5836         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5837         by implicit construction from rtx_insn *, and using
5838         dump_user_location_t::from_function_decl for the fallback case.
5839         * cfgloop.h (get_loop_location): Convert return type from
5840         location_t to dump_user_location_t.
5841         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5842         dump_printf_loc to pass in a dump_location_t rather than a
5843         location_t, via the gimple stmt.
5844         * coverage.c (get_coverage_counts): Update calls to
5845         dump_printf_loc to pass in dump_location_t rather than a
5846         location_t.
5847         * doc/optinfo.texi (Dump types): Convert example of
5848         dump_printf_loc from taking "locus" to taking "insn".  Update
5849         description of the "_loc" calls to cover dump_location_t.
5850         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5851         "selftest.h".
5852         (dump_user_location_t::dump_user_location_t): New constructors,
5853         from gimple *stmt and rtx_insn *.
5854         (dump_user_location_t::from_function_decl): New function.
5855         (dump_loc): Make static.
5856         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5857         const dump_location_t &.
5858         (dump_generic_expr_loc): Delete.
5859         (dump_printf_loc): Convert param "loc" from location_t to
5860         const dump_location_t &.
5861         (selftest::test_impl_location): New function.
5862         (selftest::dumpfile_c_tests): New function.
5863         * dumpfile.h: Include "profile-count.h".
5864         (class dump_user_location_t): New class.
5865         (struct dump_impl_location_t): New struct.
5866         (class dump_location_t): New class.
5867         (dump_printf_loc): Convert 2nd param from source_location to
5868         const dump_location_t &.
5869         (dump_generic_expr_loc): Delete.
5870         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5871         const dump_location_t &.
5872         * gimple-fold.c (fold_gimple_assign): Update call to
5873         dump_printf_loc to pass in a dump_location_t rather than a
5874         location_t, via the gimple stmt.
5875         (gimple_fold_call): Likewise.
5876         * gimple-loop-interchange.cc
5877         (loop_cand::analyze_iloop_reduction_var): Update for change to
5878         check_reduction_path.
5879         (tree_loop_interchange::interchange): Update for change to
5880         find_loop_location.
5881         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5882         change in return-type of find_loop_location.
5883         (graphite_regenerate_ast_isl): Likewise.
5884         * graphite-optimize-isl.c (optimize_isl): Likewise.
5885         * graphite.c (graphite_transform_loops): Likewise.
5886         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5887         pass in a dump_location_t rather than a location_t, via the
5888         gimple stmt.
5889         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5890         * ipa.c (walk_polymorphic_call_targets): Likewise.
5891         * loop-unroll.c (report_unroll): Convert "locus" param from
5892         location_t to dump_location_t.
5893         (decide_unrolling): Update for change to get_loop_location's
5894         return type.
5895         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5896         location_t to dump_user_location_t.
5897         (grid_find_single_omp_among_assignments_1): Updates calls to
5898         dump_printf_loc to pass in a dump_location_t rather than a
5899         location_t, via the gimple stmt.
5900         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5901         location_t to dump_location_t.  Updates calls to dump_printf_loc
5902         to pass in a dump_location_t rather than a location_t, via the
5903         gimple stmt.
5904         (grid_inner_loop_gridifiable_p): Likewise.
5905         (grid_dist_follows_simple_pattern): Likewise.
5906         (grid_gfor_follows_tiling_pattern): Likewise.
5907         (grid_target_follows_gridifiable_pattern): Likewise.
5908         (grid_attempt_target_gridification): Convert initialization
5909         of local "grid" from memset to zero-initialization; FIXME: does
5910         this require C++11?  Update call to dump_printf_loc to pass in a
5911         optinfo_location rather than a location_t, via the gimple stmt.
5912         * profile.c (read_profile_edge_counts): Updates call to
5913         dump_printf_loc to pass in a dump_location_t rather than a
5914         location_t
5915         (compute_branch_probabilities): Likewise.
5916         * selftest-run-tests.c (selftest::run_tests): Call
5917         dumpfile_c_tests.
5918         * selftest.h (dumpfile_c_tests): New decl.
5919         * tree-loop-distribution.c (pass_loop_distribution::execute):
5920         Update for change in return type of find_loop_location.
5921         * tree-parloops.c (parallelize_loops): Likewise.
5922         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5923         "locus" from location_t to dump_user_location_t.
5924         (canonicalize_loop_induction_variables): Likewise.
5925         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5926         for change in return type of find_loop_location.
5927         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5928         to dump_printf_loc to pass in a dump_location_t rather than a
5929         location_t, via the stmt.
5930         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5931         Likewise.
5932         * tree-vect-loop-manip.c (find_loop_location): Convert return
5933         type from source_location to dump_user_location_t.
5934         (vect_do_peeling): Update for above change.
5935         (vect_loop_versioning): Update for change in type of
5936         vect_location.
5937         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5938         from location_t to dump_user_location_t.
5939         (vect_estimate_min_profitable_iters): Update for change in type
5940         of vect_location.
5941         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5942         location_t to dump_location_t.
5943         (vect_slp_bb): Update for change in type of vect_location.
5944         * tree-vectorizer.c (vect_location): Convert from source_location
5945         to dump_user_location_t.
5946         (try_vectorize_loop_1): Update for change in vect_location's type.
5947         (vectorize_loops): Likewise.
5948         (increase_alignment): Likewise.
5949         * tree-vectorizer.h (vect_location): Convert from source_location
5950         to dump_user_location_t.
5951         (find_loop_location): Convert return type from source_location to
5952         dump_user_location_t.
5953         (check_reduction_path): Convert 1st param from location_t to
5954         dump_user_location_t.
5955         * value-prof.c (check_counter): Update call to dump_printf_loc to
5956         pass in a dump_user_location_t rather than a location_t; update
5957         call to error_at for change in type of "locus".
5958         (check_ic_target): Update call to dump_printf_loc to
5959         pass in a dump_user_location_t rather than a location_t, via the
5960         call_stmt.
5962 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5964         * config/s390/s390.h (enum processor_flags): Do not use
5965         default tune parameter when -march was specified.
5967 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5969         PR target/86314
5970         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5971         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5972         operands.
5974 2018-06-26  Richard Biener  <rguenther@suse.de>
5976         PR tree-optimization/86287
5977         PR bootstrap/86316
5978         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5979         (vect_analyze_loop): Initialize n_stmts.
5981 2018-06-26  Richard Biener  <rguenther@suse.de>
5983         PR middle-end/86271
5984         * fold-const.c (fold_convertible_p): Pointer extension
5985         isn't valid.
5987 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5989         PR debug/86064
5990         * dwarf2out.c (loc_list_has_views): Adjust comments.
5991         (dw_loc_list): Split single cross-partition range with
5992         nonzero locview.
5994 2018-06-25  Jeff Law  <law@redhat.com>
5996         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5997         on -mbig-switch by default.
5999         * config/v850/predicates.md (const_float_1_operand): Fix match_code
6000         test.
6001         (const_float_0_operand): Remove unused predicate.
6002         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
6003         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
6004         (recipsf2): New expander.  Original pattern now called
6005         (recipsf2_insn).
6006         (recipdf2, recipdf2_insn): Similarly.
6007         (rsqrtsf2, rsqrtsf2_insn): Similarly
6008         (rsqrtdf2, rsqrtdf2_insn): Similarly
6010 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
6012         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
6013         Simplify logic for FreeBSD (twice).
6015 2018-06-25  Martin Sebor  <msebor@redhat.com>
6017         PR tree-optimization/86204
6018         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
6019         a strnlen result if it's less than the length of the string.
6021 2018-06-25  Martin Sebor  <msebor@redhat.com>
6023         PR tree-optimization/85700
6024         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
6025         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
6026         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
6028 2018-06-25  Martin Sebor  <msebor@redhat.com>
6030         * doc/extend.texi (Zero-length arrays): Update and clarify.
6032 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
6034         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
6035         added IEEE/IBM long double multilib support on PowerPC little
6036         endian Linux systems.
6037         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
6038         (MULTILIB_DEFAULTS): Likewise.
6039         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6040         Likewise.
6041         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
6042         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
6043         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
6045 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
6047         PR middle-end/86311
6048         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
6049         (REORDER_45): Likewise.
6051 2018-06-25  Jeff Law  <law@redhat.com>
6053         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
6054         dividend to 32 bits.  Adjust length.
6055         (udivmodhi4): Cleanup output template.  Fix length.
6057 2018-06-25  Carl Love  <cel@us.ibm.com>
6059         * config/rs6000/vsx.md: Change word selector to prefered location.
6061 2018-06-25  Richard Biener  <rguenther@suse.de>
6063         PR tree-optimization/86304
6064         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
6065         epilogue-if-converted loops as well.
6067 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
6069         * lto-section-out.c (lto_begin_section): Do not print section
6070         name for noaddr and unnumbered dumps.
6072 2018-06-25  Richard Biener  <rguenther@suse.de>
6074         * tree-vectorizer.h (struct vec_info_shared): New structure
6075         with parts split out from struct vec_info and loop_nest from
6076         struct _loop_vec_info.
6077         (struct vec_info): Adjust accordingly.
6078         (struct _loop_vec_info): Likewise.
6079         (LOOP_VINFO_LOOP_NEST): Adjust.
6080         (LOOP_VINFO_DATAREFS): Likewise.
6081         (LOOP_VINFO_DDRS): Likewise.
6082         (struct _bb_vec_info): Likewise.
6083         (BB_VINFO_DATAREFS): Likewise.
6084         (BB_VINFO_DDRS): Likewise.
6085         (struct _stmt_vec_info): Add dr_aux member.
6086         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
6087         (DR_MISALIGNMENT_UNINITIALIZED): New.
6088         (set_dr_misalignment): Adjust.
6089         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
6090         (vect_analyze_loop): Adjust prototype.
6091         (vect_analyze_loop_form): Likewise.
6092         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6093         Compute dependences lazily.
6094         (vect_record_base_alignments): Use shared datarefs/ddrs.
6095         (vect_verify_datarefs_alignment): Likewise.
6096         (vect_analyze_data_refs_alignment): Likewise.
6097         (vect_analyze_data_ref_accesses): Likewise.
6098         (vect_analyze_data_refs): Likewise.
6099         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
6100         constructor parameter for shared part.
6101         (vect_analyze_loop_form): Pass in shared part and adjust.
6102         (vect_analyze_loop_2): Pass in storage for the number of
6103         stmts.  Move loop nest finding to the caller.  Compute
6104         datarefs lazily.
6105         (vect_analyze_loop): Pass in shared part.
6106         (vect_transform_loop): Verify shared datarefs are unchanged.
6107         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6108         constructor parameter for shared part.
6109         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6110         (vect_slp_bb): Verify shared datarefs are unchanged before
6111         transform.
6112         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6113         change.
6114         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6115         DR_MISALIGNMENT_UNINITIALIZED.
6116         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6117         parameter for shared part.
6118         (vec_info::~vec_info): Adjust.
6119         (vec_info_shared::vec_info_shared): New.
6120         (vec_info_shared::~vec_info_shared): Likewise.
6121         (vec_info_shared::save_datarefs): Likewise.
6122         (vec_info_shared::check_datarefs): Likewise.
6123         (try_vectorize_loop_1): Construct shared part live for analyses
6124         of a single loop for multiple vector sizes.
6125         * tree-parloops.c (gather_scalar_reductions): Adjust.
6127 2018-06-25  Richard Biener  <rguenther@suse.de>
6129         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6130         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6131         (vect_analyze_data_refs): Remove similar code from here and
6132         simplify accordingly.
6134 2018-06-25  Richard Biener  <rguenther@suse.de>
6136         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6137         for reverse storage order accesses rather than asserting
6138         they cannot happen here.
6140 2018-06-25  Tom de Vries  <tdevries@suse.de>
6142         PR debug/86257
6143         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6144         Use data16 instead of .byte for insn prefix.
6146 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6148         PR C++/86082
6149         * parser.c (make_char_string_pack): Pass this literal chars
6150         through cpp_interpret_string.
6151         (cp_parser_userdef_numeric_literal): Check the result of
6152         make_char_string_pack.
6154 2018-06-24  Maya Rashish  <coypu@sdf.org>
6156         * ginclude/stddef.h: Simplify conditions around avoiding
6157         re-definition of __size_t.
6159 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6161         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6162         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6164 2018-06-22  Maya Rashish  <coypu@sdf.org>
6166         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6167         made to OpenBSD and NetBSD through the years.
6169 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6171         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6172         behavior of vec_pack (vector double, vector double) to match
6173         behavior of vec_float2 (vector double, vector double).
6175 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6177         * gimplify.c (gimplify_function_tree): Prevent creation
6178         of a trampoline for the address of the current function
6179         passed to entry/exit instrumentation hooks.
6181 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6183         PR target/86222
6184         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6185         correctly.
6187 2018-06-22  Martin Liska  <mliska@suse.cz>
6189         PR tree-optimization/86263
6190         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6191         Bail out if is_enabled is false.
6192         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6193         New declaration.
6194         (jump_table_cluster::is_enabled): New function.
6196 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6198         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6199         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6200         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6201         (lto_input_ts_binfo_tree_pointers): Likewise.
6202         * tree-streamer-out.c (streamer_write_tree_bitfields,
6203         write_ts_binfo_tree_pointers): Likewise.
6204         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6206 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6208         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6210 2018-06-22  Martin Liska  <mliska@suse.cz>
6212         * symbol-summary.h (get): Make it pure and inline move
6213         functionality from ::get function.
6214         (get): Remove and inline into ::get and ::get_create.
6215         (get_create): Move code from ::get function.
6217 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6219         PR target/85994
6220         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6221         -x assembler-with-cpp.
6223 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6225         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6226         _FILE_OFFSET_BITS=64 for C++.
6228 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6230         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6231         conversion insn that shows up when pr85657-3.c is compiled using
6232         IEEE 128-bit long double.
6233         (neg<mode>2_internal): Use the correct mode to check whether the
6234         mode is IBM extended.
6235         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6236         multiply and divide external functions from being created more
6237         than once.
6239 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6241         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6242         functions.
6243         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6244         the edge can be forwarded.
6245         (cfg_layout_merge_blocks): Likewise.
6247 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6249         * except.c (finish_eh_generation): Commit edge insertions only after
6250         the EH edges have been redirected from post-landing to landing pads.
6252 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6254         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6255         create_tmp_var_for to create the FRAME decl.
6256         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6258 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6260         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6261         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6262         debug statement when resetting its value.
6263         (expand_call_inline): Copy the locus of the call onto the assignment
6264         of the return value, if any.  Use local variable in more cases.
6266 2018-06-21  Martin Liska  <mliska@suse.cz>
6268         * ipa-pure-const.c (propagate_nothrow): Use
6269         funct_state_summaries->get.
6270         (dump_malloc_lattice): Likewise.
6271         (propagate_malloc): Likewise.
6273 2018-06-21  Richard Biener  <rguenther@suse.de>
6275         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6276         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6277         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6278         comment.
6279         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6280         BLOCK_ABSTRACT_ORIGIN unconditionally.
6282 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6284         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6285         deleting it.
6286         * ipa-reference.c (ipa_reference_c_finalize): Delete
6287         ipa_ref_opt_sum_summaries and set it to NULL.
6289 2018-06-21  Tom de Vries  <tdevries@suse.de>
6291         PR tree-optimization/85859
6292         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6293         test with comment from bb_no_side_effects_p.
6295 2018-06-21  Richard Biener  <rguenther@suse.de>
6297         PR tree-optimization/86232
6298         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6299         max for constant niter.
6301 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6303         * config/aarch64/aarch64-simd.md
6304         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6306 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6308         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6309         Make opernads of the unspec commutative.
6311 2018-06-21  Richard Biener  <rguenther@suse.de>
6313         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6314         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6315         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6316         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6317         NULL DR_STEP.
6318         (vect_record_base_alignments): Do not record base alignment
6319         for gathers or scatters.
6320         (vect_compute_data_ref_alignment): Drop return value that is always
6321         true.  Bail out early for gathers or scatters.
6322         (vect_enhance_data_refs_alignment): Bail out early for gathers
6323         or scatters.
6324         (vect_find_same_alignment_drs): Likewise.
6325         (vect_analyze_data_refs_alignment): Remove dead code.
6326         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6327         (vect_analyze_data_refs): For possible gathers or scatters do
6328         not create an alternate DR, just check their possible validity
6329         and mark them.  Adjust DECL_NONALIASED handling to not rely
6330         on DR_BASE_ADDRESS.
6331         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6332         update inits of gathers or scatters.
6333         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6334         Also copy gather/scatter flag to pattern vinfo.
6336 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6338         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6339         behavior of vec_packsu (vector unsigned long long, vector unsigned
6340         long long) to match behavior of vec_packs with same signature.
6342 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6343             Thomas Schwinge <thomas@codesourcery.com>
6344             Cesar Philippidis  <cesar@codesourcery.com>
6346         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6347         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6348         (gimplify_adjust_omp_clauses): Likewise.
6349         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6350         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6351         (gimplify_omp_target_update): Update handling of acc update and
6352         enter/exit data.
6353         * omp-low.c (install_var_field): Remove unused parameter
6354         base_pointers_restrict.
6355         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6356         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6357         FINALIZE}
6358         (omp_target_base_pointers_restrict_p): Delete.
6359         (scan_omp_target): Update call to scan_sharing_clauses.
6360         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6361         FINALIZE}.
6362         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6363         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6364         (convert_local_omp_clauses): Likewise.
6365         * tree-pretty-print.c (dump_omp_clause): Likewise.
6366         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6367         FINALIZE}.
6368         (omp_clause_code_name): Likewise.
6370 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6372         PR debug/86194
6373         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6374         be narrowed.
6376         PR tree-optimization/86231
6377         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6378         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6380 2018-06-20  Tom de Vries  <tdevries@suse.de>
6382         PR tree-optimization/86097
6383         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6384         iv type if signedness of iv type is not the same as that of *nit.
6386 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6388         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6389         EDGE_EH edges, verify they are all EDGE_EH.
6391 2018-06-20  Maya Rashish  <coypu@sdf.org>
6393         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6395 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6397         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6398         * config/aarch64/aarch64.c (xgene1_tunings): Add
6399         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6400         (aarch64_mode_valid_for_sched_fusion_p):
6401         Allow 16-byte modes.
6402         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6403         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6404         128-bit modes.
6405         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6406         New pattern.
6407         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6408         * config/aarch64/iterators.md (VQ2): New mode iterator.
6410 2018-06-20  Martin Liska  <mliska@suse.cz>
6412         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6413         Change default ratio from 10 to 8.
6415 2018-06-20  Martin Liska  <mliska@suse.cz>
6417         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6418         New.
6419         (bit_test_cluster::find_bit_tests): Likewise.
6420         (switch_decision_tree::analyze_switch_statement): Find clusters.
6421         * tree-switch-conversion.h (struct jump_table_cluster): Document
6422         hierarchy.
6424 2018-06-20  Martin Liska  <mliska@suse.cz>
6426         * tree-switch-conversion.c (switch_conversion::collect):
6427         Record m_uniq property.
6428         (switch_conversion::expand): Bail out for special conditions.
6429         (group_cluster::~group_cluster): New.
6430         (group_cluster::group_cluster): Likewise.
6431         (group_cluster::dump): Likewise.
6432         (jump_table_cluster::emit): New.
6433         (switch_decision_tree::fix_phi_operands_for_edges): New.
6434         (struct case_node): Remove struct.
6435         (jump_table_cluster::can_be_handled): New.
6436         (case_values_threshold): Moved to header.
6437         (reset_out_edges_aux): Likewise.
6438         (jump_table_cluster::is_beneficial): New.
6439         (bit_test_cluster::can_be_handled): Likewise.
6440         (add_case_node): Remove.
6441         (bit_test_cluster::is_beneficial): New.
6442         (case_bit_test::cmp): New.
6443         (bit_test_cluster::emit): New.
6444         (expand_switch_as_decision_tree_p): Remove.
6445         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6446         (fix_phi_operands_for_edge): Likewise.
6447         (switch_decision_tree::analyze_switch_statement): New.
6448         (compute_cases_per_edge): Move ...
6449         (switch_decision_tree::compute_cases_per_edge): ... here.
6450         (try_switch_expansion): Likewise.
6451         (switch_decision_tree::try_switch_expansion): Likewise.
6452         (record_phi_operand_mapping): Likewise.
6453         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6454         (emit_case_decision_tree): Likewise.
6455         (switch_decision_tree::emit): Likewise.
6456         (balance_case_nodes): Likewise.
6457         (switch_decision_tree::balance_case_nodes): Likewise.
6458         (dump_case_nodes): Likewise.
6459         (switch_decision_tree::dump_case_nodes): Likewise.
6460         (emit_jump): Likewise.
6461         (switch_decision_tree::emit_jump): Likewise.
6462         (emit_cmp_and_jump_insns): Likewise.
6463         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6464         (emit_case_nodes): Likewise.
6465         (switch_decision_tree::emit_case_nodes): Likewise.
6466         (conditional_probability): Remove.
6467         * tree-switch-conversion.h (enum cluster_type): New.
6468         (PRINT_CASE): New.
6469         (struct cluster): Likewise.
6470         (cluster::cluster): Likewise.
6471         (struct simple_cluster): Likewise.
6472         (simple_cluster::simple_cluster): Likewise.
6473         (struct group_cluster): Likewise.
6474         (struct jump_table_cluster): Likewise.
6475         (struct bit_test_cluster): Likewise.
6476         (struct min_cluster_item): Likewise.
6477         (struct case_tree_node): Likewise.
6478         (case_tree_node::case_tree_node): Likewise.
6479         (jump_table_cluster::case_values_threshold): Likewise.
6480         (struct case_bit_test): Likewise.
6481         (struct switch_decision_tree): Likewise.
6482         (struct switch_conversion): Likewise.
6483         (switch_decision_tree::reset_out_edges_aux): Likewise.
6485 2018-06-20  Martin Liska  <mliska@suse.cz>
6487         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6488         (hoist_edge_and_branch_if_true): Likewise.
6489         (expand_switch_using_bit_tests_p): Likewise.
6490         (struct case_bit_test): Likewise.
6491         (case_bit_test_cmp): Likewise.
6492         (emit_case_bit_tests): Likewise.
6493         (switch_conversion::switch_conversion): New class.
6494         (struct switch_conv_info): Remove old struct.
6495         (collect_switch_conv_info): More to ...
6496         (switch_conversion::collect): ... this.
6497         (check_range): Likewise.
6498         (switch_conversion::check_range): Likewise.
6499         (check_all_empty_except_final): Likewise.
6500         (switch_conversion::check_all_empty_except_final): Likewise.
6501         (check_final_bb): Likewise.
6502         (switch_conversion::check_final_bb): Likewise.
6503         (create_temp_arrays): Likewise.
6504         (switch_conversion::create_temp_arrays): Likewise.
6505         (free_temp_arrays): Likewise.
6506         (gather_default_values): Likewise.
6507         (switch_conversion::gather_default_values): Likewise.
6508         (build_constructors): Likewise.
6509         (switch_conversion::build_constructors): Likewise.
6510         (constructor_contains_same_values_p): Likewise.
6511         (switch_conversion::contains_same_values_p): Likewise.
6512         (array_value_type): Likewise.
6513         (switch_conversion::array_value_type): Likewise.
6514         (build_one_array): Likewise.
6515         (switch_conversion::build_one_array): Likewise.
6516         (build_arrays): Likewise.
6517         (switch_conversion::build_arrays): Likewise.
6518         (gen_def_assigns): Likewise.
6519         (switch_conversion::gen_def_assigns): Likewise.
6520         (prune_bbs): Likewise.
6521         (switch_conversion::prune_bbs): Likewise.
6522         (fix_phi_nodes): Likewise.
6523         (switch_conversion::fix_phi_nodes): Likewise.
6524         (gen_inbound_check): Likewise.
6525         (switch_conversion::gen_inbound_check): Likewise.
6526         (process_switch): Use the newly created class.
6527         (switch_conversion::expand): New.
6528         (switch_conversion::~switch_conversion): New.
6529         * tree-switch-conversion.h: New file.
6531 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6533         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6534         tree-vect-patterns.c.
6535         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6536         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6537         (vect_recog_sad_pattern): Likewise.
6538         (vect_recog_widen_sum_pattern): Likewise.
6539         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6540         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6541         (vect_recog_rotate_pattern): Likewise.
6542         (vect_recog_mult_pattern): Likewise.
6543         (vect_recog_vector_vector_shift_pattern): Likewise.
6544         (vect_recog_divmod_pattern): Likewise.
6545         (vect_recog_mixed_size_cond_pattern): Likewise.
6546         (vect_recog_bool_pattern): Likewise.
6547         (vect_recog_mask_conversion_pattern): Likewise.
6548         (vect_try_gather_scatter_pattern): Likewise.
6549         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6550         (vect_recog_over_widening_pattern): Likewise.
6551         (vect_recog_gather_scatter_pattern): Likewise.
6552         (vect_recog_func_ptr): Move from tree-vectorizer.h
6553         (vect_vect_recog_func_ptrs): Move further down the file.
6554         (vect_recog_func): Likewise.  Remove the third argument.
6555         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6556         (vect_pattern_recog_1): Expect the pattern function to do any
6557         necessary target tests.  Also expect it to provide a vector type.
6558         Remove the type_in handling.
6560 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6562         * tree-vect-patterns.c (vect_pattern_detected): New function.
6563         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6564         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6565         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6566         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6567         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6568         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6569         (vect_recog_mask_conversion_pattern)
6570         (vect_try_gather_scatter_pattern): Likewise.
6572 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6574         * tree-vect-patterns.c (vect_get_internal_def): New function.
6575         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6576         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6577         (search_type_for_mask_1): Use it.
6579 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6581         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6582         redundant WIDEN_SUM_EXPR handling.
6583         (vect_recog_sad_pattern): Likewise.
6585 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6587         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6588         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6589         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6590         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6591         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6593 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6595         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6596         use the stmt_vec_info of the original bb statement for the
6597         new zero assignment, even if the call is part of a pattern.
6599 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6601         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6602         that the sequence is attached to the original statement rather
6603         than the pattern statement.
6604         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6605         PATTERN_DEF_SEQ from the original statement rather than
6606         the main pattern statement.
6607         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6608         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6609         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6611 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6613         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6614         definition statements before the early exit for statements that aren't
6615         live or relevant.
6616         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6617         split out from...
6618         (vect_transform_loop): ...here.  Process pattern definition
6619         statements without first checking whether the main pattern
6620         statement is live or relevant.
6622 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6624         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6625         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6627 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6629         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6630         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6631         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6632         (expand_block_compare): Change select_block_compare_mode call.
6633         (expand_strncmp_align_check): Use new functions, fix comment.
6634         (emit_final_str_compare_gpr): New function.
6635         (expand_strn_compare): Refactor and clean up code.
6636         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6638 2018-06-19  Tony Reix  <tony.reix@atos.com>
6639             Damien Bergamini  <damien.bergamini@atos.com>
6640             David Edelsohn  <dje.gcc@gmail.com>
6642         * collect2.c (static_obj): New variable.
6643         (static_libs): New variable.
6644         (is_in_list): Uncomment declaration.
6645         (main): Track AIX libraries linked statically.
6646         (is_in_list): Uncomment definition.
6647         (scan_prog_file): Don't add AIX shared libraries initializer
6648         to constructor list if linking statically.
6650 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6652         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6653         constant.
6654         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6656 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6658         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6659         blocks.
6661 2018-06-19  Martin Liska  <mliska@suse.cz>
6663         * config/i386/i386.c (ix86_can_inline_p): Do not use
6664         ipa_fn_summaries::get_create.
6665         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6666         get.
6667         (devirtualization_time_bonus): Likewise.
6668         (ipcp_propagate_stage): Likewise.
6669         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6670         (edge_set_predicate): Likewise.
6671         (evaluate_conditions_for_known_args): Likewise.
6672         (evaluate_properties_for_edge): Likewise.
6673         (ipa_call_summary::reset): Tranform to ...
6674         (ipa_call_summary::~ipa_call_summary): ... this.
6675         (ipa_fn_summary::reset): Transform to ...
6676         (ipa_fn_summary::~ipa_fn_summary): ... this.
6677         (ipa_fn_summary_t::remove): Rename to ...
6678         (ipa_fn_summary_t::remove_callees): ... this.
6679         (ipa_fn_summary_t::duplicate): Use placement new
6680         instead of memory copy.
6681         (ipa_call_summary_t::duplicate): Likewise.
6682         (ipa_call_summary_t::remove): Remove.
6683         (dump_ipa_call_summary): Change get_create to get.
6684         (ipa_dump_fn_summary): Dump only when summary exists.
6685         (analyze_function_body): Use symbol_summary::get instead
6686         of get_create.
6687         (compute_fn_summary): Likewise.
6688         (estimate_edge_devirt_benefit): Likewise.
6689         (estimate_edge_size_and_time): Likewise.
6690         (inline_update_callee_summaries): Likewise.
6691         (remap_edge_change_prob): Likewise.
6692         (remap_edge_summaries): Likewise.
6693         (ipa_merge_fn_summary_after_inlining): Likewise.
6694         (write_ipa_call_summary): Likewise.
6695         (ipa_fn_summary_write): Likewise.
6696         (ipa_free_fn_summary): Likewise.
6697         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6698         (struct ipa_call_summary): Likewise.
6699         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6700         of get_create.
6701         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6702         (estimate_size_after_inlining): Likewise.
6703         (estimate_growth): Likewise.
6704         (growth_likely_positive): Likewise.
6705         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6706         (inline_call): Likewise.
6707         * ipa-inline.c (caller_growth_limits): Likewise.
6708         (can_inline_edge_p): Likewise.
6709         (can_inline_edge_by_limits_p): Likewise.
6710         (compute_uninlined_call_time): Likewise.
6711         (compute_inlined_call_time): Likewise.
6712         (want_inline_small_function_p): Likewise.
6713         (edge_badness): Likewise.
6714         (update_caller_keys): Likewise.
6715         (update_callee_keys): Likewise.
6716         (inline_small_functions): Likewise.
6717         (inline_to_all_callers_1): Likewise.
6718         (dump_overall_stats): Likewise.
6719         (early_inline_small_functions): Likewise.
6720         (early_inliner): Likewise.
6721         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6722         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6723         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6724         * ipa-split.c (execute_split_functions): Likewise.
6725         * symbol-summary.h: Likewise.
6726         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6728 2018-06-19  Richard Biener  <rguenther@suse.de>
6730         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6731         (vectorize_loops): ... here.  Fix dbgcnt handling.
6732         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6734 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6736         PR target/86197
6737         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6738         ieee128 argument takes up only one (vector) register, not two (floating
6739         point) registers.
6741 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6743         * gimplify.c (gimplify_init_constructor): Really never clear for an
6744         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6746 2018-06-19  Richard Biener  <rguenther@suse.de>
6748         PR tree-optimization/86179
6749         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6750         after failed recognition.
6752 2018-06-18  Martin Sebor  <msebor@redhat.com>
6754         PR middle-end/85602
6755         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6756         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6757         Handle integer subtraction.
6758         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6759         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6761 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6763         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6764         param from rtx to rtx_insn *.
6765         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6766         param.
6767         (frv_ifcvt_modify_insn): Likwise.
6768         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6769         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6770         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6771         as_a <rtx_insn *> cast to local "unprotected_region" once
6772         it's been established that it's not NULL or pc_rtx.
6773         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6774         param "sethi" from rtx to rtx_insn *.
6775         (nds32_group_float_insns): Likewise for param "insn".
6776         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6777         param.
6778         (vax_output_int_subtract): Likewise.
6779         * config/vax/vax.c (vax_output_int_add): Likewise for param
6780         "insn".
6781         (vax_output_int_subtract): Likewise.
6782         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6783         (emit_pattern_after): Likewise for param "after".
6784         (emit_insn_after): Likewise.
6785         (emit_jump_insn_after): Likewise.
6786         (emit_call_insn_after): Likewise.
6787         (emit_debug_insn_after): Likewise.
6788         (emit_pattern_before): Likewise for param "before".
6789         (emit_insn_before): Likewise.
6790         (emit_jump_insn_before): Likewise.
6791         * final.c (get_insn_template): Likewise for param "insn", removing
6792         a cast.
6793         * output.h (get_insn_template): Likewise for 2nd param.
6794         * rtl.h (emit_insn_before): Likewise.
6795         (emit_jump_insn_before): Likewise.
6796         (emit_debug_insn_before_noloc): Likewise.
6797         (emit_insn_after): Likewise.
6798         (emit_jump_insn_after): Likewise.
6799         (emit_call_insn_after): Likewise.
6800         (emit_debug_insn_after): Likewise.
6801         (set_insn_deleted): Likewise for param.
6803 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6805         PR target/85358
6806         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6807         floating point modes, so that IFmode is numerically greater than
6808         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6809         to declare the ordering.  This prevents IFmode from being
6810         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6811         machine.  Include rs6000-modes.h to share the fractional values
6812         between genmodes* and the rest of the compiler.
6813         (IFmode): Likewise.
6814         (KFmode): Likewise.
6815         (TFmode): Likewise.
6816         * config/rs6000/rs6000-modes.h: New file.
6817         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6818         meaning of rs6000_long_double_size so that 126..128 selects an
6819         appropriate 128-bit floating point type.
6820         (rs6000_option_override_internal): Likewise.
6821         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6822         (TARGET_LONG_DOUBLE_128): Change the meaning of
6823         rs6000_long_double_size so that 126..128 selects an appropriate
6824         128-bit floating point type.
6825         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6826         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6827         source and destination to match the standard usage.
6828         (truncifkf2): Likewise.
6829         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6830         ISA 2.07 to use an explicit clobber, instead of passing in a
6831         temporary.
6832         (copysign<mode>3_soft): Likewise.
6834 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6836         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6837         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6838         (vect_slp_analyze_instance_dependence): Likewise.
6839         (vect_enhance_data_refs_alignment): Likewise.
6840         (vect_analyze_data_refs_alignment): Likewise.
6841         (vect_slp_analyze_and_verify_instance_alignment
6842         (vect_analyze_data_ref_accesses): Likewise.
6843         (vect_prune_runtime_alias_test_list): Likewise.
6844         (vect_analyze_data_refs): Likewise.
6845         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6846         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6847         (vect_analyze_scalar_cycles_1): Likewise.
6848         (vect_get_loop_niters): Likewise.
6849         (vect_analyze_loop_form_1): Likewise.
6850         (vect_update_vf_for_slp): Likewise.
6851         (vect_analyze_loop_operations): Likewise.
6852         (vect_analyze_loop): Likewise.
6853         (vectorizable_induction): Likewise.
6854         (vect_transform_loop): Likewise.
6855         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6856         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6857         (vect_make_slp_decision): Likewise.
6858         (vect_detect_hybrid_slp): Likewise.
6859         (vect_slp_analyze_operations): Likewise.
6860         (vect_slp_bb): Likewise.
6861         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6862         (vectorizable_bswap): Likewise.
6863         (vectorizable_call): Likewise.
6864         (vectorizable_simd_clone_call): Likewise.
6865         (vectorizable_conversion): Likewise.
6866         (vectorizable_assignment): Likewise.
6867         (vectorizable_shift): Likewise.
6868         (vectorizable_operation): Likewise.
6869         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6871 2018-06-18  Martin Sebor  <msebor@redhat.com>
6873         PR tree-optimization/81384
6874         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6875         * builtins.c (expand_builtin_strnlen): New function.
6876         (expand_builtin): Call it.
6877         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6878         * builtins.def (BUILT_IN_STRNLEN): New.
6879         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6880         Warn for bounds in excess of maximum object size.
6881         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6882         single-value ranges.  Handle strnlen.
6883         (handle_builtin_strlen): Handle strnlen.
6884         (strlen_check_and_optimize_stmt): Same.
6885         * doc/extend.texi (Other Builtins): Document strnlen.
6887 2018-06-18  Maya Rashish  <coypu@sdf.org>
6889         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6890         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6891         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6893         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6894         here to ...
6895         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6897 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6899         * tree.c (escaped_string::escape): Replace cast to char * by
6900         const_cast<char *> (unescaped).
6902 2018-06-18  Nick Clifton  <nickc@redhat.com>
6904         PR 84195
6905         * tree.c (escaped_string): New class.  Converts an unescaped
6906         string into its escaped equivalent.
6907         (warn_deprecated_use): Use the new class to convert the
6908         deprecation message, if present.
6909         (test_escaped_strings): New self test.
6910         (test_c_tests): Add test_escaped_strings.
6911         * doc/extend.texi (deprecated): Add a note that the
6912         deprecation message is affected by the -fmessage-length
6913         option, and that control characters will be escaped.
6914         (#pragma GCC error): Document this pragma.
6915         (#pragma GCC warning): Likewise.
6916         * doc/invoke.texi (-fmessage-length): Document this option's
6917         effect on the #warning and #error preprocessor directives and
6918         the deprecated attribute.
6920 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6922         * tree.c (decl_value_expr_lookup): Revert latest change.
6923         (decl_value_expr_insert): Likewise.
6925 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6927         * gimplify.c (nonlocal_vlas): Delete.
6928         (nonlocal_vla_vars): Likewise.
6929         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6930         referenced VLAs.
6931         (gimplify_body): Do not create and destroy nonlocal_vlas.
6932         * tree-nested.c: Include diagnostic.h.
6933         (use_pointer_in_frame): Tweak.
6934         (lookup_field_for_decl): Add assertion and declare the transformation.
6935         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6936         internal error when the reference is in a wrong context.  Do not
6937         create a debug decl by default.
6938         (note_nonlocal_block_vlas): Delete.
6939         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6940         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6941         create a debug decl by default.
6942         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6943         call is in a wrong context.
6944         (fixup_vla_decls): New function.
6945         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6946         debug variables were created.
6947         * tree.c (decl_value_expr_lookup): Add checking assertion.
6948         (decl_value_expr_insert): Likewise.
6950 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6952         PR middle-end/82479
6953         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6954         * tree-scalar-evolution.c (interpret_expr): Likewise.
6955         (expression_expensive_p): Likewise.
6956         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6957         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6958         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6959         (ssa_defined_by_minus_one_stmt_p): New.
6961 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6963         PR middle-end/64946
6964         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6965         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6966         * dojump.c (do_jump): Likewise.
6967         * expr.c (expand_expr_real_2): Check operand type's sign.
6968         * fold-const.c (const_unop): Handle ABSU_EXPR.
6969         (fold_abs_const): Likewise.
6970         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6971         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6972         (strip_sign_op_1): Likesise.
6973         * match.pd: Add new pattern to generate ABSU_EXPR.
6974         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6975         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6976         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6977         * tree-inline.c (estimate_operator_cost): Likewise.
6978         * tree-pretty-print.c (dump_generic_node): Likewise.
6979         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6980         * tree.def (ABSU_EXPR): New.
6982 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6984         PR middle-end/86095
6985         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6986         documented as preserved for backward compatibility only.
6987         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6989         PR rtl-optimization/86108
6990         * bb-reorder.c (create_forwarder_block): Renamed to ...
6991         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6992         jump from new landing pad to the second part.
6993         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6994         Adjust callers.
6996 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6998         PR middle-end/85878
6999         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
7000         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
7001         Only call store_expr for halves if the mode is the same.
7003         PR middle-end/86123
7004         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
7005         Fix up comment formatting.
7007 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7009         * typed-splay-tree.h (typed_splay_tree::remove): New function.
7010         (typed_splay_tree::closure,
7011         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
7012         (typed_splay_tree::typed_splay_tree,
7013         typed_splay_tree::operator =): Declared private.
7014         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
7015         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
7016         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
7017         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
7018         typed_splay_tree::splay_tree_splay,
7019         typed_splay_tree::splay_tree_foreach_helper,
7020         typed_splay_tree::splay_tree_insert,
7021         typed_splay_tree::splay_tree_remove,
7022         typed_splay_tree::splay_tree_lookup,
7023         typed_splay_tree::splay_tree_predecessor,
7024         typed_splay_tree::splay_tree_successor,
7025         typed_splay_tree::splay_tree_min,
7026         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
7027         (typed_splay_tree::root, typed_splay_tree::comp,
7028         typed_splay_tree::delete_key,
7029         typed_splay_tree::delete_value): New data members.
7030         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
7031         typed_splay_tree::remove.
7033 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
7035         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
7036         -mginv and -mno-ginv to the assembler.
7037         * config/mips/mips.opt (-mcrc): New option.
7038         (-mginv): Likewise.
7039         * doc/invoke.text (-mcrc): Document.
7040         (-mginv): Likewise.
7042 2018-06-15  Nick Clifton  <nickc@redhat.com>
7044         PR 84195
7045         * tree.c (escaped_string): New class.  Converts an unescaped
7046         string into its escaped equivalent.
7047         (warn_deprecated_use): Use the new class to convert the
7048         deprecation message, if present.
7049         (test_escaped_strings): New self test.
7050         (test_c_tests): Add test_escaped_strings.
7051         * doc/extend.texi (deprecated): Add a note that the
7052         deprecation message is affected by the -fmessage-length
7053         option, and that control characters will be escaped.
7054         (#pragma GCC error): Document this pragma.
7055         (#pragma GCC warning): Likewise.
7056         * doc/invoke.texi (-fmessage-length): Document this option's
7057         effect on the #warning and #error preprocessor directives and
7058         the deprecated attribute.
7060 2018-06-15  Richard Biener  <rguenther@suse.de>
7062         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
7063         here, also noting vector size used.
7064         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
7065         size used in MSG_OPTIMIZED_LOCATIONS dump.
7066         (pass_slp_vectorize::execute): Adjust.
7068 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
7070         PR target/85968
7071         * config/arc/arc.c (arc_return_address_register): Fix
7072         if-condition.
7074 2018-06-15  Richard Biener  <rguenther@suse.de>
7076         PR middle-end/86159
7077         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
7078         leave useless conversion stripping to force_gimple_operand_gsi.
7079         (gimplify_build2): Likewise.
7080         (gimplify_build1): Likewise.
7082 2018-06-15  Richard Biener  <rguenther@suse.de>
7084         PR middle-end/86076
7085         * tree-cfg.c (move_stmt_op): unshare invariant addresses
7086         before adjusting their block.
7088 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7090         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
7091         multilibs for *-*-rtems*.
7092         * config/riscv/t-rtems: New file.
7094 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
7096         PR middle-end/86122
7097         * match.pd ((A +- CST1) +- CST2): Punt if last resort
7098         unsigned_type_for returns NULL.
7100         PR target/85945
7101         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
7102         subregs of multi-word pseudos unless the float mode has word size.
7104 2018-06-14  Richard Biener  <rguenther@suse.de>
7106         PR middle-end/86139
7107         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7108         duplicate and harmful type_hash_canon.
7109         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7111 2018-06-14  Richard Biener  <rguenther@suse.de>
7113         PR ipa/86124
7114         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7115         NULL cgraph_node.
7117 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7119         * config/rtems.h (STDINT_LONG32): Define.
7121 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7122             Prachi Godbole  <prachi.godbole@imgtec.com>
7124         * config/mips/mips-cpus.def: Define P6600.
7125         * config/mips/mips-tables.opt: Regenerate.
7126         * config/mips/mips.c (mips_ucbranch_type): New enum.
7127         (mips_rtx_cost_data): Add support for P6600.
7128         (mips_issue_rate): Likewise.
7129         (mips_multipass_dfa_lookahead): Likewise.
7130         (mips_avoid_hazard): Likewise.
7131         (mips_reorg_process_insns): Likewise.
7132         (mips_classify_branch_p6600): New function.
7133         * config/mips/mips.h (TUNE_P6600): New define.
7134         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7135         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7136         * config/mips/mips.md: Include p6600.md.
7137         (processor): Add p6600.
7138         * config/mips/p6600.md: New file.
7139         * doc/invoke.texi: Add p6600 to supported architectures.
7141 2018-06-13  Martin Sebor  <msebor@redhat.com>
7143         PR tree-optimization/86114
7144         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7145         of integer types.
7146         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7148 2018-06-13  Richard Biener  <rguenther@suse.de>
7150         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7151         Properly set vector type of the intermediate stmt.
7152         * tree-vect-stmts.c (vectorizable_operation): The destination
7153         var always has vectype_out type.
7155 2018-06-13  Jeff Law  <law@redhat.com>
7157         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7158         integer 0 for argument to print_rtl_with_bb.
7159         (rl78_reorg): Likewise.
7161 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7163         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7164         from rtx to rtx_insn *.
7165         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7166         "label".
7167         (add_sched_insns_for_speculation): Likewise for local "target",
7168         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7169         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7170         from rtx_insn ** to rtx_code_label **.
7171         (reorg_emit_nops): Likewise.
7172         (c6x_reorg): Likewise for local "call_labels".
7173         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7174         rtx to rtx_insn *.
7175         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7176         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7177         the loops over LABEL_REFS.
7178         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7179         braf_label.
7180         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7181         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7182         (split_branches): Strengthen local "olabel" from rtx to
7183         rtx_insn *, adding a safe_as_a cast.
7184         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7185         to "rtx_insn *".
7186         (add_insn_after): Likewise for first two params.
7187         (add_insn_before): Likewise.
7188         (remove_insn): Likewise for param.
7189         (emit_pattern_before_noloc): Likewise for second and third params.
7190         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7191         (emit_call_insn_before_noloc): Likewise.
7192         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7193         to "rtx_insn *".
7194         (emit_barrier_before): Likewise.
7195         (emit_label_before): Strengthen "label" param from "rtx" to
7196         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7197         "rtx_insn *".
7198         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7199         "rtx_insn *".
7200         (emit_pattern_after_noloc): Likewise.
7201         (emit_insn_after_noloc): Likewise.
7202         (emit_jump_insn_after_noloc): Likewise.
7203         (emit_call_insn_after_noloc): Likewise.
7204         (emit_debug_insn_after_noloc): Likewise.
7205         (emit_barrier_after): Likewise.
7206         (emit_label_after): Likewise for both params.
7207         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7208         "loc" param from "int" to "location_t".
7209         (emit_insn_after_setloc): Likewise.
7210         (emit_jump_insn_after_setloc): Likewise.
7211         (emit_call_insn_after_setloc): Likewise.
7212         (emit_debug_insn_after_setloc): Likewise.
7213         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7214         "loc" param from "int" to "location_t".
7215         (emit_pattern_before): Convert NULL_RTX to NULL.
7216         (emit_insn_before_setloc): Convert "loc" param from "int" to
7217         "location_t".
7218         (emit_jump_insn_before_setloc): Likewise.
7219         (emit_call_insn_before_setloc): Likewise.
7220         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7221         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7222         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7223         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7224         Convert 3rd param from "int" to "location_t".
7225         (emit_barrier_before, emit_barrier_after, next_real_insn):
7226         Strengthen param from rtx to rtx_insn *.
7227         (emit_label_before): Strengthen 1st param from "rtx" to
7228         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7229         "rtx_insn *".
7230         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7231         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7232         Strengthen 2nd param from "rtx" to "rtx_insn *".
7233         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7234         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7235         Likewise. Convert 3rd param from "int" to "location_t".
7236         (emit_label_after): Strengthen 1st param from "rtx" to
7237         "rtx_code_label *".
7238         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7239         "rtx_insn *".
7240         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7241         from "rtx" to "rtx_insn *".
7243 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7245         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7246         bodies streamed in with -Q.
7247         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7248         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7249         * gimple-streamer-out.c: Include gimple-pretty-print.h
7250         (output_bb): Dump stmts streamed.
7251         * lto-section-out.c: Include print-tree.h
7252         (lto_begin_section): Dump sections created.
7253         (lto_output_decl_index): Dump decl encoded.
7254         * lto-streamer-out.c: Include print-tree.h
7255         (create_output_block): Dump output block created.
7256         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7257         (output_function): Dump function output.
7258         (output_constructor): Dump constructor streamed.
7259         (write_global_stream): Output indexes encoded.
7260         (produce_asm_for_decls): Dump streams encoded.
7261         * lto-streamer.c (streamer_dump_file): New global var.
7262         * lto-streamer.h (streamer_dump_file): Declare.
7263         * passes.c (ipa_write_summaries): Initialize streamer dump.
7264         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7265         in.
7267 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7269         PR target/86048
7270         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7271         offsets for register save directives.  Emit a second batch of save
7272         directives, if need be, when the function accesses prior frames.
7274 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7276         * config/arc/fpu.md (fmasf4): Force operand to register.
7277         (fnmasf4): Likewise.
7279 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7281         * config/arc/arc-protos.h (arc_pad_return): Remove.
7282         * config/arc/arc.c (machine_function): Remove force_short_suffix
7283         and size_reason.
7284         (arc_print_operand): Adjust printing of '&'.
7285         (arc_verify_short): Remove conditional printing of short suffix.
7286         (arc_final_prescan_insn): Remove reference to size_reason.
7287         (pad_return): New function.
7288         (arc_reorg): Call pad_return.
7289         (arc_pad_return): Remove.
7290         (arc_init_machine_status): Remove reference to force_short_suffix.
7291         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7292         (attr length): When attribute iscompact is true force to 2
7293         regardless; in the case of maybe check if we want to force the
7294         instruction to have 4 bytes length.
7295         (nopv): Change it to generate 4 byte long nop as well.
7296         (blockage): New pattern.
7297         (simple_return): Remove call to arc_pad_return.
7298         (p_return_i): Likewise.
7300 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7302         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7304 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7306         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7307         ARC cores.
7309 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7311         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7312         for ARC700 and ARCv2.
7314 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7316         PR target/86076
7317         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7318         operands[2] instead of operands[1].
7321 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7323         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7324         case, check whether the outer register overlaps an unallocatable
7325         register, not just whether it fits the required class.
7327 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7329         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7330         are poly_ints.
7331         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7332         (memrefs_conflict_p): Likewise.
7333         (init_alias_analysis): Likewise.
7334         * cfgexpand.c (expand_debug_expr): Likewise.
7335         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7336         * cse.c (fold_rtx): Likewise.
7337         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7338         * expr.c (emit_block_move_hints): Likewise.
7339         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7340         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7341         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7342         (emit_group_store): Likewise.
7343         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7344         to read the PRE/POST_MODIFY increment.
7345         * calls.c (store_one_arg): Use strip_offset.
7346         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7347         poly_int_rtx_p.
7348         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7349         by a VEC_SELECT.
7350         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7351         (simplify_binary_operation_1): Extend CONST_INT handling to
7352         poly_int_rtx_p.
7353         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7354         than a HOST_WIDE_INT.
7355         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7356         poly_int64.
7357         (adjust_mems, add_stores): Update accodingly.
7358         (vt_canonicalize_addr): Track polynomial offsets.
7359         (emit_note_insn_var_location): Likewise.
7360         (vt_add_function_parameter): Likewise.
7361         (vt_initialize): Likewise.
7363 2018-06-12  Jeff Law  <law@redhat.com>
7365         * config.gcc (alpha*-*-freebsd*): Remove.
7366         * config/alpha/freebsd.h: Remove.
7368 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7370         PR other/69968
7371         * spellcheck-tree.c (levenshtein_distance): Rename to...
7372         (get_edit_distance): ...this, and update for underlying renaming.
7373         * spellcheck-tree.h (levenshtein_distance): Rename to...
7374         (get_edit_distance): ...this.
7375         * spellcheck.c (levenshtein_distance): Rename to...
7376         (get_edit_distance): ...this.  Convert from Levenshtein distance
7377         to Damerau-Levenshtein distance by supporting transpositions of
7378         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7379         "v_one_ago".
7380         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7381         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7382         update for underlying renaming.
7383         (selftest::levenshtein_distance_unit_test): Rename to...
7384         (selftest::test_get_edit_distance_unit): ...this, and update for
7385         underlying renaming.
7386         (selftest::test_find_closest_string): Add example from PR 69968
7387         where transposition helps
7388         (selftest::test_metric_conditions): Update for renaming.
7389         (selftest::test_metric_conditions): Likewise.
7390         (selftest::spellcheck_c_tests): Likewise.
7391         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7392         (get_edit_distance): ...this.
7393         (best_match::consider): Update for renaming.
7395 2018-06-12  Martin Sebor  <msebor@redhat.com>
7397         PR tree-optimization/85259
7398         * builtins.c (compute_objsize): Handle constant offsets.
7399         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7400         true iff a warning has been issued.
7401         * gimple.h (gimple_nonartificial_location): New function.
7402         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7403         gimple_nonartificial_location and handle -Wno-system-headers.
7404         (handle_builtin_stxncpy): Same.
7406 2018-06-12  Martin Sebor  <msebor@redhat.com>
7408         PR c/85931
7409         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7411 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7413         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7414         BUILTIN_VEC_XST entries for pointer to double and long long.
7416 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7418         PR target/85990
7419         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7420         Update comments.
7421         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7422         Likewise.
7424 2018-06-12  Martin Liska  <mliska@suse.cz>
7426         * doc/options.texi: Document IntegerRange.
7428 2018-06-12  Martin Liska  <mliska@suse.cz>
7430         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7431         * opt-functions.awk: Handle Deprecated flag.
7432         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7433         and report error.
7434         (read_cmdline_option): Report warning for a deprecated option.
7435         * opts.h (struct cl_option): Add new field cl_deprecated.
7436         (CL_ERR_DEPRECATED): New.
7438 2018-06-12  Martin Liska  <mliska@suse.cz>
7440         * doc/options.texi: Document Deprecated option flag.
7442 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7444         * config/arc/arc-arch.h (arc_extras): New enum.
7445         (arc_cpu_t):Add field extra.
7446         (arc_cpu_types): Consider the extras.
7447         * config/arc/arc-cpus.def: Add extras info.
7448         * config/arc/arc-opts.h (processor_type): Consider extra field.
7449         * config/arc/arc.c (arc_override_options): Handle extra field.
7451 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7453         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7454         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7455         field.
7456         * config/arc/arc.c (arc_init): Update pic warning.
7457         (irq_range): Update irq range parsing warnings.
7458         (arc_override_options): Update various warning messages.
7459         (arc_handle_aux_attribute): Likewise.
7461 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7463         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7465 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7467         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7468         compiler messages directives.
7470 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7472         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7473         * config/mips/mips-tables.opt: Regenerate.
7474         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7475         mips64r6.
7476         * doc/invoke.texi: Document -march=i6500.
7478 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7480         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7481         (i6400_gpmul): Add cpu_unit.
7482         (i6400_gpdiv): Likewise.
7483         (i6400_msa_add_d): Update reservations.
7484         (i6400_msa_int_add) Likewise.
7485         (i6400_msa_short_logic3) Likewise.
7486         (i6400_msa_short_logic2) Likewise.
7487         (i6400_msa_short_logic) Likewise.
7488         (i6400_msa_move) Likewise.
7489         (i6400_msa_cmp) Likewise.
7490         (i6400_msa_short_float2) Likewise.
7491         (i6400_msa_div_d) Likewise.
7492         (i6400_msa_long_logic1) Likewise.
7493         (i6400_msa_long_logic2) Likewise.
7494         (i6400_msa_mult) Likewise.
7495         (i6400_msa_long_float2) Likewise.
7496         (i6400_msa_long_float4) Likewise.
7497         (i6400_msa_long_float5) Likewise.
7498         (i6400_msa_long_float8) Likewise.
7499         (i6400_fpu_fadd): Include frint type.
7500         (i6400_fpu_store): New define_insn_reservation.
7501         (i6400_fpu_load): Likewise.
7502         (i6400_fpu_move): Likewise.
7503         (i6400_fpu_fcmp): Likewise.
7504         (i6400_fpu_fmadd): Likewise.
7505         (i6400_int_mult): Include imul3nc type and update reservation.
7506         (i6400_int_div): Include idiv3 type and update reservation.
7507         (i6400_int_load): Update to check type not move_type.
7508         (i6400_int_store): Likewise.
7509         (i6400_int_prefetch): Set zero latency.
7511 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7513         * gcc.c: Document new %@{...} sequence.
7514         (LINK_COMMAND_SPEC): Use it for the -L switches.
7515         (cpp_unique_options): Use it for the -I switches.
7516         (at_file_argbuf): New global variable.
7517         (in_at_file): Likewise.
7518         (alloc_args): Create at_file_argbuf.
7519         (clear_args): Truncate at_file_argbuf.
7520         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7521         (open_at_file): New function.
7522         (close_at_file): Likewise.
7523         (create_at_file): Delete.
7524         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7525         <'o'>: Likewise.
7526         <'@'>: New case.
7527         (validate_switches_from_spec): Deal with %@{...} sequence.
7528         (validate_switches): Likewise.
7529         (driver::finalize): Call clear_args.
7531 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7533         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7535 2018-06-11  Martin Sebor  <msebor@redhat.com>
7537         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7538         (Wno-class-memaccess): Add @opindex.
7539         (Wno-templates, Wno-multiple-inheritance): Same.
7540         (Wno-virtual-inheritance, Wno-namespaces): Same.
7541         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7542         (Wno-format-overflow, Wno-format-truncation): Same.
7543         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7544         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7545         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7546         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7547         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7548         (Wno-misspelled-isr): Same.
7550 2018-06-11  Martin Sebor  <msebor@redhat.com>
7552         * PR tree-optimization/86083
7553         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7555 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7557         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7559 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7561         PR target/85755
7562         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7563         on the correct operand.
7564         (*movdi_internal64): Ditto.
7566 2018-06-11  Martin Liska  <mliska@suse.cz>
7568         PR tree-optimization/86089
7569         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7571 2018-06-11  Julia Koval  <julia.koval@intel.com>
7573         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7574         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7575         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7577 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7579         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7580         for Ada with strict dwarf2.
7582 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7584         PR target/85755
7585         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7586         addresses.
7588 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7590         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7592 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7594         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7595         TARGET_ELF.
7597 2018-06-08  Martin Liska  <mliska@suse.cz>
7599         * tree-cfg.h (debug_function): Fix argument type to match
7600         implementation.
7602 2018-06-08  Martin Liska  <mliska@suse.cz>
7604         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7605         Remove usage of MPX-related (and removed) fields.
7606         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7608 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7610         * cfg.c (debug): Use TDF_NONE rather than 0.
7611         * cfghooks.c (debug): Likewise.
7612         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7613         (struct dump_option_value_info): Convert to...
7614         (struct kv_pair): ...this template type.
7615         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7616         rather than 0.
7617         (optinfo_verbosity_options): Likewise.
7618         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7619         OPTGROUP_NONE.
7620         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7621         than int for "optgroup_flags" param.
7622         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7623         "dump_kind" param.
7624         (dump_dec): Likewise.
7625         (dump_finish): Use TDF_NONE rather than 0.
7626         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7627         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7628         than 0.  Update for change to option_ptr.
7629         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7630         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7631         0.  Update for changes to optinfo_verbosity_options and
7632         optgroup_options.
7633         (opt_info_switch_p): Convert optgroup_flags from int to
7634         optgroup_flags_t.
7635         (dump_basic_block): Use dump_flags_t rather than int
7636         for "dump_kind" param.
7637         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7638         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7639         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7640         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7641         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7642         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7643         TDF_NONE): Convert from macros to...
7644         (enum dump_flag): ...this new enum.
7645         (dump_flags_t): Update to use enum.
7646         (operator|, operator&, operator~, operator|=, operator&=):
7647         Implement for dump_flags_t.
7648         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7649         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7650         Convert from macros to...
7651         (enum optgroup_flag): ...this new enum.
7652         (optgroup_flags_t): New typedef.
7653         (operator|, operator|=): Implement for optgroup_flags_t.
7654         (struct dump_file_info): Convert field "alt_flags" to
7655         dump_flags_t.  Convert field "optgroup_flags" to
7656         optgroup_flags_t.
7657         (dump_basic_block): Use dump_flags_t rather than int for param.
7658         (dump_generic_expr_loc): Likewise.
7659         (dump_dec): Likewise.
7660         (dump_register): Convert param "optgroup_flags" to
7661         optgroup_flags_t.
7662         (opt_info_enable_passes): Likewise.
7663         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7664         than 0.
7665         * gimple-pretty-print.c (debug): Likewise.
7666         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7667         (merged_store_group::apply_stores): Likewise.
7668         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7669         * gimple.c (verify_gimple_pp): Likewise.
7670         * graphite-poly.c (print_pbb_body): Likewise.
7671         * passes.c (pass_manager::register_one_dump_file): Convert
7672         local "optgroup_flags" to optgroup_flags_t.
7673         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7674         (debug): Likewise.
7675         (debug_body): Likewise.
7676         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7677         to optgroup_flags_t.
7678         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7679         than 0.
7680         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7681         (convert_mult_to_fma): Likewise.
7682         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7683         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7684         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7685         "dump_kind" to dump_flags_t.
7687 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7689         * config/rs6000/rs6000.c (min, max): Delete.
7691 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7693         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7694         -mabi=spe and -mabi=no-spe.
7696 2018-06-08  Martin Liska  <mliska@suse.cz>
7698         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7699         where we expect an existing summary.
7701 2018-06-08  Martin Liska  <mliska@suse.cz>
7703         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7704         * ipa-inline.h (estimate_edge_growth): Likewise.
7706 2018-06-08  Martin Liska  <mliska@suse.cz>
7708         * cgraph.c (function_version_hasher::hash): Use
7709         cgraph_node::get_uid ().
7710         (function_version_hasher::equal):
7711         * cgraph.h (cgraph_node::get_uid): New method.
7712         * ipa-inline.c (update_caller_keys): Use
7713         cgraph_node::get_uid ().
7714         (update_callee_keys): Likewise.
7715         * ipa-utils.c (searchc): Likewise.
7716         (ipa_reduced_postorder): Likewise.
7717         * lto-cgraph.c (input_node): Likewise.
7718         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7719         * symbol-summary.h (symtab_insertion): Likewise.
7720         (symtab_removal): Likewise.
7721         (symtab_duplication): Likewise.
7722         * tree-pretty-print.c (dump_function_header): Likewise.
7723         * tree-sra.c (convert_callers_for_node): Likewise.
7725 2018-06-08  Martin Liska  <mliska@suse.cz>
7727         * cgraph.c (symbol_table::create_edge): Always assign a new
7728         unique number.
7729         (symbol_table::free_edge): Do not recycle numbers.
7730         * cgraph.h (cgraph_edge::get): New method.
7731         * symbol-summary.h (symtab_removal): Use it.
7732         (symtab_duplication): Likewise.
7733         (call_summary::hashable_uid): Remove.
7735 2018-06-08  Martin Liska  <mliska@suse.cz>
7737         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7738         (initialize_growth_caches): Remove.
7739         (free_growth_caches): Likewise.
7740         (do_estimate_edge_time): Use edge_growth_cache.
7741         (do_estimate_edge_size): Likewise.
7742         (do_estimate_edge_hints): Likewise.
7743         * ipa-inline.c (reset_edge_caches): Likewise.
7744         (recursive_inlining): Likewise.
7745         (inline_small_functions): Likewise.
7746         * ipa-inline.h (initialize_growth_caches): Remove.
7747         (estimate_edge_size): Likewise.
7748         (estimate_edge_time): Likewise.
7749         (estimate_edge_hints): Likewise.
7750         (reset_edge_growth_cache): Likewise.
7751         * symbol-summary.h (call_summary::remove): New method.
7753 2018-06-08  Martin Liska  <mliska@suse.cz>
7755         * ipa-cp.c (class edge_clone_summary): New summary.
7756         (grow_edge_clone_vectors): Remove.
7757         (ipcp_edge_duplication_hook): Remove.
7758         (class edge_clone_summary_t): New call_summary class.
7759         (ipcp_edge_removal_hook): Remove.
7760         (edge_clone_summary_t::duplicate): New function.
7761         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7762         (create_specialized_node): Likewise.
7763         (ipcp_driver): Initialize edge_clone_summaries and do not
7764         register hooks.
7766 2018-06-08  Martin Liska  <mliska@suse.cz>
7768         * symbol-summary.h (get): New function.
7769         (call_summary::m_initialize_when_cloning): New class member.
7771 2018-06-08  Martin Liska  <mliska@suse.cz>
7773         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7774         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7775         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7776         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7777         (remove_cgraph_node_from_order): Use the removed_nodes set.
7778         (do_per_function_toporder): Likwise.
7779         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7780         instead of summary_uid.
7781         (symtab_removal): Likewise.
7782         (symtab_duplication): Likewise.
7784 2018-06-08  Martin Liska  <mliska@suse.cz>
7786         * ipa-cp.c (ipcp_store_bits_results): Use
7787         ipcp_transformation_sum.
7788         (ipcp_store_vr_results): Likewise.
7789         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7790         to ...
7791         (ipcp_transformation_initialize): ... this.
7792         (ipa_set_node_agg_value_chain):
7793         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7794         (write_ipcp_transformation_info): Likewise.
7795         (read_ipcp_transformation_info): Likewise.
7796         (ipcp_update_bits): Likewise.
7797         (ipcp_update_vr): Likewise.
7798         (ipcp_transform_function): Likewise.
7799         * ipa-prop.h: Rename ipcp_transformation_summary to
7800         ipcp_transformation.
7801         (class ipcp_transformation_t): New function summary.
7802         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7803         (ipa_get_agg_replacements_for_node): Likewise.
7805 2018-06-08  Martin Liska  <mliska@suse.cz>
7807         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7808         of struct.
7809         (class funct_state_summary_t): New function_summary class.
7810         (has_function_state): Remove.
7811         (get_function_state): Likewise.
7812         (set_function_state): Likewise.
7813         (add_new_function): Likewise.
7814         (funct_state_summary_t::insert): New function.
7815         (duplicate_node_data): Remove.
7816         (remove_node_data): Remove.
7817         (funct_state_summary_t::duplicate): New function.
7818         (register_hooks): Create new funct_state_summaries.
7819         (pure_const_generate_summary): Use it.
7820         (pure_const_write_summary): Likewise.
7821         (pure_const_read_summary): Likewise.
7822         (propagate_pure_const): Likewise.
7823         (propagate_nothrow): Likewise.
7824         (dump_malloc_lattice): Likewise.
7825         (propagate_malloc): Likewise.
7826         (execute): Do not register hooks, just remove summary
7827         instead.
7828         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7829         constructor.
7831 2018-06-08  Martin Liska  <mliska@suse.cz>
7833         * ipa-reference.c (remove_node_data): Remove.
7834         (duplicate_node_data): Likewise.
7835         (class ipa_ref_var_info_summary_t): New class.
7836         (class ipa_ref_opt_summary_t): Likewise.
7837         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7838         (get_reference_optimization_summary): Use
7839         ipa_ref_opt_sum_summaries.
7840         (set_reference_vars_info): Remove.
7841         (set_reference_optimization_summary): Likewise.
7842         (ipa_init): Create summaries.
7843         (init_function_info): Use function summary.
7844         (ipa_ref_opt_summary_t::duplicate): New function.
7845         (ipa_ref_opt_summary_t::remove): New function.
7846         (get_read_write_all_from_node): Fix GNU coding style.
7847         (propagate): Use function summary.
7848         (write_node_summary_p): Fix GNU coding style.
7849         (stream_out_bitmap): Likewise.
7850         (ipa_reference_read_optimization_summary): Use function summary.
7851         (ipa_reference_c_finalize): Do not release hooks.
7853 2018-06-08  Martin Liska  <mliska@suse.cz>
7855         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7856         (analyze_function_body): Extract multiple calls of get_create.
7857         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7858         * ipa-inline.c (recursive_inlining): Use ::get method.
7859         * ipa-inline.h (estimate_edge_growth): Likewise.
7861 2018-06-08  Martin Liska  <mliska@suse.cz>
7863         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7864         HSA_INVALID.
7865         (hsa_function_summary::hsa_function_summary): Use the new enum
7866         value.
7867         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7868         * hsa-gen.c (hsa_get_host_function): Likewise.
7869         (get_brig_function_name): Likewise.
7870         * ipa-hsa.c (process_hsa_functions): Likewise.
7871         (ipa_hsa_write_summary): Likewise.
7872         * symbol-summary.h (symtab_duplication): Use ::get function/
7873         (get): New function.
7875 2018-06-08  Martin Liska  <mliska@suse.cz>
7877         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7878         of get.
7879         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7880         (hsa_register_kernel): Likewise.
7881         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7882         * hsa-gen.c (hsa_get_host_function): Likewise.
7883         (get_brig_function_name): Likewise.
7884         (generate_hsa): Likewise.
7885         (pass_gen_hsail::execute): Likewise.
7886         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7887         (devirtualization_time_bonus): Likewise.
7888         (ipcp_propagate_stage): Likewise.
7889         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7890         (edge_set_predicate): Likewise.
7891         (evaluate_conditions_for_known_args): Likewise.
7892         (evaluate_properties_for_edge): Likewise.
7893         (ipa_fn_summary::reset): Likewise.
7894         (ipa_fn_summary_t::duplicate): Likewise.
7895         (dump_ipa_call_summary): Likewise.
7896         (ipa_dump_fn_summary): Likewise.
7897         (analyze_function_body): Likewise.
7898         (compute_fn_summary): Likewise.
7899         (estimate_edge_devirt_benefit): Likewise.
7900         (estimate_edge_size_and_time): Likewise.
7901         (estimate_calls_size_and_time): Likewise.
7902         (estimate_node_size_and_time): Likewise.
7903         (inline_update_callee_summaries): Likewise.
7904         (remap_edge_change_prob): Likewise.
7905         (remap_edge_summaries): Likewise.
7906         (ipa_merge_fn_summary_after_inlining): Likewise.
7907         (ipa_update_overall_fn_summary): Likewise.
7908         (read_ipa_call_summary): Likewise.
7909         (inline_read_section): Likewise.
7910         (write_ipa_call_summary): Likewise.
7911         (ipa_fn_summary_write): Likewise.
7912         (ipa_free_fn_summary): Likewise.
7913         * ipa-hsa.c (process_hsa_functions): Likewise.
7914         (ipa_hsa_write_summary): Likewise.
7915         (ipa_hsa_read_section): Likewise.
7916         * ipa-icf.c (sem_function::merge): Likewise.
7917         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7918         (do_estimate_edge_time): Likewise.
7919         (estimate_size_after_inlining): Likewise.
7920         (estimate_growth): Likewise.
7921         (growth_likely_positive): Likewise.
7922         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7923         (inline_call): Likewise.
7924         * ipa-inline.c (caller_growth_limits): Likewise.
7925         (can_inline_edge_p): Likewise.
7926         (can_inline_edge_by_limits_p): Likewise.
7927         (compute_uninlined_call_time): Likewise.
7928         (compute_inlined_call_time): Likewise.
7929         (want_inline_small_function_p): Likewise.
7930         (edge_badness): Likewise.
7931         (update_caller_keys): Likewise.
7932         (update_callee_keys): Likewise.
7933         (recursive_inlining): Likewise.
7934         (inline_small_functions): Likewise.
7935         (inline_to_all_callers_1): Likewise.
7936         (dump_overall_stats): Likewise.
7937         (early_inline_small_functions): Likewise.
7938         (early_inliner): Likewise.
7939         * ipa-inline.h (estimate_edge_growth): Likewise.
7940         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7941         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7942         * ipa-prop.h (IPA_NODE_REF): Likewise.
7943         (IPA_EDGE_REF): Likewise.
7944         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7945         (propagate_malloc): Likewise.
7946         * ipa-split.c (execute_split_functions): Likewise.
7947         * symbol-summary.h: Rename get to get_create.
7948         (get): Likewise.
7949         (get_create): Likewise.
7950         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7952 2018-06-08  Martin Liska  <mliska@suse.cz>
7954         * symbol-summary.h (release): Move definition out of class
7955         declaration.
7956         (symtab_removal): Likewise.
7957         (symtab_duplication): Likewise.
7959 2018-06-08  Martin Liska  <mliska@suse.cz>
7961         * symbol-summary.h (function_summary): Move constructor
7962         implementation out of class declaration.
7963         (release): Likewise.
7964         (symtab_insertion): Likewise.
7965         (symtab_removal): Likewise.
7966         (symtab_duplication): Likewise.
7967         (get): Likewise.
7969 2018-06-08  Martin Liska  <mliska@suse.cz>
7971         * Makefile.in: Remove support for MPX (macros, related functions,
7972         fields in cgraph_node, ...).
7973         * builtin-types.def (BT_BND): Likewise.
7974         (BT_FN_BND_CONST_PTR): Likewise.
7975         (BT_FN_CONST_PTR_BND): Likewise.
7976         (BT_FN_VOID_PTR_BND): Likewise.
7977         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7978         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7979         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7980         (expand_builtin_mempcpy_with_bounds): Likewise.
7981         (expand_builtin_memset_with_bounds): Likewise.
7982         (expand_builtin_memset_args): Likewise.
7983         (std_expand_builtin_va_start): Likewise.
7984         (expand_builtin): Likewise.
7985         (expand_builtin_with_bounds): Likewise.
7986         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7987         (DEF_LIB_BUILTIN_CHKP): Likewise.
7988         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7989         (DEF_CHKP_BUILTIN): Likewise.
7990         (BUILT_IN_MEMCPY): Likewise.
7991         (BUILT_IN_MEMMOVE): Likewise.
7992         (BUILT_IN_MEMPCPY): Likewise.
7993         (BUILT_IN_MEMSET): Likewise.
7994         (BUILT_IN_STPCPY): Likewise.
7995         (BUILT_IN_STRCAT): Likewise.
7996         (BUILT_IN_STRCHR): Likewise.
7997         (BUILT_IN_STRCPY): Likewise.
7998         (BUILT_IN_STRLEN): Likewise.
7999         (BUILT_IN_MEMCPY_CHK): Likewise.
8000         (BUILT_IN_MEMMOVE_CHK): Likewise.
8001         (BUILT_IN_MEMPCPY_CHK): Likewise.
8002         (BUILT_IN_MEMSET_CHK): Likewise.
8003         (BUILT_IN_STPCPY_CHK): Likewise.
8004         (BUILT_IN_STRCAT_CHK): Likewise.
8005         (BUILT_IN_STRCPY_CHK): Likewise.
8006         * calls.c (store_bounds): Likewise.
8007         (emit_call_1): Likewise.
8008         (special_function_p): Likewise.
8009         (maybe_warn_nonstring_arg): Likewise.
8010         (initialize_argument_information): Likewise.
8011         (finalize_must_preallocate): Likewise.
8012         (compute_argument_addresses): Likewise.
8013         (expand_call): Likewise.
8014         * cfgexpand.c (expand_call_stmt): Likewise.
8015         (expand_return): Likewise.
8016         (expand_gimple_stmt_1): Likewise.
8017         (pass_expand::execute): Likewise.
8018         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
8019         (cgraph_node::remove): Likewise.
8020         (cgraph_node::dump): Likewise.
8021         (cgraph_node::verify_node): Likewise.
8022         * cgraph.h (chkp_function_instrumented_p): Likewise.
8023         (symtab_node::get_alias_target): Likewise.
8024         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
8025         (cgraph_local_p): Likewise.
8026         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
8027         (cgraph_edge::rebuild_references): Likewise.
8028         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
8029         (walk_polymorphic_call_targets): Likewise.
8030         (cgraph_node::expand_thunk): Likewise.
8031         (symbol_table::output_weakrefs): Likewise.
8032         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
8033         (ix86_handle_option): Likewise.
8034         * config/i386/constraints.md: Likewise.
8035         * config/i386/i386-builtin-types.def (BND): Likewise.
8036         (VOID): Likewise.
8037         (PVOID): Likewise.
8038         (ULONG): Likewise.
8039         * config/i386/i386-builtin.def (BDESC_END): Likewise.
8040         (BDESC_FIRST): Likewise.
8041         (BDESC): Likewise.
8042         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
8043         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
8044         * config/i386/i386.c (enum reg_class): Likewise.
8045         (ix86_target_string): Likewise.
8046         (ix86_option_override_internal): Likewise.
8047         (ix86_conditional_register_usage): Likewise.
8048         (ix86_valid_target_attribute_inner_p): Likewise.
8049         (ix86_set_indirect_branch_type): Likewise.
8050         (ix86_set_current_function): Likewise.
8051         (ix86_function_arg_regno_p): Likewise.
8052         (init_cumulative_args): Likewise.
8053         (ix86_function_arg_advance): Likewise.
8054         (ix86_function_arg): Likewise.
8055         (ix86_pass_by_reference): Likewise.
8056         (ix86_function_value_regno_p): Likewise.
8057         (ix86_function_value_1): Likewise.
8058         (ix86_function_value_bounds): Likewise.
8059         (ix86_return_in_memory): Likewise.
8060         (ix86_setup_incoming_vararg_bounds): Likewise.
8061         (ix86_va_start): Likewise.
8062         (indirect_thunk_need_prefix): Likewise.
8063         (print_reg): Likewise.
8064         (ix86_print_operand): Likewise.
8065         (ix86_expand_call): Likewise.
8066         (ix86_output_function_return): Likewise.
8067         (reg_encoded_number): Likewise.
8068         (BDESC_VERIFYS): Likewise.
8069         (ix86_init_mpx_builtins): Likewise.
8070         (ix86_init_builtins): Likewise.
8071         (ix86_emit_cmove): Likewise.
8072         (ix86_emit_move_max): Likewise.
8073         (ix86_expand_builtin): Likewise.
8074         (ix86_builtin_mpx_function): Likewise.
8075         (ix86_get_arg_address_for_bt): Likewise.
8076         (ix86_load_bounds): Likewise.
8077         (ix86_store_bounds): Likewise.
8078         (ix86_load_returned_bounds): Likewise.
8079         (ix86_store_returned_bounds): Likewise.
8080         (ix86_class_likely_spilled_p): Likewise.
8081         (ix86_hard_regno_mode_ok): Likewise.
8082         (x86_order_regs_for_local_alloc): Likewise.
8083         (ix86_mitigate_rop): Likewise.
8084         (ix86_bnd_prefixed_insn_p): Likewise.
8085         (ix86_mpx_bound_mode): Likewise.
8086         (ix86_make_bounds_constant): Likewise.
8087         (ix86_initialize_bounds): Likewise.
8088         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
8089         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
8090         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
8091         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
8092         (TARGET_CHKP_BOUND_MODE): Likewise.
8093         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
8094         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
8095         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
8096         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
8097         * config/i386/i386.h (TARGET_MPX): Likewise.
8098         (TARGET_MPX_P): Likewise.
8099         (VALID_BND_REG_MODE): Likewise.
8100         (FIRST_BND_REG): Likewise.
8101         (LAST_BND_REG): Likewise.
8102         (enum reg_class): Likewise.
8103         (BND_REG_P): Likewise.
8104         (BND_REGNO_P): Likewise.
8105         (BNDmode): Likewise.
8106         (ADJUST_INSN_LENGTH): Likewise.
8107         * config/i386/i386.md: Likewise.
8108         * config/i386/i386.opt: Likewise.
8109         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8110         (defined): Likewise.
8111         (LINK_MPX): Likewise.
8112         (MPX_SPEC): Likewise.
8113         (LIBMPX_SPEC): Likewise.
8114         (LIBMPXWRAPPERS_SPEC): Likewise.
8115         (CHKP_SPEC): Likewise.
8116         * config/i386/predicates.md: Likewise.
8117         * dbxout.c (dbxout_type): Likewise.
8118         * doc/extend.texi: Likewise.
8119         * doc/invoke.texi: Likewise.
8120         * doc/md.texi: Likewise.
8121         * doc/tm.texi: Likewise.
8122         * doc/tm.texi.in: Likewise.
8123         * dwarf2out.c (is_base_type): Likewise.
8124         (gen_formal_types_die): Likewise.
8125         (gen_subprogram_die): Likewise.
8126         (gen_type_die_with_usage): Likewise.
8127         (gen_decl_die): Likewise.
8128         (dwarf2out_late_global_decl): Likewise.
8129         * expr.c (expand_assignment): Likewise.
8130         (emit_storent_insn): Likewise.
8131         (store_expr_with_bounds): Likewise.
8132         (store_expr): Likewise.
8133         (expand_expr_real_1): Likewise.
8134         * expr.h (store_expr_with_bounds): Likewise.
8135         * function.c (use_register_for_decl): Likewise.
8136         (struct bounds_parm_data): Likewise.
8137         (assign_parms_augmented_arg_list): Likewise.
8138         (assign_parm_find_entry_rtl): Likewise.
8139         (assign_parm_is_stack_parm): Likewise.
8140         (assign_parm_load_bounds): Likewise.
8141         (assign_bounds): Likewise.
8142         (assign_parms): Likewise.
8143         (expand_function_start): Likewise.
8144         * gcc.c (CHKP_SPEC): Likewise.
8145         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8146         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8147         (wrestrict_dom_walker::check_call): Likewise.
8148         * gimple.c (gimple_build_call_from_tree): Likewise.
8149         * gimple.h (enum gf_mask): Likewise.
8150         (gimple_call_with_bounds_p): Likewise.
8151         (gimple_call_set_with_bounds): Likewise.
8152         * gimplify.c (gimplify_init_constructor): Likewise.
8153         * ipa-cp.c (initialize_node_lattices): Likewise.
8154         (propagate_constants_across_call): Likewise.
8155         (find_more_scalar_values_for_callers_subset): Likewise.
8156         * ipa-hsa.c (process_hsa_functions): Likewise.
8157         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8158         * ipa-icf.c (sem_function::merge): Likewise.
8159         * ipa-inline.c (early_inliner): Likewise.
8160         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8161         (warn_function_cold): Likewise.
8162         (propagate_pure_const): Likewise.
8163         * ipa-ref.h (enum GTY): Likewise.
8164         * ipa-split.c (find_retbnd): Likewise.
8165         (consider_split): Likewise.
8166         (split_function): Likewise.
8167         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8168         * ipa.c (walk_polymorphic_call_targets): Likewise.
8169         (symbol_table::remove_unreachable_nodes): Likewise.
8170         (process_references): Likewise.
8171         (cgraph_build_static_cdtor_1): Likewise.
8172         * lto-cgraph.c (lto_output_node): Likewise.
8173         (output_refs): Likewise.
8174         (compute_ltrans_boundary): Likewise.
8175         (input_overwrite_node): Likewise.
8176         (input_node): Likewise.
8177         (input_cgraph_1): Likewise.
8178         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8179         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8180         (class pass_chkp_instrumentation_passes): Likewise.
8181         (make_pass_chkp_instrumentation_passes): Likewise.
8182         * passes.def: Likewise.
8183         * rtl.h (struct GTY): Likewise.
8184         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8185         * stor-layout.c (layout_type): Likewise.
8186         * symtab.c: Likewise.
8187         * target.def: Likewise.
8188         * targhooks.c (default_chkp_bound_type): Likewise.
8189         (default_chkp_bound_mode): Likewise.
8190         (default_builtin_chkp_function): Likewise.
8191         (default_chkp_function_value_bounds): Likewise.
8192         (default_chkp_make_bounds_constant): Likewise.
8193         (default_chkp_initialize_bounds): Likewise.
8194         * targhooks.h (default_chkp_bound_type): Likewise.
8195         (default_chkp_bound_mode): Likewise.
8196         (default_builtin_chkp_function): Likewise.
8197         (default_chkp_function_value_bounds): Likewise.
8198         (default_chkp_make_bounds_constant): Likewise.
8199         (default_chkp_initialize_bounds): Likewise.
8200         * toplev.c (compile_file): Likewise.
8201         (process_options): Likewise.
8202         * tree-core.h (DEF_BUILTIN): Likewise.
8203         (DEF_BUILTIN_CHKP): Likewise.
8204         * tree-inline.c (declare_return_variable): Likewise.
8205         (remap_gimple_stmt): Likewise.
8206         (copy_bb): Likewise.
8207         (initialize_inlined_parameters): Likewise.
8208         (expand_call_inline): Likewise.
8209         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8210         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8211         (make_pass_ipa_chkp_produce_thunks): Likewise.
8212         (make_pass_chkp): Likewise.
8213         (make_pass_chkp_opt): Likewise.
8214         (make_pass_chkp_instrumentation_passes): Likewise.
8215         * tree-pretty-print.c (dump_generic_node): Likewise.
8216         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8217         * tree-ssa-dce.c (propagate_necessity): Likewise.
8218         (eliminate_unnecessary_stmts): Likewise.
8219         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8220         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8221         * tree-ssa-sccvn.h: Likewise.
8222         * tree-ssa-strlen.c (get_string_length): Likewise.
8223         (valid_builtin_call): Likewise.
8224         (adjust_last_stmt): Likewise.
8225         (handle_builtin_strchr): Likewise.
8226         (handle_builtin_strcpy): Likewise.
8227         (handle_builtin_stxncpy): Likewise.
8228         (handle_builtin_memcpy): Likewise.
8229         (handle_builtin_strcat): Likewise.
8230         (strlen_check_and_optimize_stmt): Likewise.
8231         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8232         * tree-streamer-in.c: Likewise.
8233         * tree-streamer.c (record_common_node): Likewise.
8234         * tree.c (tree_code_size): Likewise.
8235         (wide_int_to_tree_1): Likewise.
8236         (type_contains_placeholder_1): Likewise.
8237         (build_common_tree_nodes): Likewise.
8238         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8239         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8240         (POINTER_BOUNDS_P): Likewise.
8241         (BOUNDED_TYPE_P): Likewise.
8242         (BOUNDED_P): Likewise.
8243         (CALL_WITH_BOUNDS_P): Likewise.
8244         (pointer_bounds_type_node): Likewise.
8245         * value-prof.c (gimple_ic): Likewise.
8246         * var-tracking.c (vt_add_function_parameters): Likewise.
8247         * varasm.c (make_decl_rtl): Likewise.
8248         (assemble_start_function): Likewise.
8249         (output_constant): Likewise.
8250         (maybe_assemble_visibility): Likewise.
8251         * varpool.c (ctor_for_folding): Likewise.
8252         * chkp-builtins.def: Remove.
8253         * ipa-chkp.c: Remove.
8254         * ipa-chkp.h: Remove.
8255         * rtl-chkp.c: Remove.
8256         * rtl-chkp.h: Remove.
8257         * tree-chkp-opt.c: Remove.
8258         * tree-chkp.c: Remove.
8259         * tree-chkp.h: Remove.
8261 2018-06-07  Carl Love  <cel@us.ibm.com>
8263         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8264         vextract_fp_from_shortl): Add BE support.
8266 2018-06-07  Paul Koning  <ni1d@arrl.net>
8268         * compare-elim.c (try_merge_compare): Don't merge compare if
8269         address contains a side effect.
8270         (try_eliminate_compare): Likewise.
8272 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8274         * config.gcc: Support "tremont".
8275         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8276         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8277         PROCESSOR_TREMONT.
8278         * config/i386/i386.c (m_TREMONT): Define.
8279         (processor_target_table): Add "tremont".
8280         (PTA_TREMONT): Define.
8281         (ix86_lea_outperforms): Add TARGET_TREMONT.
8282         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8283         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8284         and M_INTEL_GOLDMONT_PLUS.
8285         (fold_builtin_cpu): Add "tremont".
8286         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8287         (ix86_option_override_internal): Add "tremont".
8288         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8289         (processor_type): Add PROCESSOR_TREMONT.
8290         * config/i386/x86-tune.def: Add m_TREMONT.
8291         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8293 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8295         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8296         symbol defined for msp430i* devices to be lower case.
8298 2018-06-07  Richard Biener  <rguenther@suse.de>
8300         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8301         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8302         Properly wrap signed arithmetic if overflow wraps.
8304 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8306         PR tree-optimization/69615
8307         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8308         of a cast from a same precision integral SSA_NAME in a bb dominated
8309         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8310         cast to utype if rhs2 has already a compatible type.
8312 2018-06-07  Richard Biener  <rguenther@suse.de>
8314         PR tree-optimization/85935
8315         * graphite-scop-detection.c (find_params_in_bb): Analyze
8316         condition operands with respect to the correct loop.  Assert
8317         the analysis doesn't fail.
8319 2018-06-04  Carl Love  <cel@us.ibm.com>
8321         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8322         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8323         as it is slightly cheaper.
8324         (first_match_or_eos_index_<mode>):
8325         Calculate index using natural element order.
8326         (first_match_index_<mode>):
8327         Calculate index using natural element order.
8328         (first_match_or_eos_index_<mode>):
8329         Calculate index using natural order.
8330         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8331         for BE and LE modes.
8332         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8333         P9V_BUILTIN_VCLZLSBB_V16QI.
8334         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8335         specific.
8337 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8339         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8340         indentation and line wrap for many prototypes.  Add missing
8341         @smallexample directives around block of prototypes for vec_xl and
8342         vec_xst.
8344 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8346         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8347         track if we pass or return IEEE 128-bit floating point.
8348         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8349         C++ mangling that is compatible with GCC 8.1.
8350         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8351         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8352         floating point types.
8353         (rs6000_function_arg_advance_1): Likewise.
8354         (rs6000_mangle_type): Optionally generate mangled names that match
8355         what GCC 8.1 generated for IEEE 128-bit floating point types.
8356         (rs6000_globalize_decl_name): If we have an external function that
8357         passes or returns IEEE 128-bit types, generate a weak reference
8358         from the mangled name used in GCC 8.1 to the current mangled
8359         name.
8360         (rs6000_init_builtins): Make __ibm128 use the long double type if
8361         long double is IBM extended double.  Make __float128 use the long
8362         double type if long double is IEEE 128-bit.
8364         PR target/85657
8365         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8366         macro for __ibm128 built-in functions.
8367         (PACK_IF): Add __ibm128 pack/unpack functions.
8368         (UNPACK_IF): Likewise.
8369         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8370         enable long double built-in functions if long double is IEEE
8371         128-bit floating point.
8372         (rs6000_invalid_builtin): Update long double built-in function
8373         error message.
8374         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8375         functions, adjust the built-in function to use the long double
8376         built-in function if __ibm128 and long double are the same type.
8377         * doc/extend.texi (PowerPC builtins): Update documention for
8378         __builtin_{,un}pack_longdouble.  Add documentation for
8379         __builtin_{,un}pack_ibm128.
8381 2018-06-06  Jim Wilson  <jimw@sifive.com>
8383         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8384         (struct machine_function): New field interrupt_mode.
8385         (riscv_handle_type_attribute): New function.  Add forward declaration.
8386         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8387         (riscv_expand_epilogue): Check interrupt_mode field.
8388         (riscv_set_current_function): Check interrupt attribute args and
8389         set interrupt_mode field.
8390         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8391         (riscv_sret, riscv_uret): New.
8392         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8393         new arguments to interrupt attribute.
8395 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8397         PR target/63177
8398         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8399         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8401 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8403         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8404         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8405         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8406         several redundant entries.
8408 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8410         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8411         type from "rtx" to "rtx_insn *".
8412         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8413         for local "call_insn", removing cast.
8414         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8416 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8418         PR tree-optimization/86066
8419         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8420         for BIT_INSERT_EXPR stores.
8422 2018-06-06  Richard Biener  <rguenther@suse.de>
8424         PR tree-optimization/86062
8425         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8426         component refs ontop
8427         of to be offsetted base.
8429 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8431         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8432         to be static and remove check on interrupt attribute name.
8434 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8436         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8437         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8439 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8441         PR target/79924
8442         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8443         second argument.
8444         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8445         Remove second argument, change how error is called.
8446         (aarch64_layout_arg): Remove second argument from
8447         aarch64_err_no_fpadvsimd call.
8448         (aarch64_init_cumulative_args): Ditto.
8449         (aarch64_gimplify_va_arg_expr): Ditto.
8450         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8452 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8454         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8455         (*simple_return_indirect_internal<mode>): Rename from
8456         simple_return_indirect_internal.  Use W mode iterator.
8457         (rstorssp): New expander.
8458         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8459         (clrssbsy): New expander.
8460         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8462 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8464         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8465         __typeof__.
8466         (cmse_check_pointed_object): Likewise.
8468 2018-06-05  Martin Liska  <mliska@suse.cz>
8470         PR gcov-profile/47618
8471         * doc/invoke.texi: Document how -fprofile-dir format
8472         is extended.
8474 2018-06-05  Richard Biener  <rguenther@suse.de>
8476         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8477         removal pretend DOM info isn't available so we do not update
8478         it and only remove edges, not dominated blocks.  Actually free
8479         DOM info in case we removed something.  Remove unreachable blocks.
8480         (mfb_keep_latches): Work with either DOM info or marked backedges.
8481         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8482         first.  Mark backedges if DOM info isn't available.
8483         (Re-)compute DOM info after cleanup_control_flow_pre.
8485 2018-06-05  Richard Biener  <rguenther@suse.de>
8487         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8488         (locus_discrim_hasher::hash): Adjust.
8489         (locus_discrim_hasher::equal): Likewise.
8490         (next_discriminator_for_locus): Work on line directly.
8491         (same_line_p): Pass in expanded locus1 as well.
8492         (assign_discriminators): Avoid redundant location expansions.
8494 2018-06-05  Richard Biener  <rguenther@suse.de>
8496         PR tree-optimization/86046
8497         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8498         if required after clearing TREE_ADDRESSABLE.
8500 2018-06-05  Richard Biener  <rguenther@suse.de>
8502         PR tree-optimization/86047
8503         * tree-ssa-loop.c (for_each_index): Glob handling of all
8504         decls and constants and really handle all of them.
8506 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8508         PR target/81497
8509         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8510         qualifier_void_pointer and qualifier_const_void_pointer.
8511         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8512         (arm_init_builtins): Handle the above.
8513         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8514         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8515         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8516         void intrinsics.
8518 2018-06-05  Martin Liska  <mliska@suse.cz>
8520         * auto-profile.c (read_autofdo_file): Do not use
8521         gcov_ctr_summary struct.
8522         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8523         * coverage.c (struct counts_entry): Likewise.
8524         (read_counts_file): Read just single summary entry.
8525         (get_coverage_counts): Use gcov_summary struct.
8526         * coverage.h (get_coverage_counts): Likewise.
8527         * gcov-dump.c (dump_working_sets): Likewise.
8528         (tag_summary): Dump just single summary.
8529         * gcov-io.c (gcov_write_summary): Write just histogram
8530         summary.
8531         (gcov_read_summary): Read just single summary.
8532         (compute_working_sets): Use gcov_summary struct.
8533         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8534         of GCOV_COUNTERS_SUMMABLE.
8535         (GCOV_COUNTERS_SUMMABLE): Remove.
8536         (GCOV_FIRST_VALUE_COUNTER): Replace with
8537         GCOV_COUNTER_V_INTERVAL.
8538         (struct gcov_ctr_summary): Remove.
8539         (struct gcov_summary): Directly use fields of former
8540         gcov_ctr_summary.
8541         (compute_working_sets): Use gcov_summary struct.
8542         * gcov.c (read_count_file): Do not use ctrs fields.
8543         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8544         struct.
8545         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8546         struct.
8547         * profile.c: Likewise.
8548         * profile.h: Likewise.
8550 2018-06-05  Martin Liska  <mliska@suse.cz>
8552         PR gcov-profile/84846
8553         * gcov.c (output_lines): Print working directory only
8554         in intermediate format.
8556 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8558         * config/s390/s390-builtin-types.def: Add void function type.
8559         * config/s390/s390-builtins.def: Use the function type for the
8560         tbeginc builtin.
8562 2018-06-04  Jim Wilson  <jimw@sifive.com>
8564         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8565         to int.
8566         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8567         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8568         handle EH_RETURN_DATA_REGNO registers properly.
8569         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8570         (riscv_expand_epilogue): Update comment.  Change argument name and
8571         type.  Update code to use new name and type.  Pass new args to
8572         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8573         EXCEPTION_RETURN.
8574         * config/riscv/riscv.md (NORMAL_RETURN): New.
8575         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8576         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8577         (eh_return): Call gen_eh_return_internal and emit barrier.
8578         (eh_return_internal): Call riscv_expand_epilogue.
8580 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8582         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8583         bit_insertion field and declare can_be_merged_into method.
8584         (merged_store_group::can_be_merged_into): New method.
8585         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8586         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8587         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8589 2018-06-04  Richard Biener  <rguenther@suse.de>
8591         PR tree-optimization/85955
8592         * builtins.c (fold_builtin_sincos): Convert pointers to
8593         destination to appropriate type before dereferencing.
8595 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8597         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8599 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8601         * expr.c (expand_expr_real_1): Force the operand into memory if
8602         its TYPE_MODE is BLKmode and if there is no integer mode for
8603         the number of bits being extracted.
8605 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8607         PR target/85832
8608         PR target/86036
8609         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8610         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8612 2018-06-04  Richard Biener  <rguenther@suse.de>
8614         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8615         (cleanup_tree_cfg_noloop): ... single caller.  Do
8616         start_recording_case_labels later.
8618 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8620         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8621         to _IMMINTRIN_H_INCLUDED.
8622         * config/i386/pconfigintrin.h: Ditto.
8623         * config/i386/waitpkgintrin.h: Ditto.
8624         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8625         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8626         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8627         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8628         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8629         waitpkgintrin.h and cldemoteintrin.h.
8631 2018-06-04  Richard Biener  <rguenther@suse.de>
8633         PR tree-optimization/86038
8634         * tracer.c (find_best_successor): Check probability for
8635         being initialized, bail out if not.
8637 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8639         PR target/86003
8640         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8641         of bits to ignore when comparing architectures.
8643 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8645         PR tree-optimization/69615
8646         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8647         maximum or minimum of the type, try to merge it also as if
8648         range1 is + [-, x - 1] or + [x + 1, -].
8650         PR c++/86025
8651         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8653 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8655         PR tree-optimization/86034
8656         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8657         the unsigned bitfield type in a bit insertion sequence if it does not
8658         have a larger precision than the bitfield size.
8659         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8661 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8663         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8665 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8667         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8668         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8669         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8670         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8672 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8674         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8675         Disable -fdelete-null-pointer-checks for ELF toolchain.
8677 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8678             Kito Cheng  <kito.cheng@gmail.com>
8680         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8681         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8682         (nds32*-*-*): Add glibc and uclibc conditions.
8683         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8684         (TARGET_EXCEPT_UNWIND_INFO): Define.
8685         * config/nds32/elf.h: New file.
8686         * config/nds32/linux.h: New file.
8687         * config/nds32/nds32-elf.opt: New file.
8688         * config/nds32/nds32-linux.opt: New file.
8689         * config/nds32/nds32-fp-as-gp.c
8690         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8691         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8692         TARGET_LINUX_ABI.
8693         (nds32_asm_file_end): Ditto.
8694         (nds32_print_operand): Ditto.
8695         (nds32_insert_attributes): Ditto.
8696         (nds32_init_libfuncs): New function.
8697         (TARGET_HAVE_TLS): Define.
8698         (TARGET_INIT_LIBFUNCS): Define.
8699         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8700         spec content.
8701         (TARGET_ELF): Apply different mcmodel setting.
8702         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8703         been migrated into elf.h and linux.h files.
8704         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8705         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8706         (mcmodel): The content has been migrated into nds32-elf.opt and
8707         nds32-linux.opt files.
8708         * config/nds32/t-elf: New file.
8709         * config/nds32/t-linux: New file.
8711 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8712             Shiva Chen  <shiva0217@gmail.com>
8714         * config/nds32/constants.md (unspec_volatile_element): Add
8715         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8716         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8717         optimization.
8718         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8719         (make_pass_nds32_fp_as_gp): Declare.
8720         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8721         optmization pass.
8722         (nds32_asm_function_end_prologue): Remove unused asm output.
8723         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8724         (nds32_asm_file_start): Output necessary fp_as_gp information.
8725         (nds32_option_override): Adjust register usage.
8726         (nds32_expand_prologue): Consider fp_as_gp situation.
8727         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8728         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8729         (epilogue): Ditto.
8730         (return): Ditto.
8731         (simple_return): Ditto.
8732         (omit_fp_begin): Output special directive for fp_as_gp.
8733         (omit_fp_end): Output special directive for fp_as_gp.
8734         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8735         mforbid-fp-as-gp): New options.
8737 2018-06-01  Mark Wielaard  <mark@klomp.org>
8739         * dwarf2out.c (dwarf2out_finish): Remove generation of
8740         DW_AT_loclists_base.
8742 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8744         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8745         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8746         (struct merged_store_group): Add bit_insertion field.
8747         (dump_char_array): Use standard hexadecimal format.
8748         (merged_store_group::merged_store_group): Set bit_insertion to false.
8749         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8750         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8751         also print the mask in the dump file.
8752         (pass_store_merging::gate): Minor tweak.
8753         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8754         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8755         stores with INTEGER_CST stores.
8756         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8757         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8758         and use it throughout.  Generate bit insertion sequences if need be.
8759         (pass_store_merging::process_store): Remove redundant condition.
8760         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8762 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8764         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8765         the 128-bit floating point types.  Fix function comment.
8767 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8769         * config/aarch64/aarch64-simd.md
8770         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8771         mnemonics.
8772         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8773         mnemonics.
8775 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8777         PR tree-optimization/85989
8778         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8779         variable.
8780         (backprop::intersect_uses): Check it when deciding whether this
8781         is a backedge reference.
8782         (backprop::process_block): Add each phi to m_visited_phis
8783         after visiting it, then clear it at the end.
8785 2018-06-01  Richard Biener  <rguenther@suse.de>
8787         * tree-vectorizer.h (vect_dr_stmt): New function.
8788         (vect_get_load_cost): Adjust.
8789         (vect_get_store_cost): Likewise.
8790         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8791         Use vect_dr_stmt instead of DR_SMTT.
8792         (vect_record_base_alignments): Likewise.
8793         (vect_calculate_target_alignment): Likewise.
8794         (vect_compute_data_ref_alignment): Likewise and make static.
8795         (vect_update_misalignment_for_peel): Likewise.
8796         (vect_verify_datarefs_alignment): Likewise.
8797         (vector_alignment_reachable_p): Likewise.
8798         (vect_get_data_access_cost): Likewise.  Pass down
8799         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8800         (vect_get_peeling_costs_all_drs): Likewise.
8801         (vect_peeling_hash_get_lowest_cost): Likewise.
8802         (vect_enhance_data_refs_alignment): Likewise.
8803         (vect_find_same_alignment_drs): Likewise.
8804         (vect_analyze_data_refs_alignment): Likewise.
8805         (vect_analyze_group_access_1): Likewise.
8806         (vect_analyze_group_access): Likewise.
8807         (vect_analyze_data_ref_access): Likewise.
8808         (vect_analyze_data_ref_accesses): Likewise.
8809         (vect_vfa_segment_size): Likewise.
8810         (vect_small_gap_p): Likewise.
8811         (vectorizable_with_step_bound_p): Likewise.
8812         (vect_prune_runtime_alias_test_list): Likewise.
8813         (vect_analyze_data_refs): Likewise.
8814         (vect_supportable_dr_alignment): Likewise.
8815         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8816         (vect_gen_prolog_loop_niters): Likewise.
8817         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8818         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8819         modify DR_STMT.
8820         (vect_recog_mask_conversion_pattern): Likewise.
8821         (vect_try_gather_scatter_pattern): Likewise.
8822         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8823         to vect_get_store_cost.
8824         (vect_get_store_cost): Get stmt_info instead of DR.
8825         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8826         (vect_get_load_cost): Get stmt_info instead of DR.
8828 2018-06-01  Richard Biener  <rguenther@suse.de>
8830         PR middle-end/86017
8831         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8832         vars wrapped in MEM_REFs.
8834 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8836         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8837         Fix subreg tests so that we only return a choice between
8838         GENERAL_REGS and FP_REGS if the original classes included both.
8840 2018-06-01  Richard Biener  <rguenther@suse.de>
8842         PR ipa/85960
8843         * tree-ssa-structalias.c (get_function_part_constraint):
8844         Handle NULL fi->decl.
8845         (find_func_aliases_for_call): Properly handle indirect
8846         fi from direct call.
8847         (find_func_clobbers): Likewise.
8848         (ipa_pta_execute): Likewise.
8849         (create_variable_info_for): For functions that are ifunc_resolver
8850         resolve to a varinfo that contains the result of the resolver call.
8851         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8852         aliases.
8854 2018-05-31  Michael Collison  <michael.collison@arm.com>
8856         * config/aarch64/aarch64.md:
8857         (*fix_to_zero_extenddfdi2): New pattern.
8858         * gcc.target/aarch64/fix_extend1.c: New testcase.
8860 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8862         PR middle-end/78809
8863         PR middle-end/83026
8864         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8865         and BUILT_IN_STRNCMP_EQ.
8866         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8867         BUILT_IN_STRNCMP_EQ.
8868         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8869         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8870         (gimple_fold_builtin): Likewise.
8871         * tree-ssa-strlen.c (compute_string_length): New function.
8872         (determine_min_obsize): New function.
8873         (handle_builtin_string_cmp): New function to handle calls to
8874         string compare functions.
8875         (strlen_optimize_stmt): Add handling to builtin string compare
8876         calls.
8877         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8878         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8879         * tree.c (build_common_builtin_nodes): Add new defines of
8880         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8882 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8884         PR target/85984
8885         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8886         functions with naked attribute.
8888 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8890         * config/i386/sse.md (avx_vec_concat<mode>):
8891         Substitute concat_tg_mode mode attribute with xtg_mode.
8892         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8893         (concat_tg_mode): Remove mode attribute.
8895 2018-05-31  Martin Sebor  <msebor@redhat.com>
8897         PR c/82063
8898         * calls.c (alloc_max_size): Correct a logic error/typo.
8899         Treat excessive arguments as infinite.  Warn for invalid arguments.
8900         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8902 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8904         PR target/85829
8905         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8906         and movx for Haswell.
8908 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8909             Cesar Philippidis  <cesar@codesourcery.com>
8911         PR middle-end/85879
8912         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8913         when emitting error on private/firstprivate reductions.
8914         * omp-low.c (lower_omp_target): Avoid reference-type processing
8915         on pointers for firstprivate clause.
8917 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8919         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8920         (st1x2): Likewise.
8921         (st1x3): Likewise.
8922         * config/aarch64/aarch64-simd.md
8923         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8924         (aarch64_ld1_x3_<mode>): Likewise
8925         (aarch64_st1x2<VALLDIF:mode>): Likewise
8926         (aarch64_st1_x2_<mode>): Likewise
8927         (aarch64_st1x3<VALLDIF:mode>): Likewise
8928         (aarch64_st1_x3_<mode>): Likewise
8929         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8930         (vld1_s8_x3): Likewise.
8931         (vld1_u16_x3): Likewise.
8932         (vld1_s16_x3): Likewise.
8933         (vld1_u32_x3): Likewise.
8934         (vld1_s32_x3): Likewise.
8935         (vld1_u64_x3): Likewise.
8936         (vld1_s64_x3): Likewise.
8937         (vld1_f16_x3): Likewise.
8938         (vld1_f32_x3): Likewise.
8939         (vld1_f64_x3): Likewise.
8940         (vld1_p8_x3): Likewise.
8941         (vld1_p16_x3): Likewise.
8942         (vld1_p64_x3): Likewise.
8943         (vld1q_u8_x3): Likewise.
8944         (vld1q_s8_x3): Likewise.
8945         (vld1q_u16_x3): Likewise.
8946         (vld1q_s16_x3): Likewise.
8947         (vld1q_u32_x3): Likewise.
8948         (vld1q_s32_x3): Likewise.
8949         (vld1q_u64_x3): Likewise.
8950         (vld1q_s64_x3): Likewise.
8951         (vld1q_f16_x3): Likewise.
8952         (vld1q_f32_x3): Likewise.
8953         (vld1q_f64_x3): Likewise.
8954         (vld1q_p8_x3): Likewise.
8955         (vld1q_p16_x3): Likewise.
8956         (vld1q_p64_x3): Likewise.
8957         (vst1_s64_x2): Likewise.
8958         (vst1_u64_x2): Likewise.
8959         (vst1_f64_x2): Likewise.
8960         (vst1_s8_x2): Likewise.
8961         (vst1_p8_x2): Likewise.
8962         (vst1_s16_x2): Likewise.
8963         (vst1_p16_x2): Likewise.
8964         (vst1_s32_x2): Likewise.
8965         (vst1_u8_x2): Likewise.
8966         (vst1_u16_x2): Likewise.
8967         (vst1_u32_x2): Likewise.
8968         (vst1_f16_x2): Likewise.
8969         (vst1_f32_x2): Likewise.
8970         (vst1_p64_x2): Likewise.
8971         (vst1q_s8_x2): Likewise.
8972         (vst1q_p8_x2): Likewise.
8973         (vst1q_s16_x2): Likewise.
8974         (vst1q_p16_x2): Likewise.
8975         (vst1q_s32_x2): Likewise.
8976         (vst1q_s64_x2): Likewise.
8977         (vst1q_u8_x2): Likewise.
8978         (vst1q_u16_x2): Likewise.
8979         (vst1q_u32_x2): Likewise.
8980         (vst1q_u64_x2): Likewise.
8981         (vst1q_f16_x2): Likewise.
8982         (vst1q_f32_x2): Likewise.
8983         (vst1q_f64_x2): Likewise.
8984         (vst1q_p64_x2): Likewise.
8985         (vst1_s64_x3): Likewise.
8986         (vst1_u64_x3): Likewise.
8987         (vst1_f64_x3): Likewise.
8988         (vst1_s8_x3): Likewise.
8989         (vst1_p8_x3): Likewise.
8990         (vst1_s16_x3): Likewise.
8991         (vst1_p16_x3): Likewise.
8992         (vst1_s32_x3): Likewise.
8993         (vst1_u8_x3): Likewise.
8994         (vst1_u16_x3): Likewise.
8995         (vst1_u32_x3): Likewise.
8996         (vst1_f16_x3): Likewise.
8997         (vst1_f32_x3): Likewise.
8998         (vst1_p64_x3): Likewise.
8999         (vst1q_s8_x3): Likewise.
9000         (vst1q_p8_x3): Likewise.
9001         (vst1q_s16_x3): Likewise.
9002         (vst1q_p16_x3): Likewise.
9003         (vst1q_s32_x3): Likewise.
9004         (vst1q_s64_x3): Likewise.
9005         (vst1q_u8_x3): Likewise.
9006         (vst1q_u16_x3): Likewise.
9007         (vst1q_u32_x3): Likewise.
9008         (vst1q_u64_x3): Likewise.
9009         (vst1q_f16_x3): Likewise.
9010         (vst1q_f32_x3): Likewise.
9011         (vst1q_f64_x3): Likewise.
9012         (vst1q_p64_x3): Likewise.
9014 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9016         * config/msp430/msp430.c (msp430_output_labelref): Prepend
9017         user_label_prefix to name.
9019         * tree-core.h: Update comment about the format of NAME string
9020         passed to handler in attribute_spec.
9022         * config/msp430/msp430.md: Remove erroneous subreg expression from
9023         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
9024         zero_extend{q,h}isi2.
9026 2018-05-30  Borislav Petkov  <bp@suse.de>
9028         * doc/extend.texi: Document some architecture specific
9029         constraints and sort entries.
9031 2018-05-30  Martin Sebor  <msebor@redhat.com>
9033         PR middle-end/85369
9034         * builtins.c (expand_builtin_stpcpy_1): New function.
9035         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
9036         only if the former succeeds.
9038 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
9040         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
9041         in saphira.
9043 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9045         * doc/invoke.texi (-flinker-output): Document
9047 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9049         * passes.c (ipa_write_summaries): Only modify statements if body
9050         is in memory.
9051         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
9052         incrementally linking.
9053         (ipa_passes): Likewise.
9054         * lto-cgraph.c (lto_output_node): When incrementally linking do not
9055         pass down resolution info.
9056         * common.opt (flag_incremental_link): Update info.
9057         * gcc.c (plugin specs): Turn flinker-output=* to
9058         -plugin-opt=-linker-output-known
9059         * toplev.c (compile_file): Also cut compilation when doing incremental
9060         link.
9061         * flag-types. (enum lto_partition_model): Add
9062         LTO_LINKER_OUTPUT_NOLTOREL.
9063         (invoke.texi): Add -flinker-output docs.
9064         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
9065         link same way as WPA; do not stream in dead initializers.
9067         * dwarf2out.c (dwarf2out_die_ref_for_decl,
9068         darf2out_register_external_decl): Support incremental link.
9070 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9072         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
9074 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
9076         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
9077         it down to simple_object_copy_lto_debug_sections.
9078         (run_gcc): Determine incremental LTO link time and configure
9079         lto1 into non-wpa mode, disable renaming of debug sections.
9081 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9083         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
9084         descriptions of various incorrectly documented functions.
9086 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9088         Revert:
9089         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9090         address check not strict.
9092 2018-05-30  Richard Biener  <rguenther@suse.de>
9094         PR tree-optimization/85964
9095         * tracer.c (better_p): Drop initialized count check, we only
9096         call the function with initialized counts now.
9097         (find_best_successor): Do find a best edge if one
9098         has uninitialized count.
9099         (find_best_predecessor): Likewise.  Do BB frequency check only
9100         if count is initialized.
9102 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9104         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9105         (aarch64_ldrstr_offset_compare): New.
9106         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9107         load/store orderings.
9108         (aarch64_gen_adjusted_ldpstp): Likewise.
9110 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9112         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9113         Check for subset of GENERAL_REGS and FP_REGS.
9114         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9115         r=w alternative.
9117 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9119         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9120         and wi::to_poly_offset.  Add the current offset and then check
9121         whether the sum fits, rather than using an unchecked addition of
9122         a checked term.  Check for a shwi rather than a uhwi.
9123         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9124         (store_constructor): Use poly_int_tree_p.
9125         (expand_expr_real_1): Likewise.
9126         * function.c (assign_temp): Likewise.
9127         * fold-const.c (const_binop): Use poly_int_tree_p and
9128         wi::to_poly_offset.
9129         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9130         division.
9131         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9132         to_poly_offset for MEM offsets.
9133         * ipa-icf.c (sem_variable::equals): Likewise.
9134         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9135         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9136         wi::to_poly_offset for BIT_FIELD_REF offsets.
9137         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9138         wi::to_poly_offset.
9139         * var-tracking.c (emit_note_insn_var_location): Use
9140         tree_to_poly_uint64.
9142 2018-05-29  Jim Wilson  <jimw@sifive.com>
9144         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9146 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9148         PR target/85950
9149         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9150         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9151         sequence.
9152         (sse4_1_round<mode>2): Use nonimmediate_operand
9153         for operand 1 predicate.
9155 2018-05-29  Martin Sebor  <msebor@redhat.com>
9156             Richard Biener  <rguenther@suse.de>
9158         PR testsuite/85888
9159         * calls.c (get_size_range): Call determine_value_range instead
9160         of get_value_range..
9161         * tree-vrp.h (determine_value_range): Declared new function.
9162         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9164 2018-05-29  Richard Biener  <rguenther@suse.de>
9166         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9167         sure to use non-pattern stmts for get_earlier_stmt arguments.
9168         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9169         called on pattern stmts.
9170         (get_later_stmt): Likewise.
9172 2018-05-29  Martin Liska  <mliska@suse.cz>
9174         PR gcov-profile/85759
9175         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9176         env variables.
9178 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9180         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9181         VEC_UNPACK_*_EXPR.
9182         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9183         VEC_PACK_*_EXPR.
9185         PR target/85918
9186         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9187         VEC_PACK_FLOAT_EXPR): New tree codes.
9188         * tree-pretty-print.c (op_code_prio): Handle
9189         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9190         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9191         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9192         * tree-inline.c (estimate_operator_cost): Likewise.
9193         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9194         * fold-const.c (const_binop): Likewise.
9195         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9196         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9197         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9198         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9199         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9200         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9201         * expr.c (expand_expr_real_2): Likewise.
9202         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9203         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9204         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9205         optabs.
9206         * optabs.c (expand_widen_pattern_expr): For
9207         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9208         sign from result type rather than operand's type.
9209         (expand_binop_directly): For vec_packu_float_optab and
9210         vec_packs_float_optab allow result type to be different from operand's
9211         type.
9212         * optabs-tree.c (optab_for_tree_code): Handle
9213         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9214         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9215         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9216         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9217         VEC_PACK_FLOAT_EXPR.
9218         * tree-vect-stmts.c (supportable_widening_operation): Handle
9219         FIX_TRUNC_EXPR.
9220         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9221         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9222         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9223         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9224         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9225         mode attributes.
9226         (vec_pack<floatprefix>_float_<mode>): New expander.
9227         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9228         attributes.
9229         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9230         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9231         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9232         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9233         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9234         Document.
9235         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9236         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9237         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9238         VEC_PACK_FLOAT_EXPR): Document.
9240 2018-05-29  Richard Biener  <rguenther@suse.de>
9242         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9243         member.
9244         (stmt_vec_info_vec): Make pointer.
9245         (init_stmt_vec_info_vec): Remove.
9246         (free_stmt_vec_info_vec): Likewise.
9247         (set_stmt_vec_info_vec): New function.
9248         (free_stmt_vec_infos): Likewise.
9249         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9250         (set_vinfo_for_stmt): Likewise.
9251         (get_earlier_stmt): Likewise.
9252         (get_later_stmt): Likewise.
9253         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9254         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9255         (vec_info::~vec_info): Free stmt_vec_infos.
9256         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9257         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9258         (pass_slp_vectorize::execute): Likewise.
9259         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9260         (free_stmt_vec_info_vec): Likewise.
9261         (set_stmt_vec_info_vec): New function.
9262         (free_stmt_vec_infos): Likewise.
9263         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9264         the global stmt_vec_info_vec.
9265         * tree-parloops.c (gather_scalar_reductions): Use
9266         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9267         vector.
9269 2018-05-29  Richard Biener  <rguenther@suse.de>
9271         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9273 2018-05-29  Martin Liska  <mliska@suse.cz>
9274             David Malcolm  <dmalcolm@redhat.com>
9276         * vec.c (test_reverse): New.
9277         (vec_c_tests): Add new test.
9278         * vec.h (vl_ptr>::reverse): New function.
9280 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9282         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9284         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9285         and later.
9287 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9289         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9291 2018-05-28  Richard Biener  <rguenther@suse.de>
9293         PR tree-optimization/85933
9294         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9295         look at stmts marked as vectorizable.
9297 2018-05-28  Richard Biener  <rguenther@suse.de>
9299         PR tree-optimization/85934
9300         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9301         vector boolean check before scalar optimization.
9303 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9305         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9306         for armv5te.
9308 2018-05-28  Mark Wielaard  <mark@klomp.org>
9310         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9311         if it is an expression containing a minus sign.
9313 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9315         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9317 2018-05-27  Paul Koning  <ni1d@arrl.net>
9319         * config/pdp11/pdp11.md (truncsihi2): Remove.
9321 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9322             Chung-Ju Wu  <jasonwucj@gmail.com>
9324         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9325         implementation.
9326         (unaligned_store_dw): Ditto.
9327         * config/nds32/nds32-memory-manipulation.c
9328         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9329         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9330         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9331         (emit_setmem_word_loop): Rename to ...
9332         (emit_setmem_doubleword_loop): ... this.
9333         (nds32_gen_dup_4_byte_to_word_value): New function.
9334         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9335         (nds32_expand_setmem_loop): Refine implementation.
9336         (nds32_expand_setmem_loop_v3m): Ditto.
9337         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9338         pattern.
9340 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9342         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9344 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9346         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9347         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9348         machine->attr_no_prologue_p.
9349         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9350         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9351         (nds32_expand_epilogue): Consider attr_naked_p.
9352         (nds32_expand_epilogue_v3pop): Likewise.
9353         (nds32_can_use_return_insn): Likewise.
9354         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9355         attr_no_prologue_p fields.
9356         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9358 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9360         PR target/85918
9361         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9362         attributes.
9363         * config/i386/sse.md
9364         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9365         Rename to ...
9366         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9367         ... this.
9368         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9369         Rename to ...
9370         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9371         ... this.
9372         (*<floatsuffix>floatv2div2sf2): Rename to ...
9373         (*float<floatunssuffix>v2div2sf2): ... this.
9374         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9375         (float<floatunssuffix>v2div2sf2_mask): ... this.
9376         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9377         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9378         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9379         to ...
9380         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9381         ... this.
9382         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9383         Rename to ...
9384         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9385         ... this.
9386         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9387         Rename to ...
9388         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9389         ... this.
9390         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9391         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9392         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9393         gen_ufix_truncv8dfv8si2.
9394         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9395         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9396         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9397         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9398         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9399         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9400         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9401         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9403 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9405         PR target/85900
9406         PR target/85345
9407         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9409 2018-05-25  Jim Wilson  <jimw@sifive.com>
9411         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9412         * config/riscv/riscv.c (struct machine_function): Add
9413         interrupt_handler_p and attribute_checked_p fields.
9414         (riscv_attribute_table): Add interrupt.
9415         (riscv_interrupt_type_p): New.
9416         (riscv_save_reg_p): Save extra regs for interrupt handler.
9417         (riscv_use_save_libcall): Return false  for interrupt handler.
9418         (riscv_first_stack_step): Add forward declaration.
9419         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9420         for interrupt handler with large frame.  Use it for saved reg list.
9421         (riscv_expand_prologue): Move flag_stack_usage_info support to
9422         eliminate duplication.
9423         (riscv_expand_epilogue): Generate mret for interrupt handler.
9424         (riscv_epilogue_uses): New.
9425         (riscv_can_use_return_insn): Return false for interrupt handler.
9426         (riscv_function_ok_for_sibcall): Likewise.
9427         (riscv_set_current_function): Add interrupt handler support.
9428         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9429         * config/riscv/riscv.md (UNSPECV_MRET): New.
9430         (GP_REGNUM): New.
9431         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9432         (riscv_mret): New.
9433         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9435 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9437         PR tree-optimization/85712
9438         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9439         this candidate has already been replaced in-situ by a copy.
9441 2018-05-25  Jason Merrill  <jason@redhat.com>
9443         PR c++/80485 - inline function non-zero address.
9444         * symtab.c (nonzero_address): Check DECL_COMDAT.
9446 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9448         PR target/83628
9449         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9450         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9451         extension of SImode operation.  Use const123_operand predicate.
9452         (*saddsi_1): Remove.
9453         (*saddl_se_1): Ditto.
9454         (*ssubsi_1): Ditto.
9455         (*ssubl_se_1): Ditto.
9456         * config/alpha/predicates.md (const123_operand): New predicate.
9457         * config/alpha/constraints.md (P): Use IN_RANGE.
9459 2018-05-25  Richard Biener  <rguenther@suse.de>
9461         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9462         defaulted to true.
9463         (ref_maybe_used_by_stmt_p): Likewise.
9464         (stmt_may_clobber_ref_p): Likewise.
9465         (stmt_may_clobber_ref_p_1): Likewise.
9466         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9467         and pass it along.
9468         (ref_maybe_used_by_stmt_p): Likewise.
9469         (stmt_may_clobber_ref_p): Likewise.
9470         (stmt_may_clobber_ref_p_1): Likewise.
9471         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9472         the alias oracle to disambiguate DRs with stmts DR analysis
9473         couldn't handle.
9474         (vect_analyze_data_refs): Do not give up on not analyzable
9475         DRs for BB vectorization.  Remove code truncating the dataref
9476         vector.
9478 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9480         PR target/85832
9481         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9482         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9483         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9485 2018-05-25  Richard Biener  <rguenther@suse.de>
9487         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9488         function, combining stmt data ref gathering and fatal analysis
9489         parts.
9490         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9491         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9492         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9493         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9494         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9496 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9498         PR tree-optimization/85720
9499         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9500         SCC if all partitions are builtins.
9501         (version_loop_by_alias_check): New parameter.  Generate cancelable
9502         runtime alias check if all partitions are builtins.
9503         (distribute_loop): Update call to above function.
9505 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9507         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9508         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9509         (parm_default_def_partition_arg): Ditto.
9510         (set_parm_default_def_partition): Ditto.
9511         (get_parm_default_def_partitions): Ditto and make it static.
9512         (get_undefined_value_partitions): Ditto and make it static.
9513         (remove_ssa_form): Refactor call to init_var_map here.
9514         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9515         computation for loop region.
9516         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9517         (register_default_def): Delete.
9518         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9519         (parm_default_def_partition_arg): Ditto.
9520         (set_parm_default_def_partition): Ditto.
9521         (get_parm_default_def_partitions): Ditto and make it static.
9522         (get_undefined_value_partitions): Ditto and make it static.
9523         (coalesce_with_default, coalesce_with_default): Update comment.
9524         (create_coalesce_list_for_region): New func factored out from
9525         create_outofssa_var_map.
9526         (populate_coalesce_list_for_outofssa): New func factored out from
9527         create_outofssa_var_map and coalesce_ssa_name.
9528         (create_outofssa_var_map): Delete.
9529         (coalesce_ssa_name): Refactor to support live range computation.
9530         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9531         (get_parm_default_def_partitions): Delete.
9532         (get_undefined_value_partitions): Ditto.
9533         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9534         computation for loop region.
9535         (new_tree_live_info, loe_visit_block): Ditto.
9536         (live_worklist, set_var_live_on_entry): Ditto.
9537         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9538         * tree-ssa-live.h (struct _var_map): New fields.
9539         (init_var_map): Change decl.
9540         (region_contains_p): New.
9542 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9544         * tree-ssa-live.h (live_merge_and_clear): Delete.
9546 2018-05-25  Richard Biener  <rguenther@suse.de>
9548         PR c++/85912
9549         * tree-dump.c (dequeue_and_dump): Remove access to removed
9550         operand 2 of a SWITCH_EXPR.
9552 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9554         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9555         multiplication and division.
9556         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9557         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9558         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9559         (cond_udiv_optab, cond_umod_optab): New optabs.
9560         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9561         (IFN_COND_RDIV): New internal functions.
9562         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9563         TRUNC_MOD_EXPR and RDIV_EXPR.
9564         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9565         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9566         New unspecs.
9567         (SVE_INT_BINARY): Include mult.
9568         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9569         (optab, sve_int_op): Handle mult.
9570         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9571         UNSPEC_COND_DIV.
9572         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9573         for SVE_INT_BINARY_SD.
9575 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9577         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9578         (optab, sve_int_op): Handle div and udiv.
9579         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9580         for SVE_INT_BINARY_SD.
9581         (*<optab><mode>3): New insn for the same.
9583 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9585         * tree-vect-patterns.c: Include predict.h.
9586         (vect_recog_divmod_pattern): Restrict check for division support
9587         to when optimizing for size.
9589 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9591         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9592         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9593         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9594         (gimple_match_op::set_op): Likewise.
9595         (gimple_resimplify4): Declare.
9596         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9597         (expr::gen_transform): Likewise.
9598         (decision_tree::gen): Generate a simplification routine for 4 operands.
9599         * gimple-match-head.c (gimple_simplify): Add an overload for
9600         4 operands.  In the top-level function, handle up to 4 call
9601         arguments and call gimple_resimplify4.
9602         (gimple_resimplify4): New function.
9603         (build_call_internal): Pass a fourth operand.
9604         (maybe_push_to_seq): Likewise.
9605         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9606         Fold VEC_COND_EXPRs of an operation and a default value into
9607         an IFN_COND_* function if possible.
9608         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9609         New unspecs.
9610         (SVE_COND_FP_BINARY): Include them.
9611         (optab, sve_fp_op): Handle them.
9612         (SVE_INT_BINARY_REV): New code iterator.
9613         (SVE_COND_FP_BINARY_REV): New int iterator.
9614         (commutative): New int attribute.
9615         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9616         Declare.
9617         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9618         function.
9619         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9620         (*cond_<optab><mode>): New patterns for reversed operands.
9622 2018-05-25  Richard Biener  <rguenther@suse.de>
9624         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9625         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9626         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9627         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9628         * tree-vect-data-refs.c (everywhere): Adjust users.
9629         * tree-vect-loop.c (everywhere): Likewise.
9630         * tree-vect-slp.c (everywhere): Likewise.
9631         * tree-vect-stmts.c (everywhere): Likewise.
9632         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9634 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9636         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9637         Rename to...
9638         (gcc_cv_as_section_exclude): ... this.
9639         Try Solaris as #exclude syntax.
9640         * configure: Regenerate.
9641         * config.in: Regenerate.
9642         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9643         SECTION_EXCLUDE.
9644         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9645         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9647         * varasm.c (default_elf_asm_named_section): Don't check if
9648         HAVE_GAS_SECTION_EXCLUDE is defined.
9650 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9652         * doc/md.texi: Update the documentation of the cond_* optabs
9653         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9654         Describe the scalar case too.
9655         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9656         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9657         instead of 2.
9658         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9659         (get_conditional_internal_fn): Update comment.
9660         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9661         accumulator value as a final argument to conditional functions.
9662         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9663         a define_expand and add an "else" operand.  Assert for now that
9664         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9665         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9666         (*cond_<optab><mode>): New patterns.
9667         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9668         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9669         (UNSPEC_COND_EOR): Delete.
9670         (optab): Remove associated mappings.
9671         (SVE_INT_BINARY): New code iterator.
9672         (sve_int_op): Remove int attribute and add "minus" to the code
9673         attribute.
9674         (SVE_COND_INT_OP): Delete.
9675         (SVE_COND_FP_OP): Rename to...
9676         (SVE_COND_FP_BINARY): ...this.
9678 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9680         * optabs.c (can_reuse_operands_p): New function.
9681         (maybe_legitimize_operands): Try to reuse the results for
9682         earlier operands.
9684 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9686         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9687         Add {q} suffix to insn mnemonic.
9689 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9691         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9692         (msp430_warn_func_return): New.
9694 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9696         * fold-const.c (tree_nonzero_bits): New function.
9697         * fold-const.h (tree_nonzero_bits): Likewise.
9698         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9699         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9701 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9703         PR target/85900
9704         PR target/85345
9705         * varasm.c (assemble_alias): Check ifunc_resolver only on
9706         FUNCTION_DECL.
9708 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9710         PR target/85903
9711         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9712         when memory input operand is handled.
9714 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9716         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9717         global.
9718         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9720 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9722         * match.pd: Delay FMA folds until after vectorization.
9724 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9726         PR target/83009
9727         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9728         address check not strict.
9730 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9732         * gimple-match.h (gimple_match_op): New class.
9733         (mprts_hook): Replace parameters with a gimple_match_op *.
9734         (maybe_build_generic_op): Likewise.
9735         (gimple_simplified_result_is_gimple_val): Replace parameters with
9736         a const gimple_match_op *.
9737         (gimple_simplify): Replace code_helper * and tree * parameters with
9738         a gimple_match_op * parameter.
9739         (gimple_resimplify1): Replace code_helper *, tree and tree *
9740         parameters with a gimple_match_op * parameter.
9741         (gimple_resimplify2): Likewise.
9742         (gimple_resimplify3): Likewise.
9743         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9744         parameters with a gimple_match_op * parameter.
9745         * gimple-match-head.c (gimple_simplify): Change prototypes of
9746         auto-generated functions to take a gimple_match_op * instead of
9747         separate code_helper * and tree * parameters.  Make the same
9748         change in the top-level overload and update calls to the
9749         gimple_resimplify routines.  Update calls to the auto-generated
9750         functions and to maybe_push_res_to_seq in the publicly-facing
9751         operation-specific gimple_simplify overloads.
9752         (gimple_match_op::MAX_NUM_OPS): Define.
9753         (gimple_resimplify1): Replace rcode and ops with a single res_op
9754         parameter.  Update call to gimple_simplify.
9755         (gimple_resimplify2): Likewise.
9756         (gimple_resimplify3): Likewise.
9757         (mprts_hook): Replace parameters with a gimple_match_op *.
9758         (maybe_build_generic_op): Likewise.
9759         (build_call_internal): Replace type, nargs and ops with
9760         a gimple_match_op *.
9761         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9762         with a single gimple_match_op *.  Update calls to mprts_hook,
9763         build_call_internal and gimple_simplified_result_is_gimple_val.
9764         Factor out code that is common to the tree_code and combined_fn cases.
9765         * genmatch.c (expr::gen_transform): Replace tem_code and
9766         tem_ops with a gimple_match_op called tem_op.  Update calls
9767         to the gimple_resimplify functions and maybe_push_res_to_seq.
9768         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9769         res_ops.  Update call to the gimple_resimplify functions.
9770         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9771         (decision_tree::gen): Make the functions take a gimple_match_op *
9772         called res_op instead of separate res_code and res_ops parameters.
9773         Update call accordingly.
9774         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9775         and ops with a single res_op parameter.  Update calls to
9776         maybe_build_generic_op and maybe_push_res_to_seq.
9777         (fold_stmt_1): Update calls to gimple_simplify and
9778         replace_stmt_with_simplification.
9779         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9780         and gimple_simplified_result_is_gimple_val.
9781         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9782         gimple_simplify.
9783         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9784         with a gimple_match_op *.
9785         (vn_nary_build_or_lookup): Likewise.  Update call to
9786         vn_nary_build_or_lookup_1.
9787         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9788         gimple_match_op *.  Update calls to the gimple_resimplify routines
9789         and to gimple_simplified_result_is_gimple_val.
9790         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9791         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9792         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9793         (visit_nary_op): Likewise.
9794         (visit_reference_op_load): Likewise.
9796 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9798         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9799         modifier for printing the step amount.
9801 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9803         PR target/78849
9804         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9805         types.
9807 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9809         * doc/sourcebuild.texi (Endianness): New subsubsection.
9811 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9813         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9814         <prefetch_dynamic_strides>: New const bool field.
9815         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9816         prefetch_dynamic_strides.
9817         (exynosm1_prefetch_tune): Likewise.
9818         (thunderxt88_prefetch_tune): Likewise.
9819         (thunderx_prefetch_tune): Likewise.
9820         (thunderx2t99_prefetch_tune): Likewise.
9821         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9822         false.
9823         (aarch64_override_options_internal): Update to set
9824         PARAM_PREFETCH_DYNAMIC_STRIDES.
9825         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9826         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9827         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9828         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9829         prefetch-dynamic-strides setting.
9831 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9833         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9834         <minimum_stride>: New const int field.
9835         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9836         minimum_stride field defaulting to -1.
9837         (exynosm1_prefetch_tune): Likewise.
9838         (thunderxt88_prefetch_tune): Likewise.
9839         (thunderx_prefetch_tune): Likewise.
9840         (thunderx2t99_prefetch_tune): Likewise.
9841         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9842         <default_opt_level>: Set to 3.
9843         (aarch64_override_options_internal): Update to set
9844         PARAM_PREFETCH_MINIMUM_STRIDE.
9845         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9846         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9847         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9848         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9849         stride is constant and is below the minimum stride threshold.
9851 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9853         * config/arm/arm-cpus.in (mode26): Delete.
9854         (armv4): Delete mode26 reference.
9855         * config/arm/arm.c (arm_configure_build_target): Delete use of
9856         isa_bit_mode26.
9858 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9860         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9861         New insn pattern.
9862         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9863         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9864         for non-SSE modes.
9865         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9866         (floatunsdidf2): Ditto.
9868 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9870         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9871         (fixuns_trunc<mode>si2_avx512f): Ditto.
9872         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9873         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9874         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9876 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9878         PR rtl-optimization/79985
9879         * df-scan.c (df_insn_refs_collect): Remove special case for
9880         global registers and asm statements.
9882 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9884         * extend.texi (Global Register Variables): Rewrite the bullet list.
9885         Note that the register is available for allocation. Note that access
9886         via inline asm must use constraints. Add note about async-signal
9887         handlers. Remove paragraph about automagic register selection.
9889 2018-05-23  Richard Biener  <rguenther@suse.de>
9891         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9892         of fixed offset from memset VN.
9894 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9896         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9897         first_interp field.
9898         (alloc_cand_and_find_basis): Initialize first_interp field.
9899         (slsr_process_mul): Modify first_interp field.
9900         (slsr_process_add): Likewise.
9901         (slsr_process_cast): Modify first_interp field for each new
9902         interpretation.
9903         (slsr_process_copy): Likewise.
9904         (dump_candidate): Dump first_interp field.
9905         (replace_mult_candidate): Process all interpretations, not just
9906         subsequent ones.
9907         (replace_rhs_if_not_dup): Likewise.
9908         (replace_one_candidate): Likewise.
9910 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9912         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9913         Add new boolean.
9914         (aarch64_needs_frame_chain): New function.
9915         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9917 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9919         PR target/84882
9920         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9921         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9922         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9923         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9924         as true for strict-align.
9925         (aarch64_can_inline_p): Perform checks even when callee has no
9926         attributes to check for strict alignment.
9927         * doc/extend.texi (AArch64 Function Attributes): Document
9928         no-strict-align.
9929         * doc/invoke.texi: (AArch64 Options): Likewise.
9931 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9933         PR tree-optimization/85853
9934         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9935         the handling of the root of the node to...
9936         (vect_slp_analyze_node_operations_1): ...this new function,
9937         and run the whole thing with the child nodes' def types
9938         set according to their SLP node's def type.
9940 2018-05-23  Richard Biener  <rguenther@suse.de>
9942         PR middle-end/85874
9943         * tree-data-ref.c (create_runtime_alias_checks): Defer
9944         and ignore overflow warnings.
9946 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9948         PR tree-optimization/85822
9949         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9950         constants.
9952 2018-05-23  Richard Biener  <rguenther@suse.de>
9954         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9955         memset constants via native_interpret_expr.
9957 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9959         PR target/85345
9960         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9961         attribute.
9962         (cgraph_node::create_alias): Likewise.
9963         (cgraph_node::get_availability): Check ifunc_resolver instead
9964         of looking up ifunc attribute.
9965         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9966         * varasm.c (do_assemble_alias): Likewise.
9967         (assemble_alias): Likewise.
9968         (default_binds_local_p_3): Likewise.
9969         * cgraph.h (cgraph_node): Add ifunc_resolver.
9970         (cgraph_node::only_called_directly_or_aliased_p): Return false
9971         for IFUNC resolver.
9972         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9973         attribute.
9974         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9975         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9976         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9977         instead of looking up ifunc attribute.
9979 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9981         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9983 2018-05-22  Martin Sebor  <msebor@redhat.com>
9985         PR middle-end/85359
9986         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9987         only when expasion succeeds.
9988         (expand_builtin_strcmp): Same.
9989         (expand_builtin_strncmp): Same.
9991 2018-05-22  Martin Sebor  <msebor@redhat.com>
9993         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9995 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9996             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9998         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9999         aarch64_mem_pair_operand with memory_operand and delete operand swapping
10000         code.
10001         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10002         Add check for legitimate_address.
10003         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
10004         (aarch64_swap_ldrstr_operands): New.
10005         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
10006         Define prototype.
10008 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
10009             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10011         * config/aarch64/aarch64.md: New patterns to generate stp
10012         and ldp.
10013         (store_pair_sw, store_pair_dw): New patterns to generate stp for
10014         single words and double words.
10015         (load_pair_sw, load_pair_dw): Likewise.
10016         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
10017         Delete.
10018         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
10019         Delete.
10020         * config/aarch64/aarch64-ldpstp.md: Modify peephole
10021         for different mode ldpstp and add peephole for merged zero stores.
10022         Likewise for loads.
10023         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
10024         Add size check.
10025         (aarch64_gen_store_pair): Rename calls to match new patterns.
10026         (aarch64_gen_load_pair): Rename calls to match new patterns.
10027         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
10028         (load_pair<DREG:mode><DREG2:mode>): ... This.
10029         (store_pair<mode>): Rename to...
10030         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
10031         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
10032         New mode iterators.
10033         (V_INT_EQUIV): Handle SImode.
10034         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
10035         New predicate.
10037 2018-05-22  Martin Sebor  <msebor@redhat.com>
10039         PR c/85623
10040         * calls.c (maybe_warn_nonstring_arg): Use string length to set
10041         or ajust the presumed bound on an operation to avoid unnecessary
10042         warnings.
10044 2018-05-22  Martin Sebor  <msebor@redhat.com>
10046         PR tree-optimization/85826
10047         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
10048         assuming that a DECL necesarily has a constant size.
10050 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
10052         PR middle-end/85862
10053         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
10055 2018-05-22  Richard Biener  <rguenther@suse.de>
10057         PR tree-optimization/85834
10058         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
10059         non-constant and non-zero memset arguments.
10061 2018-05-22  Martin Liska  <mliska@suse.cz>
10063         PR ipa/85607
10064         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
10066 2018-05-22  Richard Biener  <rguenther@suse.de>
10068         PR tree-optimization/85863
10069         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
10070         comparisons when vectype is specified.
10071         (vectorizable_condition): Do not specify vectype for
10072         vect_is_simple_cond when SLP vectorizing.
10074 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
10076         PR target/85657
10077         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
10078         define __ibm128 as long double.
10079         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
10080         as a distinct type when IEEE 128-bit support is enabled.
10081         (init_float128_ieee): Fix up conversions between IFmode and IEEE
10082         128-bit types to use the correct functions.
10083         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
10084         convert between 128-bit floating point types that have different
10085         modes but the same representation, instead of using gen_lowpart to
10086         makean alias.
10087         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
10088         KFmode.
10089         (IFKF_reg): New attributes to give the register constraints for
10090         IFmode and KFmode.
10091         (extend<mode>tf2_internal): New insns to mark an explicit
10092         conversion between 128-bit floating point types that have a
10093         different mode but share the same representation.
10095 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
10097         PR tree-optimization/85814
10098         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
10099         a null return from get_strinfo when unsharing the next
10100         strinfo in the chain.
10102 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10104         PR gcc/84923
10105         * varasm.c (weak_finish): Clean up weak_decls.
10107 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10109         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10110         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10111         UNSPEC_UADALP values.
10112         * config/aarch64/iterators.md (ABAL): New int iterator.
10113         (ABDL2): Likewise.
10114         (ADALP): Likewise.
10115         (sur): Add mappings for the above.
10116         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10117         New define_insn.
10118         (aarch64_<sur>abal<mode>_4): Likewise.
10119         (aarch64_<sur>adalp<mode>_3): Likewise.
10120         (<sur>sadv16qi): New define_expand.
10122 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10124         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10125         (*movdf_internal): Ditto.
10126         (*rcpsf2_sse): Ditto.
10127         (*rsqrtsf2_sse): Ditto.
10128         (*sqrt<mode>2_sse): Ditto.
10130 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10132         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10133         eor3q<mode>4.
10134         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10135         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10136         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10137         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10138         vbcaxq_s64): New.
10139         * config/aarch64/arm_neon.h: Likewise.
10140         * config/aarch64/iterators.md (VQ_I): New.
10142 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10144         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10145         arc*-*-linux*.
10146         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10147         MULTILIB_DIRNAMES
10149 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10151         * config/nds32/constraints.md (S): New constraint.
10152         * config/nds32/nds32.md (call_internal): Use constraint S.
10153         (call_value_internal): Likewise.
10154         (sibcall_internal): Likewise.
10155         (sibcall_value_internal): Likewise.
10157 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10158             Chung-Ju Wu  <jasonwucj@gmail.com>
10160         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10161         into consideration.
10163 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10164             Chung-Ju Wu  <jasonwucj@gmail.com>
10166         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10167         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10168         (nds32_rtx_costs_impl): Simplify.
10169         (nds32_address_cost_impl): Simplify.
10170         (nds32_init_rtx_costs): New function.
10171         (nds32_rtx_costs_speed_prefer): Likewise.
10172         (nds32_rtx_costs_size_prefer): Likewise.
10173         (nds32_address_cost_speed_prefer): Likewise.
10174         (nds32_address_cost_speed_fwprop): Likewise.
10175         (nds32_address_cost_size_prefer): Likewise.
10176         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10177         * config/nds32/nds32.c (nds32_option_override): Use
10178         nds32_init_rtx_costs function.
10180 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10182         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10183         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10184         (TARGET_PIPELINE_N8): Likewise.
10185         (TARGET_PIPELINE_N10): Likewise.
10186         (TARGET_PIPELINE_N13): Likewise.
10187         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10189 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10191         * config/nds32/nds32-fpu.md: Update copyright year.
10193 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10195         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10197 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10199         * config/nds32/nds32.c
10200         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10201         * config/nds32/nds32.opt (minline-asm-r15): New option.
10203 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10205         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10206         MASK_HW_ABS.
10207         * config/nds32/nds32.md (abssi2): New pattern.
10209 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10211         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10212         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10213         Merge insn pattern from sse_cvtsi2ss<round_name> and
10214         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10215         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10216         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10217         using SWI48 mode iterator.
10218         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10219         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10220         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10221         pattern from sse_cvttss2si<round_saeonly_name>
10222         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10223         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10224         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10225         using SWI48 mode iterator.
10226         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10227         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10228         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10229         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10230         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10231         using SWI48 mode iterator.
10232         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10233         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10234         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10235         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10236         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10237         SWI48 mode iterator.
10238         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10239         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10240         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10241         pattern from sse_cvttsd2si<round_saeonly_name>
10242         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10244 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10246         * config/nds32/nds32-md-auxiliary.c
10247         (nds32_valid_smw_lwm_base_p): Refine.
10248         (nds32_output_smw_single_word): Refine.
10249         (nds32_output_smw_double_word): New.
10250         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10252 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10254         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10255         (nds32_output_stack_pop): Refine.
10256         (nds32_expand_unaligned_load): Refine.
10257         (nds32_expand_unaligned_store): Refine.
10259 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10260             Chung-Ju Wu  <jasonwucj@gmail.com>
10262         * config/nds32/constants.md: Add TP_REGNUM constant.
10263         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10264         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10265         UNSPEC_ADD32.
10266         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10267         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10268         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10269         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10270         and PIC code generation.
10271         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10272         code generation.
10273         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10274         optimization.
10275         * config/nds32/nds32.md: Support TLS and PIC.
10276         * config/nds32/nds32.c: Support TLS and PIC.
10277         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10278         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10279         predicate.
10281 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10283         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10284         mode with E_ prefix.
10286 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10287             Chung-Ju Wu  <jasonwucj@gmail.com>
10289         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10290         * config/nds32/nds32-md-auxiliary.c
10291         (symbolic_reference_mentioned_p): New.
10292         (nds32_legitimize_ict_address): New.
10293         (nds32_expand_ict_move): New.
10294         (nds32_indirect_call_referenced_p): New.
10295         (nds32_symbol_binds_local_p): Delete.
10296         (nds32_long_call_p): Modify.
10297         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10298         * config/nds32/nds32-protos.h
10299         (symbolic_reference_mentioned_p): Declare.
10300         (nds32_legitimize_ict_address): Declare.
10301         (nds32_expand_ict_move): Declare.
10302         (nds32_indirect_call_referenced_p): Declare.
10303         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10304         (nds32_relax_group): Use nds32_ict_const_p as condition.
10305         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10306         (nds32_asm_file_start): Output ict_model directive in asm code.
10307         (nds32_legitimate_address_p): Consider indirect call.
10308         (nds32_print_operand): Consider indirect call.
10309         (nds32_print_operand_address): Consider indirect call.
10310         (nds32_insert_attributes): Handle "indirect_call" attribute.
10311         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10312         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10313         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10314         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10315         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10316         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10317         (TARGET_ICT_MODEL_SMALL): Define.
10318         (TARGET_ICT_MODEL_LARGE): Define.
10319         * config/nds32/nds32.md (movsi): Consider ict model.
10320         (call, call_value): Consider ict model.
10321         (sibcall, sibcall_value): Consider ict model.
10322         * config/nds32/nds32.opt (mict-model): New option.
10323         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10324         model.
10326 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10327             Monk Chiang  <sh.chiang04@gmail.com>
10328             Jim Wilson <jimw@sifive.com>
10330         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10331         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10332         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10333         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10334         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10335         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10336         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10337         compute save_libcall_adjustment properly.
10338         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10339         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10340         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10341         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10342         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10343         (ABI_SPEC): Handle mabi=ilp32e.
10344         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10345         (RVE): Add RVE mask.
10346         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10347         <-march>: Add rv32e as an example.
10349 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10351         PR c++/82899
10352         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10353         (intra_create_variable_infos): Handle C++ constructors.
10355 2018-05-18  Martin Liska  <mliska@suse.cz>
10357         * passes.def: Remove a redundant pass.
10359 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10361         PR bootstrap/85838
10362         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10364 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10366         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10367         (ARMv4): Update.
10368         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10369         (ARMv6m): Update.
10370         (armv2, armv2a, armv3, armv3m): Delete architectures.
10371         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10372         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10373         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10374         Delete cpus.
10375         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10376         (*mulsidi3adddi): Likewise.
10377         (mulsidi3): Likewise.
10378         (*mulsidi3_nov6): Likewise.
10379         (umulsidi3): Likewise.
10380         (umulsidi3_nov6): Likewise.
10381         (umaddsidi4): Likewise.
10382         (*umulsidi3adddi): Likewise.
10383         (smulsi3_highpart): Likewise.
10384         (*smulsi3_highpart_nov6): Likewise.
10385         (umulsi3_highpart): Likewise.
10386         (*umulsi3_highpart_nov6): Likewise.
10387         * config/arm/arm.h (arm_arch3m): Delete.
10388         * config/arm/arm.c (arm_arch3m): Delete.
10389         (arm_option_override_internal): Update armv3-related comment.
10390         (arm_configure_build_target): Delete use of isa_bit_mode32.
10391         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10392         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10393         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10394         (mulsa3): Likewise.
10395         (mulusa3): Likewise.
10396         * config/arm/arm-protos.h (arm_arch3m): Delete.
10397         * config/arm/arm-tables.opt: Regenerate.
10398         * config/arm/arm-tune.md: Likewise.
10399         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10400         deleted architectures.
10402 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10404         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10405         (armv5t, armv5te): New features.
10406         (ARMv5, ARMv5e): Delete fgroups.
10407         (ARMv5t, ARMv5te): Adjust for above changes.
10408         (ARMv6m): Likewise.
10409         (armv5, armv5e): Delete arches.
10410         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10411         arm_arch5.
10412         (*call_reg_arm): Likewise.
10413         (*call_value_reg_armv5): Likewise.
10414         (*call_value_reg_arm): Likewise.
10415         (*call_symbol): Likewise.
10416         (*call_value_symbol): Likewise.
10417         (*sibcall_insn): Likewise.
10418         (*sibcall_value_insn): Likewise.
10419         (clzsi2): Likewise.
10420         (prefetch): Likewise.
10421         (define_split and define_peephole2 dependent on arm_arch5):
10422         Likewise.
10423         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10424         arm_arch5e.
10425         (TARGET_ARM_QBIT): Likewise.
10426         (TARGET_DSP_MULTIPLY): Likewise.
10427         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10428         (arm_arch5, arm_arch5e): Delete.
10429         (arm_arch5t, arm_arch5te): Declare.
10430         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10431         (arm_arch5t): Declare.
10432         (arm_option_reconfigure_globals): Update for the above.
10433         (arm_options_perform_arch_sanity_checks): Update comment, replace
10434         use of arm_arch5 with arm_arch5t.
10435         (use_return_insn): Likewise.
10436         (arm_emit_call_insn): Likewise.
10437         (output_return_instruction): Likewise.
10438         (arm_final_prescan_insn): Likewise.
10439         (arm_coproc_builtin_available): Likewise.
10440         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10441         arm_arch5e with arm_arch5t and arm_arch5te.
10442         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10443         (arm_arch5t, arm_arch5te): Declare.
10444         * config/arm/arm-tables.opt: Regenerate.
10445         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10446         * config/arm/t-multilib: Likewise.
10447         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10448         instead of arm_arch5.
10449         (*call_reg_thumb1): Likewise.
10450         (*call_value_reg_thumb1_v5): Likewise.
10451         (*call_value_reg_thumb1): Likewise.
10452         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10453         unreachable path.
10454         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10456 2018-05-18  Martin Liska  <mliska@suse.cz>
10458         PR gcov-profile/84846
10459         * doc/gcov.texi: Document -t option of gcov tool.
10461 2018-05-18  Martin Liska  <mliska@suse.cz>
10463         PR gcov-profile/84846
10464         * gcov.c (print_usage): Add new -t option.
10465         (process_args): Handle the option.
10466         (generate_results): Use stdout as output when requested by
10467         the option.
10469 2018-05-18  Martin Liska  <mliska@suse.cz>
10471         PR gcov-profile/84846
10472         * coverage.c (coverage_init): Write PWD to .gcno file.
10473         * doc/gcov.texi: Document how working directory is printed.
10474         * gcov-dump.c (dump_gcov_file): Print PWD.
10475         * gcov.c (output_intermediate_file): Likewise.
10476         (read_graph_file): Read PWD string.
10477         (output_lines): Print PWD.
10479 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10481         PR middle-end/85817
10482         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10483         for retval and return false if all args to phi are zero.
10485 2018-05-18  Richard Biener  <rguenther@suse.de>
10487         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10488         method.
10489         (evrp_dom_walker::before_dom_children): Call it.
10491 2018-05-18  Richard Biener  <rguenther@suse.de>
10493         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10494         results when processing array refs with variable index.
10496 2018-05-18  Toon Moene  <toon@moene.org>
10498         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10499         directly after that of -floop-interchange. Indicate that both
10500         options are enabled by default when specifying -O3.
10502 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10504         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10505         iterator.  Delete separate integer-mode vec_set<mode> expander.
10506         (aarch64_simd_vec_setv2di): Delete.
10507         (vec_setv2di): Delete.
10508         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10509         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10510         the "w, r" alternative.
10512 2018-05-18  Martin Liska  <mliska@suse.cz>
10514         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10515         * tree-pass.h (make_pass_lower_switch_O0): New function.
10516         * tree-switch-conversion.c (node_has_low_bound): Remove.
10517         (node_has_high_bound): Likewise.
10518         (node_is_bounded): Likewise.
10519         (class pass_lower_switch): Make it a template type and create
10520         two instances.
10521         (pass_lower_switch::execute): Add template argument.
10522         (make_pass_lower_switch): New function.
10523         (make_pass_lower_switch_O0): New function.
10524         (do_jump_if_equal): Remove.
10525         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10526         all the hard work to tree optimization passes.
10528 2018-05-18  Martin Liska  <mliska@suse.cz>
10530         * dbgcnt.c (limit_low): Renamed from limit.
10531         (limit_high): New variable.
10532         (dbg_cnt_is_enabled): Check for upper limit.
10533         (dbg_cnt): Adjust dumping.
10534         (dbg_cnt_set_limit_by_index): Add new argument for high
10535         value.
10536         (dbg_cnt_set_limit_by_name): Likewise.
10537         (dbg_cnt_process_single_pair): Parse new format.
10538         (dbg_cnt_process_opt): Use strtok.
10539         (dbg_cnt_list_all_counters): Remove 'value' and add
10540         'limit_high'.
10541         * doc/invoke.texi: Document changes.
10543 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10545         * doc/sourcebuild.texi (scalar_all_fma): Document.
10546         * tree.def (FMA_EXPR): Delete.
10547         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10548         * internal-fn.c (ternary_direct): New macro.
10549         (expand_ternary_optab_fn): Likewise.
10550         (direct_ternary_optab_supported_p): Likewise.
10551         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10552         * builtins.c (fold_builtin_fma): Delete.
10553         (fold_builtin_3): Don't call it.
10554         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10555         * expr.c (expand_expr_real_2): Likewise.
10556         * fold-const.c (operand_equal_p): Likewise.
10557         (fold_ternary_loc): Likewise.
10558         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10559         * gimple.c (DEFTREECODE): Likewise.
10560         * gimplify.c (gimplify_expr): Likewise.
10561         * optabs-tree.c (optab_for_tree_code): Likewise.
10562         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10563         * tree-eh.c (operation_could_trap_p): Likewise.
10564         (stmt_could_throw_1_p): Likewise.
10565         * tree-inline.c (estimate_operator_cost): Likewise.
10566         * tree-pretty-print.c (dump_generic_node): Likewise.
10567         (op_code_prio): Likewise.
10568         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10569         * tree-ssa-operands.c (get_expr_operands): Likewise.
10570         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10571         * fold-const-call.h (fold_fma): Delete.
10572         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10573         CFN_FNMA and CFN_FNMS.
10574         (fold_fma): Delete.
10575         * genmatch.c (combined_fn): New enum.
10576         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10577         (commutative_op): New function.
10578         (commutate): Use it.  Handle more than 2 operands.
10579         (dt_operand::gen_gimple_expr): Use commutative_op.
10580         (parser::parse_expr): Allow :c to be used with non-binary
10581         operators if the commutative operand is known.
10582         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10583         CFN_FMS, CFN_FNMA and CFN_FNMS.
10584         (backprop::process_assign_use): Remove FMA_EXPR handling.
10585         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10586         (gen_hsa_fma): New function.
10587         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10588         IFN_FNMA and IFN_FNMS.
10589         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10590         * gimple-fold.h (follow_all_ssa_edges): Declare.
10591         * gimple-fold.c (follow_all_ssa_edges): New function.
10592         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10593         gimple_build interface and use follow_all_ssa_edges to fold the result.
10594         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10595         instead of checking for optabs directly.
10596         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10597         rather than FMA_EXPRs.
10598         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10599         call to IFN_FMA instead of an FMA_EXPR.
10601 2018-05-17  Jim Wilson  <jimw@sifive.com>
10603         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10604         sign extended promoted subreg, and the range does not have the sign bit
10605         set, then do a sign extend.
10607         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10608         test, check for sign extended subreg and/or constant operands, and
10609         do a sign extend in that case.
10611 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10613         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10614         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10615         Add untyped.
10616         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10617         Change logics_shift_reg to logics_shift_imm.
10618         (thunderx2t99_fp_loadpair_basic): Delete.
10619         (thunderx2t99_fp_storepair_basic): Delete.
10620         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10621         (thunderx2t99_asimd_polynomial): Delete.
10622         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10623         and neon_fp_mul_d_scalar_q.
10624         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10625         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10626         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10627         (thunderx2t99_asimd_lut): Add missing tbl types.
10628         (thunderx2t99_asimd_ext): Delete.
10629         (thunderx2t99_asimd_load1_1_mult): Delete.
10630         (thunderx2t99_asimd_load1_2_mult): Delete.
10631         (thunderx2t99_asimd_load1_ldp): New.
10632         (thunderx2t99_asimd_load1): New.
10633         (thunderx2t99_asimd_load2): Add missing *load2* types.
10634         (thunderx2t99_asimd_load3): New.
10635         (thunderx2t99_asimd_load4): New.
10636         (thunderx2t99_asimd_store1_1_mult): Delete.
10637         (thunderx2t99_asimd_store1_2_mult): Delete.
10638         (thunderx2t99_asimd_store2_mult): Delete.
10639         (thunderx2t99_asimd_store2_onelane): Delete.
10640         (thunderx2t99_asimd_store_stp): New.
10641         (thunderx2t99_asimd_store1): New.
10642         (thunderx2t99_asimd_store2): New.
10643         (thunderx2t99_asimd_store3): New.
10644         (thunderx2t99_asimd_store4): New.
10646 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10648         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10649         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10651 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10652             Segher Boessenkool  <segher@kernel.crashing.org>
10654         PR target/85698
10655         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10656         operand.
10658 2018-05-17  Richard Biener  <rguenther@suse.de>
10660         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10661         for pruning loop and prune defs feeding only already visited PHIs.
10663 2018-05-17  Richard Biener  <rguenther@suse.de>
10665         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10667 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10668             Richard Biener  <rguenther@suse.de>
10670         PR tree-optimization/85793
10671         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10672         for VMAT_ELEMENTWISE.
10674 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10676         * internal-fn.h (lookup_internal_fn): Declare
10677         * internal-fn.c (lookup_internal_fn): New function.
10678         * gimple.c (gimple_build_call_from_tree): Handle calls to
10679         internal functions.
10680         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10681         internal function names.
10682         * tree-pretty-print.c (dump_generic_node): Likewise.
10683         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10685 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10687         * gimple-fold.h (gimple_build): Make the function forms take
10688         combined_fn rather than built_in_function.
10689         (gimple_simplify): Likewise.
10690         * gimple-match-head.c (gimple_simplify): Likewise.
10691         * gimple-fold.c (gimple_build): Likewise.
10692         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10693         rather than gimple_build_call_internal.
10694         (get_initial_defs_for_reduction): Likewise.
10695         (vect_create_epilog_for_reduction): Likewise.
10696         (vectorizable_live_operation): Likewise.
10698 2018-05-17  Martin Liska  <mliska@suse.cz>
10700         * gimple-ssa-sprintf.c (format_directive): Do not use
10701         space in between 'G_' and '('.
10703 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10705         PR target/85323
10706         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10707         even if the mask is not all ones.
10709         PR target/85323
10710         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10711         vector.
10712         (ix86_gimple_fold_builtin): Likewise.
10714         PR target/85323
10715         * config/i386/i386.c: Include tree-vector-builder.h.
10716         (ix86_vector_shift_count): New function.
10717         (ix86_fold_builtin): Fold shift builtins by scalar count.
10718         (ix86_gimple_fold_builtin): Likewise.
10720         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10721         _mm512_setzero): New intrinsics.
10723 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10724             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10726         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10727         code generation for cases where splatting a value is not useful.
10728         * simplify-rtx.c (simplify_ternary_operation): Simplify
10729         vec_merge across a vec_duplicate and a paradoxical subreg forming
10730         a vector mode to a vec_concat.
10732 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10734         * config.gcc: Support "goldmont-plus".
10735         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10736         "goldmont-plus".
10737         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10738         PROCESSOR_GOLDMONT_PLUS.
10739         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10740         (processor_target_table): Add "goldmont-plus".
10741         (PTA_GOLDMONT_PLUS): Define.
10742         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10743         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10744         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10745         (fold_builtin_cpu): Add "goldmont-plus".
10746         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10747         (ix86_option_override_internal): Add "goldmont-plus".
10748         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10749         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10750         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10751         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10753 2018-05-17  Richard Biener  <rguenther@suse.de>
10755         PR tree-optimization/85757
10756         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10757         remove defs that only feed that PHI from further processing.
10759 2018-05-16  Jim Wilson  <jimw@sifive.com>
10761         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10762         asterisk to name.
10763         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10765 2018-05-16  Mark Wielaard  <mark@klomp.org>
10767         * dwarf2out.c (count_index_strings): New function.
10768         (output_indirect_strings): Call count_index_strings and generate
10769         header for dwarf_version >= 5.
10771 2018-05-16  Mark Wielaard  <mark@klomp.org>
10773         * dwarf2out.c (dwarf_FORM): New function.
10774         (set_indirect_string): Use dwarf_FORM.
10775         (reset_indirect_string): Likewise.
10776         (size_of_die): Likewise.
10777         (value_format): Likewise.
10778         (output_die): Likewise.
10779         (add_skeleton_AT_string): Likewise.
10780         (output_macinfo_op): Likewise.
10781         (index_string): Likewise.
10782         (output_index_string_offset): Likewise.
10783         (output_index_string): Likewise.
10784         (count_index_strings): Likewise.
10786 2018-05-16  Carl Love  <cel@us.ibm.com>
10788         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10789         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10791 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10793         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10794         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10796 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10798         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10799         (fnma<mode>4): Likewise.
10800         (fms<mode>4): Likewise.
10801         (fnms<mode>4): Likewise.
10802         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10803         (aarch64_fnma<mode>4): Likewise.
10804         (aarch64_fms<mode>4): Likewise.
10805         (aarch64_fnms<mode>4): Likewise.
10806         (aarch64_fnmadd<mode>4): Likewise.
10808 2018-05-16  Jason Merrill  <jason@redhat.com>
10810         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10812 2018-05-16  Richard Biener  <rguenther@suse.de>
10814         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10815         (dump_stmt_cost): Declare.
10816         (add_stmt_cost): Dump cost we add.
10817         (add_stmt_costs): New function.
10818         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10819         No longer exported.
10820         (vect_analyze_stmt): Adjust prototype.
10821         (vectorizable_condition): Likewise.
10822         (vectorizable_live_operation): Likewise.
10823         (vectorizable_reduction): Likewise.
10824         (vectorizable_induction): Likewise.
10825         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10826         cost vector to pass to vectorizable_ and record afterwards.
10827         (vect_model_reduction_cost): Take cost vector argument and adjust.
10828         (vect_model_induction_cost): Likewise.
10829         (vectorizable_reduction): Likewise.
10830         (vectorizable_induction): Likewise.
10831         (vectorizable_live_operation): Likewise.
10832         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10833         SLP_TREE_NUMBER_OF_VEC_STMTS.
10834         (vect_analyze_slp_cost_1): Remove.
10835         (vect_analyze_slp_cost): Likewise.
10836         (vect_slp_analyze_node_operations): Take visited args and
10837         a target cost vector.  Avoid processing already visited stmt sets.
10838         (vect_slp_analyze_operations): Use a local cost vector to gather
10839         costs and register those of non-discarded instances.
10840         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10841         (vect_schedule_slp_instance): Remove copying of
10842         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10843         zero.
10844         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10845         adding cost.  Record cost entry location.
10846         (vect_prologue_cost_for_slp_op): Function to compute cost of
10847         a constant or invariant generated for SLP vect in the prologue,
10848         split out from vect_analyze_slp_cost_1.
10849         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10850         (vect_model_promotion_demotion_cost): Likewise.
10851         (vect_model_store_cost): Likewise, make static.
10852         (vect_model_load_cost): Likewise.
10853         (vectorizable_bswap): Add cost vector arg and adjust.
10854         (vectorizable_call): Likewise.
10855         (vectorizable_simd_clone_call): Likewise.
10856         (vectorizable_conversion): Likewise.
10857         (vectorizable_assignment): Likewise.
10858         (vectorizable_shift): Likewise.
10859         (vectorizable_operation): Likewise.
10860         (vectorizable_store): Likewise.
10861         (vectorizable_load): Likewise.
10862         (vectorizable_condition): Likewise.
10863         (vectorizable_comparison): Likewise.
10864         (can_vectorize_live_stmts): Likewise.
10865         (vect_analyze_stmt): Likewise.
10866         (vect_transform_stmt): Adjust calls to vectorizable_*.
10867         * tree-vectorizer.c: Include gimple-pretty-print.h.
10868         (dump_stmt_cost): New function.
10870 2018-05-16  Richard Biener  <rguenther@suse.de>
10872         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10873         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10874         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10875         (check_name): New callback.
10876         (dse_classify_store): Track cycles via a visited bitmap of PHI
10877         defs and simplify handling of in-loop and across loop dead stores
10878         and properly fail for loop-variant refs.  Handle byte-tracking with
10879         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10880         limiting the walk.
10882 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10884         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10885         (vect_get_mask_type_for_stmt): Likewise.
10886         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10887         split out from...
10888         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10889         to determine the statement's vector type and the vector type that
10890         should be used for calculating nunits.  Deal with cases in which
10891         the type has to be deferred.
10892         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10893         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10894         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10895         (vect_determine_vf_for_stmt): New functions, split out from...
10896         (vect_determine_vectorization_factor): ...here.
10897         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10898         (vect_get_mask_type_for_stmt): New functions, split out from
10899         vect_determine_vectorization_factor.
10901 2018-05-16  Richard Biener  <rguenther@suse.de>
10903         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10904         verify the [VEC_]COND_EXPR embedded comparison.
10906 2018-05-15  Martin Sebor  <msebor@redhat.com>
10908         PR tree-optimization/85753
10909         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10910         RECORD_TYPE in addition to ARRAY_TYPE.
10912 2018-05-15  Martin Sebor  <msebor@redhat.com>
10914         PR middle-end/85643
10915         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10917 2018-05-15  Richard Biener  <rguenther@suse.de>
10919         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10920         add by_clobber_p one.  Change algorithm to collect all defs
10921         representing uses we need to walk and try reducing them to
10922         a single one before failing.
10923         (dse_dom_walker::dse_optimize_stmt): Adjust.
10925 2018-05-13  Mark Wielaard  <mark@klomp.org>
10927         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10928         (size_of_loc_descr): Likewise.
10929         (output_loc_operands): Likewise.
10930         (output_loc_operands_raw): Likewise.
10931         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10932         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10933         (hash_loc_operands): Likewise.
10934         (compare_loc_operands): Likewise.
10936 2018-05-14  Mark Wielaard  <mark@klomp.org>
10938         * dwarf2out.c (count_index_addrs): New function.
10939         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10941 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10943         PR tree-optimization/83648
10944         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10945         return value as malloc candidate.
10947 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10949         PR ipa/85734
10950         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10951         param as true in call to suggest_attribute.
10953 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10955         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10956         -mreadonly-in-sdata.
10958 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10960         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10961         New pattern.
10962         (aarch64_crypto_aesd_fused): Likewise.
10964 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10966         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10967         (movsi_aarch64): Likewise.
10968         (load_pairsi): Likewise.
10969         (load_pairdi): Likewise.
10970         (store_pairsi): Likewise.
10971         (store_pairdi): Likewise.
10972         (load_pairsf): Likewise.
10973         (load_pairdf): Likewise.
10974         (store_pairsf): Likewise.
10975         (store_pairdf): Likewise.
10976         (zero_extend): Likewise.
10977         (trunc): Swap alternatives.
10978         (fcvt_target): Add '?' to prefer w over r.
10980 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10982         PR target/85756
10983         * config/i386/i386.md: Disallow non-commutative arithmetics in
10984         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10985         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10986         in the peephole2 before it.
10988 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10990         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10991         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10992         (ix86_handle_option): Handle -mcldemote.
10993         * config.gcc: New header.
10994         * config/i386/cldemoteintrin.h: New file.
10995         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10996         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10997         -mcldemote.
10998         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10999         OPTION_MASK_ISA_CLDEMOTE.
11000         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
11001         (ix86_valid_target_attribute_inner_p): Ditto.
11002         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
11003         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
11004         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
11005         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
11006         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
11007         (cldemote): New.
11008         * config/i386/i386.opt: Add -mcldemote.
11009         * config/i386/x86intrin.h: New header.
11010         * doc/invoke.texi: Add -mcldemote.
11012 2018-05-14  Richard Biener  <rguenther@suse.de>
11014         * doc/match-and-simplify.texi: Adjust :s documentation.
11016 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
11018         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
11019         intended memcpy size.
11020         (REORDER_45): Likewise.
11022 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
11024         * sort.cc: New file.
11025         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
11026         * vec.c (qsort_chk): Use gcc_qsort.
11027         * Makefile.in (OBJS-libcommon): Add sort.o.
11028         (build/sort.o): New target.  Use it...
11029         (BUILD_RTL): ... here, and...
11030         (build/gencfn-macros): ... here, and...
11031         (build/genmatch): ... here.
11033 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11034             Chung-Ju Wu  <jasonwucj@gmail.com>
11036         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
11037         * config/nds32/nds32-graywolf.md: New file.
11038         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
11039         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
11040         pipeline.
11041         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
11042         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
11043         * config/nds32/nds32.md (pipeline_model): Add graywolf.
11044         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
11045         * config/nds32/pipelines.md: Include n15 settings.
11047 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11048             Chung-Ju Wu  <jasonwucj@gmail.com>
11050         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
11051         * config/nds32/nds32-n13.md: New file.
11052         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
11053         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
11054         pipeline.
11055         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
11056         * config/nds32/nds32.md (pipeline_model): Add n13.
11057         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
11058         * config/nds32/pipelines.md: Include n13 settings.
11060 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
11061             Chung-Ju Wu  <jasonwucj@gmail.com>
11063         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
11064         * config/nds32/nds32-n10.md: New file.
11065         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
11066         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
11067         pipeline.
11068         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
11069         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
11070         * config/nds32/nds32.md (pipeline_model): Add n10.
11071         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
11072         * config/nds32/pipelines.md: Include n10 settings.
11074 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
11075             Kito Cheng  <kito.cheng@gmail.com>
11076             Chung-Ju Wu  <jasonwucj@gmail.com>
11078         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
11079         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
11080         Add enum values for DSP extension instructions.
11081         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
11082         New constraints.
11083         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
11084         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
11085         New code iterators.
11086         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
11087         * config/nds32/nds32-dspext.md: New file for DSP implementation.
11088         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
11089         * config/nds32/nds32-intrinsic.md: Likewise.
11090         * config/nds32/nds32_intrinsic.h: Likewise.
11091         * config/nds32/nds32-md-auxiliary.c: Likewise.
11092         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
11093         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
11094         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
11095         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
11096         * config/nds32/nds32-protos.h: New declarations for DSP extension.
11097         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
11098         TYPE_DMAC in switch statement.
11099         * config/nds32/nds32.c: New checking and implementation for DSP
11100         extension instructions.
11101         * config/nds32/nds32.h: Likewise.
11102         * config/nds32/nds32.md: Likewise.
11103         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11104         * config/nds32/predicates.md: Implement new predicates for DSP
11105         extension.
11107 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11109         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11110         Reformat alternatives and attributes so it is easier to identify
11111         which constraints/attributes go with which instruction.
11112         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11113         (mov<mode>_softfloat32, FMOVE64): Likewise.
11114         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11115         (mov<mode>_softfloat64, FMOVE64): Likewise.
11117 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11119         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11120         subsection.
11121         (Basic PowerPC Built-in Functions): The new name of the
11122         subsection previously known as "PowerPC Built-in Functions".
11123         (Basic PowerPC Built-in Functions Available on all Configurations):
11124         New subsubsection.
11125         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11126         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11127         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11128         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11130 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11132         PR ipa/85655
11133         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11134         single const.
11136 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11138         PR target/85733
11139         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11141 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11143         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11144         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11145         (ix86_handle_option): Handle -mwaitpkg.
11146         * config.gcc: New header.
11147         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11148         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11149         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11150         function type.
11151         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11152         OPTION_MASK_ISA_WAITPKG.
11153         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11154         (ix86_option_override_internal): Add PTA_WAITPKG.
11155         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11156         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11157         IX86_BUILTIN_TPAUSE.
11158         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11159         __builtin_ia32_umwait and __builtin_ia32_tpause.
11160         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11161         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11162         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11163         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11164         UNSPECV_TPAUSE): New.
11165         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11166         * config/i386/i386.opt: Add -mwaitpkg.
11167         * config/i386/waitpkgintrin.h: New file.
11168         * config/i386/x86intrin.h: New header.
11169         * doc/invoke.texi: Add -mwaitpkg.
11171 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11173         PR target/85606
11174         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11175         equivalent.
11176         (cortex-m0): Use armv6s-m isa.
11177         (cortex-m0plus): Likewise.
11178         (cortex-m1): Likewise.
11179         (cortex-m0.small-multiply): Likewise.
11180         (cortex-m0plus.small-multiply): Likewise.
11181         (cortex-m1.small-multiply): Likewise.
11183 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11184             Jakub Jelinek  <jakub@redhat.com>
11186         PR tree-optimization/85692
11187         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11188         source permute as well.
11190 2018-05-11  Martin Liska  <mliska@suse.cz>
11192         PR sanitizer/85556
11193         * doc/extend.texi: Document LLVM style format for no_sanitize
11194         attribute.
11196 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11198         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11199         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11200         (mode_supports_vsx_dform_quad): Likewise.
11201         (mode_supports_vmx_dform): Move these functions to be next to the
11202         other mode_supports functions.
11203         (mode_supports_dq_form): Likewise.
11204         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11205         mode_supports_dq_form.
11206         (reg_offset_addressing_ok_p): Likewise.
11207         (offsettable_ok_by_alignment): Likewise.
11208         (rs6000_legitimate_offset_address_p): Likewise.
11209         (legitimate_lo_sum_address_p): Likewise.
11210         (rs6000_legitimize_address): Likewise.
11211         (rs6000_legitimize_reload_address): Likewise.
11212         (rs6000_secondary_reload_inner): Likewise.
11213         (rs6000_preferred_reload_class): Likewise.
11214         (rs6000_output_move_128bit): Likewise.
11216 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11218         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11219         Generate SImode target register for null target.
11220         <case IX86_BUILTIN_XGETBV>: Ditto.
11221         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11222         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11224 2018-05-10  Carl Love  <cel@us.ibm.com>
11226         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11227         dcbtt and dcbtstt if operands[2] is 0.
11229 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11231         PR target/85693
11232         * config/i386/sse.md (usadv64qi): New expander.
11234 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11236         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11237         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11238         -maltivec=be support.
11239         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11240         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11241         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11242         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11243         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11244         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11245         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11246         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11247         altivec_vsumsws): Adjust.
11248         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11249         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11250         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11251         support.
11252         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11253         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11254         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11255         (altivec_lve<VI_char>x): Delete expand.
11256         (*altivec_lve<VI_char>x_internal): Rename to...
11257         (altivec_lve<VI_char>x): ... this.
11258         (altivec_lvxl_<mode>): Delete expand.
11259         (*altivec_lvxl_<mode>_internal): Rename to ...
11260         (altivec_lvxl_<mode>): ... this.
11261         (altivec_stvxl_<mode>): Delete expand.
11262         (*altivec_stvxl_<mode>_internal): Rename to ...
11263         (altivec_stvxl_<mode>): ... this.
11264         (altivec_stve<VI_char>x): Delete expand.
11265         (*altivec_stve<VI_char>x_internal): Rename to ...
11266         (altivec_stve<VI_char>x): ... this.
11267         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11268         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11269         reduc_plus_scal_<mode>): Adjust.
11270         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11271         comment.
11272         (rs6000_cpu_cpp_builtins): Adjust.
11273         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11274         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11275         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11276         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11277         -maltivec=be support.
11278         (rs6000_split_vec_extract_var): Adjust.
11279         (rs6000_split_v4si_init): Adjust.
11280         (swap_selector_for_mode): Delete.
11281         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11282         altivec_expand_stvex_be): Delete.
11283         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11284         -maltivec=be support.
11285         (rs6000_gimple_fold_builtin): Ditto.
11286         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11287         Adjust.
11288         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11289         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11290         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11291         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11292         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11293         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11294         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11295         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11296         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11297         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11298         anonymous split): Adjust.
11299         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11300         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11302 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11304         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11305         when --with-gxx-include-dir is also specified.
11306         * configure: Regenerate.
11308 2018-05-09  Jim Wilson  <jimw@sifive.com>
11310         PR target/84797
11311         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11312         * config/riscv/t-withmultilib: New.
11313         * config/riscv/withmultilib.h: New.
11314         * doc/install.texi: Document RISC-V --with-multilib-list support.
11316 2018-05-09  Richard Biener  <rguenther@suse.de>
11318         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11319         vector.
11320         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11321         actual scalar cost using the cost vector and the add_stmt_cost
11322         machinery.
11324 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11326         PR rtl-optimization/85645
11327         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11328         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11330 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11332         PR rtl-optimization/85645
11333         * shrink-wrap.c (spread_components): Return a boolean saying if
11334         anything was changed.
11335         (try_shrink_wrapping_separate): Iterate spread_components until
11336         nothing changes anymore.
11338 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11340         PR rtl-optimization/85645
11341         * regrename.c (build_def_use): Also kill the chains that include the
11342         destination of a REG_CFA_REGISTER note.
11344 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11346         PR rtl-optimization/85645
11347         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11348         insn that has a REG_CFA_REGISTER note.
11350 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11352         * cfgexpand.c (expand_clobber): New function.
11353         (expand_gimple_stmt_1): Use it.
11354         * tree-vect-stmts.c (vect_clobber_variable): New function,
11355         split out from...
11356         (vectorizable_simd_clone_call): ...here.
11357         (vectorizable_store): Emit a clobber either side of an
11358         IFN_STORE_LANES sequence.
11359         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11361 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11363         PR target/85626
11364         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11365         (define_insn "trap_if_false"): Add exit after trap.
11367 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11369         PR rtl-optimization/85638
11370         * bb-reorder.c: Include common/common-target.h.
11371         (create_forwarder_block): New function extracted from...
11372         (fix_up_crossing_landing_pad): ...here.  Rename into...
11373         (dw2_fix_up_crossing_landing_pad): ...this.
11374         (sjlj_fix_up_crossing_landing_pad): New function.
11375         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11376         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11377         from both partitions and exit the loop after one iteration.
11379 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11381         Revert:
11382         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11383         subsection.
11384         (Basic PowerPC Built-in Functions): The new name of the
11385         subsection previously known as "PowerPC Built-in Functions".
11386         (Basic PowerPC Built-in Functions Available on all Configurations):
11387         New subsubsection.
11388         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11389         subsubsection.
11390         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11391         subsubsection.
11392         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11393         subsubsection.
11394         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11395         subsubsection.
11397 2018-05-08  Jim Wilson  <jimw@sifive.com>
11399         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11400         (LD_EMUL_SUFFIX): New.
11401         (LINK_SPEC): Use it.
11403 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11405         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11406         subsection.
11407         (Basic PowerPC Built-in Functions): The new name of the
11408         subsection previously known as "PowerPC Built-in Functions".
11409         (Basic PowerPC Built-in Functions Available on all Configurations):
11410         New subsubsection.
11411         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11412         subsubsection.
11413         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11414         subsubsection.
11415         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11416         subsubsection.
11417         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11418         subsubsection.
11420 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11422         PR target/85683
11423         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11424         after cmpelim optimization.
11426 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11428         * config.gcc: Support "goldmont".
11429         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11430         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11431         PROCESSOR_GOLDMONT.
11432         * config/i386/i386.c (m_GOLDMONT): Define.
11433         (processor_target_table): Add "goldmont".
11434         (PTA_GOLDMONT): Define.
11435         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11436         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11437         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11438         (fold_builtin_cpu): Add "goldmont".
11439         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11440         (ix86_option_override_internal): Add "goldmont".
11441         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11442         (processor_type): Add PROCESSOR_GOLDMONT.
11443         * config/i386/i386.md: Add CPU "glm".
11444         * config/i386/glm.md: New file.
11445         * config/i386/x86-tune.def: Add m_GOLDMONT.
11446         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11448 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11450         PR target/85572
11451         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11452         E_V4DImode.
11453         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11454         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11455         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11457         PR target/85317
11458         * config/i386/i386.c (ix86_fold_builtin): Handle
11459         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11461         PR target/85480
11462         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11463         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11465 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11467         PR target/85658
11468         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11469         (check_arch): Likewise.
11470         (check_fpu): Return the result rather than printing it.
11471         (end arch): Fix operator precedence.
11472         (end cpu): Likewise.
11473         (END): Print the result from check_fpu.
11475 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11476             Alan Hayward  <alan.hayward@arm.com>
11477             David Sherwood  <david.sherwood@arm.com>
11479         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11480         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11481         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11482         (*fcmuo<mode>_and): New patterns.
11484 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11486         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11487         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11488         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11489         (cmp_op, sve_imm_con): New code attributes.
11490         (SVE_COND_INT_CMP, imm_con): Delete.
11491         (cmp_op): Remove above unspecs from int attribute.
11492         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11493         to...
11494         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11495         comparison-specific unspecs.
11496         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11497         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11498         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11499         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11500         (*vec_fcm<cmp_op><mode>): Rename to...
11501         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11502         (*vec_fcmuo<mode>): Rename to...
11503         (*fcmuo<mode>): ...this and adjust likewise.
11504         (*pred_fcm<cmp_op><mode>): New pattern.
11505         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11506         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11507         functions.
11508         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11509         and UNORDERED.
11510         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11511         (aarch64_emit_sve_predicated_cond): New function.
11512         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11513         (aarch64_emit_unspec_cond_or): Replace with...
11514         (aarch64_emit_sve_or_conds): ...this new function.  Use
11515         aarch64_emit_sve_ptrue_op for the individual comparisons and
11516         aarch64_emit_binop to OR them together.
11517         (aarch64_emit_inverted_unspec_cond): Replace with...
11518         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11519         aarch64_emit_sve_ptrue_op for the comparison and
11520         aarch64_emit_unop to invert the result.
11521         (aarch64_expand_sve_vec_cmp_float): Update after the above
11522         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11524 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11526         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11527         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11528         (Backwards Compatibility): Likewise.
11530 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11532         PR bootstrap/85681
11533         Revert:
11534         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11536         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11537         <prefetch_dynamic_strides>: New const bool field.
11538         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11539         prefetch_dynamic_strides.
11540         (exynosm1_prefetch_tune): Likewise.
11541         (thunderxt88_prefetch_tune): Likewise.
11542         (thunderx_prefetch_tune): Likewise.
11543         (thunderx2t99_prefetch_tune): Likewise.
11544         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11545         to false.
11546         (aarch64_override_options_internal): Update to set
11547         PARAM_PREFETCH_DYNAMIC_STRIDES.
11548         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11549         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11550         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11551         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11552         prefetch-dynamic-strides setting.
11554         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11556         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11557         <minimum_stride>: New const int field.
11558         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11559         minimum_stride field.
11560         (exynosm1_prefetch_tune): Likewise.
11561         (thunderxt88_prefetch_tune): Likewise.
11562         (thunderx_prefetch_tune): Likewise.
11563         (thunderx2t99_prefetch_tune): Likewise.
11564         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11565         (aarch64_override_options_internal): Update to set
11566         PARAM_PREFETCH_MINIMUM_STRIDE.
11567         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11568         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11569         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11570         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11571         stride is constant and is below the minimum stride threshold.
11573 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11575         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11576         to 512.
11578 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11580         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11581         <prefetch_dynamic_strides>: New const bool field.
11582         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11583         prefetch_dynamic_strides.
11584         (exynosm1_prefetch_tune): Likewise.
11585         (thunderxt88_prefetch_tune): Likewise.
11586         (thunderx_prefetch_tune): Likewise.
11587         (thunderx2t99_prefetch_tune): Likewise.
11588         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11589         to false.
11590         (aarch64_override_options_internal): Update to set
11591         PARAM_PREFETCH_DYNAMIC_STRIDES.
11592         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11593         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11594         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11595         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11596         prefetch-dynamic-strides setting.
11598 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11600         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11601         <minimum_stride>: New const int field.
11602         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11603         minimum_stride field.
11604         (exynosm1_prefetch_tune): Likewise.
11605         (thunderxt88_prefetch_tune): Likewise.
11606         (thunderx_prefetch_tune): Likewise.
11607         (thunderx2t99_prefetch_tune): Likewise.
11608         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11609         (aarch64_override_options_internal): Update to set
11610         PARAM_PREFETCH_MINIMUM_STRIDE.
11611         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11612         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11613         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11614         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11615         stride is constant and is below the minimum stride threshold.
11617 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11619         PR c++/85659
11620         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11621         the type is addressable.  Don't force op into register if it has
11622         BLKmode.
11624 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11626         PR other/77609
11627         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11628         any section for which we don't know a specific type it should have,
11629         regardless of name.  Previously this was done only for the exact
11630         names ".init_array", ".fini_array", and ".preinit_array".
11631         (default_elf_asm_named_section): Add comment about
11632         relationship with default_section_type_flags and SECTION_NOTYPE.
11633         (get_section): Don't consider it a type conflict if one side has
11634         SECTION_NOTYPE and the other doesn't, as long as neither has the
11635         SECTION_BSS et al used in the default_section_type_flags logic.
11637 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11639         PR target/85653
11640         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11641         (workaround_barsyncs): New function.
11642         (nvptx_reorg): Use workaround_barsyncs.
11643         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11644         (define_expand "nvptx_membar_cta"): New define_expand.
11645         (define_insn "*nvptx_membar_cta"): New insn.
11647 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11649         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11650         To improve optimization opportunities.
11651         * builtin-types.def: The new needed builtin types for the above.
11653 2018-05-04  Richard Biener  <rguenther@suse.de>
11655         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11656         * gimple-ssa-store-merging.c
11657         (imm_store_chain_info::output_merged_store): Remove redundant create,
11658         release split_store vector contents on failure.
11659         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11660         scalar stmt vector on cache hit.
11662 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11664         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11665         Xilinx FP support.
11666         * config.gcc (powerpc-xilinx-eabi*): Remove.
11667         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11668         support.
11669         (fusion_addis_mem_combo_load): Ditto.
11670         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11671         FP support.
11672         (rs6000_cpu_cpp_builtins): Ditto.
11673         * config/rs6000/rs6000-linux.c
11674         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11675         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11676         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11677         support.
11678         (rs6000_setup_reg_addr_masks): Ditto.
11679         (rs6000_init_hard_regno_mode_ok): Ditto.
11680         (rs6000_option_override_internal): Ditto.
11681         (legitimate_lo_sum_address_p): Ditto.
11682         (rs6000_legitimize_address): Ditto.
11683         (rs6000_legitimize_reload_address): Ditto.
11684         (rs6000_legitimate_address_p): Ditto.
11685         (abi_v4_pass_in_fpr): Ditto.
11686         (setup_incoming_varargs): Ditto.
11687         (rs6000_gimplify_va_arg): Ditto.
11688         (rs6000_split_multireg_move): Ditto.
11689         (rs6000_savres_strategy): Ditto.
11690         (rs6000_emit_prologue_components): Ditto.
11691         (rs6000_emit_epilogue_components): Ditto.
11692         (rs6000_emit_prologue): Ditto.
11693         (rs6000_emit_epilogue): Ditto.
11694         (rs6000_elf_file_end): Ditto.
11695         (rs6000_function_value): Ditto.
11696         (rs6000_libcall_value): Ditto.
11697         * config/rs6000/rs6000.h: Ditto.
11698         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11699         (TARGET_MINMAX): ... this.  New.
11700         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11701         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11702         (*movsi_internal1_single): Delete.
11703         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11704         mfpu=, mxilinx-fpu): Delete.
11705         * config/rs6000/singlefp.h: Delete.
11706         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11707         * config/rs6000/t-rs6000: Ditto.
11708         * config/rs6000/t-xilinx: Delete.
11709         * config/rs6000/titan.md: Adjust for fp_type removal.
11710         * config/rs6000/vsx.md: Remove Xilinx FP support.
11711         (VStype_simple): Delete.
11712         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11713         * config/rs6000/xfpu.h: Delete.
11714         * config/rs6000/xfpu.md: Delete.
11715         * config/rs6000/xilinx.h: Delete.
11716         * config/rs6000/xilinx.opt: Delete.
11717         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11718         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11720 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11722         PR libgomp/85639
11723         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11724         if ignore == 0.
11726 2018-05-04  Richard Biener  <rguenther@suse.de>
11728         PR middle-end/85627
11729         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11730         (expand_complex_div_wide): Likewise.
11731         (expand_complex_operations_1): Likewise.
11732         (expand_complex_libcall): Preserve EH info of the original stmt.
11733         (tree_lower_complex): Handle removed blocks.
11734         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11735         on complex multiplication and division libcall builtins.
11737 2018-05-04  Richard Biener  <rguenther@suse.de>
11739         PR middle-end/85574
11740         * fold-const.c (negate_expr_p): Restrict negation of operand
11741         zero of a division to when we know that can happen without
11742         overflow.
11743         (fold_negate_expr_1): Likewise.
11745 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11747         PR libstdc++/85466
11748         * real.h (real_nextafter): Declare.
11749         * real.c (real_nextafter): New function.
11750         * fold-const-call.c (fold_const_nextafter): New function.
11751         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11752         CASE_CFN_NEXTTOWARD.
11753         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11754         even when arg1_mode is different from arg0_mode.
11756 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11758         * doc/extend.texi (Deprecated Features): Remove
11759         -ffriend-injection.
11760         (Backwards Compatibility): Likewise.
11761         * doc/invoke.texi (C++ Language Options): Likewise.
11762         (C++ Dialect Options): Likewise.
11764 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11766         PR target/85530
11767         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11768         _mm512_mask_mullox_epi64): New intrinsics.
11770 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11772         PR testsuite/85106
11773         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11774         dump files): Add offload-tree.
11776 2018-05-03  Richard Biener  <rguenther@suse.de>
11778         PR tree-optimization/85615
11779         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11780         to loops not nested in BBs loop father to avoid creating multi-entry
11781         loops.
11783 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11785         PR tree-optimization/70291
11786         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11787         arguments.  Change return type to tree.  Emit libcall as a new
11788         statement rather than replacing existing one when inplace_p is true.
11789         (expand_complex_multiplication_components): New function.
11790         (expand_complex_multiplication): Expand floating-point complex
11791         multiplication using the above.
11792         (expand_complex_division): Rename inner_type parameter to type.
11793         Update expand_complex_libcall call-site.
11794         (expand_complex_operations_1): Update expand_complex_multiplication
11795         and expand_complex_division call-sites.
11797 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11799         PR target/85582
11800         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11801         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11802         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11803         the highest significant bit of the shift count mask is clear.  In
11804         check whether and[sq]i3 is needed verify that all significant bits
11805         of the shift count other than the highest are set.
11807 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11809         PR libgomp/82428
11810         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11811         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11812         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11813         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11814         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11815         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11816         __builtin_goacc_parlevel_size.
11818 2018-05-02  Richard Biener  <rguenther@suse.de>
11820         PR tree-optimization/85597
11821         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11822         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11823         directly.
11825 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11827         PR testsuite/85106
11828         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11829         dump files): Add ltrans-tree.
11831 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11833         PR testsuite/85106
11834         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11835         dump files): Add wpa-ipa.
11837 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11839         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11840         powerpc*-*-linux*paired* target.
11841         * config/rs6000/750cl.h: Delete.
11842         * config/rs6000/paired.h: Delete.
11843         * config/rs6000/paired.md: Delete.
11844         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11845         float support.
11846         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11847         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11848         comment.  Remove paired float support.
11849         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11850         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11851         VECTOR_PAIRED.
11852         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11853         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11854         declarations.
11855         * config/rs6000/rs6000.c: Remove paired float support.
11856         (paired_expand_vector_init, paired_expand_vector_move,
11857         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11858         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11859         paired_expand_builtin, paired_expand_predicate_builtin,
11860         paired_init_builtins): Delete.
11861         * config/rs6000/rs6000.h: Remove paired float support.
11862         * config/rs6000/rs6000.md: Remove paired float support.
11863         (move_from_CR_ov_bit): Delete.
11864         * config/rs6000/rs6000.opt (mpaired): Delete.
11865         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11866         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11868 2018-05-02  Richard Biener  <rguenther@suse.de>
11870         PR middle-end/85567
11871         * gimplify.c (gimplify_save_expr): When in SSA form allow
11872         SAVE_EXPRs to compute to SSA vars.
11874 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11876         PR target/85582
11877         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11878         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11879         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11880         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11882 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11884         PR tree-optimization/85586
11885         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11886         exit early for statements in the same group if the accesses are
11887         not strided.
11889 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11891         PR lto/85451
11892         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11893         error message.
11895 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11897         PR tree-optimization/85143
11898         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11900 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11902         PR lto/85451
11903         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11904         not found" error message.
11906 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11908         PR other/83786
11909         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11910         * vec.c (test_ordered_remove_if): New function.
11911         (vec_c_tests): Call test_ordered_remove_if.
11912         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11913         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11914         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11915         VEC_ORDERED_REMOVE_IF.
11917 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11919         PR tree-optimization/82665
11920         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11921         pointer subtraction where arguments come from a memchr call.
11923 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11925         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11926         --push-state --as-needed and --pop-state instead of --as-needed and
11927         --no-as-needed if ld supports it.
11928         * configure: Regenerated.
11930         PR web/85578
11931         * doc/install.texi2html: Replace _002d with - and _002a with * in
11932         generated html files using sed.
11934 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11936         PR c++/85523
11937         * gcc-rich-location.c (blank_line_before_p): New function.
11938         (use_new_line): New function.
11939         (gcc_rich_location::add_fixit_insert_formatted): New function.
11940         * gcc-rich-location.h
11941         (gcc_rich_location::add_fixit_insert_formatted): New function.
11943 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11945         * selftest.c (assert_streq): Rename "expected" and "actual" to
11946         "val1" and "val2".  Extend NULL-handling to cover both inputs
11947         symmetrically, while still requiring both to be non-NULL for a pass.
11948         * selftest.h (assert_streq): Rename "expected" and "actual" to
11949         "val1" and "val2".
11950         (ASSERT_EQ): Likewise.
11951         (ASSERT_EQ_AT): Likewise.
11952         (ASSERT_KNOWN_EQ): Likewise.
11953         (ASSERT_KNOWN_EQ_AT): Likewise.
11954         (ASSERT_NE): Likewise.
11955         (ASSERT_MAYBE_NE): Likewise.
11956         (ASSERT_MAYBE_NE_AT): Likewise.
11957         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11958         the assertion to pass.
11959         (ASSERT_STREQ_AT): Likewise.
11961 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11963         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11964         interaction with -pie.
11966 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11968         * selftest.h: Fix alphabetization of per-source-file selftest
11969         declarations.
11971 2018-04-30  Jason Merrill  <jason@redhat.com>
11973         PR c++/61982 - dead stores to destroyed objects.
11974         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11975         of clobber.
11977 2018-04-30  Jason Merrill  <jason@redhat.com>
11979         * tree.c (build_clobber): New.
11980         * tree.h: Declare it.
11981         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11983 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11985         * diagnostic-show-locus.c (layout::layout): Update for
11986         location_get_source_line returning a char_span.
11987         (struct char_span): Move to input.h.
11988         (struct correction): Update for fields in char_span becoming
11989         private.
11990         (struct source_line): Update for location_get_source_line
11991         returning a char_span.
11992         (layout::print_line): Likewise.
11993         * edit-context.c (edited_file::print_content): Likewise.
11994         (edited_file::print_diff_hunk): Likewise.
11995         (edited_file::print_run_of_changed_lines): Likewise.
11996         (edited_file::get_num_lines): Likewise.
11997         (edited_line::edited_line): Likewise.
11998         * final.c (asm_show_source): Likewise.
11999         * input.c (location_get_source_line): Convert return type
12000         from const char * to char_span, losing the final "line_len"
12001         param.
12002         (dump_location_info): Update for the above.
12003         (get_substring_ranges_for_loc): Likewise.  Use a char_span
12004         when handling the literal within the line.
12005         (test_reading_source_line): Update for location_get_source_line
12006         returning a char_span.
12007         * input.h (class char_span): Move here from
12008         diagnostic-show-locus.c, converting from a struct to a class.
12009         Make data members private.
12010         (char_span::operator bool): New.
12011         (char_span::length): New.
12012         (char_span::get_buffer): New.
12013         (char_span::operator[]): New.
12014         (char_span::subspan): Make const.
12015         (char_span::xstrdup): New.
12016         (location_get_source_line): Convert return type from const char *
12017         to char_span, losing the final "line_size" param.
12019 2018-04-30  Jan Hubicka  <jh@suse.cz>
12021         * lto-wrapper.c (ltrans_priorities): New static var.
12022         (cmp_priority): New.
12023         (run_gcc): Read priorities and if doing parallel build order
12024         the Makefile by them.
12026 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
12028         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
12030 2018-04-30  Richard Biener  <rguenther@suse.de>
12032         * tree-cfg.c (verify_address): Remove base argument, add
12033         flag whether to check TREE_ADDRESSABLE and do that.
12034         (verify_expr): Remove.
12035         (verify_types_in_gimple_reference): Add pieces from verify_expr.
12036         (verify_gimple_assign_single): Likewise.
12037         (verify_gimple_switch): Likewise.
12038         (verify_expr_location_1): Dereference tp once.  Add (disabled)
12039         piece from verify_expr.
12040         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
12042 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12044         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
12046 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12048         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
12049         (small_data_pattern): Likewise.
12050         (arc_rewrite_small_data): Likewise.
12051         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
12052         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
12053         (get_symbol_alignment): New function.
12054         (legitimate_small_data_address_p): Likewise.
12055         (legitimate_scaled_address): Update, call
12056         legitimate_small_data_address_p.
12057         (output_sdata): New static variable.
12058         (arc_print_operand): Update how we handle small data operands.
12059         (arc_print_operand_address): Likewise.
12060         (arc_legitimate_address_p): Update, use
12061         legitimate_small_data_address_p.
12062         (arc_rewrite_small_data_p): Remove.
12063         (arc_rewrite_small_data_1): Likewise.
12064         (arc_rewrite_small_data): Likewise.
12065         (small_data_pattern): Likewise.
12066         (compact_sda_memory_operand): Update to use
12067         legitimate_small_data_address_p and get_symbol_alignment.
12068         (prepare_move_operands): Don't rewite sdata pattern.
12069         (prepare_extend_operands): Remove.
12070         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
12071         pattern.
12072         (zero_extendqisi2): Likewise.
12073         (zero_extendhisi2): Likewise.
12074         (extendqihi2): Likewise.
12075         (extendqisi2): Likewise.
12076         (extendhisi2): Likewise.
12077         (addsi3): Likewise.
12078         (subsi3): Likewise.
12079         (andsi3): Likewise.
12080         * config/arc/constraints.md (Usd): Change it to memory constraint.
12082 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
12084         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
12085         as source of std instructions.
12086         * config/arc/arc.md (movsi_insn): Update pattern predicate to
12087         allow 6-bit constants as source for store instructions.
12088         (movdi_insn): Update instruction pattern to allow 6-bit constants
12089         as source for store instructions.
12091 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
12093         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
12095 2018-04-30  Nathan Sidwell  <nathan@acm.org>
12096             Sandra Loosemore <sandra@codesourcery.com>
12098         * dumpfile.c (dump_open): Allow '-' for stdout.
12099         * doc/invoke.texi (Developer Options): Document dump filename
12100         determination early.  Document stdin/stdout selection.
12102 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12104         Microblaze Target: PIC data text relative
12106         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12107         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12108         Add declaration.
12109         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12110         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12111         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12112         New addressing mode for data-text relative position indepenedent code.
12113         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12114         'ADDRESS_SYMBOLIC_TXT_REL'.
12115         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12116         (microblaze_legitimate_pic_operand): Exclude function calls from
12117         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12118         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12119         addresses cases.
12120         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12121         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12122         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12123         for 'address + offset'.
12124         (microblaze_expand_prologue): Add new function prologue call for
12125         'r20' assignation.
12126         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12127         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12128         table in case of TARGET_PIC_DATA_TEXT_REL.
12129         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12130         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12131         Add new macros 'UNSPEC_TEXT',
12132         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12133         + exclude function calls from 'UNSPEC_PLT' in case of data text
12134         relative mode.
12135         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12136         new target hook for generating address diff vector tables in case of
12137         flag_pic.
12138         * doc/tm.texi : Regenerate.
12139         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12140         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12141         of addr diff vector generation.
12142         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12143         target hook definition.
12144         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12145         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12146         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12147         option for data text relative.
12149 2018-04-30  Richard Biener  <rguenther@suse.de>
12151         * tree-chrec.h (evolution_function_is_constant_p): Remove
12152         redundant check.
12153         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12155 2018-04-30  Richard Biener  <rguenther@suse.de>
12157         PR bootstrap/85571
12158         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12160 2018-04-30  Richard Biener  <rguenther@suse.de>
12162         PR tree-optimization/28364
12163         PR tree-optimization/85275
12164         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12165         copying first exit test.
12167 2018-04-28  Mark Wielaard  <mark@klomp.org>
12169         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12170         dwarf_version >= 5.
12171         (dwarf_AT): Handle DW_AT_addr_base.
12172         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12174 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12176         PR target/84431
12177         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12178         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12179         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12180         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12182 2018-04-28  Richard Biener  <rguenther@suse.de>
12184         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12185         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12186         to reflect use.  Only add interesting stmts.
12188 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12190         PR ipa/85549
12191         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12192         the jump function allows for passing through aggregate values.
12194 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12196         * input.h (in_system_header_at): Convert from macro to inline
12197         function.
12198         (from_macro_expansion_at): Likewise.
12199         (from_macro_definition_at): Likewise.
12201 2018-04-27  Jeff Law  <law@redhat.com>
12203         * config.gcc: Mark tile* targets as deprecated/obsolete.
12205 2018-04-27  Richard Biener  <rguenther@suse.de>
12207         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12208         fix for ILP32.
12210 2018-04-27  Richard Biener  <rguenther@suse.de>
12212         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12214 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12216         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12217         with Yd constraint. Set "preferred_for_speed" attribute from
12218         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12219         with Yd constraint.
12220         (*movdi_internal): Ditto.
12221         (movti_interunit splitters): Remove
12222         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12223         (movdi_interunit splitters): Ditto.
12224         * config/i386/constraints.md (Ye): Remove.
12225         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12227 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12229         PR target/85512
12230         * config/aarch64/constraints.md (Usg): Limit to 31.
12231         (Usj): Limit to 63.
12233 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12235         PR tree-optimization/85529
12236         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12237         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12238         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12239         zero extension or masking of the MSB bit.
12240         (optimize_range_tests): Add FIRST_BB argument, pass it through
12241         to optimize_range_tests_var_bound.
12242         (maybe_optimize_range_tests, reassociate_bb): Adjust
12243         optimize_range_tests callers.
12245 2018-04-26  Richard Biener  <rguenther@suse.de>
12246             Jakub Jelinek  <jakub@redhat.com>
12248         * cgraph.h (symbol_table): Just declare debug method here.
12249         * symtab.c (symbol_table::debug): Define.
12251 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12253         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12255 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12257         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12258         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12259         (*movdi_internal): Substitute Yi and Yj constraint with x
12260         and Ym and Yn constraint with y constraint.  Update "isa"
12261         attribute and set "preferred_for_speed" attribute from
12262         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12263         (*movsi_internal): Ditto.
12264         (*movdf_internal): Ditto.
12265         (*movsf_internal): Ditto.
12266         (*zero_extendsidi2): Ditto.
12267         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12268         (sse2_loadld): Ditto.
12269         (*vec_extract<ssevecmodelower>_0): Ditto.
12270         (*vec_extractv4si_0_zext_sse4): Ditto.
12271         (vec_concatv2di): Ditto.
12272         (*vec_dup<mode>): Ditto.
12273         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12274         * config/i386/constraints.md (Yi): Remove.
12275         (Yj): Remove.
12276         (Ym): Remove.
12277         (Yn): Remove.
12279 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12281         * dumpfile.c (dump_open): New.
12282         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12283         (dump_finish): Detect stdio/stderr by value not name.
12285 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12287         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12289 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12291         PR target/84952
12292         * config/nvptx/nvptx.c (verify_neutering_jumps)
12293         (verify_neutering_labels): New function
12294         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12296 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12298         PR target/84025
12299         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12300         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12301         need neutering.
12303 2018-04-26  Richard Biener <rguenther@suse.de>
12304             Tom de Vries  <tom@codesourcery.com>
12306         PR lto/85422
12307         * lto-streamer-out.c (output_function): Fixup loops if required to match
12308         discovery done in the reader.
12310 2018-04-26  Richard Biener  <rguenther@suse.de>
12312         PR tree-optimization/85116
12313         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12314         have a loop exit from the single latch predecessor.  Remove
12315         case of header with just condition.
12316         (ch_base::copy_headers): Exclude infinite loops from any
12317         processing.
12318         (pass_ch::execute): Record exits.
12320 2018-04-26  Richard Biener  <rguenther@suse.de>
12322         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12323         prologue cost vector and pass it to vect_get_load_cost.
12324         (vect_get_peeling_costs_all_drs): Likewise.
12325         (vect_peeling_hash_get_lowest_cost): Likewise.
12326         (vect_enhance_data_refs_alignment): Likewise.
12328 2018-04-26  Richard Biener  <rguenther@suse.de>
12330         PR middle-end/85450
12331         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12332         checking of integer<->pointer conversions.
12333         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12334         sign-/zero-extending pointer types.
12335         (expand_omp_for_static_chunk): Likewise.
12337 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12338             Jean Lee  <xiaoyur347@gmail.com>
12340         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12341         (TARGET_ASAN_SHADOW_OFFSET): Define.
12342         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12343         true for -fsanitize=address.
12345 2018-04-25  Mark Wielaard  <mark@klomp.org>
12347         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12348         shorter ones.
12350 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12352         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12353         than "alu", remove explicit "memory" and "imm_disp" attributes.
12354         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12356         PR middle-end/85414
12357         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12358         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12359         gen_lowpart_no_emit.
12361 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12363         PR target/85473
12364         * config/i386/i386.c (ix86_expand_builtin): Change memory
12365         operand to XI, extend p0 to Pmode.
12366         * config/i386/i386.md: Change unspec volatile and operand
12367         1 mode to XI, change operand 0 mode to P.
12369 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12371         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12372         GET_MODE_MASK before any checking.
12373         (nds32_can_use_bset_p): Likewise.
12374         (nds32_can_use_btgl_p): Likewise.
12376 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12378         * config/nds32/nds32-doubleword.md: New define_split pattern for
12379         illegal register number.
12381 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12383         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12385 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12387         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12389 2018-04-25  Richard Biener  <rguenther@suse.de>
12391         * lto-streamer.h (LTO_major_version): Bump to 8.
12393 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12395         * BASE-VER: Set to 9.0.0.
12397 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12399         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12400         in __abskf2 and __powikf2.
12402 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12404         PR target/85512
12405         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12406         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12407         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12408         Use the above on operand 2.  Reindent.
12409         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12411 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12413         PR target/85485
12414         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12415         handle OPT_mcet.
12416         * config/i386/i386.opt (mcet): Removed.
12417         * doc/install.texi: Remove -mcet documentation.
12418         * doc/invoke.texi: Likewise.
12420 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12422         PR target/85485
12423         * doc/install.texi: Remove -mcet from bootstrap-cet.
12425 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12427         PR target/85511
12428         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12429         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12430         if TARGET_64BIT.
12432         PR target/85503
12433         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12434         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12435         containing a CONST_VECTOR.
12437 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12439         * doc/install.texi: Update newlib dependency for nvptx.
12441 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12443         PR target/85508
12444         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12445         instead of INTVAL when shifting x left.
12447 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12449         PR tree-optimization/85478
12450         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12451         vect_grouped_store_supported for single element vectors.
12453 2018-04-24  Richard Biener  <rguenther@suse.de>
12455         PR target/85491
12456         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12457         load cost increase to the case of non-constant step.
12459 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12461         PR target/84828
12462         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12463         destination if any_malformed_asm.
12465 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12467         PR middle-end/85496
12468         * expr.c (store_field): In the bitfield case, if the value comes from
12469         a function call and is returned in registers by means of a PARALLEL,
12470         do not change the mode of the temporary unless BLKmode and VOIDmode.
12472 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12474         PR rtl-optimization/85423
12475         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12476         dependencies to debug insns when the previous insn is non-debug.
12478 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12480         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12481         enums into a single definition.
12482         (fls): Fix predicates and printing.
12483         (seti): Likewise.
12485 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12487         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12488         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12489         and short u6 immediate.
12490         (check_if_valid_sleep_operand): Remove.
12491         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12493 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12495         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12496         flag_always_save_lp condition.
12497         * config/nds32/nds32.opt (malways-save-lp): New option.
12499 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12501         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12502         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12503         * config/nds32/nds32.h
12504         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12505         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12507 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12509         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12510         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12512 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12513             Chung-Ju Wu  <jasonwucj@gmail.com>
12515         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12516         Declare.
12517         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12518         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12520 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12522         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12524 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12526         * config/nds32/nds32-protos.h (nds32_data_alignment,
12527         nds32_local_alignment): Declare.
12528         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12529         nds32_local_alignment): New functions.
12530         (TARGET_CONSTANT_ALIGNMENT): Define.
12531         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12533 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12535         * config/nds32/nds32.c
12536         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12537         (TARGET_MODES_TIEABLE_P): Likewise.
12539 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12541         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12542         level Ofast and Og.
12544 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12545             Chung-Ju Wu  <jasonwucj@gmail.com>
12547         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12548         for unaligned access.
12549         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12550         unaligned access.
12551         * config/nds32/nds32-intrinsic.md: Likewise.
12552         * config/nds32/nds32_intrinsic.h: Likewise.
12553         * config/nds32/nds32.h (nds32_builtins): Likewise.
12554         * config/nds32/nds32.opt (munaligned-access): New option.
12555         * config/nds32/nds32.c (nds32_asm_file_start): Display
12556         flag_unaligned_access status.
12558 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12560         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12561         -mno-relax is present.
12562         * config/riscv/linux.h (LINK_SPEC): Ditto.
12564 2018-04-20  Martin Sebor  <msebor@redhat.com>
12566         PR c/85365
12567         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12568         for null pointers.
12569         (gimple_fold_builtin_stxcpy_chk): Same.
12570         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12572 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12574         PR target/85456
12575         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12576         __powikf2 when long double is IEEE 128-bit.
12578 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12580         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12581         step to make sure stack always aligned.
12583 2018-04-20  Carl Love  <cel@us.ibm.com>
12585         PR target/83402
12586         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12587         size check for arg0.
12589 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12590             Tom de Vries  <tom@codesourcery.com>
12592         PR target/85445
12593         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12594         Emit insns for calls too.
12595         (nvptx_find_par): Always look for worker-level predecessor insn.
12596         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12597         calls.
12598         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12599         (nvptx_process_pars): Propagate frames for calls.
12601 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12603         PR target/85469
12604         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12605         Removed.
12606         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12607         (ix86_handle_option): Don't handle OPT_mibt.
12608         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12609         __SHSTK__.
12610         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12611         has_ibt and ibt.
12612         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12613         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12614         (ix86_target_macros): Define __CET__ with flag_cf_protection
12615         for -fcf-protection.
12616         * config/i386/i386.c (isa2_opts): Remove -mibt.
12617         * config/i386/i386.h (TARGET_IBT): Removed.
12618         (TARGET_IBT_P): Likewise.
12619         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12620         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12621         * config/i386/i386.opt (mcet): Update help message.
12622         (mshstk): Likewise.
12623         (mibt): Removed.
12624         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12625         -mcet as an alias for -mshstk.
12627 2018-04-20  Richard Biener <rguenther@suse.de>
12629         PR middle-end/85475
12630         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12631         complexity by forcing a single use of the multiply operand.
12633 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12635         ipa/85449
12636         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12637         recursion dependency to only apply to non-clones.
12639 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12641         ipa/85447
12642         * ipa-cp.c (create_specialized_node): Check that clones of
12643         self-recursive edges exist during IPA-CP.
12645 2018-04-19  Toon Moene  <toon@moene.org>
12647         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12648         by -O3.
12650 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12652         PR tree-optimization/85467
12653         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12654         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12655         VECTOR_CST element to type.
12657 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12659         PR target/85397
12660         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12661         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12662         (builtin_longjmp): Likewise.
12663         (save_stack_nonlocal): New pattern.
12664         (restore_stack_nonlocal): Likewise.
12666 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12668         PR target/85404
12669         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12670         Replace ASM_OUTPUT_LABEL with fprintf.
12672 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12674         PR target/85417
12675         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12676         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12677         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12678         define __IBT__ and __SHSTK__ for -fcf-protection.
12679         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12680         TARGET_IBT.
12681         (ix86_trampoline_init): Likewise.
12682         (x86_output_mi_thunk): Likewise.
12683         (ix86_notrack_prefixed_insn_p): Likewise.
12684         (ix86_option_override_internal): Don't disallow -fcf-protection.
12685         * config/i386/i386.md (rdssp<mode>): Also enable for
12686         -fcf-protection.
12687         (incssp<mode>): Likewise.
12688         (nop_endbr): Likewise.
12689         * config/i386/i386.opt (mcet): Change help message to built-in
12690         functions only.
12691         (mibt): Likewise.
12692         (mshstk): Likewise.
12693         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12694         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12695         enable CET built-in functions.
12697 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12699         * common/config/i386/i386-common.c
12700         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12701         OPTION_MASK_ISA_MOVDIRI_UNSET,
12702         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12703         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12704         * config.gcc (movdirintrin.h): New header.
12705         * config/i386/cpuid.h (bit_MOVDIRI,
12706         bit_MOVDIR64B): New bits.
12707         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12708         and -mmvodir64b.
12709         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12710         (VOID, PVOID, PCVOID)): New function types.
12711         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12712         __builtin_ia32_directstoreu_u64,
12713         __builtin_ia32_movdir64b): New builtins.
12714         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12715         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12716         and -mmovdiri.
12717         (ix86_valid_target_attribute_inner_p): Ditto.
12718         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12719         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12720         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12721         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12722         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12723         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12724         (movdiri<mode>, movdir64b_<mode>): New.
12725         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12726         * config/i386/immintrin.h: Include movdirintrin.h.
12727         * config/i386/movdirintrin.h: New file.
12728         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12730 2018-04-19  Richard Biener  <rguenther@suse.de>
12732         PR middle-end/85455
12733         * cfg.c (clear_bb_flags): When loop state says we have
12734         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12736 2018-04-19  Richard Biener  <rguenther@suse.de>
12738         PR tree-optimization/84737
12739         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12740         copying restrict info.
12741         (vect_setup_realignment): Use it.
12742         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12743         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12744         the first DR to all generated stores.
12745         (vectorizable_load): Likewise for loads.
12747 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12749         PR tree-optimization/85446
12750         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12751         the integral and pointer types to have the same precision.
12753         * doc/install.texi: Document --disable-cet being the default and
12754         --enable-cet=auto.
12756 2018-04-18  Martin Liska  <mliska@suse.cz>
12758         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12759         style.
12761 2018-04-18  Martin Liska  <mliska@suse.cz>
12763         Revert
12764         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12766         PR ipa/83983
12767         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12768         arguments if they are comparable.
12770 2018-04-18  Martin Liska  <mliska@suse.cz>
12772         Revert
12773         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12775         PR lto/84805
12776         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12777         incomplete types.
12779 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12781         PR target/85388
12782         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12783         ENDBR after calling __morestack.
12785 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12787         PR jit/85384
12788         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12789         by using gcc_base_ver to generate a gcc_driver_version, and use
12790         it when generating GCC_DRIVER_NAME.
12791         * configure: Regenerate.
12793 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12795         PR target/81084
12796         * config.gcc: Obsolete powerpc*-*-*spe*.
12798 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12800         PR debug/84637
12801         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12802         (stabstr_D): Change type of unum from unsigned int to
12803         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12804         type.
12806 2018-04-17  Jim Wilson  <jimw@sifive.com>
12808         PR 84856
12809         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12810         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12811         Set arg_pointer_offset after using pretend_args_size.
12813 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12815         PR rtl-optimization/85431
12816         * dse.c (record_store): Ignore zero width stores.
12818         PR sanitizer/85230
12819         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12820         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12821         __builtin_stack_restore rather than after it.
12822         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12823         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12824         argument instead of virtual_dynamic_stack_rtx.
12826 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12828         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12829         New prototype.
12830         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12831         Add note to error message to explain internal mapping of overloaded
12832         built-in function name to non-overloaded built-in function name.
12833         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12834         function.
12836 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12838         PR target/85424
12839         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12840         where the inputs overlap with the output.
12842 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12844         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12845         (=v, v) alternative and explicit "memory" attribute.
12846         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12847         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12848         attributes.
12849         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12850         "sselog1" type instead of "sselog".
12851         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12852         "sselog".  Remove explicit "memory" attribute.
12853         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12854         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12855         attributes.
12856         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12857         "sselog1" type instead of "sselog".  Remove explicit "memory"
12858         attribute.
12859         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12860         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12861         attribute.
12862         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12863         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12864         attributes.
12865         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12866         "sselog1" type instead of "sselog".  Remove explicit "memory"
12867         attribute.
12868         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12869         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12870         attribute.
12872         PR target/85430
12873         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12875         PR middle-end/85414
12876         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12877         on a SUBREG.
12879 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12881         PR ipa/85421
12882         * ipa-cp.c (create_specialized_node): Call
12883         expand_all_artificial_thunks if necessary.
12885 2018-04-17  Martin Liska  <mliska@suse.cz>
12887         PR lto/85405
12888         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12889         in message, remote space in between '_G' and '('.
12891 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12893         PR target/85281
12894         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12895         avx512f_vmcmp<mode>3<round_saeonly_name>,
12896         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12897         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12898         avx512f_rndscale<mode><round_saeonly_name>,
12899         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12900         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12901         Use %<iptr>2 instead of %2 for -masm=intel.
12902         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12903         avx512f_vcvttss2usi<round_saeonly_name>,
12904         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12905         -masm=intel.
12906         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12907         avx512f_vcvttsd2usi<round_saeonly_name>,
12908         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12909         Use %q1 instead of %1 for -masm=intel.
12910         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12911         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12912         of %3 for -masm=intel.
12913         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12914         -masm=intel.
12915         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12916         -masm=intel.
12917         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12918         -masm=intel.
12919         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12920         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12921         %g1.
12922         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12923         -masm=intel.
12924         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12925         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12926         %g1 and one with %0 and %1.
12927         (avx512er_vmrcp28<mode><round_saeonly_name>,
12928         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12929         %1 for -masm=intel.
12930         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12931         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12932         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12933         of %0 and %{%4%} for -masm=intel.
12934         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12935         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12936         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12937         order of %0 and %{%5%}%{z%} for -masm=intel.
12939 2018-04-17  Jan Hubicka  <jh@suse.cz>
12941         PR lto/85405
12942         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12944 2018-04-17  Martin Liska  <mliska@suse.cz>
12946         PR ipa/85329
12947         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12948         for target_clone error message.  Make default implementation
12949         clone to be a local declaration.
12950         (separate_attrs): Add new argument and check for an empty
12951         string.
12952         (expand_target_clones): Handle it.
12953         (ipa_target_clone): Make redirection just for target_clones
12954         functions.
12956 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12957             Tom de Vries  <tom@codesourcery.com>
12959         PR middle-end/84955
12960         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12961         tiled basic blocks without omp continue statements.
12963 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12965         PR target/83660
12966         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12967         vec_extract expression as having side effects to make sure it gets
12968         a cleanup point.
12970 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12972         PR target/85403
12973         * config/i386/i386.c (get_builtin_code_for_version): Check
12974         error_mark_node.
12976 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12978         PR target/84331
12979         * config.gcc: Support "skylake".
12980         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12981         PROCESSOR_SKYLAKE.
12982         * config/i386/i386.c (m_SKYLAKE): Define.
12983         (processor_target_table): Add "skylake".
12984         (ix86_option_override_internal): Add "skylake".
12985         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12986         PROCESSOR_CANNONLAKE.
12987         (get_builtin_code_for_version): Fix priority for
12988         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12989         PROCESSOR_SKYLAKE-AVX512.
12990         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12991         (processor_type): Add PROCESSOR_SKYLAKE.
12993 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12994             Jason Merrill  <jason@redhat.com>
12996         PR c++/85112
12997         * convert.c (convert_to_integer_1): Use direct recursion for
12998         enumeral types and types with a precision less than the number
12999         of bits in their mode.
13001 2018-04-16  Julia Koval  <julia.koval@intel.com>
13003         PR target/84413
13004         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
13005         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
13007 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
13009         PR target/85293
13010         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
13011         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
13012         and -mno-direct-move.
13014 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
13016         PR target/83402
13017         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
13018         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
13019         Ensure negative shifts result in {0}.
13021 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
13023         PR rtl-optimization/79916
13024         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
13025         regs (if any) to define how to gnerate SD moves when LRA is in
13026         progress.
13028 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
13030         PR rtl-optimization/85393
13031         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
13032         * except.c (expand_dw2_landing_pad_for_region): Make static.
13033         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
13034         a label and unconditional jump to old_bb, rather than
13035         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
13036         basic block.
13038         PR rtl-optimization/85376
13039         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
13040         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
13041         instead of a specific value.
13043 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13044             Bin Cheng  <bin.cheng@arm.com>
13046         PR tree-optimization/82965
13047         PR tree-optimization/83991
13048         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
13049         by_profile_only parameter.
13050         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
13051         information if the loop was predicted to iterate too many times.
13052         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
13054 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
13056         PR lto/71991
13057         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
13058         always inline.
13060 2018-04-13  Martin Liska  <mliska@suse.cz>
13061             Jakub Jelinek  <jakub@redhat.com>
13063         PR middle-end/81657
13064         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
13065         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
13066         * builtins.c (expand_builtin_memory_copy_args): Use
13067         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
13068         handle dest_addr == pc_rtx.
13070 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
13072         PR target/85291
13073         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
13074         asked to not generate direct moves.
13075         (fix_trunc<mode>si2_stfiwx): Similar.
13076         (fix_trunc<mode>si2_internal): Similar.
13078 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13080         PR debug/83157
13081         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
13082         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
13083         lookup if dest in some wider mode is known to be const0_rtx and
13084         if so, record permanent equivalence for it to be ZERO_EXTEND of
13085         the narrower mode destination.
13087 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13089         * lto-streamer-out.c (output_function): Revert 259346.
13090         * omp-expand.c (expand_oacc_for): Likewise.
13092 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
13094         PR rtl-optimization/85354
13095         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
13096         * sel-sched.c (sel_global_init): ... here.
13098 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
13100         PR target/85238
13101         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
13102         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13103         mode for PE-COFF targets.
13104         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13105         (i386_pe_asm_lto_end): Likewise.
13106         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13107         (TARGET_ASM_LTO_END): Likewise.
13108         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13109         (i386_pe_asm_lto_start): New function.
13110         (i386_pe_asm_lto_end): Likewise.
13112 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13113             Richard Biener  <rguenther@suse.de>
13115         PR middle-end/84955
13116         * lto-streamer-out.c (output_function): Fix CFG loop state before
13117         streaming out.
13118         * omp-expand.c (expand_oacc_for): Handle calls to internal
13119         functions like regular functions.
13121 2018-04-12  Richard Biener  <rguenther@suse.de>
13123         PR lto/85371
13124         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13125         for the early LTO debug to properly generate references to it
13126         during DIE emission.  Do not re-use that for the skeleton for
13127         split-dwarf.
13128         (dwarf2out_early_finish): Likewise.
13130 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13132         PR target/85328
13133         * config/i386/sse.md
13134         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13135         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13136         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13137         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13138         and output is a reg, avoid creating invalid lowpart subreg, but
13139         instead split into a 512-bit move.  Don't split if not AVX512VL,
13140         input is xmm16+ reg and output is a mem.
13141         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13142         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13143         xmm16+ reg and output is a mem.
13145 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13147         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13148         also for flag_dwarf2_cfi_asm.
13150 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13152         PR rtl-optimization/85342
13153         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13154         a bool scalar var inside of the loop instead.  Don't try to update
13155         recog_data.operand after failed apply_change_group.
13157 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13159         PR target/85296
13160         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13161         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13162         array with flexible array member as array without given dimension.
13163         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13164         argument for undefined param to true.
13166 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13168         PR target/85321
13169         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13170         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13171         from PowerPC section.
13172         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13173         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13174         help text that is too long.
13175         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13176         help text that is too long.
13177         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13178         help text that is too long.
13180 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13182         * config/alpha/alpha.md (stack_probe_internal): Rename
13183         from "probe_stack".  Update all callers.
13185 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13187         PR rtl-optimization/84566
13188         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13189         sched_macro_fuse_insns.
13191 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13193         PR target/84301
13194         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13195         (compute_block_dependences): ... from here.
13197 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13199         PR tree-optimization/85331
13200         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13201         from int to HOST_WIDE_INT.
13203 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13205         PR ipa/84149
13206         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13207         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13208         not the same as the source val.
13209         (cgraph_edge_brings_value_p): New parameter.
13210         (gather_edges_for_value): Pass destination value to
13211         cgraph_edge_brings_value_p.
13212         (perhaps_add_new_callers): Likewise.
13213         (get_info_about_necessary_edges): Likewise and exclude values brought
13214         only by self-recursive edges.
13215         (create_specialized_node): Redirect only clones of self-calling edges.
13216         (+self_recursive_pass_through_p): New function.
13217         (find_more_scalar_values_for_callers_subset): Use it.
13218         (find_aggregate_values_for_callers_subset): Likewise.
13219         (known_aggs_to_agg_replacement_list): Removed.
13220         (decide_whether_version_node): Re-calculate known constants for all
13221         remaining context clones.
13223 2018-04-11  Richard Biener  <rguenther@suse.de>
13225         PR lto/85339
13226         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13227         from early DWARF output.
13228         (dwarf2out_early_finish): Output line info unconditionally into
13229         early DWARF and add reference to it.
13231 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13233         PR target/85281
13234         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13235         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13236         other than V2DFmode using iptr mode attribute.
13237         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13239 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13241         PR rtl-optimization/84659
13242         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13244 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13246         PR debug/85302
13247         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13248         SIZEP is NULL.
13249         (output_loc_list): Pass address of a dummy size variable even in the
13250         locview handling loop.
13251         (index_location_lists): Add comment on why skip_loc_list_entry can't
13252         call size_of_locs.
13254 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13256         PR target/85261
13257         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13258         into register.
13260 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13262         PR target/85321
13263         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13264         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13265         and -mstring-compare-inline-limit.
13267 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13269         PR target/85287
13270         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13271         for stack clash protection in a register whenever we need it to be in
13272         a register.
13274 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13276         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13277         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13279 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13281         PR target/85321
13282         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13283         the help text.
13284         (mlong-double-): Ditto.
13285         * config/rs6000/sysv4.opt (msdata=): Ditto.
13286         (mtls-size=): Ditto.
13288 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13290         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13291         erroneous entries for
13292         "vector int vec_ldl (int, long int *)", and
13293         "vector unsigned int vec_ldl (int, unsigned long int *)".
13294         Add comments and entries for
13295         "vector bool char vec_ldl (int, bool char *)",
13296         "vector bool short vec_ldl (int, bool short *)",
13297         "vector bool int vec_ldl (int, bool int *)",
13298         "vector bool long long vec_ldl (int, bool long long *)",
13299         "vector pixel vec_ldl (int, pixel *)",
13300         "vector long long vec_ldl (int, long long *)",
13301         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13302         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13303         type tree bool_long_long_type_node and correct definition of
13304         bool_V2DI_type_node to make reference to this new type tree.
13305         (rs6000_mangle_type): Replace erroneous reference to
13306         bool_long_type_node with bool_long_long_type_node.
13307         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13308         comments to emphasize sign distinctions for char and int types and
13309         replace RS6000_BTI_bool_long constant with
13310         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13311         use of RS6000_BTI_pixel.
13312         (bool_long_type_node): Remove this macro definition.
13313         (bool_long_long_type_node): New macro definition
13315 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13317         PR rtl-optimization/85300
13318         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13319         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13320         simplify_unary_operation fails.
13322 2018-04-10  Martin Liska  <mliska@suse.cz>
13324         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13325         cgraph_edge and ipa_ref.
13327 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13329         PR target/85177
13330         PR target/85255
13331         * config/i386/sse.md
13332         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13333         computation of the VEC_MERGE selector from mask.
13334         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13335         Fix decoding of the VEC_MERGE selector into mask.
13337 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13339         PR tree-optimization/85286
13340         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13342 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13344         * final.c (final_1): Set insn_last_address as well as
13345         insn_current_address.
13347 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13349         PR target/85173
13350         * explow.c (emit_stack_probe): Call validize_mem on memory location
13351         before passing it to gen_probe_stack.  Create address operand and
13352         legitimize it for the probe_stack_address case.
13354 2018-04-09  Jan Hubicka  <jh@suse.cz>
13356         PR lto/85078
13357         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13358         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13359         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13360         walk basetypes.
13361         (free_lang_data): Rebuild type inheritance graph.
13363 2018-04-09  Martin Sebor  <msebor@redhat.com>
13365         * invoke.texi (-finline-small-functions): Mention other optimization
13366         options.
13367         (-findirect-inlining, -fpartial-inlining): Same.
13368         (-finline-functions-called-once): Same.
13369         (-freorder-blocks-and-partition): Same.
13371 2018-04-09  Jan Hubicka  <jh@suse.cz>
13373         PR rtl/84058
13374         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13375         jumps; choose last target that matches the criteria (i.e.
13376         no partition changes for non-crossing jumps).
13377         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13378         support for redirecting crossing jumps to non-crossing.
13380 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13382         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13383         also for naked functions.
13385 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13387         * config/arc/arc.md (add_shift): New pattern.
13388         (add_shift2): Likewise.
13389         (sub_shift): Likewise.
13390         (sub_shift_cmp0_noout): Likewise.
13391         (compare_si_ashiftsi): Likewise.
13392         (xbfu_cmp0_noout): New combine pattern.
13393         (xbfu_cmp0"): Likewise.
13394         (movsi_set_cc_insn): Place the predicable variant first.
13395         (commutative_binary_cmp0_noout): Remove clobber.
13396         (commutative_binary_cmp0): New pattern.
13397         (noncommutative_binary_cmp0): Likewise.
13398         (noncommutative_binary_cmp0_noout): Likewise.
13399         (noncommutative_binary_comparison_result_used): Removed.
13400         (rsub_cmp0): New pattern.
13401         (rsub_cmp0_noout): Likewise.
13402         (extzvsi): Changed, keep only meaningful variants.
13403         (SQH, SEZ): New iterators.
13404         (SQH_postfix): New mode attribute.
13405         (SEZ_prefix): New code attribute.
13406         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13407         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13408         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13409         of numerical value.
13410         (noncommutative_operator): Check the availability of barrel
13411         shifter option.
13413 2018-04-09  Richard Biener  <rguenther@suse.de>
13415         PR tree-optimization/85284
13416         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13417         Only use the niter constraining form of simple_iv when the exit
13418         is always executed.
13420 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13422         PR target/84041
13423         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13424         (define_expand "*memory_barrier"): New define_expand.
13425         (define_insn "memory_barrier"): New insn.
13427 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13429         PR rtl-optimization/80463
13430         PR rtl-optimization/83972
13431         PR rtl-optimization/83480
13433         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13434         correct producer for the insn.
13435         (tidy_control_flow): Fixup seqnos in case of debug insns.
13437 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13439         PR rtl-optimization/83913
13441         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13442         different sched-times when merging exprs.
13444 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13446         PR rtl-optimization/83962
13448         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13449         tidy_fallthru_edge and tidy_control_flow.
13451 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13453         PR rtl-optimization/83530
13455         * sel-sched.c (force_next_insn): New global variable.
13456         (remove_insn_for_debug): When force_next_insn is true, also leave only
13457         next insn in the ready list.
13458         (sel_sched_region): When the region wasn't scheduled, make another pass
13459         over it with force_next_insn set to 1.
13461 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13463         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13464         into tm_file.
13465         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13466         for interrupt control.
13467         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13468         functions for interrupt control.
13469         * config/nds32/nds32-intrinsic.md: Likewise.
13470         * config/nds32/nds32_intrinsic.h: Likewise.
13471         * config/nds32/nds32.h (nds32_builtins): Likewise.
13473 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13475         * config/nds32/nds32.c (nds32_init_machine_status,
13476         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13477         strict_aligned_p field.
13478         (nds32_expand_to_rtl_hook): New function.
13479         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13480         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13482 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13483             Chung-Ju Wu  <jasonwucj@gmail.com>
13485         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13486         * config/nds32/nds32-n7.md: New file.
13487         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13488         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13489         pipeline.
13490         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13491         * config/nds32/nds32.md (pipeline_model): Add n7.
13492         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13493         * config/nds32/pipelines.md: Include n7 settings.
13495 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13496             Chung-Ju Wu  <jasonwucj@gmail.com>
13498         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13499         * config/nds32/nds32-e8.md: New file.
13500         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13501         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13502         pipeline.
13503         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13504         * config/nds32/nds32.md (pipeline_model): Add e8.
13505         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13506         * config/nds32/pipelines.md: Include e8 settings.
13508 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13509             Chung-Ju Wu  <jasonwucj@gmail.com>
13511         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13512         * config/nds32/nds32-n8.md: New file.
13513         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13514         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13515         pipeline.
13516         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13517         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13518         * config/nds32/nds32.md (pipeline_model): Add n8.
13519         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13520         * config/nds32/pipelines.md: Include n8 settings.
13522 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13523             Chung-Ju Wu  <jasonwucj@gmail.com>
13525         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13526         * config/nds32/nds32-n9-2r1w.md: New file.
13527         * config/nds32/nds32-n9-3r2w.md: New file.
13528         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13529         nds32_register_ports): New or modify for cpu n9.
13530         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13531         pipeline.
13532         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13533         * config/nds32/nds32-utils.c: New file.
13534         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13535         TARGET_MUL_SLOW): Define.
13536         * config/nds32/nds32.md (pipeline_model): New attribute.
13537         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13538         New options that support cpu n9.
13539         * config/nds32/pipelines.md: Include n9 settings.
13540         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13542 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13544         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13545         information if necessary.
13546         (output_cond_branch_compare_zero): Likewise.
13547         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13548         (nds32_target_alignment): Refine for alignment.
13549         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13550         (FUNCTION_BOUNDARY): Modify.
13551         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13552         align case.
13553         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13555 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13557         * config/nds32/constants.md (unspec_volatile_element): Add values for
13558         TLB operation and data prefetch.
13559         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13560         functions for TLB operation and data prefetch.
13561         * config/nds32/nds32-intrinsic.md: Likewise.
13562         * config/nds32/nds32_intrinsic.h: Likewise.
13563         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13564         (nds32_print_operand): Likewise.
13565         * config/nds32/nds32.h (nds32_builtins): Likewise.
13567 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13568         Andrew Pinski <pinsika@gcc.gnu.org>
13570         PR middle-end/82976
13571         * match.pd: Use constant_boolean_node of correct type instead of
13572         boolean_true_node or boolean_false_node for simplifying
13573         pointer comparisons to zero.
13575 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13577         PR tree-optimization/80021
13578         * tree.c (verify_type_variant): Make error call in verify_variant_match
13579         translatable and remove final full stop.
13581 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13583         * config/nds32/constants.md (unspec_volatile_element): Add
13584         UNSPEC_VOLATILE_EH_RETURN.
13585         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13586         nds32_output_stack_pop): Support dwarf exception handling process.
13587         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13588         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13589         exception handling process.
13590         (nds32_compute_stack_frame): Likewise.
13591         (nds32_return_addr_rtx): Likewise.
13592         (nds32_initial_elimination_offset): Likewise.
13593         (nds32_expand_prologue): Likewise.
13594         (nds32_expand_epilogue): Likewise.
13595         (nds32_dynamic_chain_address): New function.
13596         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13597         exception handling.
13598         (DYNAMIC_CHAIN_ADDRESS): Define.
13599         (EH_RETURN_DATA_REGNO): Define.
13600         (EH_RETURN_STACKADJ_RTX): Define.
13601         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13602         patterns for dwarf exception handling.
13604 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13606         * config/nds32/nds32.h: Clean up obsolete macros.
13608 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13610         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13611         Add enum values for particular instructions.
13612         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13613         particular intrinsic functions.
13614         * config/nds32/nds32-intrinsic.md: Likewise.
13615         * config/nds32/nds32_intrinsic.h: Likewise.
13616         * config/nds32/nds32.h (nds32_builtins): Likewise.
13617         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13618         (btst, ave): New patterns for particular instructions.
13620 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13622         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13623         Add enum values for atomic load/store and memory sync.
13624         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13625         and memory sync.
13626         * config/nds32/nds32-intrinsic.md: Likewise.
13627         * config/nds32/nds32_intrinsic.h: Likewise.
13628         * config/nds32/nds32.h (nds32_builtins): Likewise.
13630 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13632         PR tree-optimization/85257
13633         * fold-const.c (native_encode_vector): If not all elts could fit
13634         and off is -1, return 0 rather than offset.
13635         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13636         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13637         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13638         adjust buffer in native_interpret_expr call.
13640 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13642         * config/nds32/constants.md (unspec_volatile_element): Add cache
13643         control enum values.
13644         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13645         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13646         * config/nds32/nds32.c (nds32_cctl_names): New.
13647         (nds32_print_operand): Handle cache control register names.
13648         * config/nds32/nds32.h (nds32_builtins): New enum values.
13649         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13650         macros.
13651         * config/nds32/nds32.md (type): Add mmu.
13652         * config/nds32/pipelines.md (simple_insn): Add mmu.
13654 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13656         * config/nds32/nds32.md (type): Remove call.
13657         * config/nds32/pipelines.md (simple_insn): Likewise.
13659 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13661         * config/nds32/constants.md (unspec_volatile_element): Add
13662         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13663         UNSPEC_VOLATILE_FMFCFG.
13664         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13665         description for fmfcfg and fmfcsr.
13666         (bdesc_1arg): Add fmtcsr.
13667         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13668         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13669         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13670         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13671         unspec_fmfcfg): New patterns.
13672         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13673         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13674         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13675         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13676         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13677         __nds32__fmfcfg): Define.
13679 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13681         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13682         intrinsic register names.
13683         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13684         intrinsic register enum values and macros.
13686 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13688         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13689         for load/store addressing form.
13690         (nds32_print_operand_address): Likewise.
13692 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13694         PR target/85196
13695         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13696         based on LABEL_REF.  Remove useless assertion.
13697         (pic_address_needs_scratch): Fix formatting.
13698         (sparc_legitimize_pic_address): Minor tweaks.
13699         (sparc_delegitimize_address): Adjust assertion accordingly.
13700         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13701         into symbolic_operand.
13702         (movsi_high_pic_label_ref): Likewise.
13703         (movsi_lo_sum_pic_label_ref): Likewise.
13704         (movdi_pic_label_ref): Likewise.
13705         (movdi_high_pic_label_ref): Likewise.
13706         (movdi_lo_sum_pic_label_ref): Likewise.
13708 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13710         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13711         custom LIB_SPEC setup.
13713 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13714             Kito Cheng  <kito.cheng@gmail.com>
13716         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13717         * config/riscv/freebsd.h: New.
13719 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13721         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13722         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13723         file.
13725 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13726             Kito Cheng  <kito.cheng@gmail.com>
13728         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13729         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13730         * config/nds32/nds32-protos.h (nds32_output_call,
13731         nds32_output_return): Declare.
13732         * config/nds32/nds32.md: Refine all the call and return patterns.
13734 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13736         PR debug/85252
13737         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13738         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13740         PR rtl-optimization/84872
13741         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13742         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13743         EDGE_CROSSING edge.
13745 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13747         * expr.c (copy_blkmode_to_reg): Revert 254862.
13748         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13750 2018-04-06  Richard Biener  <rguenther@suse.de>
13752         PR middle-end/85244
13753         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13754         after seeing a component reference with an adjacent field.  Treat
13755         refs to arrays at struct end of external decls similar to
13756         refs to unconstrained commons.
13758 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13760         PR sanitizer/85213
13761         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13762         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13763         recursive calls.
13764         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13765         save_p here.
13767 2018-04-06  Richard Biener  <rguenther@suse.de>
13769         PR middle-end/85180
13770         * alias.c (find_base_term): New wrapper around find_base_term
13771         unwinding CSELIB_VAL_PTR changes.
13772         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13773         recursion.
13775 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13777         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13778         instructions.
13779         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13780         constant definitions.
13781         ("nop"): lr 0,0 -> nopr r0
13782         ("nop_lr0", "nop_lr1"): New insn definitions.
13784 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13786         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13787         NDS32_V3PUSH_AVAILABLE_P macro.
13789 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13790             Chung-Ju Wu  <jasonwucj@gmail.com>
13792         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13793         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13794         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13795         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13796         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13797         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13798         * config/nds32/constraints.md: New constraints and checking for hard
13799         float configuration.
13800         * config/nds32/iterators.md: New mode iterator and attribute for hard
13801         float configuration.
13802         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13803         patterns.
13804         * config/nds32/nds32-fpu.md: New file.
13805         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13806         deal with hard float code generation.
13807         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13808         ARCH_V3S.
13809         (abi_type, float_reg_number): New enum type.
13810         * config/nds32/nds32-predicates.c: New predicates for hard float.
13811         * config/nds32/nds32-protos.h: Declare functions for hard float.
13812         * config/nds32/nds32.c: Implementation for hard float configuration.
13813         * config/nds32/nds32.h: Definitions for hard float configuration.
13814         * config/nds32/nds32.md: Include hard float machine description and
13815         modify patterns for hard float configuration.
13816         * config/nds32/nds32.opt: New options for hard float configuration.
13817         * config/nds32/predicates.md: New predicates for hard float
13818         configuration.
13820 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13822         * common/config/nds32/nds32-common.c
13823         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13825 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13827         PR middle-end/85195
13828         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13829         CONSTRUCTOR_ELT (ctor, ...)->value.
13831 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13833         PR target/85193
13834         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13836 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13838         PR target/85204
13839         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13840         cond jump.
13842 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13843             Kito Cheng  <kito.cheng@gmail.com>
13845         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13846         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13847         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13848         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13850 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13851             Kito Cheng  <kito.cheng@gmail.com>
13853         * config/nds32/constraints.md (Ufe): New memory constraint.
13854         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13855         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13856         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13857         operands.
13858         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13859         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13861 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13863         * config/nds32/nds32.md: Use optimize_size in the condition for
13864         alu-shift instructions.
13866 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13868         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13870 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13872         * config/nds32/nds32.md (negsi2): Refine pattern.
13874 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13875             Chung-Ju Wu  <jasonwucj@gmail.com>
13877         * config/nds32/iterators.md (shift_rotate): New code iterator.
13878         (shift): New code attribute.
13879         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13880         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13881         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13882         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13883         bit-wise operations.
13884         (andsi3, *andsi3): Ditto.
13885         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13886         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13887         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13888         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13889         nds32_ior_operand, nds32_xor_operand): New predicates.
13891 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13893         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13894         (addsi3, subsi3): ... this.
13896 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13898         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13900 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13902         * config/nds32/nds32.md: Adjust indention.
13904 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13906         * config/nds32/nds32.md (feature): New attribute.
13908 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13910         * config/nds32/nds32.md (subtype): New attribute.
13912 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13914         PR target/85203
13915         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13916         expansion to perform a bitwise AND of the argument followed by a
13917         boolean negation of the result.
13919 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13921         PR rtl-optimization/84878
13922         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13923         the basic block.  Assert the use reference is not artificial and that
13924         it has an associated insn.
13926 2018-04-04  Michael Matz  <matz@suse.de>
13928         * builtins.c (compute_objsize): Pass correct operand
13929         to array_at_struct_end_p.
13931 2018-04-04  Richard Biener  <rguenther@suse.de>
13933         PR lto/85176
13934         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13935         from contexts for DINFO_LEVEL_TERSE and below.
13937 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13939         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13940         resiter_operand condition.
13941         * config/nds32/nds32.md (*move<mode>): Ditto.
13943 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13944             Monk Chiang  <sh.chiang04@gmail.com>
13946         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13948 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13950         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13952 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13953             Kito Cheng  <kito.cheng@gmail.com>
13955         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13956         nds32_cond_code_str, output_cond_branch,
13957         output_cond_branch_compare_zero, nds32_expand_cbranch,
13958         nds32_expand_cstore, nds32_expand_movcc,
13959         nds32_output_cbranchsi4_equality_zero,
13960         nds32_output_cbranchsi4_equality_reg,
13961         nds32_output_cbranchsi4_equality_reg_or_const_int,
13962         nds32_output_cbranchsi4_greater_less_zero: New functions.
13963         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13964         nds32_expand_cstore, nds32_expand_movcc,
13965         nds32_output_cbranchsi4_equality_zero,
13966         nds32_output_cbranchsi4_equality_reg,
13967         nds32_output_cbranchsi4_equality_reg_or_const_int,
13968         nds32_output_cbranchsi4_greater_less_zero): Declare.
13969         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13970         nds32_rimm11s_operand): New predicates.
13971         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13972         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13973         patterns.
13975 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13977         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13978         * config/nds32/nds32.md: Ditto.
13979         * config/nds32/pipelines.md: Ditto.
13981 2018-04-04  Richard Biener  <rguenther@suse.de>
13983         PR tree-optimization/85168
13984         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13985         propagating abnormals.
13987 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13989         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13991 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13992             Kito Cheng  <kito.cheng@gmail.com>
13994         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13995         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13996         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13997         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13998         * config/nds32/nds32.md (sibcall_internal): New.
13999         (sibcall_register): Remove.
14000         (sibcall_immediate): Remove.
14001         (sibcall_value_internal): New.
14002         (sibcall_value_register): Remove.
14003         (sibcall_value_immediate): Remove.
14004         * config/nds32/predicates.md (nds32_general_register_operand): New.
14005         (nds32_call_address_operand): New.
14007 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14009         PR rtl-optimization/85167
14010         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
14011         bb_defs if *split_p, instead preinitialize it to NULL.
14013         PR tree-optimization/85156
14014         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
14015         evaluating the argument multiple times.
14017 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
14019         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
14020         than vector.
14021         (_mm_cvtpd_ps): Likewise.
14022         (_mm_cvttpd_epi32): Likewise.
14023         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
14024         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
14025         vector, pixel, and bool following altivec.h include.
14027 2018-04-03  Martin Sebor  <msebor@redhat.com>
14029         * doc/extend.texi (Common Function Attributes): Clarify.
14030         (const attribute): Likewise.
14031         (pure attribute): Likewise.
14033 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
14035         PR target/85169
14036         * config/i386/i386.c (ix86_expand_vector_set): Use
14037         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
14039 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
14041         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
14042         instructions when changing rounding bits to preserve precision bits
14043         in the x87 control word.
14045 2018-04-03  Martin Liska  <mliska@suse.cz>
14047         PR tree-optimization/82491
14048         * rtl.h (strip_offset_and_add): Replace += suboffset with
14049         poly_uint64 () + suboffset.
14051 2018-03-29  Martin Liska  <mliska@suse.cz>
14052             Martin Jambor  <mjambor@suse.cz>
14054         PR ipa/84947
14055         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
14056         param_type is not an integral or pointer type.
14058 2018-04-03  Richard Biener  <rguenther@suse.de>
14060         * sese.h (recompute_all_dominators): Remove.
14062 2018-04-02  Martin Sebor  <msebor@redhat.com>
14064         * doc/invoke.texi (-Wrestrict): Fix typos.
14066 2018-04-02  Jim Wilson  <jimw@sifive.com>
14068         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
14069         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
14070         (<optab>di3, <optab>si3_extend): Likewise.
14071         (<optab>si3_mask, <optab>si3_mask_1): New.
14072         (<optab>di3_mask, <optab>di3_mask_1): New.
14073         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
14074         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
14075         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
14077 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
14079         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
14080         example.
14082 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
14084         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
14085         (nds32_canonicalize_comparison): New function.
14087 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14088             Kito Cheng  <kito.cheng@gmail.com>
14089             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
14091         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
14092         * config/nds32/constants.md (unspec_volatile_element): Add
14093         UNSPEC_VOLATILE_RELAX_GROUP.
14094         * config/nds32/nds32-relax-opt.c: New file.
14095         * config/nds32/nds32-predicates.c
14096         (nds32_symbol_load_store_p): New function.
14097         * config/nds32/nds32-protos.h
14098         (nds32_symbol_load_store_p): Declare function.
14099         (make_pass_nds32_relax_opt): Declare new rtl pass function.
14100         * config/nds32/nds32.c
14101         (nds32_register_pass): New function to register pass.
14102         (nds32_register_passes): New function to register passes.
14103         * config/nds32/nds32.md (relax_group): New pattern.
14104         * config/nds32/nds32.opt (mrelax-hint): New option.
14105         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14107 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14109         * config/nds32/t-nds32: Modify files dependency.
14111 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14113         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14114         (PROFILE_HOOK): Define its implementation.
14116 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14118         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14119         type and 32-bit size.
14121 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14123         PR middle-end/85090
14124         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14125         (V_128_256): New mode iterator.
14126         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14127         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14128         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14129         of V.
14130         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14131         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14133 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14135         PR target/83315
14136         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14137         NaN inputs correctly.
14139 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14141         PR target/80546
14142         * config/rs6000/vsx.md (??r): New mode attribute.
14143         (*vsx_mov<mode>_64bit): Use it.
14144         (*vsx_mov<mode>_32bit): Likewise.
14146 2018-03-30  Martin Sebor  <msebor@redhat.com>
14148         PR tree-optimization/84818
14149         * builtins.c (check_access): Use warning_n.
14151 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14153         PR target/83822
14154         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14155         condition.
14156         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14157         condition.
14159 2018-03-30  Julia Koval  <julia.koval@intel.com>
14161         PR target/84413
14162         * x86-tune.def (movx, partial_reg_dependency): Enable for
14163         m_SKYLAKE_AVX512.
14165 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14167         PR inline-asm/84985
14168         * lra-constraints.c (process_alt_operands): Move setting
14169         this_alternative_matches below.
14171 2018-03-29  Martin Liska  <mliska@suse.cz>
14173         PR lto/84995.
14174         * doc/invoke.texi: Document how LTO works with debug info.
14175         Describe auto-load support of binutils.  Mention 'x86-64'
14176         as valid option value of -march option.
14178 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14180         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14182         PR c/85094
14183         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14184         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14185         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14186         checking.
14188 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14190         PR target/84912
14191         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14192         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14193         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14194         for RS6000_BTM_POWERPC64.
14195         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14196         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14197         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14198         definition.
14199         (DIVDE): Use it.
14200         (DIVDEU): Likewise.
14202 2018-03-28  Carl Love  <cel@us.ibm.com>
14204         Revert
14205         2017-09-27  Carl Love  <cel@us.ibm.com>
14207         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14208         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14209         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14210         fctiw instruction.
14212 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14214         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14215         instead of __vector bool.
14216         (_mm_max_pu8): Likewise.
14217         (_mm_min_pi16): Likewise.
14219 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14221         PR target/84912
14222         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14223         (DIVWEUO): Likewise.
14224         (DIVDEO): Likewise.
14225         (DIVDEUO): Likewise.
14226         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14227         DIVWEUO and DIVDEUO.
14228         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14229         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14230         (div_extend): Likewise.
14231         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14232         builtin function.
14233         (__builtin_divweuo): Likewise.
14234         (__builtin_divdeo): Likewise.
14235         (__builtin_divdeuo): Likewise.
14237 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14239         PR target/85095
14240         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14241         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14243         PR tree-optimization/82004
14244         * gimple-match-head.c (optimize_pow_to_exp): New function.
14245         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14246         Don't fold to exp if optimize_pow_to_exp is false.
14248 2018-03-28  Martin Liska  <mliska@suse.cz>
14250         PR other/84819
14251         * calls.c (initialize_argument_information): Fix trailing space.
14252         * common.opt: Fix typo and provide better explanation for
14253         -fsanitize-coverage option.
14254         * config/i386/i386.opt: Fix typo.
14256 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14257             Martin Liska  <mliska@suse.cz>
14259         PR sanitizer/85081
14260         * gimplify.c (asan_poison_variable): Don't do the check for
14261         gimplify_omp_ctxp here.
14262         (gimplify_decl_expr): Do it here.
14263         (gimplify_target_expr): Likewise.
14265 2018-03-28  Martin Liska  <mliska@suse.cz>
14267         PR target/84988
14268         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14269         chkp_type_bounds_count if MPX is not enabled.
14271 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14273         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14275 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14277         PR target/84914
14278         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14279         function to create the function decl for complex long double
14280         multiply and divide for -mabi=ieeelongdouble.
14281         (init_float128_ieee): Call it.
14283 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14285         PR target/85044
14286         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14287         -fcf-protection=branch -mibt.
14288         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14290 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14292         PR target/81863
14293         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14294         arm_word_relocations.
14296 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14298         PR target/85056
14299         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14300         extern array declarations.
14302 2018-03-27  Richard Biener  <rguenther@suse.de>
14304         PR middle-end/84067
14305         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14306         explicit single_use checks.
14308 2018-03-27  Richard Biener  <rguenther@suse.de>
14310         PR tree-optimization/85082
14311         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14312         Valueize the VUSE.
14314 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14316         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14317         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14318         Turn on fasynchronous-unwind-tables and funwind-tables.
14320 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14322         PR target/85073
14323         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14324         (*bmi_blsr_<mode>_ccz): Ditto.
14326 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14328         PR tree-optimization/85063
14329         * omp-general.c (offloading_function_p): New function.  Factor out
14330         of ...
14331         * omp-offload.c (pass_omp_target_link::gate): ... here.
14332         * omp-general.h (offloading_function_p): Declare.
14333         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14334         with attribute omp declare target for offloading functions.
14336 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14338         PR tree-optimization/84005
14339         * tree-data-ref.h (get_base_for_alignment): Declare.
14340         * tree-data-ref.c (get_base_for_alignment_1): New function.
14341         (get_base_for_alignment): Likewise.
14342         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14343         get_base_for_alignment to find a suitable base object, instead
14344         of always using drb->base_address.
14346 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14348         PR inline-asm/85022
14349         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14350         known size by default.
14352 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14354         PR inline-asm/85030
14355         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14356         and non BLKmode operands.
14358 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14360         PR target/85026
14361         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14362         Clean up attributes.
14364 2018-03-23  Richard Biener  <rguenther@suse.de>
14366         PR debug/85020
14367         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14368         we are going to emit early debug for LTO.
14370 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14372         PR inline-asm/85034
14373         * function.c (match_asm_constraints_1): Don't optimize if input
14374         doesn't satisfy general_operand predicate for output's mode.
14376         PR inline-asm/85022
14377         * alias.c (write_dependence_p): Don't require for x_canonicalized
14378         non-VOIDmode if x has VOIDmode.
14380         PR sanitizer/85029
14381         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14382         just don't try to optimize it rather than assert it never happens.
14384 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14386         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14387         macro expansions for definition of ST_INTERNAL_<mode> and
14388         LD_INTERNAL_<mode> builtins.
14389         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14390         Remove prototype.
14391         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14392         function.
14393         (altivec_expand_st_builtin): Likewise.
14394         (altivec_expand_builtin): Remove calls to deleted functions.
14395         (rs6000_address_for_altivec): Delete this function.
14396         * config/rs6000/vector.md: Remove expands for
14397         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14399 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14401         PR target/84826
14402         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14403         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14404         re-computing once computed.
14405         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14406         (arm_init_machine_status): Initialize
14407         machine->static_chain_stack_bytes.
14409 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14411         PR target/84760
14412         * doc/extend.texi: Add four new prototypes for vec_ld.
14413         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14414         definitions for more logical presentation.
14415         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14416         entries for V1TI variants of __builtin_altivec_ld builtin.
14417         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14418         handling of V1TI variant of LVX icode pattern.
14419         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14420         (rs6000_gimple_fold_builtin): Likewise.
14421         (altivec_init_builtins): Add code to define
14422         __builtin_altivec_lvx_v1ti function.
14424 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14426         PR inline-asm/84941
14427         * function.c (match_asm_constraints_1): Don't do the optimization
14428         if input isn't a REG, SUBREG, MEM or constant.
14430 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14432         PR tree-optimization/84956
14433         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14434         bb_has_abnormal_pred.
14436 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14438         PR sanitizer/85018
14439         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14440         DECL_INITIAL (decl) to decl at the end.
14441         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14442         adjust the comment.
14444 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14446         * doc/extend.texi (__builtin_tgmath): Document when complex
14447         integer types are treated as _Complex _Float64.
14449 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14451         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14453 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14455         PR tree-optimization/84960
14456         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14457         if it is ENTRY block, move them into single succ of ENTRY in that case.
14459 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14461         PR tree-optimization/84811
14462         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14463         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14464         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14465         (known_subrange_p): Update accordingly.  Cast each value involved
14466         in the size comparison, rather than casting the result of the
14467         subtraction.
14469 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14471         PR tree-optimization/84982
14472         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14473         by flipping the least significant bit rather than all bits from
14474         bitpos to bitpos + bitsize - 1.
14476 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14478         * doc/extend.texi (Deprecated Features): Remove mention of
14479         long-deleted deprecations.
14481 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14483         PR jit/84288
14484         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14485         * configure: Regenerate.
14487 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14489         PR tree-optimization/83126
14490         * tree-parloops.c (num_phis): New function.
14491         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14493 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14495         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14496         mention anon-struct/union members and trailing attributes.
14498 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14500         PR tree-optimization/84969
14501         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14502         builtin memset partitions if they set different rhs values.
14504 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14506         PR rtl-optimization/84989
14507         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14508         VEC_DUPLICATE with scalar result mode.
14510 2018-03-21  Martin Liska  <mliska@suse.cz>
14512         PR ipa/84963
14513         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14514         not intended return statement.
14516 2018-03-21  Martin Liska  <mliska@suse.cz>
14518         PR target/84988
14519         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14520         (chkp_find_bound_slots_1): Limit number of iterations.
14522 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14524         PR target/84838
14525         * Minor grammar fixes for x86 options.
14527 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14529         PR debug/84875
14530         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14531         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14533 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14535         PR target/83789
14536         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14537         (altivec_lvx_<mode>_1op): Likewise.
14538         (altivec_stvx_<mode>_2op): Likewise.
14539         (altivec_stvx_<mode>_1op): Likewise.
14540         (altivec_lvx_<VM2:mode>): New define_expand.
14541         (altivec_stvx_<VM2:mode>): Likewise.
14542         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14543         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14544         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14545         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14546         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14547         (rs6000_gen_lvx): Likewise.
14548         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14549         (altivec_expand_stv_builtin): Likewise.
14550         (altivec_expand_builtin): Likewise.
14551         * config/rs6000/vector.md: Likewise.
14553 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14555         PR target/82518
14556         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14557         BYTES_BIG_ENDIAN.
14559 2018-03-20  Richard Biener  <rguenther@suse.de>
14561         PR target/84986
14562         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14563         sign-conversions as zero, fall back to standard scalar_stmt
14564         cost for the rest.
14566 2018-03-20  Martin Liska  <mliska@suse.cz>
14568         PR ipa/84825
14569         * predict.c (rebuild_frequencies): Handle case when we have
14570         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14572 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14574         PR target/84990
14575         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14576         flag_section_anchors.
14577         * varasm.c (use_blocks_for_decl_p): Remove hack for
14578         dw2_force_const_mem.
14580         PR target/84845
14581         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14582         to ...
14583         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14584         be created, use lowpart_subreg of operands[0] rather than operands[0]
14585         itself.
14586         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14587         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14588         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14589         and n constraint instead of aarch64_shift_imm_di and Usd.
14590         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14591         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14593 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14595         PR target/82989
14596         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14597         to favor GPR over NEON registers.
14598         (<shift>di3_neon): Likewise.
14600 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14602         PR target/84952
14603         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14604         (nvptx_process_pars): Emit bar.sync asap and alap.
14606 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14608         PR target/84954
14609         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14610         seen_label if seen_label is already set.
14612 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14614         PR target/84945
14615         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14616         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14617         Use 1U instead of 1.  Formatting fixes.
14619         PR c/84953
14620         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14621         instead of TREE_TYPE (s1) for the return value.
14623 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14625         PR tree-optimization/84946
14626         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14627         bitsize + bitsize in poly_uint64 rather than poly_int64.
14629         PR sanitizer/78651
14630         * dwarf2asm.c: Include fold-const.c.
14631         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14632         of decl rather than decl itself.
14634         PR rtl-optimization/84643
14635         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14637 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14639         PR sanitizer/78651
14640         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14641         calling assemble_variable.
14643 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14645         PR target/81647
14646         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14647         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14649 2018-03-19  Jim Wilson  <jimw@sifive.com>
14651         PR bootstrap/84856
14652         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14653         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14654         (riscv_first_stack_step): Likewise.
14655         (riscv_option_override): Use STACK_BOUNDARY instead of
14656         MIN_STACK_BOUNDARY.
14657         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14658         MIN_STACK_BOUNDARY.
14659         (BIGGEST_ALIGNMENT): Set to 128.
14660         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14661         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14662         STACK_BOUNDARY.
14664 2018-03-19  Richard Biener  <rguenther@suse.de>
14666         PR tree-optimization/84933
14667         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14668         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14670 2018-03-19  Richard Biener  <rguenther@suse.de>
14672         PR tree-optimization/84859
14673         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14674         (cond_if_else_store_replacement): Perform sinking operation on
14675         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14676         Generalize what a BB with a single eligible store is.
14678 2018-03-19  Richard Biener  <rguenther@suse.de>
14680         PR tree-optimization/84929
14681         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14682         chrec_is_positive against non-chrec arg.
14684 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14686         PR target/84711
14687         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14689 2018-03-18  Martin Liska  <mliska@suse.cz>
14691         PR rtl-optimization/84635
14692         * regrename.c (build_def_use): Use matches_mode only when
14693         matches >= 0.
14695 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14697         PR tree-optimization/84913
14698         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14699         vectorize chains of COND_EXPRs.
14701 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14703         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14705 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14707         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14709 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14711         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14713 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14714             Kito Cheng  <kito.cheng@gmail.com>
14716         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14717         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14718         (nds32_adjust_reg_alloc_order): New function.
14719         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14721 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14723         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14724         nds32_print_operand, nds32_print_operand_address): Use
14725         HOST_WIDE_INT_PRINT_DEC instead.
14727 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14729         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14731 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14733         PR target/84902
14734         * config/i386/i386.c (initial_ix86_tune_features,
14735         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14736         unsigned long long.
14737         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14738         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14739         rather than 1u << ix86_tune.  Formatting fix.
14740         (ix86_option_override_internal): Change ix86_arch_mask from
14741         unsigned int to unsigned HOST_WIDE_INT, initialize to
14742         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14743         (ix86_function_specific_restore): Likewise.
14745 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14747         PR target/84899
14748         * postreload.c (reload_combine_recognize_pattern): Perform
14749         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14750         truncate_int_for_mode the result for the destination's mode.
14752         PR c/84909
14753         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14754         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14755         Likewise.
14756         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14757         Likewise.
14759 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14761         PR target/84876
14762         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14763         regno_allocno_class_array and sorted_pseudos.
14764         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14765         insns where regno is used.
14767 2018-03-16  Martin Liska  <mliska@suse.cz>
14769         PR ipa/84833
14770         * multiple_target.c (create_dispatcher_calls): Redirect
14771         reference in the symbol table.
14773 2018-03-16  Martin Liska  <mliska@suse.cz>
14775         PR ipa/84722
14776         * multiple_target.c (create_dispatcher_calls): Redirect also
14777         an alias.
14779 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14781         PR c++/79937
14782         PR c++/82410
14783         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14784         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14785         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14787 2018-03-16  Julia Koval  <julia.koval@intel.com>
14789         * doc/invoke.texi (Skylake Server): Add CLWB.
14790         Cannonlake): Remove CLWB.
14792 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14794         PR tree-optimization/84841
14795         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14796         1 << 3.
14797         (FLOAT_ONE_CONST_TYPE): Define.
14798         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14799         (sort_by_operand_rank): Put entries with higher constant_type last
14800         rather than first to match comments.
14802 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14804         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14805         split predicate.
14807 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14809         PR c++/79085
14810         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14811         check and use address of target always.
14813 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14815         PR target/84574
14816         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14817         (indirect_thunk_bnd_needed): Likewise.
14818         (indirect_thunks_used): Likewise.
14819         (indirect_thunks_bnd_used): Likewise.
14820         (indirect_return_needed): New.
14821         (indirect_return_bnd_needed): Likewise.
14822         (output_indirect_thunk_function): Add a bool argument for
14823         function return.
14824         (output_indirect_thunk_function): Don't generate alias for
14825         function return thunk.
14826         (ix86_code_end): Call output_indirect_thunk_function to generate
14827         function return thunks.
14828         (ix86_output_function_return): Set indirect_return_bnd_needed
14829         and indirect_return_needed instead of indirect_thunk_bnd_needed
14830         and indirect_thunk_needed.
14832 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14834         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14835         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14836         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14838 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14839             Paul Hua <paul.hua.gm@gmail.com>
14841         PR c/84852
14842         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14844 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14846         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14847         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14848         resp. SFmode cases.
14850 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14852         PR target/84711
14853         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14854         instead of GET_MODE_SIZE when comparing Units.
14856 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14858         PR target/68256
14859         * varasm.c (hash_section): Return an unchangeble hash value
14860         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14861         Return !aarch64_can_use_per_function_literal_pools_p ().
14863 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14865         PR target/84860
14866         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14867         rather than address of cmode as last argument to prepare_cmp_insn.
14869 2018-03-15  Julia Koval  <julia.koval@intel.com>
14871         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14872         F_AVX512VNNI, F_AVX512BITALG): New.
14874 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14876         PR target/83451
14877         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14878         insn for floating-point loads and stores.
14880 2018-03-14  Carl Love  <cel@us.ibm.com>
14882         * config/rs6000/rs6000-c.c: Add macro definitions for
14883         ALTIVEC_BUILTIN_VEC_PERMXOR.
14884         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14885         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14886         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14887         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14888         UNSPEC_VPERMXOR.
14889         * config/doc/extend.texi: Add prototypes for vec_permxor.
14891 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14893         PR c/84852
14894         * diagnostic-show-locus.c (class layout_point): Convert m_line
14895         from int to linenum_type.
14896         (line_span::comparator): Use linenum "compare" function when
14897         comparing line numbers.
14898         (test_line_span): New function.
14899         (layout_range::contains_point): Convert param "row" from int to
14900         linenum_type.
14901         (layout_range::intersects_line_p): Likewise.
14902         (layout::will_show_line_p): Likewise.
14903         (layout::print_source_line): Likewise.
14904         (layout::should_print_annotation_line_p): Likewise.
14905         (layout::print_annotation_line): Likewise.
14906         (layout::print_leading_fixits): Likewise.
14907         (layout::annotation_line_showed_range_p): Likewise.
14908         (struct line_corrections): Likewise for field m_row.
14909         (line_corrections::line_corrections): Likewise for param "row".
14910         (layout::print_trailing_fixits): Likewise.
14911         (layout::get_state_at_point): Likewise.
14912         (layout::get_x_bound_for_row): Likewise.
14913         (layout::print_line): Likewise.
14914         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14915         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14916         * input.c (selftest::test_linenum_comparisons): New function.
14917         (selftest::input_c_tests): Call it.
14918         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14919         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14920         * selftest.h (ASSERT_GT): New macro.
14921         (ASSERT_GT_AT): New macro.
14922         (ASSERT_LT): New macro.
14923         (ASSERT_LT_AT): New macro.
14925 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14927         PR rtl-optimization/84780
14928         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14930 2018-03-14  Martin Liska  <mliska@suse.cz>
14932         * tree.c (record_node_allocation_statistics): Use
14933         get_stats_node_kind.
14934         (get_stats_node_kind): New function extracted from
14935         record_node_allocation_statistics.
14936         (free_node): Use get_stats_node_kind.
14938 2018-03-14  Richard Biener  <rguenther@suse.de>
14940         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14941         that the value-set of ANTIC_IN doesn't grow.
14943         Revert
14944         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14945         member.
14946         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14947         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14949 2018-03-14  Julia Koval  <julia.koval@intel.com>
14951         * config.gcc (icelake-client, icelake-server): New.
14952         (icelake): Remove.
14953         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14954         (initial_ix86_arch_features): Ditto.
14955         (PTA_SKYLAKE): Add SGX.
14956         (PTA_ICELAKE): Remove.
14957         (PTA_ICELAKE_CLIENT): New.
14958         (PTA_ICELAKE_SERVER): New.
14959         (ix86_option_override_internal): Split up icelake on icelake client and
14960         icelake server.
14961         (get_builtin_code_for_version): Ditto.
14962         (fold_builtin_cpu): Ditto.
14963         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14964         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14965         * config/i386/i386.h (processor_type): Ditto.
14966         * doc/invoke.texi: Ditto.
14968 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14970         PR sanitizer/83392
14971         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14972         INTEGER_CST offset, add it together with bitpos / 8 and
14973         sign extend based on POINTER_SIZE.
14975         PR target/84844
14976         Revert
14977         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14979         PR target/78090
14980         * config/i386/constraints.md (Yc): New register constraint.
14981         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14982         Use Yc constraint for alternative 2 of operand 0.  Remove
14983         preferred_for_speed attribute.
14985 2018-03-14  Richard Biener  <rguenther@suse.de>
14987         PR tree-optimization/84830
14988         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14989         with the old one to avoid oscillations.
14991 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14993         PR target/83712
14994         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14995         pseudos.
14996         (assign_by_spills): Return a flag of reload assignment failure.
14997         Do not process the reload assignment failures.  Do not spill other
14998         reload pseudos if they has the same reg class.  Update n if
14999         necessary.
15000         (lra_assign): Add a return arg.  Set up from the result of
15001         assign_by_spills call.
15002         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15003         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15004         usage_insns if it is not NULL.
15005         (spill_hard_reg_in_range): New function.
15006         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15007         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15008         function prototypes.
15009         (lra_assign): Change prototype.
15010         * lra.c (lra): Add code to deal with fails by splitting hard reg
15011         live ranges.
15013 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
15015         * config/riscv/riscv.opt (mrelax): New option.
15016         * config/riscv/riscv.c (riscv_file_start): Emit ".option
15017         "norelax" when riscv_mrelax is disabled.
15018         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
15020 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15022         PR target/84743
15023         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
15024         reassociation for int modes.
15026 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15028         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
15029         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
15030         for big-endian.
15031         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
15032         * config/aarch64/aarch64-sve.md
15033         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
15034         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
15035         (*extend<mode><Vwide>2): Rename to...
15036         (aarch64_sve_extend<mode><Vwide>2): ...this.
15037         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
15038         renaming the old pattern to...
15039         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
15040         unsigned packs.
15041         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
15042         define_expand, renaming the old pattern to...
15043         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
15044         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
15045         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
15046         account when deciding which SVE instruction the optab should use.
15047         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
15049 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15051         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
15052         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
15053         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
15054         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
15055         (tlsdesc_small_<mode>): Turn a define_expand and use
15056         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
15057         (tlsdesc_small_advsimd_<mode>): ...this.
15058         (tlsdesc_small_sve_<mode>): New pattern.
15060 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
15062         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
15063         (UNSPEC_UMUL_HIGHPART): New constants.
15064         (MUL_HIGHPART): New int iteraor.
15065         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
15066         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
15067         define_expand.
15068         (*<su>mul<mode>3_highpart): New define_insn.
15070 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
15072         PR lto/84805
15073         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
15074         incomplete types.
15076 2018-03-13  Martin Liska  <mliska@suse.cz>
15078         PR ipa/84658.
15079         * (sem_item_optimizer::sem_item_optimizer): Initialize new
15080         vector.
15081         (sem_item_optimizer::~sem_item_optimizer): Release it.
15082         (sem_item_optimizer::merge_classes): Register variable aliases.
15083         (sem_item_optimizer::fixup_pt_set): New function.
15084         (sem_item_optimizer::fixup_points_to_sets): Likewise.
15085         * ipa-icf.h: Declare new variables and functions.
15087 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
15089         PR middle-end/84834
15090         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
15091         integer_pow2p@2 and test integer_pow2p in condition.
15092         (A < 0 ? C : 0): Similarly for @1.
15094         PR middle-end/84831
15095         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
15096         characters starting at p contain '\0' character, don't look beyond
15097         that.
15099         PR target/84827
15100         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
15101         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15103         PR target/84828
15104         * reg-stack.c (change_stack): Change update_end var from int to
15105         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15106         also call set_block_for_insn on the newly added insns and rescan.
15108         PR target/84786
15109         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15110         on the last operand.
15112         PR c++/84704
15113         * tree.c (stabilize_reference_1): Return save_expr (e) for
15114         STATEMENT_LIST even if it doesn't have side-effects.
15116 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15118         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15120 2018-03-12  Renlin Li  <renlin.li@arm.com>
15122         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15123         aarch64_output_scalar_simd_mov_immediate.
15125 2018-03-12  Martin Sebor  <msebor@redhat.com>
15127         PR tree-optimization/83456
15128         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15129         for perfectly overlapping calls to memcpy.
15130         (gimple_fold_builtin_memory_chk): Same.
15131         (gimple_fold_builtin_strcpy): Handle no-warning.
15132         (gimple_fold_builtin_stxcpy_chk): Same.
15133         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15135 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15137         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15138         parameter.  Use it for SFmode.
15139         (rs6000_function_arg_advance_1): Adjust.
15140         (rs6000_function_arg): Adjust.
15141         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15143 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15145         PR rtl-optimization/84169
15146         PR rtl-optimization/84780
15147         * combine.c (can_combine_p): Check for a 2-insn combination whether
15148         the destination register is used between the two insns, too.
15150 2018-03-12  Richard Biener  <rguenther@suse.de>
15152         PR tree-optimization/84803
15153         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15154         for refs DR analysis didn't process.
15156 2018-03-12  Richard Biener  <rguenther@suse.de>
15158         PR tree-optimization/84777
15159         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15160         force-vectorize loops ignore whether we are optimizing for size.
15162 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15164         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15165         (TARGET_MD_ASM_ADJUST): Define.
15167 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15168             Kito Cheng  <kito.cheng@gmail.com>
15169             Chung-Ju Wu  <jasonwucj@gmail.com>
15171         * config/nds32/nds32.c (nds32_compute_stack_frame,
15172         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15173         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15174         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15175         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15176         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15177         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15178         * config/nds32/nds32.md (prologue, epilogue): Use macro
15179         NDS32_V3PUSH_AVAILABLE_P to do checking.
15181 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15183         PR debug/58150
15184         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15185         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15186         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15187         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15188         addition of most attributes on !orig_type_die or the attribute not
15189         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15191 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15192             Chung-Ju Wu  <jasonwucj@gmail.com>
15194         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15195         __NDS32_VH__ macro.
15196         * config/nds32/nds32.opt (mvh): New option.
15198 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15199             Chung-Ju Wu  <jasonwucj@gmail.com>
15201         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15202         function.
15203         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15204         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15205         definition.
15207 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15208             Chung-Ju Wu  <jasonwucj@gmail.com>
15210         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15211         function.
15212         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15213         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15215 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15216             Kito Cheng  <kito.cheng@gmail.com>
15217             Chung-Ju Wu  <jasonwucj@gmail.com>
15219         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15220         UNSPEC_FFMISM and UNSPEC_FLMISM.
15221         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15222         for ffb, ffmism and flmism.
15223         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15224         (unspec_ffmism): Ditto.
15225         (unspec_flmism): Ditto.
15226         (nds32_expand_builtin_impl): Check if string extension is available.
15227         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15228         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15230 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15232         Reverting patch:
15233         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15235         PR target/83712
15236         * lra-assigns.c (assign_by_spills): Return a flag of reload
15237         assignment failure.  Do not process the reload assignment
15238         failures.  Do not spill other reload pseudos if they has the same
15239         reg class.
15240         (lra_assign): Add a return arg.  Set up from the result of
15241         assign_by_spills call.
15242         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15243         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15244         usage_insns if it is not NULL.
15245         (spill_hard_reg_in_range): New function.
15246         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15247         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15248         function prototypes.
15249         (lra_assign): Change prototype.
15250         * lra.c (lra): Add code to deal with fails by splitting hard reg
15251         live ranges.
15253 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15255         PR target/84807
15256         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15258 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15260         PR debug/84620
15261         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15262         (dw_val_node): Add val_symbolic_view.
15263         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15264         (symview_upper_bound): New.
15265         (new_line_info_table): Initialize symviews_since_reset.
15266         (dwarf2out_source_line): Count symviews_since_reset and set
15267         symview_upper_bound.
15268         (dw_val_equal_p): Handle symview.
15269         (add_AT_symview): New.
15270         (print_dw_val): Handle symview.
15271         (attr_checksum, attr_checksum_ordered): Likewise.
15272         (same_dw_val_p, size_of_die): Likewise.
15273         (value_format, output_die): Likewise.
15274         (add_high_low_attributes): Use add_AT_symview for entry_view.
15275         (dwarf2out_finish): Reset symview_upper_bound, clear
15276         zero_view_p.
15278 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15280         PR target/83969
15281         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15282         Add strict argument and use it.
15283         (rs6000_split_multireg_move): Update for new strict argument.
15284         (mem_operand_gpr): Disallow all non-offsettable addresses.
15285         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15287 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15289         PR target/84772
15290         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15291         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15292         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15294         PR c++/84767
15295         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15296         decl, use remap_type if we want to use the type.
15298 2018-03-09  Martin Sebor  <msebor@redhat.com>
15300         PR tree-optimization/84526
15301         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15302         Remove dead code.
15303         (builtin_access::generic_overlap): Be prepared to handle non-array
15304         base objects.
15306 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15308         PR rtl-optimization/84682
15309         * lra-constraints.c (process_address_1): Check is_address flag
15310         for address constraints.
15311         (process_alt_operands): Likewise.
15312         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15313         preprocess_constraints.
15314         * recog.h (preprocess_constraints): Add oploc parameter.
15315         Adjust callers.
15316         * recog.c (preprocess_constraints): Test address_operand for
15317         CT_ADDRESS constraints.
15319 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15321         PR target/83712
15322         * lra-assigns.c (assign_by_spills): Return a flag of reload
15323         assignment failure.  Do not process the reload assignment
15324         failures.  Do not spill other reload pseudos if they has the same
15325         reg class.
15326         (lra_assign): Add a return arg.  Set up from the result of
15327         assign_by_spills call.
15328         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15329         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15330         usage_insns if it is not NULL.
15331         (spill_hard_reg_in_range): New function.
15332         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15333         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15334         function prototypes.
15335         (lra_assign): Change prototype.
15336         * lra.c (lra): Add code to deal with fails by splitting hard reg
15337         live ranges.
15339 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15341         PR target/83193
15342         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15343         Accept complain bool parameter.  Only emit errors if it is true.
15344         (arm_parse_cpu_option_name): Likewise.
15345         (arm_target_thumb_only): Adjust callers of the above.
15346         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15347         prototype to take a default true bool parameter.
15348         (arm_parse_arch_option_name): Likewise.
15350 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15351             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15353         PR jit/64089
15354         PR jit/84288
15355         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15356         * configure: Regenerate.
15357         * configure.ac ("linker --version-script option"): New.
15358         ("linker soname option"): New.
15360 2018-03-09  Richard Biener  <rguenther@suse.de>
15362         PR tree-optimization/84775
15363         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15364         immediate uses of predicate stmts and mark them modified.
15366         Revert
15367         PR tree-optimization/84178
15368         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15369         to caller.
15370         (version_loop_for_if_conversion): Delay update_ssa call.
15371         (tree_if_conversion): Delay update_ssa until after predicate
15372         insertion.
15374 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15376         PR target/84763
15377         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15378         when the function accesses prior frames.
15380 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15382         PR debug/84456
15383         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15384         gen_llsym, otherwise call maybe_gen_llsym.
15386         PR inline-asm/84742
15387         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15388         has ',' character inside of it.
15390 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15392         PR target/84748
15393         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15394         as clobbering CC_REGNUM.
15396 2018-03-08  Richard Biener  <rguenther@suse.de>
15398         PR middle-end/84552
15399         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15400         (follow_copies_to_constant): Do not follow SSA names registered
15401         for update.
15403 2018-03-08  Richard Biener  <rguenther@suse.de>
15405         PR tree-optimization/84178
15406         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15407         to caller.
15408         (version_loop_for_if_conversion): Delay update_ssa call.
15409         (tree_if_conversion): Delay update_ssa until after predicate
15410         insertion.
15412 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15414         PR tree-optimization/84178
15415         * tree-if-conv.c (release_bb_predicate): Remove the
15416         the assertion that the stmts have NULL use_ops.
15417         Discard the statements, asserting that they haven't
15418         yet been added to a BB.
15420 2018-03-08  Richard Biener  <rguenther@suse.de>
15422         PR tree-optimization/84746
15423         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15424         (phi_translate): Pass in destination ANTIC_OUT set.
15425         (phi_translate_1): Likewise.  For a simplified result lookup
15426         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15427         (phi_translate_set): Adjust.
15428         (do_pre_regular_insertion): Likewise.
15429         (do_pre_partial_partial_insertion): Likewise.
15431 2018-03-08  Martin Liska  <mliska@suse.cz>
15433         PR gcov-profile/84735
15434         * doc/gcov.texi: Document usage of profile files.
15435         * gcov-io.h: Document changes in the format.
15437 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15439         PR debug/84404
15440         PR debug/84408
15441         * dwarf2out.c (struct dw_line_info_table): Update comments for
15442         view == -1.
15443         (FORCE_RESET_NEXT_VIEW): New.
15444         (FORCE_RESETTING_VIEW_P): New.
15445         (RESETTING_VIEW_P): Check for -1 too.
15446         (ZERO_VIEW_P): Likewise.
15447         (new_line_info_table): Force-reset next view.
15448         (dwarf2out_begin_function): Likewise.
15449         (dwarf2out_source_line): Simplify zero_view_p initialization.
15450         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15451         view directly.  Omit view when omitting .loc at line 0.
15453 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15455         PR tree-optimization/84740
15456         * tree-switch-conversion.c (process_switch): Call build_constructors
15457         only if info.phi_count is non-zero.
15459         PR tree-optimization/84739
15460         * tree-tailcall.c (find_tail_calls): Check call arguments against
15461         DECL_ARGUMENTS (current_function_decl) rather than
15462         DECL_ARGUMENTS (func) when checking for tail recursion.
15464 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15466         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15467         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15468         Volker Reichelt's entry and add entries for people that perform
15469         GCC fuzzy testing and report numerous bugs.
15471 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15473         PR target/82411
15474         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15475         readonly data in sdata, if that is disabled.
15476         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15477         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15478         -mreadonly-in-sdata option.
15480 2018-03-07  Martin Sebor  <msebor@redhat.com>
15482         PR tree-optimization/84468
15483         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15484         basic block when looking for nul assignment.
15486 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15488         PR target/84277
15489         * except.h (output_function_exception_table): Adjust prototype.
15490         * except.c (output_function_exception_table): Remove FNNAME parameter
15491         and add SECTION parameter.  Ouput one part of the table at a time.
15492         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15493         the first part of the exception table and emit unwind directives.
15494         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15495         (i386_pe_seh_cold_init): Likewise.
15496         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15497         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15498         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15499         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15500         * config/i386/winnt.c: Include except.h.
15501         (struct seh_frame_state): Add reg_offset, after_prologue and
15502         in_cold_section fields.
15503         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15504         (i386_pe_seh_cold_init): New function.
15505         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15506         to seh->in_cold_section.
15507         (seh_emit_push): Record the offset of the push.
15508         (seh_emit_save): Record the offet of the save.
15509         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15510         Test seh->after_prologue to disregard the epilogue.
15511         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15512         (i386_pe_end_cold_function): New function.
15514 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15516         PR fortran/84565
15517         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15518         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15520         PR c++/84704
15521         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15522         on tmp_var.
15523         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15524         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15526         PR middle-end/84723
15527         * multiple_target.c: Include tree-inline.h and intl.h.
15528         (expand_target_clones): Diagnose and fail if node->definition and
15529         !tree_versionable_function_p (node->decl).
15531 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15533         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15534         sprint_ul.
15535         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15536         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15537         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15539 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15541         PR target/84710
15542         * combine.c (try_combine): Use reg_or_subregno instead of handling
15543         just paradoxical SUBREGs and REGs.
15545 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15547         * config/arc/arc.c (arc_finalize_pic): Remove function.
15548         (arc_must_save_register): We use single base PIC register, remove
15549         checks to save/restore the PIC register.
15550         (arc_expand_prologue): Likewise.
15551         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15552         Remove.
15553         (arc_verify_short): Likewise.
15554         (arc_attr_type): Likewise.
15555         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15556         (walk_stores): Likewise.
15557         (arc_address_cost): Make it static.
15558         (arc_verify_short): Likewise.
15559         (branch_dest): Likewise.
15560         (arc_attr_type): Likewise.
15561         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15562         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15563         (arc_final_prescan_insn): Remove inserting the nops due to
15564         hardware hazards.  It is done in reorg step.
15565         (insn_length_variant_t): Remove.
15566         (insn_length_parameters_t): Likewise.
15567         (arc_insn_length_parameters): Likewise.
15568         (arc_get_insn_variants): Likewise.
15569         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15571 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15573         PR inline-asm/84683
15574         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15575         assertion failure.
15577         PR tree-optimization/84687
15578         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15579         on new_node->decl.
15580         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15582 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15584         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15585         Rename to ppc_speculation_barrier.
15586         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15587         __builtin_ppc_speculation_barrier.
15589 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15591         PR target/84700
15592         * combine.c (combine_simplify_rtx): Don't try to simplify if
15593         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15594         are equal to x.
15596 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15598         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15599         to 32 bytes when compiling for POWER9.
15601 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15603         PR target/84564
15604         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15605         regparm >= 3 with no arg reg available also for calls with
15606         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15608         PR target/84524
15609         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15610         orig,vex.
15611         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15613 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15615         PR target/84264
15616         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15618 2018-03-05  Richard Biener  <rguenther@suse.de>
15620         PR tree-optimization/84486
15621         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15622         When inserting a __builtin_assume_aligned call set the LHS
15623         SSA name alignment info accordingly.
15625 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15627         PR tree-optimization/84114
15628         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15629         Avoid reassociation of FLOAT_MODE addition.
15631 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15633         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15634         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15635         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15636         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15637         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15638         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15639         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15640         and -mwbnoinvd.
15641         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15642         __builtin_ia32_wbinvd): New builtins.
15643         (SPECIAL_ARGS2): New.
15644         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15645         (SPECIAL_ARGS2): New.
15646         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15647         (ix86_valid_target_attribute_inner_p): Ditto.
15648         (ix86_init_mmx_sse_builtins): Add special_args2.
15649         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15650         TARGET_WBNOINVD_P): New.
15651         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15652         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15653         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15654         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15655         * config/i386/pconfigintrin.h: New file.
15656         * config/i386/wbnoinvdintrin.h: Ditto.
15657         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15658         wbnoinvdintrin.h.
15659         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15661 2018-03-05  Richard Biener  <rguenther@suse.de>
15663         PR tree-optimization/84670
15664         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15665         member.
15666         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15667         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15668         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15669         doesn't grow if all successors (recursively) were visited at least
15670         once.
15672 2018-03-05  Richard Biener  <rguenther@suse.de>
15674         PR tree-optimization/84650
15675         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15676         if executed in the loop pipeline.
15678 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15680         * doc/configfiles.texi (Configuration Files): Move info about
15681         conditionalizing $target-protos.h to...
15682         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15683         differs from $target-protos.h.
15685 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15686             Chung-Ju Wu  <jasonwucj@gmail.com>
15688         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15689         * config/nds32/nds32-multiple.md (setmemsi): Define.
15690         * config/nds32/nds32-memory-manipulation.c
15691         (nds32_gen_dup_4_byte_to_word_value): New.
15692         (emit_setmem_word_loop): New.
15693         (emit_setmem_byte_loop): New.
15694         (nds32_expand_setmem_loop): New.
15695         (nds32_expand_setmem_loop_v3m): New.
15696         (nds32_expand_setmem_unroll): New.
15697         (nds32_expand_setmem): New.
15699 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15700             Chung-Ju Wu  <jasonwucj@gmail.com>
15702         * config/nds32/nds32-memory-manipulation.c
15703         (nds32_emit_load_store): New.
15704         (nds32_emit_post_inc_load_store): New.
15705         (nds32_emit_mem_move): New.
15706         (nds32_emit_mem_move_block): New.
15707         (nds32_expand_movmemsi_loop_unknown_size): New.
15708         (nds32_expand_movmemsi_loop_known_size): New.
15709         (nds32_expand_movmemsi_loop): New.
15710         (nds32_expand_movmemsi_unroll): New.
15711         (nds32_expand_movmemqi): Rename ...
15712         (nds32_expand_movmemsi): ... to this.
15713         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15714         (movmemsi): ... to this.
15715         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15716         (nds32_expand_movmemsi): ... to this.
15718 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15719             Monk Chiang  <sh.chiang04@gmail.com>
15720             Chung-Ju Wu  <jasonwucj@gmail.com>
15722         * config/nds32/nds32-protos.h
15723         (nds32_expand_load_multiple): New arguments.
15724         (nds32_expand_store_multiple): Ditto.
15725         (nds32_valid_multiple_load_store): Rename ...
15726         (nds32_valid_multiple_load_store_p): ... to this.
15727         * config/nds32/nds32-memory-manipulation.c
15728         (nds32_expand_load_multiple): Refine implementation.
15729         (nds32_expand_store_multiple): Ditto.
15730         * config/nds32/nds32-multiple.md
15731         (load_multiple): Update nds32_expand_load_multiple interface.
15732         (store_multiple): Update nds32_expand_store_multiple interface.
15733         * config/nds32/nds32-predicates.c
15734         (nds32_valid_multiple_load_store): Rename ...
15735         (nds32_valid_multiple_load_store_p): ... to this and refine
15736         implementation.
15737         * config/nds32/predicates.md
15738         (nds32_load_multiple_and_update_address_operation): New predicate.
15739         (nds32_store_multiple_and_update_address_operation): New predicate.
15741 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15742             Chung-Ju Wu  <jasonwucj@gmail.com>
15744         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15745         (combo): New attribute.
15746         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15748 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15750         * config/nds32/nds32.opt: Change -mcmodel= default value.
15752 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15753             Monk Chiang  <sh.chiang04@gmail.com>
15754             Chung-Ju Wu  <jasonwucj@gmail.com>
15756         * config/nds32/constants.md (unspec_element): New enum.
15757         * config/nds32/constraints.md (Umw): New constraint.
15758         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15759         * config/nds32/nds32-intrinsic.md: Likewise.
15760         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15761         (nds32_valid_smw_lwm_base_p): New.
15762         (nds32_output_smw_single_word): New.
15763         (nds32_output_lmw_single_word): New.
15764         (nds32_expand_unaligned_load): New.
15765         (nds32_expand_unaligned_store): New.
15766         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15767         (nds32_output_smw_single_word): Declare.
15768         (nds32_output_lmw_single_word): Declare.
15769         (nds32_expand_unaligned_load): Declare.
15770         (nds32_expand_unaligned_store): Declare.
15771         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15772         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15773         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15774         NDS32_BUILTIN_UASTORE_DW.
15775         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15776         predicate.
15778 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15779             Kito Cheng  <kito.cheng@gmail.com>
15780             Chung-Ju Wu  <jasonwucj@gmail.com>
15782         * config/nds32/nds32-intrinsic.c
15783         (nds32_expand_builtin_null_ftype_reg): Delete.
15784         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15785         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15786         (nds32_read_argument): New.
15787         (nds32_legitimize_target): Ditto.
15788         (nds32_legitimize_argument): Ditto.
15789         (nds32_check_constant_argument): Ditto.
15790         (nds32_expand_unop_builtin): Ditto.
15791         (nds32_expand_unopimm_builtin): Ditto.
15792         (nds32_expand_binop_builtin): Ditto.
15793         (nds32_builtin_decl_impl): Ditto.
15794         (builtin_description): Ditto.
15795         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15796         (nds32_init_builtins_impl): Ditto.
15797         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15798         (nds32_builtin_decl): New.
15799         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15800         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15802 2018-03-02  Jeff Law  <law@redhat.com>
15804         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15805         (redundant_insn, fill_simple_delay_slots): Likewise.
15806         (fill_slots_from_thread): Likewise.
15807         * resource.c (mark_referenced_resources): Likewise.
15808         (mark_set_resources, find_dead_or_set_registers): Likewise.
15810 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15812         * substring-locations.h (format_warning_va): Formatting fix for
15813         ATTRIBUTE_GCC_DIAG.
15814         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15815         argument.
15816         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15817         * substring-locations.c: Include intl.h.
15818         (format_warning_va): Turned into small wrapper around
15819         format_warning_n_va, renamed to ...
15820         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15821         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15822         use ngettext.
15823         (format_warning_at_substring_n): New function.
15824         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15825         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15826         format_warning_at_substring with just a shorter name instead of
15827         const function pointer.
15828         (fmtwarn_n): New function.
15829         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15830         appropriate, get rid of all the fmtstr temporaries, move conditionals
15831         with G_() wrapped string literals directly into fmtwarn arguments,
15832         cast dir.len to (int), formatting fixes.
15834 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15836         * doc/invoke.texi: Remove "Cilk Plus" references.
15838 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15839             Richard Biener  <rguenther@suse.de>
15841         PR ipa/84628
15842         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15843         for error or warning attributes if CALL_FROM_THUNK_P is set.
15844         Formatting fixes.
15846 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15848         PR target/56540
15849         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15850         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15852         PR target/56540
15853         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15854         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15856         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15857         instead of -1U in last predictors element's probability member.
15859 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15861         PR ipa/83983
15862         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15863         arguments if they are comparable.
15865 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15867         PR tree-optimization/84634
15868         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15869         masks and masked_loop_p with a single loop_masks, making sure it's
15870         null for bb vectorization.
15872 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15874         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15875         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15876         loop->force_vectorize to check whether there is no alias.
15878 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15880         PR target/84614
15881         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15882         prototypes.
15883         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15884         comments.
15885         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15886         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15887         instead of a loop around prev_real_insn.
15888         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15889         prev_real_insn.
15891         PR inline-asm/84625
15892         * config/i386/i386.c (ix86_print_operand): Use conditional
15893         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15894         zero vector.
15896 2018-03-02  Richard Biener  <rguenther@suse.de>
15898         PR tree-optimization/84427
15899         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15900         (bitmap_set_subtract_values): Rewrite to handle multiple
15901         exprs per value.
15902         (clean): Likewise.
15903         (prune_clobbered_mems): Likewise.
15904         (phi_translate): Take edge instead of pred/phiblock.
15905         (phi_translate_1): Likewise.
15906         (phi_translate_set): Likewise.  Insert all translated
15907         exprs for a value into the set, keeping possibly multiple
15908         expressions per value.
15909         (compute_antic_aux): Adjust for phi_translate changes.
15910         When intersecting union the expressions and prune those
15911         not in the final value set, keeping possibly multiple
15912         expressions per value.  Do not use value-insertion
15913         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15914         all expressions.  Add verification that the value-sets
15915         only shrink during iteration.
15916         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15917         (do_pre_regular_insertion): Likewise.
15918         (do_pre_partial_partial_insertion): Likewise.
15920 2018-03-02  Richard Biener  <rguenther@suse.de>
15922         PR target/82005
15923         * config/darwin.c (saved_debug_info_level): New static global.
15924         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15925         (darwin_asm_lto_end): Restore debug info generation settings.
15927 2018-03-01  Martin Liska  <mliska@suse.cz>
15929         PR sanitizer/82484
15930         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15931         volatile arguments.
15933 2018-03-01  Richard Biener  <rguenther@suse.de>
15935         PR debug/84645
15936         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15937         type annotation with LTO when debug was disabled at compile-time.
15939 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15941         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15942         XINT with INTVAL.
15943         (mips_final_postscan_insn): Likewise.
15945 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15947         PR rtl-optimization/84528
15948         * alias.c (init_alias_target): Add commentary.
15949         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15950         a unique base value if the frame pointer is not eliminated
15951         to the stack pointer.
15953 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15955         PR rtl-optimization/83327
15956         * lra-int.h (hard_regs_spilled_into): Declare.
15957         * lra.c (hard_regs_spilled_into): Define.
15958         (init_reg_info): Init hard_regs_spilled_into.
15959         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15960         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15961         (process_bb_lives): Handle hard_regs_spilled_into.
15962         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15963         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15965 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15967         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15968         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15969         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15970         * config/rs6000/aix72.h: New file.
15972 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15974         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15975         instead of warning_at with conditional singular and plural messages
15976         where possible.
15978         PR target/52991
15979         * stor-layout.c (update_alignment_for_field): For
15980         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15981         && !DECL_PACKED (field), do the alignment update, just use
15982         only desired_align instead of MAX (type_align, desired_align)
15983         as the alignment.
15984         (place_field): Don't do known_align < desired_align handling
15985         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15986         is non-NULL, instead do it after rli->prev_field handling and
15987         only if not within a bitfield word.  For DECL_PACKED (field)
15988         use type_align of BITS_PER_UNIT.
15990 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15992         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15993         superfluous parentheses and trailing spaces.
15995 2018-02-28  Richard Biener  <rguenther@suse.de>
15997         PR tree-optimization/84584
15998         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15999         SCoPs with fake exit edge.
16001 2018-02-28  Martin Liska  <mliska@suse.cz>
16003         PR testsuite/84597
16004         * timevar.c (timer::print): Fix format to properly print 100%
16005         values.
16007 2018-02-28  Richard Biener  <rguenther@suse.de>
16009         PR middle-end/84607
16010         * genmatch.c (capture_info::walk_match): Do not mark
16011         captured expressions without operands as expr_p given
16012         they act more like predicates and should be subject to
16013         "lost tail" side-effect preserving.
16015 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
16017         PR rtl-optimization/81611
16018         * auto-inc-dec.c (attempt_change): Move dead note from
16019         mem_insn if it's the next use of regno
16020         (find_address): Take address use of reg holding
16021         non-incremented value.  Add parm to limit search to the named
16022         reg only.
16023         (merge_in_block): Attempt to use a mem insn that is the next
16024         use of the original regno.
16026 2018-02-27  Martin Sebor  <msebor@redhat.com>
16028         PR c++/83871
16029         * doc/invoke.texi (-Wmissing-attributes): New option.
16030         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
16032 2018-02-27  Martin Sebor  <msebor@redhat.com>
16034         PR translation/84207
16035         * diagnostic-core.h (warning_n, error_n, inform_n): Change
16036         n argument to unsigned HOST_WIDE_INT.
16037         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
16038         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
16039         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
16040         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
16042 2018-02-27  Richard Biener  <rguenther@suse.de>
16044         PR tree-optimization/84512
16045         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
16046         Do not use the estimate returned from record_stmt_cost for
16047         the scalar iteration cost but sum properly using add_stmt_cost.
16049 2018-02-27  Richard Biener  <rguenther@suse.de>
16051         PR tree-optimization/84466
16052         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16053         Adjust last change to less strictly validate use operands.
16055 2018-02-27  Martin Liska  <mliska@suse.cz>
16057         PR gcov-profile/84548
16058         * gcov.c (process_file): Allow partial overlap and consider it
16059         also as group functions.
16060         (output_lines): Properly calculate range of lines for a group.
16062 2018-02-27  Martin Liska  <mliska@suse.cz>
16064         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
16065         'ggc' suffixes.  Change first column width.
16066         (timer::print): Fix formatting of the column.
16068 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
16070         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
16071         preserve inline entry blocks for the sake of debug inline
16072         entry point markers alone.
16073         (remove_unused_locals): Suggest in comments a better place to
16074         force the preservation of inline entry blocks that are
16075         otherwise unused, but do not preserve them.
16077 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16079         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
16081 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16083         PR target/84039
16084         * config/i386/constraints.md (Bs): Replace
16085         ix86_indirect_branch_register with
16086         TARGET_INDIRECT_BRANCH_REGISTER.
16087         (Bw): Likewise.
16088         * config/i386/i386.md (indirect_jump): Likewise.
16089         (tablejump): Likewise.
16090         (*sibcall_memory): Likewise.
16091         (*sibcall_value_memory): Likewise.
16092         Peepholes of indirect call and jump via memory: Likewise.
16093         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
16094         (*sibcall_value_GOT_32): Likewise.
16095         * config/i386/predicates.md (indirect_branch_operand): Likewise.
16096         (GOT_memory_operand): Likewise.
16097         (call_insn_operand): Likewise.
16098         (sibcall_insn_operand): Likewise.
16099         (GOT32_symbol_operand): Likewise.
16100         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
16102 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16104         PR rtl-optimization/83496
16105         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16106         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16107         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16108         redundant insn, if any.
16109         (relax_delay_slots): Likewise.
16110         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16112 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16114         PR tree-optimization/83965
16115         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16116         that grouped statements are part of a reduction chain.  Return
16117         true if the statement is not marked as a reduction itself but
16118         is part of a group.
16119         (vect_recog_dot_prod_pattern): Don't check whether the statement
16120         is part of a group here.
16121         (vect_recog_sad_pattern): Likewise.
16122         (vect_recog_widen_sum_pattern): Likewise.
16124 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16126         PR debug/84545
16127         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16129 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16131         PR target/84530
16132         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16133         the bool argument.
16134         (ix86_output_indirect_function_return): New prototype.
16135         (ix86_split_simple_return_pop_internal): Likewise.
16136         * config/i386/i386.c (indirect_return_via_cx): New.
16137         (indirect_return_via_cx_bnd): Likewise.
16138         (indirect_thunk_name): Handle return va CX_REG.
16139         (output_indirect_thunk_function): Create alias for
16140         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16141         (ix86_output_indirect_jmp): Remove the bool argument.
16142         (ix86_output_indirect_function_return): New function.
16143         (ix86_split_simple_return_pop_internal): Likewise.
16144         * config/i386/i386.md (*indirect_jump): Don't pass false
16145         to ix86_output_indirect_jmp.
16146         (*tablejump_1): Likewise.
16147         (simple_return_pop_internal): Change it to define_insn_and_split.
16148         Call ix86_split_simple_return_pop_internal to split it for
16149         -mfunction-return=.
16150         (simple_return_indirect_internal): Call
16151         ix86_output_indirect_function_return instead of
16152         ix86_output_indirect_jmp.
16154 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16156         PR bootstrap/84405
16157         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16158         memset and value initialization afterwards.
16160 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16162         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16164 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16166         PR target/84521
16167         * common/config/aarch64/aarch64-common.c
16168         (aarch_option_optimization_table[]): Switch
16169         off fomit-frame-pointer
16171 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16172             Chung-Ju Wu  <jasonwucj@gmail.com>
16174         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16175         volatile memory.
16176         (store_multiple): Ditto.
16178 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16180         * config.gcc: Add --with-cpu support for nds32 target.
16181         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16182         * config/nds32/nds32.opt: Add -mcpu= option.
16184 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16186         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16187         isel=yes): Warn for these deprecated options.
16189 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16191         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16192         ISA_2_5_MASKS_EMBEDDED.
16194 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16196         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16197         p->max as pointers rather than using iterative_hash_expr.
16199 2018-02-23  Carl Love  <cel@us.ibm.com>
16201         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16202         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16203         BU_P8V_OVERLOAD_2.
16204         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16205         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16206         P8V_BUILTIN_VEC_VUNSIGNED2.
16208 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16210         PR target/81572
16211         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16212         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16213         LRA_UNKNOWN_ALT.
16214         * lra-constraints.c (curr_insn_transform): Set up
16215         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16216         LRA_UNKNOWN_ALT.
16217         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16218         * lra-eliminations.c (spill_pseudos): Ditto.
16219         (process_insn_for_elimination): Ditto.
16220         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16221         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16222         LRA_NON_CLOBBERED_ALT.
16224 2018-02-22  Martin Sebor  <msebor@redhat.com>
16226         PR tree-optimization/84480
16227         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16228         to maybe_diag_stxncpy_trunc.  Call it.
16229         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16230         from gimple_fold_builtin_strcpy.  Print inlining stack.
16231         (handle_builtin_stxncpy): Print inlining stack.
16232         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16234 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16236         PR target/84176
16237         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16238         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16239         and -fcheck-pointer-bounds are used together.
16240         (indirect_thunk_prefix): New enum.
16241         (indirect_thunk_need_prefix): New function.
16242         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16243         "_nt" instead of "_bnd" for NOTRACK prefix.
16244         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16245         (output_indirect_thunk_function): Likewise.
16246         (): Likewise.
16247         (ix86_code_end): Update output_indirect_thunk_function calls.
16248         (ix86_output_indirect_branch_via_reg): Replace
16249         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16250         (ix86_output_indirect_branch_via_push): Likewise.
16251         (ix86_output_function_return): Likewise.
16252         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16253         incompatible with -fcf-protection=branch and
16254         -fcheck-pointer-bounds.
16256 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16258         PR target/83335
16259         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16260         Change gcc_assert call to output_operand_lossage.
16262 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16264         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16266 2018-02-22  DJ Delorie  <dj@redhat.com>
16267             Sebastian Perta  <sebastian.perta@renesas.com>
16268             Oleg Endo  <olegendo@gcc.gnu.org>
16270         * config/rx/rx.c (rx_rtx_costs): New function.
16271         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16273 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16275         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16277 2018-02-22  Martin Liska  <mliska@suse.cz>
16279         PR driver/83193
16280         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16281         Add "native" as a possible value.
16283 2018-02-22  Martin Liska  <mliska@suse.cz>
16285         PR driver/83193
16286         * config/i386/i386.c (ix86_option_override_internal):
16287         Add "native" as a possible value for -march and -mtune.
16289 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16291         PR target/84502
16292         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16293         to all type variants.
16295         PR tree-optimization/84503
16296         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16297         width as info->bitpos + info->bitsize - start.
16298         (merged_store_group::merge_overlapping): Simplify width computation.
16299         (check_no_overlap): New function.
16300         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16301         start + width and last_order of the group, fail if check_no_overlap
16302         fails.
16303         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16304         to group if check_no_overlap fails.
16306 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16308         * config/rs6000/altivec.md: Delete contraint arguments to
16309         define_expand, define_split, and define_peephole2, and in
16310         define_insn_and_split if always unused.
16311         * config/rs6000/darwin.md: Ditto.
16312         * config/rs6000/dfp.md: Ditto.
16313         * config/rs6000/rs6000.md: Ditto.
16314         * config/rs6000/sync.md: Ditto.
16315         * config/rs6000/vector.md: Ditto.
16316         * config/rs6000/vsx.md: Ditto.
16318 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16320         * config/rs6000/altivec.md: Write output control strings as braced
16321         blocks instead of double-quoted strings.
16322         * config/rs6000/darwin.md: Ditto.
16323         * config/rs6000/rs6000.md: Ditto.
16324         * config/rs6000/vector.md: Ditto.
16325         * config/rs6000/vsx.md: Ditto.
16327 2018-02-21  Jason Merrill  <jason@redhat.com>
16329         PR c++/84314 - ICE with templates and fastcall attribute.
16330         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16332 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16334         * ipa-cp.c (determine_versionability): Fix comment typos.
16336 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16338         PR c/84229
16339         * ipa-cp.c (determine_versionability): Do not version functions caling
16340         va_arg_pack.
16342 2018-02-21  Martin Liska  <mliska@suse.cz>
16344         PR driver/83193
16345         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16346         Add "native" as a possible value.
16347         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16348         the macro when native cpu detection is available.
16350 2018-02-21  Martin Liska  <mliska@suse.cz>
16352         PR driver/83193
16353         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16354         Add "native" as a possible value.
16355         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16356         when native cpu detection is available.
16358 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16359             Martin Sebor  <msebor@redhat.com>
16361         PR tree-optimization/84478
16362         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16363         false.
16364         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16365         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16366         support which is conservatively correct, for 2 only stay conservative
16367         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16368         argument to the 2 argument get_range_strlen, adjust 6 arg
16369         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16370         false.
16371         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16372         (gimple_fold_builtin_strlen): Pass true as last argument to
16373         get_range_strlen.
16375 2018-02-20  Martin Sebor  <msebor@redhat.com>
16377         PR middle-end/84095
16378         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16379         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16380         (builtin_memref::builtin_memref): Factor out parts into
16381         set_base_and_offset and call it.
16383 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16385         PR middle-end/84406
16386         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16387         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16388         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16389         search at the associated MODE_INT.
16391 2018-02-20  Jeff Law  <law@redhat.com>
16393         PR middle-end/82123
16394         PR tree-optimization/81592
16395         PR middle-end/79257
16396         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16397         for range data rather than using global data.
16398         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16399         range data rather than using global data.
16400         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16401         pass it to children as needed.
16402         (struct directive::fmtresult): Similarly.
16403         (struct directive::set_width): Similarly.
16404         (struct directive::set_precision): Similarly.
16405         (format_integer, format_directive, parse_directive): Similarly.
16406         (format_none): Accept unnamed vr_values parameter.
16407         (format_percent, format_floating, format_character): Similarly.
16408         (format_string, format_plain): Similarly.
16409         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16410         the EVRP range analyzer for range data rather than using global data.
16411         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16412         gimple-ssa-evrp-analyze.h
16413         (class sprintf_dom_walker): Add after_dom_children member function.
16414         Add evrp_range_analyzer member.
16415         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16416         range analyzer as needed.
16417         (sprintf_dom_walker::after_dom_children): New member function.
16418         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16419         if not optimizing.
16420         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16421         (evrp_range_analyzer::pop_to_marker): Likewise.
16423 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16425         PR tree-optimization/84419
16426         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16427         with the required type if its current type is compatible but
16428         different.
16430 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16432         PR middle-end/82004
16433         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16434         after vectorization.
16436 2018-02-20  Martin Liska  <mliska@suse.cz>
16438         PR driver/83193
16439         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16440         possible values if we don't have a hint.
16442 2018-02-20  Martin Liska  <mliska@suse.cz>
16444         PR c/84310
16445         PR target/79747
16446         * final.c (shorten_branches): Build align_tab array with one
16447         more element.
16448         * opts.c (finish_options): Add alignment option limit check.
16449         (MAX_CODE_ALIGN): Likewise.
16450         (MAX_CODE_ALIGN_VALUE): Likewise.
16451         * doc/invoke.texi: Document maximum allowed option value for
16452         all -falign-* options.
16454 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16456         PR target/84146
16457         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16458         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16459         * var-tracking.c (emit_note_insn_var_location): Remove all references
16460         to NOTE_INSN_CALL_ARG_LOCATION.
16461         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16462         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16463         Use copy_rtx_if_shared.
16464         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16465         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16466         (dwarf2out_var_location): Remove handling of
16467         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16468         on call_insn.
16469         * final.c (final_scan_insn): Remove all references to
16470         NOTE_INSN_CALL_ARG_LOCATION.
16471         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16472         before dumping final insns.
16473         * except.c (emit_note_eh_region_end): Remove all references to
16474         NOTE_INSN_CALL_ARG_LOCATION.
16475         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16476         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16477         * config/arc/arc.c (hwloop_optimize): Likewise.
16478         * config/arm/arm.c (create_fix_barrier): Likewise.
16479         * config/s390/s390.c (s390_chunkify_start): Likewise.
16480         * config/sh/sh.c (find_barrier): Likewise.
16481         * config/i386/i386.c (rest_of_insert_endbranch,
16482         ix86_seh_fixup_eh_fallthru): Likewise.
16483         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16484         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16485         * config/frv/frv.c (frv_function_prologue): Likewise.
16486         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16487         reg note.
16488         (note_outside_basic_block_p): Remove all references to
16489         NOTE_INSN_CALL_ARG_LOCATION.
16490         * gengtype.c (adjust_field_rtx_def): Likewise.
16491         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16492         Likewise.
16493         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16494         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16496         PR c++/84444
16497         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16498         is ADDR_EXPR.
16500         PR tree-optimization/84452
16501         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16502         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16503         is NULL.
16505 2018-02-19  Martin Liska  <mliska@suse.cz>
16507         PR sanitizer/82183
16508         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16510 2018-02-19  Martin Liska  <mliska@suse.cz>
16511             Richard Sandiford  <richard.sandiford@linaro.org>
16513         PR tree-optimization/82491
16514         * gimple-fold.c (get_base_constructor): Make earlier bail out
16515         to prevent ubsan.
16517 2018-02-19  Carl Love  <cel@us.ibm.com>
16519         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16520         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16521         BU_P8V_OVERLOAD_1.
16522         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16523         P8V_BUILTIN_VEC_NEG.
16525 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16527         * config/rl78/rl78.md (movdf): New define expand.
16529 2018-02-19  Martin Liska  <mliska@suse.cz>
16531         PR other/80589
16532         * doc/invoke.texi: Fix typo.
16533         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16535 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16537         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16538         handle rs6000_single_float and rs6000_double_float specially for
16539         e500 family CPUs.
16541 2018-02-16  Jeff Law  <law@redhat.com>
16543         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16544         (pop_regs): Use it.
16546 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16548         PR ipa/84425
16549         * ipa-inline.c (inline_small_functions): Fix a typo.
16551 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16553         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16555 2018-02-16  Carl Love  <cel@us.ibm.com>
16557         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16558         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16559         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16560         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16561         expansion to P8V_BUILTIN_VEC_FLOAT2.
16563 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16565         PR rtl-optimization/70023
16566         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16567         src_regno into account.
16569 2018-02-16  Carl Love  <cel@us.ibm.com>
16571         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16572         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16573         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16574         * config/rs6000/rs6000.c: Remove case statements for
16575         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16576         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16577         and P9V_BUILTIN_VEC_VINSERT4B.
16578         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16579         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16580         * config/rs6000/vsx.md:
16581         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16582         vec_insert4b.
16584 2018-02-16  Carl Love  <cel@us.ibm.com>
16586         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16587         vec_insert4b.
16588         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16589         definitions.
16590         * config/rs6000/rs6000-c.c: Add the definitions for
16591         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16592         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16593         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16594         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16595         definition for insert4b and define insn *insert3b_internal.
16596         * doc/extend.texi: Add documentation for vec_extract4b.
16598 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16600         * doc/extend.texi (Backwards Compatibility): Mention friend
16601         injection.  Note for-scope is deprecated.
16602         * doc/invoke.texi (-ffriend-injection): Deprecate.
16604 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16606         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16607         that moved to I2, also allow destinations that are a paradoxical
16608         subreg (instead of a normal reg).
16610 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16612         PR target/83831
16613         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16614         to QImode.
16616 2018-02-16  Richard Biener  <rguenther@suse.de>
16618         PR tree-optimization/84037
16619         PR tree-optimization/84016
16620         PR target/82862
16621         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16622         Adjust vec_construct for the fact we need additional higher latency
16623         128bit inserts for AVX256 and AVX512 vector builds.
16624         (ix86_add_stmt_cost): Scale vector construction cost for
16625         elementwise loads.
16627 2018-02-16  Richard Biener  <rguenther@suse.de>
16629         PR tree-optimization/84417
16630         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16631         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16632         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16634 2018-02-16  Martin Liska  <mliska@suse.cz>
16636         PR sanitizer/84307
16637         * internal-fn.def (ASAN_CHECK): Set proper flags.
16638         (ASAN_MARK): Likewise.
16640 2018-02-16  Julia Koval  <julia.koval@intel.com>
16642         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16643         from PTA_CANNONLAKE.
16645 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16647         PR target/84272
16648         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16649         Use ++iter rather than iter++ for std::list iterators.
16650         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16651         defer deleting them until all nodes in the forest are processed.  Do
16652         free even leaf nodes.  Change to_process into auto_vec.
16654         PR bootstrap/84405
16655         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16656         * vec.h (vec_default_construct): Use memset instead of placement new
16657         if BROKEN_VALUE_INITIALIZATION is defined.
16658         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16659         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16660         is defined.
16662         PR rtl-optimization/83723
16663         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16664         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16665         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16666         recursive calls.
16667         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16668         callers.
16669         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16671 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16673         PR rtl-optimization/81443
16674         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16675         from inner REGs to paradoxical SUBREGs.
16677 2018-02-16  Richard Biener  <rguenther@suse.de>
16679         PR tree-optimization/84399
16680         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16681         For operands we can analyze at their definition make sure we can
16682         analyze them at each use as well.
16684 2018-02-16  Richard Biener  <rguenther@suse.de>
16686         PR tree-optimization/84190
16687         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16688         volatile accesses if the decl isn't volatile.
16690 2018-02-15  Jason Merrill  <jason@redhat.com>
16692         PR c++/84314 - ICE with templates and fastcall attribute.
16693         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16694         TYPE_CANONICAL on an existing type.
16696 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16698         PR tree-optimization/84383
16699         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16700         dstoff nor call operand_equal_p if dstbase is NULL.
16702         PR tree-optimization/84334
16703         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16704         also a CONSTANT_CLASS_P, punt.
16706 2018-02-14  Jim Wilson  <jimw@sifive.com>
16708         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16709         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16710         to where locals are set.  Add TARGET_RVC support.
16711         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16713 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16715         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16717 2018-02-14  Martin Sebor  <msebor@redhat.com>
16719         PR tree-optimization/83698
16720         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16721         arrays constrain the offset range to their bounds.
16722         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16723         (builtin_access::overlap): Avoid setting the size of overlap if it's
16724         already been set.
16725         (maybe_diag_overlap): Also consider arrays when deciding what values
16726         of offsets to include in diagnostics.
16728 2018-02-14  Martin Sebor  <msebor@redhat.com>
16730         PR c/84108
16731         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16732         that correspond to the kind of a declaration.
16734 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16736         PR target/83984
16737         * config/pa/pa.md: Load address of PIC label using the linkage table
16738         if the label is nonlocal.
16740 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16742         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16743         warning message if user requests -maltivec=be.
16744         * doc/invoke.texi: Document deprecation of -maltivec=be.
16746 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16748         PR target/84220
16749         * config/rs6000/rs6000-c.c: Update definitions for
16750         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16751         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16753 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16755         PR target/84239
16756         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16757         add _get_ssp intrinsics. Remove argument from
16758         __builtin_ia32_rdssp[d|q].
16759         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16760         * config/i386/i386-builtin.def: Remove argument from
16761         __builtin_ia32_rdssp[d|q].
16762         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16763         ix86_expand_special_args_builtin for _rdssp[d|q].
16764         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16765         Clear register before usage.
16766         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16767         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16769 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16771         PR tree-optimization/84357
16772         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16773         operand 1 of an ARRAY_REF too.
16775 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16777         PR target/83831
16778         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16779         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16780         declarations.
16781         (set_of_reg): New struct.
16782         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16783         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16784         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16785         functions.
16786         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16787         Split into bitclr, bitset, bitinvert patterns if appropriate.
16788         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16789         use rx_fuse_in_memory_bitop.
16790         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16791         to named insn, correct maximum insn length.
16793 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16795         PR target/79242
16796         * machmode.def: Define a complex mode for PARTIAL_INT.
16797         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16798         MODE_PARTIAL_INT.
16799         * doc/rtl.texi: Document CSPImode.
16800         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16801         handling.
16802         (msp430_hard_regno_nregs_with_padding): Likewise.
16804 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16806         PR target/84279
16807         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16809 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16811         PR rtl-optimization/84169
16812         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16813         we generated a parallel as new i3 and we split that to new i2 and i3
16814         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16815         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16816         those to i2, not i1.  Partially rewrite this scan code.
16818 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16820         PR c/82210
16821         * stor-layout.c (place_field): For variable length fields, adjust
16822         offset_align afterwards not just based on the field's alignment,
16823         but also on the size.
16825         PR middle-end/84309
16826         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16827         of exps and logs in the use_exp2 case.
16829 2018-02-13  Jeff Law  <law@redhat.com>
16831         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16832         entry for "vector".
16834         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16835         ARGS as unused.
16837 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16839         PR debug/84342
16840         PR debug/84319
16841         * common.opt (gas-loc-support, gas-locview-support): New.
16842         (ginline-points, ginternal-reset-location-views): New.
16843         * doc/invoke.texi: Document them.  Use @itemx where intended.
16844         (gvariable-location-views): Adjust.
16845         * target.def (reset_location_view): New.
16846         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16847         (TARGET_RESET_LOCATION_VIEW): New.
16848         * doc/tm.texi: Rebuilt.
16849         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16850         (dwarf2out_default_as_locview_support): New.
16851         (output_asm_line_debug_info): Use option variables.
16852         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16853         (output_loc_list): Likewise.
16854         (add_high_low_attributes): Check option variables.
16855         Don't output entry view attribute in strict mode.
16856         (gen_inlined_subroutine_die): Check option variables.
16857         (dwarf2out_inline_entry): Likewise.
16858         (init_sections_and_labels): Likewise.
16859         (dwarf2out_early_finish): Likewise.
16860         (maybe_reset_location_view): New, from...
16861         (dwarf2out_var_location): ... here.  Call it.
16862         * debug.h (dwarf2out_default_as_loc_support): Declare.
16863         (dwarf2out_default_as_locview_support): Declare.
16864         * hooks.c (hook_int_rtx_insn_0): New.
16865         * hooks.h (hook_int_rtx_insn_0): Declare.
16866         * toplev.c (process_options): Take -gas-loc-support and
16867         -gas-locview-support from dwarf2out.  Enable
16868         -gvariable-location-views by default only with locview
16869         assembler support.  Enable -ginternal-reset-location-views by
16870         default only if the target defines the corresponding hook.
16871         Enable -ginline-points by default if location views are
16872         enabled; force it disabled if statement frontiers are
16873         disabled.
16874         * tree-inline.c (expand_call_inline): Check option variables.
16875         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16877 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16879         PR tree-optimization/84321
16880         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16881         handling.  Also check whether the anti-range contains any values
16882         that satisfy the mask; switch to a VR_RANGE if not.
16884 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16886         PR sanitizer/84340
16887         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16889 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16891         PR c++/83990
16892         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16893         of call statements, also set location of a load to a temporary.
16895 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16897         * config/rl78/rl78.c (add_vector_labels): New function.
16898         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16899         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16900         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16901         which checks that no arguments are passed.
16902         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16903         * doc/extend.texi: Documentation for the new attribute.
16905 2018-02-13  Andreas Schwab  <schwab@suse.de>
16907         * config/riscv/linux.h (CPP_SPEC): Define.
16909 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16911         PR target/84335
16912         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16913         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16914         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16915         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16916         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16917         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16918         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16919         temporarily for AES and PCLMUL builtins.
16921         PR tree-optimization/84339
16922         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16923         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16924         Formatting fixes.
16926         PR middle-end/84309
16927         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16928         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16929         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16930         inline function.
16931         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16932         inline function.
16933         * omp-simd-clone.h: New file.
16934         * omp-simd-clone.c: Include omp-simd-clone.h.
16935         (expand_simd_clones): No longer static.
16936         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16937         cgraph.h and omp-simd-clone.h.
16938         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16939         (vect_recog_widen_shift_pattern): Formatting fix.
16940         (vect_pattern_recog_1): Don't check optab for calls.
16942         PR target/84336
16943         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16944         operands[2] into a REG before using gen_lowpart on it.
16946 2018-02-12  Jeff Law  <law@redhat.com>
16948         PR target/83760
16949         * config/sh/sh.c (find_barrier): Consider a sibling call
16950         a barrier as well.
16952         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16953         successfully back substituting a reg.
16955 2018-02-12  Richard Biener  <rguenther@suse.de>
16957         PR tree-optimization/84037
16958         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16959         parameter, move visited init to caller.
16960         (vect_slp_analyze_operations): Separate cost from validity
16961         check, initialize visited once for all instances.
16962         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16963         for all instances.
16964         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16965         out an assert.
16966         (vect_model_promotion_demotion_cost): Likewise.
16967         (vectorizable_bswap): Guard cost modeling with !slp_node
16968         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16969         SLP stmts.
16970         (vectorizable_call): Likewise.
16971         (vectorizable_conversion): Likewise.
16972         (vectorizable_assignment): Likewise.
16973         (vectorizable_shift): Likewise.
16974         (vectorizable_operation): Likewise.
16975         (vectorizable_store): Likewise.
16976         (vectorizable_load): Likewise.
16977         (vectorizable_condition): Likewise.
16978         (vectorizable_comparison): Likewise.
16980 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16982         PR sanitizer/84307
16983         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16984         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16985         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16987 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16989         PR middle-end/83665
16990         * params.def (inline-min-speedup): Increase from 8 to 15.
16991         (max-inline-insns-auto): Decrease from 40 to 30.
16992         * ipa-split.c (consider_split): Add some buffer for function to
16993         be considered inlining candidate.
16994         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16995         default values.
16997 2018-02-12  Richard Biener  <rguenther@suse.de>
16999         PR tree-optimization/84037
17000         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
17001         matched stmts if we cannot swap the non-matched ones.
17003 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17005         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
17006         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
17007         _mm_maskz_scalef_round_ss): New intrinsics.
17008         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
17009         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
17010         __builtin_ia32_scalefss_round): Remove.
17011         (__builtin_ia32_scalefsd_mask_round,
17012         __builtin_ia32_scalefss_mask_round): New intrinsics.
17013         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
17014         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
17015         ((match_operand:VF_128 2 "<round_nimm_predicate>"
17016         "<round_constraint>")): Changed to ...
17017         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
17018         "<round_scalar_constraint>")): ... this.
17019         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
17020         %0, %1, %2<round_op3>}"): Changed to ...
17021         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
17022         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
17023         %2<round_scalar_mask_op3>}"): ... this.
17024         * config/i386/subst.md (round_scalar_nimm_predicate): New.
17026 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
17028         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
17029         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
17030         (_mm_maskz_sqrt_round_ss): New intrinsics.
17031         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
17032         (__builtin_ia32_sqrtsd_mask_round)
17033         (__builtin_ia32_sqrtss_mask_round): New builtins.
17034         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
17035         (__builtin_ia32_sqrtss_round): Remove.
17036         (__builtin_ia32_sqrtsd_mask_round)
17037         (__builtin_ia32_sqrtss_mask_round): New builtins.
17038         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
17039         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
17040         ((match_operand:VF_128 1 "vector_operand"
17041         "xBm,<round_constraint>")): Changed to ...
17042         ((match_operand:VF_128 1 "vector_operand"
17043         "xBm,<round_scalar_constraint>")): ... this.
17044         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
17045         %0, %2, %<iptr>1<round_op3>}): Changed to ...
17046         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
17047         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
17048         %<iptr>1<round_scalar_mask_op3>}): ... this.
17049         ((set_attr "prefix" "<round_prefix>")): Changed to ...
17050         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
17052 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
17054         PR target/84266
17055         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
17056         Cast vec_cmpeq result to correct type.
17057         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
17058         Cast vec_cmpgt result to correct type.
17060 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
17062         * final.c (final_scan_insn_1): Renamed from...
17063         (final_scan_insn): ... this.  New wrapper, to recover
17064         seen from the outermost call in recursive ones.
17065         * config/sparc/sparc.c (output_return): Drop seen from call.
17066         (output_sibcall): Likewise.
17067         * config/visium/visium.c (output_branch): Likewise.
17069 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
17071         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
17072         function label.
17074 2018-02-10  Alan Modra  <amodra@gmail.com>
17076         PR target/84300
17077         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
17078         Specify LR as an input.
17080 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
17082         PR sanitizer/83987
17083         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
17084         remove_member_access_dummy_vars): New functions.
17085         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
17086         lower_omp_1, execute_lower_omp): Use them.
17088         PR rtl-optimization/84308
17089         * shrink-wrap.c (spread_components): Release todo vector.
17091 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
17093         PR rtl-optimization/57193
17094         * ira-color.c (struct allocno_color_data): Add member
17095         conflict_allocno_hard_prefs.
17096         (update_conflict_allocno_hard_prefs): New.
17097         (bucket_allocno_compare_func): Add a preference based on
17098         conflict_allocno_hard_prefs.
17099         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
17100         (color_allocnos): Remove a dead code.  Initiate
17101         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17103 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17105         PR target/84226
17106         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17107         constraint from =wa to wa.  Avoid a subreg on the output operand,
17108         instead use a pseudo and subreg it in a move.
17109         (p9_xxbrd_<mode>): Changed to ...
17110         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17111         (p9_xxbrd_v2df): New expander.
17112         (p9_xxbrw_<mode>): Changed to ...
17113         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17114         (p9_xxbrw_v4sf): New expander.
17116 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17118         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17120 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17122         PR target/83926
17123         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17124         multiply in 32-bit mode.
17125         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17126         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17127         mode.
17129 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17131         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17132         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17133         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17134         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17136 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17138         PR lto/84213
17139         * dwarf2out.c (is_trivial_indirect_ref): New function.
17140         (dwarf2out_late_global_decl): Do not generate a location
17141         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17142         and that are not defined in the current unit.
17144 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17146         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17147         instead of a libcall for UNORDERED.
17149 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17151         PR target/82641
17152         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17153         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17155 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17157         PR target/PR84295
17158         * config/s390/s390.c (s390_set_current_function): Invoke
17159         s390_indirect_branch_settings also if fndecl didn't change.
17161 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17163         * config/rs6000/rs6000.md (blockage): Set length to zero.
17165 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17167         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17169 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17171         PR sanitizer/84285
17172         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17173         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17174         -static-lib*san.
17176         PR debug/84252
17177         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17178         PARALLEL incoming that failed vt_get_decl_and_offset check.
17180         PR middle-end/84237
17181         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17182         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17183         TREE_READONLY bit.
17184         (get_variable_section): For decls in named .bss* sections pass true as
17185         second argument to bss_initializer_p.
17187 2018-02-09  Marek Polacek  <polacek@redhat.com>
17188             Jakub Jelinek  <jakub@redhat.com>
17190         PR c++/83659
17191         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17192         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17193         Sync some changes from cxx_fold_indirect_ref.
17195 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17197         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17198         markers.
17199         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17200         (BLOCK_INLINE_ENTRY_LABEL): New.
17201         (dwarf2out_var_location): Disregard inline entry markers.
17202         (inline_entry_data): New struct.
17203         (inline_entry_data_hasher): New hashtable type.
17204         (inline_entry_data_hasher::hash): New.
17205         (inline_entry_data_hasher::equal): New.
17206         (inline_entry_data_table): New variable.
17207         (add_high_low_attributes): Add DW_AT_entry_pc and
17208         DW_AT_GNU_entry_view attributes if a pending entry is found
17209         in inline_entry_data_table.  Add old entry_pc attribute only
17210         if debug nonbinding markers are disabled.
17211         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17212         markers are enabled.
17213         (block_within_block_p, dwarf2out_inline_entry): New.
17214         (dwarf2out_finish): Check that no entries remained in
17215         inline_entry_data_table.
17216         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17217         (final_scan_insn, notice_source_line): Likewise.
17218         (rest_of_clean_state): Skip inline entry markers.
17219         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17220         markers.
17221         * gimple.c (gimple_build_debug_inline_entry): New.
17222         * gimple.h (enum gimple_debug_subcode): Add
17223         GIMPLE_DEBUG_INLINE_ENTRY.
17224         (gimple_build_debug_inline_entry): Declare.
17225         (gimple_debug_inline_entry_p): New.
17226         (gimple_debug_nonbind_marker_p): Adjust.
17227         * insn-notes.def (INLINE_ENTRY): New.
17228         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17229         inline entry marker notes.
17230         (print_insn): Likewise.
17231         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17232         (INSN_DEBUG_MARKER_KIND): Likewise.
17233         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17234         * tree-inline.c (expand_call_inline): Build and insert
17235         debug_inline_entry stmt.
17236         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17237         inline entry blocks early, if nonbind markers are enabled.
17238         (dump_scope_block): Dump fragment info.
17239         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17240         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17241         (gimple_build_debug_inline_entry): New.
17242         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17243         Enable/disable inline entry points too.
17244         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17245         (DEBUG_INSN): Describe inline entry markers.
17247         * common.opt (gvariable-location-views): New.
17248         (gvariable-location-views=incompat5): New.
17249         * config.in: Rebuilt.
17250         * configure: Rebuilt.
17251         * configure.ac: Test assembler for view support.
17252         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17253         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17254         * dwarf2out.c (var_loc_view): New typedef.
17255         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17256         (dwarf2out_locviews_in_attribute): New.
17257         (dwarf2out_locviews_in_loclist): New.
17258         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17259         (enum dw_line_info_opcode): Add LI_adv_address.
17260         (struct dw_line_info_table): Add view.
17261         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17262         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17263         (zero_view_p): New variable.
17264         (ZERO_VIEW_P): New macro.
17265         (output_asm_line_debug_info): New.
17266         (struct var_loc_node): Add view.
17267         (add_AT_view_list, AT_loc_list): New.
17268         (add_var_loc_to_decl): Add view param.  Test it against last.
17269         (new_loc_list): Add view params.  Record them.
17270         (AT_loc_list_ptr): Handle loc and view lists.
17271         (view_list_to_loc_list_val_node): New.
17272         (print_dw_val): Handle dw_val_class_view_list.
17273         (size_of_die): Likewise.
17274         (value_format): Likewise.
17275         (loc_list_has_views): New.
17276         (gen_llsym): Set vl_symbol too.
17277         (maybe_gen_llsym, skip_loc_list_entry): New.
17278         (dwarf2out_maybe_output_loclist_view_pair): New.
17279         (output_loc_list): Output view list or entries too.
17280         (output_view_list_offset): New.
17281         (output_die): Handle dw_val_class_view_list.
17282         (output_dwarf_version): New.
17283         (output_compilation_unit_header): Use it.
17284         (output_skeleton_debug_sections): Likewise.
17285         (output_rnglists, output_line_info): Likewise.
17286         (output_pubnames, output_aranges): Update version comments.
17287         (output_one_line_info_table): Output view numbers in asm comments.
17288         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17289         Call maybe_gen_llsym.
17290         (loc_list_from_tree_1): Adjust.
17291         (add_AT_location_description): Create view list attribute if
17292         needed, check it's absent otherwise.
17293         (convert_cfa_to_fb_loc_list): Adjust.
17294         (maybe_emit_file): Call output_asm_line_debug_info for test.
17295         (dwarf2out_var_location): Reset views as needed.  Precompute
17296         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17297         attribute.  Set view.
17298         (new_line_info_table): Reset next view.
17299         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17300         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17301         the assembler, or select appropriate line info opcodes.
17302         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17303         (optimize_string_length): Catch it.  Adjust.
17304         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17305         dw_val_class_view_list, and remove it if no longer needed.
17306         (hash_loc_list): Hash view numbers.
17307         (loc_list_hasher::equal): Compare them.
17308         (optimize_location_lists): Check whether a view list symbol is
17309         needed, and whether the locview attribute is present, and
17310         whether they match.  Remove the locview attribute if no longer
17311         needed.
17312         (index_location_lists): Call skip_loc_list_entry for test.
17313         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17314         Use output_dwarf_version.
17315         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17316         (struct dw_val_node): Add val_view_list.
17317         * final.c (SEEN_NEXT_VIEW): New.
17318         (set_next_view_needed): New.
17319         (clear_next_view_needed): New.
17320         (maybe_output_next_view): New.
17321         (final_start_function): Rename to...
17322         (final_start_function_1): ... this.  Take pointer to FIRST,
17323         add SEEN parameter.  Emit param bindings in the initial view.
17324         (final_start_function): Reintroduce SEEN-less interface.
17325         (final): Rename to...
17326         (final_1): ... this.  Take SEEN parameter.  Output final pending
17327         next view at the end.
17328         (final): Reintroduce seen-less interface.
17329         (final_scan_insn): Output pending next view before switching
17330         sections or ending a block.  Mark the next view as needed when
17331         outputting variable locations.  Notify debug backend of section
17332         changes, and of location view changes.
17333         (rest_of_handle_final): Adjust.
17334         * toplev.c (process_options): Autodetect value for debug variable
17335         location views option.  Warn on incompat5 without -gdwarf-5.
17336         * doc/invoke.texi (gvariable-location-views): New.
17337         (gvariable-location-views=incompat5): New.
17338         (gno-variable-location-views): New.
17340 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17342         PR tree-optimization/84136
17343         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17344         that the result of find_edge is non-NULL.
17346 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17348         PR target/83008
17349         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17350         storing integer register in SImode.  Fix cost of 256 and 512
17351         byte aligned SSE register store.
17353 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17355         * config/i386/i386.c (ix86_multiplication_cost): Fix
17356         multiplication cost for TARGET_AVX512DQ.
17358 2018-02-08  Marek Polacek  <polacek@redhat.com>
17360         PR tree-optimization/84238
17361         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17362         get_range_strlen.
17364 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17366         PR tree-optimization/84265
17367         * tree-vect-stmts.c (vectorizable_store): Don't treat
17368         VMAT_CONTIGUOUS accesses as grouped.
17369         (vectorizable_load): Likewise.
17371 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17373         PR tree-optimization/81635
17374         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17375         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17376         (test_round_for_mask): New functions.
17377         (wide_int_cc_tests): Call test_round_for_mask.
17378         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17379         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17380         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17381         range returned by get_range_info.
17383 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17385         PR ipa/81360
17386         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17387         * symtab.c: Include builtins.h
17388         (symtab_node::output_to_lto_symbol_table_p): Move here
17389         from lto-streamer-out.c:output_symbol_p.
17390         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17391         (output_symbol_p): Move all logic to symtab.c
17392         (produce_symtab): Update.
17394 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17396         * config/s390/s390-opts.h (enum indirect_branch): Define.
17397         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17398         (s390_indirect_branch_via_thunk)
17399         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17400         (enum s390_indirect_branch_type): Define.
17401         * config/s390/s390.c (struct s390_frame_layout, struct
17402         machine_function): Remove.
17403         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17404         (indirect_branch_table_label_no, indirect_branch_table_name):
17405         Define variables.
17406         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17407         (enum s390_indirect_branch_option): Define.
17408         (s390_return_addr_from_memory): New function.
17409         (s390_handle_string_attribute): New function.
17410         (s390_attribute_table): Add new attribute handler.
17411         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17412         (s390_indirect_branch_via_thunk): New function.
17413         (s390_indirect_branch_via_inline_thunk): New function.
17414         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17415         sibling call optimization for non z10 compiles.
17416         (s390_emit_call): Force indirect branch target to be a single
17417         register.  Add r1 clobber for non-z10 compiles.
17418         (s390_emit_epilogue): Emit return jump via return_use expander.
17419         (s390_reorg): Handle JUMP_INSNs as execute targets.
17420         (s390_option_override_internal): Perform validity checks for the
17421         new command line options.
17422         (s390_indirect_branch_attrvalue): New function.
17423         (s390_indirect_branch_settings): New function.
17424         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17425         (s390_output_indirect_thunk_function):  New function.
17426         (s390_code_end): Implement target hook.
17427         (s390_case_values_threshold): Implement target hook.
17428         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17429         macros.
17430         * config/s390/s390.h (struct s390_frame_layout)
17431         (struct machine_function): Move here from s390.c.
17432         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17433         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17434         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17435         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17436         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17437         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17438         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17439         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17440         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17441         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17442         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17443         (mnemonic attribute): Add values which aren't recognized
17444         automatically.
17445         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17446         pattern for branch conversion.  Fix mnemonic attribute.
17447         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17448         indirect branch via thunk if requested.
17449         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17450         ("*indirect_jump"): Disable for branch conversion using out of
17451         line thunks.
17452         ("indirect_jump_via_thunk<mode>_z10")
17453         ("indirect_jump_via_thunk<mode>")
17454         ("indirect_jump_via_inlinethunk<mode>_z10")
17455         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17456         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17457         ("casesi_jump_via_inlinethunk<mode>_z10")
17458         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17459         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17460         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17461         ("*indirect2_jump"): Disable for branch conversion.
17462         ("casesi_jump"): Turn into expander and expand patterns for branch
17463         conversion.
17464         ("return_use"): New expander.
17465         ("*return"): Emit return via thunk and rename it to ...
17466         ("*return<mode>"): ... this one.
17467         * config/s390/s390.opt: Add new options and and enum for the
17468         option values.
17470 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17472         * lra-constraints.c (match_reload): Unconditionally use
17473         gen_lowpart_SUBREG, rather than selecting between that
17474         and equivalent gen_rtx_SUBREG code.
17476 2018-02-08  Richard Biener  <rguenther@suse.de>
17478         PR tree-optimization/84233
17479         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17480         changed flag instead of boguously re-using phi_inserted.
17482 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17484         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17485         static local variables.
17487 2018-02-08  Richard Biener  <rguenther@suse.de>
17489         PR tree-optimization/84278
17490         * tree-vect-stmts.c (vectorizable_store): When looking for
17491         smaller vector types to perform grouped strided loads/stores
17492         make sure the mode is supported by the target.
17493         (vectorizable_load): Likewise.
17495 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17497         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17498         Increase LDP/STP opportunities by adding adjacent callee-saves.
17500 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17502         PR rtl-optimization/84068
17503         PR rtl-optimization/83459
17504         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17506 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17508         PR tree-optimization/84224
17509         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17510         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17511         non-zero arguments.
17513 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17515         PR target/84113
17516         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17517         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17518         count, remove one USE.
17520 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17522         * doc/install.texi (Configuration): Document the
17523         --with-long-double-format={ibm,ieee} PowerPC configuration
17524         options.
17526         PR target/84154
17527         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17528         Convert from define_expand to be define_insn_and_split.  Rework
17529         float/double/_Float128 conversions to QI/HI/SImode to work with
17530         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17531         conversions to QI/HImode types did a store and then a load to
17532         truncate the value.  For conversions to VSX registers, don't split
17533         the insn, instead emit the code directly.  Use the code iterator
17534         any_fix to combine signed and unsigned conversions.
17535         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17536         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17537         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17538         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17539         (fix_<mode>di2_hw): Likewise.
17540         (fixuns_<mode>di2_hw): Likewise.
17541         (fix_<mode>si2_hw): Likewise.
17542         (fixuns_<mode>si2_hw): Likewise.
17543         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17544         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17545         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17546         fix<uns>_trunc<SFDF:mode>si2_p8.
17547         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17548         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17549         (fix<uns>_<mode>_mem): Likewise.
17550         (fctiw<u>z_<mode>_mem): Likewise.
17551         (fix<uns>_<mode>_mem): Likewise.
17552         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17553         the register allocator from doing a direct move to the GPRs to do
17554         a store, and instead use the ISA 3.0 store byte/half-word from
17555         vector register instruction.  For IEEE 128-bit floating point,
17556         also optimize stores of 32-bit ints.
17557         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17559 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17561         * genextract.c (push_pathstr_operand): New function to support
17562         [a-zA-Z].
17563         (walk_rtx): Call push_pathstr_operand.
17564         (print_path): Support [a-zA-Z].
17566 2018-02-07  Richard Biener  <rguenther@suse.de>
17568         PR tree-optimization/84037
17569         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17570         (cse_and_gimplify_to_preheader): Declare.
17571         (vect_get_place_in_interleaving_chain): Likewise.
17572         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17573         ivexpr_map.
17574         (_loop_vec_info::~_loop_vec_info): Delete it.
17575         (cse_and_gimplify_to_preheader): New function.
17576         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17577         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17578         (vectorizable_load): Likewise.  For grouped stores always base
17579         the IV on the first element.
17580         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17581         condition before gimplifying.
17583 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17585         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17586         *DIV_EXPR and *MOD_EXPR.
17588 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17590         PR target/84248
17591         * config/i386/i386.c (ix86_option_override_internal): Mask out
17592         the CF_SET bit when checking -fcf-protection.
17594 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17596         PR libgomp/84217
17597         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17598         enough.
17600 2018-02-07  Richard Biener  <rguenther@suse.de>
17602         PR tree-optimization/84204
17603         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17604         this place.
17606         PR tree-optimization/84205
17607         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17608         special-case isl_ast_op_zdiv_r.
17610         PR tree-optimization/84223
17611         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17612         Only add conditions from within the region.
17613         (gather_bbs::after_dom_children): Adjust.
17615 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17617         PR target/84209
17618         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17619         * config/avr/avr.md: Only post-reload split REG-REG moves if
17620         either register is GENERAL_REG_P.
17622 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17624         PR tree-optimization/84235
17625         * tree-ssa-scopedtables.c
17626         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17627         if the subtraction is performed in floating point type where NaNs are
17628         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17629         build 1.  Formatting fix.
17631 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17633         PR target/84146
17634         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17635         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17636         and skip it regardless of bb boundaries.  Use CALL_P macro,
17637         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17638         unnecessarily, formatting fix.
17640 2018-02-06  Michael Collison  <michael.collison@arm.com>
17642         * config/arm/thumb2.md:
17643         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17644         (*thumb_mov_notscc): Ditto.
17646 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17648         PR target/84154
17649         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17650         unsigned_fix, not "s".
17652 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17654         * configure.ac (gcc_fn_eh_frame_ro): New function.
17655         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17656         correct .eh_frame permissions.
17657         * configure: Regenerate.
17659 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17661         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17662         irrelevant options.
17664 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17666         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17667         Display warning message for -mno-speculate-indirect-jumps.
17669 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17671         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17672         Undocumented.
17673         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17675 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17677         PR tree-optimization/84225
17678         * tree-eh.c (find_trapping_overflow): Only call
17679         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17681 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17683         PR target/84145
17684         * config/i386/i386.c: Reimplement the check of possible options
17685         -mibt/-mshstk conbination. Change error messages.
17686         * doc/invoke.texi: Fix a typo: remove extra '='.
17688 2018-02-06  Marek Polacek  <polacek@redhat.com>
17690         PR tree-optimization/84228
17691         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17693 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17695         PR target/82641
17696         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17697         emitted arch directives.
17698         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17699         __ARM_FEATURE_COPROC before changing architectures.
17701 2018-02-06  Richard Biener  <rguenther@suse.de>
17703         * config/i386/i386.c (print_reg): Fix typo.
17704         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17706 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17708         * configure: Regenerate.
17710 2018-02-05  Martin Sebor  <msebor@redhat.com>
17712         PR tree-optimization/83369
17713         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17714         inlining context.
17716 2018-02-05  Martin Liska  <mliska@suse.cz>
17718         * doc/invoke.texi: Cherry-pick upstream r323995.
17720 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17722         * ira.c (ira_init_register_move_cost): Adjust comment.
17724 2018-02-05  Martin Liska  <mliska@suse.cz>
17726         PR gcov-profile/84137
17727         * doc/gcov.texi: Fix typo in documentation.
17729 2018-02-05  Martin Liska  <mliska@suse.cz>
17731         PR gcov-profile/83879
17732         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17733         using dlopen functionality.
17735 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17737         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17738         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17739         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17740         _mm_maskz_range_round_ss): New intrinsics.
17741         (__builtin_ia32_rangesd128_round)
17742         (__builtin_ia32_rangess128_round): Remove.
17743         (__builtin_ia32_rangesd128_mask_round,
17744         __builtin_ia32_rangess128_mask_round): New builtins.
17745         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17746         __builtin_ia32_rangess128_round): Remove.
17747         (__builtin_ia32_rangesd128_mask_round,
17748         __builtin_ia32_rangess128_mask_round): New builtins.
17749         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17750         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17751         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17752         "<round_saeonly_constraint>")): Changed to ...
17753         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17754         "<round_saeonly_scalar_constraint>")): ... this.
17755         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17756         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17757         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17758         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17759         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17761 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17763         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17764         options.
17765         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17766         Remove all values except native, 8540 and 8548.
17768 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17770         * config/i386/i386.c (ix86_output_function_return): Pass
17771         INVALID_REGNUM, instead of -1, as invalid register number to
17772         indirect_thunk_name and output_indirect_thunk.
17774 2018-02-02  Julia Koval  <julia.koval@intel.com>
17776         * config.gcc: Add -march=icelake.
17777         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17778         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17779         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17780         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17781         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17782         (processor_target_table): Add icelake.
17783         (ix86_option_override_internal): Handle new PTAs.
17784         (get_builtin_code_for_version): Handle icelake.
17785         (M_INTEL_COREI7_ICELAKE): New.
17786         (fold_builtin_cpu): Handle icelake.
17787         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17788         * doc/invoke.texi: Add -march=icelake.
17790 2018-02-02  Julia Koval  <julia.koval@intel.com>
17792         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17793         to wide_int_bitmask.
17794         * wide-int-bitmask.h: New.
17796 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17798         PR target/84066
17799         * config/i386/i386.md: Replace Pmode with word_mode in
17800         builtin_setjmp_setup and builtin_longjmp to support x32.
17802 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17804         PR target/56010
17805         PR target/83743
17806         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17807         #include "opts.h".
17808         (rs6000_supported_cpu_names): New static variable.
17809         (linux_cpu_translation_table): Likewise.
17810         (elf_platform) <cpu>: Define new static variable and use it.
17811         Translate kernel AT_PLATFORM name to canonical name if needed.
17812         Error if platform name is unknown.
17814 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17816         PR target/84089
17817         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17819 2018-02-01  Jeff Law  <law@redhat.com>
17821         PR target/84128
17822         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17823         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17824         the scratch if RELEASE_VIA_POP is false.
17825         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17826         If we have to save a temporary register, decrement SIZE appropriately.
17827         Pass new arguments to release_scratch_register_on_entry.
17828         (ix86_adjust_stack_and_probe): Likewise.
17829         (ix86_emit_probe_stack_range): Pass new arguments to
17830         release_scratch_register_on_entry.
17832 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17834         PR rtl-optimization/84157
17835         * combine.c (change_zero_ext): Use REG_P predicate in
17836         front of HARD_REGISTER_P predicate.
17838 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17840         * config/avr/avr.c (avr_option_override): Move disabling of
17841         -fdelete-null-pointer-checks to...
17842         * common/config/avr/avr-common.c (avr_option_optimization_table):
17843         ...here.
17845 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17847         PR tree-optimization/81635
17848         * tree-data-ref.c (split_constant_offset_1): For types that
17849         wrap on overflow, try to use range info to prove that wrapping
17850         cannot occur.
17852 2018-02-01  Renlin Li  <renlin.li@arm.com>
17854         PR target/83370
17855         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17856         TAILCALL_ADDR_REGS.
17857         (aarch64_register_move_cost): Likewise.
17858         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17859         TAILCALL_ADDR_REGS.
17860         (REG_CLASS_NAMES): Likewise.
17861         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17862         TAILCALL_ADDR_REGS. Remove IP registers.
17863         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17865 2018-02-01  Richard Biener  <rguenther@suse.de>
17867         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17868         for specifying RPO order and allow NULL for that.
17869         * domwalk.c (dom_walker::dom_walker): Likewise.
17870         (dom_walker::walk): Handle NULL RPO order.
17871         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17872         in RPO order.
17873         (rewrite_update_dom_walker): Likewise.
17874         (mark_def_dom_walker): Likewise.
17876 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17878         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17879         (aarch64_maybe_expand_sve_subreg_move): Declare.
17880         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17881         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17882         predicate.
17883         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17884         that are semantically a reverse operation.
17885         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17886         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17887         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17888         functions.
17889         (aarch64_can_change_mode_class): For big-endian, forbid changes
17890         between two SVE modes if they have different element sizes.
17892 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17894         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17895         the TImode handling for big-endian targets.
17897 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17899         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17900         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17901         not just bytes.
17902         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17903         Remove BSWAP handing for big-endian targets and use the form of
17904         LD1RQ appropariate for the mode.
17906 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17908         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17909         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17910         duplicated element.
17912 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17914         PR tearget/83845
17915         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17916         check for operands that need to go through aarch64_sve_reload_be.
17918 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17920         PR tree-optimization/81661
17921         PR tree-optimization/84117
17922         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17923         * tree-eh.c: Include gimplify.h.
17924         (find_trapping_overflow, replace_trapping_overflow,
17925         rewrite_to_non_trapping_overflow): New functions.
17926         * tree-vect-loop.c: Include tree-eh.h.
17927         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17928         * tree-data-ref.c: Include tree-eh.h.
17929         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17931 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17933         PR rtl-optimization/84123
17934         * combine.c (change_zero_ext): Check if hard register satisfies
17935         can_change_dest_mode before calling gen_lowpart_SUBREG.
17937 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17939         PR target/82444
17940         * ira.c (ira_init_register_move_cost): Remove assert.
17942 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17944         PR rtl-optimization/84071
17945         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17946         * doc/tm.texi: Regenerate.
17948 2018-01-31  Richard Biener  <rguenther@suse.de>
17950         PR tree-optimization/84132
17951         * tree-data-ref.c (analyze_miv_subscript): Properly
17952         check whether evolution_function_is_affine_multivariate_p
17953         before calling gcd_of_steps_may_divide_p.
17955 2018-01-31  Julia Koval  <julia.koval@intel.com>
17957         PR target/83618
17958         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17959         * config/i386/i386.md (rdpid_rex64) New.
17960         (rdpid): Make 32bit only.
17962 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17964         PR lto/84105
17965         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17966         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17968 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17970         Revert
17971         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17973         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17975 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17977         PR rtl-optimization/84071
17978         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17979         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17981 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17983         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17984         (arc_attribute_table): Add 'aux' attribute.
17985         (arc_in_small_data_p): Consider aux like variables.
17986         (arc_is_aux_reg_p): New function.
17987         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17988         (arc_get_aux_arg): New function.
17989         (prepare_move_operands): Handle aux-register access.
17990         (arc_handle_aux_attribute): New function.
17991         * doc/extend.texi (ARC Variable attributes): Add subsection.
17993 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17995         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17996         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17997         (arc_attribute_table): Add 'uncached' attribute.
17998         (arc_print_operand): Print '.di' flag for uncached memory
17999         accesses.
18000         (arc_in_small_data_p): Do not consider for small data the uncached
18001         types.
18002         (arc_is_uncached_mem_p): New function.
18003         * config/arc/predicates.md (compact_store_memory_operand): Check
18004         for uncached memory accesses.
18005         (nonvol_nonimm_operand): Likewise.
18006         * doc/extend.texi (ARC Type Attribute): New subsection.
18008 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
18010         PR c/84100
18011         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
18012         falign-loops=): Add Optimization flag.
18014 2018-01-30  Jeff Law  <law@redhat.com>
18016         PR target/84064
18017         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
18018         INT_REGISTERS_SAVED.  Check it prior to calling
18019         get_scratch_register_on_entry.
18020         (ix86_adjust_stack_and_probe): Similarly.
18021         (ix86_emit_probe_stack_range): Similarly.
18022         (ix86_expand_prologue): Corresponding changes.
18024 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18026         PR target/40411
18027         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
18028         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
18030 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
18032         PR target/84112
18033         * lra-constraints.c (curr_insn_transform): Process AND in the
18034         address.
18036 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
18038         PR rtl-optimization/83986
18039         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
18040         dependence against last_pending_memory_flush in addition to
18041         pending_jump_insns.
18043 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
18045         PR tree-optimization/81611
18046         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
18047         copies.
18049 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18051         PR target/83758
18052         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
18053         a reg rtx.
18055 2018-01-30  Richard Biener  <rguenther@suse.de>
18056             Jakub Jelinek  <jakub@redhat.com>
18058         PR tree-optimization/84111
18059         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
18060         inner loops added during recursion, as they don't have up-to-date
18061         SSA form.
18063 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18065         PR ipa/81360
18066         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
18067         (can_inline_edge_by_limits_p): ... here.
18068         (can_early_inline_edge_p, check_callers,
18069         update_caller_keys, update_callee_keys, recursive_inlining,
18070         add_new_edges_to_heap, speculation_useful_p,
18071         inline_small_functions,
18072         inline_small_functions, flatten_function,
18073         inline_to_all_callers_1): Update.
18075 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
18077         * profile-count.c (profile_count::combine_with_ipa_count): Handle
18078         zeros correctly.
18080 2018-01-30  Richard Biener  <rguenther@suse.de>
18082         PR tree-optimization/83008
18083         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
18084         invariant and constant vector uses in stmts when they need
18085         more than one stmt.
18087 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18089         PR bootstrap/84017
18090         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
18091         * configure: Regenerate.
18093 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18095         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
18096         pattern.
18097         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
18098         Use gen_rtx_REG rather than gen_lowpart.
18100 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18102         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18103         rather than 0 when creating partial subregs.
18105 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18107         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18108         of usage.
18110 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18112         PR target/81550
18113         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18114         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18115         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18116         flags.  This restores the settings used before the 2017-07-24.
18117         Turning off pre increment/decrement/modify allows IVOPTS to
18118         optimize DF/SF loops where the index is an int.
18120 2018-01-29  Richard Biener  <rguenther@suse.de>
18121             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18123         PR bootstrap/80867
18124         * tree-vect-stmts.c (vectorizable_call): Don't call
18125         targetm.vectorize_builtin_md_vectorized_function if callee is
18126         NULL.
18128 2018-01-22  Carl Love  <cel@us.ibm.com>
18130         * doc/extend.tex: Fix typo in second arg in
18131         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18133 2018-01-29  Richard Biener  <rguenther@suse.de>
18135         PR tree-optimization/84086
18136         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18137         (flush_ssaname_freelist): When SSA names were released reset
18138         the SCEV hash table.
18140 2018-01-29  Richard Biener  <rguenther@suse.de>
18142         PR tree-optimization/84057
18143         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18144         removed paths when removing edges.
18146 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18148         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18149         -mfunction-return=@var{choice}.
18151 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18153         PR diagnostic/84034
18154         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18155         Handle CR like TAB.
18156         (layout::print_source_line): Likewise.
18157         (test_get_line_width_without_trailing_whitespace): Add test cases.
18159 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18161         PR middle-end/84040
18162         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18163         debug insns.
18165 2018-01-26  Jim Wilson  <jimw@sifive.com>
18167         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18169         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18170         specified.
18172 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18174         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18175         and CMP + SUB-immediate -> SUBS.
18177 2018-01-26  Martin Sebor  <msebor@redhat.com>
18179         PR tree-optimization/83896
18180         * tree-ssa-strlen.c (get_string_len): Rename...
18181         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18182         Avoid assuming length is constant.
18183         (handle_char_store): Use HOST_WIDE_INT for string length.
18185 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18187         PR target/81763
18188         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18189         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18191 2018-01-26  Richard Biener  <rguenther@suse.de>
18193         PR rtl-optimization/84003
18194         * dse.c (record_store): Only record redundant stores when
18195         the earlier store aliases at least all accesses the later one does.
18197 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18199         PR rtl-optimization/83985
18200         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18201         REG_CFA_RESTORE insns.
18202         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18203         REG_CFA_RESTORE insns here.
18205         PR c/83989
18206         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18207         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18209 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18211         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18212         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18213         (arc_init): Likewise.
18214         (arc_override_options): Likewise.
18215         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18216         value.
18217         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18218         support.
18219         * config/arc/arc.h (TARGET_DBNZ): Define.
18220         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18221         properly set the tune attribute.
18222         (dbnz): Use TARGET_DBNZ guard.
18223         * config/arc/arc.opt (mtune): Add core3 option.
18225 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18227         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18228         recognize new pic like addresses.
18229         (arc_delegitimize_address): Clean up.
18231 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18233         * config/arc/arc-arches.def: Option mrf16 valid for all
18234         architectures.
18235         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18236         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18237         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18238         * config/arc/arc-tables.opt: Regenerate.
18239         * config/arc/arc.c (arc_conditional_register_usage): Handle
18240         reduced register file case.
18241         (arc_file_start): Set must have build attributes.
18242         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18243         mrf16 option value.
18244         * config/arc/arc.opt (mrf16): Add new option.
18245         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18246         * config/arc/genmultilib.awk: Handle new mrf16 option.
18247         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18248         * config/arc/t-multilib: Regenerate.
18249         * doc/invoke.texi (ARC Options): Document mrf16 option.
18251 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18253         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18254         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18255         (arc_attribute_table): Add 'secure_call' attribute.
18256         (arc_print_operand): Print secure call operand.
18257         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18258         secure.
18259         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18260         (call_i): Add support for sjli instruction.
18261         (call_value_i): Likewise.
18262         * config/arc/constraints.md (Csc): New constraint.
18264 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18265             John Eric Martin  <John.Martin@emmicro-us.com>
18267         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18268         * config/arc/arc.c (_arc_jli_section): New struct.
18269         (arc_jli_section): New type.
18270         (rc_jli_sections): New static variable.
18271         (arc_handle_jli_attribute): New function.
18272         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18273         (arc_file_end): New function.
18274         (TARGET_ASM_FILE_END): Define.
18275         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18276         (arc_add_jli_section): New function.
18277         (jli_call_scan): Likewise.
18278         (arc_reorg): Call jli_call_scan.
18279         (arc_output_addsi): Remove 'S' from printing asm operand.
18280         (arc_is_jli_call_p): New function.
18281         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18282         operand.
18283         (movhi_insn): Likewise.
18284         (movsi_insn): Likewise.
18285         (movsi_set_cc_insn): Likewise.
18286         (loadqi_update): Likewise.
18287         (load_zeroextendqisi_update): Likewise.
18288         (load_signextendqisi_update): Likewise.
18289         (loadhi_update): Likewise.
18290         (load_zeroextendhisi_update): Likewise.
18291         (load_signextendhisi_update): Likewise.
18292         (loadsi_update): Likewise.
18293         (loadsf_update): Likewise.
18294         (movsicc_insn): Likewise.
18295         (bset_insn): Likewise.
18296         (bxor_insn): Likewise.
18297         (bclr_insn): Likewise.
18298         (bmsk_insn): Likewise.
18299         (bicsi3_insn): Likewise.
18300         (cmpsi_cc_c_insn): Likewise.
18301         (movsi_ne): Likewise.
18302         (movsi_cond_exec): Likewise.
18303         (clrsbsi2): Likewise.
18304         (norm_f): Likewise.
18305         (normw): Likewise.
18306         (swap): Likewise.
18307         (divaw): Likewise.
18308         (flag): Likewise.
18309         (sr): Likewise.
18310         (kflag): Likewise.
18311         (ffs): Likewise.
18312         (ffs_f): Likewise.
18313         (fls): Likewise.
18314         (call_i): Remove 'S' asm letter, add jli instruction.
18315         (call_value_i): Likewise.
18316         * config/arc/arc.op (mjli-always): New option.
18317         * config/arc/constraints.md (Cji): New constraint.
18318         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18319         operand.
18320         (subsf3_fpx): Likewise.
18321         (mulsf3_fpx): Likewise.
18322         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18323         asm operand.
18324         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18325         function attrbutes.
18326         * doc/invoke.texi (ARC): Document mjli-always option.
18328 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18330         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18331         avoid addition with 0 and use incw and decw where possible.
18333 2018-01-26  Richard Biener  <rguenther@suse.de>
18335         PR tree-optimization/81082
18336         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18337         association if it requires casting to unsigned.
18338         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18339         from fold_plusminus_mult_expr to catch important cases late when
18340         range info is available.
18342 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18344         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18345         * configure.ac (hidden_linkonce): New test.
18346         * configure: Regenerate.
18347         * config.in: Regenerate.
18349 2018-01-26  Julia Koval  <julia.koval@intel.com>
18351         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18352         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18353         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18354         _mm_mask_bitshuffle_epi64_mask): Fix type.
18355         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18356         USI_FTYPE_V4DI_V4DI_USI): Remove.
18357         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18358         __builtin_ia32_vpshufbitqmb256_mask,
18359         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18360         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18361         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18363 2018-01-26  Alan Modra  <amodra@gmail.com>
18365         PR target/84033
18366         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18367         UNSPEC_VBPERMQ.  Sort other unspecs.
18369 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18371         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18373 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18375         PR middle-end/83055
18376         * predict.c (drop_profile): Do not push/pop cfun; update also
18377         node->count.
18378         (handle_missing_profiles): Fix logic looking for zero profiles.
18380 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18382         PR middle-end/83977
18383         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18384         on functions with #pragma omp declare simd or functions with simd
18385         attribute.
18386         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18387         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18388         Remove trailing \n from warning_at calls.
18390 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18392         PR target/84028
18393         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18394         for neutered workers.
18396 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18398         PR target/68467
18399         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18400         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18402 2018-01-24  Jeff Law  <law@redhat.com>
18404         PR target/83994
18405         * i386.c (get_probe_interval): Move to earlier point.
18406         (ix86_compute_frame_layout): If -fstack-clash-protection and
18407         the frame is larger than the probe interval, then use pushes
18408         to save registers rather than reg->mem moves.
18409         (ix86_expand_prologue): Remove conditional for int_registers_saved
18410         assertion.
18412 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18414         PR target/84014
18415         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18416         min/max for never referenced object.
18418 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18420         PR middle-end/83977
18421         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18422         here.
18423         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18424         attributes from DECL_ATTRIBUTES (decl) without affecting
18425         DECL_ATTRIBUTES (current_function_decl).
18426         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18427         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18429 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18431         PR tree-optimization/83979
18432         * fold-const.c (fold_comparison): Use constant_boolean_node
18433         instead of boolean_{true,false}_node.
18435 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18437         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18438         with zero counts.
18440 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18442         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18443         Simplify the clause that sets the length attribute.
18444         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18445         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18446         clause that sets the length attribute.
18447         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18449 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18451         PR target/83589
18452         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18453         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18454         Add strict parameter.
18455         (prevent_branch_around_nothing): Insert dummy insn between branch to
18456         label and label with no ptx insn inbetween.
18457         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18459 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18461         PR target/81352
18462         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18463         for neutered threads in warp.
18464         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18466 2018-01-24  Richard Biener  <rguenther@suse.de>
18468         PR tree-optimization/83176
18469         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18470         operands.
18472 2018-01-24  Richard Biener  <rguenther@suse.de>
18474         PR tree-optimization/82819
18475         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18476         code generating pluses that are no-ops in the target precision.
18478 2018-01-24  Richard Biener  <rguenther@suse.de>
18480         PR middle-end/84000
18481         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18483 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18485         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18486         to merge probabilities.
18487         * predict.c (probably_never_executed): Also mark as cold functions
18488         with global 0 profile and guessed local profile.
18489         * profile-count.c (profile_probability::combine_with_count): New
18490         member function.
18491         * profile-count.h (profile_probability::operator*,
18492         profile_probability::operator*=, profile_probability::operator/,
18493         profile_probability::operator/=): Reduce precision to adjusted
18494         and set value to guessed on contradictory divisions.
18495         (profile_probability::combine_with_freq): Remove.
18496         (profile_probability::combine_wiht_count): Declare.
18497         (profile_count::force_nonzero):: Set to adjusted.
18498         (profile_count::probability_in):: Set quality to adjusted.
18499         * tree-ssa-tail-merge.c (replace_block_by): Use
18500         combine_with_count.
18502 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18503             Jim Wilson  <jimw@sifive.com>
18505         * config/riscv/riscv.c (riscv_stack_boundary): New.
18506         (riscv_option_override): Set riscv_stack_boundary.  Handle
18507         riscv_preferred_stack_boundary_arg.
18508         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18509         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18510         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18511         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18512         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18513         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18515 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18517         PR target/83905
18518         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18519         of struct ix86_frame.
18520         (ix86_expand_epilogue): Likewise.  Add a local variable for
18521         the reg_save_offset field in struct ix86_frame.
18523 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18525         PR tree-optimization/82604
18526         * tree-loop-distribution.c (enum partition_kind): New enum item
18527         PKIND_PARTIAL_MEMSET.
18528         (partition_builtin_p): Support above new enum item.
18529         (generate_code_for_partition): Ditto.
18530         (compute_access_range): Differentiate cases that equality can be
18531         proven at all loops, the innermost loops or no loops.
18532         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18533         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18534         (finalize_partitions, distribute_loop): Don't fuse partition of
18535         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18536         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18537         parloop is enabled.
18539 2018-01-23  Martin Liska  <mliska@suse.cz>
18541         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18542         order to ignore the predictor.
18543         (PRED_POLYMORPHIC_CALL): Likewise.
18544         (PRED_RECURSIVE_CALL): Likewise.
18546 2018-01-23  Martin Liska  <mliska@suse.cz>
18548         * tree-profile.c (tree_profiling): Print function header to
18549         aware reader which function we are working on.
18550         * value-prof.c (gimple_find_values_to_profile): Do not print
18551         not interesting value histograms.
18553 2018-01-23  Martin Liska  <mliska@suse.cz>
18555         * profile-count.h (enum profile_quality): Add
18556         profile_uninitialized as the first value. Do not number values
18557         as they are zero based.
18558         (profile_count::verify): Update sanity check.
18559         (profile_probability::verify): Likewise.
18561 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18563         * doc/invoke.texi (ffor-scope): Deprecate.
18565 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18567         PR tree-optimization/83510
18568         * domwalk.c (set_all_edges_as_executable): New function.
18569         (dom_walker::dom_walker): Convert bool param
18570         "skip_unreachable_blocks" to enum reachability.  Move setup of
18571         edge flags to set_all_edges_as_executable and only do it when
18572         reachability is REACHABLE_BLOCKS.
18573         * domwalk.h (enum dom_walker::reachability): New enum.
18574         (dom_walker::dom_walker): Convert bool param
18575         "skip_unreachable_blocks" to enum reachability.
18576         (set_all_edges_as_executable): New decl.
18577         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18578         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18579         "reachability".
18580         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18581         but converting true to REACHABLE_BLOCKS.
18582         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18583         * tree-vrp.c
18584         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18585         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18586         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18587         REACHABLE_BLOCKS.
18588         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18589         if check_all_array_refs will be called.
18591 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18593         * tree.c (selftest::test_location_wrappers): Add more test
18594         coverage.
18596 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18598         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18599         (selftest::test_bit_in_range): Likewise.
18601 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18603         PR testsuite/83888
18604         * doc/sourcebuild.texi (vect_float): Say that the selector
18605         only describes the situation when -funsafe-math-optimizations is on.
18606         (vect_float_strict): Document.
18608 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18610         PR tree-optimization/83965
18611         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18612         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18613         instead of checking only for a reduction.
18614         (vect_recog_widen_sum_pattern): Likewise.
18616 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18618         * predict.c (probably_never_executed): Only use precise profile info.
18619         (compute_function_frequency): Skip after inlining hack since we now
18620         have quality checking.
18622 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18624         * profile-count.h (profile_probability::very_unlikely,
18625         profile_probability::unlikely, profile_probability::even): Set
18626         precision to guessed.
18628 2018-01-23  Richard Biener  <rguenther@suse.de>
18630         PR tree-optimization/83963
18631         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18632         Properly terminate dominator walk when crossing the exit edge not
18633         when visiting its source block.
18635 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18637         PR c++/83918
18638         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18639         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18641 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18643         PR tree-optimization/83957
18644         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18645         semicolon after for body surrounded by braces.
18647         PR tree-optimization/83081
18648         * profile-count.h (profile_probability::split): New method.
18649         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18650         Use profile_probability::split.
18651         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18652         when splitting a single conditional jump into 2.
18654 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18656         PR tree-optimization/69452
18657         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18658         decl.
18660 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18662         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18663         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18664         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18666 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18668         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18669         declaration.
18670         * config/rl78/rl78.md (movdi): New define_expand.
18671         * config/rl78/rl78.c (rl78_split_movdi): New function.
18673 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18675         PR target/83862
18676         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18677         no longer used.
18678         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18679         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18680         128-bit to produce an UNSPEC move to get the double word with the
18681         signbit and then a shift directly to do signbit.
18682         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18683         implementation with a new version that just does either a direct
18684         move or a regular move.  Move memory interface to separate insns.
18685         Move insns so they are next to the expander.
18686         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18687         with signbit move.  Split big and little endian case.
18688         (signbit<mode>2_dm_mem_le): Likewise.
18689         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18690         (signbit<mode>2_dm2): Likewise.
18692 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18694         * config/rl78/rl78.md (anddi3): New define_expand.
18696 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18698         * config/rl78/rl78.md (umindi3): New define_expand.
18700 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18702         * config/rl78/rl78.md (smindi3): New define_expand.
18704 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18706         * config/rl78/rl78.md (smaxdi3): New define_expand.
18708 2018-01-22  Carl Love  <cel@us.ibm.com>
18710         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18711         LVX_V1TI): Add macro expansion.
18712         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18713         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18714         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18715         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18716         Change check to determine if the instruction is a byte reversing
18717         entry.  Fix typo in comment.
18718         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18719         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18720         Add def_builtin calls for new builtins.
18721         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18722         Add define_insn expansion.
18724 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18726         * config/rl78/rl78.md (umaxdi3): New define_expand.
18728 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18730         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18731         for non-QImode registers.
18733 2018-01-22  Richard Biener  <rguenther@suse.de>
18735         PR tree-optimization/83963
18736         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18737         including the loop exit block.
18738         (scop_detection::merge_sese): Likewise.
18739         (scop_detection::add_scop): Do it here instead.
18741 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18743         * doc/sourcebuild.texi (arm_softfloat): Document.
18745 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18747         PR gcc/77734
18748         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18749         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18750         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18752 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18753             David Edelsohn  <dje.gcc@gmail.com>
18755         PR target/83946
18756         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18757         Change "crset eq" to "crset 2".
18758         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18759         (*call_indirect_aix<mode>_nospec): Likewise.
18760         (*call_value_indirect_aix<mode>_nospec): Likewise.
18761         (*call_indirect_elfv2<mode>_nospec): Likewise.
18762         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18763         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18764         change assembly output from . to $.
18765         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18766         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18767         (*tablejump<mode>_internal1_nospec): Likewise.
18769 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18771         PR target/80870
18772         * config/sh/sh_optimize_sett_clrt.cc:
18773         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18775 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18777         PR tree-optimization/83940
18778         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18779         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18780         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18781         use it to pass back the definition type.
18782         (vect_check_store_rhs): Likewise rhs_dt_out.
18783         (vect_build_gather_load_calls): Add a mask_dt argument and use
18784         it instead of a call to vect_is_simple_use.
18785         (vectorizable_store): Update calls to vect_check_load_store_mask
18786         and vect_check_store_rhs.  Use the dt returned by the latter instead
18787         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18788         instead of calls to vect_is_simple_use.  Pass the scalar rather
18789         than the vector operand to vect_is_simple_use when handling
18790         second and subsequent copies of an rhs value.
18791         (vectorizable_load): Update calls to vect_check_load_store_mask
18792         and vect_build_gather_load_calls.  Use the cached mask_dt and
18793         gs_info.offset_dt instead of calls to vect_is_simple_use.
18795 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18797         PR middle-end/83945
18798         * tree-emutls.c: Include gimplify.h.
18799         (lower_emutls_2): New function.
18800         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18801         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18802         it before further processing.
18804         PR target/83930
18805         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18806         UINTVAL (trueop1) instead of INTVAL (op1).
18808 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18810         PR debug/81570
18811         PR debug/83728
18812         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18813         INCOMING_FRAME_SP_OFFSET if not defined.
18814         (scan_trace): Add ENTRY argument.  If true and
18815         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18816         emit a note to adjust the CFA offset.
18817         (create_cfi_notes): Adjust scan_trace callers.
18818         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18819         INCOMING_FRAME_SP_OFFSET in the CIE.
18820         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18821         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18822         Likewise.
18823         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18824         * doc/tm.texi: Regenerated.
18826 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18828         PR rtl-optimization/83147
18829         * lra-constraints.c (remove_inheritance_pseudos): Use
18830         lra_substitute_pseudo_within_insn.
18832 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18833             Cesar Philippidis  <cesar@codesourcery.com>
18835         PR target/83920
18836         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18838 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18840         PR target/83790
18841         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18842         spaces for function labels.
18844 2018-01-19  Martin Liska  <mliska@suse.cz>
18846         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18847         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18848         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18849         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18850         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18851         (PRED_CONST_RETURN): Change from 69 to 65.
18852         (PRED_NULL_RETURN): Change from 91 to 71.
18853         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18854         (PRED_LOOP_GUARD): Change from 66 to 73.
18856 2018-01-19  Martin Liska  <mliska@suse.cz>
18858         * predict.c (predict_insn_def): Add new assert.
18859         (struct branch_predictor): Change type to signed integer.
18860         (test_prediction_value_range): Amend test to cover
18861         PROB_UNINITIALIZED.
18862         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18863         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18864         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18865         (PRED_LOOP_IV_COMPARE): Likewise.
18866         * predict.h (PROB_UNINITIALIZED): Define new constant.
18868 2018-01-19  Martin Liska  <mliska@suse.cz>
18870         * predict.c (dump_prediction): Add new format for
18871         analyze_brprob.py script which is enabled with -details
18872         suboption.
18873         * profile-count.h (precise_p): New function.
18875 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18877         PR tree-optimization/83922
18878         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18879         there are no statements that need masking.
18880         (vect_active_double_reduction_p): New function.
18881         (vect_analyze_loop_operations): Use it when handling phis that
18882         are not in the loop header.
18884 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18886         PR tree-optimization/83914
18887         * tree-vect-loop.c (vectorizable_induction): Don't convert
18888         init_expr or apply the peeling adjustment for inductions
18889         that are nested within the vectorized loop.
18891 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18893         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18894         instead of NEG.
18896 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18898         PR sanitizer/81715
18899         PR testsuite/83882
18900         * function.h (gimplify_parameters): Add gimple_seq * argument.
18901         * function.c: Include gimple.h and options.h.
18902         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18903         for the added local temporaries if needed.
18904         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18905         if there are any parameter cleanups, wrap whole body into a
18906         try/finally with the cleanups.
18908 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18910         PR target/82964
18911         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18912         Use GET_MODE_CLASS for scalar floating point.
18914 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18916         PR ipa/82256
18917         patch by PaX Team
18918         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18919         Fix call of call_cgraph_insertion_hooks.
18921 2018-01-18  Martin Sebor  <msebor@redhat.com>
18923         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18925 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18927         PR ipa/83619
18928         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18929         frequencies.
18931 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18933         PR other/70268
18934         * common.opt: (-ffile-prefix-map): New option.
18935         * opts.c (common_handle_option): Defer it.
18936         * opts-global.c (handle_common_deferred_options): Handle it.
18937         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18938         * file-prefix-map.h: New file.
18939         (remap_debug_filename, add_debug_prefix_map): ...here.
18940         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18941         * final.c (debug_prefix_map, add_debug_prefix_map
18942         remap_debug_filename): Move to...
18943         * file-prefix-map.c: New file.
18944         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18945         generalize, get rid of alloca(), use strrchr() instead of strchr().
18946         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18947         Implement in terms of add_prefix_map().
18948         (remap_macro_filename, remap_debug_filename): Implement in term of
18949         remap_filename().
18950         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18951         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18952         * dbxout.c: Include file-prefix-map.h.
18953         * varasm.c: Likewise.
18954         * vmsdbgout.c: Likewise.
18955         * xcoffout.c: Likewise.
18956         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18957         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18958         * doc/invoke.texi (-ffile-prefix-map): Document.
18959         (-fdebug-prefix-map): Update description.
18961 2018-01-18  Martin Liska  <mliska@suse.cz>
18963         * config/i386/i386.c (indirect_thunk_name): Document that also
18964         lfence is emitted.
18965         (output_indirect_thunk): Document why both instructions
18966         (pause and lfence) are generated.
18968 2018-01-18  Richard Biener  <rguenther@suse.de>
18970         PR tree-optimization/83887
18971         * graphite-scop-detection.c
18972         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18973         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18974         (scop_detection::merge_sese): Re-implement with a flood-fill
18975         algorithm that properly finds a SESE region if it exists.
18977 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18979         PR c/61240
18980         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18981         pointer_diff optimizations use view_convert instead of convert.
18983 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18985         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18986         Generate different code for -mno-speculate-indirect-jumps.
18987         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18988         (*call_indirect_aix<mode>): Disable for
18989         -mno-speculate-indirect-jumps.
18990         (*call_indirect_aix<mode>_nospec): New define_insn.
18991         (*call_value_indirect_aix<mode>): Disable for
18992         -mno-speculate-indirect-jumps.
18993         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18994         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18995         -mno-speculate-indirect-jumps.
18996         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18998 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
19000         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
19001         long double type, set the flags for noting the default long double
19002         type, even if we don't pass or return a long double type.
19004 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
19006         PR ipa/83051
19007         * ipa-inline.c (flatten_function): Do not overwrite final inlining
19008         failure.
19010 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
19012         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
19013         support for merge[hl].
19014         (fold_mergehl_helper): New helper function.
19015         (tree-vector-builder.h): New #include for tree_vector_builder usage.
19016         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
19017         (altivec_vmrglw_direct): Add xxmrglw insn.
19019 2018-01-17  Andrew Waterman  <andrew@sifive.com>
19021         * config/riscv/riscv.c (riscv_conditional_register_usage): If
19022         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
19024 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
19026         PR lto/83121
19027         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
19028         call the lto_location_cache before reading the
19029         DECL_SOURCE_LOCATION of the types.
19031 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
19032             Richard Sandiford  <richard.sandiford@linaro.org>
19034         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
19035         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
19036         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
19037         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
19038         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
19039         Add declaration.
19040         * config/aarch64/constraints.md (aarch64_movti_operand):
19041         Limit immediates.
19042         * config/aarch64/predicates.md (Uti): Add new constraint.
19044 2018-01-17  Carl Love  <cel@us.ibm.com>
19046         * config/rs6000/vsx.md (define_expand xl_len_r,
19047         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
19048         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
19049         lxvll.
19050         (define_expand, define_insn): Move the shift left from  the
19051         define_insn to the define_expand for lxvl and stxvl instructions.
19052         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
19053         and XL_LEN_R definitions to PURE.
19055 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
19057         * config/i386/i386.c (indirect_thunk_name): Declare regno
19058         as unsigned int.  Compare regno with INVALID_REGNUM.
19059         (output_indirect_thunk): Ditto.
19060         (output_indirect_thunk_function): Ditto.
19061         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
19062         in the call to output_indirect_thunk_function.
19064 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
19066         PR middle-end/83884
19067         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
19068         rather than the size of inner_type to determine the stack slot size
19069         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
19071 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
19073         PR target/83546
19074         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
19075         to PTA_SILVERMONT.
19077 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
19079         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
19080         endian Linux systems to optionally enable multilibs for selecting
19081         the long double type if the user configured an explicit type.
19082         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
19083         have no long double multilibs if not defined.
19084         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
19085         warn if the user used -mabi={ieee,ibm}longdouble and we built
19086         multilibs for long double.
19087         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
19088         appropriate multilib option.
19089         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
19090         multilib options.
19091         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
19092         for building long double multilibs.
19093         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
19095 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
19097         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
19098         copies.
19100         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
19101         64 bits.
19102         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19103         128 bits.
19105         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19106         variables.
19108         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19109         return value.
19111 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19113         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19114         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19116 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19118         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19119         different rtl trees depending on TARGET_64BIT.
19120         (rs6000_gen_lvx): Likewise.
19122 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19124         * config/visium/visium.md (nop): Tweak comment.
19125         (hazard_nop): Likewise.
19127 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19129         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19130         -mspeculate-indirect-jumps.
19131         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19132         for -mno-speculate-indirect-jumps.
19133         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19134         (*call_value_indirect_elfv2<mode>): Disable for
19135         -mno-speculate-indirect-jumps.
19136         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19137         (indirect_jump): Emit different RTL for
19138         -mno-speculate-indirect-jumps.
19139         (*indirect_jump<mode>): Disable for
19140         -mno-speculate-indirect-jumps.
19141         (*indirect_jump<mode>_nospec): New define_insn.
19142         (tablejump): Emit different RTL for
19143         -mno-speculate-indirect-jumps.
19144         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19145         (tablejumpsi_nospec): New define_expand.
19146         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19147         (tablejumpdi_nospec): New define_expand.
19148         (*tablejump<mode>_internal1): Disable for
19149         -mno-speculate-indirect-jumps.
19150         (*tablejump<mode>_internal1_nospec): New define_insn.
19151         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19152         option.
19154 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19156         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19157         callers updated.
19159 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19160             Richard Biener  <rguenth@suse.de>
19162         PR libgomp/83590
19163         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19164         return early, inline manually is_gimple_sizepos.  Make sure if we
19165         call gimplify_expr we don't end up with a gimple constant.
19166         * tree.c (variably_modified_type_p): Don't return true for
19167         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19168         * gimplify.h (is_gimple_sizepos): Remove.
19170 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19172         PR tree-optimization/83857
19173         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19174         vectorizable_live_operation for pure SLP statements.
19175         (vectorizable_live_operation): Handle PHIs.
19177 2018-01-16  Richard Biener  <rguenther@suse.de>
19179         PR tree-optimization/83867
19180         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19181         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19183 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19185         PR c/83844
19186         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19187         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19188         If off is not INTEGER_CST, issue a may not be aligned warning
19189         rather than isn't aligned.  Use isn%'t rather than isn't.
19190         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19191         into MULT_EXPR.
19192         <case MULT_EXPR>: Improve the case when bottom and one of the
19193         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19194         operand, in that case check if the other operand is multiple of
19195         bottom divided by the INTEGER_CST operand.
19197 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19199         PR target/83858
19200         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19201         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19202         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19203         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19204         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19205         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19206         (pa_function_arg_size): New function.
19208 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19210         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19211         in a separate statement.
19213 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19215         PR tree-optimization/83847
19216         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19217         group gathers and scatters.
19219 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19221         PR rtl-optimization/86620
19222         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19224         PR rtl-optimization/83213
19225         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19226         to last if both are JUMP_INSNs.
19228         PR tree-optimization/83843
19229         * gimple-ssa-store-merging.c
19230         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19231         store_immediate_info for bswap/nop orig_stores.
19233 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19235         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19236         !TARGET_MUL.
19237         <UDIV>: Increase cost if !TARGET_DIV.
19239 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19241         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19242         (define_attr "cr_logical_3op"): New.
19243         (cceq_ior_compare): Adjust.
19244         (cceq_ior_compare_complement): Adjust.
19245         (*cceq_rev_compare): Adjust.
19246         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19247         (is_cracked_insn): Adjust.
19248         (insn_must_be_first_in_group): Adjust.
19249         * config/rs6000/40x.md: Adjust.
19250         * config/rs6000/440.md: Adjust.
19251         * config/rs6000/476.md: Adjust.
19252         * config/rs6000/601.md: Adjust.
19253         * config/rs6000/603.md: Adjust.
19254         * config/rs6000/6xx.md: Adjust.
19255         * config/rs6000/7450.md: Adjust.
19256         * config/rs6000/7xx.md: Adjust.
19257         * config/rs6000/8540.md: Adjust.
19258         * config/rs6000/cell.md: Adjust.
19259         * config/rs6000/e300c2c3.md: Adjust.
19260         * config/rs6000/e500mc.md: Adjust.
19261         * config/rs6000/e500mc64.md: Adjust.
19262         * config/rs6000/e5500.md: Adjust.
19263         * config/rs6000/e6500.md: Adjust.
19264         * config/rs6000/mpc.md: Adjust.
19265         * config/rs6000/power4.md: Adjust.
19266         * config/rs6000/power5.md: Adjust.
19267         * config/rs6000/power6.md: Adjust.
19268         * config/rs6000/power7.md: Adjust.
19269         * config/rs6000/power8.md: Adjust.
19270         * config/rs6000/power9.md: Adjust.
19271         * config/rs6000/rs64.md: Adjust.
19272         * config/rs6000/titan.md: Adjust.
19274 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19276         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19277         ix86_indirect_branch_register logic.
19279 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19281         * config/i386/constraints.md (Bs): Update
19282         ix86_indirect_branch_register check.  Don't check
19283         ix86_indirect_branch_register with GOT_memory_operand.
19284         (Bw): Likewise.
19285         * config/i386/predicates.md (GOT_memory_operand): Don't check
19286         ix86_indirect_branch_register here.
19287         (GOT32_symbol_operand): Likewise.
19289 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19291         * config/i386/predicates.md (constant_call_address_operand):
19292         Rewrite ix86_indirect_branch_register logic.
19293         (sibcall_insn_operand): Likewise.
19295 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19297         * config/i386/constraints.md (Bs): Replace
19298         ix86_indirect_branch_thunk_register with
19299         ix86_indirect_branch_register.
19300         (Bw): Likewise.
19301         * config/i386/i386.md (indirect_jump): Likewise.
19302         (tablejump): Likewise.
19303         (*sibcall_memory): Likewise.
19304         (*sibcall_value_memory): Likewise.
19305         Peepholes of indirect call and jump via memory: Likewise.
19306         * config/i386/i386.opt: Likewise.
19307         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19308         (GOT_memory_operand): Likewise.
19309         (call_insn_operand): Likewise.
19310         (sibcall_insn_operand): Likewise.
19311         (GOT32_symbol_operand): Likewise.
19313 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19315         PR middle-end/83837
19316         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19317         type rather than type addr's type points to.
19318         (expand_omp_atomic_mutex): Likewise.
19319         (expand_omp_atomic): Likewise.
19321 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19323         PR target/83839
19324         * config/i386/i386.c (output_indirect_thunk_function): Use
19325         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19326         for  __x86_return_thunk.
19328 2018-01-15  Richard Biener  <rguenther@suse.de>
19330         PR middle-end/83850
19331         * expmed.c (extract_bit_field_1): Fix typo.
19333 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19335         PR target/83687
19336         * config/arm/iterators.md (VF): New mode iterator.
19337         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19338         Remove integer-related logic from pattern.
19339         (neon_vabd<mode>_3): Likewise.
19341 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19343         PR middle-end/82694
19344         * common.opt (fstrict-overflow): No longer an alias.
19345         (fwrapv-pointer): New option.
19346         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19347         also for pointer types based on flag_wrapv_pointer.
19348         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19349         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19350         opts->x_flag_wrapv got set.
19351         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19352         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19353         POINTER_TYPE_OVERFLOW_UNDEFINED.
19354         * match.pd: Likewise in address comparison pattern.
19355         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19357 2018-01-15  Richard Biener  <rguenther@suse.de>
19359         PR lto/83804
19360         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19361         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19362         Reset type names to their identifier if their TYPE_DECL doesn't
19363         have linkage (and thus is used for ODR and devirt).
19364         (save_debug_info_for_decl): Remove.
19365         (save_debug_info_for_type): Likewise.
19366         (add_tree_to_fld_list): Adjust.
19367         * tree-pretty-print.c (dump_generic_node): Make dumping of
19368         type names more robust.
19370 2018-01-15  Richard Biener  <rguenther@suse.de>
19372         * BASE-VER: Bump to 8.0.1.
19374 2018-01-14  Martin Sebor  <msebor@redhat.com>
19376         PR other/83508
19377         * builtins.c (check_access): Avoid warning when the no-warning bit
19378         is set.
19380 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19382         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19383         * ira-color (allocno_hard_regs_compare): Likewise.
19385 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19387         PR target/83013
19388         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19389         Use .pushsection/.popsection.
19391 2018-01-14  Martin Sebor  <msebor@redhat.com>
19393         PR c++/81327
19394         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19396 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19398         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19399         entry from extra_headers.
19400         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19401         extra_headers, make the list bitwise identical to the i?86-*-* one.
19403 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19405         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19406         -mcmodel=large with -mindirect-branch=thunk,
19407         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19408         -mfunction-return=thunk-extern.
19409         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19410         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19411         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19413 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19415         * config/i386/i386.c (print_reg): Print the name of the full
19416         integer register without '%'.
19417         (ix86_print_operand): Handle 'V'.
19418         * doc/extend.texi: Document 'V' modifier.
19420 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19422         * config/i386/constraints.md (Bs): Disallow memory operand for
19423         -mindirect-branch-register.
19424         (Bw): Likewise.
19425         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19426         (GOT_memory_operand): Likewise.
19427         (call_insn_operand): Likewise.
19428         (sibcall_insn_operand): Likewise.
19429         (GOT32_symbol_operand): Likewise.
19430         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19431         for -mindirect-branch-register.
19432         (tablejump): Likewise.
19433         (*sibcall_memory): Likewise.
19434         (*sibcall_value_memory): Likewise.
19435         Disallow peepholes of indirect call and jump via memory for
19436         -mindirect-branch-register.
19437         (*call_pop): Replace m with Bw.
19438         (*call_value_pop): Likewise.
19439         (*sibcall_pop_memory): Replace m with Bs.
19440         * config/i386/i386.opt (mindirect-branch-register): New option.
19441         * doc/invoke.texi: Document -mindirect-branch-register option.
19443 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19445         * config/i386/i386-protos.h (ix86_output_function_return): New.
19446         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19447         set function_return_type.
19448         (indirect_thunk_name): Add ret_p to indicate thunk for function
19449         return.
19450         (output_indirect_thunk_function): Pass false to
19451         indirect_thunk_name.
19452         (ix86_output_indirect_branch_via_reg): Likewise.
19453         (ix86_output_indirect_branch_via_push): Likewise.
19454         (output_indirect_thunk_function): Create alias for function
19455         return thunk if regno < 0.
19456         (ix86_output_function_return): New function.
19457         (ix86_handle_fndecl_attribute): Handle function_return.
19458         (ix86_attribute_table): Add function_return.
19459         * config/i386/i386.h (machine_function): Add
19460         function_return_type.
19461         * config/i386/i386.md (simple_return_internal): Use
19462         ix86_output_function_return.
19463         (simple_return_internal_long): Likewise.
19464         * config/i386/i386.opt (mfunction-return=): New option.
19465         (indirect_branch): Mention -mfunction-return=.
19466         * doc/extend.texi: Document function_return function attribute.
19467         * doc/invoke.texi: Document -mfunction-return= option.
19469 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19471         * config/i386/i386-opts.h (indirect_branch): New.
19472         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19473         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19474         with local indirect jump when converting indirect call and jump.
19475         (ix86_set_indirect_branch_type): New.
19476         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19477         (indirectlabelno): New.
19478         (indirect_thunk_needed): Likewise.
19479         (indirect_thunk_bnd_needed): Likewise.
19480         (indirect_thunks_used): Likewise.
19481         (indirect_thunks_bnd_used): Likewise.
19482         (INDIRECT_LABEL): Likewise.
19483         (indirect_thunk_name): Likewise.
19484         (output_indirect_thunk): Likewise.
19485         (output_indirect_thunk_function): Likewise.
19486         (ix86_output_indirect_branch_via_reg): Likewise.
19487         (ix86_output_indirect_branch_via_push): Likewise.
19488         (ix86_output_indirect_branch): Likewise.
19489         (ix86_output_indirect_jmp): Likewise.
19490         (ix86_code_end): Call output_indirect_thunk_function if needed.
19491         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19492         needed.
19493         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19494         (ix86_attribute_table): Add indirect_branch.
19495         * config/i386/i386.h (machine_function): Add indirect_branch_type
19496         and has_local_indirect_jump.
19497         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19498         to true.
19499         (tablejump): Likewise.
19500         (*indirect_jump): Use ix86_output_indirect_jmp.
19501         (*tablejump_1): Likewise.
19502         (simple_return_indirect_internal): Likewise.
19503         * config/i386/i386.opt (mindirect-branch=): New option.
19504         (indirect_branch): New.
19505         (keep): Likewise.
19506         (thunk): Likewise.
19507         (thunk-inline): Likewise.
19508         (thunk-extern): Likewise.
19509         * doc/extend.texi: Document indirect_branch function attribute.
19510         * doc/invoke.texi: Document -mindirect-branch= option.
19512 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19514         PR ipa/83051
19515         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19517 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19519         * ipa-inline.c (want_inline_small_function_p): Return false if
19520         inlining has already failed with CIF_FINAL_ERROR.
19521         (update_caller_keys): Call want_inline_small_function_p before
19522         can_inline_edge_p.
19523         (update_callee_keys): Likewise.
19525 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19527         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19528         New function.
19529         (rs6000_quadword_masked_address_p): Likewise.
19530         (quad_aligned_load_p): Likewise.
19531         (quad_aligned_store_p): Likewise.
19532         (const_load_sequence_p): Add comment to describe the outer-most loop.
19533         (mimic_memory_attributes_and_flags): New function.
19534         (rs6000_gen_stvx): Likewise.
19535         (replace_swapped_aligned_store): Likewise.
19536         (rs6000_gen_lvx): Likewise.
19537         (replace_swapped_aligned_load): Likewise.
19538         (replace_swapped_load_constant): Capitalize argument name in
19539         comment describing this function.
19540         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19541         and stores that access quad-word aligned addresses and replace
19542         with stvx or lvx instructions when appropriate.
19543         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19544         New function prototype.
19545         (rs6000_quadword_masked_address_p): Likewise.
19546         (rs6000_gen_lvx): Likewise.
19547         (rs6000_gen_stvx): Likewise.
19548         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19549         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19550         when memory address is aligned.
19551         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19552         this split to select lvx instruction when memory address is aligned.
19553         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19554         instruction when memory address is aligned.
19555         (*vsx_le_perm_load_v16qi): Likewise.
19556         (four unnamed splitters): Modify to select the stvx instruction
19557         when memory is aligned.
19559 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19561         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19562         which appears in the queue multiple times.
19564 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19565             Alan Hayward  <alan.hayward@arm.com>
19566             David Sherwood  <david.sherwood@arm.com>
19568         * tree-vectorizer.h (vec_lower_bound): New structure.
19569         (_loop_vec_info): Add check_nonzero and lower_bounds.
19570         (LOOP_VINFO_CHECK_NONZERO): New macro.
19571         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19572         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19573         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19574         fields.  Make seg_len the distance travelled, not including the
19575         access size.
19576         (dr_direction_indicator): Declare.
19577         (dr_zero_step_indicator): Likewise.
19578         (dr_known_forward_stride_p): Likewise.
19579         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19580         tree-ssanames.h.
19581         (runtime_alias_check_p): Allow runtime alias checks with
19582         variable strides.
19583         (operator ==): Compare access_size and align.
19584         (prune_runtime_alias_test_list): Rework for new distinction between
19585         the access_size and seg_len.
19586         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19587         segment lengths.
19588         (get_segment_min_max): New function.
19589         (create_intersect_range_checks): Use it.
19590         (dr_step_indicator): New function.
19591         (dr_direction_indicator): Likewise.
19592         (dr_zero_step_indicator): Likewise.
19593         (dr_known_forward_stride_p): Likewise.
19594         * tree-loop-distribution.c (data_ref_segment_size): Return
19595         DR_STEP * (niters - 1).
19596         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19597         constructor.
19598         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19599         (vect_preserves_scalar_order_p): New function, split out from...
19600         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19601         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19602         (vect_vfa_access_size): New function.
19603         (vect_vfa_align): Likewise.
19604         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19605         (dump_lower_bound): New function.
19606         (vect_check_lower_bound): Likewise.
19607         (vect_small_gap_p): Likewise.
19608         (vectorizable_with_step_bound_p): Likewise.
19609         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19610         depencies if the vectorization factor is 1.  Convert the checks
19611         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19612         a bunds check for variable steps if the minimum required step is
19613         relatively small. Update calls to the dr_with_seg_len
19614         constructor and to vect_compile_time_alias.
19615         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19616         function.
19617         (vect_loop_versioning): Call it.
19618         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19619         when retrying.
19620         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19622 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19623             Alan Hayward  <alan.hayward@arm.com>
19624             David Sherwood  <david.sherwood@arm.com>
19626         * doc/sourcebuild.texi (vect_scatter_store): Document.
19627         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19628         optabs.
19629         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19630         Document.
19631         * genopinit.c (main): Add supports_vec_scatter_store and
19632         supports_vec_scatter_store_cached to target_optabs.
19633         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19634         IFN_MASK_SCATTER_STORE.
19635         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19636         functions.
19637         * internal-fn.h (internal_store_fn_p): Declare.
19638         (internal_fn_stored_value_index): Likewise.
19639         * internal-fn.c (scatter_store_direct): New macro.
19640         (expand_scatter_store_optab_fn): New function.
19641         (direct_scatter_store_optab_supported_p): New macro.
19642         (internal_store_fn_p): New function.
19643         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19644         IFN_MASK_SCATTER_STORE.
19645         (internal_fn_mask_index): Likewise.
19646         (internal_fn_stored_value_index): New function.
19647         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19648         for scatter stores.
19649         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19650         * optabs-query.c (supports_vec_scatter_store_p): New function.
19651         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19652         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19653         true for scatter stores.
19654         (vect_gather_scatter_fn_p): Handle scatter stores too.
19655         (vect_check_gather_scatter): Consider using scatter stores if
19656         supports_vec_scatter_store_p.
19657         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19658         scatter stores too.
19659         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19660         internal_fn_stored_value_index.
19661         (check_load_store_masking): Handle scatter stores too.
19662         (vect_get_store_rhs): Make public.
19663         (vectorizable_call): Use internal_store_fn_p.
19664         (vectorizable_store): Handle scatter store internal functions.
19665         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19666         when deciding whether the end of the group has been reached.
19667         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19668         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19669         (mask_scatter_store<mode>): New insns.
19671 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19672             Alan Hayward  <alan.hayward@arm.com>
19673             David Sherwood  <david.sherwood@arm.com>
19675         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19676         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19677         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19678         function.
19679         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19680         Use vect_truncate_gather_scatter_offset if we can't treat the
19681         operation as a normal gather load or scatter store.
19682         (get_group_load_store_type): Take the gather_scatter_info
19683         as argument.  Try using a gather load or scatter store for
19684         single-element groups.
19685         (get_load_store_type): Update calls to get_group_load_store_type
19686         and vect_use_strided_gather_scatters_p.
19688 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19689             Alan Hayward  <alan.hayward@arm.com>
19690             David Sherwood  <david.sherwood@arm.com>
19692         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19693         optional tree argument.
19694         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19695         null target hooks.
19696         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19697         but continue to use the current value as a fallback.
19698         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19699         to compare the updates.
19700         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19701         (get_load_store_type): Use it when handling a strided access.
19702         (vect_get_strided_load_store_ops): New function.
19703         (vect_get_data_ptr_increment): Likewise.
19704         (vectorizable_load): Handle strided gather loads.  Always pass
19705         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19707 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19708             Alan Hayward  <alan.hayward@arm.com>
19709             David Sherwood  <david.sherwood@arm.com>
19711         * doc/md.texi (gather_load@var{m}): Document.
19712         (mask_gather_load@var{m}): Likewise.
19713         * genopinit.c (main): Add supports_vec_gather_load and
19714         supports_vec_gather_load_cached to target_optabs.
19715         * optabs-tree.c (init_tree_optimization_optabs): Use
19716         ggc_cleared_alloc to allocate target_optabs.
19717         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19718         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19719         functions.
19720         * internal-fn.h (internal_load_fn_p): Declare.
19721         (internal_gather_scatter_fn_p): Likewise.
19722         (internal_fn_mask_index): Likewise.
19723         (internal_gather_scatter_fn_supported_p): Likewise.
19724         * internal-fn.c (gather_load_direct): New macro.
19725         (expand_gather_load_optab_fn): New function.
19726         (direct_gather_load_optab_supported_p): New macro.
19727         (direct_internal_fn_optab): New function.
19728         (internal_load_fn_p): Likewise.
19729         (internal_gather_scatter_fn_p): Likewise.
19730         (internal_fn_mask_index): Likewise.
19731         (internal_gather_scatter_fn_supported_p): Likewise.
19732         * optabs-query.c (supports_at_least_one_mode_p): New function.
19733         (supports_vec_gather_load_p): Likewise.
19734         * optabs-query.h (supports_vec_gather_load_p): Declare.
19735         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19736         and memory_type field.
19737         (NUM_PATTERNS): Bump to 15.
19738         * tree-vect-data-refs.c: Include internal-fn.h.
19739         (vect_gather_scatter_fn_p): New function.
19740         (vect_describe_gather_scatter_call): Likewise.
19741         (vect_check_gather_scatter): Try using internal functions for
19742         gather loads.  Recognize existing calls to a gather load function.
19743         (vect_analyze_data_refs): Consider using gather loads if
19744         supports_vec_gather_load_p.
19745         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19746         (vect_get_gather_scatter_offset_type): Likewise.
19747         (vect_convert_mask_for_vectype): Likewise.
19748         (vect_add_conversion_to_patterm): Likewise.
19749         (vect_try_gather_scatter_pattern): Likewise.
19750         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19751         (vect_vect_recog_func_ptrs): Add it.
19752         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19753         internal_fn_mask_index and internal_gather_scatter_fn_p.
19754         (check_load_store_masking): Take the gather_scatter_info as an
19755         argument and handle gather loads.
19756         (vect_get_gather_scatter_ops): New function.
19757         (vectorizable_call): Check internal_load_fn_p.
19758         (vectorizable_load): Likewise.  Handle gather load internal
19759         functions.
19760         (vectorizable_store): Update call to check_load_store_masking.
19761         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19762         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19763         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19764         (aarch64_gather_scale_operand_d): New predicates.
19765         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19766         (mask_gather_load<mode>): New insns.
19768 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19769             Alan Hayward  <alan.hayward@arm.com>
19770             David Sherwood  <david.sherwood@arm.com>
19772         * optabs.def (fold_left_plus_optab): New optab.
19773         * doc/md.texi (fold_left_plus_@var{m}): Document.
19774         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19775         * internal-fn.c (fold_left_direct): Define.
19776         (expand_fold_left_optab_fn): Likewise.
19777         (direct_fold_left_optab_supported_p): Likewise.
19778         * fold-const-call.c (fold_const_fold_left): New function.
19779         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19780         * tree-parloops.c (valid_reduction_p): New function.
19781         (gather_scalar_reductions): Use it.
19782         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19783         (vect_finish_replace_stmt): Declare.
19784         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19785         (needs_fold_left_reduction_p): New function, split out from...
19786         (vect_is_simple_reduction): ...here.  Accept reductions that
19787         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19788         (vect_force_simple_reduction): Also store the reduction type in
19789         the assignment's STMT_VINFO_REDUC_TYPE.
19790         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19791         (merge_with_identity): New function.
19792         (vect_expand_fold_left): Likewise.
19793         (vectorize_fold_left_reduction): Likewise.
19794         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19795         scalar phi in place for it.  Check for target support and reject
19796         cases that would reassociate the operation.  Defer the transform
19797         phase to vectorize_fold_left_reduction.
19798         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19799         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19800         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19802 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19804         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19805         call to ifc_temp_var.
19807 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19808             Alan Hayward  <alan.hayward@arm.com>
19809             David Sherwood  <david.sherwood@arm.com>
19811         * target.def (legitimize_address_displacement): Take the original
19812         offset as a poly_int.
19813         * targhooks.h (default_legitimize_address_displacement): Update
19814         accordingly.
19815         * targhooks.c (default_legitimize_address_displacement): Likewise.
19816         * doc/tm.texi: Regenerate.
19817         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19818         as an argument, moving assert of ad->disp == ad->disp_term to...
19819         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19820         Try calling targetm.legitimize_address_displacement before expanding
19821         the address rather than afterwards, and adjust for the new interface.
19822         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19823         Match the new hook interface.  Handle SVE addresses.
19824         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19825         new hook interface.
19827 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19829         * Makefile.in (OBJS): Add early-remat.o.
19830         * target.def (select_early_remat_modes): New hook.
19831         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19832         * doc/tm.texi: Regenerate.
19833         * targhooks.h (default_select_early_remat_modes): Declare.
19834         * targhooks.c (default_select_early_remat_modes): New function.
19835         * timevar.def (TV_EARLY_REMAT): New timevar.
19836         * passes.def (pass_early_remat): New pass.
19837         * tree-pass.h (make_pass_early_remat): Declare.
19838         * early-remat.c: New file.
19839         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19840         function.
19841         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19843 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19844             Alan Hayward  <alan.hayward@arm.com>
19845             David Sherwood  <david.sherwood@arm.com>
19847         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19848         vfm1 with a bound_epilog parameter.
19849         (vect_do_peeling): Update calls accordingly, and move the prologue
19850         call earlier in the function.  Treat the base bound_epilog as 0 for
19851         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19852         this base when peeling for gaps.
19853         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19854         with fully-masked loops.
19855         (vect_estimate_min_profitable_iters): Handle the single peeled
19856         iteration in that case.
19858 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19859             Alan Hayward  <alan.hayward@arm.com>
19860             David Sherwood  <david.sherwood@arm.com>
19862         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19863         single-element interleaving even if the size is not a power of 2.
19864         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19865         accesses for single-element interleaving if the group size is
19866         not a power of 2.
19868 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19869             Alan Hayward  <alan.hayward@arm.com>
19870             David Sherwood  <david.sherwood@arm.com>
19872         * doc/md.texi (fold_extract_last_@var{m}): Document.
19873         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19874         * optabs.def (fold_extract_last_optab): New optab.
19875         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19876         * internal-fn.c (fold_extract_direct): New macro.
19877         (expand_fold_extract_optab_fn): Likewise.
19878         (direct_fold_extract_optab_supported_p): Likewise.
19879         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19880         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19881         EXTRACT_LAST_REDUCTION.
19882         (get_initial_def_for_reduction): Do not create an initial vector
19883         for EXTRACT_LAST_REDUCTION reductions.
19884         (vectorizable_reduction): Leave the scalar phi in place for
19885         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19886         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19887         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19888         transform phase to vectorizable_condition.
19889         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19890         split out from...
19891         (vect_finish_stmt_generation): ...here.
19892         (vect_finish_replace_stmt): New function.
19893         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19894         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19895         pattern.
19896         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19898 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19899             Alan Hayward  <alan.hayward@arm.com>
19900             David Sherwood  <david.sherwood@arm.com>
19902         * doc/md.texi (extract_last_@var{m}): Document.
19903         * optabs.def (extract_last_optab): New optab.
19904         * internal-fn.def (EXTRACT_LAST): New internal function.
19905         * internal-fn.c (cond_unary_direct): New macro.
19906         (expand_cond_unary_optab_fn): Likewise.
19907         (direct_cond_unary_optab_supported_p): Likewise.
19908         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19909         loops using EXTRACT_LAST.
19910         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19911         (extract_last_<mode>): ...this optab.
19912         (vec_extract<mode><Vel>): Update accordingly.
19914 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19915             Alan Hayward  <alan.hayward@arm.com>
19916             David Sherwood  <david.sherwood@arm.com>
19918         * target.def (empty_mask_is_expensive): New hook.
19919         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19920         * doc/tm.texi: Regenerate.
19921         * targhooks.h (default_empty_mask_is_expensive): Declare.
19922         * targhooks.c (default_empty_mask_is_expensive): New function.
19923         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19924         if the target says that empty masks are expensive.
19925         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19926         New function.
19927         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19929 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19930             Alan Hayward  <alan.hayward@arm.com>
19931             David Sherwood  <david.sherwood@arm.com>
19933         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19934         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19935         (vect_use_loop_mask_for_alignment_p): New function.
19936         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19937         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19938         niters_skip argument.  Make sure that the first niters_skip elements
19939         of the first iteration are inactive.
19940         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19941         Update call to vect_set_loop_masks_directly.
19942         (get_misalign_in_elems): New function, split out from...
19943         (vect_gen_prolog_loop_niters): ...here.
19944         (vect_update_init_of_dr): Take a code argument that specifies whether
19945         the adjustment should be added or subtracted.
19946         (vect_update_init_of_drs): Likewise.
19947         (vect_prepare_for_masked_peels): New function.
19948         (vect_do_peeling): Skip prologue peeling if we're using a mask
19949         instead.  Update call to vect_update_inits_of_drs.
19950         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19951         mask_skip_niters.
19952         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19953         alignment.  Do not include the number of peeled iterations in
19954         the minimum threshold in that case.
19955         (vectorizable_induction): Adjust the start value down by
19956         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19957         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19958         Take the number of skipped iterations into account when calculating
19959         the loop bounds.
19960         * tree-vect-stmts.c (vect_gen_while_not): New function.
19962 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19963             Alan Hayward  <alan.hayward@arm.com>
19964             David Sherwood  <david.sherwood@arm.com>
19966         * doc/sourcebuild.texi (vect_fully_masked): Document.
19967         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19968         default value to 0.
19969         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19970         split out from...
19971         (vect_analyze_loop_2): ...here. Don't check the vectorization
19972         factor against the number of loop iterations if the loop is
19973         fully-masked.
19975 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19976             Alan Hayward  <alan.hayward@arm.com>
19977             David Sherwood  <david.sherwood@arm.com>
19979         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19980         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19981         (dump_groups): Update accordingly.
19982         (iv_use::mem_type): New member variable.
19983         (address_p): New function.
19984         (record_use): Add a mem_type argument and initialize the new
19985         mem_type field.
19986         (record_group_use): Add a mem_type argument.  Use address_p.
19987         Remove obsolete null checks of base_object.  Update call to record_use.
19988         (find_interesting_uses_op): Update call to record_group_use.
19989         (find_interesting_uses_cond): Likewise.
19990         (find_interesting_uses_address): Likewise.
19991         (get_mem_type_for_internal_fn): New function.
19992         (find_address_like_use): Likewise.
19993         (find_interesting_uses_stmt): Try find_address_like_use before
19994         calling find_interesting_uses_op.
19995         (addr_offset_valid_p): Use the iv mem_type field as the type
19996         of the addressed memory.
19997         (add_autoinc_candidates): Likewise.
19998         (get_address_cost): Likewise.
19999         (split_small_address_groups_p): Use address_p.
20000         (split_address_groups): Likewise.
20001         (add_iv_candidate_for_use): Likewise.
20002         (autoinc_possible_for_pair): Likewise.
20003         (rewrite_groups): Likewise.
20004         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
20005         (determine_group_iv_cost): Update after split of USE_ADDRESS.
20006         (get_alias_ptr_type_for_ptr_address): New function.
20007         (rewrite_use_address): Rewrite address uses in calls that were
20008         identified by find_address_like_use.
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         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
20015         TARGET_MEM_REFs.
20016         * gimple-expr.h (is_gimple_addressable: Likewise.
20017         * gimple-expr.c (is_gimple_address): Likewise.
20018         * internal-fn.c (expand_call_mem_ref): New function.
20019         (expand_mask_load_optab_fn): Use it.
20020         (expand_mask_store_optab_fn): Likewise.
20022 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20023             Alan Hayward  <alan.hayward@arm.com>
20024             David Sherwood  <david.sherwood@arm.com>
20026         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
20027         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
20028         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
20029         (cond_umax@var{mode}): Document.
20030         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
20031         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
20032         (cond_umin_optab, cond_umax_optab): New optabs.
20033         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
20034         (COND_IOR, COND_XOR): New internal functions.
20035         * internal-fn.h (get_conditional_internal_fn): Declare.
20036         * internal-fn.c (cond_binary_direct): New macro.
20037         (expand_cond_binary_optab_fn): Likewise.
20038         (direct_cond_binary_optab_supported_p): Likewise.
20039         (get_conditional_internal_fn): New function.
20040         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
20041         Cope with reduction statements that are vectorized as calls rather
20042         than assignments.
20043         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
20044         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
20045         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
20046         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20047         (UNSPEC_COND_EOR): New unspecs.
20048         (optab): Add mappings for them.
20049         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
20050         (sve_int_op, sve_fp_op): New int attributes.
20052 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20053             Alan Hayward  <alan.hayward@arm.com>
20054             David Sherwood  <david.sherwood@arm.com>
20056         * optabs.def (while_ult_optab): New optab.
20057         * doc/md.texi (while_ult@var{m}@var{n}): Document.
20058         * internal-fn.def (WHILE_ULT): New internal function.
20059         * internal-fn.h (direct_internal_fn_supported_p): New override
20060         that takes two types as argument.
20061         * internal-fn.c (while_direct): New macro.
20062         (expand_while_optab_fn): New function.
20063         (convert_optab_supported_p): Likewise.
20064         (direct_while_optab_supported_p): New macro.
20065         * wide-int.h (wi::udiv_ceil): New function.
20066         * tree-vectorizer.h (rgroup_masks): New structure.
20067         (vec_loop_masks): New typedef.
20068         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
20069         and fully_masked_p.
20070         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
20071         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
20072         (vect_max_vf): New function.
20073         (slpeel_make_loop_iterate_ntimes): Delete.
20074         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
20075         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
20076         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
20077         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
20078         internal-fn.h, stor-layout.h and optabs-query.h.
20079         (vect_set_loop_mask): New function.
20080         (add_preheader_seq): Likewise.
20081         (add_header_seq): Likewise.
20082         (interleave_supported_p): Likewise.
20083         (vect_maybe_permute_loop_masks): Likewise.
20084         (vect_set_loop_masks_directly): Likewise.
20085         (vect_set_loop_condition_masked): Likewise.
20086         (vect_set_loop_condition_unmasked): New function, split out from
20087         slpeel_make_loop_iterate_ntimes.
20088         (slpeel_make_loop_iterate_ntimes): Rename to..
20089         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
20090         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
20091         (vect_do_peeling): Update call accordingly.
20092         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
20093         loops.
20094         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
20095         mask_compare_type, can_fully_mask_p and fully_masked_p.
20096         (release_vec_loop_masks): New function.
20097         (_loop_vec_info): Use it to free the loop masks.
20098         (can_produce_all_loop_masks_p): New function.
20099         (vect_get_max_nscalars_per_iter): Likewise.
20100         (vect_verify_full_masking): Likewise.
20101         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
20102         retries, and free the mask rgroups before retrying.  Check loop-wide
20103         reasons for disallowing fully-masked loops.  Make the final decision
20104         about whether use a fully-masked loop or not.
20105         (vect_estimate_min_profitable_iters): Do not assume that peeling
20106         for the number of iterations will be needed for fully-masked loops.
20107         (vectorizable_reduction): Disable fully-masked loops.
20108         (vectorizable_live_operation): Likewise.
20109         (vect_halve_mask_nunits): New function.
20110         (vect_double_mask_nunits): Likewise.
20111         (vect_record_loop_mask): Likewise.
20112         (vect_get_loop_mask): Likewise.
20113         (vect_transform_loop): Handle the case in which the final loop
20114         iteration might handle a partial vector.  Call vect_set_loop_condition
20115         instead of slpeel_make_loop_iterate_ntimes.
20116         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20117         (check_load_store_masking): New function.
20118         (prepare_load_store_mask): Likewise.
20119         (vectorizable_store): Handle fully-masked loops.
20120         (vectorizable_load): Likewise.
20121         (supportable_widening_operation): Use vect_halve_mask_nunits for
20122         booleans.
20123         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20124         (vect_gen_while): New function.
20125         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20126         (aarch64_uqdec<mode>): New insn.
20128 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20129             Alan Hayward  <alan.hayward@arm.com>
20130             David Sherwood  <david.sherwood@arm.com>
20132         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20133         (reduc_xor_scal_optab): New optabs.
20134         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20135         (reduc_xor_scal_@var{m}): Document.
20136         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20137         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20138         internal functions.
20139         * fold-const-call.c (fold_const_call): Handle them.
20140         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20141         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20142         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20143         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20144         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20145         (UNSPEC_XORV): New unspecs.
20146         (optab): Add entries for them.
20147         (BITWISEV): New int iterator.
20148         (bit_reduc_op): New int attributes.
20150 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20151             Alan Hayward  <alan.hayward@arm.com>
20152             David Sherwood  <david.sherwood@arm.com>
20154         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20155         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20156         * optabs.def (vec_shl_insert_optab): New optab.
20157         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20158         (duplicate_and_interleave): Likewise.
20159         * tree-vect-loop.c: Include internal-fn.h.
20160         (neutral_op_for_slp_reduction): New function, split out from
20161         get_initial_defs_for_reduction.
20162         (get_initial_def_for_reduction): Handle option 2 for variable-length
20163         vectors by loading the neutral value into a vector and then shifting
20164         the initial value into element 0.
20165         (get_initial_defs_for_reduction): Replace the code argument with
20166         the neutral value calculated by neutral_op_for_slp_reduction.
20167         Use gimple_build_vector for constant-length vectors.
20168         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20169         but the first group_size elements have a neutral value.
20170         Use duplicate_and_interleave otherwise.
20171         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20172         Update call to get_initial_defs_for_reduction.  Handle SLP
20173         reductions for variable-length vectors by creating one vector
20174         result for each scalar result, with the elements associated
20175         with other scalar results stubbed out with the neutral value.
20176         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20177         Require IFN_VEC_SHL_INSERT for double reductions on
20178         variable-length vectors, or SLP reductions that have
20179         a neutral value.  Require can_duplicate_and_interleave_p
20180         support for variable-length unchained SLP reductions if there
20181         is no neutral value, such as for MIN/MAX reductions.  Also require
20182         the number of vector elements to be a multiple of the number of
20183         SLP statements when doing variable-length unchained SLP reductions.
20184         Update call to vect_create_epilog_for_reduction.
20185         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20186         and remove initial values.
20187         (duplicate_and_interleave): Make public.
20188         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20189         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20191 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20192             Alan Hayward  <alan.hayward@arm.com>
20193             David Sherwood  <david.sherwood@arm.com>
20195         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20196         (can_duplicate_and_interleave_p): New function.
20197         (vect_get_and_check_slp_defs): Take the vector of statements
20198         rather than just the current one.  Remove excess parentheses.
20199         Restriction rejectinon of vect_constant_def and vect_external_def
20200         for variable-length vectors to boolean types, or types for which
20201         can_duplicate_and_interleave_p is false.
20202         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20203         (duplicate_and_interleave): New function.
20204         (vect_get_constant_vectors): Use gimple_build_vector for
20205         constant-length vectors and suitable variable-length constant
20206         vectors.  Use duplicate_and_interleave for other variable-length
20207         vectors.  Don't defer the update when inserting new statements.
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         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20214         min_profitable_iters doesn't go negative.
20216 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20217             Alan Hayward  <alan.hayward@arm.com>
20218             David Sherwood  <david.sherwood@arm.com>
20220         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20221         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20222         * optabs.def (vec_mask_load_lanes_optab): New optab.
20223         (vec_mask_store_lanes_optab): Likewise.
20224         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20225         (MASK_STORE_LANES): Likewise.
20226         * internal-fn.c (mask_load_lanes_direct): New macro.
20227         (mask_store_lanes_direct): Likewise.
20228         (expand_mask_load_optab_fn): Handle masked operations.
20229         (expand_mask_load_lanes_optab_fn): New macro.
20230         (expand_mask_store_optab_fn): Handle masked operations.
20231         (expand_mask_store_lanes_optab_fn): New macro.
20232         (direct_mask_load_lanes_optab_supported_p): Likewise.
20233         (direct_mask_store_lanes_optab_supported_p): Likewise.
20234         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20235         parameter.
20236         (vect_load_lanes_supported): Likewise.
20237         * tree-vect-data-refs.c (strip_conversion): New function.
20238         (can_group_stmts_p): Likewise.
20239         (vect_analyze_data_ref_accesses): Use it instead of checking
20240         for a pair of assignments.
20241         (vect_store_lanes_supported): Take a masked_p parameter.
20242         (vect_load_lanes_supported): Likewise.
20243         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20244         vect_store_lanes_supported and vect_load_lanes_supported.
20245         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20246         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20247         parameter.  Don't allow gaps for masked accesses.
20248         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20249         and vect_load_lanes_supported.
20250         (get_load_store_type): Take a masked_p parameter and update
20251         call to get_group_load_store_type.
20252         (vectorizable_store): Update call to get_load_store_type.
20253         Handle IFN_MASK_STORE_LANES.
20254         (vectorizable_load): Update call to get_load_store_type.
20255         Handle IFN_MASK_LOAD_LANES.
20257 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20258             Alan Hayward  <alan.hayward@arm.com>
20259             David Sherwood  <david.sherwood@arm.com>
20261         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20262         modes for SVE.
20263         * config/aarch64/aarch64-protos.h
20264         (aarch64_sve_struct_memory_operand_p): Declare.
20265         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20266         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20267         (VPRED, vpred): Handle SVE structure modes.
20268         * config/aarch64/constraints.md (Utx): New constraint.
20269         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20270         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20271         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20272         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20273         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20274         structure modes.  Split into pieces after RA.
20275         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20276         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20277         New patterns.
20278         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20279         SVE structure modes.
20280         (aarch64_classify_address): Likewise.
20281         (sizetochar): Move earlier in file.
20282         (aarch64_print_operand): Handle SVE register lists.
20283         (aarch64_array_mode): New function.
20284         (aarch64_sve_struct_memory_operand_p): Likewise.
20285         (TARGET_ARRAY_MODE): Redefine.
20287 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20288             Alan Hayward  <alan.hayward@arm.com>
20289             David Sherwood  <david.sherwood@arm.com>
20291         * target.def (array_mode): New target hook.
20292         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20293         * doc/tm.texi: Regenerate.
20294         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20295         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20296         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20297         targetm.array_mode.
20298         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20299         type sizes.
20301 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20302             Alan Hayward  <alan.hayward@arm.com>
20303             David Sherwood  <david.sherwood@arm.com>
20305         * fold-const.c (fold_binary_loc): Check the argument types
20306         rather than the result type when testing for a vector operation.
20308 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20310         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20311         * doc/tm.texi: Regenerate.
20313 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20314             Alan Hayward  <alan.hayward@arm.com>
20315             David Sherwood  <david.sherwood@arm.com>
20317         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20318         (sve): Document new AArch64 extension.
20319         * doc/md.texi (w): Extend the description of the AArch64
20320         constraint to include SVE vectors.
20321         (Upl, Upa): Document new AArch64 predicate constraints.
20322         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20323         enum.
20324         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20325         (msve-vector-bits=): New option.
20326         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20327         SVE when these are disabled.
20328         (sve): New extension.
20329         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20330         modes.  Adjust their number of units based on aarch64_sve_vg.
20331         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20332         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20333         aarch64_addr_query_type.
20334         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20335         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20336         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20337         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20338         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20339         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20340         (aarch64_simd_imm_zero_p): Delete.
20341         (aarch64_check_zero_based_sve_index_immediate): Declare.
20342         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20343         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20344         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20345         (aarch64_sve_float_mul_immediate_p): Likewise.
20346         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20347         rather than an rtx.
20348         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20349         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20350         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20351         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20352         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20353         (aarch64_regmode_natural_size): Likewise.
20354         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20355         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20356         left one place.
20357         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20358         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20359         for VG and the SVE predicate registers.
20360         (V_ALIASES): Add a "z"-prefixed alias.
20361         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20362         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20363         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20364         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20365         (REG_CLASS_NAMES): Add entries for them.
20366         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20367         and the predicate registers.
20368         (aarch64_sve_vg): Declare.
20369         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20370         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20371         (REGMODE_NATURAL_SIZE): Define.
20372         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20373         SVE macros.
20374         * config/aarch64/aarch64.c: Include cfgrtl.h.
20375         (simd_immediate_info): Add a constructor for series vectors,
20376         and an associated step field.
20377         (aarch64_sve_vg): New variable.
20378         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20379         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20380         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20381         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20382         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20383         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20384         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20385         (aarch64_get_mask_mode): New functions.
20386         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20387         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20388         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20389         predicate modes and predicate registers.  Explicitly restrict
20390         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20391         to store a vector mode if it is recognized by
20392         aarch64_classify_vector_mode.
20393         (aarch64_regmode_natural_size): New function.
20394         (aarch64_hard_regno_caller_save_mode): Return the original mode
20395         for predicates.
20396         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20397         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20398         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20399         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20400         functions.
20401         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20402         does not overlap dest if the function is frame-related.  Handle
20403         SVE constants.
20404         (aarch64_split_add_offset): New function.
20405         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20406         them aarch64_add_offset.
20407         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20408         and update call to aarch64_sub_sp.
20409         (aarch64_add_cfa_expression): New function.
20410         (aarch64_expand_prologue): Pass extra temporary registers to the
20411         functions above.  Handle the case in which we need to emit new
20412         DW_CFA_expressions for registers that were originally saved
20413         relative to the stack pointer, but now have to be expressed
20414         relative to the frame pointer.
20415         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20416         functions above.
20417         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20418         IP0 and IP1 values for SVE frames.
20419         (aarch64_expand_vec_series): New function.
20420         (aarch64_expand_sve_widened_duplicate): Likewise.
20421         (aarch64_expand_sve_const_vector): Likewise.
20422         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20423         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20424         into the register, rather than emitting a SET directly.
20425         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20426         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20427         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20428         (offset_9bit_signed_scaled_p): New functions.
20429         (aarch64_replicate_bitmask_imm): New function.
20430         (aarch64_bitmask_imm): Use it.
20431         (aarch64_cannot_force_const_mem): Reject expressions involving
20432         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20433         (aarch64_classify_index): Handle SVE indices, by requiring
20434         a plain register index with a scale that matches the element size.
20435         (aarch64_classify_address): Handle SVE addresses.  Assert that
20436         the mode of the address is VOIDmode or an integer mode.
20437         Update call to aarch64_classify_symbol.
20438         (aarch64_classify_symbolic_expression): Update call to
20439         aarch64_classify_symbol.
20440         (aarch64_const_vec_all_in_range_p): New function.
20441         (aarch64_print_vector_float_operand): Likewise.
20442         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20443         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20444         and the FP immediates 1.0 and 0.5.
20445         (aarch64_print_address_internal): Handle SVE addresses.
20446         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20447         (aarch64_regno_regclass): Handle predicate registers.
20448         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20449         data modes.
20450         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20451         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20452         (aarch64_convert_sve_vector_bits): New function.
20453         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20454         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20455         rather than an rtx.
20456         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20457         Handle SVE vector and predicate modes.  Accept VL-based constants
20458         that need only one temporary register, and VL offsets that require
20459         no temporary registers.
20460         (aarch64_conditional_register_usage): Mark the predicate registers
20461         as fixed if SVE isn't available.
20462         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20463         Return true for SVE vector and predicate modes.
20464         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20465         rather than an unsigned int.  Handle SVE modes.
20466         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20467         SVE modes.
20468         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20469         if SVE is enabled.
20470         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20471         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20472         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20473         (aarch64_sve_float_mul_immediate_p): New functions.
20474         (aarch64_sve_valid_immediate): New function.
20475         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20476         Explicitly reject structure modes.  Check for INDEX constants.
20477         Handle PTRUE and PFALSE constants.
20478         (aarch64_check_zero_based_sve_index_immediate): New function.
20479         (aarch64_simd_imm_zero_p): Delete.
20480         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20481         vector modes.  Accept constants in the range of CNT[BHWD].
20482         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20483         ask for an Advanced SIMD mode.
20484         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20485         (aarch64_simd_vector_alignment): Handle SVE predicates.
20486         (aarch64_vectorize_preferred_vector_alignment): New function.
20487         (aarch64_simd_vector_alignment_reachable): Use it instead of
20488         the vector size.
20489         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20490         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20491         functions.
20492         (MAX_VECT_LEN): Delete.
20493         (expand_vec_perm_d): Add a vec_flags field.
20494         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20495         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20496         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20497         for SVE modes.
20498         (aarch64_evpc_rev): Rename to...
20499         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20500         (aarch64_evpc_rev_global): New function.
20501         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20502         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20503         MAX_VECT_LEN.
20504         (aarch64_evpc_sve_tbl): New function.
20505         (aarch64_expand_vec_perm_const_1): Update after rename of
20506         aarch64_evpc_rev.  Handle SVE permutes too, trying
20507         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20508         than aarch64_evpc_tbl.
20509         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20510         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20511         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20512         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20513         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20514         (aarch64_expand_sve_vcond): New functions.
20515         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20516         of aarch64_vector_mode_p.
20517         (aarch64_dwarf_poly_indeterminate_value): New function.
20518         (aarch64_compute_pressure_classes): Likewise.
20519         (aarch64_can_change_mode_class): Likewise.
20520         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20521         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20522         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20523         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20524         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20525         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20526         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20527         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20528         constraints.
20529         (Dn, Dl, Dr): Accept const as well as const_vector.
20530         (Dz): Likewise.  Compare against CONST0_RTX.
20531         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20532         of "vector" where appropriate.
20533         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20534         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20535         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20536         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20537         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20538         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20539         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20540         (v_int_equiv): Extend to SVE modes.
20541         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20542         mode attributes.
20543         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20544         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20545         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20546         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20547         (SVE_COND_FP_CMP): New int iterators.
20548         (perm_hilo): Handle the new unpack unspecs.
20549         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20550         attributes.
20551         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20552         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20553         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20554         (aarch64_equality_operator, aarch64_constant_vector_operand)
20555         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20556         (aarch64_sve_nonimmediate_operand): Likewise.
20557         (aarch64_sve_general_operand): Likewise.
20558         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20559         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20560         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20561         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20562         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20563         (aarch64_sve_float_arith_immediate): Likewise.
20564         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20565         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20566         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20567         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20568         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20569         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20570         (aarch64_sve_float_arith_operand): Likewise.
20571         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20572         (aarch64_sve_float_mul_operand): Likewise.
20573         (aarch64_sve_vec_perm_operand): Likewise.
20574         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20575         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20576         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20577         as well as const_vector.
20578         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20579         in file.  Use CONST0_RTX and CONSTM1_RTX.
20580         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20581         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20582         Use aarch64_simd_imm_zero.
20583         * config/aarch64/aarch64-sve.md: New file.
20584         * config/aarch64/aarch64.md: Include it.
20585         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20586         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20587         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20588         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20589         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20590         (sve): New attribute.
20591         (enabled): Disable instructions with the sve attribute unless
20592         TARGET_SVE.
20593         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20594         aarch64_expand_mov_immediate.
20595         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20596         CNT[BHSD] immediates.
20597         (movti): Split CONST_POLY_INT moves into two halves.
20598         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20599         Split additions that need a temporary here if the destination
20600         is the stack pointer.
20601         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20602         (*add<mode>3_poly_1): New instruction.
20603         (set_clobber_cc): New expander.
20605 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20607         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20608         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20609         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20610         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20611         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20612         Change innermode from fixed_mode_size to machine_mode.
20613         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20614         subreg of a variable-length CONST_VECTOR.
20616 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20617             Alan Hayward  <alan.hayward@arm.com>
20618             David Sherwood  <david.sherwood@arm.com>
20620         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20621         (add_offset_to_base): New function, split out from...
20622         (create_mem_ref): ...here.  When handling a scale other than 1,
20623         check first whether the address is valid without the offset.
20624         Add it into the base if so, leaving the index and scale as-is.
20626 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20628         PR c++/83778
20629         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20630         fold_for_warn before checking if arg2 is INTEGER_CST.
20632 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20634         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20635         (store_multiple_operation): Delete.
20636         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20637         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20638         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20639         guarded by TARGET_STRING.
20640         (rs6000_output_load_multiple): Delete.
20641         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20642         OPTION_MASK_STRING / TARGET_STRING handling.
20643         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20644         (const rs6000_opt_masks) <"string">: Change mask to 0.
20645         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20646         (MASK_STRING): Delete.
20647         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20648         parts.  Simplify.
20649         (load_multiple): Delete.
20650         (*ldmsi8): Delete.
20651         (*ldmsi7): Delete.
20652         (*ldmsi6): Delete.
20653         (*ldmsi5): Delete.
20654         (*ldmsi4): Delete.
20655         (*ldmsi3): Delete.
20656         (store_multiple): Delete.
20657         (*stmsi8): Delete.
20658         (*stmsi7): Delete.
20659         (*stmsi6): Delete.
20660         (*stmsi5): Delete.
20661         (*stmsi4): Delete.
20662         (*stmsi3): Delete.
20663         (movmemsi_8reg): Delete.
20664         (corresponding unnamed define_insn): Delete.
20665         (movmemsi_6reg): Delete.
20666         (corresponding unnamed define_insn): Delete.
20667         (movmemsi_4reg): Delete.
20668         (corresponding unnamed define_insn): Delete.
20669         (movmemsi_2reg): Delete.
20670         (corresponding unnamed define_insn): Delete.
20671         (movmemsi_1reg): Delete.
20672         (corresponding unnamed define_insn): Delete.
20673         * config/rs6000/rs6000.opt (mno-string): New.
20674         (mstring): Replace by deprecation warning stub.
20675         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20677 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20679         * regrename.c (regrename_do_replace): If replacing the same
20680         reg multiple times, try to reuse last created gen_raw_REG.
20682         PR debug/81155
20683         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20684         main to workaround a bug in GDB.
20686 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20688         PR target/83737
20689         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20691 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20693         PR rtl-optimization/80481
20694         * ira-color.c (get_cap_member): New function.
20695         (allocnos_conflict_by_live_ranges_p): Use it.
20696         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20697         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20699 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20701         PR target/83628
20702         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20703         (*saddl_se_1): Ditto.
20704         (*ssubsi_1): Ditto.
20705         (*ssubl_se_1): Ditto.
20707 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20709         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20710         rather than wi::to_widest for DR_INITs.
20711         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20712         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20713         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20714         INTEGER_CSTs.
20715         (vect_analyze_group_access_1): Note that here.
20717 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20719         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20720         polynomial type sizes.
20722 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20724         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20725         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20726         (gimple_add_tmp_var): Likewise.
20728 2018-01-12  Martin Liska  <mliska@suse.cz>
20730         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20731         (gimple_alloc_sizes): Likewise.
20732         (dump_gimple_statistics): Use PRIu64 in printf format.
20733         * gimple.h: Change uint64_t to int.
20735 2018-01-12  Martin Liska  <mliska@suse.cz>
20737         * tree-core.h: Use uint64_t instead of int.
20738         * tree.c (tree_node_counts): Likewise.
20739         (tree_node_sizes): Likewise.
20740         (dump_tree_statistics): Use PRIu64 in printf format.
20742 2018-01-12  Martin Liska  <mliska@suse.cz>
20744         * Makefile.in: As qsort_chk is implemented in vec.c, add
20745         vec.o to linkage of gencfn-macros.
20746         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20747         passing the info to record_node_allocation_statistics.
20748         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20749         and pass the info.
20750         * ggc-common.c (struct ggc_usage): Add operator== and use
20751         it in operator< and compare function.
20752         * mem-stats.h (struct mem_usage): Likewise.
20753         * vec.c (struct vec_usage): Remove operator< and compare
20754         function. Can be simply inherited.
20756 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20758         PR target/81616
20759         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20760         * tree-ssa-math-opts.c: Include domwalk.h.
20761         (convert_mult_to_fma_1): New function.
20762         (fma_transformation_info): New type.
20763         (fma_deferring_state): Likewise.
20764         (cancel_fma_deferring): New function.
20765         (result_of_phi): Likewise.
20766         (last_fma_candidate_feeds_initial_phi): Likewise.
20767         (convert_mult_to_fma): Added deferring logic, split actual
20768         transformation to convert_mult_to_fma_1.
20769         (math_opts_dom_walker): New type.
20770         (math_opts_dom_walker::after_dom_children): New method, body moved
20771         here from pass_optimize_widening_mul::execute, added deferring logic
20772         bits.
20773         (pass_optimize_widening_mul::execute): Moved most of code to
20774         math_opts_dom_walker::after_dom_children.
20775         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20776         * config/i386/i386.c (ix86_option_override_internal): Added
20777         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20779 2018-01-12  Richard Biener  <rguenther@suse.de>
20781         PR debug/83157
20782         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20783         inline instance vars.
20785 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20787         PR target/81819
20788         * config/rx/rx.c (rx_is_restricted_memory_address):
20789         Handle SUBREG case.
20791 2018-01-12  Richard Biener  <rguenther@suse.de>
20793         PR tree-optimization/80846
20794         * target.def (split_reduction): New target hook.
20795         * targhooks.c (default_split_reduction): New function.
20796         * targhooks.h (default_split_reduction): Declare.
20797         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20798         target requests first reduce vectors by combining low and high
20799         parts.
20800         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20801         (get_vectype_for_scalar_type_and_size): Export.
20802         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20803         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20804         * doc/tm.texi: Regenerate.
20805         * config/i386/i386.c (ix86_split_reduction): Implement
20806         TARGET_VECTORIZE_SPLIT_REDUCTION.
20808 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20810         PR target/83368
20811         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20812         in PIC mode except for TARGET_VXWORKS_RTP.
20813         * config/sparc/sparc.c: Include cfgrtl.h.
20814         (TARGET_INIT_PIC_REG): Define.
20815         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20816         (sparc_pic_register_p): New predicate.
20817         (sparc_legitimate_address_p): Use it.
20818         (sparc_legitimize_pic_address): Likewise.
20819         (sparc_delegitimize_address): Likewise.
20820         (sparc_mode_dependent_address_p): Likewise.
20821         (gen_load_pcrel_sym): Remove 4th parameter.
20822         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20823         (sparc_expand_prologue): Do not call load_got_register here.
20824         (sparc_flat_expand_prologue): Likewise.
20825         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20826         (sparc_use_pseudo_pic_reg): New function.
20827         (sparc_init_pic_reg): Likewise.
20828         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20829         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20831 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20833         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20834         Add item for branch_cost.
20836 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20838         PR rtl-optimization/83565
20839         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20840         not extend the result to a larger mode for rotate operations.
20841         (num_sign_bit_copies1): Likewise.
20843 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20845         PR target/40411
20846         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20847         -symbolic.
20848         Use values-Xc.o for -pedantic.
20849         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20851 2018-01-12  Martin Liska  <mliska@suse.cz>
20853         PR ipa/83054
20854         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20855         New function.
20856         (possible_polymorphic_call_targets): Use it.
20857         (ipa_devirt): Likewise.
20859 2018-01-12  Martin Liska  <mliska@suse.cz>
20861         * profile-count.h (enum profile_quality): Use 0 as invalid
20862         enum value of profile_quality.
20864 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20866         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20867         -mext-string options.
20869 2018-01-12  Richard Biener  <rguenther@suse.de>
20871         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20872         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20873         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20874         Likewise.
20875         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20877 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20879         * configure.ac (--with-long-double-format): Add support for the
20880         configuration option to change the default long double format on
20881         PowerPC systems.
20882         * config.gcc (powerpc*-linux*-*): Likewise.
20883         * configure: Regenerate.
20884         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20885         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20886         used without modification.
20888 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20890         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20891         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20892         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20893         MISC_BUILTIN_SPEC_BARRIER.
20894         (rs6000_init_builtins): Likewise.
20895         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20896         enum value.
20897         (speculation_barrier): New define_insn.
20898         * doc/extend.texi: Document __builtin_speculation_barrier.
20900 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20902         PR target/83203
20903         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20904         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20905         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20906         iterators.
20907         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20908         integral modes instead of "ss" and "sd".
20909         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20910         vectors with 32-bit and 64-bit elements.
20911         (vecdupssescalarmodesuffix): New mode attribute.
20912         (vec_dup<mode>): Use it.
20914 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20916         PR target/83330
20917         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20918         frame if argument is passed on stack.
20920 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20922         PR target/82682
20923         * ree.c (combine_reaching_defs): Optimize also
20924         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20925         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20927 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20929         PR middle-end/83189
20930         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20932 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20934         PR middle-end/83718
20935         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20936         after they are computed.
20938 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20940         PR tree-optimization/83695
20941         * gimple-loop-linterchange.cc
20942         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20943         reset cached scev information after interchange.
20944         (pass_linterchange::execute): Remove call to scev_reset_htab.
20946 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20948         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20949         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20950         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20951         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20952         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20953         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20954         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20955         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20956         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20957         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20958         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20959         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20960         (V_lane_reg): Likewise.
20961         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20962         New define_expand.
20963         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20964         (vfmal_lane_low<mode>_intrinsic,
20965         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20966         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20967         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20968         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20969         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20970         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20972 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20974         * config/arm/arm-cpus.in (fp16fml): New feature.
20975         (ALL_SIMD): Add fp16fml.
20976         (armv8.2-a): Add fp16fml as an option.
20977         (armv8.3-a): Likewise.
20978         (armv8.4-a): Add fp16fml as part of fp16.
20979         * config/arm/arm.h (TARGET_FP16FML): Define.
20980         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20981         when appropriate.
20982         * config/arm/arm-modes.def (V2HF): Define.
20983         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20984         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20985         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20986         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20987         vfmsl_low, vfmsl_high): New set of builtins.
20988         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20989         (vfml_op): New code attribute.
20990         (VFMLHALVES): New int iterator.
20991         (VFML, VFMLSEL): New mode attributes.
20992         (V_reg): Define mapping for V2HF.
20993         (V_hi, V_lo): New mode attributes.
20994         (VF_constraint): Likewise.
20995         (vfml_half, vfml_half_selector): New int attributes.
20996         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20997         define_expand.
20998         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20999         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
21000         New define_insn.
21001         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
21002         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
21003         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
21004         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
21005         documentation.
21006         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
21007         Document new effective target and option set.
21009 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21011         * config/arm/arm-cpus.in (armv8_4): New feature.
21012         (ARMv8_4a): New fgroup.
21013         (armv8.4-a): New arch.
21014         * config/arm/arm-tables.opt: Regenerate.
21015         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
21016         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
21017         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
21018         Add matching rules for -march=armv8.4-a and extensions.
21019         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
21021 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
21023         PR target/81821
21024         * config/rx/rx.md (BW): New mode attribute.
21025         (sync_lock_test_and_setsi): Add mode suffix to insn output.
21027 2018-01-11  Richard Biener  <rguenther@suse.de>
21029         PR tree-optimization/83435
21030         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
21031         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
21032         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
21034 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21035             Alan Hayward  <alan.hayward@arm.com>
21036             David Sherwood  <david.sherwood@arm.com>
21038         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
21039         field.
21040         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
21041         (aarch64_print_address_internal): Use it to check for a zero offset.
21043 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21044             Alan Hayward  <alan.hayward@arm.com>
21045             David Sherwood  <david.sherwood@arm.com>
21047         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
21048         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
21049         Return a poly_int64 rather than a HOST_WIDE_INT.
21050         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
21051         rather than a HOST_WIDE_INT.
21052         * config/aarch64/aarch64.h (aarch64_frame): Protect with
21053         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
21054         hard_fp_offset, frame_size, initial_adjust, callee_offset and
21055         final_offset from HOST_WIDE_INT to poly_int64.
21056         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
21057         to_constant when getting the number of units in an Advanced SIMD
21058         mode.
21059         (aarch64_builtin_vectorized_function): Check for a constant number
21060         of units.
21061         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
21062         GET_MODE_SIZE.
21063         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
21064         attribute instead of GET_MODE_NUNITS.
21065         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
21066         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
21067         GET_MODE_SIZE for fixed-size registers.
21068         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
21069         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
21070         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
21071         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
21072         (aarch64_print_operand, aarch64_print_address_internal)
21073         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
21074         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
21075         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
21076         Handle polynomial GET_MODE_SIZE.
21077         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
21078         wider than SImode without modification.
21079         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
21080         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
21081         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
21082         passing and returning SVE modes.
21083         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
21084         rather than GEN_INT.
21085         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
21086         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
21087         (aarch64_allocate_and_probe_stack_space): Likewise.
21088         (aarch64_layout_frame): Cope with polynomial offsets.
21089         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
21090         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
21091         polynomial offsets.
21092         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
21093         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
21094         poly_int64 rather than a HOST_WIDE_INT.
21095         (aarch64_get_separate_components, aarch64_process_components)
21096         (aarch64_expand_prologue, aarch64_expand_epilogue)
21097         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
21098         (aarch64_anchor_offset): New function, split out from...
21099         (aarch64_legitimize_address): ...here.
21100         (aarch64_builtin_vectorization_cost): Handle polynomial
21101         TYPE_VECTOR_SUBPARTS.
21102         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21103         GET_MODE_NUNITS.
21104         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21105         number of elements from the PARALLEL rather than the mode.
21106         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21107         rather than GET_MODE_BITSIZE.
21108         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21109         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21110         (aarch64_expand_vec_perm_const_1): Handle polynomial
21111         d->perm.length () and d->perm elements.
21112         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21113         Apply to_constant to d->perm elements.
21114         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21115         polynomial CONST_VECTOR_NUNITS.
21116         (aarch64_move_pointer): Take amount as a poly_int64 rather
21117         than an int.
21118         (aarch64_progress_pointer): Avoid temporary variable.
21119         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21120         the mode attribute instead of GET_MODE.
21122 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21123             Alan Hayward  <alan.hayward@arm.com>
21124             David Sherwood  <david.sherwood@arm.com>
21126         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21127         x exists before using it.
21128         (aarch64_add_constant_internal): Rename to...
21129         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21130         src and dest rtxes.  Handle the case in which they're different,
21131         including when the offset is zero.  Replace scratchreg with an rtx.
21132         Use 2 additions if there is no spare register into which we can
21133         move a 16-bit constant.
21134         (aarch64_add_constant): Delete.
21135         (aarch64_add_offset): Replace reg with separate src and dest
21136         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21137         Use aarch64_add_offset_1.
21138         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21139         an rtx rather than an int.  Take the delta as a poly_int64
21140         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21141         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21142         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21143         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21144         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21145         and aarch64_add_sp.
21146         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21147         aarch64_add_constant.
21149 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21151         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21152         Use scalar_float_mode.
21154 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21156         * config/aarch64/aarch64-simd.md
21157         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21158         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21159         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21160         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21161         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21162         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21163         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21164         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21165         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21166         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21168 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21170         PR target/83514
21171         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21172         targ_options->x_arm_arch_string is non NULL.
21174 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21176         * config/aarch64/aarch64.h
21177         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21179 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21181         PR target/82096
21182         * expmed.c (emit_store_flag_force): Swap if const op0
21183         and change VOIDmode to mode of op0.
21185 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21187         PR rtl-optimization/83761
21188         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21189         than bytes to mode_for_size.
21191 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21193         PR middle-end/83189
21194         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21195         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21196         profile.
21198 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21200         PR middle-end/83575
21201         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21202         when in layout mode.
21203         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21204         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21205         partition fixup.
21207 2018-01-10  Michael Collison  <michael.collison@arm.com>
21209         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21210         * config/aarch64/aarch64-option-extension.def: Add
21211         AARCH64_OPT_EXTENSION of 'fp16fml'.
21212         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21213         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21214         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21215         * config/aarch64/constraints.md (Ui7): New constraint.
21216         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21217         (VFMLA_SEL_W): Ditto.
21218         (f16quad): Ditto.
21219         (f16mac1): Ditto.
21220         (VFMLA16_LOW): New int iterator.
21221         (VFMLA16_HIGH): Ditto.
21222         (UNSPEC_FMLAL): New unspec.
21223         (UNSPEC_FMLSL): Ditto.
21224         (UNSPEC_FMLAL2): Ditto.
21225         (UNSPEC_FMLSL2): Ditto.
21226         (f16mac): New code attribute.
21227         * config/aarch64/aarch64-simd-builtins.def
21228         (aarch64_fmlal_lowv2sf): Ditto.
21229         (aarch64_fmlsl_lowv2sf): Ditto.
21230         (aarch64_fmlalq_lowv4sf): Ditto.
21231         (aarch64_fmlslq_lowv4sf): Ditto.
21232         (aarch64_fmlal_highv2sf): Ditto.
21233         (aarch64_fmlsl_highv2sf): Ditto.
21234         (aarch64_fmlalq_highv4sf): Ditto.
21235         (aarch64_fmlslq_highv4sf): Ditto.
21236         (aarch64_fmlal_lane_lowv2sf): Ditto.
21237         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21238         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21239         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21240         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21241         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21242         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21243         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21244         (aarch64_fmlal_lane_highv2sf): Ditto.
21245         (aarch64_fmlsl_lane_highv2sf): Ditto.
21246         (aarch64_fmlal_laneq_highv2sf): Ditto.
21247         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21248         (aarch64_fmlalq_lane_highv4sf): Ditto.
21249         (aarch64_fmlsl_lane_highv4sf): Ditto.
21250         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21251         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21252         * config/aarch64/aarch64-simd.md:
21253         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21254         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21255         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21256         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21257         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21258         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21259         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21260         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21261         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21262         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21263         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21264         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21265         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21266         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21267         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21268         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21269         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21270         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21271         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21272         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21273         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21274         (vfmlsl_low_u32): Ditto.
21275         (vfmlalq_low_u32): Ditto.
21276         (vfmlslq_low_u32): Ditto.
21277         (vfmlal_high_u32): Ditto.
21278         (vfmlsl_high_u32): Ditto.
21279         (vfmlalq_high_u32): Ditto.
21280         (vfmlslq_high_u32): Ditto.
21281         (vfmlal_lane_low_u32): Ditto.
21282         (vfmlsl_lane_low_u32): Ditto.
21283         (vfmlal_laneq_low_u32): Ditto.
21284         (vfmlsl_laneq_low_u32): Ditto.
21285         (vfmlalq_lane_low_u32): Ditto.
21286         (vfmlslq_lane_low_u32): Ditto.
21287         (vfmlalq_laneq_low_u32): Ditto.
21288         (vfmlslq_laneq_low_u32): Ditto.
21289         (vfmlal_lane_high_u32): Ditto.
21290         (vfmlsl_lane_high_u32): Ditto.
21291         (vfmlal_laneq_high_u32): Ditto.
21292         (vfmlsl_laneq_high_u32): Ditto.
21293         (vfmlalq_lane_high_u32): Ditto.
21294         (vfmlslq_lane_high_u32): Ditto.
21295         (vfmlalq_laneq_high_u32): Ditto.
21296         (vfmlslq_laneq_high_u32): Ditto.
21297         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21298         (AARCH64_FL_FOR_ARCH8_4): New.
21299         (AARCH64_ISA_F16FML): New ISA flag.
21300         (TARGET_F16FML): New feature flag for fp16fml.
21301         (doc/invoke.texi): Document new fp16fml option.
21303 2018-01-10  Michael Collison  <michael.collison@arm.com>
21305         * config/aarch64/aarch64-builtins.c:
21306         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21307         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21308         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21309         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21310         (AARCH64_ISA_SHA3): New ISA flag.
21311         (TARGET_SHA3): New feature flag for sha3.
21312         * config/aarch64/iterators.md (sha512_op): New int attribute.
21313         (CRYPTO_SHA512): New int iterator.
21314         (UNSPEC_SHA512H): New unspec.
21315         (UNSPEC_SHA512H2): Ditto.
21316         (UNSPEC_SHA512SU0): Ditto.
21317         (UNSPEC_SHA512SU1): Ditto.
21318         * config/aarch64/aarch64-simd-builtins.def
21319         (aarch64_crypto_sha512hqv2di): New builtin.
21320         (aarch64_crypto_sha512h2qv2di): Ditto.
21321         (aarch64_crypto_sha512su0qv2di): Ditto.
21322         (aarch64_crypto_sha512su1qv2di): Ditto.
21323         (aarch64_eor3qv8hi): Ditto.
21324         (aarch64_rax1qv2di): Ditto.
21325         (aarch64_xarqv2di): Ditto.
21326         (aarch64_bcaxqv8hi): Ditto.
21327         * config/aarch64/aarch64-simd.md:
21328         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21329         (aarch64_crypto_sha512su0qv2di): Ditto.
21330         (aarch64_crypto_sha512su1qv2di): Ditto.
21331         (aarch64_eor3qv8hi): Ditto.
21332         (aarch64_rax1qv2di): Ditto.
21333         (aarch64_xarqv2di): Ditto.
21334         (aarch64_bcaxqv8hi): Ditto.
21335         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21336         (vsha512h2q_u64): Ditto.
21337         (vsha512su0q_u64): Ditto.
21338         (vsha512su1q_u64): Ditto.
21339         (veor3q_u16): Ditto.
21340         (vrax1q_u64): Ditto.
21341         (vxarq_u64): Ditto.
21342         (vbcaxq_u16): Ditto.
21343         * config/arm/types.md (crypto_sha512): New type attribute.
21344         (crypto_sha3): Ditto.
21345         (doc/invoke.texi): Document new sha3 option.
21347 2018-01-10  Michael Collison  <michael.collison@arm.com>
21349         * config/aarch64/aarch64-builtins.c:
21350         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21351         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21352         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21353         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21354         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21355         (AARCH64_ISA_SM4): New ISA flag.
21356         (TARGET_SM4): New feature flag for sm4.
21357         * config/aarch64/aarch64-simd-builtins.def
21358         (aarch64_sm3ss1qv4si): Ditto.
21359         (aarch64_sm3tt1aq4si): Ditto.
21360         (aarch64_sm3tt1bq4si): Ditto.
21361         (aarch64_sm3tt2aq4si): Ditto.
21362         (aarch64_sm3tt2bq4si): Ditto.
21363         (aarch64_sm3partw1qv4si): Ditto.
21364         (aarch64_sm3partw2qv4si): Ditto.
21365         (aarch64_sm4eqv4si): Ditto.
21366         (aarch64_sm4ekeyqv4si): Ditto.
21367         * config/aarch64/aarch64-simd.md:
21368         (aarch64_sm3ss1qv4si): Ditto.
21369         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21370         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21371         (aarch64_sm4eqv4si): Ditto.
21372         (aarch64_sm4ekeyqv4si): Ditto.
21373         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21374         (sm3part_op): Ditto.
21375         (CRYPTO_SM3TT): Ditto.
21376         (CRYPTO_SM3PART): Ditto.
21377         (UNSPEC_SM3SS1): New unspec.
21378         (UNSPEC_SM3TT1A): Ditto.
21379         (UNSPEC_SM3TT1B): Ditto.
21380         (UNSPEC_SM3TT2A): Ditto.
21381         (UNSPEC_SM3TT2B): Ditto.
21382         (UNSPEC_SM3PARTW1): Ditto.
21383         (UNSPEC_SM3PARTW2): Ditto.
21384         (UNSPEC_SM4E): Ditto.
21385         (UNSPEC_SM4EKEY): Ditto.
21386         * config/aarch64/constraints.md (Ui2): New constraint.
21387         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21388         * config/arm/types.md (crypto_sm3): New type attribute.
21389         (crypto_sm4): Ditto.
21390         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21391         (vsm3tt1aq_u32): Ditto.
21392         (vsm3tt1bq_u32): Ditto.
21393         (vsm3tt2aq_u32): Ditto.
21394         (vsm3tt2bq_u32): Ditto.
21395         (vsm3partw1q_u32): Ditto.
21396         (vsm3partw2q_u32): Ditto.
21397         (vsm4eq_u32): Ditto.
21398         (vsm4ekeyq_u32): Ditto.
21399         (doc/invoke.texi): Document new sm4 option.
21401 2018-01-10  Michael Collison  <michael.collison@arm.com>
21403         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21404         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21405         (AARCH64_FL_FOR_ARCH8_4): New.
21406         (AARCH64_FL_V8_4): New flag.
21407         (doc/invoke.texi): Document new armv8.4-a option.
21409 2018-01-10  Michael Collison  <michael.collison@arm.com>
21411         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21412         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21413         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21414         * config/aarch64/aarch64-option-extension.def: Add
21415         AARCH64_OPT_EXTENSION of 'sha2'.
21416         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21417         (crypto): Disable sha2 and aes if crypto disabled.
21418         (crypto): Enable aes and sha2 if enabled.
21419         (simd): Disable sha2 and aes if simd disabled.
21420         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21421         New flags.
21422         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21423         (TARGET_SHA2): New feature flag for sha2.
21424         (TARGET_AES): New feature flag for aes.
21425         * config/aarch64/aarch64-simd.md:
21426         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21427         conditional on TARGET_AES.
21428         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21429         (aarch64_crypto_sha1hsi): Make pattern conditional
21430         on TARGET_SHA2.
21431         (aarch64_crypto_sha1hv4si): Ditto.
21432         (aarch64_be_crypto_sha1hv4si): Ditto.
21433         (aarch64_crypto_sha1su1v4si): Ditto.
21434         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21435         (aarch64_crypto_sha1su0v4si): Ditto.
21436         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21437         (aarch64_crypto_sha256su0v4si): Ditto.
21438         (aarch64_crypto_sha256su1v4si): Ditto.
21439         (doc/invoke.texi): Document new aes and sha2 options.
21441 2018-01-10  Martin Sebor  <msebor@redhat.com>
21443         PR tree-optimization/83781
21444         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21445         as string arrays.
21447 2018-01-11  Martin Sebor  <msebor@gmail.com>
21448             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21450         PR tree-optimization/83501
21451         PR tree-optimization/81703
21453         * tree-ssa-strlen.c (get_string_cst): Rename...
21454         (get_string_len): ...to this.  Handle global constants.
21455         (handle_char_store): Adjust.
21457 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21458             Jim Wilson  <jimw@sifive.com>
21460         * config/riscv/riscv-protos.h (riscv_output_return): New.
21461         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21462         (riscv_attribute_table, riscv_output_return),
21463         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21464         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21465         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21466         function.
21467         (riscv_expand_prologue): Add early return for naked function.
21468         (riscv_expand_epilogue): Likewise.
21469         (riscv_function_ok_for_sibcall): Return false for naked function.
21470         (riscv_set_current_function): New.
21471         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21472         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21473         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21474         * doc/extend.texi (RISC-V Function Attributes): New.
21476 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21478         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21479         check for 128-bit long double before checking TCmode.
21480         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21481         128-bit long doubles before checking TFmode or TCmode.
21482         (FLOAT128_IBM_P): Likewise.
21484 2018-01-10  Martin Sebor  <msebor@redhat.com>
21486         PR tree-optimization/83671
21487         * builtins.c (c_strlen): Unconditionally return zero for the empty
21488         string.
21489         Use -Warray-bounds for warnings.
21490         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21491         for non-constant array indices with COMPONENT_REF, arrays of
21492         arrays, and pointers to arrays.
21493         (gimple_fold_builtin_strlen): Determine and set length range for
21494         non-constant character arrays.
21496 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21498         PR middle-end/81897
21499         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21500         empty blocks.
21502 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21504         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21506 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21508         PR target/83399
21509         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21510         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21511         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21512         indexed_or_indirect_operand predicate.
21513         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21514         (*vsx_le_perm_load_v8hi): Likewise.
21515         (*vsx_le_perm_load_v16qi): Likewise.
21516         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21517         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21518         (*vsx_le_perm_store_v8hi): Likewise.
21519         (*vsx_le_perm_store_v16qi): Likewise.
21520         (eight unnamed splitters): Likewise.
21522 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21524         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21525         * config/rs6000/emmintrin.h: Likewise.
21526         * config/rs6000/mmintrin.h: Likewise.
21527         * config/rs6000/xmmintrin.h: Likewise.
21529 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21531         PR c++/43486
21532         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21533         "public_flag".
21534         * tree.c (tree_nop_conversion): Return true for location wrapper
21535         nodes.
21536         (maybe_wrap_with_location): New function.
21537         (selftest::check_strip_nops): New function.
21538         (selftest::test_location_wrappers): New function.
21539         (selftest::tree_c_tests): Call it.
21540         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21541         (maybe_wrap_with_location): New decl.
21542         (EXPR_LOCATION_WRAPPER_P): New macro.
21543         (location_wrapper_p): New inline function.
21544         (tree_strip_any_location_wrapper): New inline function.
21546 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21548         PR target/83735
21549         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21550         stack_realign_offset for the largest alignment of stack slot
21551         actually used.
21552         (ix86_find_max_used_stack_alignment): New function.
21553         (ix86_finalize_stack_frame_flags): Use it.  Set
21554         max_used_stack_alignment if we don't realign stack.
21555         * config/i386/i386.h (machine_function): Add
21556         max_used_stack_alignment.
21558 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21560         * config/arm/arm.opt (-mbranch-cost): New option.
21561         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21562         account.
21564 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21566         PR target/83629
21567         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21568         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21570 2018-01-10  Richard Biener  <rguenther@suse.de>
21572         PR debug/83765
21573         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21574         early out so it also covers the case where we have a non-NULL
21575         origin.
21577 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21579         PR tree-optimization/83753
21580         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21581         for non-strided grouped accesses if the number of elements is 1.
21583 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21585         PR target/81616
21586         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21587         * i386.h (TARGET_USE_GATHER): Define.
21588         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21590 2018-01-10  Martin Liska  <mliska@suse.cz>
21592         PR bootstrap/82831
21593         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21594         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21595         partitioning.
21596         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21597         CLEANUP_NO_PARTITIONING is not set.
21599 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21601         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21602         for vectors, as a partial revert of r254296.
21603         * rtl.h (const_vec_p): Delete.
21604         (const_vec_duplicate_p): Don't test for vector CONSTs.
21605         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21606         * expmed.c (make_tree): Likewise.
21608         Revert:
21609         * common.md (E, F): Use CONSTANT_P instead of checking for
21610         CONST_VECTOR.
21611         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21612         checking for CONST_VECTOR.
21614 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21616         PR middle-end/83575
21617         * predict.c (force_edge_cold): Handle in more sane way edges
21618         with no prediction.
21620 2018-01-09  Carl Love  <cel@us.ibm.com>
21622         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21623         V4SI, V4SF types.
21624         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21625         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21626         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21627         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21628         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21629         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21630         * config/rs6000/rs6000-protos.h: Add extern defition for
21631         rs6000_generate_float2_double_code.
21632         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21633         function.
21634         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21635         (float2_v2df): Add define_expand.
21637 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21639         PR target/83628
21640         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21641         op_mode in the force_to_mode call.
21643 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21645         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21646         instead of checking each element individually.
21647         (aarch64_evpc_uzp): Likewise.
21648         (aarch64_evpc_zip): Likewise.
21649         (aarch64_evpc_ext): Likewise.
21650         (aarch64_evpc_rev): Likewise.
21651         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21652         instead of checking each element individually.  Return true without
21653         generating rtl if
21654         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21655         whether all selected elements come from the same input, instead of
21656         checking each element individually.  Remove calls to gen_rtx_REG,
21657         start_sequence and end_sequence and instead assert that no rtl is
21658         generated.
21660 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21662         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21663         order of HIGH and CONST checks.
21665 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21667         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21668         if the destination isn't an SSA_NAME.
21670 2018-01-09  Richard Biener  <rguenther@suse.de>
21672         PR tree-optimization/83668
21673         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21674         move prologue...
21675         (canonicalize_loop_form): ... here, renamed from ...
21676         (canonicalize_loop_closed_ssa_form): ... this and amended to
21677         swap successor edges for loop exit blocks to make us use
21678         the RPO order we need for initial schedule generation.
21680 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21682         PR tree-optimization/64811
21683         * match.pd: When optimizing comparisons with Inf, avoid
21684         introducing or losing exceptions from comparisons with NaN.
21686 2018-01-09  Martin Liska  <mliska@suse.cz>
21688         PR sanitizer/82517
21689         * asan.c (shadow_mem_size): Add gcc_assert.
21691 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21693         Don't save registers in main().
21695         PR target/83738
21696         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21697         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21698         * config/avr/avr.c (avr_set_current_function): Don't error if
21699         naked, OS_task or OS_main are specified at the same time.
21700         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21701         OS_main.
21702         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21703         attribute.
21704         * common/config/avr/avr-common.c (avr_option_optimization_table):
21705         Switch on -mmain-is-OS_task for optimizing compilations.
21707 2018-01-09  Richard Biener  <rguenther@suse.de>
21709         PR tree-optimization/83572
21710         * graphite.c: Include cfganal.h.
21711         (graphite_transform_loops): Connect infinite loops to exit
21712         and remove fake edges at the end.
21714 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21716         * ipa-inline.c (edge_badness): Revert accidental checkin.
21718 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21720         PR ipa/80763
21721         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21722         symbols; not inline clones.
21724 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21726         PR target/83507
21727         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21728         hard registers.  Formatting fixes.
21730         PR preprocessor/83722
21731         * gcc.c (try_generate_repro): Pass
21732         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21733         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21734         do_report_bug.
21736 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21737             Kito Cheng  <kito.cheng@gmail.com>
21739         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21740         (riscv_leaf_function_p): Delete.
21741         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21743 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21745         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21746         function.
21747         (do_ifelse): New function.
21748         (do_isel): New function.
21749         (do_sub3): New function.
21750         (do_add3): New function.
21751         (do_load_mask_compare): New function.
21752         (do_overlap_load_compare): New function.
21753         (expand_compare_loop): New function.
21754         (expand_block_compare): Call expand_compare_loop() when appropriate.
21755         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21756         option description.
21757         (-mblock-compare-inline-loop-limit): New option.
21759 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21761         PR target/83677
21762         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21763         Reverse order of second and third operands in first alternative.
21764         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21765         of first and second elements in UNSPEC_VPERMR vector.
21766         (altivec_expand_vec_perm_le): Likewise.
21768 2018-01-08  Jeff Law  <law@redhat.com>
21770         PR rtl-optimizatin/81308
21771         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21772         (process_switch): If group_case_labels makes a change, then set
21773         cfg_altered.
21774         (pass_convert_switch::execute): If a switch is converted, then
21775         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21777         PR rtl-optimization/81308
21778         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21779         splitting insns.
21781 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21783         PR target/83663 - Revert r255946
21784         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21785         generation for cases where splatting a value is not useful.
21786         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21787         across a vec_duplicate and a paradoxical subreg forming a vector
21788         mode to a vec_concat.
21790 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21792         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21793         -march=armv8.3-a variants.
21794         * config/arm/t-multilib: Likewise.
21795         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21797 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21799         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21800         to generate rtl.
21801         (cceq_ior_compare_complement): Give it a name so I can use it, and
21802         change boolean_or_operator predicate to boolean_operator so it can
21803         be used to generate a crand.
21804         (eqne): New code iterator.
21805         (bd/bd_neg): New code_attrs.
21806         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21807         a single define_insn.
21808         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21809         decrement (bdnzt/bdnzf/bdzt/bdzf).
21810         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21811         with the new names of the branch decrement patterns, and added the
21812         names of the branch decrement conditional patterns.
21814 2018-01-08  Richard Biener  <rguenther@suse.de>
21816         PR tree-optimization/83563
21817         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21818         cache.
21820 2018-01-08  Richard Biener  <rguenther@suse.de>
21822         PR middle-end/83713
21823         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21825 2018-01-08  Richard Biener  <rguenther@suse.de>
21827         PR tree-optimization/83685
21828         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21829         references to abnormals.
21831 2018-01-08  Richard Biener  <rguenther@suse.de>
21833         PR lto/83719
21834         * dwarf2out.c (output_indirect_strings): Handle empty
21835         skeleton_debug_str_hash.
21836         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21838 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21840         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21841         (emit_store_direct): Likewise.
21842         (arc_trampoline_adjust_address): Likewise.
21843         (arc_asm_trampoline_template): New function.
21844         (arc_initialize_trampoline): Use asm_trampoline_template.
21845         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21846         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21847         * config/arc/arc.md (flush_icache): Delete pattern.
21849 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21851         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21852         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21853         munaligned-access.
21855 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21857         PR target/83681
21858         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21859         by not USED_FOR_TARGET.
21860         (make_pass_resolve_sw_modes): Likewise.
21862 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21864         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21865         USED_FOR_TARGET.
21867 2018-01-08  Richard Biener  <rguenther@suse.de>
21869         PR middle-end/83580
21870         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21872 2018-01-08  Richard Biener  <rguenther@suse.de>
21874         PR middle-end/83517
21875         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21877 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21879         PR middle-end/81897
21880         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21881         basic blocks with a small number of successors.
21882         (convert_control_dep_chain_into_preds): Improve handling of
21883         forwarder blocks.
21884         (dump_predicates): Split apart into...
21885         (dump_pred_chain): ...here...
21886         (dump_pred_info): ...and here.
21887         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21888         (can_chain_union_be_invalidated_p): Improve check for invalidation
21889         of paths.
21890         (uninit_uses_cannot_happen): Avoid unnecessary if
21891         convert_control_dep_chain_into_preds yielded nothing.
21893 2018-01-06  Martin Sebor  <msebor@redhat.com>
21895         PR tree-optimization/83640
21896         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21897         subtracting negative offset from size.
21898         (builtin_access::overlap): Adjust offset bounds of the access to fall
21899         within the size of the object if possible.
21901 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21903         PR rtl-optimization/83699
21904         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21905         extract_bit_field_as_subreg to cases in which the extracted
21906         value is also a vector.
21908         * lra-constraints.c (process_alt_operands): Test for the equivalence
21909         substitutions when detecting a possible reload cycle.
21911 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21913         PR debug/83480
21914         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21915         by default if flag_selective_schedling{,2}.  Formatting fixes.
21917         PR rtl-optimization/83682
21918         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21919         if it has non-VECTOR_MODE element mode.
21920         (vec_duplicate_p): Likewise.
21922         PR middle-end/83694
21923         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21924         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21926 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21928         PR target/83604
21929         * config/i386/i386-builtin.def
21930         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21931         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21932         Require also OPTION_MASK_ISA_AVX512F in addition to
21933         OPTION_MASK_ISA_GFNI.
21934         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21935         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21936         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21937         to OPTION_MASK_ISA_GFNI.
21938         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21939         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21940         OPTION_MASK_ISA_AVX512BW.
21941         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21942         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21943         addition to OPTION_MASK_ISA_GFNI.
21944         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21945         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21946         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21947         to OPTION_MASK_ISA_GFNI.
21948         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21949         a requirement for all ISAs rather than any of them with a few
21950         exceptions.
21951         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21952         processing.
21953         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21954         bitmasks to be enabled with 3 exceptions, instead of requiring any
21955         enabled ISA with lots of exceptions.
21956         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21957         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21958         Change avx512bw in isa attribute to avx512f.
21959         * config/i386/sgxintrin.h: Add license boilerplate.
21960         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21961         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21962         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21963         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21964         defined.
21965         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21966         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21967         temporarily sse2 rather than sse if not enabled already.
21969         PR target/83604
21970         * config/i386/sse.md (VI248_VLBW): Rename to ...
21971         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21972         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21973         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21974         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21975         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21976         mode iterator instead of VI248_VLBW.
21978 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21980         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21981         (record_modified): Skip clobbers; add debug output.
21982         (param_change_prob): Use sreal frequencies.
21984 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21986         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21987         punt for user-aligned variables.
21989 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21991         * tree-chrec.c (chrec_contains_symbols): Return true for
21992         POLY_INT_CST.
21994 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21996         PR target/82439
21997         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21998         of (x|y) == x for BICS pattern.
22000 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
22002         PR tree-optimization/83605
22003         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
22004         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
22005         can throw.
22007 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22009         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
22010         * config/epiphany/rtems.h: New file.
22012 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22013             Uros Bizjak  <ubizjak@gmail.com>
22015         PR target/83554
22016         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
22017         QIreg_operand instead of register_operand predicate.
22018         * config/i386/i386.c (ix86_rop_should_change_byte_p,
22019         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
22020         comments instead of -fmitigate[-_]rop.
22022 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22024         PR bootstrap/81926
22025         * cgraphunit.c (symbol_table::compile): Switch to text_section
22026         before calling assembly_start debug hook.
22027         * run-rtl-passes.c (run_rtl_passes): Likewise.
22028         Include output.h.
22030 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22032         * tree-vrp.c (extract_range_from_binary_expr_1): Check
22033         range_int_cst_p rather than !symbolic_range_p before calling
22034         extract_range_from_multiplicative_op_1.
22036 2018-01-04  Jeff Law  <law@redhat.com>
22038         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
22039         redundant test in assertion.
22041 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22043         * doc/rtl.texi: Document machine_mode wrapper classes.
22045 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22047         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
22048         using tree_to_uhwi.
22050 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22052         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
22053         the VEC_PERM_EXPR fold to fail.
22055 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22057         PR debug/83585
22058         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
22059         to switched_sections.
22061 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22063         PR target/83680
22064         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
22065         test for d.testing.
22067 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
22069         PR target/83387
22070         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
22071         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
22073 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22075         PR debug/83666
22076         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
22077         is BLKmode and bitpos not zero or mode change is needed.
22079 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
22081         PR target/83675
22082         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
22083         TARGET_VIS2.
22085 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
22087         PR target/83628
22088         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
22089         instead of MULT rtx.  Update all corresponding splitters.
22090         (*saddl_se): Ditto.
22091         (*ssub<modesuffix>): Ditto.
22092         (*ssubl_se): Ditto.
22093         (*cmp_sadd_di): Update split patterns.
22094         (*cmp_sadd_si): Ditto.
22095         (*cmp_sadd_sidi): Ditto.
22096         (*cmp_ssub_di): Ditto.
22097         (*cmp_ssub_si): Ditto.
22098         (*cmp_ssub_sidi): Ditto.
22099         * config/alpha/predicates.md (const23_operand): New predicate.
22100         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
22101         Look for ASHIFT, not MULT inner operand.
22102         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22104 2018-01-04  Martin Liska  <mliska@suse.cz>
22106         PR gcov-profile/83669
22107         * gcov.c (output_intermediate_file): Add version to intermediate
22108         gcov file.
22109         * doc/gcov.texi: Document new field 'version' in intermediate
22110         file format. Fix location of '-k' option of gcov command.
22112 2018-01-04  Martin Liska  <mliska@suse.cz>
22114         PR ipa/82352
22115         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22117 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22119         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22121 2018-01-03  Martin Sebor  <msebor@redhat.com>
22123         PR tree-optimization/83655
22124         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22125         checking calls with invalid arguments.
22127 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22129         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22130         (vectorizable_mask_load_store): Delete.
22131         (vectorizable_call): Return false for masked loads and stores.
22132         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22133         instead of gimple_assign_rhs1.
22134         (vectorizable_load): Handle IFN_MASK_LOAD.
22135         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22137 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22139         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22140         split out from..,
22141         (vectorizable_mask_load_store): ...here.
22142         (vectorizable_load): ...and here.
22144 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22146         * tree-vect-stmts.c (vect_build_all_ones_mask)
22147         (vect_build_zero_merge_argument): New functions, split out from...
22148         (vectorizable_load): ...here.
22150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22152         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22153         split out from...
22154         (vectorizable_mask_load_store): ...here.
22155         (vectorizable_store): ...and here.
22157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22159         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22160         split out from...
22161         (vectorizable_mask_load_store): ...here.
22163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22165         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22166         (vect_model_store_cost): Take a vec_load_store_type instead of a
22167         vect_def_type.
22168         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22169         (vect_model_store_cost): Take a vec_load_store_type instead of a
22170         vect_def_type.
22171         (vectorizable_mask_load_store): Update accordingly.
22172         (vectorizable_store): Likewise.
22173         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22175 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22177         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22178         IFN_MASK_LOAD calls here rather than...
22179         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22182             Alan Hayward  <alan.hayward@arm.com>
22183             David Sherwood  <david.sherwood@arm.com>
22185         * expmed.c (extract_bit_field_1): For vector extracts,
22186         fall back to extract_bit_field_as_subreg if vec_extract
22187         isn't available.
22189 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22190             Alan Hayward  <alan.hayward@arm.com>
22191             David Sherwood  <david.sherwood@arm.com>
22193         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22194         they are variable or constant sized.
22195         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22196         slots for constant-sized data.
22198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22199             Alan Hayward  <alan.hayward@arm.com>
22200             David Sherwood  <david.sherwood@arm.com>
22202         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22203         handling COND_EXPRs with boolean comparisons, try to find a better
22204         basis for the mask type than the boolean itself.
22206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22208         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22209         is calculated and how it can be overridden.
22210         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22211         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22212         if defined.
22213         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22214         if nonzero.
22216 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22217             Alan Hayward  <alan.hayward@arm.com>
22218             David Sherwood  <david.sherwood@arm.com>
22220         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22221         Remove the mode argument.
22222         (aarch64_simd_valid_immediate): Remove the mode and inverse
22223         arguments.
22224         * config/aarch64/iterators.md (bitsize): New iterator.
22225         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22226         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22227         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22228         aarch64_simd_valid_immediate.
22229         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22230         (aarch64_reg_or_bic_imm): Likewise.
22231         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22232         with an insn_type enum and msl with a modifier_type enum.
22233         Replace element_width with a scalar_mode.  Change the shift
22234         to unsigned int.  Add constructors for scalar_float_mode and
22235         scalar_int_mode elements.
22236         (aarch64_vect_float_const_representable_p): Delete.
22237         (aarch64_can_const_movi_rtx_p)
22238         (aarch64_simd_scalar_immediate_valid_for_move)
22239         (aarch64_simd_make_constant): Update call to
22240         aarch64_simd_valid_immediate.
22241         (aarch64_advsimd_valid_immediate_hs): New function.
22242         (aarch64_advsimd_valid_immediate): Likewise.
22243         (aarch64_simd_valid_immediate): Remove mode and inverse
22244         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22245         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22246         and aarch64_float_const_representable_p on the result.
22247         (aarch64_output_simd_mov_immediate): Remove mode argument.
22248         Update call to aarch64_simd_valid_immediate and use of
22249         simd_immediate_info.
22250         (aarch64_output_scalar_simd_mov_immediate): Update call
22251         accordingly.
22253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22254             Alan Hayward  <alan.hayward@arm.com>
22255             David Sherwood  <david.sherwood@arm.com>
22257         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22258         (mode_nunits): Likewise CONST_MODE_NUNITS.
22259         * machmode.def (ADJUST_NUNITS): Document.
22260         * genmodes.c (mode_data::need_nunits_adj): New field.
22261         (blank_mode): Update accordingly.
22262         (adj_nunits): New variable.
22263         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22264         parameter.
22265         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22266         listed in adj_nunits.
22267         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22268         listed in adj_nunits.  Don't emit case statements for such modes.
22269         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22270         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22271         nothing if adj_nunits is nonnull.
22272         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22273         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22274         (emit_mode_fbit): Update use of print_maybe_const_decl.
22275         (emit_move_size): Likewise.  Treat the array as non-const
22276         if adj_nunits.
22277         (emit_mode_adjustments): Handle adj_nunits.
22279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22281         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22282         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22283         (VECTOR_MODES): Use it.
22284         (make_vector_modes): Take the prefix as an argument.
22286 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22287             Alan Hayward  <alan.hayward@arm.com>
22288             David Sherwood  <david.sherwood@arm.com>
22290         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22291         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22292         for MODE_VECTOR_BOOL.
22293         * machmode.def (VECTOR_BOOL_MODE): Document.
22294         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22295         (make_vector_bool_mode): New function.
22296         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22297         MODE_VECTOR_BOOL.
22298         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22299         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22300         Likewise.
22301         * stor-layout.c (int_mode_for_mode): Likewise.
22302         * tree.c (build_vector_type_for_mode): Likewise.
22303         * varasm.c (output_constant_pool_2): Likewise.
22304         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22305         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22306         for MODE_VECTOR_BOOL.
22307         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22308         of mode class checks.
22309         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22310         instead of a list of mode class checks.
22311         (expand_vector_scalar_condition): Likewise.
22312         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22314 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22315             Alan Hayward  <alan.hayward@arm.com>
22316             David Sherwood  <david.sherwood@arm.com>
22318         * machmode.h (mode_size): Change from unsigned short to
22319         poly_uint16_pod.
22320         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22321         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22322         or if measurement_type is not polynomial.
22323         (fixed_size_mode::includes_p): Check for constant-sized modes.
22324         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22325         return a poly_uint16 rather than an unsigned short.
22326         (emit_mode_size): Change the type of mode_size from unsigned short
22327         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22328         (emit_mode_adjustments): Cope with polynomial vector sizes.
22329         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22330         for GET_MODE_SIZE.
22331         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22332         for GET_MODE_SIZE.
22333         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22334         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22335         * caller-save.c (setup_save_areas): Likewise.
22336         (replace_reg_with_saved_mem): Likewise.
22337         * calls.c (emit_library_call_value_1): Likewise.
22338         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22339         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22340         (gen_lowpart_for_combine): Likewise.
22341         * convert.c (convert_to_integer_1): Likewise.
22342         * cse.c (equiv_constant, cse_insn): Likewise.
22343         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22344         (cselib_subst_to_values): Likewise.
22345         * dce.c (word_dce_process_block): Likewise.
22346         * df-problems.c (df_word_lr_mark_ref): Likewise.
22347         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22348         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22349         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22350         (rtl_for_decl_location): Likewise.
22351         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22352         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22353         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22354         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22355         (expand_expr_real_1): Likewise.
22356         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22357         (pad_below): Likewise.
22358         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22359         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22360         * ira.c (get_subreg_tracking_sizes): Likewise.
22361         * ira-build.c (ira_create_allocno_objects): Likewise.
22362         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22363         (ira_sort_regnos_for_alter_reg): Likewise.
22364         * ira-costs.c (record_operand_costs): Likewise.
22365         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22366         (resolve_simple_move): Likewise.
22367         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22368         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22369         (lra_constraints): Likewise.
22370         (CONST_POOL_OK_P): Reject variable-sized modes.
22371         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22372         (add_pseudo_to_slot, lra_spill): Likewise.
22373         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22374         * optabs-query.c (get_best_extraction_insn): Likewise.
22375         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22376         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22377         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22378         * recog.c (offsettable_address_addr_space_p): Likewise.
22379         * regcprop.c (maybe_mode_change): Likewise.
22380         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22381         * regrename.c (build_def_use): Likewise.
22382         * regstat.c (dump_reg_info): Likewise.
22383         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22384         (find_reloads, find_reloads_subreg_address): Likewise.
22385         * reload1.c (eliminate_regs_1): Likewise.
22386         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22387         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22388         (simplify_binary_operation_1, simplify_subreg): Likewise.
22389         * targhooks.c (default_function_arg_padding): Likewise.
22390         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22391         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22392         (verify_gimple_assign_ternary): Likewise.
22393         * tree-inline.c (estimate_move_cost): Likewise.
22394         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22395         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22396         (get_address_cost_ainc): Likewise.
22397         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22398         (vect_supportable_dr_alignment): Likewise.
22399         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22400         (vectorizable_reduction): Likewise.
22401         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22402         (vectorizable_operation, vectorizable_load): Likewise.
22403         * tree.c (build_same_sized_truth_vector_type): Likewise.
22404         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22405         * var-tracking.c (emit_note_insn_var_location): Likewise.
22406         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22407         (ADDR_VEC_ALIGN): Likewise.
22409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22410             Alan Hayward  <alan.hayward@arm.com>
22411             David Sherwood  <david.sherwood@arm.com>
22413         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22414         unsigned short.
22415         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22416         or if measurement_type is polynomial.
22417         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22418         * combine.c (make_extraction): Likewise.
22419         * dse.c (find_shift_sequence): Likewise.
22420         * dwarf2out.c (mem_loc_descriptor): Likewise.
22421         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22422         (extract_bit_field, extract_low_bits): Likewise.
22423         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22424         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22425         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22426         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22427         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22428         * reload.c (find_reloads): Likewise.
22429         * reload1.c (alter_reg): Likewise.
22430         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22431         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22432         * tree-if-conv.c (predicate_mem_writes): Likewise.
22433         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22434         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22435         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22436         * valtrack.c (dead_debug_insert_temp): Likewise.
22437         * varasm.c (mergeable_constant_section): Likewise.
22438         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22441             Alan Hayward  <alan.hayward@arm.com>
22442             David Sherwood  <david.sherwood@arm.com>
22444         * expr.c (expand_assignment): Cope with polynomial mode sizes
22445         when assigning to a CONCAT.
22447 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22448             Alan Hayward  <alan.hayward@arm.com>
22449             David Sherwood  <david.sherwood@arm.com>
22451         * machmode.h (mode_precision): Change from unsigned short to
22452         poly_uint16_pod.
22453         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22454         short.
22455         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22456         or if measurement_type is not polynomial.
22457         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22458         in which the mode is already known to be a scalar_int_mode.
22459         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22460         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22461         initializer.
22462         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22463         for GET_MODE_PRECISION.
22464         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22465         for GET_MODE_PRECISION.
22466         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22467         as polynomial.
22468         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22469         (expand_field_assignment, make_extraction): Likewise.
22470         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22471         (get_last_value): Likewise.
22472         * convert.c (convert_to_integer_1): Likewise.
22473         * cse.c (cse_insn): Likewise.
22474         * expr.c (expand_expr_real_1): Likewise.
22475         * lra-constraints.c (simplify_operand_subreg): Likewise.
22476         * optabs-query.c (can_atomic_load_p): Likewise.
22477         * optabs.c (expand_atomic_load): Likewise.
22478         (expand_atomic_store): Likewise.
22479         * ree.c (combine_reaching_defs): Likewise.
22480         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22481         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22482         * tree.h (type_has_mode_precision_p): Likewise.
22483         * ubsan.c (instrument_si_overflow): Likewise.
22485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22486             Alan Hayward  <alan.hayward@arm.com>
22487             David Sherwood  <david.sherwood@arm.com>
22489         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22490         polynomial numbers of units.
22491         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22492         (valid_vector_subparts_p): New function.
22493         (build_vector_type): Remove temporary shim and take the number
22494         of units as a poly_uint64 rather than an int.
22495         (build_opaque_vector_type): Take the number of units as a
22496         poly_uint64 rather than an int.
22497         * tree.c (build_vector_from_ctor): Handle polynomial
22498         TYPE_VECTOR_SUBPARTS.
22499         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22500         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22501         (build_vector_from_val): If the number of units is variable,
22502         use build_vec_duplicate_cst for constant operands and
22503         VEC_DUPLICATE_EXPR otherwise.
22504         (make_vector_type): Remove temporary is_constant ().
22505         (build_vector_type, build_opaque_vector_type): Take the number of
22506         units as a poly_uint64 rather than an int.
22507         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22508         VECTOR_CST_NELTS.
22509         * cfgexpand.c (expand_debug_expr): Likewise.
22510         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22511         (store_constructor, expand_expr_real_1): Likewise.
22512         (const_scalar_mask_from_tree): Likewise.
22513         * fold-const-call.c (fold_const_reduction): Likewise.
22514         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22515         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22516         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22517         (fold_relational_const): Likewise.
22518         (native_interpret_vector): Likewise.  Change the size from an
22519         int to an unsigned int.
22520         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22521         TYPE_VECTOR_SUBPARTS.
22522         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22523         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22524         duplicating a non-constant operand into a variable-length vector.
22525         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22526         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22527         * ipa-icf.c (sem_variable::equals): Likewise.
22528         * match.pd: Likewise.
22529         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22530         * print-tree.c (print_node): Likewise.
22531         * stor-layout.c (layout_type): Likewise.
22532         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22533         * tree-cfg.c (verify_gimple_comparison): Likewise.
22534         (verify_gimple_assign_binary): Likewise.
22535         (verify_gimple_assign_ternary): Likewise.
22536         (verify_gimple_assign_single): Likewise.
22537         * tree-pretty-print.c (dump_generic_node): Likewise.
22538         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22539         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22540         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22541         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22542         (vect_shift_permute_load_chain): Likewise.
22543         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22544         (expand_vector_condition, optimize_vector_constructor): Likewise.
22545         (lower_vec_perm, get_compute_type): Likewise.
22546         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22547         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22548         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22549         (vect_recog_mask_conversion_pattern): Likewise.
22550         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22551         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22552         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22553         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22554         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22555         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22556         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22557         (supportable_widening_operation): Likewise.
22558         (supportable_narrowing_operation): Likewise.
22559         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22560         Likewise.
22561         * varasm.c (output_constant): Likewise.
22563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22564             Alan Hayward  <alan.hayward@arm.com>
22565             David Sherwood  <david.sherwood@arm.com>
22567         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22568         so that both the length == 3 and length != 3 cases set up their
22569         own permute vectors.  Add comments explaining why we know the
22570         number of elements is constant.
22571         (vect_permute_load_chain): Likewise.
22573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22574             Alan Hayward  <alan.hayward@arm.com>
22575             David Sherwood  <david.sherwood@arm.com>
22577         * machmode.h (mode_nunits): Change from unsigned char to
22578         poly_uint16_pod.
22579         (ONLY_FIXED_SIZE_MODES): New macro.
22580         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22581         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22582         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22583         New typedefs.
22584         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22585         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22586         or if measurement_type is not polynomial.
22587         * genmodes.c (ZERO_COEFFS): New macro.
22588         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22589         poly_uint16.
22590         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22591         Use ZERO_COEFFS when emitting initializers.
22592         * data-streamer.h (bp_pack_poly_value): New function.
22593         (bp_unpack_poly_value): Likewise.
22594         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22595         for GET_MODE_NUNITS.
22596         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22597         for GET_MODE_NUNITS.
22598         * tree.c (make_vector_type): Remove temporary shim and make
22599         the real function take the number of units as a poly_uint64
22600         rather than an int.
22601         (build_vector_type_for_mode): Handle polynomial nunits.
22602         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22603         * emit-rtl.c (const_vec_series_p_1): Likewise.
22604         (gen_rtx_CONST_VECTOR): Likewise.
22605         * fold-const.c (test_vec_duplicate_folding): Likewise.
22606         * genrecog.c (validate_pattern): Likewise.
22607         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22608         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22609         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22610         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22611         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22612         * rtlanal.c (subreg_get_info): Likewise.
22613         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22614         (vect_grouped_load_supported): Likewise.
22615         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22616         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22617         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22618         (simplify_const_unary_operation, simplify_binary_operation_1)
22619         (simplify_const_binary_operation, simplify_ternary_operation)
22620         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22621         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22622         instead of CONST_VECTOR_NUNITS.
22623         * varasm.c (output_constant_pool_2): Likewise.
22624         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22625         explicit-encoded elements in the XVEC for variable-length vectors.
22627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22629         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22632             Alan Hayward  <alan.hayward@arm.com>
22633             David Sherwood  <david.sherwood@arm.com>
22635         * coretypes.h (fixed_size_mode): Declare.
22636         (fixed_size_mode_pod): New typedef.
22637         * builtins.h (target_builtins::x_apply_args_mode)
22638         (target_builtins::x_apply_result_mode): Change type to
22639         fixed_size_mode_pod.
22640         * builtins.c (apply_args_size, apply_result_size, result_vector)
22641         (expand_builtin_apply_args_1, expand_builtin_apply)
22642         (expand_builtin_return): Update accordingly.
22644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22646         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22647         * cselib.c (cselib_hash_rtx): Likewise.
22648         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22649         CONST_VECTOR encoding.
22651 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22652             Jeff Law  <law@redhat.com>
22654         PR target/83641
22655         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22656         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22657         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22658         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22660         PR target/83641
22661         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22662         explicitly probe *sp in a noreturn function if there were any callee
22663         register saves or frame pointer is needed.
22665 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22667         PR debug/83621
22668         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22669         BLKmode for ternary, binary or unary expressions.
22671         PR debug/83645
22672         * var-tracking.c (delete_vta_debug_insn): New inline function.
22673         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22674         insns from get_insns () to NULL instead of each bb separately.
22675         Use delete_vta_debug_insn.  No longer static.
22676         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22677         delete_vta_debug_insns callers.
22678         * rtl.h (delete_vta_debug_insns): Declare.
22679         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22680         instead of variable_tracking_main.
22682 2018-01-03  Martin Sebor  <msebor@redhat.com>
22684         PR tree-optimization/83603
22685         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22686         arguments past the endof the argument list in functions declared
22687         without a prototype.
22688         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22689         Avoid checking when arguments are null.
22691 2018-01-03  Martin Sebor  <msebor@redhat.com>
22693         PR c/83559
22694         * doc/extend.texi (attribute const): Fix a typo.
22695         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22696         issuing -Wsuggest-attribute for void functions.
22698 2018-01-03  Martin Sebor  <msebor@redhat.com>
22700         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22701         offset_int::from instead of wide_int::to_shwi.
22702         (maybe_diag_overlap): Remove assertion.
22703         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22704         * gimple-ssa-sprintf.c (format_directive): Same.
22705         (parse_directive): Same.
22706         (sprintf_dom_walker::compute_format_length): Same.
22707         (try_substitute_return_value): Same.
22709 2018-01-03  Jeff Law  <law@redhat.com>
22711         PR middle-end/83654
22712         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22713         non-constant residual for zero at runtime and avoid probing in
22714         that case.  Reorganize code for trailing problem to mirror handling
22715         of the residual.
22717 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22719         PR tree-optimization/83501
22720         * tree-ssa-strlen.c (get_string_cst): New.
22721         (handle_char_store): Call get_string_cst.
22723 2018-01-03  Martin Liska  <mliska@suse.cz>
22725         PR tree-optimization/83593
22726         * tree-ssa-strlen.c: Include tree-cfg.h.
22727         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22728         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22729         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22730         to false.
22731         (strlen_dom_walker::before_dom_children): Call
22732         gimple_purge_dead_eh_edges. Dump tranformation with details
22733         dump flags.
22734         (strlen_dom_walker::before_dom_children): Update call by adding
22735         new argument cleanup_eh.
22736         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22738 2018-01-03  Martin Liska  <mliska@suse.cz>
22740         PR ipa/83549
22741         * cif-code.def (VARIADIC_THUNK): New enum value.
22742         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22743         thunks.
22745 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22747         * sse.md (mov<mode>_internal): Tighten condition for when to use
22748         vmovdqu<ssescalarsize> for TI and OI modes.
22750 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22752         Update copyright years.
22754 2018-01-03  Martin Liska  <mliska@suse.cz>
22756         PR ipa/83594
22757         * ipa-visibility.c (function_and_variable_visibility): Skip
22758         functions with noipa attribure.
22760 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22762         * gcc.c (process_command): Update copyright notice dates.
22763         * gcov-dump.c (print_version): Ditto.
22764         * gcov.c (print_version): Ditto.
22765         * gcov-tool.c (print_version): Ditto.
22766         * gengtype.c (create_file): Ditto.
22767         * doc/cpp.texi: Bump @copying's copyright year.
22768         * doc/cppinternals.texi: Ditto.
22769         * doc/gcc.texi: Ditto.
22770         * doc/gccint.texi: Ditto.
22771         * doc/gcov.texi: Ditto.
22772         * doc/install.texi: Ditto.
22773         * doc/invoke.texi: Ditto.
22775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22777         * vector-builder.h (vector_builder::m_full_nelts): Change from
22778         unsigned int to poly_uint64.
22779         (vector_builder::full_nelts): Update prototype accordingly.
22780         (vector_builder::new_vector): Likewise.
22781         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22782         (vector_builder::operator ==): Likewise.
22783         (vector_builder::finalize): Likewise.
22784         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22785         Take the number of elements as a poly_uint64 rather than an
22786         unsigned int.
22787         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22788         from unsigned int to poly_uint64.
22789         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22790         (vec_perm_indices::new_vector): Likewise.
22791         (vec_perm_indices::length): Likewise.
22792         (vec_perm_indices::nelts_per_input): Likewise.
22793         (vec_perm_indices::input_nelts): Likewise.
22794         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22795         number of elements per input as a poly_uint64 rather than an
22796         unsigned int.  Use the original encoding for variable-length
22797         vectors, rather than clamping each individual element.
22798         For the second and subsequent elements in each pattern,
22799         clamp the step and base before clamping their sum.
22800         (vec_perm_indices::series_p): Handle polynomial element counts.
22801         (vec_perm_indices::all_in_range_p): Likewise.
22802         (vec_perm_indices_to_tree): Likewise.
22803         (vec_perm_indices_to_rtx): Likewise.
22804         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22805         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22806         (tree_vector_builder::new_binary_operation): Handle polynomial
22807         element counts.  Return false if we need to know the number
22808         of elements at compile time.
22809         * fold-const.c (fold_vec_perm): Punt if the number of elements
22810         isn't known at compile time.
22812 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22814         * vec-perm-indices.h (vec_perm_builder): Change element type
22815         from HOST_WIDE_INT to poly_int64.
22816         (vec_perm_indices::element_type): Update accordingly.
22817         (vec_perm_indices::clamp): Handle polynomial element_types.
22818         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22819         (vec_perm_indices::all_in_range_p): Likewise.
22820         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22821         than shwi trees.
22822         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22823         polynomial vec_perm_indices element types.
22824         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22825         * fold-const.c (fold_vec_perm): Likewise.
22826         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22827         * tree-vect-generic.c (lower_vec_perm): Likewise.
22828         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22829         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22830         element type to HOST_WIDE_INT.
22832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22833             Alan Hayward  <alan.hayward@arm.com>
22834             David Sherwood  <david.sherwood@arm.com>
22836         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22837         rather than an int.  Use plus_constant.
22838         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22839         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22842             Alan Hayward  <alan.hayward@arm.com>
22843             David Sherwood  <david.sherwood@arm.com>
22845         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22846         a HOST_WIDE_INT to a poly_int64.
22848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22849             Alan Hayward  <alan.hayward@arm.com>
22850             David Sherwood  <david.sherwood@arm.com>
22852         * calls.c (load_register_parameters): Cope with polynomial
22853         mode sizes.  Require a constant size for BLKmode parameters
22854         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22855         forces a parameter to be padded at the lsb end in order to
22856         fill a complete number of words, require the parameter size
22857         to be ordered wrt UNITS_PER_WORD.
22859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22860             Alan Hayward  <alan.hayward@arm.com>
22861             David Sherwood  <david.sherwood@arm.com>
22863         * reload1.c (spill_stack_slot_width): Change element type
22864         from unsigned int to poly_uint64_pod.
22865         (alter_reg): Treat mode sizes as polynomial.
22867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22868             Alan Hayward  <alan.hayward@arm.com>
22869             David Sherwood  <david.sherwood@arm.com>
22871         * reload.c (complex_word_subreg_p): New function.
22872         (reload_inner_reg_of_subreg, push_reload): Use it.
22874 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22875             Alan Hayward  <alan.hayward@arm.com>
22876             David Sherwood  <david.sherwood@arm.com>
22878         * lra-constraints.c (process_alt_operands): Reject matched
22879         operands whose sizes aren't ordered.
22880         (match_reload): Refer to this check here.
22882 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22883             Alan Hayward  <alan.hayward@arm.com>
22884             David Sherwood  <david.sherwood@arm.com>
22886         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22887         that the mode size is in the set {1, 2, 4, 8, 16}.
22889 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22890             Alan Hayward  <alan.hayward@arm.com>
22891             David Sherwood  <david.sherwood@arm.com>
22893         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22894         Use plus_constant instead of gen_rtx_PLUS.
22896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22897             Alan Hayward  <alan.hayward@arm.com>
22898             David Sherwood  <david.sherwood@arm.com>
22900         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22901         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22902         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22903         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22904         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22905         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22906         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22907         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22908         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22909         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22910         a poly_int64.
22911         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22912         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22913         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22914         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22915         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22916         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22917         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22918         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22919         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22920         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22921         function.
22922         * expr.c (emit_move_resolve_push): Treat the input and result
22923         of PUSH_ROUNDING as a poly_int64.
22924         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22925         (emit_push_insn): Likewise.
22926         * lra-eliminations.c (mark_not_eliminable): Likewise.
22927         * recog.c (push_operand): Likewise.
22928         * reload1.c (elimination_effects): Likewise.
22929         * rtlanal.c (nonzero_bits1): Likewise.
22930         * calls.c (store_one_arg): Likewise.  Require the padding to be
22931         known at compile time.
22933 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22934             Alan Hayward  <alan.hayward@arm.com>
22935             David Sherwood  <david.sherwood@arm.com>
22937         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22938         Use plus_constant instead of gen_rtx_PLUS.
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         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22945         rather than an int.
22947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22948             Alan Hayward  <alan.hayward@arm.com>
22949             David Sherwood  <david.sherwood@arm.com>
22951         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22952         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22953         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
22960         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22961         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22962         as a poly_uint64 too.
22964 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22965             Alan Hayward  <alan.hayward@arm.com>
22966             David Sherwood  <david.sherwood@arm.com>
22968         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
22975         REGMODE_NATURAL_SIZE.
22976         * expmed.c (store_bit_field_1): Likewise.
22977         * expr.c (store_constructor): Likewise.
22978         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22979         and polynomial REGMODE_NATURAL_SIZE.
22980         (gen_lowpart_common): Likewise.
22981         * reginfo.c (record_subregs_of_mode): Likewise.
22982         * rtlanal.c (read_modify_subreg_p): Likewise.
22984 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22985             Alan Hayward  <alan.hayward@arm.com>
22986             David Sherwood  <david.sherwood@arm.com>
22988         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22989         numbers of elements.
22991 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22992             Alan Hayward  <alan.hayward@arm.com>
22993             David Sherwood  <david.sherwood@arm.com>
22995         * match.pd: Cope with polynomial numbers of vector elements.
22997 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22998             Alan Hayward  <alan.hayward@arm.com>
22999             David Sherwood  <david.sherwood@arm.com>
23001         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
23002         in a POINTER_PLUS_EXPR.
23004 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23005             Alan Hayward  <alan.hayward@arm.com>
23006             David Sherwood  <david.sherwood@arm.com>
23008         * omp-simd-clone.c (simd_clone_subparts): New function.
23009         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
23010         (ipa_simd_modify_function_body): Likewise.
23012 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23013             Alan Hayward  <alan.hayward@arm.com>
23014             David Sherwood  <david.sherwood@arm.com>
23016         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
23017         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
23018         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
23019         (expand_vector_condition, vector_element): Likewise.
23020         (subparts_gt): New function.
23021         (get_compute_type): Use subparts_gt.
23022         (count_type_subparts): Delete.
23023         (expand_vector_operations_1): Use subparts_gt instead of
23024         count_type_subparts.
23026 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23027             Alan Hayward  <alan.hayward@arm.com>
23028             David Sherwood  <david.sherwood@arm.com>
23030         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
23031         (vect_compile_time_alias): ...this new function.  Do the calculation
23032         on poly_ints rather than trees.
23033         (vect_prune_runtime_alias_test_list): Update call accordingly.
23035 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23036             Alan Hayward  <alan.hayward@arm.com>
23037             David Sherwood  <david.sherwood@arm.com>
23039         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
23040         numbers of units.
23041         (vect_schedule_slp_instance): Likewise.
23043 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23044             Alan Hayward  <alan.hayward@arm.com>
23045             David Sherwood  <david.sherwood@arm.com>
23047         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
23048         constant and extern definitions for variable-length vectors.
23049         (vect_get_constant_vectors): Note that the number of units
23050         is known to be constant.
23052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23053             Alan Hayward  <alan.hayward@arm.com>
23054             David Sherwood  <david.sherwood@arm.com>
23056         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
23057         of units as polynomial.  Choose between WIDE and NARROW based
23058         on multiple_p.
23060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23061             Alan Hayward  <alan.hayward@arm.com>
23062             David Sherwood  <david.sherwood@arm.com>
23064         * tree-vect-stmts.c (simd_clone_subparts): New function.
23065         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
23067 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23068             Alan Hayward  <alan.hayward@arm.com>
23069             David Sherwood  <david.sherwood@arm.com>
23071         * tree-vect-stmts.c (vectorizable_call): Treat the number of
23072         vectors as polynomial.  Use build_index_vector for
23073         IFN_GOMP_SIMD_LANE.
23075 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23076             Alan Hayward  <alan.hayward@arm.com>
23077             David Sherwood  <david.sherwood@arm.com>
23079         * tree-vect-stmts.c (get_load_store_type): Treat the number of
23080         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
23081         for variable-length vectors.
23082         (vectorizable_mask_load_store): Treat the number of units as
23083         polynomial, asserting that it is constant if the condition has
23084         already been enforced.
23085         (vectorizable_store, vectorizable_load): Likewise.
23087 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23088             Alan Hayward  <alan.hayward@arm.com>
23089             David Sherwood  <david.sherwood@arm.com>
23091         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
23092         of units as polynomial.  Punt if we can't tell at compile time
23093         which vector contains the final result.
23095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23096             Alan Hayward  <alan.hayward@arm.com>
23097             David Sherwood  <david.sherwood@arm.com>
23099         * tree-vect-loop.c (vectorizable_induction): Treat the number
23100         of units as polynomial.  Punt on SLP inductions.  Use an integer
23101         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
23102         cast of such a series for variable-length floating-point
23103         reductions.
23105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23106             Alan Hayward  <alan.hayward@arm.com>
23107             David Sherwood  <david.sherwood@arm.com>
23109         * tree.h (build_index_vector): Declare.
23110         * tree.c (build_index_vector): New function.
23111         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23112         of units as polynomial, forcibly converting it to a constant if
23113         vectorizable_reduction has already enforced the condition.
23114         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23115         to create a {1,2,3,...} vector.
23116         (vectorizable_reduction): Treat the number of units as polynomial.
23117         Choose vectype_in based on the largest scalar element size rather
23118         than the smallest number of units.  Enforce the restrictions
23119         relied on above.
23121 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23122             Alan Hayward  <alan.hayward@arm.com>
23123             David Sherwood  <david.sherwood@arm.com>
23125         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23126         number of units as polynomial.
23128 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23129             Alan Hayward  <alan.hayward@arm.com>
23130             David Sherwood  <david.sherwood@arm.com>
23132         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23133         * target.def (autovectorize_vector_sizes): Return the vector sizes
23134         by pointer, using vector_sizes rather than a bitmask.
23135         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23136         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23137         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23138         Likewise.
23139         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23140         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23141         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23142         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23143         * omp-general.c (omp_max_vf): Likewise.
23144         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23145         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23146         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23147         * tree-vect-slp.c (vect_slp_bb): Likewise.
23148         * doc/tm.texi: Regenerate.
23149         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23150         to a poly_uint64.
23151         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23152         the vector size as a poly_uint64 rather than an unsigned int.
23153         (current_vector_size): Change from an unsigned int to a poly_uint64.
23154         (get_vectype_for_scalar_type): Update accordingly.
23155         * tree.h (build_truth_vector_type): Take the size and number of
23156         units as a poly_uint64 rather than an unsigned int.
23157         (build_vector_type): Add a temporary overload that takes
23158         the number of units as a poly_uint64 rather than an unsigned int.
23159         * tree.c (make_vector_type): Likewise.
23160         (build_truth_vector_type): Take the number of units as a poly_uint64
23161         rather than an unsigned int.
23163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23164             Alan Hayward  <alan.hayward@arm.com>
23165             David Sherwood  <david.sherwood@arm.com>
23167         * target.def (get_mask_mode): Take the number of units and length
23168         as poly_uint64s rather than unsigned ints.
23169         * targhooks.h (default_get_mask_mode): Update accordingly.
23170         * targhooks.c (default_get_mask_mode): Likewise.
23171         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23172         * doc/tm.texi: Regenerate.
23174 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23175             Alan Hayward  <alan.hayward@arm.com>
23176             David Sherwood  <david.sherwood@arm.com>
23178         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23179         * omp-general.c (omp_max_vf): Likewise.
23180         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23181         (expand_omp_simd): Handle polynomial safelen.
23182         * omp-low.c (omplow_simd_context): Add a default constructor.
23183         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23184         (lower_rec_simd_input_clauses): Update accordingly.
23185         (lower_rec_input_clauses): Likewise.
23187 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23188             Alan Hayward  <alan.hayward@arm.com>
23189             David Sherwood  <david.sherwood@arm.com>
23191         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23192         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23193         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23194         (vect_analyze_slp_cost): Likewise.
23195         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23196         (vect_model_load_cost): Likewise.
23198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23199             Alan Hayward  <alan.hayward@arm.com>
23200             David Sherwood  <david.sherwood@arm.com>
23202         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23203         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23204         from an unsigned int * to a poly_uint64_pod *.
23205         (calculate_unrolling_factor): New function.
23206         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23209             Alan Hayward  <alan.hayward@arm.com>
23210             David Sherwood  <david.sherwood@arm.com>
23212         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23213         from an unsigned int to a poly_uint64.
23214         (_loop_vec_info::slp_unrolling_factor): Likewise.
23215         (_loop_vec_info::vectorization_factor): Change from an int
23216         to a poly_uint64.
23217         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23218         (vect_get_num_vectors): New function.
23219         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23220         (vect_get_num_copies): Use vect_get_num_vectors.
23221         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23222         to an unsigned int *.
23223         (vect_analyze_data_refs): Change min_vf from an int * to a
23224         poly_uint64 *.
23225         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23226         than an unsigned HOST_WIDE_INT.
23227         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23228         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23229         to an unsigned int *.
23230         (vect_analyze_data_ref_dependences): Likewise.
23231         (vect_compute_data_ref_alignment): Handle polynomial vf.
23232         (vect_enhance_data_refs_alignment): Likewise.
23233         (vect_prune_runtime_alias_test_list): Likewise.
23234         (vect_shift_permute_load_chain): Likewise.
23235         (vect_supportable_dr_alignment): Likewise.
23236         (dependence_distance_ge_vf): Take the vectorization factor as a
23237         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23238         (vect_analyze_data_refs): Change min_vf from an int * to a
23239         poly_uint64 *.
23240         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23241         vfm1 as a poly_uint64 rather than an int.  Make the same change
23242         for the returned bound_scalar.
23243         (vect_gen_vector_loop_niters): Handle polynomial vf.
23244         (vect_do_peeling): Likewise.  Update call to
23245         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23246         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23247         be constant.
23248         * tree-vect-loop.c (vect_determine_vectorization_factor)
23249         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23250         (vect_get_known_peeling_cost): Likewise.
23251         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23252         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23253         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23254         updating the upper bounds of the loop.
23255         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23256         rather than an int.
23257         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23258         polynomial unroll factors.
23259         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23260         (vect_make_slp_decision): Likewise.
23261         (vect_supported_load_permutation_p): Likewise, and polynomial
23262         vf too.
23263         (vect_analyze_slp_cost): Handle polynomial vf.
23264         (vect_slp_analyze_node_operations): Likewise.
23265         (vect_slp_analyze_bb_1): Likewise.
23266         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23267         than an unsigned HOST_WIDE_INT.
23268         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23269         (vectorizable_load): Handle polynomial vf.
23270         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23271         a poly_uint64.
23272         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23274 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23275             Alan Hayward  <alan.hayward@arm.com>
23276             David Sherwood  <david.sherwood@arm.com>
23278         * match.pd: Handle bit operations involving three constants
23279         and try to fold one pair.
23281 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23283         * tree-vect-loop-manip.c: Include gimple-fold.h.
23284         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23285         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23286         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23287         Add a path that uses a step of VF instead of 1, but disable it
23288         for now.
23289         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23290         and niters_no_overflow parameters.  Update calls to
23291         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23292         Create a new SSA name if the latter choses to use a ste other
23293         than zero, and return it via niters_vector_mult_vf_var.
23294         * tree-vect-loop.c (vect_transform_loop): Update calls to
23295         vect_do_peeling, vect_gen_vector_loop_niters and
23296         slpeel_make_loop_iterate_ntimes.
23297         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23298         (vect_gen_vector_loop_niters): Update declarations after above changes.
23300 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23302         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23303         128-bit round to integer instructions.
23304         (ceil<mode>2): Likewise.
23305         (btrunc<mode>2): Likewise.
23306         (round<mode>2): Likewise.
23308 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23310         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23311         unaligned VSX load/store on P8/P9.
23312         (expand_block_clear): Allow the use of unaligned VSX
23313         load/store on P8/P9.
23315 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23317         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23318         New function.
23319         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23320         swap associated with both a load and a store.
23322 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23324         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23325         * config/riscv/riscv.md (clear_cache): Use it.
23327 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23329         * web.c: Remove out-of-date comment.
23331 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23333         * expr.c (fixup_args_size_notes): Check that any existing
23334         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23335         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23336         (emit_single_push_insn): ...here.
23338 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23340         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23341         (const_vector_encoded_nelts): New function.
23342         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23343         (const_vector_int_elt, const_vector_elt): Declare.
23344         * emit-rtl.c (const_vector_int_elt_1): New function.
23345         (const_vector_elt): Likewise.
23346         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23347         of CONST_VECTOR_ELT.
23349 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23351         * expr.c: Include rtx-vector-builder.h.
23352         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23353         directly on the tree encoding.
23354         (const_vector_from_tree): Likewise.
23355         * optabs.c: Include rtx-vector-builder.h.
23356         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23357         sequence of "u" values.
23358         * vec-perm-indices.c: Include rtx-vector-builder.h.
23359         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23360         directly on the vec_perm_indices encoding.
23362 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23364         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23365         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23366         * rtx-vector-builder.h: New file.
23367         * rtx-vector-builder.c: Likewise.
23368         * rtl.h (rtx_def::u2): Add a const_vector field.
23369         (CONST_VECTOR_NPATTERNS): New macro.
23370         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23371         (CONST_VECTOR_DUPLICATE_P): Likewise.
23372         (CONST_VECTOR_STEPPED_P): Likewise.
23373         (CONST_VECTOR_ENCODED_ELT): Likewise.
23374         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23375         (unwrap_const_vec_duplicate): Likewise.
23376         (const_vec_series_p): Check for a non-duplicated vector encoding.
23377         Say that the function only returns true for integer vectors.
23378         * emit-rtl.c: Include rtx-vector-builder.h.
23379         (gen_const_vec_duplicate_1): Delete.
23380         (gen_const_vector): Call gen_const_vec_duplicate instead of
23381         gen_const_vec_duplicate_1.
23382         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23383         (gen_const_vec_duplicate): Use rtx_vector_builder.
23384         (gen_const_vec_series): Likewise.
23385         (gen_rtx_CONST_VECTOR): Likewise.
23386         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23387         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23388         Build a new vector rather than modifying a CONST_VECTOR in-place.
23389         (handle_special_swappables): Update call accordingly.
23390         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23391         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23392         Build a new vector rather than modifying a CONST_VECTOR in-place.
23393         (handle_special_swappables): Update call accordingly.
23395 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23397         * simplify-rtx.c (simplify_const_binary_operation): Use
23398         CONST_VECTOR_ELT instead of XVECEXP.
23400 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23402         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23403         the selector elements to be different from the data elements
23404         if the selector is a VECTOR_CST.
23405         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23406         ssizetype for the selector.
23408 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23410         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23411         before testing each element individually.
23412         * tree-vect-generic.c (lower_vec_perm): Likewise.
23414 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23416         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23417         * selftest-run-tests.c (selftest::run_tests): Call it.
23418         * vector-builder.h (vector_builder::operator ==): New function.
23419         (vector_builder::operator !=): Likewise.
23420         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23421         (vec_perm_indices::all_from_input_p): New function.
23422         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23423         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23424         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23425         instead of reading the VECTOR_CST directly.  Detect whether both
23426         vector inputs are the same before constructing the vec_perm_indices,
23427         and update the number of inputs argument accordingly.  Use the
23428         utility functions added above.  Only construct sel2 if we need to.
23430 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23432         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23433         the broadcast of the low byte.
23434         (expand_mult_highpart): Use an explicit encoding for the permutes.
23435         * optabs-query.c (can_mult_highpart_p): Likewise.
23436         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23437         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23438         (vectorizable_bswap): Likewise.
23439         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23440         explicit encoding for the power-of-2 permutes.
23441         (vect_permute_store_chain): Likewise.
23442         (vect_grouped_load_supported): Likewise.
23443         (vect_permute_load_chain): Likewise.
23445 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23447         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23448         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23449         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23450         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23451         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23452         (vect_gen_perm_mask_any): Likewise.
23454 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23456         * int-vector-builder.h: New file.
23457         * vec-perm-indices.h: Include int-vector-builder.h.
23458         (vec_perm_indices): Redefine as an int_vector_builder.
23459         (auto_vec_perm_indices): Delete.
23460         (vec_perm_builder): Redefine as a stand-alone class.
23461         (vec_perm_indices::vec_perm_indices): New function.
23462         (vec_perm_indices::clamp): Likewise.
23463         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23464         (vec_perm_indices::new_vector): New function.
23465         (vec_perm_indices::new_expanded_vector): Update for new
23466         vec_perm_indices class.
23467         (vec_perm_indices::rotate_inputs): New function.
23468         (vec_perm_indices::all_in_range_p): Operate directly on the
23469         encoded form, without computing elided elements.
23470         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23471         encoding.  Update for new vec_perm_indices class.
23472         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23473         the given vec_perm_builder.
23474         (expand_vec_perm_var): Update vec_perm_builder constructor.
23475         (expand_mult_highpart): Use vec_perm_builder instead of
23476         auto_vec_perm_indices.
23477         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23478         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23479         or double series encoding as appropriate.
23480         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23481         vec_perm_indices instead of auto_vec_perm_indices.
23482         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23483         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23484         (vect_permute_store_chain): Likewise.
23485         (vect_grouped_load_supported): Likewise.
23486         (vect_permute_load_chain): Likewise.
23487         (vect_shift_permute_load_chain): Likewise.
23488         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23489         (vect_transform_slp_perm_load): Likewise.
23490         (vect_schedule_slp_instance): Likewise.
23491         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23492         (vectorizable_mask_load_store): Likewise.
23493         (vectorizable_bswap): Likewise.
23494         (vectorizable_store): Likewise.
23495         (vectorizable_load): Likewise.
23496         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23497         vec_perm_indices instead of auto_vec_perm_indices.  Use
23498         tree_to_vec_perm_builder to read the vector from a tree.
23499         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23500         vec_perm_builder instead of a vec_perm_indices.
23501         (have_whole_vector_shift): Use vec_perm_builder and
23502         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23503         truncation to calc_vec_perm_mask_for_shift.
23504         (vect_create_epilog_for_reduction): Likewise.
23505         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23506         from auto_vec_perm_indices to vec_perm_indices.
23507         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23508         instead of changing individual elements.
23509         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23510         the vector in d.perm.
23511         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23512         from auto_vec_perm_indices to vec_perm_indices.
23513         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23514         instead of changing individual elements.
23515         (arm_vectorize_vec_perm_const): Use new_vector to install
23516         the vector in d.perm.
23517         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23518         Update vec_perm_builder constructor.
23519         (rs6000_expand_interleave): Likewise.
23520         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23521         (rs6000_expand_interleave): Likewise.
23523 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23525         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23526         to qimode could truncate the indices.
23527         * optabs.c (expand_vec_perm_var): Likewise.
23529 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23531         * Makefile.in (OBJS): Add vec-perm-indices.o.
23532         * vec-perm-indices.h: New file.
23533         * vec-perm-indices.c: Likewise.
23534         * target.h (vec_perm_indices): Replace with a forward class
23535         declaration.
23536         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23537         * optabs.h: Include vec-perm-indices.h.
23538         (expand_vec_perm): Delete.
23539         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23540         (expand_vec_perm_const): Declare.
23541         * target.def (vec_perm_const_ok): Replace with...
23542         (vec_perm_const): ...this new hook.
23543         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23544         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23545         * doc/tm.texi: Regenerate.
23546         * optabs.def (vec_perm_const): Delete.
23547         * doc/md.texi (vec_perm_const): Likewise.
23548         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23549         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23550         expand_vec_perm for constant permutation vectors.  Assert that
23551         the mode of variable permutation vectors is the integer equivalent
23552         of the mode that is being permuted.
23553         * optabs-query.h (selector_fits_mode_p): Declare.
23554         * optabs-query.c: Include vec-perm-indices.h.
23555         (selector_fits_mode_p): New function.
23556         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23557         is defined, instead of checking whether the vec_perm_const_optab
23558         exists.  Use targetm.vectorize.vec_perm_const instead of
23559         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23560         fit in the vector mode before using a variable permute.
23561         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23562         vec_perm_indices instead of an rtx.
23563         (expand_vec_perm): Replace with...
23564         (expand_vec_perm_const): ...this new function.  Take the selector
23565         as a vec_perm_indices rather than an rtx.  Also take the mode of
23566         the selector.  Update call to shift_amt_for_vec_perm_mask.
23567         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23568         Use vec_perm_indices::new_expanded_vector to expand the original
23569         selector into bytes.  Check whether the indices fit in the vector
23570         mode before using a variable permute.
23571         (expand_vec_perm_var): Make global.
23572         (expand_mult_highpart): Use expand_vec_perm_const.
23573         * fold-const.c: Includes vec-perm-indices.h.
23574         * tree-ssa-forwprop.c: Likewise.
23575         * tree-vect-data-refs.c: Likewise.
23576         * tree-vect-generic.c: Likewise.
23577         * tree-vect-loop.c: Likewise.
23578         * tree-vect-slp.c: Likewise.
23579         * tree-vect-stmts.c: Likewise.
23580         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23581         Delete.
23582         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23583         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23584         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23585         (aarch64_vectorize_vec_perm_const): ...this new function.
23586         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23587         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23588         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23589         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23590         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23591         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23592         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23593         into...
23594         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23595         check for NEON modes.
23596         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23597         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23598         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23599         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23600         into...
23601         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23602         the old VEC_PERM_CONST conditions.
23603         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23604         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23605         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23606         (ia64_vectorize_vec_perm_const_ok): Merge into...
23607         (ia64_vectorize_vec_perm_const): ...this new function.
23608         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23609         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23610         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23611         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23612         * config/mips/mips.c (mips_expand_vec_perm_const)
23613         (mips_vectorize_vec_perm_const_ok): Merge into...
23614         (mips_vectorize_vec_perm_const): ...this new function.
23615         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23616         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23617         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23618         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23619         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23620         (rs6000_expand_vec_perm_const): Delete.
23621         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23622         Delete.
23623         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23624         (altivec_expand_vec_perm_const_le): Take each operand individually.
23625         Operate on constant selectors rather than rtxes.
23626         (altivec_expand_vec_perm_const): Likewise.  Update call to
23627         altivec_expand_vec_perm_const_le.
23628         (rs6000_expand_vec_perm_const): Delete.
23629         (rs6000_vectorize_vec_perm_const_ok): Delete.
23630         (rs6000_vectorize_vec_perm_const): New function.
23631         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23632         an element count and rtx array.
23633         (rs6000_expand_extract_even): Update call accordingly.
23634         (rs6000_expand_interleave): Likewise.
23635         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23636         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23637         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23638         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23639         (rs6000_expand_vec_perm_const): Delete.
23640         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23641         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23642         (altivec_expand_vec_perm_const_le): Take each operand individually.
23643         Operate on constant selectors rather than rtxes.
23644         (altivec_expand_vec_perm_const): Likewise.  Update call to
23645         altivec_expand_vec_perm_const_le.
23646         (rs6000_expand_vec_perm_const): Delete.
23647         (rs6000_vectorize_vec_perm_const_ok): Delete.
23648         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23649         reference to the SPE evmerge intructions.
23650         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23651         an element count and rtx array.
23652         (rs6000_expand_extract_even): Update call accordingly.
23653         (rs6000_expand_interleave): Likewise.
23654         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23655         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23656         new function.
23657         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23659 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23661         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23662         vector mode and that that mode matches the mode of the data
23663         being permuted.
23664         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23665         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23666         directly using expand_vec_perm_1 when forcing selectors into
23667         registers.
23668         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23670 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23672         * optabs-query.h (can_vec_perm_p): Delete.
23673         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23674         * optabs-query.c (can_vec_perm_p): Split into...
23675         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23676         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23677         particular selector is valid.
23678         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23679         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23680         (vect_grouped_load_supported): Likewise.
23681         (vect_shift_permute_load_chain): Likewise.
23682         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23683         (vect_transform_slp_perm_load): Likewise.
23684         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23685         (vectorizable_bswap): Likewise.
23686         (vect_gen_perm_mask_checked): Likewise.
23687         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23688         implementations of variable permutation vectors into account
23689         when deciding which selector to use.
23690         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23691         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23692         with a false third argument.
23693         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23694         to test whether the constant selector is valid and can_vec_perm_var_p
23695         to test whether a variable selector is valid.
23697 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23699         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23700         * optabs-query.c (can_vec_perm_p): Likewise.
23701         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23702         instead of vec_perm_indices.
23703         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23704         (vect_gen_perm_mask_checked): Likewise,
23705         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23706         (vect_gen_perm_mask_checked): Likewise,
23708 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23710         * optabs-query.h (qimode_for_vec_perm): Declare.
23711         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23712         (qimode_for_vec_perm): ...this new function.
23713         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23715 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23717         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23718         does not have a conditional at the top.
23720 2018-01-02  Richard Biener  <rguenther@suse.de>
23722         * ipa-inline.c (big_speedup_p): Fix expression.
23724 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23726         PR target/81616
23727         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23728         for generic 4->6.
23730 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23732         PR target/81616
23733         Generic tuning.
23734         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23735         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23736         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23737         cond_taken_branch_cost 3->4.
23739 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23741         PR tree-optimization/83581
23742         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23743         TODO_cleanup_cfg if any changes have been made.
23745         PR middle-end/83608
23746         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23747         convert_modes if target mode has the right side, but different mode
23748         class.
23750         PR middle-end/83609
23751         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23752         last argument when extracting from CONCAT.  If either from_real or
23753         from_imag is NULL, use expansion through memory.  If result is not
23754         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23755         the parts directly to inner mode, if even that fails, use expansion
23756         through memory.
23758         PR middle-end/83623
23759         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23760         check for bswap in mode rather than HImode and use that in expand_unop
23761         too.
23763 Copyright (C) 2018 Free Software Foundation, Inc.
23765 Copying and distribution of this file, with or without modification,
23766 are permitted in any medium without royalty provided the copyright
23767 notice and this notice are preserved.