* tree.c (find_decls_types_r): Do not check for redundant typedefs.
[official-gcc.git] / gcc / ChangeLog
blobc856a935e8b6e60f5c579102c0bc5e698b3a4b9b
1 2018-08-21  Jan Hubicka  <jh@suse.cz>
3         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4         * tree.h (is_redundant_typedef): Remove.
5         * dwarf2out.c (is_redundant_typedef): Turn into static function.
7 2018-08-21  Jan Hubicka  <jh@suse.cz>
9         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10         when possible.
12 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
14         * expmed.c (extract_low_bits): Reject invalid subregs early.
16 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18         PR middle-end/86121
19         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
20         behaviour.
22 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
24         * config/vxworks.h: Guard vxworks_asm_out_constructor and
25         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
26         * config/vxworks.c: Likewise.
28 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
30         * config/vxworks.c: Set targetm.have_ctors_dtors
31         if HAVE_INITFINI_ARRAY_SUPPORT.
32         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
33         if HAVE_INITFINI_ARRAY_SUPPORT.
35 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
37         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
38         default search path for VxWorks < 7.
40 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
42         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
43         (get_format_string): Refer to c_getstr.
45 2018-08-21  Tom de Vries  <tdevries@suse.de>
47         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
48         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
49         (debuginfo_early_stop): Declare.
50         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
51         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
52         (debuginfo_early_stop): New function.
53         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
54         and debuginfo_early_stop.
55         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
56         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
57         (general_init): Call debuginfo_early_init.
58         (finalize): Call debuginfo_fini.
59         (do_compile): Call debuginfo_init.
60         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
61         -fdump-early-debug.
62         (@item -fdump-debug, @item -fdump-earlydebug): Add.
64 2018-08-21  Tom de Vries  <tdevries@suse.de>
66         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
67         flag_dump_noaddr and flag_dump_unnumbered.
69 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
71         * wide-int-range.cc (wide_int_range_abs): New.
72         (wide_int_range_order_set): Rename from wide_int_range_min_max.
73         * wide-int-range.h (wide_int_range_abs): New.
74         (wide_int_range_min_max): New.
75         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
76         case to call wide_int_range_abs.
77         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
78         (extract_range_from_abs_expr): Delete.
80 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
82         PR target/87033
83         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
84         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
85         for indexed loads.
87 2018-08-20  Nathan Sidwell  <nathan@acm.org>
88             Jeff Law <law@redhat.com>
90         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
91         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
93 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
95         PR other/84889
96         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
97         (decl_attributes): Likewise.
98         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
99         instance.
100         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
101         * diagnostic-core.h (class auto_diagnostic_group): New class.
102         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
103         (diagnostic_report_diagnostic): Handle the first diagnostics within
104         a group.
105         (emit_diagnostic): Add auto_diagnostic_group instance.
106         (inform): Likewise.
107         (inform_n): Likewise.
108         (warning): Likewise.
109         (warning_at): Likewise.
110         (warning_n): Likewise.
111         (pedwarn): Likewise.
112         (permerror): Likewise.
113         (error): Likewise.
114         (error_n): Likewise.
115         (error_at): Likewise.
116         (sorry): Likewise.
117         (fatal_error): Likewise.
118         (internal_error): Likewise.
119         (internal_error_no_backtrace): Likewise.
120         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
121         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
122         * diagnostic.h (struct diagnostic_context): Add fields
123         "diagnostic_group_nesting_depth",
124         "diagnostic_group_emission_count", "begin_group_cb",
125         "end_group_cb".
126         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
127         Add auto_diagnostic_group instance(s).
128         (find_explicit_erroneous_behavior): Likewise.
129         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
130         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
131         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
132         (gimplify_va_arg_expr): Likewise.
133         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
134         (HSA_SORRY_AT): Likewise.
135         * ipa-devirt.c (compare_virtual_tables): Likewise.
136         (warn_odr): Likewise.
137         * multiple_target.c (expand_target_clones): Likewise.
138         * opts-common.c (cmdline_handle_error): Likewise.
139         * reginfo.c (globalize_reg): Likewise.
140         * substring-locations.c (format_warning_n_va): Likewise.
141         * tree-inline.c (expand_call_inline): Likewise.
142         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
143         * tree-ssa-loop-niter.c
144         (do_warn_aggressive_loop_optimizations): Likewise.
145         * tree-ssa-uninit.c (warn_uninit): Likewise.
146         * tree.c (warn_deprecated_use): Likewise.
148 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
150         PR target/87014
151         * config/i386/i386.md (eh_return): Always update EH return
152         address in word_mode.
154 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
156         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
157         TARGET_SPLIT_COMPLEX_ARG is defined.
159 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
161         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
163 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
165         PR target/86984
166         * expr.c (expand_assignment): Assert that bitpos is positive.
167         (store_field): Likewise
168         (expand_expr_real_1): Make sure that bitpos is positive.
169         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
170         integer overflow.
172 2018-08-20  Nathan Sidwell  <nathan@acm.org>
174         * Makefile.in (CPP_ID_DATA_H): Delete.
175         (CPP_INTERNAL_H): Don't add it.
176         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
177         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
179 2018-08-20  Richard Biener  <rguenther@suse.de>
181         PR tree-optimization/78655
182         * tree-vrp.c (extract_range_from_binary_expr_1): Make
183         pointer + offset nonnull if either operand is nonnull work.
185 2018-08-20  Tom de Vries  <tdevries@suse.de>
187         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
188         unless the referenced die describes the added property using
189         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
190         Otherwise, add a DW_AT_location to the referenced die.
192 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
194         PR target/86994
195         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
196         register_operand when calling ix86_set_reg_reg_cost.
197         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
198         Set *total to 0 for operands that satisfy x86_64_immediate_operand
199         predicate and to 1 otherwise.
201 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
203         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
204         emit a diagnostic that it is not supported and reset the option.
205         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
206         supported and consume the option.  (ASM_FINAL_SPEC): New.
208 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
210         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
211         a sentence.
213 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
215         C-SKY port: Documentation
217         * doc/extend.texi (C-SKY Function Attributes): New section.
218         * doc/invoke.texi (Option Summary): Add C-SKY options.
219         (C-SKY Options): New section.
220         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
222 2018-08-17  Jojo  <jijie_rong@c-sky.com>
223             Huibin Wang  <huibin_wang@c-sky.com>
224             Sandra Loosemore  <sandra@codesourcery.com>
225             Chung-Lin Tang  <cltang@codesourcery.com>
227         C-SKY port: Backend implementation
229         * config/csky/*: New.
230         * common/config/csky/*: New.
232 2018-08-17  Jojo  <jijie_rong@c-sky.com>
233             Huibin Wang  <huibin_wang@c-sky.com>
234             Sandra Loosemore  <sandra@codesourcery.com>
235             Chung-Lin Tang  <cltang@codesourcery.com>
236             Andrew Jenner  <andrew@codesourcery.com>
238         C-SKY port: Configury
240         * config.gcc (csky-*-*): New.
241         * configure.ac: Add csky to targets for dwarf2 debug_line support.
242         * configure: Regenerated.
244 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
246         * dump-context.h: Include "dumpfile.h".
247         (dump_context::dump_printf_va): Convert final param from va_list
248         to va_list *.  Convert from ATTRIBUTE_PRINTF to
249         ATTRIBUTE_GCC_DUMP_PRINTF.
250         (dump_context::dump_printf_loc_va): Likewise.
251         * dumpfile.c: Include "stringpool.h".
252         (make_item_for_dump_printf_va): Delete.
253         (make_item_for_dump_printf): Delete.
254         (class dump_pretty_printer): New class.
255         (dump_pretty_printer::dump_pretty_printer): New ctor.
256         (dump_pretty_printer::emit_items): New member function.
257         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
258         function.
259         (dump_pretty_printer::emit_item): New member function.
260         (dump_pretty_printer::stash_item): New member function.
261         (dump_pretty_printer::format_decoder_cb): New member function.
262         (dump_pretty_printer::decode_format): New member function.
263         (dump_context::dump_printf_va): Reimplement in terms of
264         dump_pretty_printer.
265         (dump_context::dump_printf_loc_va): Convert final param from va_list
266         to va_list *.
267         (dump_context::begin_scope): Reimplement call to
268         make_item_for_dump_printf.
269         (dump_printf): Update for change to dump_printf_va.
270         (dump_printf_loc): Likewise.
271         (selftest::test_capture_of_dump_calls): Convert "stmt" from
272         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
273         with %T, %E, and %G.
274         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
275         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
276         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
277         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
278         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
279         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
280         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
281         within a dump_printf_loc call to "%wu".
282         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
283         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
284         missing space after "=".
285         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
286         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
287         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
288         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
289         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
290         duplicate "vectorized" from message.
292 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
294         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
295         polyNxK_t element's TYPE_STRING_FLAG.
297 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
299         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
300         (they were unnamed before).  Fix comments.
302 2018-08-17  Nathan Sidwell  <nathan@acm.org>
304         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
306 2018-08-17  Richard Biener  <rguenther@suse.de>
308         PR tree-optimization/86841
309         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
311 2018-08-17  Martin Liska  <mliska@suse.cz>
313         * common.opt: Remove Warn, Init and Report for options with
314         Ignore/Deprecated flag. Warning is done automatically for
315         Deprecated flags.
316         * config/i386/i386.opt: Likewise.
317         * config/ia64/ia64.opt: Likewise.
318         * config/rs6000/rs6000.opt: Likewise.
319         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
320         Remove usage of flag_check_pointer_bounds.
321         * lto-wrapper.c (merge_and_complain): Do not handle
322         OPT_fcheck_pointer_bounds.
323         (append_compiler_options): Likewise.
324         * opt-functions.awk: Do not handle Deprecated.
325         * optc-gen.awk: Check that Var, Report and Init are not
326         used for an option with Ignore/Deprecated flag.
327         * opts-common.c (decode_cmdline_option): Do not report
328         CL_ERR_DEPRECATED.
329         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
330         options.
331         * opts.h (struct cl_option): Remove cl_deprecated flag.
332         (CL_ERR_DEPRECATED): Remove error enum value.
334 2018-08-17  Richard Biener  <rguenther@suse.de>
336         PR middle-end/86505
337         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
338         across a va-arg-pack using call adjust its return value accordingly.
340 2018-08-16  Martin Sebor  <msebor@redhat.com>
342         PR tree-optimization/86853
343         * gimple-ssa-sprintf.c (struct format_result): Rename member.
344         (struct fmtresult): Add member and initialize it in ctors.
345         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
346         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
347         (format_directive): Set POSUNDER4K when MAYFAIL is set.
348         (parse_directive): Handle %C same as %c.
349         (sprintf_dom_walker::compute_format_length): Adjust.
350         (is_call_safe): Adjust.
352 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
354         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
355         for determining how to count the elements.
356         * builtins.h (c_strlen): Adjust prototype.
357         * expr.c (string_constant): Add new parameter mem_size.
358         Set *mem_size appropriately.
359         * expr.h (string_constant): Adjust protoype.
360         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
361         * gimple-fold.h (get_range_strlen): Adjust prototype.
362         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
363         (format_string): Call get_string_length with eltsize.
365 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
367         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
368         to emit the span, rather than setting it as the prefix.
370 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
372         * diagnostic-show-locus.c (layout::start_annotation_line): Add
373         "margin_char" parameter, defaulting to space.  Use it in place
374         of pp_space for the initial part of the margin.
375         (layout::print_leading_fixits): Use '+' when filling the margin
376         of line-insertion fix-it hints.
378 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
380         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
381         Delete.
383 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
385         * config/rs6000/altivec.md: Don't set length attribute to the default
386         value.
387         * config/rs6000/darwin.md: Ditto.
388         * config/rs6000/dfp.md: Ditto.
389         * config/rs6000/htm.md: Ditto.
390         * config/rs6000/rs6000.md: Ditto.
391         * config/rs6000/sync.md: Ditto.
392         * config/rs6000/vsx.md: Ditto.
394 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
396         * config/rs6000/altivec.md: Don't set length attribute to the default
397         value, for branch instructions.
398         * config/rs6000/darwin.md: Ditto.
399         * config/rs6000/rs6000.md: Ditto.
401 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
403         * config/rs6000/rs6000.md (length): Always define as const_int 4.
404         (unnamed conditional branch define_insn): Set length to 4 or 8
405         depending on offset.
406         (<bd>_<mode>): Similar, for alternative 0.
407         (<bd>tf_<mode>): Ditto.
409 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
411         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
413 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
415         * doc/rtl.texi: Replace old RTX class names with new names.
418 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
420         * expmed.h (canonicalize_comparison): New declaration.
421         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
422         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
423         * optabs.c (prepare_cmp_insn): Likewise.
424         * rtl.h (unsigned_condition_p): New function which checks if a
425         comparison operator is unsigned.
427 2018-08-16  Nathan Sidwell  <nathan@acm.org>
429         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
430         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
432 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
434         PR target/84711
435         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
436         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
437         (mov<mov>): ..this and enable unconditionally.
439 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
441         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
443 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
445         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
446         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
447         "Common" with "Target".
449 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
451         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
452         * doc/invoke.texi (mmitigate-rop): Remove.
453         * config/i386/i386.c: Do not include "regrename.h".
454         (ix86_rop_should_change_byte_p, reg_encoded_number)
455         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
456         Remove.
457         (ix86_reorg): Remove call to ix86_mitigate_rop.
458         * config/i386/i386.md (attr "modrm_class"): Remove.
459         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
460         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
461         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
463 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
465         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
466         allow folding of mergeh() and mergel() for the float and double types.
467         (fold_mergehl_helper): Rework to handle building a permute tree
468         for float vectors.
470 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
472         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
473         for TARGET_SSE.
475 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
477         * common.opt (fdiagnostics-show-labels): New option.
478         * diagnostic-show-locus.c (class layout_range): Add field
479         "m_label".
480         (class layout): Add field "m_show_labels_p".
481         (layout_range::layout_range): Add param "label" and use it to
482         initialize m_label.
483         (make_range): Pass in NULL for new "label" param of layout_range's
484         ctor.
485         (layout::layout): Initialize m_show_labels_p.
486         (layout::maybe_add_location_range): Pass in loc_range->m_label
487         when constructing layout_range instances.
488         (struct line_label): New struct.
489         (layout::print_any_labels): New member function.
490         (layout::print_line): Call it if label-printing is enabled.
491         (selftest::test_one_liner_labels): New test.
492         (selftest::test_diagnostic_show_locus_one_liner): Call it.
493         * diagnostic.c (diagnostic_initialize): Initialize
494         context->show_labels_p.
495         * diagnostic.h (struct diagnostic_context): Add field
496         "show_labels_p".
497         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
498         -fno-diagnostics-show-labels.
499         * dwarf2out.c (gen_producer_string): Add
500         OPT_fdiagnostics_show_labels to the ignored options.
501         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
502         param.
503         (gcc_rich_location::maybe_add_expr): Likewise.
504         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
505         label" param, defaulting to NULL.
506         (gcc_rich_location::add_expr): Add "label" param.
507         (gcc_rich_location::maybe_add_expr): Likewise.
508         (class text_range_label): New class.
509         (class range_label_for_type_mismatch): New class.
510         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
511         of format_warning_va.
512         (fmtwarn_n): Likewise for new params of format_warning_n_va.
513         * lto-wrapper.c (merge_and_complain): Add
514         OPT_fdiagnostics_show_labels to the "pick one setting" options.
515         (append_compiler_options): Likewise to the dropped options.
516         (append_diag_options): Likewise to the passed-on options.
517         * opts.c (common_handle_option): Handle the new option.
518         * selftest-diagnostic.c
519         (test_diagnostic_context::test_diagnostic_context): Enable
520         show_labels_p.
521         * substring-locations.c: Include "gcc-rich-location.h".
522         (format_warning_n_va): Add "fmt_label" and "param_label" params
523         and use them as appropriate.
524         (format_warning_va): Add "fmt_label" and "param_label" params,
525         passing them on to format_warning_n_va.
526         (format_warning_at_substring): Likewise.
527         (format_warning_at_substring_n): Likewise.
528         * substring-locations.h (format_warning_va): Add "fmt_label" and
529         "param_label" params.
530         (format_warning_n_va): Likewise.
531         (format_warning_at_substring): Likewise.
532         (format_warning_at_substring_n): Likewise.
533         * toplev.c (general_init): Initialize global_dc->show_labels_p.
535 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
537         PR testsuite/86519
538         * builtins.c (expand_builtin_memcmp): Do not expand the call
539         when overflow is detected.
541 2018-08-15  Martin Sebor  <msebor@redhat.com>
543         PR tree-optimization/71625
544         * config/aarch64/aarch64-builtins.c
545         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
547 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
549         * config/s390/s390.c (s390_reorg): Remove loop.
551 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
553         * config/darwin.c
554          (darwin_function_switched_text_sections): Delete.
555         * gcc/config/darwin.h
556          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
558 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
560         PR target/81685
561         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
562         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
563         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
565 2018-08-15  Martin Liska  <mliska@suse.cz>
567         PR tree-optimization/86925
568         * predict.c (expr_expected_value_1): When taking
569         later predictor, assign also probability.
570         Use fold_build2_initializer_loc in order to fold
571         the expression in -frounding-math.
573 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
575         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
576         patterns.
577         (expand_vec_perm_1): Try the new method.
579 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
581         PR target/86547
582         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
583         Check whether lra_live_max_point is 0 before dividing.
585 2018-08-14  Martin Sebor  <msebor@redhat.com>
587         PR tree-optimization/86650
588         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
589         (vrp_prop::check_mem_ref): Same.
591 2018-08-13  Liu Hao <lh_mouse@126.com>
593         * pretty-print.c (eat_esc_sequence): Swap the foreground and
594         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
595         and clear it thereafter, as it only works for DBCS.
597 2018-08-13  Liu Hao <lh_mouse@126.com>
599         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
600         handle returned by _get_osf_handle().
602 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
604         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
605         for folding vec_perm.
607 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
609         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
610         Add support for gimple-folding of vec_pack() and vec_unpack()
611         intrinsics.
613 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
615         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
616         vec_xst variants to the list.
617         (rs6000_gimple_fold_builtin): Add support for folding unaligned
618         vector loads and stores.
620 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
622         * config.gcc (rs6000-ibm-aix4.x): Delete.
623         (rs6000-ibm-aix5.1): Delete.
624         (rs6000-ibm-aix5.2): Delete.
625         (rs6000-ibm-aix5.3): Delete.
626         * config/rs6000/aix43.h: Delete.
627         * config/rs6000/aix51.h: Delete.
628         * config/rs6000/aix52.h: Delete.
629         * config/rs6000/t-aix43: Delete.
631 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
633         * config/s390/s390.c (s390_decompose_constant_pool_ref):
634         New function.
635         (s390_decompose_address): Factor out constant pool ref
636         decomposition.
638 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
640         * config/nds32/nds32-predicates.c
641         (nds32_can_use_bclr_p): Change return type as bool.
642         (nds32_can_use_bset_p): Ditto.
643         (nds32_can_use_btgl_p): Ditto.
644         (nds32_can_use_bitci_p): Ditto.
645         * config/nds32/nds32-protos.h
646         (nds32_can_use_bclr_p): Change declaration.
647         (nds32_can_use_bset_p): Ditto.
648         (nds32_can_use_btgl_p): Ditto.
649         (nds32_can_use_bitci_p): Ditto.
651 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
653         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
654         Support -msched-prolog-epilog option.
655         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
657 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
659         * common/config/nds32/nds32-common.c
660         (nds32_option_optimization_table): Enalbe -malways-align.
662 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
664         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
665         extra_headers.
666         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
667         OPT_misr_secure_ case.
668         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
669         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
670         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
671         secure attribute.
672         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
673         (nds32_isr_info): New field security_level.
674         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
675         * config/nds32/nds32.md (return_internal): Consider critical attribute.
676         * config/nds32/nds32.opt (misr-secure): New option.
677         * config/nds32/nds32_init.inc: New file.
678         * config/nds32/nds32_isr.h: New file.
680 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
682         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
683         Update comment for atomic instructions.
684         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
685         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
686         Remove.
687         (atomic_loaddi): Revise fence expansion to only emit fence prior to
688         load for __ATOMIC_SEQ_CST model.
689         (atomic_loaddi_1): Remove float register target.
690         (atomic_storedi): Handle CONST_INT values.
691         (atomic_storedi_1): Remove float register source.  Add special case
692         for zero value.
693         (memory_barrier): New expander and insn.
695 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
697         PR tree-optimization/86835
698         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
699         new_stmt after def_gsi, make sure to insert new_square_stmt after
700         that stmt, not 2 stmts before it.
702 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
704         PR target/82418
705         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
706         instead of SWI48.
708 2018-08-10  Martin Liska  <mliska@suse.cz>
710         PR target/83610
711         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
712         function type.
713         * builtins.c (expand_builtin_expect_with_probability):
714         New function.
715         (expand_builtin_expect_with_probability): New function.
716         (build_builtin_expect_predicate): Add new argumnet probability
717         for BUILT_IN_EXPECT_WITH_PROBABILITY.
718         (fold_builtin_expect):
719         (fold_builtin_2):
720         (fold_builtin_3):
721         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
722         * builtins.h (fold_builtin_expect): Set new argument.
723         * doc/extend.texi: Document __builtin_expect_with_probability.
724         * doc/invoke.texi: Likewise.
725         * gimple-fold.c (gimple_fold_call): Pass new argument.
726         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
727         also BUILT_IN_EXPECT_WITH_PROBABILITY.
728         * predict.c (get_predictor_value): New function.
729         (expr_expected_value): Add new argument probability. Assume
730         that predictor and probability are always non-null.
731         (expr_expected_value_1): Likewise.  For __builtin_expect and
732         __builtin_expect_with_probability set probability.  Handle
733         combination in binary expressions.
734         (tree_predict_by_opcode): Simplify code by simply calling
735         get_predictor_value.
736         (pass_strip_predict_hints::execute): Add handling of
737         BUILT_IN_EXPECT_WITH_PROBABILITY.
738         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
739         new predictor.
740         * tree.h (DECL_BUILT_IN_P): New function.
742 2018-08-10  Martin Liska  <mliska@suse.cz>
744         PR tree-optimization/85799
745         * passes.def: Add argument for pass_strip_predict_hints.
746         * predict.c (class pass_strip_predict_hints): Add new argument
747         early_p.
748         (strip_predictor_early): New function.
749         (pass_strip_predict_hints::execute): Call the function to
750         strip predictors.
751         (strip_predict_hints): New function.
752         * predict.def: Fix comment.
754 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
756         * Makefile.in: Clarify which tm.texi to copy over to assert the
757         right to grant a GFDL license for all.
759 2018-08-09  Jeff Law  <law@redhat.com>
761         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
762         unused variable.
764 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
766         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
767         prototype.
769 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
771         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
772         reductions for variable-length vectors.
774 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
776         PR other/84889
777         * common.opt (fdiagnostics-show-line-numbers): New option.
778         * diagnostic-show-locus.c (class layout): Add fields
779         "m_show_line_numbers_p" and "m_linenum_width";
780         (num_digits): New function.
781         (test_num_digits): New function.
782         (layout::layout): Initialize new fields.  Update m_x_offset
783         logic to handle any left margin.
784         (layout::print_source_line): Print line number when requested.
785         (layout::start_annotation_line): New member function.
786         (layout::print_annotation_line): Call it.
787         (layout::print_leading_fixits): Likewise.
788         (layout::print_trailing_fixits): Likewise.  Update calls to
789         move_to_column for new parameter.
790         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
791         it to potentially call start_annotation_line.
792         (layout::show_ruler): Call start_annotation_line.
793         (selftest::test_line_numbers_multiline_range): New selftest.
794         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
795         and selftest::test_line_numbers_multiline_range.
796         * diagnostic.c (diagnostic_initialize): Initialize
797         show_line_numbers_p.
798         * diagnostic.h (struct diagnostic_context): Add field
799         "show_line_numbers_p".
800         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
801         -fno-diagnostics-show-line-numbers.
802         * dwarf2out.c (gen_producer_string): Add
803         OPT_fdiagnostics_show_line_numbers to the ignored options.
804         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
805         one setting" options.
806         (append_compiler_options): Likewise to the dropped options.
807         (append_diag_options): Likewise to the passed-on options.
808         * opts.c (common_handle_option): Handle the new option.
809         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
811 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
813         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
814         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
815         third argument of type "const signed char" to descriptions of
816         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
817         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
818         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
819         __builtin_bcdsub_ov functions.
821 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
823         PR tree-optimization/86858
824         * tree-vect-loop.c (vect_is_simple_reduction): Restore
825         flow_bb_inside_loop_p calls.
827 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
829         PR tree-optimization/86871
830         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
831         instead of gimple_assign_lhs.
833 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
835         PR target/86887
836         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
837         register constraint to operand 0.
838         (add<mode>3_carryinC): Likewise.
839         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
841 2018-08-09  Martin Liska  <mliska@suse.cz>
843         PR c/86895
844         * common.opt: Remove extra line.
846 2018-08-09  Martin Liska  <mliska@suse.cz>
848         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
849         at the end of a line, make first letter capital and end up
850         a sentence with a dot.
851         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
852         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
853         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
854         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
855         (PARAM_MAX_ISL_OPERATIONS): Likewise.
856         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
857         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
858         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
859         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
860         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
861         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
862         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
863         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
864         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
865         (PARAM_TREE_REASSOC_WIDTH): Likewise.
866         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
867         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
868         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
870 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
872         PR target/84332
873         * config/s390/s390.c (s390_option_override_internal): Reduce the
874         stack-clash-protection-probe-interval param if it would be too big
875         for z900.
877 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
879         PR target/46179
880         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
881         * config/m68k/m68k.c (handle_move_double): Don't call
882         m68k_final_prescan_insn.
883         (m68k_adjust_decorated_operand): Renamed from
884         m68k_final_prescan_insn, remove first and third operand and
885         simplify.
886         (print_operand): Call it.
887         (print_operand_address): Call it.
889 2018-08-08  Nathan Sidwell  <nathan@acm.org>
891         * diagnostic.c (diagnostic_report_current_module): Use
892         linemap_included_from & linemap_included_from_linemap.
894 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
896         * config/aarch64/aarch64-cores.def: Add phecda core.
897         * config/aarch64/aarch64-tune.md: Regenerate.
898         * doc/invoke.texi: Add phecda core.
900 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
902         PR target/85295
903         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
904         definitions.
905         * config/s390/s390.md ("movti"): Add more alternatives for
906         constant to GPR copies.
908 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
910         * config/s390/s390.c: Fix whitespace damage throughout the file.
911         * config/s390/s390.h: Likewise.
912         * config/s390/tpf.h: Likewise.
914 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
916         * config/s390/s390.c (s390_loadrelative_operand_p):
917         Remove TARGET_CPU_ZARCH usages.
918         (s390_rtx_costs): Likewise.
919         (s390_legitimate_constant_p): Likewise.
920         (s390_cannot_force_const_mem): Likewise.
921         (legitimate_reload_constant_p): Likewise.
922         (s390_preferred_reload_class): Likewise.
923         (legitimize_pic_address): Likewise.
924         (legitimize_tls_address): Likewise.
925         (s390_split_branches): Removed.
926         (s390_add_execute): Removed.
927         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
928         (s390_mainpool_start): Likewise.
929         (s390_mainpool_finish): Likewise.
930         (s390_mainpool_cancel): Removed.
931         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
932         (s390_chunkify_cancel): Likewise.
933         (s390_return_addr_rtx): Likewise.
934         (s390_register_info): Remove split_branches_pending_p uages.
935         (s390_optimize_register_info): Likewise.
936         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
937         split_branches_pending_p usages.
938         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
939         (s390_load_got): Likewise.
940         (s390_expand_split_stack_prologue): Likewise.
941         (output_asm_nops): Likewise.
942         (s390_function_profiler): Likewise.
943         (s390_emit_call): Likewise.
944         (s390_conditional_register_usage): Likewise.
945         (s390_optimize_prologue): Likewise.
946         (s390_reorg): Remove TARGET_CPU_ZARCH and
947         split_branches_pending_p usages.
948         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
949         usages.
950         (s390_output_indirect_thunk_function): Likewise.
951         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
952         (TARGET_CPU_ZARCH_P): Removed.
953         (struct machine_function): Remove split_branches_pending_p.
954         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
956 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
958         * common/config/s390/s390-common.c (processor_flags_table):
959         Remove flags.
960         * config.gcc: Remove with_arch/with_tune support.
961         * config/s390/2064.md: Remove cpu attribute comparisons.
962         * config/s390/driver-native.c (s390_host_detect_local_cpu):
963         Remove MTN.
964         * config/s390/linux.h (ASM_SPEC):
965         Remove -march support.
966         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
967         Use a table to get an arch level.
968         * config/s390/s390-opts.h (enum processor_type):
969         Remove enum values.
970         * config/s390/s390.c
971         (processor_table): Remove entries, add arch_level values.
972         (s390_issue_rate): Remove cases.
973         (s390_option_override): Adjust
974         s390_option_override_internal() call.
975         (s390_option_override_internal): Remove deprecation warning.
976         (s390_valid_target_attribute_tree): Adjust
977         s390_option_override_internal() call.
978         * config/s390/s390.h (struct s390_processor):
979         Share with s390-c.c, add arch_level field.
980         * config/s390/s390.md:
981         Remove occurrences in cpu attribute.
982         * config/s390/s390.opt: Remove -march/-mtune support.
983         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
984         * doc/invoke.texi: Remove deprecation warning.
986 2018-08-08  Luis Machado  <luis.machado@linaro.org>
988         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
989         global.
990         (qdf24xx_tunings): Set vector cost structure to
991         qdf24xx_vector_cost.
993         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
994         <register_sextend>: Set to 3.
996 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
998         PR target/86838
999         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
1000         * config/aarch64/aarch64-simd.md
1001         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
1002         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
1003         (aarch64_frecpx<mode>): ...this new pattern.
1004         * config/aarch64/aarch64-simd-builtins.def: Remove comment
1005         about aarch64_frecp<FRECP:frecp_suffix><mode>.
1007 2018-08-07  Martin Liska  <mliska@suse.cz>
1009         PR middle-end/83023
1010         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
1011         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
1012         * predict.def (PRED_MALLOC_NONNULL): New predictor.
1013         * doc/extend.texi: Document that malloc attribute adds
1014         hit to compiler.
1016 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
1018         PR target/86785
1019         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1020         Define to speculation_safe_value_not_needed.
1022 2018-08-06  Jeff Law  <law@redhat.com>
1024         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
1025         the vr_values instance to cprop_into_stmt.
1026         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
1027         (cprop_operand): Also query EVRP to determine if OP is a constant.
1029 2018-08-06  Nathan Sidwell  <nathan@acm.org>
1031         * diagnostic.c (diagnostic_report_current_module): Reroll
1032         included-at loop.  Translate text.
1034 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
1036         * function-tests.c (selftest::test_expansion_to_rtl): Call
1037         free_after_compilation.
1039 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1041         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
1043 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1045         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1046         loops with memory block operations from getting unrolled.
1048 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1050         PR target/86807
1051         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1052         Define to speculation_safe_value_not_needed.
1054 2018-08-06  Jeff Law  <law@redhat.com>
1056         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1057         assert.
1059 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1061         PR target/86662
1062         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1063         with all enabled __intN types.
1065         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1067 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1069         * alias.c (record_set): Check for clobber high.
1070         * cfgexpand.c (expand_gimple_stmt): Likewise.
1071         * combine-stack-adj.c (single_set_for_csa): Likewise.
1072         * combine.c (find_single_use_1): Likewise.
1073         (set_nonzero_bits_and_sign_copies): Likewise.
1074         (get_combine_src_dest): Likewise.
1075         (is_parallel_of_n_reg_sets): Likewise.
1076         (try_combine): Likewise.
1077         (record_dead_and_set_regs_1): Likewise.
1078         (reg_dead_at_p_1): Likewise.
1079         (reg_dead_at_p): Likewise.
1080         * dce.c (deletable_insn_p): Likewise.
1081         (mark_nonreg_stores_1): Likewise.
1082         (mark_nonreg_stores_2): Likewise.
1083         * df-scan.c (df_find_hard_reg_defs): Likewise.
1084         (df_uses_record): Likewise.
1085         (df_get_call_refs): Likewise.
1086         * dwarf2out.c (mem_loc_descriptor): Likewise.
1087         * haifa-sched.c (haifa_classify_rtx): Likewise.
1088         * ira-build.c (create_insn_allocnos): Likewise.
1089         * ira-costs.c (scan_one_insn): Likewise.
1090         * ira.c (equiv_init_movable_p): Likewise.
1091         (rtx_moveable_p): Likewise.
1092         (interesting_dest_for_shprep): Likewise.
1093         * jump.c (mark_jump_label_1): Likewise.
1094         * postreload-gcse.c (record_opr_changes): Likewise.
1095         * postreload.c (reload_cse_simplify): Likewise.
1096         (struct reg_use): Add source expr.
1097         (reload_combine): Check for clobber high.
1098         (reload_combine_note_use): Likewise.
1099         (reload_cse_move2add): Likewise.
1100         (move2add_note_store): Likewise.
1101         * print-rtl.c (print_pattern): Likewise.
1102         * recog.c (decode_asm_operands): Likewise.
1103         (store_data_bypass_p): Likewise.
1104         (if_test_bypass_p): Likewise.
1105         * regcprop.c (kill_clobbered_value): Likewise.
1106         (kill_set_value): Likewise.
1107         * reginfo.c (reg_scan_mark_refs): Likewise.
1108         * reload1.c (maybe_fix_stack_asms): Likewise.
1109         (eliminate_regs_1): Likewise.
1110         (elimination_effects): Likewise.
1111         (mark_not_eliminable): Likewise.
1112         (scan_paradoxical_subregs): Likewise.
1113         (forget_old_reloads_1): Likewise.
1114         * reorg.c (find_end_label): Likewise.
1115         (try_merge_delay_insns): Likewise.
1116         (redundant_insn): Likewise.
1117         (own_thread_p): Likewise.
1118         (fill_simple_delay_slots): Likewise.
1119         (fill_slots_from_thread): Likewise.
1120         (dbr_schedule): Likewise.
1121         * resource.c (update_live_status): Likewise.
1122         (mark_referenced_resources): Likewise.
1123         (mark_set_resources): Likewise.
1124         * rtl.c (copy_rtx): Likewise.
1125         * rtlanal.c (reg_referenced_p): Likewise.
1126         (single_set_2): Likewise.
1127         (noop_move_p): Likewise.
1128         (note_stores): Likewise.
1129         * sched-deps.c (sched_analyze_reg): Likewise.
1130         (sched_analyze_insn): Likewise.
1132 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1134         * cse.c (invalidate_reg): New function extracted from...
1135         (invalidate): ...here.
1136         (canonicalize_insn): Check for clobber high.
1137         (invalidate_from_clobbers): invalidate clobber highs.
1138         (invalidate_from_sets_and_clobbers): Likewise.
1139         (count_reg_usage): Check for clobber high.
1140         (insn_live_p): Likewise.
1141         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1142         (cselib_invalidate_regno): Check for clobber in setter.
1143         (cselib_invalidate_rtx): Pass through setter.
1144         (cselib_invalidate_rtx_note_stores):
1145         (cselib_process_insn): Check for clobber high.
1146         * cselib.h (cselib_invalidate_rtx): Add operand.
1148 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1150         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1151         (mark_not_eliminable): Likewise.
1152         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1153         * lra-lives.c (process_bb_lives): Check for clobber high.
1154         * lra.c (new_insn_reg): Remember clobber highs.
1155         (collect_non_operand_hard_regs): Check for clobber high.
1156         (lra_set_insn_recog_data): Likewise.
1157         (add_regs_to_insn_regno_info): Likewise.
1158         (lra_update_insn_regno_info): Likewise.
1160 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1162         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1163         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1165 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1167         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1168         (copy_insn_1): Likewise.
1169         (gen_hard_reg_clobber_high): New gen function.
1170         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1171         * genemit.c (gen_exp): Likewise.
1172         (gen_emit_seq): Pass through info.
1173         (gen_insn): Check for CLOBBER_HIGH.
1174         (gen_expand): Pass through info.
1175         (gen_split): Likewise.
1176         (output_add_clobbers): Likewise.
1177         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1178         (remove_clobbers): Likewise.
1179         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1181 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1183         * doc/rtl.texi (clobber_high): Add.
1184         (parallel): Add in clobber high
1185         * rtl.c (rtl_check_failed_code3): Add function.
1186         * rtl.def (CLOBBER_HIGH): Add expression.
1187         * rtl.h (RTL_CHECKC3): Add macro.
1188         (rtl_check_failed_code3): Add declaration.
1189         (XC3EXP): Add macro.
1191 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1193         PR target/86386
1194         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1195         cfun->machine->max_used_stack_alignment if needed.
1197 2018-08-04  Martin Sebor  <msebor@redhat.com>
1199         PR tree-optimization/86571
1200         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1201         NaN output to 4.
1203 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1205         PR target/86799
1206         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1207         Define.
1209 2018-08-03  Jeff Law  <law@redhat.com>
1211         PR target/86795
1212         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1213         Define to speculation_safe_value_not_needed.
1215 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1217         * doc/gcov.texi (-x): Remove duplicate "to".
1218         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1219         (-Wif-not-aligned): Remove duplicate "is".
1220         (-flto): Remove duplicate "the".
1221         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1222         duplicate "v5.00.b".
1223         (MSP430 Options): Remove duplicate "and" from the description
1224         of "-mgprel-sec=regexp".
1225         (x86 Options): Remove duplicate copies of "vmldLog102" and
1226         vmlsLog104 from description of "-mveclibabi=type".
1228 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1230         * internal-fn.h (first_commutative_argument): Declare.
1231         * internal-fn.c (first_commutative_argument): New function.
1232         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1233         restrictions for pattern statements.  Use first_commutative_argument
1234         to look for commutative operands in calls to internal functions.
1236 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1238         * Makefile.in (wide-int-range.o): New.
1239         * tree-vrp.c: Move all the wide_int_* functions to...
1240         * wide-int-range.cc: ...here.
1241         * tree-vrp.h: Move all the wide_int_* prototypes to...
1242         * wide-int-range.h: ...here.
1244 2018-08-03  Tom de Vries  <tdevries@suse.de>
1246         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1247         UI_NONE.
1248         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1249         * except.c (output_function_exception_table): Do early exit if
1250         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1252 2018-08-03  Martin Liska  <mliska@suse.cz>
1254         * predict.c (dump_prediction): Change to 2 digits
1255         in fraction part.
1257 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1259         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1260         neon_dup_q to...
1261         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1263 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1265         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1266         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1267         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1268         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1269         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1271 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1273         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1274         pp_take_prefix when saving the existing prefix.
1275         * diagnostic.c (diagnostic_append_note): Likewise.
1276         * langhooks.c (lhd_print_error_function): Likewise.
1277         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1278         param's type.  Free the existing prefix.
1279         (pp_take_prefix): New function.
1280         (pretty_printer::pretty_printer): Drop the prefix parameter.
1281         Rename the length parameter to match the comment.
1282         (pretty_printer::~pretty_printer): Free the prefix.
1283         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1284         parameter.
1285         (struct pretty_printer): Drop the "const" from "prefix" field's
1286         type and clarify memory management.
1287         (pp_set_prefix): Drop the "const" from the 2nd param.
1288         (pp_take_prefix): New decl.
1290 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1292         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1293         for word_mode_ok here instead of passing as argument.
1294         (expand_block_compare): Change select_block_compare_mode() call.
1295         (expand_strncmp_gpr_sequence): New function.
1296         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1298 2018-08-02  Jeff Law  <law@redhat.com>
1300         PR target/86790
1301         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1302         Define to speculation_safe_value_not_needed.
1304         PR target/86784
1305         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1306         Define to speculation_safe_value_not_needed.
1308 2018-08-02  Tom de Vries  <tdevries@suse.de>
1310         PR target/86660
1311         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1312         function.  Return UI_TARGET unconditionally.
1313         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1314         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1316 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1318         * genemit.c (print_overload_test): Fix typo.
1320 2018-08-02  Richard Biener  <rguenther@suse.de>
1322         PR tree-optimization/86816
1323         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1324         which checks for value availability before querying it.
1325         (gvn_uses_equal): Use it.
1326         (same_succ_hash): Likewise.
1327         (gimple_equal_p): Likewise.
1329 2018-08-02  Nick Clifton  <nickc@redhat.com>
1331         PR target/86813
1332         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1333         Define to speculation_safe_value_not_needed.
1335         PR target/86810
1336         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1337         Define to speculation_safe_value_not_needed.
1339         PR target/86810
1340         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1341         Define to speculation_safe_value_not_needed.
1343         PR target/86803
1344         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1345         Define to speculation_safe_value_not_needed.
1347         PR target/86797
1348         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1349         Define to speculation_safe_value_not_needed.
1351         PR target/86791
1352         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1353         Define to speculation_safe_value_not_needed.
1355         PR target/86789
1356         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1357         Define to speculation_safe_value_not_needed.
1359         PR target/86787
1360         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1361         Define to speculation_safe_value_not_needed.
1363         PR target/86782
1364         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1365         speculation_safe_value_not_needed.
1367         PR target/86781
1368         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1369         to speculation_safe_value_not_needed.
1371 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1373         * doc/md.texi: Expand the documentation of instruction names
1374         to mention port-local uses.  Document '@' in pattern names.
1375         * read-md.h (overloaded_instance, overloaded_name): New structs.
1376         (mapping): Declare.
1377         (md_reader::handle_overloaded_name): New member function.
1378         (md_reader::get_overloads): Likewise.
1379         (md_reader::m_first_overload): New member variable.
1380         (md_reader::m_next_overload_ptr): Likewise.
1381         (md_reader::m_overloads_htab): Likewise.
1382         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1383         m_next_overload_ptr and m_overloads_htab.
1384         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1385         (get_mode_token, get_code_token, get_int_token): New functions.
1386         (map_attr_string): Add an optional argument that passes back
1387         the associated iterator.
1388         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1389         (md_reader::handle_overloaded_name, add_overload_instance): New
1390         functions.
1391         (apply_iterators): Handle '@' names.  Report an error if '@'
1392         is used without iterators.
1393         (initialize_iterators): Initialize the new iterator_group fields.
1394         * genopinit.c (handle_overloaded_code_for)
1395         (handle_overloaded_gen): New functions.
1396         (main): Use them to print declarations of maybe_code_for_* and
1397         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1398         * genemit.c (print_overload_arguments, print_overload_test)
1399         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1400         (main): Use it to print definitions of maybe_code_for_* and
1401         maybe_gen_* functions.
1402         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1403         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1404         instead of explicit mode checks.
1405         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1406         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1407         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1408         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1409         (aarch64_expand_compare_and_swap): Likewise
1410         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1411         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1412         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1413         (aarch64_constant_pool_reload_icode): Delete.
1414         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1415         instead of aarch64_constant_pool_reload_icode.  Use
1416         code_for_aarch64_reload_mov instead of explicit mode checks.
1417         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1418         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1419         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1420         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1421         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1422         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1423         (aarch64_atomic_load_op_code): Delete.
1424         (aarch64_emit_atomic_load_op): Likewise.
1425         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1426         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1427         instead of aarch64_emit_atomic_load_op.
1428         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1429         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1430         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1431         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1432         character before the pattern name.
1433         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1434         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1435         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1436         (aarch64_frecps<mode>): Likewise.
1437         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1438         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1439         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1440         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1441         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1443 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1445         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1446         Allow HFmode constants if TARGET_FP_F16INST.
1448 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1450         PR target/86014
1451         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1452         No longer check last store for clobber of address register.
1454 2018-08-02  Martin Liska  <mliska@suse.cz>
1456         PR gcov-profile/86817
1457         * gcov.c (process_all_functions): New function.
1458         (main): Call it.
1459         (process_file): Move functions processing to
1460         process_all_functions.
1462 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1464         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1465         "const" to the "gimple *" and "rtx_insn *" parameters.
1466         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1467         Likewise.
1468         (dump_location_t::dump_location_t): Likewise.
1470 2018-08-01  Martin Sebor  <msebor@redhat.com>
1472         PR tree-optimization/86650
1473         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1474         rather than a "gcall *".  Directly pass the data of interest
1475         to percent_K_format, rather than building a temporary CALL_EXPR
1476         to hold it.
1477         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1478         (gimple_fold_builtin_strncat): Adjust.
1479         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1480         gcall* argument with gimple*.
1481         * gimple-ssa-warn-restrict.c (check_call): Same.
1482         (wrestrict_dom_walker::before_dom_children): Same.
1483         (builtin_access::builtin_access): Same.
1484         (check_bounds_or_overlap): Same
1485         (maybe_diag_overlap): Same.
1486         (maybe_diag_offset_bounds): Same.
1487         * tree-diagnostic.c (default_tree_printer): Move usage of
1488         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1489         to this callsite.
1490         * tree-pretty-print.c (percent_K_format): Add argument.
1491         * tree-pretty-print.h: Add argument.
1492         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1493         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1494         (maybe_diag_stxncpy_trunc): Same.
1495         (handle_builtin_stxncpy): Same.
1496         (handle_builtin_strcat): Same.
1498 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1500         * match.pd: Optimise pointer range checks.
1502 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1504         PR tree-optimization/86758
1505         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1506         to remove pattern statements.
1508 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1510         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1511         result of dfs_enumerate_from when constructing stmt_vec_infos,
1512         instead of additionally calling get_loop_body.
1514 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1516         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1517         parameter.
1518         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1519         When creating an iv, assert that the step is not known to be zero.
1520         (vect_setup_realignment): Update call accordingly.
1521         * tree-vect-stmts.c (vectorizable_store): Likewise.
1522         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1524 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1526         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1527         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1528         (vectorizable_reduction): Likewise.
1529         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1530         (vect_detect_hybrid_slp_stmts): Likewise.
1531         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1533 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1535         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1536         (wide_int_set_zero_nonzero_bits): ...this.
1537         (zero_nonzero_bits_from_vr): Rename to...
1538         (vrp_set_zero_nonzero_bits): ...this.
1539         (extract_range_from_multiplicative_op_1): Abstract wide int
1540         code...
1541         (wide_int_range_multiplicative_op): ...here.
1542         (extract_range_from_binary_expr_1): Extract wide int binary
1543         operations into their own functions.
1544         (wide_int_range_lshift): New.
1545         (wide_int_range_can_optimize_bit_op): New.
1546         (wide_int_range_shift_undefined_p): New.
1547         (wide_int_range_bit_xor): New.
1548         (wide_int_range_bit_ior): New.
1549         (wide_int_range_bit_and): New.
1550         (wide_int_range_trunc_mod): New.
1551         (extract_range_into_wide_ints): New.
1552         (vrp_shift_undefined_p): New.
1553         (extract_range_from_multiplicative_op): New.
1554         (vrp_can_optimize_bit_op): New.
1555         * tree-vrp.h (value_range::dump): New.
1556         (wide_int_range_multiplicative_op): New.
1557         (wide_int_range_lshift):New.
1558         (wide_int_range_shift_undefined_p): New.
1559         (wide_int_range_bit_xor): New.
1560         (wide_int_range_bit_ior): New.
1561         (wide_int_range_bit_and): New.
1562         (wide_int_range_trunc_mod): New.
1563         (zero_nonzero_bits_from_bounds): Rename to...
1564         (wide_int_set_zero_nonzero_bits): ...this.
1565         (zero_nonzero_bits_from_vr): Rename to...
1566         (vrp_set_zero_nonzero_bits): ...this.
1567         (range_easy_mask_min_max): Rename to...
1568         (wide_int_range_can_optimize_bit_op): this.
1569         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1570         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1572 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1574         * tree-vectorizer.h (vect_orig_stmt): New function.
1575         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1576         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1577         (vect_create_epilog_for_reduction): Likewise.
1578         (vectorizable_live_operation): Likewise.
1579         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1580         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1581         * tree-vect-stmts.c (vectorizable_call): Likewise.
1582         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1584 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1586         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1587         argument.
1588         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1589         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1590         (vect_transform_loop): Likewise.
1591         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1593 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1595         * tree-vectorizer.h (vect_schedule_slp): Return void.
1596         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1597         (vect_schedule_slp): Likewise.
1599 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1601         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1602         argument.
1603         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1604         instances before the main loop, if any exist.
1606 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1608         PR tree-optimization/86749
1609         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1610         If the lhs is used in a COND_EXPR, check that it is being used
1611         as the "then" or "else" value.
1613 2018-08-01  Tom de Vries  <tdevries@suse.de>
1615         PR target/86800
1616         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1617         speculation_safe_value_not_needed.
1619 2018-08-01  Richard Biener  <rguenther@suse.de>
1621         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1622         as base and offset.
1624 2018-08-01  Martin Liska  <mliska@suse.cz>
1626         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1627         format how successful transformation is dumped.
1628         (gimple_mod_pow2_value_transform): Likewise.
1629         (gimple_mod_subtract_transform): Likewise.
1630         (gimple_stringops_transform): Likewise.
1632 2018-08-01  Martin Liska  <mliska@suse.cz>
1634         PR value-prof/35543
1635         * value-prof.c (interesting_stringop_to_profile_p):
1636         Simplify the code and add BUILT_IN_MEMMOVE.
1637         (gimple_stringops_transform): Likewise.
1639 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1641         * config/aarch64/aarch64-simd.md
1642         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1643         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1644         use GPI iterator instead of SI mode.
1646 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1648         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1649         rs6000_speculation_barrier.
1650         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1651         new barrier pattern name.
1653 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1655         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1656         (speculation_barrier): New insn.
1658 2018-08-01  Richard Biener  <rguenther@suse.de>
1660         PR bootstrap/86724
1661         * graphite.h: Include isl/id.h and isl/space.h to allow build
1662         with ISL 0.20.
1664 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1666         PR target/86651
1667         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1668         mode for COFF targets.
1669         * defaults.h (TARGET_COFF): Define.
1670         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1671         TARGET_COFF): Define.
1672         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1673         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1674         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1676 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1678         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1679         * gimple-streamer-out.c (output_bb): Save it.
1680         * lto-streamer-in.c (input_struct_function_base): Restore
1681         instance discriminator if available.  Create map on demand.
1682         * lto-streamer-out.c (output_struct_function_base): Save it if
1683         available.
1684         * final.c (decl_to_instance_map): Document LTO strategy.
1686 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1687             Olivier Hainque  <hainque@adacore.com>
1689         * debug.h (decl_to_instance_map_t): New type.
1690         (decl_to_instance_map): Declare.
1691         (maybe_create_decl_to_instance_map): New inline function.
1692         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1693         to track basic block discriminators.
1694         (final_start_function_1): Initialize them.
1695         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1696         bb_discriminator.
1697         (decl_to_instance_map): New variable.
1698         (map_decl_to_instance, maybe_set_discriminator): New functions.
1699         (notice_source_line): Set discriminator.
1701 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1703         * targhooks.c (default_have_speculation_safe_value): Add
1704         ATTRIBUTE_UNUSED.
1706 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1708         * dump-context.h: Include "pretty-print.h".
1709         (dump_context::refresh_dumps_are_enabled): New decl.
1710         (dump_context::emit_item): New decl.
1711         (class dump_context): Add fields "m_test_pp" and
1712         "m_test_pp_flags".
1713         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1714         (temp_dump_context::get_dumped_text): New decl.
1715         (class temp_dump_context): Add field "m_pp".
1716         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1717         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1718         m_test_pp.
1719         (set_dump_file): Update for above change.
1720         (set_alt_dump_file): Likewise.
1721         (dump_loc): New overload, taking a pretty_printer *.
1722         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1723         to any test pretty-printer.
1724         (make_item_for_dump_gimple_stmt): New function, adapted from
1725         optinfo::add_gimple_stmt.
1726         (dump_context::dump_gimple_stmt): Call it, and use the result,
1727         eliminating the direct usage of dump_file and alt_dump_file in
1728         favor of indirectly using them via emit_item.
1729         (make_item_for_dump_gimple_expr): New function, adapted from
1730         optinfo::add_gimple_expr.
1731         (dump_context::dump_gimple_expr): Call it, and use the result,
1732         eliminating the direct usage of dump_file and alt_dump_file in
1733         favor of indirectly using them via emit_item.
1734         (make_item_for_dump_generic_expr): New function, adapted from
1735         optinfo::add_tree.
1736         (dump_context::dump_generic_expr): Call it, and use the result,
1737         eliminating the direct usage of dump_file and alt_dump_file in
1738         favor of indirectly using them via emit_item.
1739         (make_item_for_dump_printf_va): New function, adapted from
1740         optinfo::add_printf_va.
1741         (make_item_for_dump_printf): New function.
1742         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1743         and use the result, eliminating the direct usage of dump_file and
1744         alt_dump_file in favor of indirectly using them via emit_item.
1745         (make_item_for_dump_dec): New function.
1746         (dump_context::dump_dec): Call it, and use the result,
1747         eliminating the direct usage of dump_file and alt_dump_file in
1748         favor of indirectly using them via emit_item.
1749         (make_item_for_dump_symtab_node): New function, adapted from
1750         optinfo::add_symtab_node.
1751         (dump_context::dump_symtab_node): Call it, and use the result,
1752         eliminating the direct usage of dump_file and alt_dump_file in
1753         favor of indirectly using them via emit_item.
1754         (dump_context::begin_scope): Reimplement, avoiding direct usage
1755         of dump_file and alt_dump_file in favor of indirectly using them
1756         via emit_item.
1757         (dump_context::emit_item): New member function.
1758         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1759         Set up test pretty-printer on the underlying context.  Call
1760         refresh_dumps_are_enabled.
1761         (temp_dump_context::~temp_dump_context): Call
1762         refresh_dumps_are_enabled.
1763         (temp_dump_context::get_dumped_text): New member function.
1764         (selftest::verify_dumped_text): New function.
1765         (ASSERT_DUMPED_TEXT_EQ): New macro.
1766         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1767         and then without optinfo enabled.  Add uses of
1768         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1769         * dumpfile.h: Update comment for the dump_* API.
1770         * optinfo-emit-json.cc
1771         (selftest::test_building_json_from_dump_calls): Update for new
1772         param for temp_dump_context ctor.
1773         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1774         and "m_owned" field.
1775         (optinfo_item::~optinfo_item): Likewise.
1776         (optinfo::add_item): New member function.
1777         (optinfo::emit): Update comment.
1778         (optinfo::add_string): Delete.
1779         (optinfo::add_printf): Delete.
1780         (optinfo::add_printf_va): Delete.
1781         (optinfo::add_gimple_stmt): Delete.
1782         (optinfo::add_gimple_expr): Delete.
1783         (optinfo::add_tree): Delete.
1784         (optinfo::add_symtab_node): Delete.
1785         (optinfo::add_dec): Delete.
1786         * optinfo.h (class dump_context): New forward decl.
1787         (optinfo::add_item): New decl.
1788         (optinfo::add_string): Delete.
1789         (optinfo::add_printf): Delete.
1790         (optinfo::add_printf_va): Delete.
1791         (optinfo::add_gimple_stmt): Delete.
1792         (optinfo::add_gimple_expr): Delete.
1793         (optinfo::add_tree): Delete.
1794         (optinfo::add_symtab_node): Delete.
1795         (optinfo::add_dec): Delete.
1796         (optinfo::add_poly_int): Delete.
1797         (optinfo_item::optinfo_item): Remove "owned" param.
1798         (class optinfo_item): Remove field "m_owned".
1800 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1802         PR middle-end/86705
1803         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1804         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1805         requested variable alignment.
1806         (expand_one_ssa_partition): Likewise.
1807         (expand_one_var): Likewise.
1809 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1811         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1812         to speculation_safe_value_not_needed.
1814 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1816         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1817         * targhooks.c (speculation_safe_value_not_needed): New function.
1818         * target.def (have_speculation_safe_value): Update documentation.
1819         * doc/tm.texi: Regenerated.
1821 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1823         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1824         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1825         expand.
1826         (despeculate_copy<ALLI:mode>_insn): New insn.
1827         (despeculate_copyti_insn): New insn.
1828         (despeculate_simple<ALLI:mode>): New insn
1829         (despeculate_simpleti): New insn.
1830         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1831         function.
1832         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1833         aarch64_speculation_safe_value.
1834         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1836 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1838         * config/aarch64/aarch64-speculation.cc: New file.
1839         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1840         before pass_reorder_blocks.
1841         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1842         prototype.
1843         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1844         X14 and X15 when tracking speculation.
1845         * config/aarch64/aarch64.md (register name constants): Add
1846         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1847         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1848         (speculation_barrier): New insn attribute.
1849         (cmp<mode>): Allow SP in comparisons.
1850         (speculation_tracker): New insn.
1851         (speculation_barrier): Add speculation_barrier attribute.
1852         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1853         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1854         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1856 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1858         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1859         aarch64_track_speculation is true.
1860         (tb<optab><mode>1): Likewise.
1861         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1862         generate CB[N]Z when tracking speculation.
1863         (aarch64_split_compare_and_swap): Likewise.
1864         (aarch64_split_atomic_op): Likewise.
1866 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1868         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1870 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1872         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1873         (speculation_barrier): New insn.
1875 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1877         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1878         * config/arm/arm.md (speculation_barrier): New expand.
1879         (speculation_barrier_insn): New pattern.
1881 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1883         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1884         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1885         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1886         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1887         list.
1888         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1889         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1890         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1891         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1892         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1893         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1894         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1895         * builtins.c (expand_speculation_safe_value): New function.
1896         (expand_builtin): Call it.
1897         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1898         * doc/extend.texi: Document __builtin_speculation_safe_value.
1899         * doc/md.texi: Document "speculation_barrier" pattern.
1900         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1901         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1902         * doc/tm.texi: Regenerated.
1903         * target.def (have_speculation_safe_value, speculation_safe_value): New
1904         hooks.
1905         * targhooks.c (default_have_speculation_safe_value): New function.
1906         (default_speculation_safe_value): New function.
1907         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1908         (default_speculation_safe_value): Add prototype.
1910 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1912         * dump-context.h (dump_context::dump_loc): New decl.
1913         * dumpfile.c (dump_context::dump_loc): New member function.
1914         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1915         and dump_gimple_stmt.
1916         (dump_context::dump_gimple_expr_loc): Likewise, using
1917         dump_gimple_expr.
1918         (dump_context::dump_generic_expr_loc): Likewise, using
1919         dump_generic_expr.
1920         (dump_context::dump_printf_loc_va): Likewise, using
1921         dump_printf_va.
1922         (dump_context::begin_scope): Explicitly using the global function
1923         "dump_loc", rather than the member function.
1925 2018-07-31  Martin Sebor  <msebor@redhat.com>
1927         PR tree-optimization/86741
1928         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1930 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1932         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1933         depend on whether prefetch instructions will be emitted or not.
1934         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1935         will be emitted or not.
1936         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1937         (TARGET_SETMEM_PFD): New macros.
1939 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1941         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1942         (NULL_STMT_VEC_INFO): Delete.
1943         (stmt_vec_info::operator*): Likewise.
1944         (stmt_vec_info::operator gimple *): Likewise.
1945         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1946         of NULL_STMT_VEC_INFO.
1947         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1948         (vect_reassociating_reduction_p): Likewise.
1949         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1950         (vectorizable_store): Likewise.
1951         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1952         (vec_info::free_stmt_vec_infos): Likewise.
1954 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1956         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1957         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1959 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1961         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1962         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1963         (vec_info::free_stmt_vec_info): New private member functions.
1964         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1965         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1966         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1967         set_stmt_vec_info_vec and free_stmt_vec_infos.
1968         * tree-vect-loop.c (_loop_vec_info): Remove call to
1969         set_stmt_vec_info_vec.
1970         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1971         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1972         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1973         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1974         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1975         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1976         with the clearing in the xcalloc.
1977         (stmt_vec_info_vec): Delete.
1978         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1979         (vectorize_loops): Likewise.
1980         (vec_info::~vec_info): Remove argument from call to
1981         free_stmt_vec_infos.
1982         (vec_info::add_stmt): Remove vinfo argument from call to
1983         new_stmt_vec_info.
1985 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1987         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1988         rather than a gimple stmt.
1989         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1990         information for pattern statements when passed the original
1991         statement; instead wait to be passed the pattern statement itself.
1992         Don't call set_vinfo_for_stmt here.
1993         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1994         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1995         stmt_vec_infos here.
1996         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1997         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1998         stmt_vec_infos entry.
2000 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2002         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
2003         * tree-vectorizer.c (vec_info::replace_stmt): New function.
2004         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
2005         * tree-vect-stmts.c (vectorizable_call): Likewise.
2006         (vectorizable_simd_clone_call): Likewise.
2008 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2010         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
2011         * tree-vectorizer.c (vec_info::remove_stmt): New function.
2012         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
2013         * tree-vect-loop.c (vect_transform_loop): Likewise.
2014         * tree-vect-slp.c (vect_schedule_slp): Likewise.
2015         * tree-vect-stmts.c (vect_remove_stores): Likewise.
2017 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2019         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
2020         (vect_dr_stmt): Delete.
2021         * tree-vectorizer.c (vec_info::lookup_dr): New function.
2022         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
2023         of DR_VECT_AUX.
2024         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
2025         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
2026         (vect_verify_datarefs_alignment, vect_peeling_supportable)
2027         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2028         (vect_analyze_data_refs): Likewise.
2029         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
2030         argument.
2031         (vect_find_same_alignment_drs): Likewise.
2032         (vect_slp_analyze_node_dependences): Update calls accordingly.
2033         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2034         instead of DR_VECT_AUX.
2035         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
2036         of a vector data references.  Use vec_info::lookup_dr instead of
2037         DR_VECT_AUX.
2038         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
2039         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
2040         instead of DR_VECT_AUX.
2042 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2044         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2045         dr_vec_info.
2046         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2047         accordingly.
2048         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2049         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2050         (vect_gen_prolog_loop_niters): Likewise.
2052 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2054         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2055         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2056         (vect_known_alignment_in_bytes, vect_dr_behavior)
2057         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2058         instead of data_references.  Update calls to other routines for
2059         which the same change has been made.
2060         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2061         dr_vec_infos instead of stmt_vec_infos.
2062         (vect_analyze_data_ref_dependence): Update call accordingly.
2063         (vect_slp_analyze_data_ref_dependence)
2064         (vect_record_base_alignments): Use DR_VECT_AUX.
2065         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2066         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2067         (vector_alignment_reachable_p, vect_get_data_access_cost)
2068         (vect_peeling_supportable, vect_analyze_group_access_1)
2069         (vect_analyze_group_access, vect_analyze_data_ref_access)
2070         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2071         (vect_compile_time_alias, vect_small_gap_p)
2072         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2073         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2074         instead of data_references.  Update calls to other routines for
2075         which the same change has been made.
2076         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2077         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2078         (vect_slp_analyze_and_verify_node_alignment)
2079         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2080         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2081         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2082         above changes.
2083         (_vect_peel_info::dr): Replace with...
2084         (_vect_peel_info::dr_info): ...this new field.
2085         (vect_peeling_hash_get_most_frequent)
2086         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2087         (vect_peeling_hash_get_lowest_cost):
2088         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2089         routines for which the same change has been made.
2090         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2091         data_reference.
2092         * tree-vect-loop-manip.c (get_misalign_in_elems)
2093         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2094         above changes.
2095         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2096         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2097         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2098         (get_group_load_store_type, get_negative_load_store_type)
2099         (vect_get_data_ptr_increment, vectorizable_store)
2100         (vectorizable_load): Likewise.
2101         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2102         Update calls to other routines for which the same change has been made.
2104 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2106         * tree-vectorizer.h (vec_info::move_dr): New member function.
2107         (dataref_aux): Rename to...
2108         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2109         (_stmt_vec_info::dr_aux): Update accordingly.
2110         (_stmt_vec_info::data_ref_info): Delete.
2111         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2112         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2113         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2114         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2115         of data_ref.
2116         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2117         (STMT_VINFO_DR_INFO): New macro.
2118         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2119         (set_dr_misalignment): Update after rename of dataref_aux.
2120         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2121         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2122         initialization of STMT_VINFO_DATA_REF.
2123         * tree-vectorizer.c (vec_info::move_dr): New function.
2124         * tree-vect-patterns.c (vect_recog_bool_pattern)
2125         (vect_recog_mask_conversion_pattern)
2126         (vect_recog_gather_scatter_pattern): Use it.
2127         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2128         the "dr" and "stmt" fields of dr_vec_info instead of
2129         STMT_VINFO_DATA_REF.
2131 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2133         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2134         (is_pattern_stmt_p): Use it.
2135         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2136         on pattern statements.
2138 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2140         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2141         original stmt as a stmt_vec_info rather than a gimple stmt.
2142         (vect_pattern_recog_1): Take the statement directly as a
2143         stmt_vec_info, rather than via a gimple_stmt_iterator.
2144         Update call to vect_mark_pattern_stmts.
2145         (vect_pattern_recog): Update calls accordingly.
2147 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2149         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2150         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2151         a vect_def_type for the first argument.
2152         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2153         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2154         operand if it isn't defined by a vectorized statement.
2155         (vect_build_gather_load_calls): Remove the mask_dt argument and
2156         update calls to vect_get_vec_def_for_stmt_copy.
2157         (vectorizable_bswap): Likewise the dt argument.
2158         (vectorizable_call): Update calls to vectorizable_bswap and
2159         vect_get_vec_def_for_stmt_copy.
2160         (vectorizable_simd_clone_call, vectorizable_assignment)
2161         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2162         (vectorizable_comparison): Update calls to
2163         vect_get_vec_def_for_stmt_copy.
2164         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2165         vect_is_simple_use.
2166         (vect_get_loop_based_defs): Remove dt argument and update call
2167         to vect_get_vec_def_for_stmt_copy.
2168         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2169         and vect_get_vec_def_for_stmt_copy.
2170         (vectorizable_load): Update calls to vect_build_gather_load_calls
2171         and vect_get_vec_def_for_stmt_copy.
2172         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2173         (vectorizable_reduction, vectorizable_live_operation): Update calls
2174         to vect_get_vec_def_for_stmt_copy.
2176 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2178         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2179         and gimple stmt arguments with a stmt_vec_info.
2180         (vect_record_base_alignments): Update calls accordingly.
2181         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2182         and gimple stmt arguments with a stmt_vec_info.
2183         (vect_build_slp_tree_1): Remove vinfo argument and update call
2184         to vect_record_max_nunits.
2185         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2186         and vect_record_max_nunits.
2188 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2190         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2191         file and take a stmt_vec_info instead of a gimple stmt.
2192         (supportable_widening_operation, vect_finish_replace_stmt)
2193         (vect_finish_stmt_generation, vect_get_store_rhs)
2194         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2195         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2196         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2197         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2198         (vect_create_data_ref_ptr, bump_vector_ptr)
2199         (vect_permute_store_chain, vect_setup_realignment)
2200         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2201         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2202         (vectorizable_reduction, vectorizable_induction)
2203         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2204         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2205         than gimple stmts as arguments.
2206         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2207         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2208         (can_group_stmts_p, vect_check_gather_scatter)
2209         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2210         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2211         (vect_permute_load_chain, vect_shift_permute_load_chain)
2212         (vect_transform_grouped_load)
2213         (vect_record_grouped_load_vectors): Likewise.
2214         * tree-vect-loop.c (vect_fixup_reduc_chain)
2215         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2216         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2217         (vectorizable_reduction, vectorizable_induction)
2218         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2219         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2220         (vect_get_load_store_mask): Likewise.
2221         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2222         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2223         * tree-vect-stmts.c (vect_mark_relevant)
2224         (is_simple_and_all_uses_invariant)
2225         (exist_non_indexing_operands_for_use_p, process_use)
2226         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2227         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2228         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2229         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2230         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2231         (get_negative_load_store_type, get_load_store_type)
2232         (vect_check_load_store_mask, vect_check_store_rhs)
2233         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2234         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2235         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2236         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2237         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2238         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2239         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2240         (supportable_widening_operation): Likewise.
2242 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2244         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2245         a stmt_vec_info instead of a gcall.
2246         (vect_check_gather_scatter): Update call accordingly.
2247         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2248         of a gphi.
2249         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2250         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2251         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2252         instead of a gimple stmt.
2253         (vect_transform_loop): Update calls accordingly.
2254         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2255         stmt_vec_infos instead of gimple stmts.
2256         (vect_analyze_slp_instance): Update use accordingly.
2257         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2258         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2259         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2260         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2261         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2262         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2263         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2264         down to subroutines.
2266 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2268         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2269         of the worklist from a vector of gimple stmts to a vector of
2270         stmt_vec_infos.
2271         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2272         (vect_mark_stmts_to_be_vectorized): Likewise
2274 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2276         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2277         statement before passing it to vect_analyze_stmt.
2278         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2279         the chain of phi vector definitions.  Track the exit phi via its
2280         stmt_vec_info.
2281         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2282         STMT_VINFO_REDUC_DEF.
2283         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2284         stmt_vec_infos to handle the statement chains.
2285         (vect_get_slp_defs): Record the first statement in the node
2286         using a stmt_vec_info.
2287         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2288         statements here and pass their stmt_vec_info down to subroutines.
2289         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2290         down to vect_finish_stmt_generation.
2291         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2292         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2293         stmt_vec_infos to subroutines.
2294         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2295         chains.
2297 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2299         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2300         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2301         (vect_permute_store_chain, vect_setup_realignment)
2302         (vect_permute_load_chain, vect_shift_permute_load_chain)
2303         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2304         stmts internally, and when passing values to other vectorizer routines.
2305         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2306         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2307         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2308         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2309         (vectorizable_reduction, vectorizable_induction)
2310         (vectorizable_live_operation, vect_transform_loop_stmt)
2311         (vect_transform_loop): Likewise.
2312         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2313         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2314         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2315         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2316         (vect_slp_analyze_node_operations_1): Likewise.
2317         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2318         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2319         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2320         (vect_finish_stmt_generation_1, get_group_load_store_type)
2321         (get_load_store_type, vect_build_gather_load_calls)
2322         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2323         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2324         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2325         (vectorizable_store, vectorizable_load, vectorizable_condition)
2326         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2327         (supportable_widening_operation): Likewise.
2328         (vect_get_vector_types_for_stmt): Likewise.
2329         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2331 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2333         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2334         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2335         (vect_permute_store_chain, vect_permute_load_chain)
2336         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2337         repeated stmt_vec_info lookups.
2338         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2339         (vect_update_ivs_after_vectorizer): Likewise.
2340         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2341         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2342         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2343         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2344         (vect_bb_slp_scalar_cost): Likewise.
2345         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2347 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2349         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2350         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2351         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2352         to get gassigns and gcalls, rather than operating on generc gimple
2353         stmts.
2354         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2355         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2356         (vectorizable_load, vect_analyze_stmt): Likewise.
2357         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2359 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2361         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2362         return stmt_vec_infos rather than gimple stmts.  Do not accept
2363         null arguments.
2364         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2365         of a gimple stmt.
2366         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2367         Update use of get_later_stmt.
2368         (vect_get_constant_vectors): Update call accordingly.
2369         (vect_schedule_slp_instance): Likewise
2370         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2371         (vect_slp_analyze_instance_dependence): Likewise.
2372         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2374 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2376         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2377         (stmt_info_for_cost::stmt_info): ...this new field.
2378         (add_stmt_costs): Update accordingly.
2379         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2380         (vect_get_known_peeling_cost): Likewise.
2381         (vect_estimate_min_profitable_iters): Likewise.
2382         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2384 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2386         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2387         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2388         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2389         accordingly.
2390         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2392 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2394         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2395         a gimple stmt to a stmt_vec_info.
2396         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2398 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2400         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2401         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2402         (_loop_vec_info::reduction_chains): Likewise.
2403         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2404         accordingly.
2405         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2407 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2409         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2410         a gimple stmt to a stmt_vec_info.
2411         (_stmt_vec_info::next_element): Likewise.
2412         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2413         (vect_slp_analyze_and_verify_node_alignment)
2414         (vect_analyze_group_access_1, vect_analyze_group_access)
2415         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2416         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2417         (vect_supportable_dr_alignment): Update accordingly.
2418         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2419         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2420         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2421         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2422         * tree-vect-slp.c (vect_build_slp_tree_1)
2423         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2424         (vect_split_slp_store_group, vect_analyze_slp_instance)
2425         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2426         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2427         (get_group_load_store_type, get_load_store_type)
2428         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2429         (vect_transform_stmt, vect_remove_stores): Likewise.
2431 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2433         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2434         than a gimple stmt.
2435         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2436         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2437         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2438         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2439         (vector_alignment_reachable_p, vect_get_data_access_cost)
2440         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2441         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2442         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2443         (vect_analyze_group_access_1, vect_analyze_group_access)
2444         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2445         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2446         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2447         result of vect_dr_stmt and use the stmt_vec_info instead of
2448         the associated gimple stmt.
2449         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2450         (vect_gen_prolog_loop_niters): Likewise.
2451         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2453 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2455         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2456         to a vec<stmt_vec_info>.
2457         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2458         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2459         vec<stmt_vec_info>.
2460         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2461         to a vec<stmt_vec_info>.
2462         (bst_traits::value_type, bst_traits::value_type): Likewise.
2463         (bst_traits::hash): Update accordingly.
2464         (vect_get_and_check_slp_defs): Change the stmts parameter from
2465         a vec<gimple *> to a vec<stmt_vec_info>.
2466         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2467         (vect_build_slp_tree): Likewise.
2468         (vect_build_slp_tree_2): Likewise.  Update uses of
2469         SLP_TREE_SCALAR_STMTS.
2470         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2471         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2472         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2473         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2474         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2475         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2476         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2477         (vect_get_constant_vectors, vect_get_slp_defs)
2478         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2479         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2480         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2481         instead of gimple stmts.
2482         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2483         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2484         (vect_slp_analyze_instance_dependence): Update uses of
2485         SLP_TREE_SCALAR_STMTS.
2486         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2487         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2488         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2489         (get_initial_defs_for_reduction): Likewise.
2490         (vect_create_epilog_for_reduction): Likewise.
2491         (vectorize_fold_left_reduction): Likewise.
2492         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2493         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2494         (can_vectorize_live_stmts): Likewise.
2496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2498         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2499         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2500         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2501         than gimple stmts.
2502         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2503         of a gimple stmt.
2504         (gather_scalar_reductions): Update after above interface changes.
2505         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2506         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2507         than gimple stmts.
2508         (vect_force_simple_reduction): Likewise.
2509         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2510         LOOP_VINFO_REDUCTIONS.
2511         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2513 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2515         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2516         a gimple stmt to a stmt_vec_info.
2517         * tree-vect-loop.c (vect_active_double_reduction_p)
2518         (vect_force_simple_reduction, vectorizable_reduction): Update
2519         accordingly.
2521 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2523         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2524         vec<gimple *> to a vec<stmt_vec_info>.
2525         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2526         the reduction_phis argument from a vec<gimple *> to a
2527         vec<stmt_vec_info>.
2528         (vectorizable_reduction): Likewise the phis local variable that
2529         is passed to vect_create_epilog_for_reduction.  Update for new type
2530         of SLP_TREE_VEC_STMTS.
2531         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2532         (vectorizable_live_operation): Likewise.
2533         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2534         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2536 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2538         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2539         a gimple stmt to a stmt_vec_info.
2540         (vectorizable_condition, vectorizable_live_operation)
2541         (vectorizable_reduction, vectorizable_induction): Pass back the
2542         vectorized statement as a stmt_vec_info.
2543         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2544         use of STMT_VINFO_VEC_STMT.
2545         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2546         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2547         as stmt_vec_infos rather than gimple stmts.
2548         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2549         to a stmt_vec_info.
2550         (vectorizable_live_operation): Likewise.
2551         (vectorizable_reduction, vectorizable_induction): Likewise,
2552         updating use of STMT_VINFO_VEC_STMT.
2553         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2554         of STMT_VINFO_VEC_STMT.
2555         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2556         (vectorizable_simd_clone_call, vectorizable_conversion)
2557         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2558         (vectorizable_store, vectorizable_load, vectorizable_condition)
2559         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2560         from a gimple stmt to a stmt_vec_info.
2561         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2562         pointer to a stmt_vec_info to the vectorizable_* routines.
2564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2566         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2567         a gimple stmt to a stmt_vec_info.
2568         (is_pattern_stmt_p): Update accordingly.
2569         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2570         (vect_record_grouped_load_vectors): Likewise.
2571         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2572         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2573         (vect_model_reduction_cost): Likewise.
2574         (vect_create_epilog_for_reduction): Likewise.
2575         (vectorizable_reduction, vectorizable_induction): Likewise.
2576         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2577         Return the stmt_vec_info for the pattern statement.
2578         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2579         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2580         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2581         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2582         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2583         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2584         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2585         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2587 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2589         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2590         (vect_finish_stmt_generation): Likewise.
2591         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2592         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2593         (vect_build_gather_load_calls): Use the return value of the above
2594         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2595         scopes for the input gimple stmt and wider scopes for the associated
2596         stmt_vec_info.  Use vec_info::lookup_def when setting these
2597         stmt_vec_infos from an SSA_NAME definition.
2598         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2599         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2600         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2601         (vectorizable_store, vectorizable_load, vectorizable_condition)
2602         (vectorizable_comparison): Likewise.
2603         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2604         (vectorizable_reduction): Likewise.
2606 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2608         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2609         stmt_vec_info * parameter before the optional gimple **.
2610         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2611         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2612         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2613         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2614         (vectorizable_live_operation): Likewise.
2615         * tree-vect-patterns.c (type_conversion_p): Likewise.
2616         (vect_look_through_possible_promotion): Likewise.
2617         (vect_recog_rotate_pattern): Likewise.
2618         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2620 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2622         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2623         a typedef to a wrapper class.
2624         (NULL_STMT_VEC_INFO): New macro.
2625         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2626         (stmt_vec_info::operator*): New function.
2627         (stmt_vec_info::operator gimple *): Likewise.
2628         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2629         (add_stmt_costs): Likewise.
2630         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2631         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2632         (vect_get_known_peeling_cost): Likewise.
2633         (vect_estimate_min_profitable_iters): Likewise.
2634         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2635         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2636         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2637         (vectorizable_store, free_stmt_vec_infos): Likewise.
2638         (new_stmt_vec_info): Change return type of xcalloc to
2639         _stmt_vec_info *.
2641 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2643         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2644         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2645         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2646         a single_imm_use-based sequence.
2647         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2649 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2651         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2652         * tree-vectorizer.c (vec_info::lookup_def): New function.
2653         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2654         (vect_widened_op_tree): Likewise.
2655         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2656         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2657         (vectorizable_reduction): Likewise.
2658         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2659         of a gimple *.
2660         (vect_is_slp_reduction): Update calls accordingly.  Use
2661         vec_info::lookup_def.
2662         (vect_is_simple_reduction): Likewise
2663         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2667         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2668         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2669         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2670         of vinfo_for_stmt.
2671         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2672         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2673         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2674         (vect_is_slp_reduction, vectorizable_induction)
2675         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2676         * tree-vect-patterns.c (vect_init_pattern_stmt):
2677         (vect_determine_min_output_precision_1, vect_determine_precisions)
2678         (vect_pattern_recog): Likewise.
2679         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2680         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2681         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2682         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2683         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2684         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2685         info field from a loop to a loop_vec_info.
2687 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2689         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2690         (vec_info::add_stmt): Declare.
2691         * tree-vectorizer.c (vec_info::add_stmt): New function.
2692         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2693         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2694         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2695         (vectorizable_induction): Likewise.
2696         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2697         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2698         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2699         (vectorizable_load): Likewise.
2700         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2701         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2702         (vect_recog_gather_scatter_pattern): Likewise.
2703         (append_pattern_def_seq): Likewise.  Remove a check that is
2704         performed by add_stmt itself.
2706 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2708         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2709         which make_ssa_name was called with new_stmt before new_stmt
2710         had been created.
2712 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2714         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2715         split out from...
2716         (vect_is_slp_reduction): ...here...
2717         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2718         that are already known to be false.
2720 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2722         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2723         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2724         STMT_VINFO_NUM_SLP_USES when it's true.
2725         (vect_free_slp_instance): Add a final_p parameter and pass it to
2726         vect_free_slp_tree.
2727         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2728         (vect_analyze_slp_instance): Likewise.
2729         (vect_slp_analyze_operations): Likewise.
2730         (vect_slp_analyze_bb_1): Likewise.
2731         * tree-vectorizer.c (vec_info): Likewise.
2732         * tree-vect-loop.c (vect_transform_loop): Likewise.
2734 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2736         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2737         function is not called for second and subsequent members of
2738         a reduction group.
2740 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2742         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2743         cases for nested loops from here to ...
2744         (vect_create_epilog_for_reduction): ...here.  Only call
2745         vect_is_simple_use for inner-loop reductions.
2747 2018-07-31  Martin Liska  <mliska@suse.cz>
2749         PR gcov-profile/85338
2750         PR gcov-profile/85350
2751         PR gcov-profile/85372
2752         * profile.c (struct location_triplet): New.
2753         (struct location_triplet_hash): Likewise.
2754         (output_location): Do not output a BB that
2755         is already recorded for a line.
2756         (branch_prob): Use streamed_locations.
2758 2018-07-31  Martin Liska  <mliska@suse.cz>
2760         PR gcov-profile/85370
2761         * coverage.c (coverage_begin_function): Do not mark target
2762         clones as artificial functions.
2764 2018-07-31  Martin Liska  <mliska@suse.cz>
2766         PR gcov-profile/83813
2767         PR gcov-profile/84758
2768         PR gcov-profile/85217
2769         PR gcov-profile/85332
2770         * profile.c (branch_prob): Do not record GOTO expressions
2771         for GIMPLE statements which locations are already streamed.
2773 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2775         * gcc.c (handle_spec_function): Accept a soft_matched_part
2776         argument, as do_spec_1.  Pass it down to ...
2777         (eval_spec_function): Accept a soft_matched_part argument,
2778         and pass it down to ...
2779         (do_spec_2): Accept a soft_matched_part argument, and pass
2780         it down to do_spec_1.
2781         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2782         (handle_braces): Update call to handle_spec_function.
2783         (driver::set_up_specs): Update calls to do_spec_2.
2784         (compare_debug_dump_opt_spec_function): Likewise.
2785         (compare_debug_self_opt_spec_function): Likewise.
2787 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2789         * common.opt (nolibc): New option.
2790         * doc/invoke.texi (Link Options): Document it.
2791         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2792         * config/alpha/linux.h: Likewise.
2793         * config/arc/elf.h: Likewise.
2794         * config/arm/uclinux-elf.h: Likewise.
2795         * config/arm/unknown-elf.h: Likewise.
2796         * config/avr/avrlibc.h: Likewise.
2797         * config/bfin/bfin.h: Likewise.
2798         * config/bfin/linux.h: Likewise.
2799         * config/bfin/uclinux.h: Likewise.
2800         * config/darwin.h: Likewise.
2801         * config/darwin10.h: Likewise.
2802         * config/darwin12.h: Likewise.
2803         * config/gnu-user.h: Likewise.
2804         * config/lm32/uclinux-elf.h: Likewise.
2805         * config/pa/pa-hpux11.h: Likewise.
2806         * config/pa/pa64-hpux.h: Likewise.
2807         * config/sparc/sparc.h: Likewise.
2809 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2811         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2812         undefined variables.
2814 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2816         PR target/86640
2817         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2818         instead of GEN_INT.
2820 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2822         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2823         terminated string literal.
2825 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2827         PR rtl-optimization/85160
2828         * combine.c (is_just_move): New function.
2829         (try_combine): Allow combining two instructions into two if neither of
2830         the original instructions was a move.
2832 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2834         PR target/86673
2835         * doc/extend.texi (Global Register Variables): Discourage use of type
2836         qualifiers.
2837         (Local Register Variables): Likewise.
2839 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2841         PR tree-optimization/86506
2842         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2844 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2846         PR target/86547
2847         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2848         hard_regno, make sure no insn between `from` and `to` clobbers it.
2850 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2851             Tom de Vries  <tdevries@suse.de>
2853         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2854         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2855         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2856         PTX_DEFAULT_RUNTIME_DIM.
2857         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2859 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2861         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2862         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2863         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2865 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2867         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2868         used.
2869         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2870         predicate to reflect toc fusion has been deleted.
2871         (toc_fusion_mem_raw): Delete, no longer used.
2872         (toc_fusion_mem_wrapped): Likewise.
2873         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2874         fusion mask bit.
2875         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2876         Delete, no longer used.
2877         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2878         meant to be used for toc fusion.
2879         (rs6000_debug_print_mode): Delete toc fusion debugging.
2880         (rs6000_debug_reg_global): Likewise.
2881         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2882         fusion and secondary reload support that were never used.
2883         (rs6000_option_override_internal): Delete TOC fusion, that was only
2884         partially defined, and it did not work unless you also used the
2885         -mcmodel= switch.
2886         (rs6000_legitimate_address_p): Delete TOC fusion support.
2887         (rs6000_opt_masks): Likewise.
2888         (fusion_wrap_memory_address): Delete function, no longer used.
2889         (fusion_split_address); Delete TOC fusion support.
2890         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2891         longer used with toc fusion being deleted.
2892         (TARGET_TOC_FUSION_FP): Likewise.
2893         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2894         UNSPEC.
2895         (toc fusion spliter): Delete TOC fusion support.
2896         (toc_fusionload_<mode>): Likewise.
2897         (toc_fusionload_di): Likewise.
2898         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2899         longer needs to be named.  Rename predicate to delete TOC fusion.
2900         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2901         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2902         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2903         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2904         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2906 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2908         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2909         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2910         __int128 in built-in function prototypes.
2911         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2912         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2914 2018-07-27  Martin Sebor  <msebor@redhat.com>
2916         PR tree-optimization/86696
2917         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2918         types, including enums.
2919         (handle_char_store): Be prepared for the above function to fail.
2921 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2923         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2924         when optimization level is lower than 2 or optimize for size.
2926 2018-07-26  Martin Sebor  <msebor@redhat.com>
2928         PR tree-optimization/86043
2929         PR tree-optimization/86042
2930         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2931         (get_string_cst_length): Rename...
2932         (get_min_string_length): ...to this.  Add argument.
2933         (handle_char_store): Extend to handle multi-character stores by
2934         MEM_REF.
2935         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2936         * tree.h (initializer_zerop): Add argument.
2938 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2940         PR middle-end/86660
2941         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2942         declare target to variables if they have always,{to,from,tofrom} map
2943         kinds.
2945 2018-07-26  Martin Liska  <mliska@suse.cz>
2947         PR lto/86548
2948         * lto-wrapper.c: Add linker_output as prefix
2949         for ltrans_output_file.
2951 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2953         PR rtl-optimization/85805
2954         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2955         value for hard registers if that was written in the same mode.
2957 2018-07-26  Martin Liska  <mliska@suse.cz>
2959         PR gcov-profile/86536
2960         * gcov.c (format_gcov): Use printf format %.*f directly
2961         and do not handle special values.
2963 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2965         * common/config/arc/arc-common.c (arc_option_optimization_table):
2966         Update default optimizations for size.
2968 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2970         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2971         * config/arc/constraints.md (CfZ): New constraint.
2972         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2973         (subsf3_fpu): Likewise.
2974         (cmpsf_fpu): Likewise.
2975         (cmpsf_fpu_uneq): Likewise.
2977 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2979         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2980         accesses as well.
2981         (arc_is_uncached_mem_p): uncached applies to both the variable and
2982         the pointer.
2984 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2986         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2987         register names.
2989 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2991         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2992         field "m_scopes" from vec to auto_vec.
2994 2018-07-25  Martin Liska  <mliska@suse.cz>
2996         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2997         return type.
2999 2018-07-25  Richard Biener  <rguenther@suse.de>
3001         PR debug/86654
3002         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
3003         special wrt context_die late.
3004         (gen_subprogram_die): Re-use DIEs in local scope.
3006 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
3008         PR tree-optimization/86644
3009         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
3011 2018-07-25  Martin Liska  <mliska@suse.cz>
3013         PR middle-end/86645
3014         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
3015         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
3017 2018-07-25  Martin Liska  <mliska@suse.cz>
3019         PR sanitizer/79635
3020         * params.def: Explain ASan abbreviation and provide
3021         a documentation link.
3023 2018-07-24  Martin Sebor  <msebor@redhat.com>
3025         PR tree-optimization/86622
3026         PR tree-optimization/86532
3027         * builtins.h (string_length): Declare.
3028         * builtins.c (c_strlen): Correct handling of non-constant offsets.
3029         (check_access): Be prepared for non-constant length ranges.
3030         (string_length): Make extern.
3031         * expr.c (string_constant): Only handle the minor non-constant
3032         array index.  Use string_constant to compute the length of
3033         a generic string constant.
3035 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
3037         PR tree-optimization/86618
3038         * tree-vect-stmts.c (vectorizable_call): Don't take the address
3039         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
3041 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
3043         PR tree-optimization/86636
3044         * json.cc (json::object::set): Fix comment.  Add assertions.
3045         (json::array::append): Move here from json.h.  Add comment and an
3046         assertion.
3047         (json::string::string): Likewise.
3048         * json.h (json::array::append): Move to json.cc.
3049         (json::string::string): Likewise.
3050         * optinfo-emit-json.cc
3051         (optrecord_json_writer::impl_location_to_json): Assert that we
3052         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3053         wrapper around it.  Expand the location once, rather than three
3054         times.
3055         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3056         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3057         wrappers.
3058         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3059         places.  Fix some overlong lines.
3061 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3063         * config/aarch64/aarch64-simd.md
3064         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3065         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3066         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3067         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3068         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3069         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3070         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3071         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3072         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3074 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3076         PR middle-end/86627
3077         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3078         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3079         and abs_d == d, do the power of two handling if profitable.
3081 2018-07-24  Richard Biener  <rguenther@suse.de>
3083         * match.pd: Add BIT_FIELD_REF canonicalizations.
3085 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3087         PR c/86617
3088         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3090 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3092         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3093         terminated STRING_CST object.
3095 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3097         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3099 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3101         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3102         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3103         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3104         the elements into a register.
3105         (rs6000_split_v4si_init_di_reg): Delete.
3106         (rs6000_split_v4si_init): Delete.
3107         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3108         (vsx_init_v4si): Rewrite as a define_expand.
3110 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3112         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3113         zero_extend argument from memory): New.
3115 2018-07-22  Martin Sebor  <msebor@redhat.com>
3117         PR bootstrap/86621
3118         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3119         diagnosing calls with unknown arguments unless -Walloca-larger-than
3120         is restricted to less than PTRDIFF_MAX bytes.
3122 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3124         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3126 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3128         * pretty-print.c (text_info::set_location): Remove redundant
3129         "line_table" parameter from call to rich_location::set_range.
3131 2018-07-20  Martin Sebor  <msebor@redhat.com>
3133         PR middle-end/82063
3134         * builtins.c (expand_builtin_alloca): Adjust.
3135         * calls.c (alloc_max_size): Simplify.
3136         * cgraphunit.c (cgraph_node::expand): Adjust.
3137         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3138         variables.
3139         (frame_larger_than_size): Same.
3140         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3141         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3142         Initialize.
3143         * doc/invoke.texi (GCC Command Options): Document option arguments.
3144         Explain byte-size arguments and suffixes.
3145         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3146         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3147         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3148         * doc/options.texi (UInteger): Expand.
3149         (Host_Wide_Int, ByteSize): Document new properties.
3150         * final.c (final_start_function_1): Include sizes in an error message.
3151         * function.c (frame_offset_overflow): Same.
3152         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3153         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3154         Diagnose unbounded alloca calls only for limits of less than
3155         PTRDIFF_MAX.
3156         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3157         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3158         for alloca(0).
3159         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3160         only for limits of less than PTRDIFF_MAX.
3161         * langhooks-def.h (lhd_handle_option): Change function argument
3162         to HOST_WIDE_INT.
3163         * langhooks.c (lhd_handle_option): Same.
3164         * langhooks.h (handle_option): Same.
3165         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3166         ByteSize flags.
3167         (var_type, var_type_struct): Same.
3168         (var_set): Handle ByteSize flag.
3169         * optc-gen.awk: Add comments to output to ease debugging.  Make
3170         use of HOST_WIDE_INT where appropriate.
3171         * opts-gen-save.awk:  Use %lx to format unsigned long.
3172         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3173         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3174         arguments.  Parse bytes-size suffixes.
3175         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3176         (enum_value_to_arg): Same.
3177         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3178         (handle_option): Adjust.
3179         (generate_option): Change function argument to HOST_WIDE_INT.
3180         (cmdline_handle_error): Adjust.
3181         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3182         (set_option): Change function argument to HOST_WIDE_INT.
3183         (option_enabled): Handle cl_host_wide_int.
3184         (get_option_state): Handle CLVC_SIZE.
3185         (control_warning_option): Same.
3186         * opts.c (common_handle_option): Change function argument to
3187         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3188         OPT_Wvla_larger_than_.
3189         * opts.h (enum cl_var_type): Add an enumerator.
3190         * stor-layout.c (layout_decl): Print a more meaningful warning.
3191         * toplev.c (output_stack_usage): Adjust.
3193 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3195         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3196         call to inline_expand_builtin_string_cmp.
3197         (expand_builtin_strcmp): Likewise.
3198         (expand_builtin_strncmp): Likewise.
3199         (inline_string_cmp): Delete the last parameter, change char_type_node
3200         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3201         two operands.
3202         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3203         the inlining expansion on target where the type of the call has same or
3204         narrower precision than unsigned char.
3206 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3208         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3209         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3210         * common.opt (fsave-optimization-record): New option.
3211         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3212         * doc/invoke.texi (-fsave-optimization-record): New option.
3213         * dumpfile.c: Include "optinfo-emit-json.h".
3214         (struct kv_pair): Move to coretypes.h.
3215         (optgroup_options): Make non-static.
3216         (dump_context::end_scope): Call
3217         optimization_records_maybe_pop_dump_scope.
3218         * dumpfile.h (optgroup_options): New decl.
3219         * json.cc: New file.
3220         * json.h: New file.
3221         * optinfo-emit-json.cc: New file.
3222         * optinfo-emit-json.h: New file.
3223         * optinfo.cc: Include "optinfo-emit-json.h".
3224         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3225         (optinfo_enabled_p): Check optimization_records_enabled_p.
3226         (optinfo_wants_inlining_info_p): Likewise.
3227         * optinfo.h: Update comment.
3228         * profile-count.c (profile_quality_as_string): New function.
3229         * profile-count.h (profile_quality_as_string): New decl.
3230         (profile_count::quality): New accessor.
3231         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3232         and optinfo_emit_json_cc_tests.
3233         * selftest.h (selftest::json_cc_tests): New decl.
3234         (selftest::optinfo_emit_json_cc_tests): New decl.
3235         * toplev.c: Include "optinfo-emit-json.h".
3236         (compile_file): Call optimization_records_finish.
3237         (do_compile): Call optimization_records_start.
3238         * tree-ssa-live.c: Include optinfo.h.
3239         (remove_unused_scope_block_p): Retain inlining information if
3240         optinfo_wants_inlining_info_p returns true.
3242 2018-07-20  Richard Biener  <rguenther@suse.de>
3244         PR debug/86585
3245         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3246         to cover -flto-partition=none.
3248 2018-07-20  Martin Liska  <mliska@suse.cz>
3250         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3251         (get_decl_source_range): Remove unused function.
3253 2018-07-20  Richard Biener  <rguenther@suse.de>
3255         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3256         (struct vn_phi_s): Likewise.
3257         (struct vn_reference_s): Likewise.
3258         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3259         for searching the slot of an entry known to be in the hash itself.
3260         (vn_phi_hasher::equal): Likewise.
3261         (vn_reference_hasher::equal): Likewise.
3262         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3263         globals.
3264         (optimistic_info, current_info): Remove, keeping only valid_info.
3265         (vn_reference_lookup_1): Remove fallback lookup.
3266         (vn_reference_lookup_2): Likewise.
3267         (vn_nary_op_lookup_1): Likewise.
3268         (vn_phi_lookup): Likewise.
3269         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3270         hash element.
3271         (vn_reference_insert): Adjust, chain the inserted hash element
3272         at last_inserted_ref.
3273         (vn_reference_insert_pieces): Likewise.
3274         (visit_reference_op_call): Likewise.
3275         (vn_nary_op_insert_into): Chain the inserted hash element at
3276         last_inserted_nary.
3277         (vn_nary_op_insert_pieces): Adjust.
3278         (vn_nary_op_insert): Likewise.
3279         (vn_nary_op_insert_stmt): Likewise.
3280         (vn_phi_insert): Adjust, chain the inserted hash element at
3281         last_inserted_phi.
3282         (process_scc): Remove clearing and copying the optimistic
3283         table.  Instead remove elements inserted during an optimistic
3284         iteration from the single table we maintain.
3285         (init_scc_vn): Adjust.
3286         (free_scc_vn): Likewise.
3287         (sccvn_dom_walker::record_cond): Likewise.
3288         (sccvn_dom_walker::after_dom_children): Likewise.
3290 2018-07-19  Martin Sebor  <msebor@redhat.com>
3292         PR tree-optimization/84047
3293         PR tree-optimization/83776
3294         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3295         (check_array_bounds): Call it.
3297 2018-07-19  Martin Sebor  <msebor@redhat.com>
3299         * align.h (align_flags): Use member initialization.
3301 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3303         * Makefile.in (OBJS): Add optinfo.o.
3304         * coretypes.h (class symtab_node): New forward decl.
3305         (struct cgraph_node): New forward decl.
3306         (class varpool_node): New forward decl.
3307         * dump-context.h: New file.
3308         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3309         "tree-pass.h".
3310         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3311         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3312         (set_alt_dump_file): Likewise.
3313         (dump_context::~dump_context): New dtor.
3314         (dump_gimple_stmt): Move implementation to...
3315         (dump_context::dump_gimple_stmt): ...this new member function.
3316         Add the stmt to any pending optinfo, creating one if need be.
3317         (dump_gimple_stmt_loc): Move implementation to...
3318         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3319         Start a new optinfo and add the stmt to it.
3320         (dump_gimple_expr): Move implementation to...
3321         (dump_context::dump_gimple_expr): ...this new member function.
3322         Add the stmt to any pending optinfo, creating one if need be.
3323         (dump_gimple_expr_loc): Move implementation to...
3324         (dump_context::dump_gimple_expr_loc): ...this new member function.
3325         Start a new optinfo and add the stmt to it.
3326         (dump_generic_expr): Move implementation to...
3327         (dump_context::dump_generic_expr): ...this new member function.
3328         Add the tree to any pending optinfo, creating one if need be.
3329         (dump_generic_expr_loc): Move implementation to...
3330         (dump_context::dump_generic_expr_loc): ...this new member
3331         function.  Add the tree to any pending optinfo, creating one if
3332         need be.
3333         (dump_printf): Move implementation to...
3334         (dump_context::dump_printf_va): ...this new member function.  Add
3335         the text to any pending optinfo, creating one if need be.
3336         (dump_printf_loc): Move implementation to...
3337         (dump_context::dump_printf_loc_va): ...this new member function.
3338         Start a new optinfo and add the stmt to it.
3339         (dump_dec): Move implementation to...
3340         (dump_context::dump_dec): ...this new member function.  Add the
3341         value to any pending optinfo, creating one if need be.
3342         (dump_context::dump_symtab_node): New member function.
3343         (dump_context::get_scope_depth): New member function.
3344         (dump_context::begin_scope): New member function.
3345         (dump_context::end_scope): New member function.
3346         (dump_context::ensure_pending_optinfo): New member function.
3347         (dump_context::begin_next_optinfo): New member function.
3348         (dump_context::end_any_optinfo): New member function.
3349         (dump_context::s_current): New global.
3350         (dump_context::s_default): New global.
3351         (dump_scope_depth): Delete global.
3352         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3353         (dump_symtab_node): New function.
3354         (get_dump_scope_depth): Reimplement in terms of dump_context.
3355         (dump_begin_scope): Likewise.
3356         (dump_end_scope): Likewise.
3357         (selftest::temp_dump_context::temp_dump_context): New ctor.
3358         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3359         (selftest::verify_item): New function.
3360         (ASSERT_IS_TEXT): New macro.
3361         (ASSERT_IS_TREE): New macro.
3362         (ASSERT_IS_GIMPLE): New macro.
3363         (selftest::test_capture_of_dump_calls): New test.
3364         (selftest::dumpfile_c_tests): Call it.
3365         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3366         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3367         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3368         descriptive comment.
3369         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3370         (dump_node, dump_bb): Move these unrelated decls.
3371         (class dump_manager): Add leading comment.
3372         * optinfo.cc: New file.
3373         * optinfo.h: New file.
3375 2018-07-19  Michael Collison  <michael.collison@arm.com>
3376             Richard Henderson <rth@redhat.com>
3378         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3379         (subti): Handle op1 zero.
3380         (subvti4, usub4ti4): New.
3381         (*sub<GPI>3_compare1_imm): New.
3382         (sub<GPI>3_carryinCV): New.
3383         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3384         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3386 2018-07-19  Michael Collison  <michael.collison@arm.com>
3387             Richard Henderson <rth@redhat.com>
3389         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3390         (addti3): Create simpler code if low part is already known to be 0.
3391         (addvti4, uaddvti4): New.
3392         (*add<GPI>3_compareC_cconly_imm): New.
3393         (*add<GPI>3_compareC_cconly): New.
3394         (*add<GPI>3_compareC_imm): New.
3395         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3396         handle constants within this pattern..
3397         (*add<GPI>3_compareV_cconly_imm): New.
3398         (*add<GPI>3_compareV_cconly): New.
3399         (*add<GPI>3_compareV_imm): New.
3400         (add<GPI>3_compareV): New.
3401         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3402         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3403         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3404         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3405         with 'comparison' operator.
3406         (*add<GPI>3_compareV_cconly_imm): Ditto.
3407         (*add<GPI>3_compareV_cconly): Ditto.
3408         (*add<GPI>3_compareV_imm): Ditto.
3409         (add<GPI>3_compareV): Ditto.
3410         (add<mode>3_carryinC): Ditto.
3411         (*add<mode>3_carryinC_zero): Ditto.
3412         (*add<mode>3_carryinC): Ditto.
3413         (add<mode>3_carryinV): Ditto.
3414         (*add<mode>3_carryinV_zero): Ditto.
3415         (*add<mode>3_carryinV): Ditto.
3417 2018-07-19  Michael Collison  <michael.collison@arm.com>
3418             Richard Henderson <rth@redhat.com>
3420         * config/aarch64/aarch64-modes.def (CC_V): New.
3421         * config/aarch64/aarch64-protos.h
3422         (aarch64_addti_scratch_regs): Declare
3423         (aarch64_subvti_scratch_regs): Declare.
3424         (aarch64_expand_subvti): Declare.
3425         (aarch64_gen_unlikely_cbranch): Declare
3426         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3427         for signed overflow using CC_Vmode.
3428         (aarch64_get_condition_code_1): Handle CC_Vmode.
3429         (aarch64_gen_unlikely_cbranch): New function.
3430         (aarch64_addti_scratch_regs): New function.
3431         (aarch64_subvti_scratch_regs): New function.
3432         (aarch64_expand_subvti): New function.
3434 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3436         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3437         extension.
3438         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3439         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3440         extension.
3442 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3444         PR target/83009
3445         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3446         address check not strict.
3448 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3450         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3451         Umq with Umn.
3452         (store_pair_lanes<mode>): Likewise.
3453         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3454         enum value 'ADDR_QUERY_LDP_STP_N'.
3455         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3456         (aarch64_print_address_internal): Add declaration.
3457         (aarch64_print_ldpstp_address): Remove.
3458         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3459         (aarch64_print_operand): Change printing of 'y'.
3460         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3461         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3462         'true' rather than '1'.
3463         * config/aarch64/constraints.md (Uml): Likewise.
3464         (Uml): Rename to Umn.
3465         (Umq): Remove.
3467 2018-07-19  Richard Biener  <rguenther@suse.de>
3469         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3470         a trailing array.
3471         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3472         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3473         (vn_reference_hasher): Likewise.
3474         (struct vn_tables_s): Remove obstack and alloc-pool members.
3475         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3476         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3477         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3478         (vn_reference_insert_pieces): Likewise.
3479         (alloc_vn_nary_op_noinit): Adjust.
3480         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3481         (vn_phi_eq): Adjust.
3482         (shared_lookup_phiargs): Remove.
3483         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3484         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3485         (visit_reference_op_call): Likewise.
3486         (copy_nary, copy_phi, copy_reference): Remove.
3487         (process_scc): Rewind the obstack when iterating.  Do not
3488         copy the elements to valid_info but just move them from one
3489         hashtable to the other.
3490         (allocate_vn_table): Adjust.
3491         (free_vn_table): Likewise.
3492         (init_scc_vn): Likewise.
3493         (free_scc_vn): Likewise.
3495 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3497         PR target/86560
3498         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3499         indirect_return as function type attribute.
3500         (ix86_attribute_table): Change indirect_return to function
3501         type attribute.
3502         * doc/extend.texi: Update indirect_return attribute.
3504 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3506         * wide-int.h (widest2_int): New.
3507         * gimple-fold.c (arith_overflowed_p): Use it.
3508         * tree.h (widest2_int_cst): New.
3509         * tree-vrp.c (wide_int_binop_overflow): Rename from
3510         vrp_int_const_binop.
3511         Rewrite to work on trees.
3512         (extract_range_from_multiplicative_op_1): Abstract code to...
3513         (wide_int_range_min_max): ...here.
3514         (wide_int_range_cross_product): ...and here.
3515         (extract_range_from_binary_expr_1): Abstract overflow code to...
3516         (wide_int_range_mult_wrapping): ...here.
3517         * tree-vrp.h (wide_int_range_cross_product): New.
3518         (wide_int_range_mult_wrapping): New.
3520 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3521             Julia Koval  <julia.koval@intel.com>
3523         * config/i386/x86-tune-costs.h (skylake_memcpy,
3524         skylake_memset): Replace rep_prefix with unrolling for size 512.
3526 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3528         PR middle-end/86544
3529         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3530         comparision with EQ_EXPR in last stmt.
3532 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3534         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3535         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3536         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3537         previously known as "PowerPC AltiVec Built-in Functions".  Move
3538         some material to new subsubsections "PowerPC AltiVec Built-in
3539         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3540         ISA 2.07".
3541         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3542         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3543         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3544         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3546 2018-07-18  Richard Biener  <rguenther@suse.de>
3548         PR tree-optimization/86557
3549         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3550         EXACT_DIV_EXPR.
3552 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3554         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3556 2018-07-17  Jeff Law  <law@redhat.com>
3558         * config/arm/arm.c (get_label_padding): Update for recent
3559         changes to label_to_alignment.
3561         PR tree-optimization/86010
3562         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3564         * config/mips/mips.c (vr4130_align_insns): Update for recent
3565         changes to label_to_alignment.
3567         * config/frv/frv.c (frv_label_align): Update for recent changes
3568         to label_to_alignment.
3570         * config/nios2/nios2.c (nios2_label_align): Update for recent
3571         changes which dropped ALIGN_LABELS_LOG.
3573 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3575         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3576         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3578 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3580         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3581         deprecated align_labels_log.
3583 2018-07-17  Richard Biener  <rguenther@suse.de>
3585         PR lto/86456
3586         * dwarf2out.c (init_sections_and_labels): Always generate
3587         a debug_line_str_section for early LTO debug.
3588         (dwarf2out_finish): Reset debug_line_str_hash output early.
3589         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3590         with fat LTO part.
3591         (dwarf2out_early_finish): Output debug_line_str.
3593 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3595         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3596         index register on z196 or later.
3598 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3600         * config/s390/s390.c (s390_default_align): Set default function
3601         alignment to 16.
3602         (s390_override_options_after_change): Call s390_default align.
3603         (s390_option_override_internal): Call s390_default_align.
3604         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3606 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3608         PR middle-end/86542
3609         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3610         to _looptemp_ clauses, other than the first two.
3612 2018-07-17  Martin Liska  <mliska@suse.cz>
3614         * opts.c: Do not enable OPT_falign_* for -Os.
3616 2018-07-17  Martin Liska  <mliska@suse.cz>
3618         * align.h (MAX_CODE_ALIGN): New.
3619         (MAX_CODE_ALIGN_VALUE): New.
3620         * common/config/i386/i386-common.c (ix86_handle_option):
3621         (MAX_CODE_ALIGN): Moved to align.h.
3622         * final.c (MAX_CODE_ALIGN): Likewise.
3623         * opts.c (parse_and_check_align_values):
3624         (MAX_CODE_ALIGN): Likewise.
3625         (MAX_CODE_ALIGN_VALUE): Likewise.
3627 2018-07-17  Martin Liska  <mliska@suse.cz>
3629         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3630         in order to fulfil coding style.
3631         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3632         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3633         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3634         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3635         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3636         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3637         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3638         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3639         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3641 2018-07-17  Martin Liska  <mliska@suse.cz>
3643         * align.h: New file.
3644         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3645         directly.
3646         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3647         align_flags of label_to_alignment.
3648         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3649         align_flags class.
3650         * config/m68k/m68k.c: Do not use removed align_labels_value and
3651         align_loops_value.
3652         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3653         (LOOP_ALIGN): Likewise.
3654         (LABEL_ALIGN): Likewise.
3655         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3656         Remove not used macro.
3657         (rs6000_loop_align): Change return type to align_flags.
3658         (rs6000_loop_align_max_skip): Remove.
3659         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3660         Change return type to align_flags.
3661         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3662         Remove not used macro.
3663         (rs6000_loop_align):  Change return type to align_flags.
3664         (rs6000_loop_align_max_skip): Remove.
3665         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3666         * config/rx/rx-protos.h (rx_align_for_label): Make it
3667         static function.
3668         * config/rx/rx.c (rx_align_for_label): Change return type
3669         to align_flags.
3670         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3671         macro definitions.
3672         into align_flags class.
3673         (LABEL_ALIGN): Likewise.
3674         (LOOP_ALIGN): Likewise.
3675         * config/s390/s390.c (s390_label_align): Use align_flags
3676         class member.
3677         (s390_asm_output_function_label): Likewise.
3678         * config/sh/sh.c (sh_override_options_after_change):
3679         Use align_flags class directly without macros.
3680         (find_barrier): Likewise.
3681         (barrier_align): Likewise.
3682         (sh_loop_align): Likewise.
3683         * config/spu/spu.c (spu_option_override):
3684         Use align_flags_tuple::get_value instead of removed macros.
3685         (spu_sched_init): Likewise.
3686         * config/spu/spu.h (GTY): Likewise.
3687         * config/visium/visium.c (visium_option_override):
3688         Set "8" as default secondary alignment.
3689         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3690         in order to guarantee secondary alignment of 8.
3691         * coretypes.h: Include align.h header file.
3692         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3693         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3694         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3695         * doc/tm.texi.in: Likewise.
3696         * final.c (struct label_alignment): Remove not used structure.
3697         (LABEL_ALIGN): Change type to align_flags.
3698         (LOOP_ALIGN): Likewise.
3699         (JUMP_ALIGN): Likewise.
3700         (default_loop_align_max_skip): Remove.
3701         (default_label_align_max_skip): Likewise.
3702         (default_jump_align_max_skip): Likewise.
3703         (default_label_align_after_barrier_max_skip):
3704         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3705         (LABEL_TO_MAX_SKIP): Remove.
3706         (label_to_alignment): Return align_flags type instead of integer.
3707         (label_to_max_skip): Remove.
3708         (align_fuzz): Use align_flags type.
3709         (compute_alignments): Use align_flags type and use align_flags::max
3710         to combine multiple alignments.
3711         (grow_label_align): Grow vec instead of C array.
3712         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3713         (shorten_branches):  Use align_flags type and use align_flags::max
3714         to combine multiple alignments.
3715         (final_scan_insn_1): Remove usage of secondary alignment that comes
3716         from label alignment, but instead use proper secondary alignment
3717         which is computed in grow_label_align.
3718         * flags.h (struct align_flags_tuple): Move to align.h.
3719         (struct align_flags): Likewise.
3720         (state_align_loops): Rename to align_loops.
3721         (state_align_jumps): Rename to align_jumps.
3722         (state_align_labels): Rename to align_labels.
3723         (state_align_functions): Rename to align_functions.
3724         (align_loops_log): Remove.
3725         (align_jumps_log): Remove.
3726         (align_labels_log): Remove.
3727         (align_functions_log): Remove.
3728         (align_loops_max_skip): Remove.
3729         (align_jumps_max_skip): Remove.
3730         (align_labels_max_skip): Remove.
3731         (align_functions_max_skip): Remove.
3732         (align_loops_value): Remove.
3733         (align_jumps_value): Remove.
3734         (align_labels_value): Remove.
3735         (align_functions_value): Remove.
3736         * output.h (label_to_alignment): Change return type to align_flags.
3737         (label_to_max_skip): Remove.
3738         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3739         jump_align_max_skip macros.
3740         * targhooks.h (default_loop_align_max_skip): Remove.
3741         (default_label_align_max_skip): Likewise.
3742         (default_jump_align_max_skip): Likewise.
3743         (default_label_align_after_barrier_max_skip): Remove.
3744         * toplev.c (read_log_maxskip): Use ::normalize function.
3745         (parse_N_M): Remove not used argument and also call ::normalize.
3746         (parse_alignment_opts): Do not pass unused arguments.
3747         * varasm.c (assemble_start_function): Use directly align_functions
3748         instead of removed macros.
3749         * system.h: Do not poison removed macros.
3751 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3753         PR middle-end/86539
3754         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3755         and cond temporaries don't have reference type if iterator has
3756         pointer type.  For init use &for_pre_body instead of pre_p if
3757         for_pre_body is non-empty.
3759 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3761         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3762         double-double modes to SFmode directly directly.
3763         (trunc<mode>sf2_fprs): Delete.
3765 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3767         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3768         for conversions between IFmode and the decimal floating point modes.
3769         (init_float128_ieee): Use the correct names for conversions between
3770         KFmode and the decimal floating point modes.
3772 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3774         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3775         for the conversions between TDmode and IFmode.
3776         (init_float128_ieee): Use more correct names for the conversions
3777         between TDmode and KFmode.
3779 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3781         PR tree-optimization/86526
3782         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3783         (inline_expand_builtin_string_cmp): Likewise.
3784         (inline_string_cmp): Likewise.  Use c_readstr instead of
3785         builtin_memcpy_read_str.  Add unit_mode temporary.
3787 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3789         PR middle-end/86528
3790         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3791         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3793 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3795         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3796         Alphabetize prototypes of built-in functions, separating out
3797         built-in functions that are listed in this section but should be
3798         described elsewhere.
3800 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3802         PR target/86511
3803         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3804         conditional move when trapping comparison was split to a
3805         non-trapping one (and vice versa).
3807 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3809         * config/s390/s390.c (s390_function_profiler): Generate nops
3810         instead of profiler call sequences.
3811         * config/s390/s390.opt: Add the new option.
3813 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3815         * config/s390/s390.c (s390_function_profiler): Generate
3816         __mcount_loc section.
3817         * config/s390/s390.opt: Add the new option.
3819 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3821         * common.opt: Add the new warning.
3822         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3823         %r0,__fentry__" when -mfentry is specified.
3824         (s390_option_override_internal): Disallow -mfentry for 31-bit
3825         CPUs.
3826         * config/s390/s390.opt: Add the new option.
3828 2018-07-16  Richard Biener  <rguenther@suse.de>
3830         PR lto/86523
3831         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3832         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3834 2018-07-16  Martin Liska  <mliska@suse.cz>
3836         PR ipa/86529
3837         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3838         to ::get_create.
3840 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3842         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3844 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3846         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3847         for ARCHS4x.
3848         * config/arc/arc-cpus.def (hs4x): New cpu.
3849         (hs4xd): Likewise.
3850         * config/arc/arc-tables.opt: Regenerate.
3851         * config/arc/arc.c (arc_sched_issue_rate): New function.
3852         (TARGET_SCHED_ISSUE_RATE): Define.
3853         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3854         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3855         fpu_cvt.
3856         (attr tune): Add ARCHS4x tune values.
3857         (attr tune_dspmpy): Define.
3858         (*tst): Correct instruction type.
3859         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3860         * config/arc/arcHS4x.md: New file.
3861         * config/arc/fpu.md: Update instruction type attributes.
3862         * config/arc/t-multilib: Regenerate.
3864 2018-07-16  Tom de Vries  <tdevries@suse.de>
3866         PR debug/86455
3867         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3869 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3871         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3872         early clobber.
3874 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3876         PR tree-optimization/86514
3877         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3878         conversion to a boolean type from a type with greater precision.
3880 2018-07-16  Tom de Vries  <tdevries@suse.de>
3882         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3883         dump_flags request TDF_SLIM.
3885 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3887         * fold-const.c (int_const_binop_1): Abstract...
3888         (wide_int_binop): ...wide int code here.
3889         (poly_int_binop): ...poly int code here.
3890         Abstract the rest of int_const_binop_1 into int_const_binop.
3891         * fold-const.h (wide_int_binop): New.
3892         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3893         Remove useless PLUS/MINUS_EXPR case.
3894         (zero_nonzero_bits_from_vr): Move wide int code...
3895         (zero_nonzero_bits_from_bounds): ...here.
3896         (extract_range_from_binary_expr_1): Move mask optimization code...
3897         (range_easy_mask_min_max): ...here.
3898         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3899         (range_easy_mask_min_max): New.
3901 2018-07-15  Jeff Law  <law@redhat.com>
3903         PR target/85993
3904         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3905         block.
3907 2018-07-14  Jim Wilson  <jimw@sifive.com>
3909         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3911 2018-07-14  Paul Koning  <ni1d@arrl.net>
3913         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3915 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3917         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3918         copying section.
3920 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3921             Steve Munroe  <munroesj52@gmail.com>
3923         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3924         (_mm_andnot_si128): Likewise.
3925         (_mm_or_si128): Likewise.
3926         (_mm_xor_si128): Likewise.
3928 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3930         PR middle-end/78809
3931         * builtins.c (expand_builtin_memcmp): Inline the calls first
3932         when result_eq is false.
3933         (expand_builtin_strcmp): Inline the calls first.
3934         (expand_builtin_strncmp): Likewise.
3935         (inline_string_cmp): New routine. Expand a string compare
3936         call by using a sequence of char comparison.
3937         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3938         a call to str(n)cmp/memcmp.
3939         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3940         New option.
3941         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3943 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3945         * config/arm/driver-arm.c: Include arm-native.h.
3946         (host_detect_local_cpu): Use auto-generated data tables.
3947         (vendors, arm_cpu_table): Delete.  Move part information to ...
3948         * config/arm/arm-cpus.in: ... here.
3949         * config/arm/parsecpu.awk (gen_native): New function.
3950         (vendor, part): New CPU fields.
3951         (END): Add support for building the native CPU detection tables.
3952         * config/arm/t-arm (arm-native.h): Add build rule.
3953         (driver-arm.o): Add dependency on arm-native.h.
3955 2018-07-13  Richard Biener  <rguenther@suse.de>
3957         PR middle-end/85974
3958         * match.pd (addr1 - addr2): Allow either of the operand to
3959         have a conversion.
3961 2018-07-13  Tom de Vries  <tdevries@suse.de>
3963         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3964         in remap_ssa_name.
3966 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3968         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3969         arrays instead of numbered variables.
3971 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3973         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3974         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3976 2018-07-13  Richard Biener  <rguenther@suse.de>
3978         PR debug/86452
3979         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3980         instead of get_context_die.
3982 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3983             Richard Biener  <rguenther@suse.de>
3985         PR middle-end/86489
3986         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3987         that the loop latch destination where phi is defined.
3989 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3991         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3992         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3993         (riscv_set_current_function): Extract getting interrupt type to new
3994         function.
3995         (riscv_get_interrupt_type): New function.
3996         (riscv_merge_decl_attributes): New function, checking interrupt type is
3997         same.
3998         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
4000 2018-07-12  Paul Koning  <ni1d@arrl.net>
4002         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
4003         directive.
4005 2018-07-12  Paul Koning  <ni1d@arrl.net>
4007         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
4008         zero reference, add doloop_end instead.
4009         * doc/md.texi (decrement_and_branch_until_zero): Remove.
4010         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
4011         detail for doloop_end.
4013 2018-07-12  Martin Sebor  <msebor@redhat.com>
4015         PR c/86453
4016         * attribs.c (decl_attributes): Reject conflicting attributes before
4017         calling attribute handlers.
4019 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4021         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
4022          parameter.
4023         (gcc::dump_manager::get_dump_file_name): likewise.
4024         (dump_begin): Likewise.
4025         * dumpfile.h (dump_begin): Update prototype.
4026         (gcc::dump_manager::get_dump_file_name,
4027         gcc::dump_manager::get_dump_file_name): Update prototype.
4029 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4031         * internal-fn.h (vectorizable_internal_fn_p): New function.
4032         * tree-vect-slp.c (compatible_calls_p): Likewise.
4033         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
4034         to internal functions.
4035         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
4037 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4039         * fold-const.h (inverse_conditions_p): Declare.
4040         * fold-const.c (inverse_conditions_p): New function.
4041         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
4042         that test the inverse condition of a conditional internal function.
4043         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4044         * internal-fn.c (internal_fn_mask_index): Handle conditional
4045         internal functions.
4046         (vectorized_internal_fn_supported_p): New function.
4047         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4048         (any_pred_load_store): Replace with...
4049         (need_to_predicate): ...this new variable.
4050         (redundant_ssa_names): New variable.
4051         (ifcvt_can_use_mask_load_store): Move initial checks to...
4052         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4053         for which a conditional internal function exists.
4054         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4055         instead of ifcvt_can_use_mask_load_store.  Update after variable
4056         name change.
4057         (predicate_load_or_store): New function, split out from
4058         predicate_mem_writes.
4059         (check_redundant_cond_expr): New function.
4060         (value_available_p): Likewise.
4061         (predicate_rhs_code): Likewise.
4062         (predicate_mem_writes): Rename to...
4063         (predicate_statements): ...this.  Use predicate_load_or_store
4064         and predicate_rhs_code.
4065         (combine_blocks, tree_if_conversion): Update after above name changes.
4066         (ifcvt_local_dce): Handle redundant_ssa_names.
4067         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4068         general conditional functions.
4069         * tree-vect-stmts.c (vectorizable_call): Likewise.
4071 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4072             Alan Hayward  <alan.hayward@arm.com>
4073             David Sherwood  <david.sherwood@arm.com>
4075         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4076         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4077         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4078         plus and minus and convert them into IFN_COND_FMA-based sequences.
4079         (convert_mult_to_fma): Handle conditional plus and minus.
4081 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4083         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4084         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4085         (cond_fnms_optab): New optabs.
4086         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4087         internal functions.
4088         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4089         * internal-fn.h (get_conditional_internal_fn): Declare.
4090         (get_unconditional_internal_fn): Likewise.
4091         * internal-fn.c (cond_ternary_direct): New macro.
4092         (expand_cond_ternary_optab_fn): Likewise.
4093         (direct_cond_ternary_optab_supported_p): Likewise.
4094         (FOR_EACH_COND_FN_PAIR): Likewise.
4095         (get_conditional_internal_fn): New function.
4096         (get_unconditional_internal_fn): Likewise.
4097         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4098         (gimple_match_op::gimple_match_op): Add a new overload for 5
4099         operands.
4100         (gimple_match_op::set_op): Likewise.
4101         (gimple_resimplify5): Declare.
4102         * genmatch.c (decision_tree::gen): Generate simplifications for
4103         5 operands.
4104         * gimple-match-head.c (gimple_simplify): Define an overload for
4105         5 operands.  Handle calls with 5 arguments in the top-level overload.
4106         (convert_conditional_op): Handle conversions from unconditional
4107         internal functions to conditional ones.
4108         (gimple_resimplify5): New function.
4109         (build_call_internal): Pass a fifth operand.
4110         (maybe_push_res_to_seq): Likewise.
4111         (try_conditional_simplification): Try converting conditional
4112         internal functions to unconditional internal functions.
4113         Handle 3-operand unconditional forms.
4114         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4115         Define ternary equivalents of the current rules for binary conditional
4116         internal functions.
4117         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4118         ternary operations.
4119         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4120         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4121         (optab): Handle them.
4122         (SVE_COND_FP_TERNARY): New int iterator.
4123         (sve_fmla_op, sve_fmad_op): New int attributes.
4124         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4125         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4126         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4128 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4130         * target.def (preferred_else_value): New target hook.
4131         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4132         * doc/tm.texi: Regenerate.
4133         * targhooks.h (default_preferred_else_value): Declare.
4134         * targhooks.c (default_preferred_else_value): New function.
4135         * internal-fn.h (conditional_internal_fn_code): Declare.
4136         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4137         (get_conditional_internal_fn): Use it.
4138         (conditional_internal_fn_code): New function.
4139         * gimple-match.h (gimple_match_cond): New struct.
4140         (gimple_match_op): Add a cond member function.
4141         (gimple_match_op::gimple_match_op): Update all forms to take a
4142         gimple_match_cond.
4143         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4144         for the suboperation, but don't specify a particular else_value.
4145         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4146         (visit_nary_op, visit_reference_op_load): Pass
4147         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4148         * gimple-match-head.c: Include tree-eh.h
4149         (convert_conditional_op): New function.
4150         (maybe_resimplify_conditional_op): Likewise.
4151         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4152         (gimple_resimplify2): Likewise.
4153         (gimple_resimplify3): Likewise.
4154         (gimple_resimplify4): Likewise.
4155         (maybe_push_res_to_seq): Return null for conditional operations.
4156         (try_conditional_simplification): New function.
4157         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4158         constructor.
4159         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4160         IFN_COND_* call.
4161         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4162         function.
4163         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4165 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4167         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4168         DECL_FCONTEXT
4169         (hash_tree): Do not hash DECL_FCONTEXT
4170         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4171         Do not stream DECL_FCONTEXT.
4172         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4173         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4175 2018-07-12  Richard Biener  <rguenther@suse.de>
4177         PR debug/86462
4178         * dwarf2out.c (gen_block_die): Only output blocks when they have
4179         at least one !DECL_IGNORED_P variable.
4181 2018-07-12  Richard Biener  <rguenther@suse.de>
4183         PR target/84829
4184         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4185         Remove -mieee-fp handling.
4187 2018-07-12  Richard Biener  <rguenther@suse.de>
4189         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4190         left-over from last patch.
4192 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4194         PR tree-optimization/86492
4195         * gimple-ssa-store-merging.c
4196         (imm_store_chain_info::coalesce_immediate_stores): Call
4197         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4199 2018-07-12  Richard Biener  <rguenther@suse.de>
4201         PR middle-end/86479
4202         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4203         move possibly trapping operations into the conditional.
4205 2018-07-12  Richard Biener  <rguenther@suse.de>
4207         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4208         (vn_lookup_simplify_result): Remove recursion limit applied
4209         here.
4210         (vn_nary_build_or_lookup_1): Adjust.
4211         (try_to_simplify): Likewise.
4212         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4213         here.
4214         (gimple_resimplify2): Likewise.
4215         (gimple_resimplify3): Likewise.
4216         (gimple_resimplify4): Likewise.
4218 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4220         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4221         Use __mmask64 type instead of __mmask8 for __M argument.
4222         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4223         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4224         __U argument.
4225         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4226         __mmask16 for __M argument.
4227         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4228         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4229         to __mmask16 instead of __mmask8.
4230         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4231         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4232         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4233         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4234         instead of __mmask16 for __U argument.
4235         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4236         __mmask16 instead of __mmask8 for __U argument.
4237         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4238         __U argument.
4239         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4240         __mmask16.
4241         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4242         argument.
4243         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4244         __U argument.
4245         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4246         __mmask16.
4247         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4248         of __mmask16.
4249         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4250         __U argument.
4251         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4252         __U argument.
4253         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4254         __U argument.
4255         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4256         __U argument.
4257         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4258         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4259         return type as well as __M argument type and all casts from __mmask8
4260         to __mmask32.
4261         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4262         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4263         return type as well as __M argument type and all casts from __mmask8
4264         to __mmask16.
4265         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4266         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4267         return type as well as __M argument type and all casts from __mmask8
4268         to __mmask32.
4269         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4270         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4271         return type as well as __M argument type and all casts from __mmask8
4272         to __mmask16.
4273         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4274         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4275         __mmask16.
4277 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4279         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4280         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4281         for __U argument.
4283 2018-07-11  Paul Koning  <ni1d@arrl.net>
4285         * doc/md.texi (define_subst): Document how multiple occurrences of
4286         the same argument in the replacement pattern are handled.
4288 2018-07-11  Paul Koning  <ni1d@arrl.net>
4290         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4291         alphabetical order.
4292         (Common Type Attributes): Add "mode" attribute.
4294 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4296         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4297         stream DECL_ORIGINAL_TYPE.
4298         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4299         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4300         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4301         Do not walk original type.
4302         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4303         external decls.
4304         (write_ts_decl_non_common_tree_pointers): Do not stream
4305         DECL_ORIGINAL_TYPE
4306         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4307         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4309 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4311         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4312         thread twice from the same starting edge.
4314 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4316         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4317         * gimple.c (gimple_call_nonnull_result_p): ...here...
4318         (gimple_call_nonnull_arg): ...and here.
4319         * gimple.h (gimple_call_nonnull_result_p): New.
4320         (gimple_call_nonnull_arg): New.
4322 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4324         * config/arm/arm-cpus.in: Move information from fpu field of each
4325         cpu definition to the isa field.
4326         * config/arm/parsecpu.awk (fpu): Delete match rule.
4327         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4329 2018-07-11  Richard Biener  <rguenther@suse.de>
4331         PR debug/86457
4332         * dwarf2out.c (init_sections_and_labels): Use
4333         output_asm_line_debug_info consistently.
4334         (dwarf2out_early_finish): Likewise.
4335         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4336         type units.
4338 2018-07-11  Richard Biener  <rguenther@suse.de>
4340         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4341         Rework father_bb setting in a way to avoid propagating constants
4342         multiple times on a loop body.
4344 2018-07-10  Mark Wielaard  <mark@klomp.org>
4346         PR debug/86459
4347         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4349 2018-07-10  Richard Biener  <rguenther@suse.de>
4351         * hash-map.h (hash_map::iterator::operator*): Return
4352         references to key and value.
4354 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4356         PR c++/86443
4357         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4358         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4359         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4360         (gimplify_omp_for): For composite loops, move outer
4361         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4362         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4363         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4364         TREE_LIST for both the original class iterator and the "last" helper
4365         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4366         loop, remember has_decl_expr from outer composite loops for the
4367         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4369 2018-07-09  Martin Sebor  <msebor@redhat.com>
4371         PR middle-end/77357
4372         PR middle-end/86428
4373         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4374         accessing implicitly initialized array elements.
4375         * expr.c (string_constant): Handle string initializers of
4376         character arrays within aggregates.
4377         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4378         Store element offset.  As a special case, handle zero size.
4379         (fold_nonarray_ctor_reference): Same.
4380         (fold_ctor_reference): Add argument.  Store subobject offset.
4381         * gimple-fold.h (fold_ctor_reference): Add argument.
4383 2018-07-09  Paul Koning  <ni1d@arrl.net>
4385         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4386         (pdp11_insn_cost): New function.
4387         (pdp11_md_asm_adjust): New function.
4388         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4389         (pdp11_rtx_costs): Update to match machine better.
4390         (output_addr_const_pdp11): Correct format mismatch warnings.
4391         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4392         * config/pdp11/pdp11.md: General change to add base_cost and/or
4393         length attributes for use by new pdp11_insn_cost function.
4394         (MIN_BRANCH): Correct definition.
4395         (MIN_SOB): Ditto.
4396         (doloop_end): Use standard pattern name for looping pattern.
4397         (doloop_end_nocc): New.
4398         (movsf): Add another constraint alternative.
4399         (zero_extendqihi2): Add constraint alternatives for not in place
4400         extend.
4401         (zero_extendhisi2): Remove.
4402         (shift patterns): Add CC handling variants.
4403         (bswaphi2): New.
4404         (bswapsi2): New.
4405         (rothi3): New.
4406         (define_peephole2): New peephole to recognize mov that sets CC for
4407         subsequent test.
4409 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4411         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4412         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4413         wi::add.
4415 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4417         PR c/86420
4418         * real.c (real_nextafter): Return true if result is denormal.
4420 2018-07-09  Martin Liska  <mliska@suse.cz>
4422         * common.opt: Add back wrongly removed attribute.
4424 2018-07-09  Richard Biener  <rguenther@suse.de>
4426         PR debug/86413
4427         * dwarf2out.c (gen_block_die): For an early generated DIE
4428         always output high/low PC attributes.
4430 2018-07-09  Tom de Vries  <tdevries@suse.de>
4432         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4433         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4434         onto VAR_DECL with abstract origin.
4436 2018-07-07  Jim Wilson  <jimw@sifive.com>
4438         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4440 2018-07-07  Tom de Vries  <tdevries@suse.de>
4442         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4444 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4446         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4447         overflow_type.
4448         (combine_bound): Use wide-int overflow calculation instead of
4449         rolling our own.
4450         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4451         overflow_type.
4452         * fold-const.c (int_const_binop_2): Same.
4453         (extract_muldiv_1): Same.
4454         (fold_div_compare): Same.
4455         (fold_abs_const): Same.
4456         * match.pd: Same.
4457         * poly-int.h (add): Same.
4458         (sub): Same.
4459         (neg): Same.
4460         (mul): Same.
4461         * predict.c (predict_iv_comparison): Same.
4462         * profile-count.c (slow_safe_scale_64bit): Same.
4463         * simplify-rtx.c (simplify_const_binary_operation): Same.
4464         * tree-chrec.c (tree_fold_binomial): Same.
4465         * tree-data-ref.c (split_constant_offset_1): Same.
4466         * tree-if-conv.c (idx_within_array_bound): Same.
4467         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4468         * tree-ssa-phiopt.c (minmax_replacement): Same.
4469         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4470         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4471         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4472         * wide-int.cc (wi::add_large): Same.
4473         (wi::mul_internal): Same.
4474         (wi::sub_large): Same.
4475         (wi::divmod_internal): Same.
4476         * wide-int.h: Change overflow type to overflow_type for neg, add,
4477         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4478         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4479         mul_internal, divmod_internal.
4480         (overflow_type): New enum.
4481         (accumulate_overflow): New.
4483 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4485         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4486         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4488 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4490         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4491         argument is checked for zero before entering loop, avoid checking again.
4493 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4495         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4496         * gimplify.h (generic_expr_could_trap_p): Likwise.
4497         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4499 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4501         PR tree-optimization/86401
4502         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4503         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4504         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4505         * fold-const.h (fold_bit_and_mask): Declare.
4506         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4508 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4510         PR target/86324
4511         * target.def (translate_mode_attribute): New hook.
4512         * targhooks.h (default_translate_mode_attribute): Declare.
4513         * targhooks.c (default_translate_mode_attribute): New function.
4514         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4515         * doc/tm.texi: Regenerate.
4516         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4517         (rs6000_translate_mode_attribute): New function.
4519 2018-07-06  Paul Koning  <ni1d@arrl.net>
4521         * doc/md.texi (define_split): Document DONE and FAIL.
4522         (define_peephole2): Ditto.
4524 2018-07-05  Jeff Law  <law@redhat.com>
4526         PR tree-optimization/86010
4527         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4528         both the head and tail of mem* and str* calls.
4530 2018-07-05  Jim Wilson  <jimw@sifive.com>
4532         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4534 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4536         * config/aarch64/aarch64-simd.md: correct flags text for
4537         MIN_EXPR replacement.
4539 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4541         * configure: Regenerated.
4543 2018-07-05  Carl Love  <cel@us.ibm.com>
4545         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4546         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4547         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4548         VSX_BUILTIN_DOUBLEL_V4SF.
4550 2018-07-05  Martin Sebor  <msebor@redhat.com>
4552         PR c++/86400
4553         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4554         than its domain to compute its the upper bound of a char array.
4556 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4558         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4559         * doc/cpp.texi: Update comment.
4560         * doc/tm.texi: Rebuilt.
4561         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4562         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4563         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4564         headers affected by extern "C".
4565         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4566         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4567         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4568         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4569         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4570         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4571         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4572         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4573         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4574         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4575         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4576         config/sparc/sp64-elf.h, config/spu/spu.h,
4577         config/stormy16/stormy16.h, config/v850/v850.h,
4578         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4579         define NO_IMPLICIT_EXTERN_C.
4580         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4582 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4584         PR target/84711
4585         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4586         instead of GET_MODE_SIZE when comparing Units.
4588 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4590         PR target/84711
4591         * rtlanal.c (set_noop_p): Constrain on mode change,
4592         include hard-reg-set.h
4594 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4596         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4598 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4600         Revert
4601         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4603         PR sanitizer/84250
4604         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4605         libasan.
4606         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4608 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4610         PR sanitizer/84250
4611         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4612         libasan.
4613         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4615 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4617         PR middle-end/86380
4618         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4620 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4622         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4623         neg_*_op* variables.
4625 2018-07-04  Martin Liska  <mliska@suse.cz>
4627         * tree-switch-conversion.c: Define
4628         max_ratio_for_speed and max_ratio_for_size constants.
4630 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4631             Martin Liska  <mliska@suse.cz>
4633         PR middle-end/66240
4634         PR target/45996
4635         PR c/84100
4636         * common.opt: Rename align options with 'str_' prefix.
4637         * common/config/i386/i386-common.c (set_malign_value): New
4638         function.
4639         (ix86_handle_option): Use it to set -falign-* options/
4640         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4641         type from int to string.
4642         * config/aarch64/aarch64.c: Update default values from int
4643         to string.
4644         * config/alpha/alpha.c (alpha_override_options_after_change):
4645         Likewise.
4646         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4647         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4648         max skip conditionally.
4649         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4650         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4651         max skip conditionally.
4652         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4653         max skip conditionally.
4654         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4655         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4656         max skip conditionally.
4657         * config/i386/i386.c (struct ptt): Change type from int to
4658         string.
4659         (ix86_default_align): Set default values.
4660         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4661         max skip conditionally.
4662         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4663         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4664         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4665         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4666         max skip conditionally.
4667         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4668         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4669         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4670         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4671         max skip conditionally.
4672         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4673         * config/ia64/ia64.c (ia64_option_override): Set default values
4674         for alignment options.
4675         * config/m68k/m68k.c: Handle new str_align_* options.
4676         * config/mips/mips.c (mips_set_compression_mode): Change
4677         type of constants.
4678         (mips_option_override): Set default values for options.
4679         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4680         Likewise.
4681         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4682         Likewise.
4683         * config/rx/rx.c (rx_option_override): Likewise.
4684         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4685         (LABEL_ALIGN): Use align_labels_log.
4686         (LOOP_ALIGN): Use align_loops_align.
4687         * config/s390/s390.c (s390_asm_output_function_label): Use new
4688         macros.
4689         * config/sh/sh.c (sh_override_options_after_change):
4690         Change type of constants.
4691         * config/spu/spu.c (spu_sched_init): Likewise.
4692         * config/sparc/sparc.c (sparc_option_override): Set default
4693         values for options.
4694         * config/visium/visium.c (visium_option_override): Likewise.
4695         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4696         emit p2align format with last argument if it's not needed.
4697         * doc/invoke.texi: Document extended format of -falign-*.
4698         * final.c: Use align_labels alignment.
4699         * flags.h (struct target_flag_state): Change type to use
4700         align_flags.
4701         (struct align_flags_tuple): New.
4702         (struct align_flags): Likewise.
4703         (align_loops_log): Redefine macro to use new types.
4704         (align_loops_max_skip): Redefine macro to use new types.
4705         (align_jumps_log): Redefine macro to use new types.
4706         (align_jumps_max_skip): Redefine macro to use new types.
4707         (align_labels_log): Redefine macro to use new types.
4708         (align_labels_max_skip): Redefine macro to use new types.
4709         (align_functions_log): Redefine macro to use new types.
4710         (align_loops): Redefine macro to use new types.
4711         (align_jumps): Redefine macro to use new types.
4712         (align_labels): Redefine macro to use new types.
4713         (align_functions): Redefine macro to use new types.
4714         (align_functions_max_skip): Redefine macro to use new types.
4715         (align_loops_value): New macro.
4716         (align_jumps_value): New macro.
4717         (align_labels_value): New macro.
4718         (align_functions_value): New macro.
4719         * function.c (invoke_set_current_function_hook): Propagate
4720         alignment values from flags to global variables default in
4721         topleev.h.
4722         * ipa-icf.c (sem_function::equals_wpa): Use
4723         cl_optimization_option_eq instead of memcmp.
4724         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4725         of string types.
4726         (cl_optimization_stream_in): Likewise.
4727         * optc-save-gen.awk: Support strings in cl_optimization.
4728         * opth-gen.awk: Likewise.
4729         * opts.c (finish_options): Remove error checking of invalid
4730         value ranges.
4731         (MAX_CODE_ALIGN): Remove.
4732         (MAX_CODE_ALIGN_VALUE): Likewise.
4733         (parse_and_check_align_values): New function.
4734         (check_alignment_argument): Likewise.
4735         (common_handle_option): Use check_alignment_argument.
4736         * opts.h (parse_and_check_align_values): Declare.
4737         * toplev.c (init_alignments): Remove.
4738         (read_log_maxskip): New.
4739         (parse_N_M): Likewise.
4740         (parse_alignment_opts): Likewise.
4741         (backend_init_target): Remove usage of init_alignments.
4742         * toplev.h (parse_alignment_opts): Declare.
4743         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4744         argument.
4745         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4746         * tree.c (cl_option_hasher::equal): New.
4747         * varasm.c: Use new global macros.
4749 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4751         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4752         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4753         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4754         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4755         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4756         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4757         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4758         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4759         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4760         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4761         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4762         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4763         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4765 2018-07-04  Martin Liska  <mliska@suse.cz>
4766             Jonathan Wakely  <jwakely@redhat.com>
4768         * coverage.c: Use correct type.
4769         * doc/invoke.texi: Language correction.
4771 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4773         PR target/85620
4774         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4775         ENDBRANCH for non-tail call which may return via indirect branch.
4776         * doc/extend.texi: Document indirect_return attribute.
4778 2018-07-03  Martin Sebor  <msebor@redhat.com>
4780         PR tree-optimization/86274
4781         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4782         precondition.
4783         (format_floating): Correct handling of infinities and NaNs.
4785 2018-07-03  Martin Sebor  <msebor@redhat.com>
4787         * print-tree.c (print_real_cst): New function.
4788         (print_node_brief): Call it.
4789         (print_node): Ditto.
4791 2018-07-03  Jeff Law  <law@redhat.com>
4793         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4794         into a single pattern.
4796         * config/h8300/h8300.md (ors code_iterator): New.
4797         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4798         a single pattern and single splitter.
4799         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4800         (iorqi3_1, xorqi3_1): Likewise.
4801         (iorqi3, xorqi3 expanders): Similarly.
4803         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4804         (movmd_internal) into a single pattern using the P mode iterator.
4805         (movmd splitters): Similarly.
4806         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4807         (movsd splitters): Similarly.
4809         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4810         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4811         right table based on the size of the operand.
4812         * config/h8300/h8300.md (length_table): Corresponding changes. All
4813         references to "addb", "addw" and "addl" changed to "add".
4814         (btst patterns): Merge two variants into a single pattern.
4815         (tstqi, tsthi): Likewise.
4816         (addhi3_incdec, addsi3_incdec): Likewise.
4817         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4818         (mulhi3, mulsi3): Likewise.
4819         (udivhi3, udivsi3): Likewise.
4820         (divhi3, divsi3): Likewise.
4821         (andorqi3, andorhi3, andorsi3): Likewise.
4823 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4825         PR target/85694
4826         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4827         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4829 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4831         PR tree-optimization/85694
4832         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4833         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4834         UNSPEC_URHADD.
4835         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4836         (<u>avg<mode>3_ceil): New patterns.
4838 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4840         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4841         scan-tree-dump directive.
4842         * gcc.dg/vect/slp-perm-2.c: Likewise.
4843         * gcc.dg/vect/slp-perm-3.c: Likewise.
4844         * gcc.dg/vect/slp-perm-5.c: Likewise.
4845         * gcc.dg/vect/slp-perm-6.c: Likewise.
4846         * gcc.dg/vect/slp-perm-7.c: Likewise.
4847         * gcc.dg/vect/slp-perm-8.c: Likewise.
4849 2018-07-03  Marek Polacek  <polacek@redhat.com>
4851         PR middle-end/86202
4852         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4854 2018-07-03  Richard Biener  <rguenther@suse.de>
4856         PR ipa/86389
4857         * tree-ssa-structalias.c (find_func_clobbers): Properly
4858         handle indirect calls.
4860 2018-07-03  Jeff Law  <law@redhat.com>
4862         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4863         (shifts): New code iterator.
4864         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4865         expander.  Fix HImode handling on H8/SX.
4866         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4867         (subqi3, subhi3, subsi3 expanders): Likewise.
4868         (andqi3, andhi3, andsi3 expanders): Likewise.
4869         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4870         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4871         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4872         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4873         (zero_extendqihi2, zero_extendqisi2): Likewise.
4874         (extendqihi2, extendqisi2): Likewise.
4875         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4876         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4877         (rotlqi3_1, rotlhi3_1): Likewise.
4878         (logicalhi3_sn, logicalsi3_sn): Likewise.
4879         (logicalhi3, logicalsi3): Likewise.
4881 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4883         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4884         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4885         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4886         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4887         type to append_pattern_def_seq instead of creating a stmt_vec_info
4888         directly.
4889         (build_mask_conversion): Likewise.  Remove vinfo argument.
4890         (vect_add_conversion_to_patterm): Likewise, renaming to...
4891         (vect_add_conversion_to_pattern): ...this.
4892         (vect_recog_mask_conversion_pattern): Update call to
4893         build_mask_conversion.  Pass the vector type to
4894         append_pattern_def_seq here too.
4895         (vect_recog_gather_scatter_pattern): Update call to
4896         vect_add_conversion_to_pattern.
4898 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4900         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4901         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4902         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4903         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4904         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4905         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4906         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4907         append_pattern_def_seq instead of new_pattern_def_seq.
4908         (vect_recog_divmod_pattern): Do both of the above.
4909         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4910         is null.
4912 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4914         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4915         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4916         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4917         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4918         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4919         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4920         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4921         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4922         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4923         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4924         parameter with a single stmt_vec_info.
4925         (vect_recog_func_ptr): Likewise.
4926         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4927         (vect_try_gather_scatter_pattern): ...this.
4928         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4929         the stmt_vec_info of the statement to be matched.  Don't clear
4930         STMT_VINFO_RELATED_STMT.
4931         (vect_pattern_recog): Update call accordingly.
4933 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4935         PR tree-optimization/85694
4936         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4937         (uavgM3_ceil): Document new optabs.
4938         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4939         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4940         functions.
4941         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4942         (savg_ceil_optab): New optabs.
4943         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4944         (vect_vect_recog_func_ptrs): Add it.
4945         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4946         constant directly from the associated lhs.
4948 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4950         * tree-vect-patterns.c (vect_split_statement): New function.
4951         (vect_convert_input): Use it to try to split an existing cast.
4953 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4955         * poly-int.h (print_hex): New function.
4956         * dumpfile.h (dump_dec, dump_hex): Declare.
4957         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4958         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4959         min_input_precision, operation_precision and operation_sign.
4960         * tree-vect-patterns.c (vect_get_range_info): New function.
4961         (vect_same_loop_or_bb_p, vect_single_imm_use)
4962         (vect_operation_fits_smaller_type): Delete.
4963         (vect_look_through_possible_promotion): Add an optional
4964         single_use_p parameter.
4965         (vect_recog_over_widening_pattern): Rewrite to use new
4966         stmt_vec_info infomration.  Handle one operation at a time.
4967         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4968         (vect_truncatable_operation_p, vect_set_operation_type)
4969         (vect_set_min_input_precision): New functions.
4970         (vect_determine_min_output_precision_1): Likewise.
4971         (vect_determine_min_output_precision): Likewise.
4972         (vect_determine_precisions_from_range): Likewise.
4973         (vect_determine_precisions_from_users): Likewise.
4974         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4975         (vect_vect_recog_func_ptrs): Put over_widening first.
4976         Add cast_forwprop.
4977         (vect_pattern_recog): Call vect_determine_precisions.
4979 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4981         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4982         statements that have been replaced by further pattern statements.
4983         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4985 2018-07-03  Richard Biener  <rguenther@suse.de>
4987         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4988         always set *dt.  Dump vectype in vectype overload.
4989         * dumpfile.h (dump_gimple_expr): New function.
4990         (dump_gimple_expr_loc): Likewise.
4991         * dumpfile.c (dump_gimple_expr): New function.
4992         (dump_gimple_expr_loc): Likewise.
4994 2018-07-02  Jeff Law  <law@redhat.com>
4996         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4997         the H8/300, H8/300H and H8/S variants into a single pattern.
4998         (movhi_h8300, movqi_h8300hs): Similarly.
4999         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
5000         (QHI mode iterator): New.
5002         * config/h8300/h8300.md: Remove trailing whitespace.
5004 2018-07-02  Jim Wilson  <jimw@sifive.com>
5006         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
5007         instead of emit_insn for interrupt returns.
5008         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
5009         (riscv_sret, riscv_uret): Likewise.
5011 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5013         * pretty-print.c (selftest::test_pp_format): Move save and restore
5014         of quotes to class auto_fix_quotes, and add an instance.
5015         * selftest.c: Include "intl.h".
5016         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
5017         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
5018         * selftest.h (selftest::auto_fix_quotes): New class.
5020 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
5022         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
5023         (aarch64_sve_prepare_conditional_op): Remove.
5024         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
5025         Allow aarch64_simd_reg_or_zero as select operand; remove
5026         the aarch64_sve_prepare_conditional_op call.
5027         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
5028         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5029         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
5030         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
5031         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
5032         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
5033         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
5034         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
5035         and a splitters to match all of the *_any patterns.
5036         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
5038         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
5039         (SVE_COND_FP_BINARY_REV): Remove.
5040         (sve_int_op_rev, sve_fp_op_rev): New.
5041         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
5042         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
5043         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5044         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5045         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5046         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5047         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5048         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5049         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5051         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5052         Remove match_dup 1 from the inner unspec.
5053         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5055         * config/aarch64/aarch64.md (movprfx): New attr.
5056         (length): Default movprfx to 8.
5057         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5058         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5059         (*<su>mul<SVE_I>3_highpart): Likewise.
5060         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5061         (*v<ASHIFT><SVE_I>3): Likewise.
5062         (*<su><MAXMIN><SVE_I>3): Likewise.
5063         (*<su><MAXMIN><SVE_F>3): Likewise.
5064         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5065         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5066         (*div<SVE_F>4): Likewise.
5068 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5070         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5071         in dump string.
5073 2018-07-02  Richard Biener  <rguenther@suse.de>
5075         PR tree-optimization/86363
5076         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5077         memset argument refers to a non-variable address.
5079 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5081         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5082         {PLUS,MINUS}_EXPR code to...
5083         (adjust_symbolic_bound): ...here,
5084         (combine_bound): ...here,
5085         (set_value_range_with_overflow): ...and here.
5087 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5089         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5090         code...
5091         (extract_range_from_abs_expr): ...here.
5093 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5095         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5096         -fno-omit-frame-pointer when not optimizing.
5098 2018-07-02  Martin Liska  <mliska@suse.cz>
5100         PR ipa/86279
5101         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5102         (propagate_nothrow): Likewise.
5104 2018-07-02  Martin Liska  <mliska@suse.cz>
5106         PR ipa/86323
5107         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5109 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5111         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5112         function in r262149, changing "loc" param from source_location to
5113         const dump_location_t &.
5114         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5115         declaration, as above.
5117 2018-07-01  Paul Koning  <ni1d@arrl.net>
5119         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5120         -munit-asm, -mgnu-asm, -mdec-asm.
5121         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5122         (pdp11_output_labelref): New.
5123         (pdp11_output_def): New.
5124         (pdp11_output_addr_vec_elt): New.
5125         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5126         %# and %@ format codes.
5127         (pdp11_option_override): New.
5128         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5129         (pdp11_output_ident): New.
5130         (pdp11_asm_named_section): New.
5131         (pdp11_asm_init_sections): New.
5132         (pdp11_file_start): New.
5133         (pdp11_file_end): New.
5134         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5135         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5136         %o, like %c but octal.
5137         (pdp11_option_override): New.
5138         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5139         -mdec-asm.
5140         (DATA_SECTION_ASM_OP): Ditto.
5141         (READONLY_DATA_SECTION_ASM_OP): New.
5142         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5143         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5144         (ASM_OUTPUT_LABELREF): Ditto.
5145         (ASM_OUTPUT_DEF): Ditto.
5146         (ASM_OUTPUT_EXTERNAL): New.
5147         (ASM_OUTPUT_SOURCE_FILENAME): New.
5148         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5149         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5150         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5151         %# and %@ format codes.
5152         * config/pdp11/pdp11.opt (mgnu-asm): New.
5153         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5154         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5155         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5157 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5159         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5160         dereferencing path[] beyond its length.
5161         (debug_path): New.
5162         (debug_all_paths): New.
5163         (rewire_first_differing_edge): New.
5164         (adjust_paths_after_duplication): New.
5165         (duplicate_thread_path): Call adjust_paths_after_duplication.
5166         Add new argument.
5167         (thread_through_all_blocks): Add new argument to
5168         duplicate_thread_path.
5170 2018-06-30  Jim Wilson  <jimw@sifive.com>
5172         * config/riscv/predicates.md (p2m1_shift_operand): New.
5173         (high_mask_shift_operand): New.
5174         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5175         pattern using p2m1_shift_operand.
5176         (lshsi3_zero_extend_3+2): New combiner pattern using
5177         high_mask_shift_operand.
5179 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5181         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5182         split out from...
5183         (vect_recog_rotate_pattern): ...here.
5184         (vect_convert_input): Try to insert casts of invariants in the
5185         preheader.
5186         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5187         preheader to be empty.
5189 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5191         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5192         vector type.  If given, install it in the new statement's
5193         STMT_VINFO_VECTYPE.
5194         (vect_element_precision): New function.
5195         (vect_unpromoted_value): New struct.
5196         (vect_unpromoted_value::vect_unpromoted_value): New function.
5197         (vect_unpromoted_value::set_op): Likewise.
5198         (vect_look_through_possible_promotion): Likewise.
5199         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5200         (vect_widened_op_tree, vect_convert_input): Likewise.
5201         (vect_convert_inputs, vect_convert_output): Likewise.
5202         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5203         to handle the optional cast of the multiplication result and
5204         vect_widened_op_tree to detect the widened multiplication itself.
5205         Do not require the input and output of promotion casts to have
5206         the same sign, but base the signedness of the operation on the
5207         input rather than the result.  If the pattern includes two
5208         promotions, check that those promotions have the same sign.
5209         Do not restrict the MULT_EXPR handling to a double-width result;
5210         handle quadruple-width results and wider.  Use vect_convert_inputs
5211         to convert the inputs to the common type.
5212         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5213         to handle the optional cast of the ABS result.  Also allow a sign
5214         change or a sign extension between the ABS and MINUS.
5215         Use vect_widened_op_tree to detect the widened subtraction and use
5216         vect_convert_inputs to convert the inputs to the common type.
5217         (vect_handle_widen_op_by_const): Delete.
5218         (vect_recog_widen_op_pattern): New function.
5219         (vect_recog_widen_mult_pattern): Use it.
5220         (vect_recog_widen_shift_pattern): Likewise.
5221         (vect_recog_widen_sum_pattern): Use
5222         vect_look_through_possible_promotion to handle the promoted
5223         PLUS_EXPR operand.
5225 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5227         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5228         the containing gimple_seq *.
5229         * gimple-iterator.h (gsi_for_stmt): Declare it.
5230         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5231         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5232         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5233         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5234         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5235         checks.
5236         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5237         split out from...
5238         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5239         statement being replaced is part of an existing pattern
5240         definition sequence, inserting the new pattern statements before
5241         the original one.
5242         (vect_pattern_recog_1): Don't return a bool.  If the statement
5243         is already part of a pattern, instead apply pattern matching
5244         to the pattern definition statements.  Don't clear the
5245         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5246         (vect_pattern_recog): Don't break after the first match;
5247         continue processing the pattern definition statements instead.
5248         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5250 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5252         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5253         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5254         (vect_recog_widen_sum_pattern): Use it.
5256 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5258         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5259         phi is not a pattern statement and has not been replaced by
5260         a pattern statement.
5261         * tree-vect-patterns.c (type_conversion_p): Don't check
5262         STMT_VINFO_IN_PATTERN_P.
5263         (vect_recog_vector_vector_shift_pattern): Likewise.
5264         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5265         the pattern statement rather than the original statement; check
5266         directly for a WIDEN_MULT_EXPR here.
5267         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5268         vect_is_simple_use to return the pattern statement rather
5269         than the original statement; use is_pattern_stmt_p to check
5270         for such a pattern statement.
5271         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5272         to return the pattern statement rather than the original statement;
5273         don't do the same transformation here.
5274         (vect_is_simple_use): If the defining statement has been replaced
5275         by a pattern statement, return the pattern statement instead.
5276         Remove the corresponding (local) transformation from the vectype
5277         overload.
5279 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5281         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5282         end and default to null.
5283         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5284         (vectorizable_reduction): Update calls accordingly, dropping the
5285         gimple ** argument if the passed-back statement isn't needed.
5286         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5287         (vect_recog_rotate_pattern): Likewise.
5288         (vect_recog_mask_conversion_pattern): Likewise.
5289         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5290         (vect_mask_constant_operand_p): Likewise.
5291         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5292         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5293         (get_group_load_store_type, get_load_store_type): Likewise.
5294         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5295         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5296         (vectorizable_conversion, vectorizable_assignment): Likewise.
5297         (vectorizable_shift, vectorizable_operation): Likewise.
5298         (vectorizable_store, vect_is_simple_cond): Likewise.
5299         (vectorizable_condition, vectorizable_comparison): Likewise.
5300         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5301         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5302         and move it to the end.  Cope with null def_stmt_outs.
5304 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5306         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5308 2018-06-29  Jeff Law  <law@redhat.com>
5310         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5311         displacements for TARGET_V850E2V3 and newer.
5312         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5313         * config/v850/v850.md (sign23byte_load): Remove.
5314         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5315         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5317 2018-06-29  Martin Liska  <mliska@suse.cz>
5319         PR lto/85759
5320         * coverage.c (coverage_init): Mangle full path name.
5321         * doc/invoke.texi: Document the change.
5322         * gcov-io.c (mangle_path): New.
5323         * gcov-io.h (mangle_path): Likewise.
5324         * gcov.c (mangle_name): Use mangle_path for path mangling.
5326 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5328         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5329         if starting source register is not even.
5331 2018-06-29  Martin Liska  <mliska@suse.cz>
5333         PR tree-optimization/86263
5334         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5335         Make edge redirection.
5337 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5339         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5340         (dump_scope_depth): New variable.
5341         (get_dump_scope_depth): New function.
5342         (dump_begin_scope): New function.
5343         (dump_end_scope): New function.
5344         * dumpfile.h (get_dump_scope_depth): New declaration.
5345         (dump_begin_scope): New declaration.
5346         (dump_end_scope): New declaration.
5347         (class auto_dump_scope): New class.
5348         (AUTO_DUMP_SCOPE): New macro.
5349         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5350         AUTO_DUMP_SCOPE.
5352 2018-06-29  Richard Biener  <rguenther@suse.de>
5354         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5355         compute_all_dependences succeeds.
5356         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5357         exceed --param loop-max-datarefs-for-datadeps.
5359 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5361         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5363 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5365         PR target/86348
5366         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5367         alternative 0 in preferred_for_speed attribute.
5369 2018-06-28  Paul Koning  <ni1d@arrl.net>
5371         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5372         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5373         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5374         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5375         for shift insn patterns.
5377 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5379         * cgraph.c (cgraph_node::get_body): Replace assignments to
5380         "dump_file" with calls to set_dump_file.
5381         * dumpfile.c (alt_dump_file): Make static, and group with...
5382         (alt_flags): ...this definition.
5383         (dumps_are_enabled): New variable.
5384         (refresh_dumps_are_enabled): New function.
5385         (set_dump_file): New function.
5386         (set_alt_dump_file): New function.
5387         (gcc::dump_manager::dump_start): Replace assignments to
5388         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5389         set_alt_dump_file.
5390         (gcc::dump_manager::dump_finish): Likewise.
5391         * dumpfile.h (alt_dump_file): Delete decl.
5392         (dumps_are_enabled): New variable decl.
5393         (set_dump_file): New function decl.
5394         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5395         global.
5396         * tree-nested.c (lower_nested_functions): Replace assignments to
5397         "dump_file" with calls to set_dump_file.
5399 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5401         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5402         goto_locus of each outgoing edge of each basic block.
5404 2018-06-28  Richard Biener  <rguenther@suse.de>
5406         * dwarf2out.c (decl_scope_table): Remove.
5407         (push_decl_scope): Likewise.
5408         (pop_decl_scope): Likewise.
5409         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5410         (gen_struct_or_union_type_die): Likewise.
5411         (gen_tagged_type_die): Likewise.
5412         (dwarf2out_init): Do not initialize decl_scope_table.
5413         (dwarf2out_c_finalize): Do not free it.
5415 2018-06-28  Richard Biener  <rguenther@suse.de>
5417         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5418         deciding whether to not re-use a DIE.
5420 2018-06-28  Richard Biener  <rguenther@suse.de>
5422         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5423         DW_AT_abstract_origin attribute.
5425 2018-06-28  Martin Liska  <mliska@suse.cz>
5427         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5428         Use newly introduced constants.
5429         * tree-switch-conversion.h (struct jump_table_cluster):
5430         Define max_ratio_for_size and max_ratio_for_speed.
5432 2018-06-28  Martin Liska  <mliska@suse.cz>
5434         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5435         Add new checking assert to catch invalid state.
5436         (jump_table_cluster::can_be_handled): Handle single case
5437         clusters.
5438         (jump_table_cluster::is_beneficial): Bail out for such case.
5439         (bit_test_cluster::find_bit_tests):
5440         Add new checking assert to catch invalid state.
5441         (bit_test_cluster::can_be_handled): Handle single case
5442         clusters.
5443         (bit_test_cluster::is_beneficial): Bail out for such case.
5444         (switch_decision_tree::analyze_switch_statement):
5445         Fix comment.
5447 2018-06-28  Martin Liska  <mliska@suse.cz>
5449         * common.opt: Introduce -completion option.
5450         * gcc.c (driver_handle_option): Handle it.
5451         (driver::main): Print completions if completion
5452         is set.
5453         * opt-suggestions.c (option_proposer::get_completions):
5454         New function.
5455         (option_proposer::suggest_completion): Likewise.
5456         (option_proposer::find_param_completions): Likewise.
5457         (verify_autocompletions): Likewise.
5458         (test_completion_valid_options): Likewise.
5459         (test_completion_valid_params): Likewise.
5460         (in_completion_p): Likewise.
5461         (empty_completion_p): Likewise.
5462         (test_completion_partial_match): Likewise.
5463         (test_completion_garbage): Likewise.
5464         (opt_proposer_c_tests): Likewise.
5465         * opt-suggestions.h: Declare new functions.
5466         * opts.c (common_handle_option): Handle OPT__completion_.
5467         * selftest-run-tests.c (selftest::run_tests): Add
5468         opt_proposer_c_tests.
5469         * selftest.c (assert_str_startswith): New.
5470         * selftest.h (assert_str_startswith): Likewise.
5471         (opt_proposer_c_tests): New.
5472         (ASSERT_STR_STARTSWITH): Likewise.
5474 2018-06-28  Martin Liska  <mliska@suse.cz>
5476         * Makefile.in: Add opt-suggestions.o.
5477         * gcc-main.c: Include opt-suggestions.h.
5478         * gcc.c (driver::driver): Likewise.
5479         (driver::~driver): Remove m_option_suggestions.
5480         (driver::build_option_suggestions): Moved to option_proposer.
5481         (driver::suggest_option): Likewise.
5482         (driver::handle_unrecognized_options): Use option_proposer.
5483         * gcc.h (class driver): Add new memver m_option_proposer.
5484         * opt-suggestions.c: New file.
5485         * opt-suggestions.h: New file.
5487 2018-06-28  Martin Liska  <mliska@suse.cz>
5489         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5490         (auto_string_vec::~auto_string_vec): Likewise.
5492 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5494         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5495         prevent_decl_creation_for_types fields up and add reset_location field.
5496         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5497         statement if id->reset_location is true.
5498         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5499         id->reset_location is true.
5500         (copy_phis_for_bb): Force input_location on the arguments if
5501         id->reset_location is true.
5502         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5503         is set on the function to be inlined.
5505 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5507         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5509 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5511         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5512         registers for Pmode.
5513         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5514         hard registers for the clobbered pseudo.
5516 2018-06-27  Paul Koning  <ni1d@arrl.net>
5518         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5519         mutually exclusive options.
5520         * config/pdp11/constraints.md (h): New constraint.
5521         (O): Update definition to match shift code generation.
5522         (D): New constraint.
5523         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5524         (CCFP): Remove.
5525         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5526         function.
5527         (output_jump): Change arguments.
5528         (pdp11_fixed_cc_regs): New function.
5529         (pdp11_cc_mode): Ditto.
5530         (pdp11_expand_shift): Ditto.
5531         (pdp11_assemble_shift): Ditto.
5532         (pdp11_small_shift): Ditto.
5533         (pdp11_branch_cost): Remove.
5534         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5535         from output.
5536         (pdp11_register_move_cost): Update for CC registers.
5537         (pdp11_rtx_costs): Add case for LSHIFTRT.
5538         (pdp11_output_jump): Add CCNZ mode conditional branches.
5539         (notice_update_cc_on_set): Remove.
5540         (pdp11_cc_mode): New function.
5541         (simple_memory_operand): Correct pre/post decrement case.
5542         (no_side_effect_operand): New function.
5543         (pdp11_regno_reg_class): Add CC_REGS class.
5544         (pdp11_fixed_cc_regs): New function.
5545         (pdp11_small_shift): New function.
5546         (pdp11_expand_shift): New function to expand shift insns.
5547         (pdp11_assemble_shift): New function to output shifts.
5548         (pdp11_branch_cost): Remove.
5549         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5550         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5551         (WCHAR_TYPE): Ditto.
5552         (PTRDIFF_TYPE): Ditto.
5553         (ADJUST_INSN_LENGTH): New macro.
5554         (FIXED_REGISTERS): Add CC registers.
5555         (CALL_USED_REGISTERS): Ditto.
5556         (reg_class): Ditto.
5557         (REG_CLASS_NAMES): Ditto.
5558         (REG_CLASS_CONTENTS): Ditto.
5559         (SELECT_CC_MODE): Use new function.
5560         (TARGET_FLAGS_REGNUM): New macro.
5561         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5562         (cc0_reg_rtx): Remove.
5563         (CC_STATUS_MDEP): Remove.
5564         (CC_STATUS_MDEFP_INIT): Remove.
5565         (CC_IN_FPU): Remove.
5566         (NOTICE_UPDATE_CC): Remove.
5567         (REGISTER_NAMES): Add CC registers.
5568         (BRANCH_COST): Change to constant 1.
5569         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5570         handling.
5571         * config/pdp11/pdp11.opt (mbcopy): Remove.
5572         (mbcopy-builtin): Remove.
5573         (mbranch-cheap): Remove.
5574         (mbranch-expensive): Remove.
5575         * config/pdp11/predicates.md (expand_shift_operand): Update to
5576         match shift code generation.
5577         (ccnz_operator): New predicate.
5578         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5579         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5580         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5581         exclusive options.
5582         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5583         description of O constraint.
5585 2018-06-27  Jeff Law  <law@redhat.com>
5586             Austin Law  <austinklaw@gmail.com>
5588         * config/v850/v850.md (addsi3_set_flags): New pattern.
5589         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5590         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5591         (zero_extendhisi2_v850_set_flags): Likewise.
5592         (zero_extendqisi2_v850_set_flags): Likewise.
5593         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5594         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5595         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5597         * config/v850/v850-protos.h (notice_update_cc): Remove.
5598         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5599         (v850_print_operand): Handle 'D' and "d".
5600         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5601         Add handling of arithmetic/logical operations compared against zero.
5602         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5603         Do not look at v850_compare_op, instead get mode from last argument.
5604         (v850_gen_compare): Remove
5605         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5606         after reload for prologue insns.
5607         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5608         patterns.
5609         (construct_save_jarl): Likewise.
5610         (TARGET_FLAGS_REGNUM): Define.
5611         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5612         (NOTICE_UPDATE_CC): Remove.
5613         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5614         than cc0.  Conditionalize on reload_completed.
5615         (cmpsi_insn, setfcc_insn): Likewise.
5616         (tst1 splitter): Turn into define_and_split which sets the flags
5617         after reload.
5618         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5619         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5620         (cstoresf4, cstoredf4): Clobber the flags.
5621         (cmpsi, cmpsf, cmpdf): Remove expanders.
5622         (setf_insn): Remove pattern.
5623         (addsi3): Turn into define_and_split which clobbers the flags after
5624         reload and a suitable pattern (addsi3_clobber_flags) for use after
5625         reload.
5626         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5627         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5628         (ashrsi3, ashrsi3_v850e2): Likewise.
5629         (bins): Clobber the flags.
5630         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5631         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5632         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5633         (call_value_internal_short, call_value_internal_long): Likewise.
5634         (callt_save_interrupt, callt_return_interrupt): Likewise.
5635         (save_interrupt, return_interrupt): Likewise.
5636         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5637         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5638         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5639         (All FP comparisons): Only allow after reload has completed.
5640         (trfsr): Likewise.
5641         (divh, divhu): Tweak output template.
5642         (branch_z_normal, branch_z_invert): Remove
5643         (branch_nz_normal, branch_nz_invert): Likewise.
5644         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5646         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5647         * config/v850/v850.c (notice_update_cc): Remove.
5648         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5649         (CC_NO_CARRY): Likewise.
5650         (NOTICE_UPDATE_CC): Define to nothing.
5651         * config/v850/v850.md: Remove block comment on cc0 handling
5652         Remove "cc" attribute from all patterns.  Remove cc_status handling
5653         from all patterns.  Minor formatting fixes.
5655 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5657         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5658         (cortex-a76.cortex-a55): Likewise.
5659         * config/aarch64/aarch64-tune.md: Regenerate.
5660         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5661         cortex-a76.cortex-a55.
5663 2018-06-27  Jeff Law  <law@redhat.com>
5665         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5666         (MULTILIB_DIRNAMES): Similarly.
5668 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5670         * gimple.h (gimple_return_retbnd): Delete.
5671         (gimple_return_set_retbnd): Likewise.
5672         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5673         gimple_return_set_retbnd.
5674         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5675         gimple_return_retbnd and adjust.
5676         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5677         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5678         Explicitly return NULL in a couple more cases.  Move assertion
5679         on debug statements and remove unreachable code.
5680         (reset_debug_binding): Do not test id->retbnd.
5681         (expand_call_inline): Do not set it.
5683 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5685         * configure.ac: Add --disable-gcov option.
5686         * configure: Regenerate.
5687         * Makefile.in: Honour @enable_gcov@.
5688         * doc/install.texi: Document --disable-gcov.
5690 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5692         * config/arm/arm-cpus.in (cortex-a76): New entry.
5693         (cortex-a76.cortex-a55): Likewise.
5694         * config/arm/arm-tables.opt: Regenerate.
5695         * config/arm/arm-tune.md: Likewise.
5696         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5697         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5698         cortex-a76.cortex-a55.
5700 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5702         PR target/85769
5703         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5705 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5707         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5708         comment.
5709         (EPILOGUE_USES): Likewise.
5711 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5713         * tree-inline.c (remap_location): New function extracted from...
5714         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5715         (copy_phis_for_bb): ...here.  Call remap_location.
5716         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5718 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5720         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5721         unaligned vsx for 16B memset.
5723 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5725         PR target/86285
5726         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5727         ieee128_float_type_node to long_double_type_node unless
5728         TARGET_LONG_DOUBLE_128 is set.
5730 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5732         * cfgloop.c (get_loop_location): Convert return type from
5733         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5734         by implicit construction from rtx_insn *, and using
5735         dump_user_location_t::from_function_decl for the fallback case.
5736         * cfgloop.h (get_loop_location): Convert return type from
5737         location_t to dump_user_location_t.
5738         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5739         dump_printf_loc to pass in a dump_location_t rather than a
5740         location_t, via the gimple stmt.
5741         * coverage.c (get_coverage_counts): Update calls to
5742         dump_printf_loc to pass in dump_location_t rather than a
5743         location_t.
5744         * doc/optinfo.texi (Dump types): Convert example of
5745         dump_printf_loc from taking "locus" to taking "insn".  Update
5746         description of the "_loc" calls to cover dump_location_t.
5747         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5748         "selftest.h".
5749         (dump_user_location_t::dump_user_location_t): New constructors,
5750         from gimple *stmt and rtx_insn *.
5751         (dump_user_location_t::from_function_decl): New function.
5752         (dump_loc): Make static.
5753         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5754         const dump_location_t &.
5755         (dump_generic_expr_loc): Delete.
5756         (dump_printf_loc): Convert param "loc" from location_t to
5757         const dump_location_t &.
5758         (selftest::test_impl_location): New function.
5759         (selftest::dumpfile_c_tests): New function.
5760         * dumpfile.h: Include "profile-count.h".
5761         (class dump_user_location_t): New class.
5762         (struct dump_impl_location_t): New struct.
5763         (class dump_location_t): New class.
5764         (dump_printf_loc): Convert 2nd param from source_location to
5765         const dump_location_t &.
5766         (dump_generic_expr_loc): Delete.
5767         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5768         const dump_location_t &.
5769         * gimple-fold.c (fold_gimple_assign): Update call to
5770         dump_printf_loc to pass in a dump_location_t rather than a
5771         location_t, via the gimple stmt.
5772         (gimple_fold_call): Likewise.
5773         * gimple-loop-interchange.cc
5774         (loop_cand::analyze_iloop_reduction_var): Update for change to
5775         check_reduction_path.
5776         (tree_loop_interchange::interchange): Update for change to
5777         find_loop_location.
5778         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5779         change in return-type of find_loop_location.
5780         (graphite_regenerate_ast_isl): Likewise.
5781         * graphite-optimize-isl.c (optimize_isl): Likewise.
5782         * graphite.c (graphite_transform_loops): Likewise.
5783         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5784         pass in a dump_location_t rather than a location_t, via the
5785         gimple stmt.
5786         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5787         * ipa.c (walk_polymorphic_call_targets): Likewise.
5788         * loop-unroll.c (report_unroll): Convert "locus" param from
5789         location_t to dump_location_t.
5790         (decide_unrolling): Update for change to get_loop_location's
5791         return type.
5792         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5793         location_t to dump_user_location_t.
5794         (grid_find_single_omp_among_assignments_1): Updates calls to
5795         dump_printf_loc to pass in a dump_location_t rather than a
5796         location_t, via the gimple stmt.
5797         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5798         location_t to dump_location_t.  Updates calls to dump_printf_loc
5799         to pass in a dump_location_t rather than a location_t, via the
5800         gimple stmt.
5801         (grid_inner_loop_gridifiable_p): Likewise.
5802         (grid_dist_follows_simple_pattern): Likewise.
5803         (grid_gfor_follows_tiling_pattern): Likewise.
5804         (grid_target_follows_gridifiable_pattern): Likewise.
5805         (grid_attempt_target_gridification): Convert initialization
5806         of local "grid" from memset to zero-initialization; FIXME: does
5807         this require C++11?  Update call to dump_printf_loc to pass in a
5808         optinfo_location rather than a location_t, via the gimple stmt.
5809         * profile.c (read_profile_edge_counts): Updates call to
5810         dump_printf_loc to pass in a dump_location_t rather than a
5811         location_t
5812         (compute_branch_probabilities): Likewise.
5813         * selftest-run-tests.c (selftest::run_tests): Call
5814         dumpfile_c_tests.
5815         * selftest.h (dumpfile_c_tests): New decl.
5816         * tree-loop-distribution.c (pass_loop_distribution::execute):
5817         Update for change in return type of find_loop_location.
5818         * tree-parloops.c (parallelize_loops): Likewise.
5819         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5820         "locus" from location_t to dump_user_location_t.
5821         (canonicalize_loop_induction_variables): Likewise.
5822         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5823         for change in return type of find_loop_location.
5824         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5825         to dump_printf_loc to pass in a dump_location_t rather than a
5826         location_t, via the stmt.
5827         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5828         Likewise.
5829         * tree-vect-loop-manip.c (find_loop_location): Convert return
5830         type from source_location to dump_user_location_t.
5831         (vect_do_peeling): Update for above change.
5832         (vect_loop_versioning): Update for change in type of
5833         vect_location.
5834         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5835         from location_t to dump_user_location_t.
5836         (vect_estimate_min_profitable_iters): Update for change in type
5837         of vect_location.
5838         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5839         location_t to dump_location_t.
5840         (vect_slp_bb): Update for change in type of vect_location.
5841         * tree-vectorizer.c (vect_location): Convert from source_location
5842         to dump_user_location_t.
5843         (try_vectorize_loop_1): Update for change in vect_location's type.
5844         (vectorize_loops): Likewise.
5845         (increase_alignment): Likewise.
5846         * tree-vectorizer.h (vect_location): Convert from source_location
5847         to dump_user_location_t.
5848         (find_loop_location): Convert return type from source_location to
5849         dump_user_location_t.
5850         (check_reduction_path): Convert 1st param from location_t to
5851         dump_user_location_t.
5852         * value-prof.c (check_counter): Update call to dump_printf_loc to
5853         pass in a dump_user_location_t rather than a location_t; update
5854         call to error_at for change in type of "locus".
5855         (check_ic_target): Update call to dump_printf_loc to
5856         pass in a dump_user_location_t rather than a location_t, via the
5857         call_stmt.
5859 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5861         * config/s390/s390.h (enum processor_flags): Do not use
5862         default tune parameter when -march was specified.
5864 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5866         PR target/86314
5867         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5868         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5869         operands.
5871 2018-06-26  Richard Biener  <rguenther@suse.de>
5873         PR tree-optimization/86287
5874         PR bootstrap/86316
5875         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5876         (vect_analyze_loop): Initialize n_stmts.
5878 2018-06-26  Richard Biener  <rguenther@suse.de>
5880         PR middle-end/86271
5881         * fold-const.c (fold_convertible_p): Pointer extension
5882         isn't valid.
5884 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5886         PR debug/86064
5887         * dwarf2out.c (loc_list_has_views): Adjust comments.
5888         (dw_loc_list): Split single cross-partition range with
5889         nonzero locview.
5891 2018-06-25  Jeff Law  <law@redhat.com>
5893         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5894         on -mbig-switch by default.
5896         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5897         test.
5898         (const_float_0_operand): Remove unused predicate.
5899         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5900         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5901         (recipsf2): New expander.  Original pattern now called
5902         (recipsf2_insn).
5903         (recipdf2, recipdf2_insn): Similarly.
5904         (rsqrtsf2, rsqrtsf2_insn): Similarly
5905         (rsqrtdf2, rsqrtdf2_insn): Similarly
5907 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5909         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5910         Simplify logic for FreeBSD (twice).
5912 2018-06-25  Martin Sebor  <msebor@redhat.com>
5914         PR tree-optimization/86204
5915         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5916         a strnlen result if it's less than the length of the string.
5918 2018-06-25  Martin Sebor  <msebor@redhat.com>
5920         PR tree-optimization/85700
5921         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5922         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5923         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5925 2018-06-25  Martin Sebor  <msebor@redhat.com>
5927         * doc/extend.texi (Zero-length arrays): Update and clarify.
5929 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5931         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5932         added IEEE/IBM long double multilib support on PowerPC little
5933         endian Linux systems.
5934         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5935         (MULTILIB_DEFAULTS): Likewise.
5936         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5937         Likewise.
5938         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5939         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5940         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5942 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5944         PR middle-end/86311
5945         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5946         (REORDER_45): Likewise.
5948 2018-06-25  Jeff Law  <law@redhat.com>
5950         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5951         dividend to 32 bits.  Adjust length.
5952         (udivmodhi4): Cleanup output template.  Fix length.
5954 2018-06-25  Carl Love  <cel@us.ibm.com>
5956         * config/rs6000/vsx.md: Change word selector to prefered location.
5958 2018-06-25  Richard Biener  <rguenther@suse.de>
5960         PR tree-optimization/86304
5961         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5962         epilogue-if-converted loops as well.
5964 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5966         * lto-section-out.c (lto_begin_section): Do not print section
5967         name for noaddr and unnumbered dumps.
5969 2018-06-25  Richard Biener  <rguenther@suse.de>
5971         * tree-vectorizer.h (struct vec_info_shared): New structure
5972         with parts split out from struct vec_info and loop_nest from
5973         struct _loop_vec_info.
5974         (struct vec_info): Adjust accordingly.
5975         (struct _loop_vec_info): Likewise.
5976         (LOOP_VINFO_LOOP_NEST): Adjust.
5977         (LOOP_VINFO_DATAREFS): Likewise.
5978         (LOOP_VINFO_DDRS): Likewise.
5979         (struct _bb_vec_info): Likewise.
5980         (BB_VINFO_DATAREFS): Likewise.
5981         (BB_VINFO_DDRS): Likewise.
5982         (struct _stmt_vec_info): Add dr_aux member.
5983         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5984         (DR_MISALIGNMENT_UNINITIALIZED): New.
5985         (set_dr_misalignment): Adjust.
5986         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5987         (vect_analyze_loop): Adjust prototype.
5988         (vect_analyze_loop_form): Likewise.
5989         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5990         Compute dependences lazily.
5991         (vect_record_base_alignments): Use shared datarefs/ddrs.
5992         (vect_verify_datarefs_alignment): Likewise.
5993         (vect_analyze_data_refs_alignment): Likewise.
5994         (vect_analyze_data_ref_accesses): Likewise.
5995         (vect_analyze_data_refs): Likewise.
5996         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5997         constructor parameter for shared part.
5998         (vect_analyze_loop_form): Pass in shared part and adjust.
5999         (vect_analyze_loop_2): Pass in storage for the number of
6000         stmts.  Move loop nest finding to the caller.  Compute
6001         datarefs lazily.
6002         (vect_analyze_loop): Pass in shared part.
6003         (vect_transform_loop): Verify shared datarefs are unchanged.
6004         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
6005         constructor parameter for shared part.
6006         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
6007         (vect_slp_bb): Verify shared datarefs are unchanged before
6008         transform.
6009         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
6010         change.
6011         (new_stmt_vec_info): Initialize DR_AUX misalignment to
6012         DR_MISALIGNMENT_UNINITIALIZED.
6013         * tree-vectorizer.c (vec_info::vec_info): Add constructor
6014         parameter for shared part.
6015         (vec_info::~vec_info): Adjust.
6016         (vec_info_shared::vec_info_shared): New.
6017         (vec_info_shared::~vec_info_shared): Likewise.
6018         (vec_info_shared::save_datarefs): Likewise.
6019         (vec_info_shared::check_datarefs): Likewise.
6020         (try_vectorize_loop_1): Construct shared part live for analyses
6021         of a single loop for multiple vector sizes.
6022         * tree-parloops.c (gather_scalar_reductions): Adjust.
6024 2018-06-25  Richard Biener  <rguenther@suse.de>
6026         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
6027         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
6028         (vect_analyze_data_refs): Remove similar code from here and
6029         simplify accordingly.
6031 2018-06-25  Richard Biener  <rguenther@suse.de>
6033         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
6034         for reverse storage order accesses rather than asserting
6035         they cannot happen here.
6037 2018-06-25  Tom de Vries  <tdevries@suse.de>
6039         PR debug/86257
6040         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
6041         Use data16 instead of .byte for insn prefix.
6043 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6045         PR C++/86082
6046         * parser.c (make_char_string_pack): Pass this literal chars
6047         through cpp_interpret_string.
6048         (cp_parser_userdef_numeric_literal): Check the result of
6049         make_char_string_pack.
6051 2018-06-24  Maya Rashish  <coypu@sdf.org>
6053         * ginclude/stddef.h: Simplify conditions around avoiding
6054         re-definition of __size_t.
6056 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6058         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6059         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6061 2018-06-22  Maya Rashish  <coypu@sdf.org>
6063         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6064         made to OpenBSD and NetBSD through the years.
6066 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6068         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6069         behavior of vec_pack (vector double, vector double) to match
6070         behavior of vec_float2 (vector double, vector double).
6072 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6074         * gimplify.c (gimplify_function_tree): Prevent creation
6075         of a trampoline for the address of the current function
6076         passed to entry/exit instrumentation hooks.
6078 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6080         PR target/86222
6081         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6082         correctly.
6084 2018-06-22  Martin Liska  <mliska@suse.cz>
6086         PR tree-optimization/86263
6087         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6088         Bail out if is_enabled is false.
6089         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6090         New declaration.
6091         (jump_table_cluster::is_enabled): New function.
6093 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6095         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6096         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6097         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6098         (lto_input_ts_binfo_tree_pointers): Likewise.
6099         * tree-streamer-out.c (streamer_write_tree_bitfields,
6100         write_ts_binfo_tree_pointers): Likewise.
6101         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6103 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6105         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6107 2018-06-22  Martin Liska  <mliska@suse.cz>
6109         * symbol-summary.h (get): Make it pure and inline move
6110         functionality from ::get function.
6111         (get): Remove and inline into ::get and ::get_create.
6112         (get_create): Move code from ::get function.
6114 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6116         PR target/85994
6117         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6118         -x assembler-with-cpp.
6120 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6122         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6123         _FILE_OFFSET_BITS=64 for C++.
6125 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6127         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6128         conversion insn that shows up when pr85657-3.c is compiled using
6129         IEEE 128-bit long double.
6130         (neg<mode>2_internal): Use the correct mode to check whether the
6131         mode is IBM extended.
6132         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6133         multiply and divide external functions from being created more
6134         than once.
6136 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6138         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6139         functions.
6140         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6141         the edge can be forwarded.
6142         (cfg_layout_merge_blocks): Likewise.
6144 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6146         * except.c (finish_eh_generation): Commit edge insertions only after
6147         the EH edges have been redirected from post-landing to landing pads.
6149 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6151         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6152         create_tmp_var_for to create the FRAME decl.
6153         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6155 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6157         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6158         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6159         debug statement when resetting its value.
6160         (expand_call_inline): Copy the locus of the call onto the assignment
6161         of the return value, if any.  Use local variable in more cases.
6163 2018-06-21  Martin Liska  <mliska@suse.cz>
6165         * ipa-pure-const.c (propagate_nothrow): Use
6166         funct_state_summaries->get.
6167         (dump_malloc_lattice): Likewise.
6168         (propagate_malloc): Likewise.
6170 2018-06-21  Richard Biener  <rguenther@suse.de>
6172         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6173         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6174         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6175         comment.
6176         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6177         BLOCK_ABSTRACT_ORIGIN unconditionally.
6179 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6181         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6182         deleting it.
6183         * ipa-reference.c (ipa_reference_c_finalize): Delete
6184         ipa_ref_opt_sum_summaries and set it to NULL.
6186 2018-06-21  Tom de Vries  <tdevries@suse.de>
6188         PR tree-optimization/85859
6189         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6190         test with comment from bb_no_side_effects_p.
6192 2018-06-21  Richard Biener  <rguenther@suse.de>
6194         PR tree-optimization/86232
6195         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6196         max for constant niter.
6198 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6200         * config/aarch64/aarch64-simd.md
6201         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6203 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6205         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6206         Make opernads of the unspec commutative.
6208 2018-06-21  Richard Biener  <rguenther@suse.de>
6210         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6211         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6212         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6213         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6214         NULL DR_STEP.
6215         (vect_record_base_alignments): Do not record base alignment
6216         for gathers or scatters.
6217         (vect_compute_data_ref_alignment): Drop return value that is always
6218         true.  Bail out early for gathers or scatters.
6219         (vect_enhance_data_refs_alignment): Bail out early for gathers
6220         or scatters.
6221         (vect_find_same_alignment_drs): Likewise.
6222         (vect_analyze_data_refs_alignment): Remove dead code.
6223         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6224         (vect_analyze_data_refs): For possible gathers or scatters do
6225         not create an alternate DR, just check their possible validity
6226         and mark them.  Adjust DECL_NONALIASED handling to not rely
6227         on DR_BASE_ADDRESS.
6228         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6229         update inits of gathers or scatters.
6230         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6231         Also copy gather/scatter flag to pattern vinfo.
6233 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6235         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6236         behavior of vec_packsu (vector unsigned long long, vector unsigned
6237         long long) to match behavior of vec_packs with same signature.
6239 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6240             Thomas Schwinge <thomas@codesourcery.com>
6241             Cesar Philippidis  <cesar@codesourcery.com>
6243         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6244         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6245         (gimplify_adjust_omp_clauses): Likewise.
6246         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6247         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6248         (gimplify_omp_target_update): Update handling of acc update and
6249         enter/exit data.
6250         * omp-low.c (install_var_field): Remove unused parameter
6251         base_pointers_restrict.
6252         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6253         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6254         FINALIZE}
6255         (omp_target_base_pointers_restrict_p): Delete.
6256         (scan_omp_target): Update call to scan_sharing_clauses.
6257         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6258         FINALIZE}.
6259         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6260         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6261         (convert_local_omp_clauses): Likewise.
6262         * tree-pretty-print.c (dump_omp_clause): Likewise.
6263         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6264         FINALIZE}.
6265         (omp_clause_code_name): Likewise.
6267 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6269         PR debug/86194
6270         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6271         be narrowed.
6273         PR tree-optimization/86231
6274         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6275         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6277 2018-06-20  Tom de Vries  <tdevries@suse.de>
6279         PR tree-optimization/86097
6280         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6281         iv type if signedness of iv type is not the same as that of *nit.
6283 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6285         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6286         EDGE_EH edges, verify they are all EDGE_EH.
6288 2018-06-20  Maya Rashish  <coypu@sdf.org>
6290         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6292 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6294         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6295         * config/aarch64/aarch64.c (xgene1_tunings): Add
6296         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6297         (aarch64_mode_valid_for_sched_fusion_p):
6298         Allow 16-byte modes.
6299         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6300         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6301         128-bit modes.
6302         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6303         New pattern.
6304         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6305         * config/aarch64/iterators.md (VQ2): New mode iterator.
6307 2018-06-20  Martin Liska  <mliska@suse.cz>
6309         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6310         Change default ratio from 10 to 8.
6312 2018-06-20  Martin Liska  <mliska@suse.cz>
6314         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6315         New.
6316         (bit_test_cluster::find_bit_tests): Likewise.
6317         (switch_decision_tree::analyze_switch_statement): Find clusters.
6318         * tree-switch-conversion.h (struct jump_table_cluster): Document
6319         hierarchy.
6321 2018-06-20  Martin Liska  <mliska@suse.cz>
6323         * tree-switch-conversion.c (switch_conversion::collect):
6324         Record m_uniq property.
6325         (switch_conversion::expand): Bail out for special conditions.
6326         (group_cluster::~group_cluster): New.
6327         (group_cluster::group_cluster): Likewise.
6328         (group_cluster::dump): Likewise.
6329         (jump_table_cluster::emit): New.
6330         (switch_decision_tree::fix_phi_operands_for_edges): New.
6331         (struct case_node): Remove struct.
6332         (jump_table_cluster::can_be_handled): New.
6333         (case_values_threshold): Moved to header.
6334         (reset_out_edges_aux): Likewise.
6335         (jump_table_cluster::is_beneficial): New.
6336         (bit_test_cluster::can_be_handled): Likewise.
6337         (add_case_node): Remove.
6338         (bit_test_cluster::is_beneficial): New.
6339         (case_bit_test::cmp): New.
6340         (bit_test_cluster::emit): New.
6341         (expand_switch_as_decision_tree_p): Remove.
6342         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6343         (fix_phi_operands_for_edge): Likewise.
6344         (switch_decision_tree::analyze_switch_statement): New.
6345         (compute_cases_per_edge): Move ...
6346         (switch_decision_tree::compute_cases_per_edge): ... here.
6347         (try_switch_expansion): Likewise.
6348         (switch_decision_tree::try_switch_expansion): Likewise.
6349         (record_phi_operand_mapping): Likewise.
6350         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6351         (emit_case_decision_tree): Likewise.
6352         (switch_decision_tree::emit): Likewise.
6353         (balance_case_nodes): Likewise.
6354         (switch_decision_tree::balance_case_nodes): Likewise.
6355         (dump_case_nodes): Likewise.
6356         (switch_decision_tree::dump_case_nodes): Likewise.
6357         (emit_jump): Likewise.
6358         (switch_decision_tree::emit_jump): Likewise.
6359         (emit_cmp_and_jump_insns): Likewise.
6360         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6361         (emit_case_nodes): Likewise.
6362         (switch_decision_tree::emit_case_nodes): Likewise.
6363         (conditional_probability): Remove.
6364         * tree-switch-conversion.h (enum cluster_type): New.
6365         (PRINT_CASE): New.
6366         (struct cluster): Likewise.
6367         (cluster::cluster): Likewise.
6368         (struct simple_cluster): Likewise.
6369         (simple_cluster::simple_cluster): Likewise.
6370         (struct group_cluster): Likewise.
6371         (struct jump_table_cluster): Likewise.
6372         (struct bit_test_cluster): Likewise.
6373         (struct min_cluster_item): Likewise.
6374         (struct case_tree_node): Likewise.
6375         (case_tree_node::case_tree_node): Likewise.
6376         (jump_table_cluster::case_values_threshold): Likewise.
6377         (struct case_bit_test): Likewise.
6378         (struct switch_decision_tree): Likewise.
6379         (struct switch_conversion): Likewise.
6380         (switch_decision_tree::reset_out_edges_aux): Likewise.
6382 2018-06-20  Martin Liska  <mliska@suse.cz>
6384         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6385         (hoist_edge_and_branch_if_true): Likewise.
6386         (expand_switch_using_bit_tests_p): Likewise.
6387         (struct case_bit_test): Likewise.
6388         (case_bit_test_cmp): Likewise.
6389         (emit_case_bit_tests): Likewise.
6390         (switch_conversion::switch_conversion): New class.
6391         (struct switch_conv_info): Remove old struct.
6392         (collect_switch_conv_info): More to ...
6393         (switch_conversion::collect): ... this.
6394         (check_range): Likewise.
6395         (switch_conversion::check_range): Likewise.
6396         (check_all_empty_except_final): Likewise.
6397         (switch_conversion::check_all_empty_except_final): Likewise.
6398         (check_final_bb): Likewise.
6399         (switch_conversion::check_final_bb): Likewise.
6400         (create_temp_arrays): Likewise.
6401         (switch_conversion::create_temp_arrays): Likewise.
6402         (free_temp_arrays): Likewise.
6403         (gather_default_values): Likewise.
6404         (switch_conversion::gather_default_values): Likewise.
6405         (build_constructors): Likewise.
6406         (switch_conversion::build_constructors): Likewise.
6407         (constructor_contains_same_values_p): Likewise.
6408         (switch_conversion::contains_same_values_p): Likewise.
6409         (array_value_type): Likewise.
6410         (switch_conversion::array_value_type): Likewise.
6411         (build_one_array): Likewise.
6412         (switch_conversion::build_one_array): Likewise.
6413         (build_arrays): Likewise.
6414         (switch_conversion::build_arrays): Likewise.
6415         (gen_def_assigns): Likewise.
6416         (switch_conversion::gen_def_assigns): Likewise.
6417         (prune_bbs): Likewise.
6418         (switch_conversion::prune_bbs): Likewise.
6419         (fix_phi_nodes): Likewise.
6420         (switch_conversion::fix_phi_nodes): Likewise.
6421         (gen_inbound_check): Likewise.
6422         (switch_conversion::gen_inbound_check): Likewise.
6423         (process_switch): Use the newly created class.
6424         (switch_conversion::expand): New.
6425         (switch_conversion::~switch_conversion): New.
6426         * tree-switch-conversion.h: New file.
6428 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6430         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6431         tree-vect-patterns.c.
6432         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6433         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6434         (vect_recog_sad_pattern): Likewise.
6435         (vect_recog_widen_sum_pattern): Likewise.
6436         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6437         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6438         (vect_recog_rotate_pattern): Likewise.
6439         (vect_recog_mult_pattern): Likewise.
6440         (vect_recog_vector_vector_shift_pattern): Likewise.
6441         (vect_recog_divmod_pattern): Likewise.
6442         (vect_recog_mixed_size_cond_pattern): Likewise.
6443         (vect_recog_bool_pattern): Likewise.
6444         (vect_recog_mask_conversion_pattern): Likewise.
6445         (vect_try_gather_scatter_pattern): Likewise.
6446         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6447         (vect_recog_over_widening_pattern): Likewise.
6448         (vect_recog_gather_scatter_pattern): Likewise.
6449         (vect_recog_func_ptr): Move from tree-vectorizer.h
6450         (vect_vect_recog_func_ptrs): Move further down the file.
6451         (vect_recog_func): Likewise.  Remove the third argument.
6452         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6453         (vect_pattern_recog_1): Expect the pattern function to do any
6454         necessary target tests.  Also expect it to provide a vector type.
6455         Remove the type_in handling.
6457 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6459         * tree-vect-patterns.c (vect_pattern_detected): New function.
6460         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6461         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6462         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6463         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6464         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6465         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6466         (vect_recog_mask_conversion_pattern)
6467         (vect_try_gather_scatter_pattern): Likewise.
6469 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6471         * tree-vect-patterns.c (vect_get_internal_def): New function.
6472         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6473         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6474         (search_type_for_mask_1): Use it.
6476 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6478         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6479         redundant WIDEN_SUM_EXPR handling.
6480         (vect_recog_sad_pattern): Likewise.
6482 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6484         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6485         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6486         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6487         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6488         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6490 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6492         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6493         use the stmt_vec_info of the original bb statement for the
6494         new zero assignment, even if the call is part of a pattern.
6496 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6498         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6499         that the sequence is attached to the original statement rather
6500         than the pattern statement.
6501         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6502         PATTERN_DEF_SEQ from the original statement rather than
6503         the main pattern statement.
6504         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6505         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6506         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6508 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6510         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6511         definition statements before the early exit for statements that aren't
6512         live or relevant.
6513         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6514         split out from...
6515         (vect_transform_loop): ...here.  Process pattern definition
6516         statements without first checking whether the main pattern
6517         statement is live or relevant.
6519 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6521         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6522         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6524 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6526         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6527         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6528         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6529         (expand_block_compare): Change select_block_compare_mode call.
6530         (expand_strncmp_align_check): Use new functions, fix comment.
6531         (emit_final_str_compare_gpr): New function.
6532         (expand_strn_compare): Refactor and clean up code.
6533         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6535 2018-06-19  Tony Reix  <tony.reix@atos.com>
6536             Damien Bergamini  <damien.bergamini@atos.com>
6537             David Edelsohn  <dje.gcc@gmail.com>
6539         * collect2.c (static_obj): New variable.
6540         (static_libs): New variable.
6541         (is_in_list): Uncomment declaration.
6542         (main): Track AIX libraries linked statically.
6543         (is_in_list): Uncomment definition.
6544         (scan_prog_file): Don't add AIX shared libraries initializer
6545         to constructor list if linking statically.
6547 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6549         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6550         constant.
6551         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6553 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6555         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6556         blocks.
6558 2018-06-19  Martin Liska  <mliska@suse.cz>
6560         * config/i386/i386.c (ix86_can_inline_p): Do not use
6561         ipa_fn_summaries::get_create.
6562         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6563         get.
6564         (devirtualization_time_bonus): Likewise.
6565         (ipcp_propagate_stage): Likewise.
6566         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6567         (edge_set_predicate): Likewise.
6568         (evaluate_conditions_for_known_args): Likewise.
6569         (evaluate_properties_for_edge): Likewise.
6570         (ipa_call_summary::reset): Tranform to ...
6571         (ipa_call_summary::~ipa_call_summary): ... this.
6572         (ipa_fn_summary::reset): Transform to ...
6573         (ipa_fn_summary::~ipa_fn_summary): ... this.
6574         (ipa_fn_summary_t::remove): Rename to ...
6575         (ipa_fn_summary_t::remove_callees): ... this.
6576         (ipa_fn_summary_t::duplicate): Use placement new
6577         instead of memory copy.
6578         (ipa_call_summary_t::duplicate): Likewise.
6579         (ipa_call_summary_t::remove): Remove.
6580         (dump_ipa_call_summary): Change get_create to get.
6581         (ipa_dump_fn_summary): Dump only when summary exists.
6582         (analyze_function_body): Use symbol_summary::get instead
6583         of get_create.
6584         (compute_fn_summary): Likewise.
6585         (estimate_edge_devirt_benefit): Likewise.
6586         (estimate_edge_size_and_time): Likewise.
6587         (inline_update_callee_summaries): Likewise.
6588         (remap_edge_change_prob): Likewise.
6589         (remap_edge_summaries): Likewise.
6590         (ipa_merge_fn_summary_after_inlining): Likewise.
6591         (write_ipa_call_summary): Likewise.
6592         (ipa_fn_summary_write): Likewise.
6593         (ipa_free_fn_summary): Likewise.
6594         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6595         (struct ipa_call_summary): Likewise.
6596         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6597         of get_create.
6598         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6599         (estimate_size_after_inlining): Likewise.
6600         (estimate_growth): Likewise.
6601         (growth_likely_positive): Likewise.
6602         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6603         (inline_call): Likewise.
6604         * ipa-inline.c (caller_growth_limits): Likewise.
6605         (can_inline_edge_p): Likewise.
6606         (can_inline_edge_by_limits_p): Likewise.
6607         (compute_uninlined_call_time): Likewise.
6608         (compute_inlined_call_time): Likewise.
6609         (want_inline_small_function_p): Likewise.
6610         (edge_badness): Likewise.
6611         (update_caller_keys): Likewise.
6612         (update_callee_keys): Likewise.
6613         (inline_small_functions): Likewise.
6614         (inline_to_all_callers_1): Likewise.
6615         (dump_overall_stats): Likewise.
6616         (early_inline_small_functions): Likewise.
6617         (early_inliner): Likewise.
6618         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6619         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6620         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6621         * ipa-split.c (execute_split_functions): Likewise.
6622         * symbol-summary.h: Likewise.
6623         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6625 2018-06-19  Richard Biener  <rguenther@suse.de>
6627         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6628         (vectorize_loops): ... here.  Fix dbgcnt handling.
6629         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6631 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6633         PR target/86197
6634         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6635         ieee128 argument takes up only one (vector) register, not two (floating
6636         point) registers.
6638 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6640         * gimplify.c (gimplify_init_constructor): Really never clear for an
6641         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6643 2018-06-19  Richard Biener  <rguenther@suse.de>
6645         PR tree-optimization/86179
6646         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6647         after failed recognition.
6649 2018-06-18  Martin Sebor  <msebor@redhat.com>
6651         PR middle-end/85602
6652         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6653         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6654         Handle integer subtraction.
6655         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6656         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6658 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6660         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6661         param from rtx to rtx_insn *.
6662         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6663         param.
6664         (frv_ifcvt_modify_insn): Likwise.
6665         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6666         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6667         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6668         as_a <rtx_insn *> cast to local "unprotected_region" once
6669         it's been established that it's not NULL or pc_rtx.
6670         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6671         param "sethi" from rtx to rtx_insn *.
6672         (nds32_group_float_insns): Likewise for param "insn".
6673         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6674         param.
6675         (vax_output_int_subtract): Likewise.
6676         * config/vax/vax.c (vax_output_int_add): Likewise for param
6677         "insn".
6678         (vax_output_int_subtract): Likewise.
6679         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6680         (emit_pattern_after): Likewise for param "after".
6681         (emit_insn_after): Likewise.
6682         (emit_jump_insn_after): Likewise.
6683         (emit_call_insn_after): Likewise.
6684         (emit_debug_insn_after): Likewise.
6685         (emit_pattern_before): Likewise for param "before".
6686         (emit_insn_before): Likewise.
6687         (emit_jump_insn_before): Likewise.
6688         * final.c (get_insn_template): Likewise for param "insn", removing
6689         a cast.
6690         * output.h (get_insn_template): Likewise for 2nd param.
6691         * rtl.h (emit_insn_before): Likewise.
6692         (emit_jump_insn_before): Likewise.
6693         (emit_debug_insn_before_noloc): Likewise.
6694         (emit_insn_after): Likewise.
6695         (emit_jump_insn_after): Likewise.
6696         (emit_call_insn_after): Likewise.
6697         (emit_debug_insn_after): Likewise.
6698         (set_insn_deleted): Likewise for param.
6700 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6702         PR target/85358
6703         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6704         floating point modes, so that IFmode is numerically greater than
6705         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6706         to declare the ordering.  This prevents IFmode from being
6707         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6708         machine.  Include rs6000-modes.h to share the fractional values
6709         between genmodes* and the rest of the compiler.
6710         (IFmode): Likewise.
6711         (KFmode): Likewise.
6712         (TFmode): Likewise.
6713         * config/rs6000/rs6000-modes.h: New file.
6714         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6715         meaning of rs6000_long_double_size so that 126..128 selects an
6716         appropriate 128-bit floating point type.
6717         (rs6000_option_override_internal): Likewise.
6718         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6719         (TARGET_LONG_DOUBLE_128): Change the meaning of
6720         rs6000_long_double_size so that 126..128 selects an appropriate
6721         128-bit floating point type.
6722         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6723         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6724         source and destination to match the standard usage.
6725         (truncifkf2): Likewise.
6726         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6727         ISA 2.07 to use an explicit clobber, instead of passing in a
6728         temporary.
6729         (copysign<mode>3_soft): Likewise.
6731 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6733         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6734         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6735         (vect_slp_analyze_instance_dependence): Likewise.
6736         (vect_enhance_data_refs_alignment): Likewise.
6737         (vect_analyze_data_refs_alignment): Likewise.
6738         (vect_slp_analyze_and_verify_instance_alignment
6739         (vect_analyze_data_ref_accesses): Likewise.
6740         (vect_prune_runtime_alias_test_list): Likewise.
6741         (vect_analyze_data_refs): Likewise.
6742         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6743         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6744         (vect_analyze_scalar_cycles_1): Likewise.
6745         (vect_get_loop_niters): Likewise.
6746         (vect_analyze_loop_form_1): Likewise.
6747         (vect_update_vf_for_slp): Likewise.
6748         (vect_analyze_loop_operations): Likewise.
6749         (vect_analyze_loop): Likewise.
6750         (vectorizable_induction): Likewise.
6751         (vect_transform_loop): Likewise.
6752         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6753         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6754         (vect_make_slp_decision): Likewise.
6755         (vect_detect_hybrid_slp): Likewise.
6756         (vect_slp_analyze_operations): Likewise.
6757         (vect_slp_bb): Likewise.
6758         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6759         (vectorizable_bswap): Likewise.
6760         (vectorizable_call): Likewise.
6761         (vectorizable_simd_clone_call): Likewise.
6762         (vectorizable_conversion): Likewise.
6763         (vectorizable_assignment): Likewise.
6764         (vectorizable_shift): Likewise.
6765         (vectorizable_operation): Likewise.
6766         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6768 2018-06-18  Martin Sebor  <msebor@redhat.com>
6770         PR tree-optimization/81384
6771         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6772         * builtins.c (expand_builtin_strnlen): New function.
6773         (expand_builtin): Call it.
6774         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6775         * builtins.def (BUILT_IN_STRNLEN): New.
6776         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6777         Warn for bounds in excess of maximum object size.
6778         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6779         single-value ranges.  Handle strnlen.
6780         (handle_builtin_strlen): Handle strnlen.
6781         (strlen_check_and_optimize_stmt): Same.
6782         * doc/extend.texi (Other Builtins): Document strnlen.
6784 2018-06-18  Maya Rashish  <coypu@sdf.org>
6786         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6787         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6788         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6790         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6791         here to ...
6792         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6794 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6796         * tree.c (escaped_string::escape): Replace cast to char * by
6797         const_cast<char *> (unescaped).
6799 2018-06-18  Nick Clifton  <nickc@redhat.com>
6801         PR 84195
6802         * tree.c (escaped_string): New class.  Converts an unescaped
6803         string into its escaped equivalent.
6804         (warn_deprecated_use): Use the new class to convert the
6805         deprecation message, if present.
6806         (test_escaped_strings): New self test.
6807         (test_c_tests): Add test_escaped_strings.
6808         * doc/extend.texi (deprecated): Add a note that the
6809         deprecation message is affected by the -fmessage-length
6810         option, and that control characters will be escaped.
6811         (#pragma GCC error): Document this pragma.
6812         (#pragma GCC warning): Likewise.
6813         * doc/invoke.texi (-fmessage-length): Document this option's
6814         effect on the #warning and #error preprocessor directives and
6815         the deprecated attribute.
6817 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6819         * tree.c (decl_value_expr_lookup): Revert latest change.
6820         (decl_value_expr_insert): Likewise.
6822 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6824         * gimplify.c (nonlocal_vlas): Delete.
6825         (nonlocal_vla_vars): Likewise.
6826         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6827         referenced VLAs.
6828         (gimplify_body): Do not create and destroy nonlocal_vlas.
6829         * tree-nested.c: Include diagnostic.h.
6830         (use_pointer_in_frame): Tweak.
6831         (lookup_field_for_decl): Add assertion and declare the transformation.
6832         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6833         internal error when the reference is in a wrong context.  Do not
6834         create a debug decl by default.
6835         (note_nonlocal_block_vlas): Delete.
6836         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6837         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6838         create a debug decl by default.
6839         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6840         call is in a wrong context.
6841         (fixup_vla_decls): New function.
6842         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6843         debug variables were created.
6844         * tree.c (decl_value_expr_lookup): Add checking assertion.
6845         (decl_value_expr_insert): Likewise.
6847 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6849         PR middle-end/82479
6850         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6851         * tree-scalar-evolution.c (interpret_expr): Likewise.
6852         (expression_expensive_p): Likewise.
6853         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6854         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6855         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6856         (ssa_defined_by_minus_one_stmt_p): New.
6858 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6860         PR middle-end/64946
6861         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6862         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6863         * dojump.c (do_jump): Likewise.
6864         * expr.c (expand_expr_real_2): Check operand type's sign.
6865         * fold-const.c (const_unop): Handle ABSU_EXPR.
6866         (fold_abs_const): Likewise.
6867         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6868         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6869         (strip_sign_op_1): Likesise.
6870         * match.pd: Add new pattern to generate ABSU_EXPR.
6871         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6872         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6873         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6874         * tree-inline.c (estimate_operator_cost): Likewise.
6875         * tree-pretty-print.c (dump_generic_node): Likewise.
6876         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6877         * tree.def (ABSU_EXPR): New.
6879 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6881         PR middle-end/86095
6882         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6883         documented as preserved for backward compatibility only.
6884         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6886         PR rtl-optimization/86108
6887         * bb-reorder.c (create_forwarder_block): Renamed to ...
6888         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6889         jump from new landing pad to the second part.
6890         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6891         Adjust callers.
6893 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6895         PR middle-end/85878
6896         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6897         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6898         Only call store_expr for halves if the mode is the same.
6900         PR middle-end/86123
6901         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6902         Fix up comment formatting.
6904 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6906         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6907         (typed_splay_tree::closure,
6908         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6909         (typed_splay_tree::typed_splay_tree,
6910         typed_splay_tree::operator =): Declared private.
6911         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6912         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6913         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6914         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6915         typed_splay_tree::splay_tree_splay,
6916         typed_splay_tree::splay_tree_foreach_helper,
6917         typed_splay_tree::splay_tree_insert,
6918         typed_splay_tree::splay_tree_remove,
6919         typed_splay_tree::splay_tree_lookup,
6920         typed_splay_tree::splay_tree_predecessor,
6921         typed_splay_tree::splay_tree_successor,
6922         typed_splay_tree::splay_tree_min,
6923         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6924         (typed_splay_tree::root, typed_splay_tree::comp,
6925         typed_splay_tree::delete_key,
6926         typed_splay_tree::delete_value): New data members.
6927         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6928         typed_splay_tree::remove.
6930 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6932         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6933         -mginv and -mno-ginv to the assembler.
6934         * config/mips/mips.opt (-mcrc): New option.
6935         (-mginv): Likewise.
6936         * doc/invoke.text (-mcrc): Document.
6937         (-mginv): Likewise.
6939 2018-06-15  Nick Clifton  <nickc@redhat.com>
6941         PR 84195
6942         * tree.c (escaped_string): New class.  Converts an unescaped
6943         string into its escaped equivalent.
6944         (warn_deprecated_use): Use the new class to convert the
6945         deprecation message, if present.
6946         (test_escaped_strings): New self test.
6947         (test_c_tests): Add test_escaped_strings.
6948         * doc/extend.texi (deprecated): Add a note that the
6949         deprecation message is affected by the -fmessage-length
6950         option, and that control characters will be escaped.
6951         (#pragma GCC error): Document this pragma.
6952         (#pragma GCC warning): Likewise.
6953         * doc/invoke.texi (-fmessage-length): Document this option's
6954         effect on the #warning and #error preprocessor directives and
6955         the deprecated attribute.
6957 2018-06-15  Richard Biener  <rguenther@suse.de>
6959         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6960         here, also noting vector size used.
6961         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6962         size used in MSG_OPTIMIZED_LOCATIONS dump.
6963         (pass_slp_vectorize::execute): Adjust.
6965 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6967         PR target/85968
6968         * config/arc/arc.c (arc_return_address_register): Fix
6969         if-condition.
6971 2018-06-15  Richard Biener  <rguenther@suse.de>
6973         PR middle-end/86159
6974         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6975         leave useless conversion stripping to force_gimple_operand_gsi.
6976         (gimplify_build2): Likewise.
6977         (gimplify_build1): Likewise.
6979 2018-06-15  Richard Biener  <rguenther@suse.de>
6981         PR middle-end/86076
6982         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6983         before adjusting their block.
6985 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6987         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6988         multilibs for *-*-rtems*.
6989         * config/riscv/t-rtems: New file.
6991 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6993         PR middle-end/86122
6994         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6995         unsigned_type_for returns NULL.
6997         PR target/85945
6998         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6999         subregs of multi-word pseudos unless the float mode has word size.
7001 2018-06-14  Richard Biener  <rguenther@suse.de>
7003         PR middle-end/86139
7004         * tree-vect-generic.c (build_word_mode_vector_type): Remove
7005         duplicate and harmful type_hash_canon.
7006         * tree.c (type_hash_canon): Assert we didn't find ourselves.
7008 2018-06-14  Richard Biener  <rguenther@suse.de>
7010         PR ipa/86124
7011         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
7012         NULL cgraph_node.
7014 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
7016         * config/rtems.h (STDINT_LONG32): Define.
7018 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
7019             Prachi Godbole  <prachi.godbole@imgtec.com>
7021         * config/mips/mips-cpus.def: Define P6600.
7022         * config/mips/mips-tables.opt: Regenerate.
7023         * config/mips/mips.c (mips_ucbranch_type): New enum.
7024         (mips_rtx_cost_data): Add support for P6600.
7025         (mips_issue_rate): Likewise.
7026         (mips_multipass_dfa_lookahead): Likewise.
7027         (mips_avoid_hazard): Likewise.
7028         (mips_reorg_process_insns): Likewise.
7029         (mips_classify_branch_p6600): New function.
7030         * config/mips/mips.h (TUNE_P6600): New define.
7031         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
7032         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
7033         * config/mips/mips.md: Include p6600.md.
7034         (processor): Add p6600.
7035         * config/mips/p6600.md: New file.
7036         * doc/invoke.texi: Add p6600 to supported architectures.
7038 2018-06-13  Martin Sebor  <msebor@redhat.com>
7040         PR tree-optimization/86114
7041         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
7042         of integer types.
7043         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7045 2018-06-13  Richard Biener  <rguenther@suse.de>
7047         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7048         Properly set vector type of the intermediate stmt.
7049         * tree-vect-stmts.c (vectorizable_operation): The destination
7050         var always has vectype_out type.
7052 2018-06-13  Jeff Law  <law@redhat.com>
7054         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7055         integer 0 for argument to print_rtl_with_bb.
7056         (rl78_reorg): Likewise.
7058 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7060         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7061         from rtx to rtx_insn *.
7062         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7063         "label".
7064         (add_sched_insns_for_speculation): Likewise for local "target",
7065         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7066         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7067         from rtx_insn ** to rtx_code_label **.
7068         (reorg_emit_nops): Likewise.
7069         (c6x_reorg): Likewise for local "call_labels".
7070         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7071         rtx to rtx_insn *.
7072         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7073         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7074         the loops over LABEL_REFS.
7075         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7076         braf_label.
7077         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7078         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7079         (split_branches): Strengthen local "olabel" from rtx to
7080         rtx_insn *, adding a safe_as_a cast.
7081         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7082         to "rtx_insn *".
7083         (add_insn_after): Likewise for first two params.
7084         (add_insn_before): Likewise.
7085         (remove_insn): Likewise for param.
7086         (emit_pattern_before_noloc): Likewise for second and third params.
7087         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7088         (emit_call_insn_before_noloc): Likewise.
7089         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7090         to "rtx_insn *".
7091         (emit_barrier_before): Likewise.
7092         (emit_label_before): Strengthen "label" param from "rtx" to
7093         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7094         "rtx_insn *".
7095         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7096         "rtx_insn *".
7097         (emit_pattern_after_noloc): Likewise.
7098         (emit_insn_after_noloc): Likewise.
7099         (emit_jump_insn_after_noloc): Likewise.
7100         (emit_call_insn_after_noloc): Likewise.
7101         (emit_debug_insn_after_noloc): Likewise.
7102         (emit_barrier_after): Likewise.
7103         (emit_label_after): Likewise for both params.
7104         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7105         "loc" param from "int" to "location_t".
7106         (emit_insn_after_setloc): Likewise.
7107         (emit_jump_insn_after_setloc): Likewise.
7108         (emit_call_insn_after_setloc): Likewise.
7109         (emit_debug_insn_after_setloc): Likewise.
7110         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7111         "loc" param from "int" to "location_t".
7112         (emit_pattern_before): Convert NULL_RTX to NULL.
7113         (emit_insn_before_setloc): Convert "loc" param from "int" to
7114         "location_t".
7115         (emit_jump_insn_before_setloc): Likewise.
7116         (emit_call_insn_before_setloc): Likewise.
7117         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7118         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7119         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7120         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7121         Convert 3rd param from "int" to "location_t".
7122         (emit_barrier_before, emit_barrier_after, next_real_insn):
7123         Strengthen param from rtx to rtx_insn *.
7124         (emit_label_before): Strengthen 1st param from "rtx" to
7125         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7126         "rtx_insn *".
7127         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7128         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7129         Strengthen 2nd param from "rtx" to "rtx_insn *".
7130         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7131         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7132         Likewise. Convert 3rd param from "int" to "location_t".
7133         (emit_label_after): Strengthen 1st param from "rtx" to
7134         "rtx_code_label *".
7135         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7136         "rtx_insn *".
7137         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7138         from "rtx" to "rtx_insn *".
7140 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7142         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7143         bodies streamed in with -Q.
7144         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7145         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7146         * gimple-streamer-out.c: Include gimple-pretty-print.h
7147         (output_bb): Dump stmts streamed.
7148         * lto-section-out.c: Include print-tree.h
7149         (lto_begin_section): Dump sections created.
7150         (lto_output_decl_index): Dump decl encoded.
7151         * lto-streamer-out.c: Include print-tree.h
7152         (create_output_block): Dump output block created.
7153         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7154         (output_function): Dump function output.
7155         (output_constructor): Dump constructor streamed.
7156         (write_global_stream): Output indexes encoded.
7157         (produce_asm_for_decls): Dump streams encoded.
7158         * lto-streamer.c (streamer_dump_file): New global var.
7159         * lto-streamer.h (streamer_dump_file): Declare.
7160         * passes.c (ipa_write_summaries): Initialize streamer dump.
7161         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7162         in.
7164 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7166         PR target/86048
7167         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7168         offsets for register save directives.  Emit a second batch of save
7169         directives, if need be, when the function accesses prior frames.
7171 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7173         * config/arc/fpu.md (fmasf4): Force operand to register.
7174         (fnmasf4): Likewise.
7176 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7178         * config/arc/arc-protos.h (arc_pad_return): Remove.
7179         * config/arc/arc.c (machine_function): Remove force_short_suffix
7180         and size_reason.
7181         (arc_print_operand): Adjust printing of '&'.
7182         (arc_verify_short): Remove conditional printing of short suffix.
7183         (arc_final_prescan_insn): Remove reference to size_reason.
7184         (pad_return): New function.
7185         (arc_reorg): Call pad_return.
7186         (arc_pad_return): Remove.
7187         (arc_init_machine_status): Remove reference to force_short_suffix.
7188         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7189         (attr length): When attribute iscompact is true force to 2
7190         regardless; in the case of maybe check if we want to force the
7191         instruction to have 4 bytes length.
7192         (nopv): Change it to generate 4 byte long nop as well.
7193         (blockage): New pattern.
7194         (simple_return): Remove call to arc_pad_return.
7195         (p_return_i): Likewise.
7197 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7199         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7201 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7203         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7204         ARC cores.
7206 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7208         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7209         for ARC700 and ARCv2.
7211 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7213         PR target/86076
7214         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7215         operands[2] instead of operands[1].
7218 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7220         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7221         case, check whether the outer register overlaps an unallocatable
7222         register, not just whether it fits the required class.
7224 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7226         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7227         are poly_ints.
7228         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7229         (memrefs_conflict_p): Likewise.
7230         (init_alias_analysis): Likewise.
7231         * cfgexpand.c (expand_debug_expr): Likewise.
7232         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7233         * cse.c (fold_rtx): Likewise.
7234         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7235         * expr.c (emit_block_move_hints): Likewise.
7236         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7237         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7238         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7239         (emit_group_store): Likewise.
7240         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7241         to read the PRE/POST_MODIFY increment.
7242         * calls.c (store_one_arg): Use strip_offset.
7243         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7244         poly_int_rtx_p.
7245         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7246         by a VEC_SELECT.
7247         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7248         (simplify_binary_operation_1): Extend CONST_INT handling to
7249         poly_int_rtx_p.
7250         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7251         than a HOST_WIDE_INT.
7252         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7253         poly_int64.
7254         (adjust_mems, add_stores): Update accodingly.
7255         (vt_canonicalize_addr): Track polynomial offsets.
7256         (emit_note_insn_var_location): Likewise.
7257         (vt_add_function_parameter): Likewise.
7258         (vt_initialize): Likewise.
7260 2018-06-12  Jeff Law  <law@redhat.com>
7262         * config.gcc (alpha*-*-freebsd*): Remove.
7263         * config/alpha/freebsd.h: Remove.
7265 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7267         PR other/69968
7268         * spellcheck-tree.c (levenshtein_distance): Rename to...
7269         (get_edit_distance): ...this, and update for underlying renaming.
7270         * spellcheck-tree.h (levenshtein_distance): Rename to...
7271         (get_edit_distance): ...this.
7272         * spellcheck.c (levenshtein_distance): Rename to...
7273         (get_edit_distance): ...this.  Convert from Levenshtein distance
7274         to Damerau-Levenshtein distance by supporting transpositions of
7275         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7276         "v_one_ago".
7277         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7278         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7279         update for underlying renaming.
7280         (selftest::levenshtein_distance_unit_test): Rename to...
7281         (selftest::test_get_edit_distance_unit): ...this, and update for
7282         underlying renaming.
7283         (selftest::test_find_closest_string): Add example from PR 69968
7284         where transposition helps
7285         (selftest::test_metric_conditions): Update for renaming.
7286         (selftest::test_metric_conditions): Likewise.
7287         (selftest::spellcheck_c_tests): Likewise.
7288         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7289         (get_edit_distance): ...this.
7290         (best_match::consider): Update for renaming.
7292 2018-06-12  Martin Sebor  <msebor@redhat.com>
7294         PR tree-optimization/85259
7295         * builtins.c (compute_objsize): Handle constant offsets.
7296         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7297         true iff a warning has been issued.
7298         * gimple.h (gimple_nonartificial_location): New function.
7299         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7300         gimple_nonartificial_location and handle -Wno-system-headers.
7301         (handle_builtin_stxncpy): Same.
7303 2018-06-12  Martin Sebor  <msebor@redhat.com>
7305         PR c/85931
7306         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7308 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7310         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7311         BUILTIN_VEC_XST entries for pointer to double and long long.
7313 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7315         PR target/85990
7316         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7317         Update comments.
7318         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7319         Likewise.
7321 2018-06-12  Martin Liska  <mliska@suse.cz>
7323         * doc/options.texi: Document IntegerRange.
7325 2018-06-12  Martin Liska  <mliska@suse.cz>
7327         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7328         * opt-functions.awk: Handle Deprecated flag.
7329         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7330         and report error.
7331         (read_cmdline_option): Report warning for a deprecated option.
7332         * opts.h (struct cl_option): Add new field cl_deprecated.
7333         (CL_ERR_DEPRECATED): New.
7335 2018-06-12  Martin Liska  <mliska@suse.cz>
7337         * doc/options.texi: Document Deprecated option flag.
7339 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7341         * config/arc/arc-arch.h (arc_extras): New enum.
7342         (arc_cpu_t):Add field extra.
7343         (arc_cpu_types): Consider the extras.
7344         * config/arc/arc-cpus.def: Add extras info.
7345         * config/arc/arc-opts.h (processor_type): Consider extra field.
7346         * config/arc/arc.c (arc_override_options): Handle extra field.
7348 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7350         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7351         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7352         field.
7353         * config/arc/arc.c (arc_init): Update pic warning.
7354         (irq_range): Update irq range parsing warnings.
7355         (arc_override_options): Update various warning messages.
7356         (arc_handle_aux_attribute): Likewise.
7358 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7360         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7362 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7364         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7365         compiler messages directives.
7367 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7369         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7370         * config/mips/mips-tables.opt: Regenerate.
7371         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7372         mips64r6.
7373         * doc/invoke.texi: Document -march=i6500.
7375 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7377         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7378         (i6400_gpmul): Add cpu_unit.
7379         (i6400_gpdiv): Likewise.
7380         (i6400_msa_add_d): Update reservations.
7381         (i6400_msa_int_add) Likewise.
7382         (i6400_msa_short_logic3) Likewise.
7383         (i6400_msa_short_logic2) Likewise.
7384         (i6400_msa_short_logic) Likewise.
7385         (i6400_msa_move) Likewise.
7386         (i6400_msa_cmp) Likewise.
7387         (i6400_msa_short_float2) Likewise.
7388         (i6400_msa_div_d) Likewise.
7389         (i6400_msa_long_logic1) Likewise.
7390         (i6400_msa_long_logic2) Likewise.
7391         (i6400_msa_mult) Likewise.
7392         (i6400_msa_long_float2) Likewise.
7393         (i6400_msa_long_float4) Likewise.
7394         (i6400_msa_long_float5) Likewise.
7395         (i6400_msa_long_float8) Likewise.
7396         (i6400_fpu_fadd): Include frint type.
7397         (i6400_fpu_store): New define_insn_reservation.
7398         (i6400_fpu_load): Likewise.
7399         (i6400_fpu_move): Likewise.
7400         (i6400_fpu_fcmp): Likewise.
7401         (i6400_fpu_fmadd): Likewise.
7402         (i6400_int_mult): Include imul3nc type and update reservation.
7403         (i6400_int_div): Include idiv3 type and update reservation.
7404         (i6400_int_load): Update to check type not move_type.
7405         (i6400_int_store): Likewise.
7406         (i6400_int_prefetch): Set zero latency.
7408 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7410         * gcc.c: Document new %@{...} sequence.
7411         (LINK_COMMAND_SPEC): Use it for the -L switches.
7412         (cpp_unique_options): Use it for the -I switches.
7413         (at_file_argbuf): New global variable.
7414         (in_at_file): Likewise.
7415         (alloc_args): Create at_file_argbuf.
7416         (clear_args): Truncate at_file_argbuf.
7417         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7418         (open_at_file): New function.
7419         (close_at_file): Likewise.
7420         (create_at_file): Delete.
7421         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7422         <'o'>: Likewise.
7423         <'@'>: New case.
7424         (validate_switches_from_spec): Deal with %@{...} sequence.
7425         (validate_switches): Likewise.
7426         (driver::finalize): Call clear_args.
7428 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7430         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7432 2018-06-11  Martin Sebor  <msebor@redhat.com>
7434         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7435         (Wno-class-memaccess): Add @opindex.
7436         (Wno-templates, Wno-multiple-inheritance): Same.
7437         (Wno-virtual-inheritance, Wno-namespaces): Same.
7438         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7439         (Wno-format-overflow, Wno-format-truncation): Same.
7440         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7441         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7442         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7443         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7444         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7445         (Wno-misspelled-isr): Same.
7447 2018-06-11  Martin Sebor  <msebor@redhat.com>
7449         * PR tree-optimization/86083
7450         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7452 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7454         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7456 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7458         PR target/85755
7459         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7460         on the correct operand.
7461         (*movdi_internal64): Ditto.
7463 2018-06-11  Martin Liska  <mliska@suse.cz>
7465         PR tree-optimization/86089
7466         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7468 2018-06-11  Julia Koval  <julia.koval@intel.com>
7470         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7471         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7472         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7474 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7476         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7477         for Ada with strict dwarf2.
7479 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7481         PR target/85755
7482         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7483         addresses.
7485 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7487         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7489 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7491         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7492         TARGET_ELF.
7494 2018-06-08  Martin Liska  <mliska@suse.cz>
7496         * tree-cfg.h (debug_function): Fix argument type to match
7497         implementation.
7499 2018-06-08  Martin Liska  <mliska@suse.cz>
7501         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7502         Remove usage of MPX-related (and removed) fields.
7503         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7505 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7507         * cfg.c (debug): Use TDF_NONE rather than 0.
7508         * cfghooks.c (debug): Likewise.
7509         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7510         (struct dump_option_value_info): Convert to...
7511         (struct kv_pair): ...this template type.
7512         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7513         rather than 0.
7514         (optinfo_verbosity_options): Likewise.
7515         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7516         OPTGROUP_NONE.
7517         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7518         than int for "optgroup_flags" param.
7519         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7520         "dump_kind" param.
7521         (dump_dec): Likewise.
7522         (dump_finish): Use TDF_NONE rather than 0.
7523         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7524         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7525         than 0.  Update for change to option_ptr.
7526         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7527         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7528         0.  Update for changes to optinfo_verbosity_options and
7529         optgroup_options.
7530         (opt_info_switch_p): Convert optgroup_flags from int to
7531         optgroup_flags_t.
7532         (dump_basic_block): Use dump_flags_t rather than int
7533         for "dump_kind" param.
7534         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7535         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7536         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7537         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7538         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7539         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7540         TDF_NONE): Convert from macros to...
7541         (enum dump_flag): ...this new enum.
7542         (dump_flags_t): Update to use enum.
7543         (operator|, operator&, operator~, operator|=, operator&=):
7544         Implement for dump_flags_t.
7545         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7546         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7547         Convert from macros to...
7548         (enum optgroup_flag): ...this new enum.
7549         (optgroup_flags_t): New typedef.
7550         (operator|, operator|=): Implement for optgroup_flags_t.
7551         (struct dump_file_info): Convert field "alt_flags" to
7552         dump_flags_t.  Convert field "optgroup_flags" to
7553         optgroup_flags_t.
7554         (dump_basic_block): Use dump_flags_t rather than int for param.
7555         (dump_generic_expr_loc): Likewise.
7556         (dump_dec): Likewise.
7557         (dump_register): Convert param "optgroup_flags" to
7558         optgroup_flags_t.
7559         (opt_info_enable_passes): Likewise.
7560         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7561         than 0.
7562         * gimple-pretty-print.c (debug): Likewise.
7563         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7564         (merged_store_group::apply_stores): Likewise.
7565         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7566         * gimple.c (verify_gimple_pp): Likewise.
7567         * graphite-poly.c (print_pbb_body): Likewise.
7568         * passes.c (pass_manager::register_one_dump_file): Convert
7569         local "optgroup_flags" to optgroup_flags_t.
7570         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7571         (debug): Likewise.
7572         (debug_body): Likewise.
7573         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7574         to optgroup_flags_t.
7575         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7576         than 0.
7577         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7578         (convert_mult_to_fma): Likewise.
7579         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7580         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7581         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7582         "dump_kind" to dump_flags_t.
7584 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7586         * config/rs6000/rs6000.c (min, max): Delete.
7588 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7590         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7591         -mabi=spe and -mabi=no-spe.
7593 2018-06-08  Martin Liska  <mliska@suse.cz>
7595         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7596         where we expect an existing summary.
7598 2018-06-08  Martin Liska  <mliska@suse.cz>
7600         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7601         * ipa-inline.h (estimate_edge_growth): Likewise.
7603 2018-06-08  Martin Liska  <mliska@suse.cz>
7605         * cgraph.c (function_version_hasher::hash): Use
7606         cgraph_node::get_uid ().
7607         (function_version_hasher::equal):
7608         * cgraph.h (cgraph_node::get_uid): New method.
7609         * ipa-inline.c (update_caller_keys): Use
7610         cgraph_node::get_uid ().
7611         (update_callee_keys): Likewise.
7612         * ipa-utils.c (searchc): Likewise.
7613         (ipa_reduced_postorder): Likewise.
7614         * lto-cgraph.c (input_node): Likewise.
7615         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7616         * symbol-summary.h (symtab_insertion): Likewise.
7617         (symtab_removal): Likewise.
7618         (symtab_duplication): Likewise.
7619         * tree-pretty-print.c (dump_function_header): Likewise.
7620         * tree-sra.c (convert_callers_for_node): Likewise.
7622 2018-06-08  Martin Liska  <mliska@suse.cz>
7624         * cgraph.c (symbol_table::create_edge): Always assign a new
7625         unique number.
7626         (symbol_table::free_edge): Do not recycle numbers.
7627         * cgraph.h (cgraph_edge::get): New method.
7628         * symbol-summary.h (symtab_removal): Use it.
7629         (symtab_duplication): Likewise.
7630         (call_summary::hashable_uid): Remove.
7632 2018-06-08  Martin Liska  <mliska@suse.cz>
7634         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7635         (initialize_growth_caches): Remove.
7636         (free_growth_caches): Likewise.
7637         (do_estimate_edge_time): Use edge_growth_cache.
7638         (do_estimate_edge_size): Likewise.
7639         (do_estimate_edge_hints): Likewise.
7640         * ipa-inline.c (reset_edge_caches): Likewise.
7641         (recursive_inlining): Likewise.
7642         (inline_small_functions): Likewise.
7643         * ipa-inline.h (initialize_growth_caches): Remove.
7644         (estimate_edge_size): Likewise.
7645         (estimate_edge_time): Likewise.
7646         (estimate_edge_hints): Likewise.
7647         (reset_edge_growth_cache): Likewise.
7648         * symbol-summary.h (call_summary::remove): New method.
7650 2018-06-08  Martin Liska  <mliska@suse.cz>
7652         * ipa-cp.c (class edge_clone_summary): New summary.
7653         (grow_edge_clone_vectors): Remove.
7654         (ipcp_edge_duplication_hook): Remove.
7655         (class edge_clone_summary_t): New call_summary class.
7656         (ipcp_edge_removal_hook): Remove.
7657         (edge_clone_summary_t::duplicate): New function.
7658         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7659         (create_specialized_node): Likewise.
7660         (ipcp_driver): Initialize edge_clone_summaries and do not
7661         register hooks.
7663 2018-06-08  Martin Liska  <mliska@suse.cz>
7665         * symbol-summary.h (get): New function.
7666         (call_summary::m_initialize_when_cloning): New class member.
7668 2018-06-08  Martin Liska  <mliska@suse.cz>
7670         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7671         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7672         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7673         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7674         (remove_cgraph_node_from_order): Use the removed_nodes set.
7675         (do_per_function_toporder): Likwise.
7676         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7677         instead of summary_uid.
7678         (symtab_removal): Likewise.
7679         (symtab_duplication): Likewise.
7681 2018-06-08  Martin Liska  <mliska@suse.cz>
7683         * ipa-cp.c (ipcp_store_bits_results): Use
7684         ipcp_transformation_sum.
7685         (ipcp_store_vr_results): Likewise.
7686         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7687         to ...
7688         (ipcp_transformation_initialize): ... this.
7689         (ipa_set_node_agg_value_chain):
7690         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7691         (write_ipcp_transformation_info): Likewise.
7692         (read_ipcp_transformation_info): Likewise.
7693         (ipcp_update_bits): Likewise.
7694         (ipcp_update_vr): Likewise.
7695         (ipcp_transform_function): Likewise.
7696         * ipa-prop.h: Rename ipcp_transformation_summary to
7697         ipcp_transformation.
7698         (class ipcp_transformation_t): New function summary.
7699         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7700         (ipa_get_agg_replacements_for_node): Likewise.
7702 2018-06-08  Martin Liska  <mliska@suse.cz>
7704         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7705         of struct.
7706         (class funct_state_summary_t): New function_summary class.
7707         (has_function_state): Remove.
7708         (get_function_state): Likewise.
7709         (set_function_state): Likewise.
7710         (add_new_function): Likewise.
7711         (funct_state_summary_t::insert): New function.
7712         (duplicate_node_data): Remove.
7713         (remove_node_data): Remove.
7714         (funct_state_summary_t::duplicate): New function.
7715         (register_hooks): Create new funct_state_summaries.
7716         (pure_const_generate_summary): Use it.
7717         (pure_const_write_summary): Likewise.
7718         (pure_const_read_summary): Likewise.
7719         (propagate_pure_const): Likewise.
7720         (propagate_nothrow): Likewise.
7721         (dump_malloc_lattice): Likewise.
7722         (propagate_malloc): Likewise.
7723         (execute): Do not register hooks, just remove summary
7724         instead.
7725         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7726         constructor.
7728 2018-06-08  Martin Liska  <mliska@suse.cz>
7730         * ipa-reference.c (remove_node_data): Remove.
7731         (duplicate_node_data): Likewise.
7732         (class ipa_ref_var_info_summary_t): New class.
7733         (class ipa_ref_opt_summary_t): Likewise.
7734         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7735         (get_reference_optimization_summary): Use
7736         ipa_ref_opt_sum_summaries.
7737         (set_reference_vars_info): Remove.
7738         (set_reference_optimization_summary): Likewise.
7739         (ipa_init): Create summaries.
7740         (init_function_info): Use function summary.
7741         (ipa_ref_opt_summary_t::duplicate): New function.
7742         (ipa_ref_opt_summary_t::remove): New function.
7743         (get_read_write_all_from_node): Fix GNU coding style.
7744         (propagate): Use function summary.
7745         (write_node_summary_p): Fix GNU coding style.
7746         (stream_out_bitmap): Likewise.
7747         (ipa_reference_read_optimization_summary): Use function summary.
7748         (ipa_reference_c_finalize): Do not release hooks.
7750 2018-06-08  Martin Liska  <mliska@suse.cz>
7752         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7753         (analyze_function_body): Extract multiple calls of get_create.
7754         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7755         * ipa-inline.c (recursive_inlining): Use ::get method.
7756         * ipa-inline.h (estimate_edge_growth): Likewise.
7758 2018-06-08  Martin Liska  <mliska@suse.cz>
7760         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7761         HSA_INVALID.
7762         (hsa_function_summary::hsa_function_summary): Use the new enum
7763         value.
7764         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7765         * hsa-gen.c (hsa_get_host_function): Likewise.
7766         (get_brig_function_name): Likewise.
7767         * ipa-hsa.c (process_hsa_functions): Likewise.
7768         (ipa_hsa_write_summary): Likewise.
7769         * symbol-summary.h (symtab_duplication): Use ::get function/
7770         (get): New function.
7772 2018-06-08  Martin Liska  <mliska@suse.cz>
7774         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7775         of get.
7776         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7777         (hsa_register_kernel): Likewise.
7778         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7779         * hsa-gen.c (hsa_get_host_function): Likewise.
7780         (get_brig_function_name): Likewise.
7781         (generate_hsa): Likewise.
7782         (pass_gen_hsail::execute): Likewise.
7783         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7784         (devirtualization_time_bonus): Likewise.
7785         (ipcp_propagate_stage): Likewise.
7786         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7787         (edge_set_predicate): Likewise.
7788         (evaluate_conditions_for_known_args): Likewise.
7789         (evaluate_properties_for_edge): Likewise.
7790         (ipa_fn_summary::reset): Likewise.
7791         (ipa_fn_summary_t::duplicate): Likewise.
7792         (dump_ipa_call_summary): Likewise.
7793         (ipa_dump_fn_summary): Likewise.
7794         (analyze_function_body): Likewise.
7795         (compute_fn_summary): Likewise.
7796         (estimate_edge_devirt_benefit): Likewise.
7797         (estimate_edge_size_and_time): Likewise.
7798         (estimate_calls_size_and_time): Likewise.
7799         (estimate_node_size_and_time): Likewise.
7800         (inline_update_callee_summaries): Likewise.
7801         (remap_edge_change_prob): Likewise.
7802         (remap_edge_summaries): Likewise.
7803         (ipa_merge_fn_summary_after_inlining): Likewise.
7804         (ipa_update_overall_fn_summary): Likewise.
7805         (read_ipa_call_summary): Likewise.
7806         (inline_read_section): Likewise.
7807         (write_ipa_call_summary): Likewise.
7808         (ipa_fn_summary_write): Likewise.
7809         (ipa_free_fn_summary): Likewise.
7810         * ipa-hsa.c (process_hsa_functions): Likewise.
7811         (ipa_hsa_write_summary): Likewise.
7812         (ipa_hsa_read_section): Likewise.
7813         * ipa-icf.c (sem_function::merge): Likewise.
7814         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7815         (do_estimate_edge_time): Likewise.
7816         (estimate_size_after_inlining): Likewise.
7817         (estimate_growth): Likewise.
7818         (growth_likely_positive): Likewise.
7819         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7820         (inline_call): Likewise.
7821         * ipa-inline.c (caller_growth_limits): Likewise.
7822         (can_inline_edge_p): Likewise.
7823         (can_inline_edge_by_limits_p): Likewise.
7824         (compute_uninlined_call_time): Likewise.
7825         (compute_inlined_call_time): Likewise.
7826         (want_inline_small_function_p): Likewise.
7827         (edge_badness): Likewise.
7828         (update_caller_keys): Likewise.
7829         (update_callee_keys): Likewise.
7830         (recursive_inlining): Likewise.
7831         (inline_small_functions): Likewise.
7832         (inline_to_all_callers_1): Likewise.
7833         (dump_overall_stats): Likewise.
7834         (early_inline_small_functions): Likewise.
7835         (early_inliner): Likewise.
7836         * ipa-inline.h (estimate_edge_growth): Likewise.
7837         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7838         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7839         * ipa-prop.h (IPA_NODE_REF): Likewise.
7840         (IPA_EDGE_REF): Likewise.
7841         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7842         (propagate_malloc): Likewise.
7843         * ipa-split.c (execute_split_functions): Likewise.
7844         * symbol-summary.h: Rename get to get_create.
7845         (get): Likewise.
7846         (get_create): Likewise.
7847         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7849 2018-06-08  Martin Liska  <mliska@suse.cz>
7851         * symbol-summary.h (release): Move definition out of class
7852         declaration.
7853         (symtab_removal): Likewise.
7854         (symtab_duplication): Likewise.
7856 2018-06-08  Martin Liska  <mliska@suse.cz>
7858         * symbol-summary.h (function_summary): Move constructor
7859         implementation out of class declaration.
7860         (release): Likewise.
7861         (symtab_insertion): Likewise.
7862         (symtab_removal): Likewise.
7863         (symtab_duplication): Likewise.
7864         (get): Likewise.
7866 2018-06-08  Martin Liska  <mliska@suse.cz>
7868         * Makefile.in: Remove support for MPX (macros, related functions,
7869         fields in cgraph_node, ...).
7870         * builtin-types.def (BT_BND): Likewise.
7871         (BT_FN_BND_CONST_PTR): Likewise.
7872         (BT_FN_CONST_PTR_BND): Likewise.
7873         (BT_FN_VOID_PTR_BND): Likewise.
7874         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7875         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7876         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7877         (expand_builtin_mempcpy_with_bounds): Likewise.
7878         (expand_builtin_memset_with_bounds): Likewise.
7879         (expand_builtin_memset_args): Likewise.
7880         (std_expand_builtin_va_start): Likewise.
7881         (expand_builtin): Likewise.
7882         (expand_builtin_with_bounds): Likewise.
7883         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7884         (DEF_LIB_BUILTIN_CHKP): Likewise.
7885         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7886         (DEF_CHKP_BUILTIN): Likewise.
7887         (BUILT_IN_MEMCPY): Likewise.
7888         (BUILT_IN_MEMMOVE): Likewise.
7889         (BUILT_IN_MEMPCPY): Likewise.
7890         (BUILT_IN_MEMSET): Likewise.
7891         (BUILT_IN_STPCPY): Likewise.
7892         (BUILT_IN_STRCAT): Likewise.
7893         (BUILT_IN_STRCHR): Likewise.
7894         (BUILT_IN_STRCPY): Likewise.
7895         (BUILT_IN_STRLEN): Likewise.
7896         (BUILT_IN_MEMCPY_CHK): Likewise.
7897         (BUILT_IN_MEMMOVE_CHK): Likewise.
7898         (BUILT_IN_MEMPCPY_CHK): Likewise.
7899         (BUILT_IN_MEMSET_CHK): Likewise.
7900         (BUILT_IN_STPCPY_CHK): Likewise.
7901         (BUILT_IN_STRCAT_CHK): Likewise.
7902         (BUILT_IN_STRCPY_CHK): Likewise.
7903         * calls.c (store_bounds): Likewise.
7904         (emit_call_1): Likewise.
7905         (special_function_p): Likewise.
7906         (maybe_warn_nonstring_arg): Likewise.
7907         (initialize_argument_information): Likewise.
7908         (finalize_must_preallocate): Likewise.
7909         (compute_argument_addresses): Likewise.
7910         (expand_call): Likewise.
7911         * cfgexpand.c (expand_call_stmt): Likewise.
7912         (expand_return): Likewise.
7913         (expand_gimple_stmt_1): Likewise.
7914         (pass_expand::execute): Likewise.
7915         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7916         (cgraph_node::remove): Likewise.
7917         (cgraph_node::dump): Likewise.
7918         (cgraph_node::verify_node): Likewise.
7919         * cgraph.h (chkp_function_instrumented_p): Likewise.
7920         (symtab_node::get_alias_target): Likewise.
7921         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7922         (cgraph_local_p): Likewise.
7923         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7924         (cgraph_edge::rebuild_references): Likewise.
7925         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7926         (walk_polymorphic_call_targets): Likewise.
7927         (cgraph_node::expand_thunk): Likewise.
7928         (symbol_table::output_weakrefs): Likewise.
7929         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7930         (ix86_handle_option): Likewise.
7931         * config/i386/constraints.md: Likewise.
7932         * config/i386/i386-builtin-types.def (BND): Likewise.
7933         (VOID): Likewise.
7934         (PVOID): Likewise.
7935         (ULONG): Likewise.
7936         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7937         (BDESC_FIRST): Likewise.
7938         (BDESC): Likewise.
7939         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7940         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7941         * config/i386/i386.c (enum reg_class): Likewise.
7942         (ix86_target_string): Likewise.
7943         (ix86_option_override_internal): Likewise.
7944         (ix86_conditional_register_usage): Likewise.
7945         (ix86_valid_target_attribute_inner_p): Likewise.
7946         (ix86_set_indirect_branch_type): Likewise.
7947         (ix86_set_current_function): Likewise.
7948         (ix86_function_arg_regno_p): Likewise.
7949         (init_cumulative_args): Likewise.
7950         (ix86_function_arg_advance): Likewise.
7951         (ix86_function_arg): Likewise.
7952         (ix86_pass_by_reference): Likewise.
7953         (ix86_function_value_regno_p): Likewise.
7954         (ix86_function_value_1): Likewise.
7955         (ix86_function_value_bounds): Likewise.
7956         (ix86_return_in_memory): Likewise.
7957         (ix86_setup_incoming_vararg_bounds): Likewise.
7958         (ix86_va_start): Likewise.
7959         (indirect_thunk_need_prefix): Likewise.
7960         (print_reg): Likewise.
7961         (ix86_print_operand): Likewise.
7962         (ix86_expand_call): Likewise.
7963         (ix86_output_function_return): Likewise.
7964         (reg_encoded_number): Likewise.
7965         (BDESC_VERIFYS): Likewise.
7966         (ix86_init_mpx_builtins): Likewise.
7967         (ix86_init_builtins): Likewise.
7968         (ix86_emit_cmove): Likewise.
7969         (ix86_emit_move_max): Likewise.
7970         (ix86_expand_builtin): Likewise.
7971         (ix86_builtin_mpx_function): Likewise.
7972         (ix86_get_arg_address_for_bt): Likewise.
7973         (ix86_load_bounds): Likewise.
7974         (ix86_store_bounds): Likewise.
7975         (ix86_load_returned_bounds): Likewise.
7976         (ix86_store_returned_bounds): Likewise.
7977         (ix86_class_likely_spilled_p): Likewise.
7978         (ix86_hard_regno_mode_ok): Likewise.
7979         (x86_order_regs_for_local_alloc): Likewise.
7980         (ix86_mitigate_rop): Likewise.
7981         (ix86_bnd_prefixed_insn_p): Likewise.
7982         (ix86_mpx_bound_mode): Likewise.
7983         (ix86_make_bounds_constant): Likewise.
7984         (ix86_initialize_bounds): Likewise.
7985         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7986         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7987         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7988         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7989         (TARGET_CHKP_BOUND_MODE): Likewise.
7990         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7991         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7992         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7993         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7994         * config/i386/i386.h (TARGET_MPX): Likewise.
7995         (TARGET_MPX_P): Likewise.
7996         (VALID_BND_REG_MODE): Likewise.
7997         (FIRST_BND_REG): Likewise.
7998         (LAST_BND_REG): Likewise.
7999         (enum reg_class): Likewise.
8000         (BND_REG_P): Likewise.
8001         (BND_REGNO_P): Likewise.
8002         (BNDmode): Likewise.
8003         (ADJUST_INSN_LENGTH): Likewise.
8004         * config/i386/i386.md: Likewise.
8005         * config/i386/i386.opt: Likewise.
8006         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
8007         (defined): Likewise.
8008         (LINK_MPX): Likewise.
8009         (MPX_SPEC): Likewise.
8010         (LIBMPX_SPEC): Likewise.
8011         (LIBMPXWRAPPERS_SPEC): Likewise.
8012         (CHKP_SPEC): Likewise.
8013         * config/i386/predicates.md: Likewise.
8014         * dbxout.c (dbxout_type): Likewise.
8015         * doc/extend.texi: Likewise.
8016         * doc/invoke.texi: Likewise.
8017         * doc/md.texi: Likewise.
8018         * doc/tm.texi: Likewise.
8019         * doc/tm.texi.in: Likewise.
8020         * dwarf2out.c (is_base_type): Likewise.
8021         (gen_formal_types_die): Likewise.
8022         (gen_subprogram_die): Likewise.
8023         (gen_type_die_with_usage): Likewise.
8024         (gen_decl_die): Likewise.
8025         (dwarf2out_late_global_decl): Likewise.
8026         * expr.c (expand_assignment): Likewise.
8027         (emit_storent_insn): Likewise.
8028         (store_expr_with_bounds): Likewise.
8029         (store_expr): Likewise.
8030         (expand_expr_real_1): Likewise.
8031         * expr.h (store_expr_with_bounds): Likewise.
8032         * function.c (use_register_for_decl): Likewise.
8033         (struct bounds_parm_data): Likewise.
8034         (assign_parms_augmented_arg_list): Likewise.
8035         (assign_parm_find_entry_rtl): Likewise.
8036         (assign_parm_is_stack_parm): Likewise.
8037         (assign_parm_load_bounds): Likewise.
8038         (assign_bounds): Likewise.
8039         (assign_parms): Likewise.
8040         (expand_function_start): Likewise.
8041         * gcc.c (CHKP_SPEC): Likewise.
8042         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
8043         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8044         (wrestrict_dom_walker::check_call): Likewise.
8045         * gimple.c (gimple_build_call_from_tree): Likewise.
8046         * gimple.h (enum gf_mask): Likewise.
8047         (gimple_call_with_bounds_p): Likewise.
8048         (gimple_call_set_with_bounds): Likewise.
8049         * gimplify.c (gimplify_init_constructor): Likewise.
8050         * ipa-cp.c (initialize_node_lattices): Likewise.
8051         (propagate_constants_across_call): Likewise.
8052         (find_more_scalar_values_for_callers_subset): Likewise.
8053         * ipa-hsa.c (process_hsa_functions): Likewise.
8054         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8055         * ipa-icf.c (sem_function::merge): Likewise.
8056         * ipa-inline.c (early_inliner): Likewise.
8057         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8058         (warn_function_cold): Likewise.
8059         (propagate_pure_const): Likewise.
8060         * ipa-ref.h (enum GTY): Likewise.
8061         * ipa-split.c (find_retbnd): Likewise.
8062         (consider_split): Likewise.
8063         (split_function): Likewise.
8064         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8065         * ipa.c (walk_polymorphic_call_targets): Likewise.
8066         (symbol_table::remove_unreachable_nodes): Likewise.
8067         (process_references): Likewise.
8068         (cgraph_build_static_cdtor_1): Likewise.
8069         * lto-cgraph.c (lto_output_node): Likewise.
8070         (output_refs): Likewise.
8071         (compute_ltrans_boundary): Likewise.
8072         (input_overwrite_node): Likewise.
8073         (input_node): Likewise.
8074         (input_cgraph_1): Likewise.
8075         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8076         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8077         (class pass_chkp_instrumentation_passes): Likewise.
8078         (make_pass_chkp_instrumentation_passes): Likewise.
8079         * passes.def: Likewise.
8080         * rtl.h (struct GTY): Likewise.
8081         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8082         * stor-layout.c (layout_type): Likewise.
8083         * symtab.c: Likewise.
8084         * target.def: Likewise.
8085         * targhooks.c (default_chkp_bound_type): Likewise.
8086         (default_chkp_bound_mode): Likewise.
8087         (default_builtin_chkp_function): Likewise.
8088         (default_chkp_function_value_bounds): Likewise.
8089         (default_chkp_make_bounds_constant): Likewise.
8090         (default_chkp_initialize_bounds): Likewise.
8091         * targhooks.h (default_chkp_bound_type): Likewise.
8092         (default_chkp_bound_mode): Likewise.
8093         (default_builtin_chkp_function): Likewise.
8094         (default_chkp_function_value_bounds): Likewise.
8095         (default_chkp_make_bounds_constant): Likewise.
8096         (default_chkp_initialize_bounds): Likewise.
8097         * toplev.c (compile_file): Likewise.
8098         (process_options): Likewise.
8099         * tree-core.h (DEF_BUILTIN): Likewise.
8100         (DEF_BUILTIN_CHKP): Likewise.
8101         * tree-inline.c (declare_return_variable): Likewise.
8102         (remap_gimple_stmt): Likewise.
8103         (copy_bb): Likewise.
8104         (initialize_inlined_parameters): Likewise.
8105         (expand_call_inline): Likewise.
8106         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8107         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8108         (make_pass_ipa_chkp_produce_thunks): Likewise.
8109         (make_pass_chkp): Likewise.
8110         (make_pass_chkp_opt): Likewise.
8111         (make_pass_chkp_instrumentation_passes): Likewise.
8112         * tree-pretty-print.c (dump_generic_node): Likewise.
8113         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8114         * tree-ssa-dce.c (propagate_necessity): Likewise.
8115         (eliminate_unnecessary_stmts): Likewise.
8116         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8117         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8118         * tree-ssa-sccvn.h: Likewise.
8119         * tree-ssa-strlen.c (get_string_length): Likewise.
8120         (valid_builtin_call): Likewise.
8121         (adjust_last_stmt): Likewise.
8122         (handle_builtin_strchr): Likewise.
8123         (handle_builtin_strcpy): Likewise.
8124         (handle_builtin_stxncpy): Likewise.
8125         (handle_builtin_memcpy): Likewise.
8126         (handle_builtin_strcat): Likewise.
8127         (strlen_check_and_optimize_stmt): Likewise.
8128         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8129         * tree-streamer-in.c: Likewise.
8130         * tree-streamer.c (record_common_node): Likewise.
8131         * tree.c (tree_code_size): Likewise.
8132         (wide_int_to_tree_1): Likewise.
8133         (type_contains_placeholder_1): Likewise.
8134         (build_common_tree_nodes): Likewise.
8135         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8136         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8137         (POINTER_BOUNDS_P): Likewise.
8138         (BOUNDED_TYPE_P): Likewise.
8139         (BOUNDED_P): Likewise.
8140         (CALL_WITH_BOUNDS_P): Likewise.
8141         (pointer_bounds_type_node): Likewise.
8142         * value-prof.c (gimple_ic): Likewise.
8143         * var-tracking.c (vt_add_function_parameters): Likewise.
8144         * varasm.c (make_decl_rtl): Likewise.
8145         (assemble_start_function): Likewise.
8146         (output_constant): Likewise.
8147         (maybe_assemble_visibility): Likewise.
8148         * varpool.c (ctor_for_folding): Likewise.
8149         * chkp-builtins.def: Remove.
8150         * ipa-chkp.c: Remove.
8151         * ipa-chkp.h: Remove.
8152         * rtl-chkp.c: Remove.
8153         * rtl-chkp.h: Remove.
8154         * tree-chkp-opt.c: Remove.
8155         * tree-chkp.c: Remove.
8156         * tree-chkp.h: Remove.
8158 2018-06-07  Carl Love  <cel@us.ibm.com>
8160         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8161         vextract_fp_from_shortl): Add BE support.
8163 2018-06-07  Paul Koning  <ni1d@arrl.net>
8165         * compare-elim.c (try_merge_compare): Don't merge compare if
8166         address contains a side effect.
8167         (try_eliminate_compare): Likewise.
8169 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8171         * config.gcc: Support "tremont".
8172         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8173         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8174         PROCESSOR_TREMONT.
8175         * config/i386/i386.c (m_TREMONT): Define.
8176         (processor_target_table): Add "tremont".
8177         (PTA_TREMONT): Define.
8178         (ix86_lea_outperforms): Add TARGET_TREMONT.
8179         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8180         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8181         and M_INTEL_GOLDMONT_PLUS.
8182         (fold_builtin_cpu): Add "tremont".
8183         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8184         (ix86_option_override_internal): Add "tremont".
8185         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8186         (processor_type): Add PROCESSOR_TREMONT.
8187         * config/i386/x86-tune.def: Add m_TREMONT.
8188         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8190 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8192         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8193         symbol defined for msp430i* devices to be lower case.
8195 2018-06-07  Richard Biener  <rguenther@suse.de>
8197         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8198         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8199         Properly wrap signed arithmetic if overflow wraps.
8201 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8203         PR tree-optimization/69615
8204         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8205         of a cast from a same precision integral SSA_NAME in a bb dominated
8206         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8207         cast to utype if rhs2 has already a compatible type.
8209 2018-06-07  Richard Biener  <rguenther@suse.de>
8211         PR tree-optimization/85935
8212         * graphite-scop-detection.c (find_params_in_bb): Analyze
8213         condition operands with respect to the correct loop.  Assert
8214         the analysis doesn't fail.
8216 2018-06-04  Carl Love  <cel@us.ibm.com>
8218         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8219         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8220         as it is slightly cheaper.
8221         (first_match_or_eos_index_<mode>):
8222         Calculate index using natural element order.
8223         (first_match_index_<mode>):
8224         Calculate index using natural element order.
8225         (first_match_or_eos_index_<mode>):
8226         Calculate index using natural order.
8227         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8228         for BE and LE modes.
8229         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8230         P9V_BUILTIN_VCLZLSBB_V16QI.
8231         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8232         specific.
8234 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8236         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8237         indentation and line wrap for many prototypes.  Add missing
8238         @smallexample directives around block of prototypes for vec_xl and
8239         vec_xst.
8241 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8243         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8244         track if we pass or return IEEE 128-bit floating point.
8245         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8246         C++ mangling that is compatible with GCC 8.1.
8247         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8248         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8249         floating point types.
8250         (rs6000_function_arg_advance_1): Likewise.
8251         (rs6000_mangle_type): Optionally generate mangled names that match
8252         what GCC 8.1 generated for IEEE 128-bit floating point types.
8253         (rs6000_globalize_decl_name): If we have an external function that
8254         passes or returns IEEE 128-bit types, generate a weak reference
8255         from the mangled name used in GCC 8.1 to the current mangled
8256         name.
8257         (rs6000_init_builtins): Make __ibm128 use the long double type if
8258         long double is IBM extended double.  Make __float128 use the long
8259         double type if long double is IEEE 128-bit.
8261         PR target/85657
8262         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8263         macro for __ibm128 built-in functions.
8264         (PACK_IF): Add __ibm128 pack/unpack functions.
8265         (UNPACK_IF): Likewise.
8266         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8267         enable long double built-in functions if long double is IEEE
8268         128-bit floating point.
8269         (rs6000_invalid_builtin): Update long double built-in function
8270         error message.
8271         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8272         functions, adjust the built-in function to use the long double
8273         built-in function if __ibm128 and long double are the same type.
8274         * doc/extend.texi (PowerPC builtins): Update documention for
8275         __builtin_{,un}pack_longdouble.  Add documentation for
8276         __builtin_{,un}pack_ibm128.
8278 2018-06-06  Jim Wilson  <jimw@sifive.com>
8280         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8281         (struct machine_function): New field interrupt_mode.
8282         (riscv_handle_type_attribute): New function.  Add forward declaration.
8283         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8284         (riscv_expand_epilogue): Check interrupt_mode field.
8285         (riscv_set_current_function): Check interrupt attribute args and
8286         set interrupt_mode field.
8287         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8288         (riscv_sret, riscv_uret): New.
8289         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8290         new arguments to interrupt attribute.
8292 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8294         PR target/63177
8295         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8296         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8298 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8300         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8301         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8302         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8303         several redundant entries.
8305 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8307         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8308         type from "rtx" to "rtx_insn *".
8309         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8310         for local "call_insn", removing cast.
8311         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8313 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8315         PR tree-optimization/86066
8316         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8317         for BIT_INSERT_EXPR stores.
8319 2018-06-06  Richard Biener  <rguenther@suse.de>
8321         PR tree-optimization/86062
8322         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8323         component refs ontop
8324         of to be offsetted base.
8326 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8328         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8329         to be static and remove check on interrupt attribute name.
8331 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8333         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8334         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8336 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8338         PR target/79924
8339         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8340         second argument.
8341         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8342         Remove second argument, change how error is called.
8343         (aarch64_layout_arg): Remove second argument from
8344         aarch64_err_no_fpadvsimd call.
8345         (aarch64_init_cumulative_args): Ditto.
8346         (aarch64_gimplify_va_arg_expr): Ditto.
8347         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8349 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8351         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8352         (*simple_return_indirect_internal<mode>): Rename from
8353         simple_return_indirect_internal.  Use W mode iterator.
8354         (rstorssp): New expander.
8355         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8356         (clrssbsy): New expander.
8357         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8359 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8361         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8362         __typeof__.
8363         (cmse_check_pointed_object): Likewise.
8365 2018-06-05  Martin Liska  <mliska@suse.cz>
8367         PR gcov-profile/47618
8368         * doc/invoke.texi: Document how -fprofile-dir format
8369         is extended.
8371 2018-06-05  Richard Biener  <rguenther@suse.de>
8373         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8374         removal pretend DOM info isn't available so we do not update
8375         it and only remove edges, not dominated blocks.  Actually free
8376         DOM info in case we removed something.  Remove unreachable blocks.
8377         (mfb_keep_latches): Work with either DOM info or marked backedges.
8378         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8379         first.  Mark backedges if DOM info isn't available.
8380         (Re-)compute DOM info after cleanup_control_flow_pre.
8382 2018-06-05  Richard Biener  <rguenther@suse.de>
8384         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8385         (locus_discrim_hasher::hash): Adjust.
8386         (locus_discrim_hasher::equal): Likewise.
8387         (next_discriminator_for_locus): Work on line directly.
8388         (same_line_p): Pass in expanded locus1 as well.
8389         (assign_discriminators): Avoid redundant location expansions.
8391 2018-06-05  Richard Biener  <rguenther@suse.de>
8393         PR tree-optimization/86046
8394         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8395         if required after clearing TREE_ADDRESSABLE.
8397 2018-06-05  Richard Biener  <rguenther@suse.de>
8399         PR tree-optimization/86047
8400         * tree-ssa-loop.c (for_each_index): Glob handling of all
8401         decls and constants and really handle all of them.
8403 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8405         PR target/81497
8406         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8407         qualifier_void_pointer and qualifier_const_void_pointer.
8408         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8409         (arm_init_builtins): Handle the above.
8410         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8411         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8412         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8413         void intrinsics.
8415 2018-06-05  Martin Liska  <mliska@suse.cz>
8417         * auto-profile.c (read_autofdo_file): Do not use
8418         gcov_ctr_summary struct.
8419         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8420         * coverage.c (struct counts_entry): Likewise.
8421         (read_counts_file): Read just single summary entry.
8422         (get_coverage_counts): Use gcov_summary struct.
8423         * coverage.h (get_coverage_counts): Likewise.
8424         * gcov-dump.c (dump_working_sets): Likewise.
8425         (tag_summary): Dump just single summary.
8426         * gcov-io.c (gcov_write_summary): Write just histogram
8427         summary.
8428         (gcov_read_summary): Read just single summary.
8429         (compute_working_sets): Use gcov_summary struct.
8430         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8431         of GCOV_COUNTERS_SUMMABLE.
8432         (GCOV_COUNTERS_SUMMABLE): Remove.
8433         (GCOV_FIRST_VALUE_COUNTER): Replace with
8434         GCOV_COUNTER_V_INTERVAL.
8435         (struct gcov_ctr_summary): Remove.
8436         (struct gcov_summary): Directly use fields of former
8437         gcov_ctr_summary.
8438         (compute_working_sets): Use gcov_summary struct.
8439         * gcov.c (read_count_file): Do not use ctrs fields.
8440         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8441         struct.
8442         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8443         struct.
8444         * profile.c: Likewise.
8445         * profile.h: Likewise.
8447 2018-06-05  Martin Liska  <mliska@suse.cz>
8449         PR gcov-profile/84846
8450         * gcov.c (output_lines): Print working directory only
8451         in intermediate format.
8453 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8455         * config/s390/s390-builtin-types.def: Add void function type.
8456         * config/s390/s390-builtins.def: Use the function type for the
8457         tbeginc builtin.
8459 2018-06-04  Jim Wilson  <jimw@sifive.com>
8461         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8462         to int.
8463         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8464         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8465         handle EH_RETURN_DATA_REGNO registers properly.
8466         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8467         (riscv_expand_epilogue): Update comment.  Change argument name and
8468         type.  Update code to use new name and type.  Pass new args to
8469         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8470         EXCEPTION_RETURN.
8471         * config/riscv/riscv.md (NORMAL_RETURN): New.
8472         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8473         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8474         (eh_return): Call gen_eh_return_internal and emit barrier.
8475         (eh_return_internal): Call riscv_expand_epilogue.
8477 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8479         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8480         bit_insertion field and declare can_be_merged_into method.
8481         (merged_store_group::can_be_merged_into): New method.
8482         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8483         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8484         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8486 2018-06-04  Richard Biener  <rguenther@suse.de>
8488         PR tree-optimization/85955
8489         * builtins.c (fold_builtin_sincos): Convert pointers to
8490         destination to appropriate type before dereferencing.
8492 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8494         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8496 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8498         * expr.c (expand_expr_real_1): Force the operand into memory if
8499         its TYPE_MODE is BLKmode and if there is no integer mode for
8500         the number of bits being extracted.
8502 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8504         PR target/85832
8505         PR target/86036
8506         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8507         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8509 2018-06-04  Richard Biener  <rguenther@suse.de>
8511         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8512         (cleanup_tree_cfg_noloop): ... single caller.  Do
8513         start_recording_case_labels later.
8515 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8517         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8518         to _IMMINTRIN_H_INCLUDED.
8519         * config/i386/pconfigintrin.h: Ditto.
8520         * config/i386/waitpkgintrin.h: Ditto.
8521         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8522         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8523         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8524         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8525         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8526         waitpkgintrin.h and cldemoteintrin.h.
8528 2018-06-04  Richard Biener  <rguenther@suse.de>
8530         PR tree-optimization/86038
8531         * tracer.c (find_best_successor): Check probability for
8532         being initialized, bail out if not.
8534 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8536         PR target/86003
8537         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8538         of bits to ignore when comparing architectures.
8540 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8542         PR tree-optimization/69615
8543         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8544         maximum or minimum of the type, try to merge it also as if
8545         range1 is + [-, x - 1] or + [x + 1, -].
8547         PR c++/86025
8548         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8550 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8552         PR tree-optimization/86034
8553         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8554         the unsigned bitfield type in a bit insertion sequence if it does not
8555         have a larger precision than the bitfield size.
8556         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8558 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8560         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8562 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8564         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8565         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8566         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8567         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8569 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8571         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8572         Disable -fdelete-null-pointer-checks for ELF toolchain.
8574 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8575             Kito Cheng  <kito.cheng@gmail.com>
8577         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8578         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8579         (nds32*-*-*): Add glibc and uclibc conditions.
8580         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8581         (TARGET_EXCEPT_UNWIND_INFO): Define.
8582         * config/nds32/elf.h: New file.
8583         * config/nds32/linux.h: New file.
8584         * config/nds32/nds32-elf.opt: New file.
8585         * config/nds32/nds32-linux.opt: New file.
8586         * config/nds32/nds32-fp-as-gp.c
8587         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8588         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8589         TARGET_LINUX_ABI.
8590         (nds32_asm_file_end): Ditto.
8591         (nds32_print_operand): Ditto.
8592         (nds32_insert_attributes): Ditto.
8593         (nds32_init_libfuncs): New function.
8594         (TARGET_HAVE_TLS): Define.
8595         (TARGET_INIT_LIBFUNCS): Define.
8596         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8597         spec content.
8598         (TARGET_ELF): Apply different mcmodel setting.
8599         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8600         been migrated into elf.h and linux.h files.
8601         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8602         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8603         (mcmodel): The content has been migrated into nds32-elf.opt and
8604         nds32-linux.opt files.
8605         * config/nds32/t-elf: New file.
8606         * config/nds32/t-linux: New file.
8608 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8609             Shiva Chen  <shiva0217@gmail.com>
8611         * config/nds32/constants.md (unspec_volatile_element): Add
8612         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8613         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8614         optimization.
8615         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8616         (make_pass_nds32_fp_as_gp): Declare.
8617         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8618         optmization pass.
8619         (nds32_asm_function_end_prologue): Remove unused asm output.
8620         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8621         (nds32_asm_file_start): Output necessary fp_as_gp information.
8622         (nds32_option_override): Adjust register usage.
8623         (nds32_expand_prologue): Consider fp_as_gp situation.
8624         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8625         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8626         (epilogue): Ditto.
8627         (return): Ditto.
8628         (simple_return): Ditto.
8629         (omit_fp_begin): Output special directive for fp_as_gp.
8630         (omit_fp_end): Output special directive for fp_as_gp.
8631         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8632         mforbid-fp-as-gp): New options.
8634 2018-06-01  Mark Wielaard  <mark@klomp.org>
8636         * dwarf2out.c (dwarf2out_finish): Remove generation of
8637         DW_AT_loclists_base.
8639 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8641         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8642         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8643         (struct merged_store_group): Add bit_insertion field.
8644         (dump_char_array): Use standard hexadecimal format.
8645         (merged_store_group::merged_store_group): Set bit_insertion to false.
8646         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8647         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8648         also print the mask in the dump file.
8649         (pass_store_merging::gate): Minor tweak.
8650         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8651         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8652         stores with INTEGER_CST stores.
8653         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8654         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8655         and use it throughout.  Generate bit insertion sequences if need be.
8656         (pass_store_merging::process_store): Remove redundant condition.
8657         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8659 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8661         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8662         the 128-bit floating point types.  Fix function comment.
8664 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8666         * config/aarch64/aarch64-simd.md
8667         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8668         mnemonics.
8669         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8670         mnemonics.
8672 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8674         PR tree-optimization/85989
8675         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8676         variable.
8677         (backprop::intersect_uses): Check it when deciding whether this
8678         is a backedge reference.
8679         (backprop::process_block): Add each phi to m_visited_phis
8680         after visiting it, then clear it at the end.
8682 2018-06-01  Richard Biener  <rguenther@suse.de>
8684         * tree-vectorizer.h (vect_dr_stmt): New function.
8685         (vect_get_load_cost): Adjust.
8686         (vect_get_store_cost): Likewise.
8687         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8688         Use vect_dr_stmt instead of DR_SMTT.
8689         (vect_record_base_alignments): Likewise.
8690         (vect_calculate_target_alignment): Likewise.
8691         (vect_compute_data_ref_alignment): Likewise and make static.
8692         (vect_update_misalignment_for_peel): Likewise.
8693         (vect_verify_datarefs_alignment): Likewise.
8694         (vector_alignment_reachable_p): Likewise.
8695         (vect_get_data_access_cost): Likewise.  Pass down
8696         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8697         (vect_get_peeling_costs_all_drs): Likewise.
8698         (vect_peeling_hash_get_lowest_cost): Likewise.
8699         (vect_enhance_data_refs_alignment): Likewise.
8700         (vect_find_same_alignment_drs): Likewise.
8701         (vect_analyze_data_refs_alignment): Likewise.
8702         (vect_analyze_group_access_1): Likewise.
8703         (vect_analyze_group_access): Likewise.
8704         (vect_analyze_data_ref_access): Likewise.
8705         (vect_analyze_data_ref_accesses): Likewise.
8706         (vect_vfa_segment_size): Likewise.
8707         (vect_small_gap_p): Likewise.
8708         (vectorizable_with_step_bound_p): Likewise.
8709         (vect_prune_runtime_alias_test_list): Likewise.
8710         (vect_analyze_data_refs): Likewise.
8711         (vect_supportable_dr_alignment): Likewise.
8712         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8713         (vect_gen_prolog_loop_niters): Likewise.
8714         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8715         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8716         modify DR_STMT.
8717         (vect_recog_mask_conversion_pattern): Likewise.
8718         (vect_try_gather_scatter_pattern): Likewise.
8719         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8720         to vect_get_store_cost.
8721         (vect_get_store_cost): Get stmt_info instead of DR.
8722         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8723         (vect_get_load_cost): Get stmt_info instead of DR.
8725 2018-06-01  Richard Biener  <rguenther@suse.de>
8727         PR middle-end/86017
8728         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8729         vars wrapped in MEM_REFs.
8731 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8733         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8734         Fix subreg tests so that we only return a choice between
8735         GENERAL_REGS and FP_REGS if the original classes included both.
8737 2018-06-01  Richard Biener  <rguenther@suse.de>
8739         PR ipa/85960
8740         * tree-ssa-structalias.c (get_function_part_constraint):
8741         Handle NULL fi->decl.
8742         (find_func_aliases_for_call): Properly handle indirect
8743         fi from direct call.
8744         (find_func_clobbers): Likewise.
8745         (ipa_pta_execute): Likewise.
8746         (create_variable_info_for): For functions that are ifunc_resolver
8747         resolve to a varinfo that contains the result of the resolver call.
8748         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8749         aliases.
8751 2018-05-31  Michael Collison  <michael.collison@arm.com>
8753         * config/aarch64/aarch64.md:
8754         (*fix_to_zero_extenddfdi2): New pattern.
8755         * gcc.target/aarch64/fix_extend1.c: New testcase.
8757 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8759         PR middle-end/78809
8760         PR middle-end/83026
8761         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8762         and BUILT_IN_STRNCMP_EQ.
8763         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8764         BUILT_IN_STRNCMP_EQ.
8765         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8766         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8767         (gimple_fold_builtin): Likewise.
8768         * tree-ssa-strlen.c (compute_string_length): New function.
8769         (determine_min_obsize): New function.
8770         (handle_builtin_string_cmp): New function to handle calls to
8771         string compare functions.
8772         (strlen_optimize_stmt): Add handling to builtin string compare
8773         calls.
8774         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8775         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8776         * tree.c (build_common_builtin_nodes): Add new defines of
8777         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8779 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8781         PR target/85984
8782         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8783         functions with naked attribute.
8785 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8787         * config/i386/sse.md (avx_vec_concat<mode>):
8788         Substitute concat_tg_mode mode attribute with xtg_mode.
8789         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8790         (concat_tg_mode): Remove mode attribute.
8792 2018-05-31  Martin Sebor  <msebor@redhat.com>
8794         PR c/82063
8795         * calls.c (alloc_max_size): Correct a logic error/typo.
8796         Treat excessive arguments as infinite.  Warn for invalid arguments.
8797         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8799 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8801         PR target/85829
8802         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8803         and movx for Haswell.
8805 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8806             Cesar Philippidis  <cesar@codesourcery.com>
8808         PR middle-end/85879
8809         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8810         when emitting error on private/firstprivate reductions.
8811         * omp-low.c (lower_omp_target): Avoid reference-type processing
8812         on pointers for firstprivate clause.
8814 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8816         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8817         (st1x2): Likewise.
8818         (st1x3): Likewise.
8819         * config/aarch64/aarch64-simd.md
8820         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8821         (aarch64_ld1_x3_<mode>): Likewise
8822         (aarch64_st1x2<VALLDIF:mode>): Likewise
8823         (aarch64_st1_x2_<mode>): Likewise
8824         (aarch64_st1x3<VALLDIF:mode>): Likewise
8825         (aarch64_st1_x3_<mode>): Likewise
8826         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8827         (vld1_s8_x3): Likewise.
8828         (vld1_u16_x3): Likewise.
8829         (vld1_s16_x3): Likewise.
8830         (vld1_u32_x3): Likewise.
8831         (vld1_s32_x3): Likewise.
8832         (vld1_u64_x3): Likewise.
8833         (vld1_s64_x3): Likewise.
8834         (vld1_f16_x3): Likewise.
8835         (vld1_f32_x3): Likewise.
8836         (vld1_f64_x3): Likewise.
8837         (vld1_p8_x3): Likewise.
8838         (vld1_p16_x3): Likewise.
8839         (vld1_p64_x3): Likewise.
8840         (vld1q_u8_x3): Likewise.
8841         (vld1q_s8_x3): Likewise.
8842         (vld1q_u16_x3): Likewise.
8843         (vld1q_s16_x3): Likewise.
8844         (vld1q_u32_x3): Likewise.
8845         (vld1q_s32_x3): Likewise.
8846         (vld1q_u64_x3): Likewise.
8847         (vld1q_s64_x3): Likewise.
8848         (vld1q_f16_x3): Likewise.
8849         (vld1q_f32_x3): Likewise.
8850         (vld1q_f64_x3): Likewise.
8851         (vld1q_p8_x3): Likewise.
8852         (vld1q_p16_x3): Likewise.
8853         (vld1q_p64_x3): Likewise.
8854         (vst1_s64_x2): Likewise.
8855         (vst1_u64_x2): Likewise.
8856         (vst1_f64_x2): Likewise.
8857         (vst1_s8_x2): Likewise.
8858         (vst1_p8_x2): Likewise.
8859         (vst1_s16_x2): Likewise.
8860         (vst1_p16_x2): Likewise.
8861         (vst1_s32_x2): Likewise.
8862         (vst1_u8_x2): Likewise.
8863         (vst1_u16_x2): Likewise.
8864         (vst1_u32_x2): Likewise.
8865         (vst1_f16_x2): Likewise.
8866         (vst1_f32_x2): Likewise.
8867         (vst1_p64_x2): Likewise.
8868         (vst1q_s8_x2): Likewise.
8869         (vst1q_p8_x2): Likewise.
8870         (vst1q_s16_x2): Likewise.
8871         (vst1q_p16_x2): Likewise.
8872         (vst1q_s32_x2): Likewise.
8873         (vst1q_s64_x2): Likewise.
8874         (vst1q_u8_x2): Likewise.
8875         (vst1q_u16_x2): Likewise.
8876         (vst1q_u32_x2): Likewise.
8877         (vst1q_u64_x2): Likewise.
8878         (vst1q_f16_x2): Likewise.
8879         (vst1q_f32_x2): Likewise.
8880         (vst1q_f64_x2): Likewise.
8881         (vst1q_p64_x2): Likewise.
8882         (vst1_s64_x3): Likewise.
8883         (vst1_u64_x3): Likewise.
8884         (vst1_f64_x3): Likewise.
8885         (vst1_s8_x3): Likewise.
8886         (vst1_p8_x3): Likewise.
8887         (vst1_s16_x3): Likewise.
8888         (vst1_p16_x3): Likewise.
8889         (vst1_s32_x3): Likewise.
8890         (vst1_u8_x3): Likewise.
8891         (vst1_u16_x3): Likewise.
8892         (vst1_u32_x3): Likewise.
8893         (vst1_f16_x3): Likewise.
8894         (vst1_f32_x3): Likewise.
8895         (vst1_p64_x3): Likewise.
8896         (vst1q_s8_x3): Likewise.
8897         (vst1q_p8_x3): Likewise.
8898         (vst1q_s16_x3): Likewise.
8899         (vst1q_p16_x3): Likewise.
8900         (vst1q_s32_x3): Likewise.
8901         (vst1q_s64_x3): Likewise.
8902         (vst1q_u8_x3): Likewise.
8903         (vst1q_u16_x3): Likewise.
8904         (vst1q_u32_x3): Likewise.
8905         (vst1q_u64_x3): Likewise.
8906         (vst1q_f16_x3): Likewise.
8907         (vst1q_f32_x3): Likewise.
8908         (vst1q_f64_x3): Likewise.
8909         (vst1q_p64_x3): Likewise.
8911 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8913         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8914         user_label_prefix to name.
8916         * tree-core.h: Update comment about the format of NAME string
8917         passed to handler in attribute_spec.
8919         * config/msp430/msp430.md: Remove erroneous subreg expression from
8920         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8921         zero_extend{q,h}isi2.
8923 2018-05-30  Borislav Petkov  <bp@suse.de>
8925         * doc/extend.texi: Document some architecture specific
8926         constraints and sort entries.
8928 2018-05-30  Martin Sebor  <msebor@redhat.com>
8930         PR middle-end/85369
8931         * builtins.c (expand_builtin_stpcpy_1): New function.
8932         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8933         only if the former succeeds.
8935 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8937         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8938         in saphira.
8940 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8942         * doc/invoke.texi (-flinker-output): Document
8944 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8946         * passes.c (ipa_write_summaries): Only modify statements if body
8947         is in memory.
8948         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8949         incrementally linking.
8950         (ipa_passes): Likewise.
8951         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8952         pass down resolution info.
8953         * common.opt (flag_incremental_link): Update info.
8954         * gcc.c (plugin specs): Turn flinker-output=* to
8955         -plugin-opt=-linker-output-known
8956         * toplev.c (compile_file): Also cut compilation when doing incremental
8957         link.
8958         * flag-types. (enum lto_partition_model): Add
8959         LTO_LINKER_OUTPUT_NOLTOREL.
8960         (invoke.texi): Add -flinker-output docs.
8961         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8962         link same way as WPA; do not stream in dead initializers.
8964         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8965         darf2out_register_external_decl): Support incremental link.
8967 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8969         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8971 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8973         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8974         it down to simple_object_copy_lto_debug_sections.
8975         (run_gcc): Determine incremental LTO link time and configure
8976         lto1 into non-wpa mode, disable renaming of debug sections.
8978 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8980         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8981         descriptions of various incorrectly documented functions.
8983 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8985         Revert:
8986         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8987         address check not strict.
8989 2018-05-30  Richard Biener  <rguenther@suse.de>
8991         PR tree-optimization/85964
8992         * tracer.c (better_p): Drop initialized count check, we only
8993         call the function with initialized counts now.
8994         (find_best_successor): Do find a best edge if one
8995         has uninitialized count.
8996         (find_best_predecessor): Likewise.  Do BB frequency check only
8997         if count is initialized.
8999 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
9001         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
9002         (aarch64_ldrstr_offset_compare): New.
9003         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
9004         load/store orderings.
9005         (aarch64_gen_adjusted_ldpstp): Likewise.
9007 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
9009         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
9010         Check for subset of GENERAL_REGS and FP_REGS.
9011         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
9012         r=w alternative.
9014 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
9016         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
9017         and wi::to_poly_offset.  Add the current offset and then check
9018         whether the sum fits, rather than using an unchecked addition of
9019         a checked term.  Check for a shwi rather than a uhwi.
9020         * expr.c (get_bit_range): Use tree_to_poly_uint64.
9021         (store_constructor): Use poly_int_tree_p.
9022         (expand_expr_real_1): Likewise.
9023         * function.c (assign_temp): Likewise.
9024         * fold-const.c (const_binop): Use poly_int_tree_p and
9025         wi::to_poly_offset.
9026         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
9027         division.
9028         * ipa-icf-gimple.c (func_checker::compare_operand): Use
9029         to_poly_offset for MEM offsets.
9030         * ipa-icf.c (sem_variable::equals): Likewise.
9031         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
9032         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
9033         wi::to_poly_offset for BIT_FIELD_REF offsets.
9034         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
9035         wi::to_poly_offset.
9036         * var-tracking.c (emit_note_insn_var_location): Use
9037         tree_to_poly_uint64.
9039 2018-05-29  Jim Wilson  <jimw@sifive.com>
9041         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
9043 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9045         PR target/85950
9046         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9047         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9048         sequence.
9049         (sse4_1_round<mode>2): Use nonimmediate_operand
9050         for operand 1 predicate.
9052 2018-05-29  Martin Sebor  <msebor@redhat.com>
9053             Richard Biener  <rguenther@suse.de>
9055         PR testsuite/85888
9056         * calls.c (get_size_range): Call determine_value_range instead
9057         of get_value_range..
9058         * tree-vrp.h (determine_value_range): Declared new function.
9059         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9061 2018-05-29  Richard Biener  <rguenther@suse.de>
9063         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9064         sure to use non-pattern stmts for get_earlier_stmt arguments.
9065         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9066         called on pattern stmts.
9067         (get_later_stmt): Likewise.
9069 2018-05-29  Martin Liska  <mliska@suse.cz>
9071         PR gcov-profile/85759
9072         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9073         env variables.
9075 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9077         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9078         VEC_UNPACK_*_EXPR.
9079         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9080         VEC_PACK_*_EXPR.
9082         PR target/85918
9083         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9084         VEC_PACK_FLOAT_EXPR): New tree codes.
9085         * tree-pretty-print.c (op_code_prio): Handle
9086         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9087         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9088         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9089         * tree-inline.c (estimate_operator_cost): Likewise.
9090         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9091         * fold-const.c (const_binop): Likewise.
9092         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9093         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9094         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9095         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9096         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9097         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9098         * expr.c (expand_expr_real_2): Likewise.
9099         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9100         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9101         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9102         optabs.
9103         * optabs.c (expand_widen_pattern_expr): For
9104         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9105         sign from result type rather than operand's type.
9106         (expand_binop_directly): For vec_packu_float_optab and
9107         vec_packs_float_optab allow result type to be different from operand's
9108         type.
9109         * optabs-tree.c (optab_for_tree_code): Handle
9110         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9111         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9112         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9113         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9114         VEC_PACK_FLOAT_EXPR.
9115         * tree-vect-stmts.c (supportable_widening_operation): Handle
9116         FIX_TRUNC_EXPR.
9117         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9118         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9119         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9120         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9121         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9122         mode attributes.
9123         (vec_pack<floatprefix>_float_<mode>): New expander.
9124         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9125         attributes.
9126         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9127         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9128         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9129         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9130         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9131         Document.
9132         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9133         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9134         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9135         VEC_PACK_FLOAT_EXPR): Document.
9137 2018-05-29  Richard Biener  <rguenther@suse.de>
9139         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9140         member.
9141         (stmt_vec_info_vec): Make pointer.
9142         (init_stmt_vec_info_vec): Remove.
9143         (free_stmt_vec_info_vec): Likewise.
9144         (set_stmt_vec_info_vec): New function.
9145         (free_stmt_vec_infos): Likewise.
9146         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9147         (set_vinfo_for_stmt): Likewise.
9148         (get_earlier_stmt): Likewise.
9149         (get_later_stmt): Likewise.
9150         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9151         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9152         (vec_info::~vec_info): Free stmt_vec_infos.
9153         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9154         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9155         (pass_slp_vectorize::execute): Likewise.
9156         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9157         (free_stmt_vec_info_vec): Likewise.
9158         (set_stmt_vec_info_vec): New function.
9159         (free_stmt_vec_infos): Likewise.
9160         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9161         the global stmt_vec_info_vec.
9162         * tree-parloops.c (gather_scalar_reductions): Use
9163         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9164         vector.
9166 2018-05-29  Richard Biener  <rguenther@suse.de>
9168         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9170 2018-05-29  Martin Liska  <mliska@suse.cz>
9171             David Malcolm  <dmalcolm@redhat.com>
9173         * vec.c (test_reverse): New.
9174         (vec_c_tests): Add new test.
9175         * vec.h (vl_ptr>::reverse): New function.
9177 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9179         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9181         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9182         and later.
9184 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9186         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9188 2018-05-28  Richard Biener  <rguenther@suse.de>
9190         PR tree-optimization/85933
9191         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9192         look at stmts marked as vectorizable.
9194 2018-05-28  Richard Biener  <rguenther@suse.de>
9196         PR tree-optimization/85934
9197         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9198         vector boolean check before scalar optimization.
9200 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9202         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9203         for armv5te.
9205 2018-05-28  Mark Wielaard  <mark@klomp.org>
9207         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9208         if it is an expression containing a minus sign.
9210 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9212         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9214 2018-05-27  Paul Koning  <ni1d@arrl.net>
9216         * config/pdp11/pdp11.md (truncsihi2): Remove.
9218 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9219             Chung-Ju Wu  <jasonwucj@gmail.com>
9221         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9222         implementation.
9223         (unaligned_store_dw): Ditto.
9224         * config/nds32/nds32-memory-manipulation.c
9225         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9226         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9227         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9228         (emit_setmem_word_loop): Rename to ...
9229         (emit_setmem_doubleword_loop): ... this.
9230         (nds32_gen_dup_4_byte_to_word_value): New function.
9231         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9232         (nds32_expand_setmem_loop): Refine implementation.
9233         (nds32_expand_setmem_loop_v3m): Ditto.
9234         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9235         pattern.
9237 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9239         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9241 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9243         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9244         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9245         machine->attr_no_prologue_p.
9246         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9247         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9248         (nds32_expand_epilogue): Consider attr_naked_p.
9249         (nds32_expand_epilogue_v3pop): Likewise.
9250         (nds32_can_use_return_insn): Likewise.
9251         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9252         attr_no_prologue_p fields.
9253         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9255 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9257         PR target/85918
9258         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9259         attributes.
9260         * config/i386/sse.md
9261         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9262         Rename to ...
9263         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9264         ... this.
9265         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9266         Rename to ...
9267         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9268         ... this.
9269         (*<floatsuffix>floatv2div2sf2): Rename to ...
9270         (*float<floatunssuffix>v2div2sf2): ... this.
9271         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9272         (float<floatunssuffix>v2div2sf2_mask): ... this.
9273         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9274         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9275         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9276         to ...
9277         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9278         ... this.
9279         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9280         Rename to ...
9281         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9282         ... this.
9283         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9284         Rename to ...
9285         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9286         ... this.
9287         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9288         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9289         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9290         gen_ufix_truncv8dfv8si2.
9291         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9292         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9293         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9294         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9295         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9296         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9297         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9298         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9300 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9302         PR target/85900
9303         PR target/85345
9304         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9306 2018-05-25  Jim Wilson  <jimw@sifive.com>
9308         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9309         * config/riscv/riscv.c (struct machine_function): Add
9310         interrupt_handler_p and attribute_checked_p fields.
9311         (riscv_attribute_table): Add interrupt.
9312         (riscv_interrupt_type_p): New.
9313         (riscv_save_reg_p): Save extra regs for interrupt handler.
9314         (riscv_use_save_libcall): Return false  for interrupt handler.
9315         (riscv_first_stack_step): Add forward declaration.
9316         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9317         for interrupt handler with large frame.  Use it for saved reg list.
9318         (riscv_expand_prologue): Move flag_stack_usage_info support to
9319         eliminate duplication.
9320         (riscv_expand_epilogue): Generate mret for interrupt handler.
9321         (riscv_epilogue_uses): New.
9322         (riscv_can_use_return_insn): Return false for interrupt handler.
9323         (riscv_function_ok_for_sibcall): Likewise.
9324         (riscv_set_current_function): Add interrupt handler support.
9325         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9326         * config/riscv/riscv.md (UNSPECV_MRET): New.
9327         (GP_REGNUM): New.
9328         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9329         (riscv_mret): New.
9330         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9332 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9334         PR tree-optimization/85712
9335         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9336         this candidate has already been replaced in-situ by a copy.
9338 2018-05-25  Jason Merrill  <jason@redhat.com>
9340         PR c++/80485 - inline function non-zero address.
9341         * symtab.c (nonzero_address): Check DECL_COMDAT.
9343 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9345         PR target/83628
9346         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9347         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9348         extension of SImode operation.  Use const123_operand predicate.
9349         (*saddsi_1): Remove.
9350         (*saddl_se_1): Ditto.
9351         (*ssubsi_1): Ditto.
9352         (*ssubl_se_1): Ditto.
9353         * config/alpha/predicates.md (const123_operand): New predicate.
9354         * config/alpha/constraints.md (P): Use IN_RANGE.
9356 2018-05-25  Richard Biener  <rguenther@suse.de>
9358         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9359         defaulted to true.
9360         (ref_maybe_used_by_stmt_p): Likewise.
9361         (stmt_may_clobber_ref_p): Likewise.
9362         (stmt_may_clobber_ref_p_1): Likewise.
9363         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9364         and pass it along.
9365         (ref_maybe_used_by_stmt_p): Likewise.
9366         (stmt_may_clobber_ref_p): Likewise.
9367         (stmt_may_clobber_ref_p_1): Likewise.
9368         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9369         the alias oracle to disambiguate DRs with stmts DR analysis
9370         couldn't handle.
9371         (vect_analyze_data_refs): Do not give up on not analyzable
9372         DRs for BB vectorization.  Remove code truncating the dataref
9373         vector.
9375 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9377         PR target/85832
9378         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9379         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9380         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9382 2018-05-25  Richard Biener  <rguenther@suse.de>
9384         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9385         function, combining stmt data ref gathering and fatal analysis
9386         parts.
9387         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9388         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9389         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9390         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9391         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9393 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9395         PR tree-optimization/85720
9396         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9397         SCC if all partitions are builtins.
9398         (version_loop_by_alias_check): New parameter.  Generate cancelable
9399         runtime alias check if all partitions are builtins.
9400         (distribute_loop): Update call to above function.
9402 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9404         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9405         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9406         (parm_default_def_partition_arg): Ditto.
9407         (set_parm_default_def_partition): Ditto.
9408         (get_parm_default_def_partitions): Ditto and make it static.
9409         (get_undefined_value_partitions): Ditto and make it static.
9410         (remove_ssa_form): Refactor call to init_var_map here.
9411         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9412         computation for loop region.
9413         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9414         (register_default_def): Delete.
9415         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9416         (parm_default_def_partition_arg): Ditto.
9417         (set_parm_default_def_partition): Ditto.
9418         (get_parm_default_def_partitions): Ditto and make it static.
9419         (get_undefined_value_partitions): Ditto and make it static.
9420         (coalesce_with_default, coalesce_with_default): Update comment.
9421         (create_coalesce_list_for_region): New func factored out from
9422         create_outofssa_var_map.
9423         (populate_coalesce_list_for_outofssa): New func factored out from
9424         create_outofssa_var_map and coalesce_ssa_name.
9425         (create_outofssa_var_map): Delete.
9426         (coalesce_ssa_name): Refactor to support live range computation.
9427         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9428         (get_parm_default_def_partitions): Delete.
9429         (get_undefined_value_partitions): Ditto.
9430         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9431         computation for loop region.
9432         (new_tree_live_info, loe_visit_block): Ditto.
9433         (live_worklist, set_var_live_on_entry): Ditto.
9434         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9435         * tree-ssa-live.h (struct _var_map): New fields.
9436         (init_var_map): Change decl.
9437         (region_contains_p): New.
9439 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9441         * tree-ssa-live.h (live_merge_and_clear): Delete.
9443 2018-05-25  Richard Biener  <rguenther@suse.de>
9445         PR c++/85912
9446         * tree-dump.c (dequeue_and_dump): Remove access to removed
9447         operand 2 of a SWITCH_EXPR.
9449 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9451         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9452         multiplication and division.
9453         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9454         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9455         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9456         (cond_udiv_optab, cond_umod_optab): New optabs.
9457         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9458         (IFN_COND_RDIV): New internal functions.
9459         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9460         TRUNC_MOD_EXPR and RDIV_EXPR.
9461         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9462         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9463         New unspecs.
9464         (SVE_INT_BINARY): Include mult.
9465         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9466         (optab, sve_int_op): Handle mult.
9467         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9468         UNSPEC_COND_DIV.
9469         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9470         for SVE_INT_BINARY_SD.
9472 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9474         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9475         (optab, sve_int_op): Handle div and udiv.
9476         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9477         for SVE_INT_BINARY_SD.
9478         (*<optab><mode>3): New insn for the same.
9480 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9482         * tree-vect-patterns.c: Include predict.h.
9483         (vect_recog_divmod_pattern): Restrict check for division support
9484         to when optimizing for size.
9486 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9488         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9489         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9490         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9491         (gimple_match_op::set_op): Likewise.
9492         (gimple_resimplify4): Declare.
9493         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9494         (expr::gen_transform): Likewise.
9495         (decision_tree::gen): Generate a simplification routine for 4 operands.
9496         * gimple-match-head.c (gimple_simplify): Add an overload for
9497         4 operands.  In the top-level function, handle up to 4 call
9498         arguments and call gimple_resimplify4.
9499         (gimple_resimplify4): New function.
9500         (build_call_internal): Pass a fourth operand.
9501         (maybe_push_to_seq): Likewise.
9502         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9503         Fold VEC_COND_EXPRs of an operation and a default value into
9504         an IFN_COND_* function if possible.
9505         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9506         New unspecs.
9507         (SVE_COND_FP_BINARY): Include them.
9508         (optab, sve_fp_op): Handle them.
9509         (SVE_INT_BINARY_REV): New code iterator.
9510         (SVE_COND_FP_BINARY_REV): New int iterator.
9511         (commutative): New int attribute.
9512         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9513         Declare.
9514         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9515         function.
9516         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9517         (*cond_<optab><mode>): New patterns for reversed operands.
9519 2018-05-25  Richard Biener  <rguenther@suse.de>
9521         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9522         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9523         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9524         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9525         * tree-vect-data-refs.c (everywhere): Adjust users.
9526         * tree-vect-loop.c (everywhere): Likewise.
9527         * tree-vect-slp.c (everywhere): Likewise.
9528         * tree-vect-stmts.c (everywhere): Likewise.
9529         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9531 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9533         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9534         Rename to...
9535         (gcc_cv_as_section_exclude): ... this.
9536         Try Solaris as #exclude syntax.
9537         * configure: Regenerate.
9538         * config.in: Regenerate.
9539         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9540         SECTION_EXCLUDE.
9541         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9542         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9544         * varasm.c (default_elf_asm_named_section): Don't check if
9545         HAVE_GAS_SECTION_EXCLUDE is defined.
9547 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9549         * doc/md.texi: Update the documentation of the cond_* optabs
9550         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9551         Describe the scalar case too.
9552         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9553         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9554         instead of 2.
9555         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9556         (get_conditional_internal_fn): Update comment.
9557         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9558         accumulator value as a final argument to conditional functions.
9559         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9560         a define_expand and add an "else" operand.  Assert for now that
9561         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9562         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9563         (*cond_<optab><mode>): New patterns.
9564         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9565         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9566         (UNSPEC_COND_EOR): Delete.
9567         (optab): Remove associated mappings.
9568         (SVE_INT_BINARY): New code iterator.
9569         (sve_int_op): Remove int attribute and add "minus" to the code
9570         attribute.
9571         (SVE_COND_INT_OP): Delete.
9572         (SVE_COND_FP_OP): Rename to...
9573         (SVE_COND_FP_BINARY): ...this.
9575 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9577         * optabs.c (can_reuse_operands_p): New function.
9578         (maybe_legitimize_operands): Try to reuse the results for
9579         earlier operands.
9581 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9583         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9584         Add {q} suffix to insn mnemonic.
9586 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9588         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9589         (msp430_warn_func_return): New.
9591 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9593         * fold-const.c (tree_nonzero_bits): New function.
9594         * fold-const.h (tree_nonzero_bits): Likewise.
9595         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9596         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9598 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9600         PR target/85900
9601         PR target/85345
9602         * varasm.c (assemble_alias): Check ifunc_resolver only on
9603         FUNCTION_DECL.
9605 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9607         PR target/85903
9608         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9609         when memory input operand is handled.
9611 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9613         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9614         global.
9615         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9617 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9619         * match.pd: Delay FMA folds until after vectorization.
9621 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9623         PR target/83009
9624         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9625         address check not strict.
9627 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9629         * gimple-match.h (gimple_match_op): New class.
9630         (mprts_hook): Replace parameters with a gimple_match_op *.
9631         (maybe_build_generic_op): Likewise.
9632         (gimple_simplified_result_is_gimple_val): Replace parameters with
9633         a const gimple_match_op *.
9634         (gimple_simplify): Replace code_helper * and tree * parameters with
9635         a gimple_match_op * parameter.
9636         (gimple_resimplify1): Replace code_helper *, tree and tree *
9637         parameters with a gimple_match_op * parameter.
9638         (gimple_resimplify2): Likewise.
9639         (gimple_resimplify3): Likewise.
9640         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9641         parameters with a gimple_match_op * parameter.
9642         * gimple-match-head.c (gimple_simplify): Change prototypes of
9643         auto-generated functions to take a gimple_match_op * instead of
9644         separate code_helper * and tree * parameters.  Make the same
9645         change in the top-level overload and update calls to the
9646         gimple_resimplify routines.  Update calls to the auto-generated
9647         functions and to maybe_push_res_to_seq in the publicly-facing
9648         operation-specific gimple_simplify overloads.
9649         (gimple_match_op::MAX_NUM_OPS): Define.
9650         (gimple_resimplify1): Replace rcode and ops with a single res_op
9651         parameter.  Update call to gimple_simplify.
9652         (gimple_resimplify2): Likewise.
9653         (gimple_resimplify3): Likewise.
9654         (mprts_hook): Replace parameters with a gimple_match_op *.
9655         (maybe_build_generic_op): Likewise.
9656         (build_call_internal): Replace type, nargs and ops with
9657         a gimple_match_op *.
9658         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9659         with a single gimple_match_op *.  Update calls to mprts_hook,
9660         build_call_internal and gimple_simplified_result_is_gimple_val.
9661         Factor out code that is common to the tree_code and combined_fn cases.
9662         * genmatch.c (expr::gen_transform): Replace tem_code and
9663         tem_ops with a gimple_match_op called tem_op.  Update calls
9664         to the gimple_resimplify functions and maybe_push_res_to_seq.
9665         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9666         res_ops.  Update call to the gimple_resimplify functions.
9667         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9668         (decision_tree::gen): Make the functions take a gimple_match_op *
9669         called res_op instead of separate res_code and res_ops parameters.
9670         Update call accordingly.
9671         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9672         and ops with a single res_op parameter.  Update calls to
9673         maybe_build_generic_op and maybe_push_res_to_seq.
9674         (fold_stmt_1): Update calls to gimple_simplify and
9675         replace_stmt_with_simplification.
9676         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9677         and gimple_simplified_result_is_gimple_val.
9678         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9679         gimple_simplify.
9680         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9681         with a gimple_match_op *.
9682         (vn_nary_build_or_lookup): Likewise.  Update call to
9683         vn_nary_build_or_lookup_1.
9684         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9685         gimple_match_op *.  Update calls to the gimple_resimplify routines
9686         and to gimple_simplified_result_is_gimple_val.
9687         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9688         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9689         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9690         (visit_nary_op): Likewise.
9691         (visit_reference_op_load): Likewise.
9693 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9695         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9696         modifier for printing the step amount.
9698 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9700         PR target/78849
9701         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9702         types.
9704 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9706         * doc/sourcebuild.texi (Endianness): New subsubsection.
9708 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9710         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9711         <prefetch_dynamic_strides>: New const bool field.
9712         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9713         prefetch_dynamic_strides.
9714         (exynosm1_prefetch_tune): Likewise.
9715         (thunderxt88_prefetch_tune): Likewise.
9716         (thunderx_prefetch_tune): Likewise.
9717         (thunderx2t99_prefetch_tune): Likewise.
9718         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9719         false.
9720         (aarch64_override_options_internal): Update to set
9721         PARAM_PREFETCH_DYNAMIC_STRIDES.
9722         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9723         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9724         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9725         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9726         prefetch-dynamic-strides setting.
9728 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9730         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9731         <minimum_stride>: New const int field.
9732         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9733         minimum_stride field defaulting to -1.
9734         (exynosm1_prefetch_tune): Likewise.
9735         (thunderxt88_prefetch_tune): Likewise.
9736         (thunderx_prefetch_tune): Likewise.
9737         (thunderx2t99_prefetch_tune): Likewise.
9738         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9739         <default_opt_level>: Set to 3.
9740         (aarch64_override_options_internal): Update to set
9741         PARAM_PREFETCH_MINIMUM_STRIDE.
9742         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9743         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9744         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9745         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9746         stride is constant and is below the minimum stride threshold.
9748 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9750         * config/arm/arm-cpus.in (mode26): Delete.
9751         (armv4): Delete mode26 reference.
9752         * config/arm/arm.c (arm_configure_build_target): Delete use of
9753         isa_bit_mode26.
9755 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9757         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9758         New insn pattern.
9759         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9760         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9761         for non-SSE modes.
9762         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9763         (floatunsdidf2): Ditto.
9765 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9767         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9768         (fixuns_trunc<mode>si2_avx512f): Ditto.
9769         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9770         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9771         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9773 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9775         PR rtl-optimization/79985
9776         * df-scan.c (df_insn_refs_collect): Remove special case for
9777         global registers and asm statements.
9779 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9781         * extend.texi (Global Register Variables): Rewrite the bullet list.
9782         Note that the register is available for allocation. Note that access
9783         via inline asm must use constraints. Add note about async-signal
9784         handlers. Remove paragraph about automagic register selection.
9786 2018-05-23  Richard Biener  <rguenther@suse.de>
9788         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9789         of fixed offset from memset VN.
9791 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9793         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9794         first_interp field.
9795         (alloc_cand_and_find_basis): Initialize first_interp field.
9796         (slsr_process_mul): Modify first_interp field.
9797         (slsr_process_add): Likewise.
9798         (slsr_process_cast): Modify first_interp field for each new
9799         interpretation.
9800         (slsr_process_copy): Likewise.
9801         (dump_candidate): Dump first_interp field.
9802         (replace_mult_candidate): Process all interpretations, not just
9803         subsequent ones.
9804         (replace_rhs_if_not_dup): Likewise.
9805         (replace_one_candidate): Likewise.
9807 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9809         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9810         Add new boolean.
9811         (aarch64_needs_frame_chain): New function.
9812         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9814 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9816         PR target/84882
9817         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9818         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9819         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9820         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9821         as true for strict-align.
9822         (aarch64_can_inline_p): Perform checks even when callee has no
9823         attributes to check for strict alignment.
9824         * doc/extend.texi (AArch64 Function Attributes): Document
9825         no-strict-align.
9826         * doc/invoke.texi: (AArch64 Options): Likewise.
9828 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9830         PR tree-optimization/85853
9831         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9832         the handling of the root of the node to...
9833         (vect_slp_analyze_node_operations_1): ...this new function,
9834         and run the whole thing with the child nodes' def types
9835         set according to their SLP node's def type.
9837 2018-05-23  Richard Biener  <rguenther@suse.de>
9839         PR middle-end/85874
9840         * tree-data-ref.c (create_runtime_alias_checks): Defer
9841         and ignore overflow warnings.
9843 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9845         PR tree-optimization/85822
9846         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9847         constants.
9849 2018-05-23  Richard Biener  <rguenther@suse.de>
9851         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9852         memset constants via native_interpret_expr.
9854 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9856         PR target/85345
9857         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9858         attribute.
9859         (cgraph_node::create_alias): Likewise.
9860         (cgraph_node::get_availability): Check ifunc_resolver instead
9861         of looking up ifunc attribute.
9862         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9863         * varasm.c (do_assemble_alias): Likewise.
9864         (assemble_alias): Likewise.
9865         (default_binds_local_p_3): Likewise.
9866         * cgraph.h (cgraph_node): Add ifunc_resolver.
9867         (cgraph_node::only_called_directly_or_aliased_p): Return false
9868         for IFUNC resolver.
9869         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9870         attribute.
9871         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9872         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9873         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9874         instead of looking up ifunc attribute.
9876 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9878         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9880 2018-05-22  Martin Sebor  <msebor@redhat.com>
9882         PR middle-end/85359
9883         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9884         only when expasion succeeds.
9885         (expand_builtin_strcmp): Same.
9886         (expand_builtin_strncmp): Same.
9888 2018-05-22  Martin Sebor  <msebor@redhat.com>
9890         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9892 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9893             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9895         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9896         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9897         code.
9898         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9899         Add check for legitimate_address.
9900         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9901         (aarch64_swap_ldrstr_operands): New.
9902         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9903         Define prototype.
9905 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9906             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9908         * config/aarch64/aarch64.md: New patterns to generate stp
9909         and ldp.
9910         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9911         single words and double words.
9912         (load_pair_sw, load_pair_dw): Likewise.
9913         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9914         Delete.
9915         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9916         Delete.
9917         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9918         for different mode ldpstp and add peephole for merged zero stores.
9919         Likewise for loads.
9920         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9921         Add size check.
9922         (aarch64_gen_store_pair): Rename calls to match new patterns.
9923         (aarch64_gen_load_pair): Rename calls to match new patterns.
9924         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9925         (load_pair<DREG:mode><DREG2:mode>): ... This.
9926         (store_pair<mode>): Rename to...
9927         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9928         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9929         New mode iterators.
9930         (V_INT_EQUIV): Handle SImode.
9931         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9932         New predicate.
9934 2018-05-22  Martin Sebor  <msebor@redhat.com>
9936         PR c/85623
9937         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9938         or ajust the presumed bound on an operation to avoid unnecessary
9939         warnings.
9941 2018-05-22  Martin Sebor  <msebor@redhat.com>
9943         PR tree-optimization/85826
9944         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9945         assuming that a DECL necesarily has a constant size.
9947 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9949         PR middle-end/85862
9950         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9952 2018-05-22  Richard Biener  <rguenther@suse.de>
9954         PR tree-optimization/85834
9955         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9956         non-constant and non-zero memset arguments.
9958 2018-05-22  Martin Liska  <mliska@suse.cz>
9960         PR ipa/85607
9961         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9963 2018-05-22  Richard Biener  <rguenther@suse.de>
9965         PR tree-optimization/85863
9966         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9967         comparisons when vectype is specified.
9968         (vectorizable_condition): Do not specify vectype for
9969         vect_is_simple_cond when SLP vectorizing.
9971 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9973         PR target/85657
9974         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9975         define __ibm128 as long double.
9976         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9977         as a distinct type when IEEE 128-bit support is enabled.
9978         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9979         128-bit types to use the correct functions.
9980         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9981         convert between 128-bit floating point types that have different
9982         modes but the same representation, instead of using gen_lowpart to
9983         makean alias.
9984         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9985         KFmode.
9986         (IFKF_reg): New attributes to give the register constraints for
9987         IFmode and KFmode.
9988         (extend<mode>tf2_internal): New insns to mark an explicit
9989         conversion between 128-bit floating point types that have a
9990         different mode but share the same representation.
9992 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9994         PR tree-optimization/85814
9995         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9996         a null return from get_strinfo when unsharing the next
9997         strinfo in the chain.
9999 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10001         PR gcc/84923
10002         * varasm.c (weak_finish): Clean up weak_decls.
10004 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10006         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
10007         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
10008         UNSPEC_UADALP values.
10009         * config/aarch64/iterators.md (ABAL): New int iterator.
10010         (ABDL2): Likewise.
10011         (ADALP): Likewise.
10012         (sur): Add mappings for the above.
10013         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
10014         New define_insn.
10015         (aarch64_<sur>abal<mode>_4): Likewise.
10016         (aarch64_<sur>adalp<mode>_3): Likewise.
10017         (<sur>sadv16qi): New define_expand.
10019 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
10021         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
10022         (*movdf_internal): Ditto.
10023         (*rcpsf2_sse): Ditto.
10024         (*rsqrtsf2_sse): Ditto.
10025         (*sqrt<mode>2_sse): Ditto.
10027 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
10029         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
10030         eor3q<mode>4.
10031         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
10032         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
10033         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
10034         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
10035         vbcaxq_s64): New.
10036         * config/aarch64/arm_neon.h: Likewise.
10037         * config/aarch64/iterators.md (VQ_I): New.
10039 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
10041         * config.gcc: Add arc/t-multilib-linux to tmake_file for
10042         arc*-*-linux*.
10043         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10044         MULTILIB_DIRNAMES
10046 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10048         * config/nds32/constraints.md (S): New constraint.
10049         * config/nds32/nds32.md (call_internal): Use constraint S.
10050         (call_value_internal): Likewise.
10051         (sibcall_internal): Likewise.
10052         (sibcall_value_internal): Likewise.
10054 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10055             Chung-Ju Wu  <jasonwucj@gmail.com>
10057         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10058         into consideration.
10060 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10061             Chung-Ju Wu  <jasonwucj@gmail.com>
10063         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10064         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10065         (nds32_rtx_costs_impl): Simplify.
10066         (nds32_address_cost_impl): Simplify.
10067         (nds32_init_rtx_costs): New function.
10068         (nds32_rtx_costs_speed_prefer): Likewise.
10069         (nds32_rtx_costs_size_prefer): Likewise.
10070         (nds32_address_cost_speed_prefer): Likewise.
10071         (nds32_address_cost_speed_fwprop): Likewise.
10072         (nds32_address_cost_size_prefer): Likewise.
10073         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10074         * config/nds32/nds32.c (nds32_option_override): Use
10075         nds32_init_rtx_costs function.
10077 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10079         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10080         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10081         (TARGET_PIPELINE_N8): Likewise.
10082         (TARGET_PIPELINE_N10): Likewise.
10083         (TARGET_PIPELINE_N13): Likewise.
10084         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10086 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10088         * config/nds32/nds32-fpu.md: Update copyright year.
10090 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10092         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10094 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10096         * config/nds32/nds32.c
10097         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10098         * config/nds32/nds32.opt (minline-asm-r15): New option.
10100 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10102         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10103         MASK_HW_ABS.
10104         * config/nds32/nds32.md (abssi2): New pattern.
10106 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10108         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10109         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10110         Merge insn pattern from sse_cvtsi2ss<round_name> and
10111         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10112         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10113         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10114         using SWI48 mode iterator.
10115         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10116         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10117         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10118         pattern from sse_cvttss2si<round_saeonly_name>
10119         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10120         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10121         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10122         using SWI48 mode iterator.
10123         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10124         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10125         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10126         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10127         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10128         using SWI48 mode iterator.
10129         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10130         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10131         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10132         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10133         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10134         SWI48 mode iterator.
10135         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10136         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10137         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10138         pattern from sse_cvttsd2si<round_saeonly_name>
10139         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10141 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10143         * config/nds32/nds32-md-auxiliary.c
10144         (nds32_valid_smw_lwm_base_p): Refine.
10145         (nds32_output_smw_single_word): Refine.
10146         (nds32_output_smw_double_word): New.
10147         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10149 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10151         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10152         (nds32_output_stack_pop): Refine.
10153         (nds32_expand_unaligned_load): Refine.
10154         (nds32_expand_unaligned_store): Refine.
10156 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10157             Chung-Ju Wu  <jasonwucj@gmail.com>
10159         * config/nds32/constants.md: Add TP_REGNUM constant.
10160         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10161         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10162         UNSPEC_ADD32.
10163         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10164         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10165         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10166         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10167         and PIC code generation.
10168         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10169         code generation.
10170         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10171         optimization.
10172         * config/nds32/nds32.md: Support TLS and PIC.
10173         * config/nds32/nds32.c: Support TLS and PIC.
10174         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10175         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10176         predicate.
10178 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10180         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10181         mode with E_ prefix.
10183 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10184             Chung-Ju Wu  <jasonwucj@gmail.com>
10186         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10187         * config/nds32/nds32-md-auxiliary.c
10188         (symbolic_reference_mentioned_p): New.
10189         (nds32_legitimize_ict_address): New.
10190         (nds32_expand_ict_move): New.
10191         (nds32_indirect_call_referenced_p): New.
10192         (nds32_symbol_binds_local_p): Delete.
10193         (nds32_long_call_p): Modify.
10194         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10195         * config/nds32/nds32-protos.h
10196         (symbolic_reference_mentioned_p): Declare.
10197         (nds32_legitimize_ict_address): Declare.
10198         (nds32_expand_ict_move): Declare.
10199         (nds32_indirect_call_referenced_p): Declare.
10200         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10201         (nds32_relax_group): Use nds32_ict_const_p as condition.
10202         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10203         (nds32_asm_file_start): Output ict_model directive in asm code.
10204         (nds32_legitimate_address_p): Consider indirect call.
10205         (nds32_print_operand): Consider indirect call.
10206         (nds32_print_operand_address): Consider indirect call.
10207         (nds32_insert_attributes): Handle "indirect_call" attribute.
10208         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10209         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10210         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10211         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10212         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10213         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10214         (TARGET_ICT_MODEL_SMALL): Define.
10215         (TARGET_ICT_MODEL_LARGE): Define.
10216         * config/nds32/nds32.md (movsi): Consider ict model.
10217         (call, call_value): Consider ict model.
10218         (sibcall, sibcall_value): Consider ict model.
10219         * config/nds32/nds32.opt (mict-model): New option.
10220         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10221         model.
10223 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10224             Monk Chiang  <sh.chiang04@gmail.com>
10225             Jim Wilson <jimw@sifive.com>
10227         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10228         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10229         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10230         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10231         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10232         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10233         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10234         compute save_libcall_adjustment properly.
10235         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10236         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10237         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10238         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10239         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10240         (ABI_SPEC): Handle mabi=ilp32e.
10241         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10242         (RVE): Add RVE mask.
10243         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10244         <-march>: Add rv32e as an example.
10246 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10248         PR c++/82899
10249         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10250         (intra_create_variable_infos): Handle C++ constructors.
10252 2018-05-18  Martin Liska  <mliska@suse.cz>
10254         * passes.def: Remove a redundant pass.
10256 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10258         PR bootstrap/85838
10259         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10261 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10263         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10264         (ARMv4): Update.
10265         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10266         (ARMv6m): Update.
10267         (armv2, armv2a, armv3, armv3m): Delete architectures.
10268         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10269         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10270         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10271         Delete cpus.
10272         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10273         (*mulsidi3adddi): Likewise.
10274         (mulsidi3): Likewise.
10275         (*mulsidi3_nov6): Likewise.
10276         (umulsidi3): Likewise.
10277         (umulsidi3_nov6): Likewise.
10278         (umaddsidi4): Likewise.
10279         (*umulsidi3adddi): Likewise.
10280         (smulsi3_highpart): Likewise.
10281         (*smulsi3_highpart_nov6): Likewise.
10282         (umulsi3_highpart): Likewise.
10283         (*umulsi3_highpart_nov6): Likewise.
10284         * config/arm/arm.h (arm_arch3m): Delete.
10285         * config/arm/arm.c (arm_arch3m): Delete.
10286         (arm_option_override_internal): Update armv3-related comment.
10287         (arm_configure_build_target): Delete use of isa_bit_mode32.
10288         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10289         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10290         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10291         (mulsa3): Likewise.
10292         (mulusa3): Likewise.
10293         * config/arm/arm-protos.h (arm_arch3m): Delete.
10294         * config/arm/arm-tables.opt: Regenerate.
10295         * config/arm/arm-tune.md: Likewise.
10296         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10297         deleted architectures.
10299 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10301         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10302         (armv5t, armv5te): New features.
10303         (ARMv5, ARMv5e): Delete fgroups.
10304         (ARMv5t, ARMv5te): Adjust for above changes.
10305         (ARMv6m): Likewise.
10306         (armv5, armv5e): Delete arches.
10307         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10308         arm_arch5.
10309         (*call_reg_arm): Likewise.
10310         (*call_value_reg_armv5): Likewise.
10311         (*call_value_reg_arm): Likewise.
10312         (*call_symbol): Likewise.
10313         (*call_value_symbol): Likewise.
10314         (*sibcall_insn): Likewise.
10315         (*sibcall_value_insn): Likewise.
10316         (clzsi2): Likewise.
10317         (prefetch): Likewise.
10318         (define_split and define_peephole2 dependent on arm_arch5):
10319         Likewise.
10320         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10321         arm_arch5e.
10322         (TARGET_ARM_QBIT): Likewise.
10323         (TARGET_DSP_MULTIPLY): Likewise.
10324         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10325         (arm_arch5, arm_arch5e): Delete.
10326         (arm_arch5t, arm_arch5te): Declare.
10327         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10328         (arm_arch5t): Declare.
10329         (arm_option_reconfigure_globals): Update for the above.
10330         (arm_options_perform_arch_sanity_checks): Update comment, replace
10331         use of arm_arch5 with arm_arch5t.
10332         (use_return_insn): Likewise.
10333         (arm_emit_call_insn): Likewise.
10334         (output_return_instruction): Likewise.
10335         (arm_final_prescan_insn): Likewise.
10336         (arm_coproc_builtin_available): Likewise.
10337         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10338         arm_arch5e with arm_arch5t and arm_arch5te.
10339         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10340         (arm_arch5t, arm_arch5te): Declare.
10341         * config/arm/arm-tables.opt: Regenerate.
10342         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10343         * config/arm/t-multilib: Likewise.
10344         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10345         instead of arm_arch5.
10346         (*call_reg_thumb1): Likewise.
10347         (*call_value_reg_thumb1_v5): Likewise.
10348         (*call_value_reg_thumb1): Likewise.
10349         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10350         unreachable path.
10351         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10353 2018-05-18  Martin Liska  <mliska@suse.cz>
10355         PR gcov-profile/84846
10356         * doc/gcov.texi: Document -t option of gcov tool.
10358 2018-05-18  Martin Liska  <mliska@suse.cz>
10360         PR gcov-profile/84846
10361         * gcov.c (print_usage): Add new -t option.
10362         (process_args): Handle the option.
10363         (generate_results): Use stdout as output when requested by
10364         the option.
10366 2018-05-18  Martin Liska  <mliska@suse.cz>
10368         PR gcov-profile/84846
10369         * coverage.c (coverage_init): Write PWD to .gcno file.
10370         * doc/gcov.texi: Document how working directory is printed.
10371         * gcov-dump.c (dump_gcov_file): Print PWD.
10372         * gcov.c (output_intermediate_file): Likewise.
10373         (read_graph_file): Read PWD string.
10374         (output_lines): Print PWD.
10376 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10378         PR middle-end/85817
10379         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10380         for retval and return false if all args to phi are zero.
10382 2018-05-18  Richard Biener  <rguenther@suse.de>
10384         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10385         method.
10386         (evrp_dom_walker::before_dom_children): Call it.
10388 2018-05-18  Richard Biener  <rguenther@suse.de>
10390         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10391         results when processing array refs with variable index.
10393 2018-05-18  Toon Moene  <toon@moene.org>
10395         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10396         directly after that of -floop-interchange. Indicate that both
10397         options are enabled by default when specifying -O3.
10399 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10401         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10402         iterator.  Delete separate integer-mode vec_set<mode> expander.
10403         (aarch64_simd_vec_setv2di): Delete.
10404         (vec_setv2di): Delete.
10405         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10406         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10407         the "w, r" alternative.
10409 2018-05-18  Martin Liska  <mliska@suse.cz>
10411         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10412         * tree-pass.h (make_pass_lower_switch_O0): New function.
10413         * tree-switch-conversion.c (node_has_low_bound): Remove.
10414         (node_has_high_bound): Likewise.
10415         (node_is_bounded): Likewise.
10416         (class pass_lower_switch): Make it a template type and create
10417         two instances.
10418         (pass_lower_switch::execute): Add template argument.
10419         (make_pass_lower_switch): New function.
10420         (make_pass_lower_switch_O0): New function.
10421         (do_jump_if_equal): Remove.
10422         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10423         all the hard work to tree optimization passes.
10425 2018-05-18  Martin Liska  <mliska@suse.cz>
10427         * dbgcnt.c (limit_low): Renamed from limit.
10428         (limit_high): New variable.
10429         (dbg_cnt_is_enabled): Check for upper limit.
10430         (dbg_cnt): Adjust dumping.
10431         (dbg_cnt_set_limit_by_index): Add new argument for high
10432         value.
10433         (dbg_cnt_set_limit_by_name): Likewise.
10434         (dbg_cnt_process_single_pair): Parse new format.
10435         (dbg_cnt_process_opt): Use strtok.
10436         (dbg_cnt_list_all_counters): Remove 'value' and add
10437         'limit_high'.
10438         * doc/invoke.texi: Document changes.
10440 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10442         * doc/sourcebuild.texi (scalar_all_fma): Document.
10443         * tree.def (FMA_EXPR): Delete.
10444         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10445         * internal-fn.c (ternary_direct): New macro.
10446         (expand_ternary_optab_fn): Likewise.
10447         (direct_ternary_optab_supported_p): Likewise.
10448         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10449         * builtins.c (fold_builtin_fma): Delete.
10450         (fold_builtin_3): Don't call it.
10451         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10452         * expr.c (expand_expr_real_2): Likewise.
10453         * fold-const.c (operand_equal_p): Likewise.
10454         (fold_ternary_loc): Likewise.
10455         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10456         * gimple.c (DEFTREECODE): Likewise.
10457         * gimplify.c (gimplify_expr): Likewise.
10458         * optabs-tree.c (optab_for_tree_code): Likewise.
10459         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10460         * tree-eh.c (operation_could_trap_p): Likewise.
10461         (stmt_could_throw_1_p): Likewise.
10462         * tree-inline.c (estimate_operator_cost): Likewise.
10463         * tree-pretty-print.c (dump_generic_node): Likewise.
10464         (op_code_prio): Likewise.
10465         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10466         * tree-ssa-operands.c (get_expr_operands): Likewise.
10467         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10468         * fold-const-call.h (fold_fma): Delete.
10469         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10470         CFN_FNMA and CFN_FNMS.
10471         (fold_fma): Delete.
10472         * genmatch.c (combined_fn): New enum.
10473         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10474         (commutative_op): New function.
10475         (commutate): Use it.  Handle more than 2 operands.
10476         (dt_operand::gen_gimple_expr): Use commutative_op.
10477         (parser::parse_expr): Allow :c to be used with non-binary
10478         operators if the commutative operand is known.
10479         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10480         CFN_FMS, CFN_FNMA and CFN_FNMS.
10481         (backprop::process_assign_use): Remove FMA_EXPR handling.
10482         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10483         (gen_hsa_fma): New function.
10484         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10485         IFN_FNMA and IFN_FNMS.
10486         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10487         * gimple-fold.h (follow_all_ssa_edges): Declare.
10488         * gimple-fold.c (follow_all_ssa_edges): New function.
10489         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10490         gimple_build interface and use follow_all_ssa_edges to fold the result.
10491         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10492         instead of checking for optabs directly.
10493         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10494         rather than FMA_EXPRs.
10495         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10496         call to IFN_FMA instead of an FMA_EXPR.
10498 2018-05-17  Jim Wilson  <jimw@sifive.com>
10500         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10501         sign extended promoted subreg, and the range does not have the sign bit
10502         set, then do a sign extend.
10504         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10505         test, check for sign extended subreg and/or constant operands, and
10506         do a sign extend in that case.
10508 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10510         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10511         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10512         Add untyped.
10513         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10514         Change logics_shift_reg to logics_shift_imm.
10515         (thunderx2t99_fp_loadpair_basic): Delete.
10516         (thunderx2t99_fp_storepair_basic): Delete.
10517         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10518         (thunderx2t99_asimd_polynomial): Delete.
10519         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10520         and neon_fp_mul_d_scalar_q.
10521         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10522         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10523         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10524         (thunderx2t99_asimd_lut): Add missing tbl types.
10525         (thunderx2t99_asimd_ext): Delete.
10526         (thunderx2t99_asimd_load1_1_mult): Delete.
10527         (thunderx2t99_asimd_load1_2_mult): Delete.
10528         (thunderx2t99_asimd_load1_ldp): New.
10529         (thunderx2t99_asimd_load1): New.
10530         (thunderx2t99_asimd_load2): Add missing *load2* types.
10531         (thunderx2t99_asimd_load3): New.
10532         (thunderx2t99_asimd_load4): New.
10533         (thunderx2t99_asimd_store1_1_mult): Delete.
10534         (thunderx2t99_asimd_store1_2_mult): Delete.
10535         (thunderx2t99_asimd_store2_mult): Delete.
10536         (thunderx2t99_asimd_store2_onelane): Delete.
10537         (thunderx2t99_asimd_store_stp): New.
10538         (thunderx2t99_asimd_store1): New.
10539         (thunderx2t99_asimd_store2): New.
10540         (thunderx2t99_asimd_store3): New.
10541         (thunderx2t99_asimd_store4): New.
10543 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10545         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10546         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10548 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10549             Segher Boessenkool  <segher@kernel.crashing.org>
10551         PR target/85698
10552         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10553         operand.
10555 2018-05-17  Richard Biener  <rguenther@suse.de>
10557         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10558         for pruning loop and prune defs feeding only already visited PHIs.
10560 2018-05-17  Richard Biener  <rguenther@suse.de>
10562         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10564 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10565             Richard Biener  <rguenther@suse.de>
10567         PR tree-optimization/85793
10568         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10569         for VMAT_ELEMENTWISE.
10571 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10573         * internal-fn.h (lookup_internal_fn): Declare
10574         * internal-fn.c (lookup_internal_fn): New function.
10575         * gimple.c (gimple_build_call_from_tree): Handle calls to
10576         internal functions.
10577         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10578         internal function names.
10579         * tree-pretty-print.c (dump_generic_node): Likewise.
10580         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10582 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10584         * gimple-fold.h (gimple_build): Make the function forms take
10585         combined_fn rather than built_in_function.
10586         (gimple_simplify): Likewise.
10587         * gimple-match-head.c (gimple_simplify): Likewise.
10588         * gimple-fold.c (gimple_build): Likewise.
10589         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10590         rather than gimple_build_call_internal.
10591         (get_initial_defs_for_reduction): Likewise.
10592         (vect_create_epilog_for_reduction): Likewise.
10593         (vectorizable_live_operation): Likewise.
10595 2018-05-17  Martin Liska  <mliska@suse.cz>
10597         * gimple-ssa-sprintf.c (format_directive): Do not use
10598         space in between 'G_' and '('.
10600 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10602         PR target/85323
10603         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10604         even if the mask is not all ones.
10606         PR target/85323
10607         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10608         vector.
10609         (ix86_gimple_fold_builtin): Likewise.
10611         PR target/85323
10612         * config/i386/i386.c: Include tree-vector-builder.h.
10613         (ix86_vector_shift_count): New function.
10614         (ix86_fold_builtin): Fold shift builtins by scalar count.
10615         (ix86_gimple_fold_builtin): Likewise.
10617         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10618         _mm512_setzero): New intrinsics.
10620 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10621             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10623         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10624         code generation for cases where splatting a value is not useful.
10625         * simplify-rtx.c (simplify_ternary_operation): Simplify
10626         vec_merge across a vec_duplicate and a paradoxical subreg forming
10627         a vector mode to a vec_concat.
10629 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10631         * config.gcc: Support "goldmont-plus".
10632         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10633         "goldmont-plus".
10634         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10635         PROCESSOR_GOLDMONT_PLUS.
10636         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10637         (processor_target_table): Add "goldmont-plus".
10638         (PTA_GOLDMONT_PLUS): Define.
10639         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10640         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10641         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10642         (fold_builtin_cpu): Add "goldmont-plus".
10643         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10644         (ix86_option_override_internal): Add "goldmont-plus".
10645         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10646         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10647         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10648         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10650 2018-05-17  Richard Biener  <rguenther@suse.de>
10652         PR tree-optimization/85757
10653         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10654         remove defs that only feed that PHI from further processing.
10656 2018-05-16  Jim Wilson  <jimw@sifive.com>
10658         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10659         asterisk to name.
10660         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10662 2018-05-16  Mark Wielaard  <mark@klomp.org>
10664         * dwarf2out.c (count_index_strings): New function.
10665         (output_indirect_strings): Call count_index_strings and generate
10666         header for dwarf_version >= 5.
10668 2018-05-16  Mark Wielaard  <mark@klomp.org>
10670         * dwarf2out.c (dwarf_FORM): New function.
10671         (set_indirect_string): Use dwarf_FORM.
10672         (reset_indirect_string): Likewise.
10673         (size_of_die): Likewise.
10674         (value_format): Likewise.
10675         (output_die): Likewise.
10676         (add_skeleton_AT_string): Likewise.
10677         (output_macinfo_op): Likewise.
10678         (index_string): Likewise.
10679         (output_index_string_offset): Likewise.
10680         (output_index_string): Likewise.
10681         (count_index_strings): Likewise.
10683 2018-05-16  Carl Love  <cel@us.ibm.com>
10685         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10686         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10688 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10690         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10691         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10693 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10695         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10696         (fnma<mode>4): Likewise.
10697         (fms<mode>4): Likewise.
10698         (fnms<mode>4): Likewise.
10699         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10700         (aarch64_fnma<mode>4): Likewise.
10701         (aarch64_fms<mode>4): Likewise.
10702         (aarch64_fnms<mode>4): Likewise.
10703         (aarch64_fnmadd<mode>4): Likewise.
10705 2018-05-16  Jason Merrill  <jason@redhat.com>
10707         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10709 2018-05-16  Richard Biener  <rguenther@suse.de>
10711         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10712         (dump_stmt_cost): Declare.
10713         (add_stmt_cost): Dump cost we add.
10714         (add_stmt_costs): New function.
10715         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10716         No longer exported.
10717         (vect_analyze_stmt): Adjust prototype.
10718         (vectorizable_condition): Likewise.
10719         (vectorizable_live_operation): Likewise.
10720         (vectorizable_reduction): Likewise.
10721         (vectorizable_induction): Likewise.
10722         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10723         cost vector to pass to vectorizable_ and record afterwards.
10724         (vect_model_reduction_cost): Take cost vector argument and adjust.
10725         (vect_model_induction_cost): Likewise.
10726         (vectorizable_reduction): Likewise.
10727         (vectorizable_induction): Likewise.
10728         (vectorizable_live_operation): Likewise.
10729         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10730         SLP_TREE_NUMBER_OF_VEC_STMTS.
10731         (vect_analyze_slp_cost_1): Remove.
10732         (vect_analyze_slp_cost): Likewise.
10733         (vect_slp_analyze_node_operations): Take visited args and
10734         a target cost vector.  Avoid processing already visited stmt sets.
10735         (vect_slp_analyze_operations): Use a local cost vector to gather
10736         costs and register those of non-discarded instances.
10737         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10738         (vect_schedule_slp_instance): Remove copying of
10739         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10740         zero.
10741         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10742         adding cost.  Record cost entry location.
10743         (vect_prologue_cost_for_slp_op): Function to compute cost of
10744         a constant or invariant generated for SLP vect in the prologue,
10745         split out from vect_analyze_slp_cost_1.
10746         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10747         (vect_model_promotion_demotion_cost): Likewise.
10748         (vect_model_store_cost): Likewise, make static.
10749         (vect_model_load_cost): Likewise.
10750         (vectorizable_bswap): Add cost vector arg and adjust.
10751         (vectorizable_call): Likewise.
10752         (vectorizable_simd_clone_call): Likewise.
10753         (vectorizable_conversion): Likewise.
10754         (vectorizable_assignment): Likewise.
10755         (vectorizable_shift): Likewise.
10756         (vectorizable_operation): Likewise.
10757         (vectorizable_store): Likewise.
10758         (vectorizable_load): Likewise.
10759         (vectorizable_condition): Likewise.
10760         (vectorizable_comparison): Likewise.
10761         (can_vectorize_live_stmts): Likewise.
10762         (vect_analyze_stmt): Likewise.
10763         (vect_transform_stmt): Adjust calls to vectorizable_*.
10764         * tree-vectorizer.c: Include gimple-pretty-print.h.
10765         (dump_stmt_cost): New function.
10767 2018-05-16  Richard Biener  <rguenther@suse.de>
10769         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10770         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10771         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10772         (check_name): New callback.
10773         (dse_classify_store): Track cycles via a visited bitmap of PHI
10774         defs and simplify handling of in-loop and across loop dead stores
10775         and properly fail for loop-variant refs.  Handle byte-tracking with
10776         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10777         limiting the walk.
10779 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10781         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10782         (vect_get_mask_type_for_stmt): Likewise.
10783         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10784         split out from...
10785         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10786         to determine the statement's vector type and the vector type that
10787         should be used for calculating nunits.  Deal with cases in which
10788         the type has to be deferred.
10789         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10790         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10791         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10792         (vect_determine_vf_for_stmt): New functions, split out from...
10793         (vect_determine_vectorization_factor): ...here.
10794         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10795         (vect_get_mask_type_for_stmt): New functions, split out from
10796         vect_determine_vectorization_factor.
10798 2018-05-16  Richard Biener  <rguenther@suse.de>
10800         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10801         verify the [VEC_]COND_EXPR embedded comparison.
10803 2018-05-15  Martin Sebor  <msebor@redhat.com>
10805         PR tree-optimization/85753
10806         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10807         RECORD_TYPE in addition to ARRAY_TYPE.
10809 2018-05-15  Martin Sebor  <msebor@redhat.com>
10811         PR middle-end/85643
10812         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10814 2018-05-15  Richard Biener  <rguenther@suse.de>
10816         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10817         add by_clobber_p one.  Change algorithm to collect all defs
10818         representing uses we need to walk and try reducing them to
10819         a single one before failing.
10820         (dse_dom_walker::dse_optimize_stmt): Adjust.
10822 2018-05-13  Mark Wielaard  <mark@klomp.org>
10824         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10825         (size_of_loc_descr): Likewise.
10826         (output_loc_operands): Likewise.
10827         (output_loc_operands_raw): Likewise.
10828         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10829         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10830         (hash_loc_operands): Likewise.
10831         (compare_loc_operands): Likewise.
10833 2018-05-14  Mark Wielaard  <mark@klomp.org>
10835         * dwarf2out.c (count_index_addrs): New function.
10836         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10838 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10840         PR tree-optimization/83648
10841         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10842         return value as malloc candidate.
10844 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10846         PR ipa/85734
10847         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10848         param as true in call to suggest_attribute.
10850 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10852         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10853         -mreadonly-in-sdata.
10855 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10857         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10858         New pattern.
10859         (aarch64_crypto_aesd_fused): Likewise.
10861 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10863         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10864         (movsi_aarch64): Likewise.
10865         (load_pairsi): Likewise.
10866         (load_pairdi): Likewise.
10867         (store_pairsi): Likewise.
10868         (store_pairdi): Likewise.
10869         (load_pairsf): Likewise.
10870         (load_pairdf): Likewise.
10871         (store_pairsf): Likewise.
10872         (store_pairdf): Likewise.
10873         (zero_extend): Likewise.
10874         (trunc): Swap alternatives.
10875         (fcvt_target): Add '?' to prefer w over r.
10877 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10879         PR target/85756
10880         * config/i386/i386.md: Disallow non-commutative arithmetics in
10881         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10882         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10883         in the peephole2 before it.
10885 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10887         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10888         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10889         (ix86_handle_option): Handle -mcldemote.
10890         * config.gcc: New header.
10891         * config/i386/cldemoteintrin.h: New file.
10892         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10893         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10894         -mcldemote.
10895         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10896         OPTION_MASK_ISA_CLDEMOTE.
10897         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10898         (ix86_valid_target_attribute_inner_p): Ditto.
10899         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10900         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10901         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10902         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10903         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10904         (cldemote): New.
10905         * config/i386/i386.opt: Add -mcldemote.
10906         * config/i386/x86intrin.h: New header.
10907         * doc/invoke.texi: Add -mcldemote.
10909 2018-05-14  Richard Biener  <rguenther@suse.de>
10911         * doc/match-and-simplify.texi: Adjust :s documentation.
10913 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10915         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10916         intended memcpy size.
10917         (REORDER_45): Likewise.
10919 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10921         * sort.cc: New file.
10922         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10923         * vec.c (qsort_chk): Use gcc_qsort.
10924         * Makefile.in (OBJS-libcommon): Add sort.o.
10925         (build/sort.o): New target.  Use it...
10926         (BUILD_RTL): ... here, and...
10927         (build/gencfn-macros): ... here, and...
10928         (build/genmatch): ... here.
10930 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10931             Chung-Ju Wu  <jasonwucj@gmail.com>
10933         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10934         * config/nds32/nds32-graywolf.md: New file.
10935         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10936         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10937         pipeline.
10938         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10939         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10940         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10941         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10942         * config/nds32/pipelines.md: Include n15 settings.
10944 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10945             Chung-Ju Wu  <jasonwucj@gmail.com>
10947         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10948         * config/nds32/nds32-n13.md: New file.
10949         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10950         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10951         pipeline.
10952         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10953         * config/nds32/nds32.md (pipeline_model): Add n13.
10954         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10955         * config/nds32/pipelines.md: Include n13 settings.
10957 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10958             Chung-Ju Wu  <jasonwucj@gmail.com>
10960         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10961         * config/nds32/nds32-n10.md: New file.
10962         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10963         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10964         pipeline.
10965         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10966         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10967         * config/nds32/nds32.md (pipeline_model): Add n10.
10968         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10969         * config/nds32/pipelines.md: Include n10 settings.
10971 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10972             Kito Cheng  <kito.cheng@gmail.com>
10973             Chung-Ju Wu  <jasonwucj@gmail.com>
10975         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10976         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10977         Add enum values for DSP extension instructions.
10978         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10979         New constraints.
10980         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10981         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10982         New code iterators.
10983         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10984         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10985         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10986         * config/nds32/nds32-intrinsic.md: Likewise.
10987         * config/nds32/nds32_intrinsic.h: Likewise.
10988         * config/nds32/nds32-md-auxiliary.c: Likewise.
10989         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10990         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10991         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10992         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10993         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10994         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10995         TYPE_DMAC in switch statement.
10996         * config/nds32/nds32.c: New checking and implementation for DSP
10997         extension instructions.
10998         * config/nds32/nds32.h: Likewise.
10999         * config/nds32/nds32.md: Likewise.
11000         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
11001         * config/nds32/predicates.md: Implement new predicates for DSP
11002         extension.
11004 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11006         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
11007         Reformat alternatives and attributes so it is easier to identify
11008         which constraints/attributes go with which instruction.
11009         (mov<mode>_hardfloat32, FMOVE64): Likewise.
11010         (mov<mode>_softfloat32, FMOVE64): Likewise.
11011         (mov<mode>_hardfloat64, FMOVE64): Likewise.
11012         (mov<mode>_softfloat64, FMOVE64): Likewise.
11014 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11016         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11017         subsection.
11018         (Basic PowerPC Built-in Functions): The new name of the
11019         subsection previously known as "PowerPC Built-in Functions".
11020         (Basic PowerPC Built-in Functions Available on all Configurations):
11021         New subsubsection.
11022         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
11023         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
11024         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
11025         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
11027 2018-05-11  Martin Jambor  <mjambor@suse.cz>
11029         PR ipa/85655
11030         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
11031         single const.
11033 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11035         PR target/85733
11036         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
11038 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
11040         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
11041         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
11042         (ix86_handle_option): Handle -mwaitpkg.
11043         * config.gcc: New header.
11044         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11045         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11046         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11047         function type.
11048         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11049         OPTION_MASK_ISA_WAITPKG.
11050         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11051         (ix86_option_override_internal): Add PTA_WAITPKG.
11052         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11053         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11054         IX86_BUILTIN_TPAUSE.
11055         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11056         __builtin_ia32_umwait and __builtin_ia32_tpause.
11057         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11058         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11059         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11060         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11061         UNSPECV_TPAUSE): New.
11062         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11063         * config/i386/i386.opt: Add -mwaitpkg.
11064         * config/i386/waitpkgintrin.h: New file.
11065         * config/i386/x86intrin.h: New header.
11066         * doc/invoke.texi: Add -mwaitpkg.
11068 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11070         PR target/85606
11071         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11072         equivalent.
11073         (cortex-m0): Use armv6s-m isa.
11074         (cortex-m0plus): Likewise.
11075         (cortex-m1): Likewise.
11076         (cortex-m0.small-multiply): Likewise.
11077         (cortex-m0plus.small-multiply): Likewise.
11078         (cortex-m1.small-multiply): Likewise.
11080 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11081             Jakub Jelinek  <jakub@redhat.com>
11083         PR tree-optimization/85692
11084         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11085         source permute as well.
11087 2018-05-11  Martin Liska  <mliska@suse.cz>
11089         PR sanitizer/85556
11090         * doc/extend.texi: Document LLVM style format for no_sanitize
11091         attribute.
11093 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11095         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11096         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11097         (mode_supports_vsx_dform_quad): Likewise.
11098         (mode_supports_vmx_dform): Move these functions to be next to the
11099         other mode_supports functions.
11100         (mode_supports_dq_form): Likewise.
11101         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11102         mode_supports_dq_form.
11103         (reg_offset_addressing_ok_p): Likewise.
11104         (offsettable_ok_by_alignment): Likewise.
11105         (rs6000_legitimate_offset_address_p): Likewise.
11106         (legitimate_lo_sum_address_p): Likewise.
11107         (rs6000_legitimize_address): Likewise.
11108         (rs6000_legitimize_reload_address): Likewise.
11109         (rs6000_secondary_reload_inner): Likewise.
11110         (rs6000_preferred_reload_class): Likewise.
11111         (rs6000_output_move_128bit): Likewise.
11113 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11115         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11116         Generate SImode target register for null target.
11117         <case IX86_BUILTIN_XGETBV>: Ditto.
11118         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11119         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11121 2018-05-10  Carl Love  <cel@us.ibm.com>
11123         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11124         dcbtt and dcbtstt if operands[2] is 0.
11126 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11128         PR target/85693
11129         * config/i386/sse.md (usadv64qi): New expander.
11131 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11133         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11134         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11135         -maltivec=be support.
11136         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11137         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11138         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11139         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11140         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11141         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11142         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11143         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11144         altivec_vsumsws): Adjust.
11145         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11146         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11147         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11148         support.
11149         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11150         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11151         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11152         (altivec_lve<VI_char>x): Delete expand.
11153         (*altivec_lve<VI_char>x_internal): Rename to...
11154         (altivec_lve<VI_char>x): ... this.
11155         (altivec_lvxl_<mode>): Delete expand.
11156         (*altivec_lvxl_<mode>_internal): Rename to ...
11157         (altivec_lvxl_<mode>): ... this.
11158         (altivec_stvxl_<mode>): Delete expand.
11159         (*altivec_stvxl_<mode>_internal): Rename to ...
11160         (altivec_stvxl_<mode>): ... this.
11161         (altivec_stve<VI_char>x): Delete expand.
11162         (*altivec_stve<VI_char>x_internal): Rename to ...
11163         (altivec_stve<VI_char>x): ... this.
11164         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11165         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11166         reduc_plus_scal_<mode>): Adjust.
11167         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11168         comment.
11169         (rs6000_cpu_cpp_builtins): Adjust.
11170         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11171         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11172         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11173         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11174         -maltivec=be support.
11175         (rs6000_split_vec_extract_var): Adjust.
11176         (rs6000_split_v4si_init): Adjust.
11177         (swap_selector_for_mode): Delete.
11178         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11179         altivec_expand_stvex_be): Delete.
11180         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11181         -maltivec=be support.
11182         (rs6000_gimple_fold_builtin): Ditto.
11183         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11184         Adjust.
11185         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11186         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11187         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11188         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11189         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11190         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11191         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11192         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11193         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11194         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11195         anonymous split): Adjust.
11196         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11197         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11199 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11201         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11202         when --with-gxx-include-dir is also specified.
11203         * configure: Regenerate.
11205 2018-05-09  Jim Wilson  <jimw@sifive.com>
11207         PR target/84797
11208         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11209         * config/riscv/t-withmultilib: New.
11210         * config/riscv/withmultilib.h: New.
11211         * doc/install.texi: Document RISC-V --with-multilib-list support.
11213 2018-05-09  Richard Biener  <rguenther@suse.de>
11215         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11216         vector.
11217         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11218         actual scalar cost using the cost vector and the add_stmt_cost
11219         machinery.
11221 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11223         PR rtl-optimization/85645
11224         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11225         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11227 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11229         PR rtl-optimization/85645
11230         * shrink-wrap.c (spread_components): Return a boolean saying if
11231         anything was changed.
11232         (try_shrink_wrapping_separate): Iterate spread_components until
11233         nothing changes anymore.
11235 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11237         PR rtl-optimization/85645
11238         * regrename.c (build_def_use): Also kill the chains that include the
11239         destination of a REG_CFA_REGISTER note.
11241 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11243         PR rtl-optimization/85645
11244         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11245         insn that has a REG_CFA_REGISTER note.
11247 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11249         * cfgexpand.c (expand_clobber): New function.
11250         (expand_gimple_stmt_1): Use it.
11251         * tree-vect-stmts.c (vect_clobber_variable): New function,
11252         split out from...
11253         (vectorizable_simd_clone_call): ...here.
11254         (vectorizable_store): Emit a clobber either side of an
11255         IFN_STORE_LANES sequence.
11256         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11258 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11260         PR target/85626
11261         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11262         (define_insn "trap_if_false"): Add exit after trap.
11264 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11266         PR rtl-optimization/85638
11267         * bb-reorder.c: Include common/common-target.h.
11268         (create_forwarder_block): New function extracted from...
11269         (fix_up_crossing_landing_pad): ...here.  Rename into...
11270         (dw2_fix_up_crossing_landing_pad): ...this.
11271         (sjlj_fix_up_crossing_landing_pad): New function.
11272         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11273         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11274         from both partitions and exit the loop after one iteration.
11276 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11278         Revert:
11279         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11280         subsection.
11281         (Basic PowerPC Built-in Functions): The new name of the
11282         subsection previously known as "PowerPC Built-in Functions".
11283         (Basic PowerPC Built-in Functions Available on all Configurations):
11284         New subsubsection.
11285         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11286         subsubsection.
11287         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11288         subsubsection.
11289         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11290         subsubsection.
11291         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11292         subsubsection.
11294 2018-05-08  Jim Wilson  <jimw@sifive.com>
11296         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11297         (LD_EMUL_SUFFIX): New.
11298         (LINK_SPEC): Use it.
11300 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11302         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11303         subsection.
11304         (Basic PowerPC Built-in Functions): The new name of the
11305         subsection previously known as "PowerPC Built-in Functions".
11306         (Basic PowerPC Built-in Functions Available on all Configurations):
11307         New subsubsection.
11308         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11309         subsubsection.
11310         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11311         subsubsection.
11312         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11313         subsubsection.
11314         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11315         subsubsection.
11317 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11319         PR target/85683
11320         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11321         after cmpelim optimization.
11323 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11325         * config.gcc: Support "goldmont".
11326         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11327         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11328         PROCESSOR_GOLDMONT.
11329         * config/i386/i386.c (m_GOLDMONT): Define.
11330         (processor_target_table): Add "goldmont".
11331         (PTA_GOLDMONT): Define.
11332         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11333         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11334         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11335         (fold_builtin_cpu): Add "goldmont".
11336         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11337         (ix86_option_override_internal): Add "goldmont".
11338         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11339         (processor_type): Add PROCESSOR_GOLDMONT.
11340         * config/i386/i386.md: Add CPU "glm".
11341         * config/i386/glm.md: New file.
11342         * config/i386/x86-tune.def: Add m_GOLDMONT.
11343         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11345 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11347         PR target/85572
11348         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11349         E_V4DImode.
11350         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11351         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11352         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11354         PR target/85317
11355         * config/i386/i386.c (ix86_fold_builtin): Handle
11356         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11358         PR target/85480
11359         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11360         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11362 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11364         PR target/85658
11365         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11366         (check_arch): Likewise.
11367         (check_fpu): Return the result rather than printing it.
11368         (end arch): Fix operator precedence.
11369         (end cpu): Likewise.
11370         (END): Print the result from check_fpu.
11372 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11373             Alan Hayward  <alan.hayward@arm.com>
11374             David Sherwood  <david.sherwood@arm.com>
11376         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11377         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11378         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11379         (*fcmuo<mode>_and): New patterns.
11381 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11383         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11384         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11385         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11386         (cmp_op, sve_imm_con): New code attributes.
11387         (SVE_COND_INT_CMP, imm_con): Delete.
11388         (cmp_op): Remove above unspecs from int attribute.
11389         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11390         to...
11391         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11392         comparison-specific unspecs.
11393         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11394         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11395         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11396         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11397         (*vec_fcm<cmp_op><mode>): Rename to...
11398         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11399         (*vec_fcmuo<mode>): Rename to...
11400         (*fcmuo<mode>): ...this and adjust likewise.
11401         (*pred_fcm<cmp_op><mode>): New pattern.
11402         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11403         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11404         functions.
11405         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11406         and UNORDERED.
11407         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11408         (aarch64_emit_sve_predicated_cond): New function.
11409         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11410         (aarch64_emit_unspec_cond_or): Replace with...
11411         (aarch64_emit_sve_or_conds): ...this new function.  Use
11412         aarch64_emit_sve_ptrue_op for the individual comparisons and
11413         aarch64_emit_binop to OR them together.
11414         (aarch64_emit_inverted_unspec_cond): Replace with...
11415         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11416         aarch64_emit_sve_ptrue_op for the comparison and
11417         aarch64_emit_unop to invert the result.
11418         (aarch64_expand_sve_vec_cmp_float): Update after the above
11419         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11421 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11423         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11424         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11425         (Backwards Compatibility): Likewise.
11427 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11429         PR bootstrap/85681
11430         Revert:
11431         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11433         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11434         <prefetch_dynamic_strides>: New const bool field.
11435         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11436         prefetch_dynamic_strides.
11437         (exynosm1_prefetch_tune): Likewise.
11438         (thunderxt88_prefetch_tune): Likewise.
11439         (thunderx_prefetch_tune): Likewise.
11440         (thunderx2t99_prefetch_tune): Likewise.
11441         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11442         to false.
11443         (aarch64_override_options_internal): Update to set
11444         PARAM_PREFETCH_DYNAMIC_STRIDES.
11445         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11446         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11447         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11448         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11449         prefetch-dynamic-strides setting.
11451         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11453         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11454         <minimum_stride>: New const int field.
11455         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11456         minimum_stride field.
11457         (exynosm1_prefetch_tune): Likewise.
11458         (thunderxt88_prefetch_tune): Likewise.
11459         (thunderx_prefetch_tune): Likewise.
11460         (thunderx2t99_prefetch_tune): Likewise.
11461         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11462         (aarch64_override_options_internal): Update to set
11463         PARAM_PREFETCH_MINIMUM_STRIDE.
11464         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11465         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11466         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11467         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11468         stride is constant and is below the minimum stride threshold.
11470 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11472         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11473         to 512.
11475 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11477         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11478         <prefetch_dynamic_strides>: New const bool field.
11479         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11480         prefetch_dynamic_strides.
11481         (exynosm1_prefetch_tune): Likewise.
11482         (thunderxt88_prefetch_tune): Likewise.
11483         (thunderx_prefetch_tune): Likewise.
11484         (thunderx2t99_prefetch_tune): Likewise.
11485         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11486         to false.
11487         (aarch64_override_options_internal): Update to set
11488         PARAM_PREFETCH_DYNAMIC_STRIDES.
11489         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11490         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11491         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11492         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11493         prefetch-dynamic-strides setting.
11495 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11497         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11498         <minimum_stride>: New const int field.
11499         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11500         minimum_stride field.
11501         (exynosm1_prefetch_tune): Likewise.
11502         (thunderxt88_prefetch_tune): Likewise.
11503         (thunderx_prefetch_tune): Likewise.
11504         (thunderx2t99_prefetch_tune): Likewise.
11505         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11506         (aarch64_override_options_internal): Update to set
11507         PARAM_PREFETCH_MINIMUM_STRIDE.
11508         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11509         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11510         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11511         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11512         stride is constant and is below the minimum stride threshold.
11514 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11516         PR c++/85659
11517         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11518         the type is addressable.  Don't force op into register if it has
11519         BLKmode.
11521 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11523         PR other/77609
11524         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11525         any section for which we don't know a specific type it should have,
11526         regardless of name.  Previously this was done only for the exact
11527         names ".init_array", ".fini_array", and ".preinit_array".
11528         (default_elf_asm_named_section): Add comment about
11529         relationship with default_section_type_flags and SECTION_NOTYPE.
11530         (get_section): Don't consider it a type conflict if one side has
11531         SECTION_NOTYPE and the other doesn't, as long as neither has the
11532         SECTION_BSS et al used in the default_section_type_flags logic.
11534 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11536         PR target/85653
11537         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11538         (workaround_barsyncs): New function.
11539         (nvptx_reorg): Use workaround_barsyncs.
11540         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11541         (define_expand "nvptx_membar_cta"): New define_expand.
11542         (define_insn "*nvptx_membar_cta"): New insn.
11544 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11546         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11547         To improve optimization opportunities.
11548         * builtin-types.def: The new needed builtin types for the above.
11550 2018-05-04  Richard Biener  <rguenther@suse.de>
11552         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11553         * gimple-ssa-store-merging.c
11554         (imm_store_chain_info::output_merged_store): Remove redundant create,
11555         release split_store vector contents on failure.
11556         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11557         scalar stmt vector on cache hit.
11559 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11561         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11562         Xilinx FP support.
11563         * config.gcc (powerpc-xilinx-eabi*): Remove.
11564         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11565         support.
11566         (fusion_addis_mem_combo_load): Ditto.
11567         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11568         FP support.
11569         (rs6000_cpu_cpp_builtins): Ditto.
11570         * config/rs6000/rs6000-linux.c
11571         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11572         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11573         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11574         support.
11575         (rs6000_setup_reg_addr_masks): Ditto.
11576         (rs6000_init_hard_regno_mode_ok): Ditto.
11577         (rs6000_option_override_internal): Ditto.
11578         (legitimate_lo_sum_address_p): Ditto.
11579         (rs6000_legitimize_address): Ditto.
11580         (rs6000_legitimize_reload_address): Ditto.
11581         (rs6000_legitimate_address_p): Ditto.
11582         (abi_v4_pass_in_fpr): Ditto.
11583         (setup_incoming_varargs): Ditto.
11584         (rs6000_gimplify_va_arg): Ditto.
11585         (rs6000_split_multireg_move): Ditto.
11586         (rs6000_savres_strategy): Ditto.
11587         (rs6000_emit_prologue_components): Ditto.
11588         (rs6000_emit_epilogue_components): Ditto.
11589         (rs6000_emit_prologue): Ditto.
11590         (rs6000_emit_epilogue): Ditto.
11591         (rs6000_elf_file_end): Ditto.
11592         (rs6000_function_value): Ditto.
11593         (rs6000_libcall_value): Ditto.
11594         * config/rs6000/rs6000.h: Ditto.
11595         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11596         (TARGET_MINMAX): ... this.  New.
11597         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11598         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11599         (*movsi_internal1_single): Delete.
11600         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11601         mfpu=, mxilinx-fpu): Delete.
11602         * config/rs6000/singlefp.h: Delete.
11603         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11604         * config/rs6000/t-rs6000: Ditto.
11605         * config/rs6000/t-xilinx: Delete.
11606         * config/rs6000/titan.md: Adjust for fp_type removal.
11607         * config/rs6000/vsx.md: Remove Xilinx FP support.
11608         (VStype_simple): Delete.
11609         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11610         * config/rs6000/xfpu.h: Delete.
11611         * config/rs6000/xfpu.md: Delete.
11612         * config/rs6000/xilinx.h: Delete.
11613         * config/rs6000/xilinx.opt: Delete.
11614         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11615         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11617 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11619         PR libgomp/85639
11620         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11621         if ignore == 0.
11623 2018-05-04  Richard Biener  <rguenther@suse.de>
11625         PR middle-end/85627
11626         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11627         (expand_complex_div_wide): Likewise.
11628         (expand_complex_operations_1): Likewise.
11629         (expand_complex_libcall): Preserve EH info of the original stmt.
11630         (tree_lower_complex): Handle removed blocks.
11631         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11632         on complex multiplication and division libcall builtins.
11634 2018-05-04  Richard Biener  <rguenther@suse.de>
11636         PR middle-end/85574
11637         * fold-const.c (negate_expr_p): Restrict negation of operand
11638         zero of a division to when we know that can happen without
11639         overflow.
11640         (fold_negate_expr_1): Likewise.
11642 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11644         PR libstdc++/85466
11645         * real.h (real_nextafter): Declare.
11646         * real.c (real_nextafter): New function.
11647         * fold-const-call.c (fold_const_nextafter): New function.
11648         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11649         CASE_CFN_NEXTTOWARD.
11650         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11651         even when arg1_mode is different from arg0_mode.
11653 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11655         * doc/extend.texi (Deprecated Features): Remove
11656         -ffriend-injection.
11657         (Backwards Compatibility): Likewise.
11658         * doc/invoke.texi (C++ Language Options): Likewise.
11659         (C++ Dialect Options): Likewise.
11661 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11663         PR target/85530
11664         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11665         _mm512_mask_mullox_epi64): New intrinsics.
11667 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11669         PR testsuite/85106
11670         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11671         dump files): Add offload-tree.
11673 2018-05-03  Richard Biener  <rguenther@suse.de>
11675         PR tree-optimization/85615
11676         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11677         to loops not nested in BBs loop father to avoid creating multi-entry
11678         loops.
11680 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11682         PR tree-optimization/70291
11683         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11684         arguments.  Change return type to tree.  Emit libcall as a new
11685         statement rather than replacing existing one when inplace_p is true.
11686         (expand_complex_multiplication_components): New function.
11687         (expand_complex_multiplication): Expand floating-point complex
11688         multiplication using the above.
11689         (expand_complex_division): Rename inner_type parameter to type.
11690         Update expand_complex_libcall call-site.
11691         (expand_complex_operations_1): Update expand_complex_multiplication
11692         and expand_complex_division call-sites.
11694 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11696         PR target/85582
11697         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11698         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11699         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11700         the highest significant bit of the shift count mask is clear.  In
11701         check whether and[sq]i3 is needed verify that all significant bits
11702         of the shift count other than the highest are set.
11704 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11706         PR libgomp/82428
11707         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11708         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11709         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11710         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11711         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11712         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11713         __builtin_goacc_parlevel_size.
11715 2018-05-02  Richard Biener  <rguenther@suse.de>
11717         PR tree-optimization/85597
11718         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11719         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11720         directly.
11722 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11724         PR testsuite/85106
11725         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11726         dump files): Add ltrans-tree.
11728 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11730         PR testsuite/85106
11731         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11732         dump files): Add wpa-ipa.
11734 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11736         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11737         powerpc*-*-linux*paired* target.
11738         * config/rs6000/750cl.h: Delete.
11739         * config/rs6000/paired.h: Delete.
11740         * config/rs6000/paired.md: Delete.
11741         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11742         float support.
11743         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11744         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11745         comment.  Remove paired float support.
11746         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11747         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11748         VECTOR_PAIRED.
11749         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11750         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11751         declarations.
11752         * config/rs6000/rs6000.c: Remove paired float support.
11753         (paired_expand_vector_init, paired_expand_vector_move,
11754         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11755         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11756         paired_expand_builtin, paired_expand_predicate_builtin,
11757         paired_init_builtins): Delete.
11758         * config/rs6000/rs6000.h: Remove paired float support.
11759         * config/rs6000/rs6000.md: Remove paired float support.
11760         (move_from_CR_ov_bit): Delete.
11761         * config/rs6000/rs6000.opt (mpaired): Delete.
11762         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11763         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11765 2018-05-02  Richard Biener  <rguenther@suse.de>
11767         PR middle-end/85567
11768         * gimplify.c (gimplify_save_expr): When in SSA form allow
11769         SAVE_EXPRs to compute to SSA vars.
11771 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11773         PR target/85582
11774         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11775         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11776         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11777         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11779 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11781         PR tree-optimization/85586
11782         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11783         exit early for statements in the same group if the accesses are
11784         not strided.
11786 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11788         PR lto/85451
11789         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11790         error message.
11792 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11794         PR tree-optimization/85143
11795         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11797 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11799         PR lto/85451
11800         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11801         not found" error message.
11803 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11805         PR other/83786
11806         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11807         * vec.c (test_ordered_remove_if): New function.
11808         (vec_c_tests): Call test_ordered_remove_if.
11809         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11810         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11811         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11812         VEC_ORDERED_REMOVE_IF.
11814 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11816         PR tree-optimization/82665
11817         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11818         pointer subtraction where arguments come from a memchr call.
11820 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11822         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11823         --push-state --as-needed and --pop-state instead of --as-needed and
11824         --no-as-needed if ld supports it.
11825         * configure: Regenerated.
11827         PR web/85578
11828         * doc/install.texi2html: Replace _002d with - and _002a with * in
11829         generated html files using sed.
11831 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11833         PR c++/85523
11834         * gcc-rich-location.c (blank_line_before_p): New function.
11835         (use_new_line): New function.
11836         (gcc_rich_location::add_fixit_insert_formatted): New function.
11837         * gcc-rich-location.h
11838         (gcc_rich_location::add_fixit_insert_formatted): New function.
11840 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11842         * selftest.c (assert_streq): Rename "expected" and "actual" to
11843         "val1" and "val2".  Extend NULL-handling to cover both inputs
11844         symmetrically, while still requiring both to be non-NULL for a pass.
11845         * selftest.h (assert_streq): Rename "expected" and "actual" to
11846         "val1" and "val2".
11847         (ASSERT_EQ): Likewise.
11848         (ASSERT_EQ_AT): Likewise.
11849         (ASSERT_KNOWN_EQ): Likewise.
11850         (ASSERT_KNOWN_EQ_AT): Likewise.
11851         (ASSERT_NE): Likewise.
11852         (ASSERT_MAYBE_NE): Likewise.
11853         (ASSERT_MAYBE_NE_AT): Likewise.
11854         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11855         the assertion to pass.
11856         (ASSERT_STREQ_AT): Likewise.
11858 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11860         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11861         interaction with -pie.
11863 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11865         * selftest.h: Fix alphabetization of per-source-file selftest
11866         declarations.
11868 2018-04-30  Jason Merrill  <jason@redhat.com>
11870         PR c++/61982 - dead stores to destroyed objects.
11871         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11872         of clobber.
11874 2018-04-30  Jason Merrill  <jason@redhat.com>
11876         * tree.c (build_clobber): New.
11877         * tree.h: Declare it.
11878         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11880 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11882         * diagnostic-show-locus.c (layout::layout): Update for
11883         location_get_source_line returning a char_span.
11884         (struct char_span): Move to input.h.
11885         (struct correction): Update for fields in char_span becoming
11886         private.
11887         (struct source_line): Update for location_get_source_line
11888         returning a char_span.
11889         (layout::print_line): Likewise.
11890         * edit-context.c (edited_file::print_content): Likewise.
11891         (edited_file::print_diff_hunk): Likewise.
11892         (edited_file::print_run_of_changed_lines): Likewise.
11893         (edited_file::get_num_lines): Likewise.
11894         (edited_line::edited_line): Likewise.
11895         * final.c (asm_show_source): Likewise.
11896         * input.c (location_get_source_line): Convert return type
11897         from const char * to char_span, losing the final "line_len"
11898         param.
11899         (dump_location_info): Update for the above.
11900         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11901         when handling the literal within the line.
11902         (test_reading_source_line): Update for location_get_source_line
11903         returning a char_span.
11904         * input.h (class char_span): Move here from
11905         diagnostic-show-locus.c, converting from a struct to a class.
11906         Make data members private.
11907         (char_span::operator bool): New.
11908         (char_span::length): New.
11909         (char_span::get_buffer): New.
11910         (char_span::operator[]): New.
11911         (char_span::subspan): Make const.
11912         (char_span::xstrdup): New.
11913         (location_get_source_line): Convert return type from const char *
11914         to char_span, losing the final "line_size" param.
11916 2018-04-30  Jan Hubicka  <jh@suse.cz>
11918         * lto-wrapper.c (ltrans_priorities): New static var.
11919         (cmp_priority): New.
11920         (run_gcc): Read priorities and if doing parallel build order
11921         the Makefile by them.
11923 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11925         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11927 2018-04-30  Richard Biener  <rguenther@suse.de>
11929         * tree-cfg.c (verify_address): Remove base argument, add
11930         flag whether to check TREE_ADDRESSABLE and do that.
11931         (verify_expr): Remove.
11932         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11933         (verify_gimple_assign_single): Likewise.
11934         (verify_gimple_switch): Likewise.
11935         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11936         piece from verify_expr.
11937         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11939 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11941         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11943 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11945         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11946         (small_data_pattern): Likewise.
11947         (arc_rewrite_small_data): Likewise.
11948         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11949         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11950         (get_symbol_alignment): New function.
11951         (legitimate_small_data_address_p): Likewise.
11952         (legitimate_scaled_address): Update, call
11953         legitimate_small_data_address_p.
11954         (output_sdata): New static variable.
11955         (arc_print_operand): Update how we handle small data operands.
11956         (arc_print_operand_address): Likewise.
11957         (arc_legitimate_address_p): Update, use
11958         legitimate_small_data_address_p.
11959         (arc_rewrite_small_data_p): Remove.
11960         (arc_rewrite_small_data_1): Likewise.
11961         (arc_rewrite_small_data): Likewise.
11962         (small_data_pattern): Likewise.
11963         (compact_sda_memory_operand): Update to use
11964         legitimate_small_data_address_p and get_symbol_alignment.
11965         (prepare_move_operands): Don't rewite sdata pattern.
11966         (prepare_extend_operands): Remove.
11967         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11968         pattern.
11969         (zero_extendqisi2): Likewise.
11970         (zero_extendhisi2): Likewise.
11971         (extendqihi2): Likewise.
11972         (extendqisi2): Likewise.
11973         (extendhisi2): Likewise.
11974         (addsi3): Likewise.
11975         (subsi3): Likewise.
11976         (andsi3): Likewise.
11977         * config/arc/constraints.md (Usd): Change it to memory constraint.
11979 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11981         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11982         as source of std instructions.
11983         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11984         allow 6-bit constants as source for store instructions.
11985         (movdi_insn): Update instruction pattern to allow 6-bit constants
11986         as source for store instructions.
11988 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11990         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11992 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11993             Sandra Loosemore <sandra@codesourcery.com>
11995         * dumpfile.c (dump_open): Allow '-' for stdout.
11996         * doc/invoke.texi (Developer Options): Document dump filename
11997         determination early.  Document stdin/stdout selection.
11999 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
12001         Microblaze Target: PIC data text relative
12003         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
12004         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
12005         Add declaration.
12006         * config/microblaze/microblaze.h (microblaze_constant_address_p):
12007         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
12008         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
12009         New addressing mode for data-text relative position indepenedent code.
12010         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
12011         'ADDRESS_SYMBOLIC_TXT_REL'.
12012         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
12013         (microblaze_legitimate_pic_operand): Exclude function calls from
12014         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
12015         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
12016         addresses cases.
12017         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12018         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
12019         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
12020         for 'address + offset'.
12021         (microblaze_expand_prologue): Add new function prologue call for
12022         'r20' assignation.
12023         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
12024         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
12025         table in case of TARGET_PIC_DATA_TEXT_REL.
12026         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
12027         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
12028         Add new macros 'UNSPEC_TEXT',
12029         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
12030         + exclude function calls from 'UNSPEC_PLT' in case of data text
12031         relative mode.
12032         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12033         new target hook for generating address diff vector tables in case of
12034         flag_pic.
12035         * doc/tm.texi : Regenerate.
12036         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
12037         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
12038         of addr diff vector generation.
12039         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
12040         target hook definition.
12041         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
12042         Add default function for generate_pic_addr_diff_vec -> flag_pic.
12043         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12044         option for data text relative.
12046 2018-04-30  Richard Biener  <rguenther@suse.de>
12048         * tree-chrec.h (evolution_function_is_constant_p): Remove
12049         redundant check.
12050         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12052 2018-04-30  Richard Biener  <rguenther@suse.de>
12054         PR bootstrap/85571
12055         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12057 2018-04-30  Richard Biener  <rguenther@suse.de>
12059         PR tree-optimization/28364
12060         PR tree-optimization/85275
12061         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12062         copying first exit test.
12064 2018-04-28  Mark Wielaard  <mark@klomp.org>
12066         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12067         dwarf_version >= 5.
12068         (dwarf_AT): Handle DW_AT_addr_base.
12069         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12071 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12073         PR target/84431
12074         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12075         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12076         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12077         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12079 2018-04-28  Richard Biener  <rguenther@suse.de>
12081         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12082         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12083         to reflect use.  Only add interesting stmts.
12085 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12087         PR ipa/85549
12088         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12089         the jump function allows for passing through aggregate values.
12091 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12093         * input.h (in_system_header_at): Convert from macro to inline
12094         function.
12095         (from_macro_expansion_at): Likewise.
12096         (from_macro_definition_at): Likewise.
12098 2018-04-27  Jeff Law  <law@redhat.com>
12100         * config.gcc: Mark tile* targets as deprecated/obsolete.
12102 2018-04-27  Richard Biener  <rguenther@suse.de>
12104         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12105         fix for ILP32.
12107 2018-04-27  Richard Biener  <rguenther@suse.de>
12109         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12111 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12113         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12114         with Yd constraint. Set "preferred_for_speed" attribute from
12115         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12116         with Yd constraint.
12117         (*movdi_internal): Ditto.
12118         (movti_interunit splitters): Remove
12119         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12120         (movdi_interunit splitters): Ditto.
12121         * config/i386/constraints.md (Ye): Remove.
12122         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12124 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12126         PR target/85512
12127         * config/aarch64/constraints.md (Usg): Limit to 31.
12128         (Usj): Limit to 63.
12130 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12132         PR tree-optimization/85529
12133         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12134         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12135         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12136         zero extension or masking of the MSB bit.
12137         (optimize_range_tests): Add FIRST_BB argument, pass it through
12138         to optimize_range_tests_var_bound.
12139         (maybe_optimize_range_tests, reassociate_bb): Adjust
12140         optimize_range_tests callers.
12142 2018-04-26  Richard Biener  <rguenther@suse.de>
12143             Jakub Jelinek  <jakub@redhat.com>
12145         * cgraph.h (symbol_table): Just declare debug method here.
12146         * symtab.c (symbol_table::debug): Define.
12148 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12150         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12152 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12154         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12155         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12156         (*movdi_internal): Substitute Yi and Yj constraint with x
12157         and Ym and Yn constraint with y constraint.  Update "isa"
12158         attribute and set "preferred_for_speed" attribute from
12159         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12160         (*movsi_internal): Ditto.
12161         (*movdf_internal): Ditto.
12162         (*movsf_internal): Ditto.
12163         (*zero_extendsidi2): Ditto.
12164         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12165         (sse2_loadld): Ditto.
12166         (*vec_extract<ssevecmodelower>_0): Ditto.
12167         (*vec_extractv4si_0_zext_sse4): Ditto.
12168         (vec_concatv2di): Ditto.
12169         (*vec_dup<mode>): Ditto.
12170         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12171         * config/i386/constraints.md (Yi): Remove.
12172         (Yj): Remove.
12173         (Ym): Remove.
12174         (Yn): Remove.
12176 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12178         * dumpfile.c (dump_open): New.
12179         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12180         (dump_finish): Detect stdio/stderr by value not name.
12182 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12184         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12186 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12188         PR target/84952
12189         * config/nvptx/nvptx.c (verify_neutering_jumps)
12190         (verify_neutering_labels): New function
12191         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12193 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12195         PR target/84025
12196         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12197         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12198         need neutering.
12200 2018-04-26  Richard Biener <rguenther@suse.de>
12201             Tom de Vries  <tom@codesourcery.com>
12203         PR lto/85422
12204         * lto-streamer-out.c (output_function): Fixup loops if required to match
12205         discovery done in the reader.
12207 2018-04-26  Richard Biener  <rguenther@suse.de>
12209         PR tree-optimization/85116
12210         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12211         have a loop exit from the single latch predecessor.  Remove
12212         case of header with just condition.
12213         (ch_base::copy_headers): Exclude infinite loops from any
12214         processing.
12215         (pass_ch::execute): Record exits.
12217 2018-04-26  Richard Biener  <rguenther@suse.de>
12219         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12220         prologue cost vector and pass it to vect_get_load_cost.
12221         (vect_get_peeling_costs_all_drs): Likewise.
12222         (vect_peeling_hash_get_lowest_cost): Likewise.
12223         (vect_enhance_data_refs_alignment): Likewise.
12225 2018-04-26  Richard Biener  <rguenther@suse.de>
12227         PR middle-end/85450
12228         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12229         checking of integer<->pointer conversions.
12230         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12231         sign-/zero-extending pointer types.
12232         (expand_omp_for_static_chunk): Likewise.
12234 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12235             Jean Lee  <xiaoyur347@gmail.com>
12237         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12238         (TARGET_ASAN_SHADOW_OFFSET): Define.
12239         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12240         true for -fsanitize=address.
12242 2018-04-25  Mark Wielaard  <mark@klomp.org>
12244         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12245         shorter ones.
12247 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12249         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12250         than "alu", remove explicit "memory" and "imm_disp" attributes.
12251         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12253         PR middle-end/85414
12254         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12255         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12256         gen_lowpart_no_emit.
12258 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12260         PR target/85473
12261         * config/i386/i386.c (ix86_expand_builtin): Change memory
12262         operand to XI, extend p0 to Pmode.
12263         * config/i386/i386.md: Change unspec volatile and operand
12264         1 mode to XI, change operand 0 mode to P.
12266 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12268         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12269         GET_MODE_MASK before any checking.
12270         (nds32_can_use_bset_p): Likewise.
12271         (nds32_can_use_btgl_p): Likewise.
12273 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12275         * config/nds32/nds32-doubleword.md: New define_split pattern for
12276         illegal register number.
12278 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12280         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12282 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12284         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12286 2018-04-25  Richard Biener  <rguenther@suse.de>
12288         * lto-streamer.h (LTO_major_version): Bump to 8.
12290 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12292         * BASE-VER: Set to 9.0.0.
12294 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12296         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12297         in __abskf2 and __powikf2.
12299 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12301         PR target/85512
12302         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12303         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12304         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12305         Use the above on operand 2.  Reindent.
12306         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12308 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12310         PR target/85485
12311         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12312         handle OPT_mcet.
12313         * config/i386/i386.opt (mcet): Removed.
12314         * doc/install.texi: Remove -mcet documentation.
12315         * doc/invoke.texi: Likewise.
12317 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12319         PR target/85485
12320         * doc/install.texi: Remove -mcet from bootstrap-cet.
12322 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12324         PR target/85511
12325         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12326         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12327         if TARGET_64BIT.
12329         PR target/85503
12330         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12331         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12332         containing a CONST_VECTOR.
12334 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12336         * doc/install.texi: Update newlib dependency for nvptx.
12338 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12340         PR target/85508
12341         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12342         instead of INTVAL when shifting x left.
12344 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12346         PR tree-optimization/85478
12347         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12348         vect_grouped_store_supported for single element vectors.
12350 2018-04-24  Richard Biener  <rguenther@suse.de>
12352         PR target/85491
12353         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12354         load cost increase to the case of non-constant step.
12356 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12358         PR target/84828
12359         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12360         destination if any_malformed_asm.
12362 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12364         PR middle-end/85496
12365         * expr.c (store_field): In the bitfield case, if the value comes from
12366         a function call and is returned in registers by means of a PARALLEL,
12367         do not change the mode of the temporary unless BLKmode and VOIDmode.
12369 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12371         PR rtl-optimization/85423
12372         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12373         dependencies to debug insns when the previous insn is non-debug.
12375 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12377         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12378         enums into a single definition.
12379         (fls): Fix predicates and printing.
12380         (seti): Likewise.
12382 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12384         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12385         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12386         and short u6 immediate.
12387         (check_if_valid_sleep_operand): Remove.
12388         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12390 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12392         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12393         flag_always_save_lp condition.
12394         * config/nds32/nds32.opt (malways-save-lp): New option.
12396 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12398         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12399         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12400         * config/nds32/nds32.h
12401         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12402         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12404 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12406         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12407         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12409 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12410             Chung-Ju Wu  <jasonwucj@gmail.com>
12412         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12413         Declare.
12414         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12415         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12417 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12419         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12421 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12423         * config/nds32/nds32-protos.h (nds32_data_alignment,
12424         nds32_local_alignment): Declare.
12425         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12426         nds32_local_alignment): New functions.
12427         (TARGET_CONSTANT_ALIGNMENT): Define.
12428         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12430 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12432         * config/nds32/nds32.c
12433         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12434         (TARGET_MODES_TIEABLE_P): Likewise.
12436 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12438         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12439         level Ofast and Og.
12441 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12442             Chung-Ju Wu  <jasonwucj@gmail.com>
12444         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12445         for unaligned access.
12446         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12447         unaligned access.
12448         * config/nds32/nds32-intrinsic.md: Likewise.
12449         * config/nds32/nds32_intrinsic.h: Likewise.
12450         * config/nds32/nds32.h (nds32_builtins): Likewise.
12451         * config/nds32/nds32.opt (munaligned-access): New option.
12452         * config/nds32/nds32.c (nds32_asm_file_start): Display
12453         flag_unaligned_access status.
12455 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12457         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12458         -mno-relax is present.
12459         * config/riscv/linux.h (LINK_SPEC): Ditto.
12461 2018-04-20  Martin Sebor  <msebor@redhat.com>
12463         PR c/85365
12464         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12465         for null pointers.
12466         (gimple_fold_builtin_stxcpy_chk): Same.
12467         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12469 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12471         PR target/85456
12472         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12473         __powikf2 when long double is IEEE 128-bit.
12475 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12477         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12478         step to make sure stack always aligned.
12480 2018-04-20  Carl Love  <cel@us.ibm.com>
12482         PR target/83402
12483         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12484         size check for arg0.
12486 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12487             Tom de Vries  <tom@codesourcery.com>
12489         PR target/85445
12490         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12491         Emit insns for calls too.
12492         (nvptx_find_par): Always look for worker-level predecessor insn.
12493         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12494         calls.
12495         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12496         (nvptx_process_pars): Propagate frames for calls.
12498 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12500         PR target/85469
12501         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12502         Removed.
12503         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12504         (ix86_handle_option): Don't handle OPT_mibt.
12505         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12506         __SHSTK__.
12507         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12508         has_ibt and ibt.
12509         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12510         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12511         (ix86_target_macros): Define __CET__ with flag_cf_protection
12512         for -fcf-protection.
12513         * config/i386/i386.c (isa2_opts): Remove -mibt.
12514         * config/i386/i386.h (TARGET_IBT): Removed.
12515         (TARGET_IBT_P): Likewise.
12516         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12517         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12518         * config/i386/i386.opt (mcet): Update help message.
12519         (mshstk): Likewise.
12520         (mibt): Removed.
12521         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12522         -mcet as an alias for -mshstk.
12524 2018-04-20  Richard Biener <rguenther@suse.de>
12526         PR middle-end/85475
12527         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12528         complexity by forcing a single use of the multiply operand.
12530 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12532         ipa/85449
12533         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12534         recursion dependency to only apply to non-clones.
12536 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12538         ipa/85447
12539         * ipa-cp.c (create_specialized_node): Check that clones of
12540         self-recursive edges exist during IPA-CP.
12542 2018-04-19  Toon Moene  <toon@moene.org>
12544         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12545         by -O3.
12547 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12549         PR tree-optimization/85467
12550         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12551         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12552         VECTOR_CST element to type.
12554 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12556         PR target/85397
12557         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12558         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12559         (builtin_longjmp): Likewise.
12560         (save_stack_nonlocal): New pattern.
12561         (restore_stack_nonlocal): Likewise.
12563 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12565         PR target/85404
12566         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12567         Replace ASM_OUTPUT_LABEL with fprintf.
12569 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12571         PR target/85417
12572         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12573         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12574         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12575         define __IBT__ and __SHSTK__ for -fcf-protection.
12576         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12577         TARGET_IBT.
12578         (ix86_trampoline_init): Likewise.
12579         (x86_output_mi_thunk): Likewise.
12580         (ix86_notrack_prefixed_insn_p): Likewise.
12581         (ix86_option_override_internal): Don't disallow -fcf-protection.
12582         * config/i386/i386.md (rdssp<mode>): Also enable for
12583         -fcf-protection.
12584         (incssp<mode>): Likewise.
12585         (nop_endbr): Likewise.
12586         * config/i386/i386.opt (mcet): Change help message to built-in
12587         functions only.
12588         (mibt): Likewise.
12589         (mshstk): Likewise.
12590         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12591         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12592         enable CET built-in functions.
12594 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12596         * common/config/i386/i386-common.c
12597         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12598         OPTION_MASK_ISA_MOVDIRI_UNSET,
12599         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12600         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12601         * config.gcc (movdirintrin.h): New header.
12602         * config/i386/cpuid.h (bit_MOVDIRI,
12603         bit_MOVDIR64B): New bits.
12604         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12605         and -mmvodir64b.
12606         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12607         (VOID, PVOID, PCVOID)): New function types.
12608         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12609         __builtin_ia32_directstoreu_u64,
12610         __builtin_ia32_movdir64b): New builtins.
12611         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12612         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12613         and -mmovdiri.
12614         (ix86_valid_target_attribute_inner_p): Ditto.
12615         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12616         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12617         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12618         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12619         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12620         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12621         (movdiri<mode>, movdir64b_<mode>): New.
12622         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12623         * config/i386/immintrin.h: Include movdirintrin.h.
12624         * config/i386/movdirintrin.h: New file.
12625         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12627 2018-04-19  Richard Biener  <rguenther@suse.de>
12629         PR middle-end/85455
12630         * cfg.c (clear_bb_flags): When loop state says we have
12631         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12633 2018-04-19  Richard Biener  <rguenther@suse.de>
12635         PR tree-optimization/84737
12636         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12637         copying restrict info.
12638         (vect_setup_realignment): Use it.
12639         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12640         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12641         the first DR to all generated stores.
12642         (vectorizable_load): Likewise for loads.
12644 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12646         PR tree-optimization/85446
12647         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12648         the integral and pointer types to have the same precision.
12650         * doc/install.texi: Document --disable-cet being the default and
12651         --enable-cet=auto.
12653 2018-04-18  Martin Liska  <mliska@suse.cz>
12655         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12656         style.
12658 2018-04-18  Martin Liska  <mliska@suse.cz>
12660         Revert
12661         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12663         PR ipa/83983
12664         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12665         arguments if they are comparable.
12667 2018-04-18  Martin Liska  <mliska@suse.cz>
12669         Revert
12670         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12672         PR lto/84805
12673         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12674         incomplete types.
12676 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12678         PR target/85388
12679         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12680         ENDBR after calling __morestack.
12682 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12684         PR jit/85384
12685         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12686         by using gcc_base_ver to generate a gcc_driver_version, and use
12687         it when generating GCC_DRIVER_NAME.
12688         * configure: Regenerate.
12690 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12692         PR target/81084
12693         * config.gcc: Obsolete powerpc*-*-*spe*.
12695 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12697         PR debug/84637
12698         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12699         (stabstr_D): Change type of unum from unsigned int to
12700         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12701         type.
12703 2018-04-17  Jim Wilson  <jimw@sifive.com>
12705         PR 84856
12706         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12707         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12708         Set arg_pointer_offset after using pretend_args_size.
12710 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12712         PR rtl-optimization/85431
12713         * dse.c (record_store): Ignore zero width stores.
12715         PR sanitizer/85230
12716         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12717         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12718         __builtin_stack_restore rather than after it.
12719         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12720         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12721         argument instead of virtual_dynamic_stack_rtx.
12723 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12725         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12726         New prototype.
12727         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12728         Add note to error message to explain internal mapping of overloaded
12729         built-in function name to non-overloaded built-in function name.
12730         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12731         function.
12733 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12735         PR target/85424
12736         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12737         where the inputs overlap with the output.
12739 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12741         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12742         (=v, v) alternative and explicit "memory" attribute.
12743         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12744         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12745         attributes.
12746         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12747         "sselog1" type instead of "sselog".
12748         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12749         "sselog".  Remove explicit "memory" attribute.
12750         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12751         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12752         attributes.
12753         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12754         "sselog1" type instead of "sselog".  Remove explicit "memory"
12755         attribute.
12756         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12757         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12758         attribute.
12759         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12760         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12761         attributes.
12762         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12763         "sselog1" type instead of "sselog".  Remove explicit "memory"
12764         attribute.
12765         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12766         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12767         attribute.
12769         PR target/85430
12770         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12772         PR middle-end/85414
12773         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12774         on a SUBREG.
12776 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12778         PR ipa/85421
12779         * ipa-cp.c (create_specialized_node): Call
12780         expand_all_artificial_thunks if necessary.
12782 2018-04-17  Martin Liska  <mliska@suse.cz>
12784         PR lto/85405
12785         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12786         in message, remote space in between '_G' and '('.
12788 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12790         PR target/85281
12791         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12792         avx512f_vmcmp<mode>3<round_saeonly_name>,
12793         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12794         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12795         avx512f_rndscale<mode><round_saeonly_name>,
12796         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12797         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12798         Use %<iptr>2 instead of %2 for -masm=intel.
12799         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12800         avx512f_vcvttss2usi<round_saeonly_name>,
12801         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12802         -masm=intel.
12803         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12804         avx512f_vcvttsd2usi<round_saeonly_name>,
12805         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12806         Use %q1 instead of %1 for -masm=intel.
12807         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12808         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12809         of %3 for -masm=intel.
12810         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12811         -masm=intel.
12812         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12813         -masm=intel.
12814         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12815         -masm=intel.
12816         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12817         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12818         %g1.
12819         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12820         -masm=intel.
12821         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12822         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12823         %g1 and one with %0 and %1.
12824         (avx512er_vmrcp28<mode><round_saeonly_name>,
12825         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12826         %1 for -masm=intel.
12827         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12828         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12829         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12830         of %0 and %{%4%} for -masm=intel.
12831         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12832         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12833         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12834         order of %0 and %{%5%}%{z%} for -masm=intel.
12836 2018-04-17  Jan Hubicka  <jh@suse.cz>
12838         PR lto/85405
12839         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12841 2018-04-17  Martin Liska  <mliska@suse.cz>
12843         PR ipa/85329
12844         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12845         for target_clone error message.  Make default implementation
12846         clone to be a local declaration.
12847         (separate_attrs): Add new argument and check for an empty
12848         string.
12849         (expand_target_clones): Handle it.
12850         (ipa_target_clone): Make redirection just for target_clones
12851         functions.
12853 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12854             Tom de Vries  <tom@codesourcery.com>
12856         PR middle-end/84955
12857         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12858         tiled basic blocks without omp continue statements.
12860 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12862         PR target/83660
12863         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12864         vec_extract expression as having side effects to make sure it gets
12865         a cleanup point.
12867 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12869         PR target/85403
12870         * config/i386/i386.c (get_builtin_code_for_version): Check
12871         error_mark_node.
12873 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12875         PR target/84331
12876         * config.gcc: Support "skylake".
12877         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12878         PROCESSOR_SKYLAKE.
12879         * config/i386/i386.c (m_SKYLAKE): Define.
12880         (processor_target_table): Add "skylake".
12881         (ix86_option_override_internal): Add "skylake".
12882         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12883         PROCESSOR_CANNONLAKE.
12884         (get_builtin_code_for_version): Fix priority for
12885         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12886         PROCESSOR_SKYLAKE-AVX512.
12887         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12888         (processor_type): Add PROCESSOR_SKYLAKE.
12890 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12891             Jason Merrill  <jason@redhat.com>
12893         PR c++/85112
12894         * convert.c (convert_to_integer_1): Use direct recursion for
12895         enumeral types and types with a precision less than the number
12896         of bits in their mode.
12898 2018-04-16  Julia Koval  <julia.koval@intel.com>
12900         PR target/84413
12901         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12902         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12904 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12906         PR target/85293
12907         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12908         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12909         and -mno-direct-move.
12911 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12913         PR target/83402
12914         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12915         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12916         Ensure negative shifts result in {0}.
12918 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12920         PR rtl-optimization/79916
12921         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12922         regs (if any) to define how to gnerate SD moves when LRA is in
12923         progress.
12925 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12927         PR rtl-optimization/85393
12928         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12929         * except.c (expand_dw2_landing_pad_for_region): Make static.
12930         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12931         a label and unconditional jump to old_bb, rather than
12932         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12933         basic block.
12935         PR rtl-optimization/85376
12936         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12937         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12938         instead of a specific value.
12940 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12941             Bin Cheng  <bin.cheng@arm.com>
12943         PR tree-optimization/82965
12944         PR tree-optimization/83991
12945         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12946         by_profile_only parameter.
12947         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12948         information if the loop was predicted to iterate too many times.
12949         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12951 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12953         PR lto/71991
12954         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12955         always inline.
12957 2018-04-13  Martin Liska  <mliska@suse.cz>
12958             Jakub Jelinek  <jakub@redhat.com>
12960         PR middle-end/81657
12961         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12962         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12963         * builtins.c (expand_builtin_memory_copy_args): Use
12964         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12965         handle dest_addr == pc_rtx.
12967 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12969         PR target/85291
12970         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12971         asked to not generate direct moves.
12972         (fix_trunc<mode>si2_stfiwx): Similar.
12973         (fix_trunc<mode>si2_internal): Similar.
12975 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12977         PR debug/83157
12978         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12979         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12980         lookup if dest in some wider mode is known to be const0_rtx and
12981         if so, record permanent equivalence for it to be ZERO_EXTEND of
12982         the narrower mode destination.
12984 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12986         * lto-streamer-out.c (output_function): Revert 259346.
12987         * omp-expand.c (expand_oacc_for): Likewise.
12989 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12991         PR rtl-optimization/85354
12992         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12993         * sel-sched.c (sel_global_init): ... here.
12995 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12997         PR target/85238
12998         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12999         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13000         mode for PE-COFF targets.
13001         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
13002         (i386_pe_asm_lto_end): Likewise.
13003         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
13004         (TARGET_ASM_LTO_END): Likewise.
13005         * config/i386/winnt.c (saved_debug_info_level): New static variable.
13006         (i386_pe_asm_lto_start): New function.
13007         (i386_pe_asm_lto_end): Likewise.
13009 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
13010             Richard Biener  <rguenther@suse.de>
13012         PR middle-end/84955
13013         * lto-streamer-out.c (output_function): Fix CFG loop state before
13014         streaming out.
13015         * omp-expand.c (expand_oacc_for): Handle calls to internal
13016         functions like regular functions.
13018 2018-04-12  Richard Biener  <rguenther@suse.de>
13020         PR lto/85371
13021         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
13022         for the early LTO debug to properly generate references to it
13023         during DIE emission.  Do not re-use that for the skeleton for
13024         split-dwarf.
13025         (dwarf2out_early_finish): Likewise.
13027 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13029         PR target/85328
13030         * config/i386/sse.md
13031         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
13032         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
13033         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
13034         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
13035         and output is a reg, avoid creating invalid lowpart subreg, but
13036         instead split into a 512-bit move.  Don't split if not AVX512VL,
13037         input is xmm16+ reg and output is a mem.
13038         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
13039         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
13040         xmm16+ reg and output is a mem.
13042 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13044         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13045         also for flag_dwarf2_cfi_asm.
13047 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13049         PR rtl-optimization/85342
13050         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13051         a bool scalar var inside of the loop instead.  Don't try to update
13052         recog_data.operand after failed apply_change_group.
13054 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13056         PR target/85296
13057         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13058         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13059         array with flexible array member as array without given dimension.
13060         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13061         argument for undefined param to true.
13063 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13065         PR target/85321
13066         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13067         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13068         from PowerPC section.
13069         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13070         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13071         help text that is too long.
13072         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13073         help text that is too long.
13074         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13075         help text that is too long.
13077 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13079         * config/alpha/alpha.md (stack_probe_internal): Rename
13080         from "probe_stack".  Update all callers.
13082 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13084         PR rtl-optimization/84566
13085         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13086         sched_macro_fuse_insns.
13088 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13090         PR target/84301
13091         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13092         (compute_block_dependences): ... from here.
13094 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13096         PR tree-optimization/85331
13097         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13098         from int to HOST_WIDE_INT.
13100 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13102         PR ipa/84149
13103         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13104         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13105         not the same as the source val.
13106         (cgraph_edge_brings_value_p): New parameter.
13107         (gather_edges_for_value): Pass destination value to
13108         cgraph_edge_brings_value_p.
13109         (perhaps_add_new_callers): Likewise.
13110         (get_info_about_necessary_edges): Likewise and exclude values brought
13111         only by self-recursive edges.
13112         (create_specialized_node): Redirect only clones of self-calling edges.
13113         (+self_recursive_pass_through_p): New function.
13114         (find_more_scalar_values_for_callers_subset): Use it.
13115         (find_aggregate_values_for_callers_subset): Likewise.
13116         (known_aggs_to_agg_replacement_list): Removed.
13117         (decide_whether_version_node): Re-calculate known constants for all
13118         remaining context clones.
13120 2018-04-11  Richard Biener  <rguenther@suse.de>
13122         PR lto/85339
13123         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13124         from early DWARF output.
13125         (dwarf2out_early_finish): Output line info unconditionally into
13126         early DWARF and add reference to it.
13128 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13130         PR target/85281
13131         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13132         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13133         other than V2DFmode using iptr mode attribute.
13134         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13136 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13138         PR rtl-optimization/84659
13139         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13141 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13143         PR debug/85302
13144         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13145         SIZEP is NULL.
13146         (output_loc_list): Pass address of a dummy size variable even in the
13147         locview handling loop.
13148         (index_location_lists): Add comment on why skip_loc_list_entry can't
13149         call size_of_locs.
13151 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13153         PR target/85261
13154         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13155         into register.
13157 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13159         PR target/85321
13160         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13161         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13162         and -mstring-compare-inline-limit.
13164 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13166         PR target/85287
13167         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13168         for stack clash protection in a register whenever we need it to be in
13169         a register.
13171 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13173         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13174         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13176 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13178         PR target/85321
13179         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13180         the help text.
13181         (mlong-double-): Ditto.
13182         * config/rs6000/sysv4.opt (msdata=): Ditto.
13183         (mtls-size=): Ditto.
13185 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13187         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13188         erroneous entries for
13189         "vector int vec_ldl (int, long int *)", and
13190         "vector unsigned int vec_ldl (int, unsigned long int *)".
13191         Add comments and entries for
13192         "vector bool char vec_ldl (int, bool char *)",
13193         "vector bool short vec_ldl (int, bool short *)",
13194         "vector bool int vec_ldl (int, bool int *)",
13195         "vector bool long long vec_ldl (int, bool long long *)",
13196         "vector pixel vec_ldl (int, pixel *)",
13197         "vector long long vec_ldl (int, long long *)",
13198         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13199         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13200         type tree bool_long_long_type_node and correct definition of
13201         bool_V2DI_type_node to make reference to this new type tree.
13202         (rs6000_mangle_type): Replace erroneous reference to
13203         bool_long_type_node with bool_long_long_type_node.
13204         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13205         comments to emphasize sign distinctions for char and int types and
13206         replace RS6000_BTI_bool_long constant with
13207         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13208         use of RS6000_BTI_pixel.
13209         (bool_long_type_node): Remove this macro definition.
13210         (bool_long_long_type_node): New macro definition
13212 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13214         PR rtl-optimization/85300
13215         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13216         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13217         simplify_unary_operation fails.
13219 2018-04-10  Martin Liska  <mliska@suse.cz>
13221         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13222         cgraph_edge and ipa_ref.
13224 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13226         PR target/85177
13227         PR target/85255
13228         * config/i386/sse.md
13229         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13230         computation of the VEC_MERGE selector from mask.
13231         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13232         Fix decoding of the VEC_MERGE selector into mask.
13234 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13236         PR tree-optimization/85286
13237         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13239 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13241         * final.c (final_1): Set insn_last_address as well as
13242         insn_current_address.
13244 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13246         PR target/85173
13247         * explow.c (emit_stack_probe): Call validize_mem on memory location
13248         before passing it to gen_probe_stack.  Create address operand and
13249         legitimize it for the probe_stack_address case.
13251 2018-04-09  Jan Hubicka  <jh@suse.cz>
13253         PR lto/85078
13254         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13255         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13256         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13257         walk basetypes.
13258         (free_lang_data): Rebuild type inheritance graph.
13260 2018-04-09  Martin Sebor  <msebor@redhat.com>
13262         * invoke.texi (-finline-small-functions): Mention other optimization
13263         options.
13264         (-findirect-inlining, -fpartial-inlining): Same.
13265         (-finline-functions-called-once): Same.
13266         (-freorder-blocks-and-partition): Same.
13268 2018-04-09  Jan Hubicka  <jh@suse.cz>
13270         PR rtl/84058
13271         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13272         jumps; choose last target that matches the criteria (i.e.
13273         no partition changes for non-crossing jumps).
13274         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13275         support for redirecting crossing jumps to non-crossing.
13277 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13279         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13280         also for naked functions.
13282 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13284         * config/arc/arc.md (add_shift): New pattern.
13285         (add_shift2): Likewise.
13286         (sub_shift): Likewise.
13287         (sub_shift_cmp0_noout): Likewise.
13288         (compare_si_ashiftsi): Likewise.
13289         (xbfu_cmp0_noout): New combine pattern.
13290         (xbfu_cmp0"): Likewise.
13291         (movsi_set_cc_insn): Place the predicable variant first.
13292         (commutative_binary_cmp0_noout): Remove clobber.
13293         (commutative_binary_cmp0): New pattern.
13294         (noncommutative_binary_cmp0): Likewise.
13295         (noncommutative_binary_cmp0_noout): Likewise.
13296         (noncommutative_binary_comparison_result_used): Removed.
13297         (rsub_cmp0): New pattern.
13298         (rsub_cmp0_noout): Likewise.
13299         (extzvsi): Changed, keep only meaningful variants.
13300         (SQH, SEZ): New iterators.
13301         (SQH_postfix): New mode attribute.
13302         (SEZ_prefix): New code attribute.
13303         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13304         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13305         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13306         of numerical value.
13307         (noncommutative_operator): Check the availability of barrel
13308         shifter option.
13310 2018-04-09  Richard Biener  <rguenther@suse.de>
13312         PR tree-optimization/85284
13313         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13314         Only use the niter constraining form of simple_iv when the exit
13315         is always executed.
13317 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13319         PR target/84041
13320         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13321         (define_expand "*memory_barrier"): New define_expand.
13322         (define_insn "memory_barrier"): New insn.
13324 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13326         PR rtl-optimization/80463
13327         PR rtl-optimization/83972
13328         PR rtl-optimization/83480
13330         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13331         correct producer for the insn.
13332         (tidy_control_flow): Fixup seqnos in case of debug insns.
13334 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13336         PR rtl-optimization/83913
13338         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13339         different sched-times when merging exprs.
13341 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13343         PR rtl-optimization/83962
13345         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13346         tidy_fallthru_edge and tidy_control_flow.
13348 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13350         PR rtl-optimization/83530
13352         * sel-sched.c (force_next_insn): New global variable.
13353         (remove_insn_for_debug): When force_next_insn is true, also leave only
13354         next insn in the ready list.
13355         (sel_sched_region): When the region wasn't scheduled, make another pass
13356         over it with force_next_insn set to 1.
13358 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13360         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13361         into tm_file.
13362         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13363         for interrupt control.
13364         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13365         functions for interrupt control.
13366         * config/nds32/nds32-intrinsic.md: Likewise.
13367         * config/nds32/nds32_intrinsic.h: Likewise.
13368         * config/nds32/nds32.h (nds32_builtins): Likewise.
13370 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13372         * config/nds32/nds32.c (nds32_init_machine_status,
13373         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13374         strict_aligned_p field.
13375         (nds32_expand_to_rtl_hook): New function.
13376         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13377         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13379 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13380             Chung-Ju Wu  <jasonwucj@gmail.com>
13382         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13383         * config/nds32/nds32-n7.md: New file.
13384         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13385         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13386         pipeline.
13387         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13388         * config/nds32/nds32.md (pipeline_model): Add n7.
13389         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13390         * config/nds32/pipelines.md: Include n7 settings.
13392 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13393             Chung-Ju Wu  <jasonwucj@gmail.com>
13395         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13396         * config/nds32/nds32-e8.md: New file.
13397         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13398         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13399         pipeline.
13400         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13401         * config/nds32/nds32.md (pipeline_model): Add e8.
13402         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13403         * config/nds32/pipelines.md: Include e8 settings.
13405 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13406             Chung-Ju Wu  <jasonwucj@gmail.com>
13408         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13409         * config/nds32/nds32-n8.md: New file.
13410         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13411         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13412         pipeline.
13413         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13414         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13415         * config/nds32/nds32.md (pipeline_model): Add n8.
13416         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13417         * config/nds32/pipelines.md: Include n8 settings.
13419 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13420             Chung-Ju Wu  <jasonwucj@gmail.com>
13422         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13423         * config/nds32/nds32-n9-2r1w.md: New file.
13424         * config/nds32/nds32-n9-3r2w.md: New file.
13425         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13426         nds32_register_ports): New or modify for cpu n9.
13427         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13428         pipeline.
13429         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13430         * config/nds32/nds32-utils.c: New file.
13431         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13432         TARGET_MUL_SLOW): Define.
13433         * config/nds32/nds32.md (pipeline_model): New attribute.
13434         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13435         New options that support cpu n9.
13436         * config/nds32/pipelines.md: Include n9 settings.
13437         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13439 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13441         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13442         information if necessary.
13443         (output_cond_branch_compare_zero): Likewise.
13444         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13445         (nds32_target_alignment): Refine for alignment.
13446         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13447         (FUNCTION_BOUNDARY): Modify.
13448         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13449         align case.
13450         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13452 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13454         * config/nds32/constants.md (unspec_volatile_element): Add values for
13455         TLB operation and data prefetch.
13456         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13457         functions for TLB operation and data prefetch.
13458         * config/nds32/nds32-intrinsic.md: Likewise.
13459         * config/nds32/nds32_intrinsic.h: Likewise.
13460         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13461         (nds32_print_operand): Likewise.
13462         * config/nds32/nds32.h (nds32_builtins): Likewise.
13464 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13465         Andrew Pinski <pinsika@gcc.gnu.org>
13467         PR middle-end/82976
13468         * match.pd: Use constant_boolean_node of correct type instead of
13469         boolean_true_node or boolean_false_node for simplifying
13470         pointer comparisons to zero.
13472 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13474         PR tree-optimization/80021
13475         * tree.c (verify_type_variant): Make error call in verify_variant_match
13476         translatable and remove final full stop.
13478 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13480         * config/nds32/constants.md (unspec_volatile_element): Add
13481         UNSPEC_VOLATILE_EH_RETURN.
13482         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13483         nds32_output_stack_pop): Support dwarf exception handling process.
13484         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13485         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13486         exception handling process.
13487         (nds32_compute_stack_frame): Likewise.
13488         (nds32_return_addr_rtx): Likewise.
13489         (nds32_initial_elimination_offset): Likewise.
13490         (nds32_expand_prologue): Likewise.
13491         (nds32_expand_epilogue): Likewise.
13492         (nds32_dynamic_chain_address): New function.
13493         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13494         exception handling.
13495         (DYNAMIC_CHAIN_ADDRESS): Define.
13496         (EH_RETURN_DATA_REGNO): Define.
13497         (EH_RETURN_STACKADJ_RTX): Define.
13498         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13499         patterns for dwarf exception handling.
13501 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13503         * config/nds32/nds32.h: Clean up obsolete macros.
13505 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13507         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13508         Add enum values for particular instructions.
13509         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13510         particular intrinsic functions.
13511         * config/nds32/nds32-intrinsic.md: Likewise.
13512         * config/nds32/nds32_intrinsic.h: Likewise.
13513         * config/nds32/nds32.h (nds32_builtins): Likewise.
13514         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13515         (btst, ave): New patterns for particular instructions.
13517 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13519         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13520         Add enum values for atomic load/store and memory sync.
13521         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13522         and memory sync.
13523         * config/nds32/nds32-intrinsic.md: Likewise.
13524         * config/nds32/nds32_intrinsic.h: Likewise.
13525         * config/nds32/nds32.h (nds32_builtins): Likewise.
13527 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13529         PR tree-optimization/85257
13530         * fold-const.c (native_encode_vector): If not all elts could fit
13531         and off is -1, return 0 rather than offset.
13532         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13533         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13534         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13535         adjust buffer in native_interpret_expr call.
13537 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13539         * config/nds32/constants.md (unspec_volatile_element): Add cache
13540         control enum values.
13541         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13542         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13543         * config/nds32/nds32.c (nds32_cctl_names): New.
13544         (nds32_print_operand): Handle cache control register names.
13545         * config/nds32/nds32.h (nds32_builtins): New enum values.
13546         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13547         macros.
13548         * config/nds32/nds32.md (type): Add mmu.
13549         * config/nds32/pipelines.md (simple_insn): Add mmu.
13551 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13553         * config/nds32/nds32.md (type): Remove call.
13554         * config/nds32/pipelines.md (simple_insn): Likewise.
13556 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13558         * config/nds32/constants.md (unspec_volatile_element): Add
13559         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13560         UNSPEC_VOLATILE_FMFCFG.
13561         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13562         description for fmfcfg and fmfcsr.
13563         (bdesc_1arg): Add fmtcsr.
13564         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13565         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13566         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13567         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13568         unspec_fmfcfg): New patterns.
13569         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13570         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13571         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13572         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13573         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13574         __nds32__fmfcfg): Define.
13576 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13578         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13579         intrinsic register names.
13580         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13581         intrinsic register enum values and macros.
13583 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13585         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13586         for load/store addressing form.
13587         (nds32_print_operand_address): Likewise.
13589 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13591         PR target/85196
13592         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13593         based on LABEL_REF.  Remove useless assertion.
13594         (pic_address_needs_scratch): Fix formatting.
13595         (sparc_legitimize_pic_address): Minor tweaks.
13596         (sparc_delegitimize_address): Adjust assertion accordingly.
13597         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13598         into symbolic_operand.
13599         (movsi_high_pic_label_ref): Likewise.
13600         (movsi_lo_sum_pic_label_ref): Likewise.
13601         (movdi_pic_label_ref): Likewise.
13602         (movdi_high_pic_label_ref): Likewise.
13603         (movdi_lo_sum_pic_label_ref): Likewise.
13605 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13607         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13608         custom LIB_SPEC setup.
13610 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13611             Kito Cheng  <kito.cheng@gmail.com>
13613         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13614         * config/riscv/freebsd.h: New.
13616 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13618         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13619         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13620         file.
13622 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13623             Kito Cheng  <kito.cheng@gmail.com>
13625         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13626         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13627         * config/nds32/nds32-protos.h (nds32_output_call,
13628         nds32_output_return): Declare.
13629         * config/nds32/nds32.md: Refine all the call and return patterns.
13631 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13633         PR debug/85252
13634         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13635         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13637         PR rtl-optimization/84872
13638         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13639         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13640         EDGE_CROSSING edge.
13642 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13644         * expr.c (copy_blkmode_to_reg): Revert 254862.
13645         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13647 2018-04-06  Richard Biener  <rguenther@suse.de>
13649         PR middle-end/85244
13650         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13651         after seeing a component reference with an adjacent field.  Treat
13652         refs to arrays at struct end of external decls similar to
13653         refs to unconstrained commons.
13655 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13657         PR sanitizer/85213
13658         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13659         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13660         recursive calls.
13661         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13662         save_p here.
13664 2018-04-06  Richard Biener  <rguenther@suse.de>
13666         PR middle-end/85180
13667         * alias.c (find_base_term): New wrapper around find_base_term
13668         unwinding CSELIB_VAL_PTR changes.
13669         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13670         recursion.
13672 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13674         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13675         instructions.
13676         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13677         constant definitions.
13678         ("nop"): lr 0,0 -> nopr r0
13679         ("nop_lr0", "nop_lr1"): New insn definitions.
13681 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13683         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13684         NDS32_V3PUSH_AVAILABLE_P macro.
13686 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13687             Chung-Ju Wu  <jasonwucj@gmail.com>
13689         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13690         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13691         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13692         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13693         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13694         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13695         * config/nds32/constraints.md: New constraints and checking for hard
13696         float configuration.
13697         * config/nds32/iterators.md: New mode iterator and attribute for hard
13698         float configuration.
13699         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13700         patterns.
13701         * config/nds32/nds32-fpu.md: New file.
13702         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13703         deal with hard float code generation.
13704         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13705         ARCH_V3S.
13706         (abi_type, float_reg_number): New enum type.
13707         * config/nds32/nds32-predicates.c: New predicates for hard float.
13708         * config/nds32/nds32-protos.h: Declare functions for hard float.
13709         * config/nds32/nds32.c: Implementation for hard float configuration.
13710         * config/nds32/nds32.h: Definitions for hard float configuration.
13711         * config/nds32/nds32.md: Include hard float machine description and
13712         modify patterns for hard float configuration.
13713         * config/nds32/nds32.opt: New options for hard float configuration.
13714         * config/nds32/predicates.md: New predicates for hard float
13715         configuration.
13717 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13719         * common/config/nds32/nds32-common.c
13720         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13722 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13724         PR middle-end/85195
13725         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13726         CONSTRUCTOR_ELT (ctor, ...)->value.
13728 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13730         PR target/85193
13731         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13733 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13735         PR target/85204
13736         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13737         cond jump.
13739 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13740             Kito Cheng  <kito.cheng@gmail.com>
13742         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13743         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13744         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13745         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13747 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13748             Kito Cheng  <kito.cheng@gmail.com>
13750         * config/nds32/constraints.md (Ufe): New memory constraint.
13751         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13752         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13753         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13754         operands.
13755         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13756         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13758 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13760         * config/nds32/nds32.md: Use optimize_size in the condition for
13761         alu-shift instructions.
13763 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13765         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13767 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13769         * config/nds32/nds32.md (negsi2): Refine pattern.
13771 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13772             Chung-Ju Wu  <jasonwucj@gmail.com>
13774         * config/nds32/iterators.md (shift_rotate): New code iterator.
13775         (shift): New code attribute.
13776         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13777         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13778         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13779         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13780         bit-wise operations.
13781         (andsi3, *andsi3): Ditto.
13782         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13783         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13784         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13785         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13786         nds32_ior_operand, nds32_xor_operand): New predicates.
13788 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13790         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13791         (addsi3, subsi3): ... this.
13793 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13795         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13797 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13799         * config/nds32/nds32.md: Adjust indention.
13801 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13803         * config/nds32/nds32.md (feature): New attribute.
13805 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13807         * config/nds32/nds32.md (subtype): New attribute.
13809 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13811         PR target/85203
13812         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13813         expansion to perform a bitwise AND of the argument followed by a
13814         boolean negation of the result.
13816 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13818         PR rtl-optimization/84878
13819         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13820         the basic block.  Assert the use reference is not artificial and that
13821         it has an associated insn.
13823 2018-04-04  Michael Matz  <matz@suse.de>
13825         * builtins.c (compute_objsize): Pass correct operand
13826         to array_at_struct_end_p.
13828 2018-04-04  Richard Biener  <rguenther@suse.de>
13830         PR lto/85176
13831         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13832         from contexts for DINFO_LEVEL_TERSE and below.
13834 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13836         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13837         resiter_operand condition.
13838         * config/nds32/nds32.md (*move<mode>): Ditto.
13840 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13841             Monk Chiang  <sh.chiang04@gmail.com>
13843         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13845 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13847         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13849 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13850             Kito Cheng  <kito.cheng@gmail.com>
13852         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13853         nds32_cond_code_str, output_cond_branch,
13854         output_cond_branch_compare_zero, nds32_expand_cbranch,
13855         nds32_expand_cstore, nds32_expand_movcc,
13856         nds32_output_cbranchsi4_equality_zero,
13857         nds32_output_cbranchsi4_equality_reg,
13858         nds32_output_cbranchsi4_equality_reg_or_const_int,
13859         nds32_output_cbranchsi4_greater_less_zero: New functions.
13860         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13861         nds32_expand_cstore, nds32_expand_movcc,
13862         nds32_output_cbranchsi4_equality_zero,
13863         nds32_output_cbranchsi4_equality_reg,
13864         nds32_output_cbranchsi4_equality_reg_or_const_int,
13865         nds32_output_cbranchsi4_greater_less_zero): Declare.
13866         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13867         nds32_rimm11s_operand): New predicates.
13868         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13869         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13870         patterns.
13872 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13874         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13875         * config/nds32/nds32.md: Ditto.
13876         * config/nds32/pipelines.md: Ditto.
13878 2018-04-04  Richard Biener  <rguenther@suse.de>
13880         PR tree-optimization/85168
13881         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13882         propagating abnormals.
13884 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13886         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13888 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13889             Kito Cheng  <kito.cheng@gmail.com>
13891         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13892         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13893         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13894         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13895         * config/nds32/nds32.md (sibcall_internal): New.
13896         (sibcall_register): Remove.
13897         (sibcall_immediate): Remove.
13898         (sibcall_value_internal): New.
13899         (sibcall_value_register): Remove.
13900         (sibcall_value_immediate): Remove.
13901         * config/nds32/predicates.md (nds32_general_register_operand): New.
13902         (nds32_call_address_operand): New.
13904 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13906         PR rtl-optimization/85167
13907         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13908         bb_defs if *split_p, instead preinitialize it to NULL.
13910         PR tree-optimization/85156
13911         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13912         evaluating the argument multiple times.
13914 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13916         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13917         than vector.
13918         (_mm_cvtpd_ps): Likewise.
13919         (_mm_cvttpd_epi32): Likewise.
13920         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13921         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13922         vector, pixel, and bool following altivec.h include.
13924 2018-04-03  Martin Sebor  <msebor@redhat.com>
13926         * doc/extend.texi (Common Function Attributes): Clarify.
13927         (const attribute): Likewise.
13928         (pure attribute): Likewise.
13930 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13932         PR target/85169
13933         * config/i386/i386.c (ix86_expand_vector_set): Use
13934         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13936 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13938         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13939         instructions when changing rounding bits to preserve precision bits
13940         in the x87 control word.
13942 2018-04-03  Martin Liska  <mliska@suse.cz>
13944         PR tree-optimization/82491
13945         * rtl.h (strip_offset_and_add): Replace += suboffset with
13946         poly_uint64 () + suboffset.
13948 2018-03-29  Martin Liska  <mliska@suse.cz>
13949             Martin Jambor  <mjambor@suse.cz>
13951         PR ipa/84947
13952         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13953         param_type is not an integral or pointer type.
13955 2018-04-03  Richard Biener  <rguenther@suse.de>
13957         * sese.h (recompute_all_dominators): Remove.
13959 2018-04-02  Martin Sebor  <msebor@redhat.com>
13961         * doc/invoke.texi (-Wrestrict): Fix typos.
13963 2018-04-02  Jim Wilson  <jimw@sifive.com>
13965         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13966         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13967         (<optab>di3, <optab>si3_extend): Likewise.
13968         (<optab>si3_mask, <optab>si3_mask_1): New.
13969         (<optab>di3_mask, <optab>di3_mask_1): New.
13970         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13971         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13972         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13974 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13976         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13977         example.
13979 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13981         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13982         (nds32_canonicalize_comparison): New function.
13984 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13985             Kito Cheng  <kito.cheng@gmail.com>
13986             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13988         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13989         * config/nds32/constants.md (unspec_volatile_element): Add
13990         UNSPEC_VOLATILE_RELAX_GROUP.
13991         * config/nds32/nds32-relax-opt.c: New file.
13992         * config/nds32/nds32-predicates.c
13993         (nds32_symbol_load_store_p): New function.
13994         * config/nds32/nds32-protos.h
13995         (nds32_symbol_load_store_p): Declare function.
13996         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13997         * config/nds32/nds32.c
13998         (nds32_register_pass): New function to register pass.
13999         (nds32_register_passes): New function to register passes.
14000         * config/nds32/nds32.md (relax_group): New pattern.
14001         * config/nds32/nds32.opt (mrelax-hint): New option.
14002         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
14004 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
14006         * config/nds32/t-nds32: Modify files dependency.
14008 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14010         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
14011         (PROFILE_HOOK): Define its implementation.
14013 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
14015         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
14016         type and 32-bit size.
14018 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
14020         PR middle-end/85090
14021         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
14022         (V_128_256): New mode iterator.
14023         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
14024         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
14025         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
14026         of V.
14027         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
14028         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
14030 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
14032         PR target/83315
14033         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
14034         NaN inputs correctly.
14036 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
14038         PR target/80546
14039         * config/rs6000/vsx.md (??r): New mode attribute.
14040         (*vsx_mov<mode>_64bit): Use it.
14041         (*vsx_mov<mode>_32bit): Likewise.
14043 2018-03-30  Martin Sebor  <msebor@redhat.com>
14045         PR tree-optimization/84818
14046         * builtins.c (check_access): Use warning_n.
14048 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14050         PR target/83822
14051         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14052         condition.
14053         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14054         condition.
14056 2018-03-30  Julia Koval  <julia.koval@intel.com>
14058         PR target/84413
14059         * x86-tune.def (movx, partial_reg_dependency): Enable for
14060         m_SKYLAKE_AVX512.
14062 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14064         PR inline-asm/84985
14065         * lra-constraints.c (process_alt_operands): Move setting
14066         this_alternative_matches below.
14068 2018-03-29  Martin Liska  <mliska@suse.cz>
14070         PR lto/84995.
14071         * doc/invoke.texi: Document how LTO works with debug info.
14072         Describe auto-load support of binutils.  Mention 'x86-64'
14073         as valid option value of -march option.
14075 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14077         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14079         PR c/85094
14080         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14081         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14082         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14083         checking.
14085 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14087         PR target/84912
14088         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14089         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14090         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14091         for RS6000_BTM_POWERPC64.
14092         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14093         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14094         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14095         definition.
14096         (DIVDE): Use it.
14097         (DIVDEU): Likewise.
14099 2018-03-28  Carl Love  <cel@us.ibm.com>
14101         Revert
14102         2017-09-27  Carl Love  <cel@us.ibm.com>
14104         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14105         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14106         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14107         fctiw instruction.
14109 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14111         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14112         instead of __vector bool.
14113         (_mm_max_pu8): Likewise.
14114         (_mm_min_pi16): Likewise.
14116 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14118         PR target/84912
14119         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14120         (DIVWEUO): Likewise.
14121         (DIVDEO): Likewise.
14122         (DIVDEUO): Likewise.
14123         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14124         DIVWEUO and DIVDEUO.
14125         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14126         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14127         (div_extend): Likewise.
14128         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14129         builtin function.
14130         (__builtin_divweuo): Likewise.
14131         (__builtin_divdeo): Likewise.
14132         (__builtin_divdeuo): Likewise.
14134 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14136         PR target/85095
14137         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14138         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14140         PR tree-optimization/82004
14141         * gimple-match-head.c (optimize_pow_to_exp): New function.
14142         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14143         Don't fold to exp if optimize_pow_to_exp is false.
14145 2018-03-28  Martin Liska  <mliska@suse.cz>
14147         PR other/84819
14148         * calls.c (initialize_argument_information): Fix trailing space.
14149         * common.opt: Fix typo and provide better explanation for
14150         -fsanitize-coverage option.
14151         * config/i386/i386.opt: Fix typo.
14153 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14154             Martin Liska  <mliska@suse.cz>
14156         PR sanitizer/85081
14157         * gimplify.c (asan_poison_variable): Don't do the check for
14158         gimplify_omp_ctxp here.
14159         (gimplify_decl_expr): Do it here.
14160         (gimplify_target_expr): Likewise.
14162 2018-03-28  Martin Liska  <mliska@suse.cz>
14164         PR target/84988
14165         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14166         chkp_type_bounds_count if MPX is not enabled.
14168 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14170         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14172 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14174         PR target/84914
14175         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14176         function to create the function decl for complex long double
14177         multiply and divide for -mabi=ieeelongdouble.
14178         (init_float128_ieee): Call it.
14180 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14182         PR target/85044
14183         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14184         -fcf-protection=branch -mibt.
14185         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14187 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14189         PR target/81863
14190         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14191         arm_word_relocations.
14193 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14195         PR target/85056
14196         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14197         extern array declarations.
14199 2018-03-27  Richard Biener  <rguenther@suse.de>
14201         PR middle-end/84067
14202         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14203         explicit single_use checks.
14205 2018-03-27  Richard Biener  <rguenther@suse.de>
14207         PR tree-optimization/85082
14208         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14209         Valueize the VUSE.
14211 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14213         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14214         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14215         Turn on fasynchronous-unwind-tables and funwind-tables.
14217 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14219         PR target/85073
14220         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14221         (*bmi_blsr_<mode>_ccz): Ditto.
14223 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14225         PR tree-optimization/85063
14226         * omp-general.c (offloading_function_p): New function.  Factor out
14227         of ...
14228         * omp-offload.c (pass_omp_target_link::gate): ... here.
14229         * omp-general.h (offloading_function_p): Declare.
14230         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14231         with attribute omp declare target for offloading functions.
14233 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14235         PR tree-optimization/84005
14236         * tree-data-ref.h (get_base_for_alignment): Declare.
14237         * tree-data-ref.c (get_base_for_alignment_1): New function.
14238         (get_base_for_alignment): Likewise.
14239         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14240         get_base_for_alignment to find a suitable base object, instead
14241         of always using drb->base_address.
14243 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14245         PR inline-asm/85022
14246         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14247         known size by default.
14249 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14251         PR inline-asm/85030
14252         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14253         and non BLKmode operands.
14255 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14257         PR target/85026
14258         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14259         Clean up attributes.
14261 2018-03-23  Richard Biener  <rguenther@suse.de>
14263         PR debug/85020
14264         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14265         we are going to emit early debug for LTO.
14267 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14269         PR inline-asm/85034
14270         * function.c (match_asm_constraints_1): Don't optimize if input
14271         doesn't satisfy general_operand predicate for output's mode.
14273         PR inline-asm/85022
14274         * alias.c (write_dependence_p): Don't require for x_canonicalized
14275         non-VOIDmode if x has VOIDmode.
14277         PR sanitizer/85029
14278         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14279         just don't try to optimize it rather than assert it never happens.
14281 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14283         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14284         macro expansions for definition of ST_INTERNAL_<mode> and
14285         LD_INTERNAL_<mode> builtins.
14286         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14287         Remove prototype.
14288         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14289         function.
14290         (altivec_expand_st_builtin): Likewise.
14291         (altivec_expand_builtin): Remove calls to deleted functions.
14292         (rs6000_address_for_altivec): Delete this function.
14293         * config/rs6000/vector.md: Remove expands for
14294         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14296 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14298         PR target/84826
14299         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14300         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14301         re-computing once computed.
14302         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14303         (arm_init_machine_status): Initialize
14304         machine->static_chain_stack_bytes.
14306 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14308         PR target/84760
14309         * doc/extend.texi: Add four new prototypes for vec_ld.
14310         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14311         definitions for more logical presentation.
14312         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14313         entries for V1TI variants of __builtin_altivec_ld builtin.
14314         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14315         handling of V1TI variant of LVX icode pattern.
14316         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14317         (rs6000_gimple_fold_builtin): Likewise.
14318         (altivec_init_builtins): Add code to define
14319         __builtin_altivec_lvx_v1ti function.
14321 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14323         PR inline-asm/84941
14324         * function.c (match_asm_constraints_1): Don't do the optimization
14325         if input isn't a REG, SUBREG, MEM or constant.
14327 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14329         PR tree-optimization/84956
14330         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14331         bb_has_abnormal_pred.
14333 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14335         PR sanitizer/85018
14336         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14337         DECL_INITIAL (decl) to decl at the end.
14338         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14339         adjust the comment.
14341 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14343         * doc/extend.texi (__builtin_tgmath): Document when complex
14344         integer types are treated as _Complex _Float64.
14346 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14348         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14350 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14352         PR tree-optimization/84960
14353         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14354         if it is ENTRY block, move them into single succ of ENTRY in that case.
14356 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14358         PR tree-optimization/84811
14359         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14360         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14361         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14362         (known_subrange_p): Update accordingly.  Cast each value involved
14363         in the size comparison, rather than casting the result of the
14364         subtraction.
14366 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14368         PR tree-optimization/84982
14369         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14370         by flipping the least significant bit rather than all bits from
14371         bitpos to bitpos + bitsize - 1.
14373 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14375         * doc/extend.texi (Deprecated Features): Remove mention of
14376         long-deleted deprecations.
14378 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14380         PR jit/84288
14381         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14382         * configure: Regenerate.
14384 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14386         PR tree-optimization/83126
14387         * tree-parloops.c (num_phis): New function.
14388         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14390 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14392         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14393         mention anon-struct/union members and trailing attributes.
14395 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14397         PR tree-optimization/84969
14398         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14399         builtin memset partitions if they set different rhs values.
14401 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14403         PR rtl-optimization/84989
14404         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14405         VEC_DUPLICATE with scalar result mode.
14407 2018-03-21  Martin Liska  <mliska@suse.cz>
14409         PR ipa/84963
14410         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14411         not intended return statement.
14413 2018-03-21  Martin Liska  <mliska@suse.cz>
14415         PR target/84988
14416         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14417         (chkp_find_bound_slots_1): Limit number of iterations.
14419 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14421         PR target/84838
14422         * Minor grammar fixes for x86 options.
14424 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14426         PR debug/84875
14427         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14428         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14430 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14432         PR target/83789
14433         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14434         (altivec_lvx_<mode>_1op): Likewise.
14435         (altivec_stvx_<mode>_2op): Likewise.
14436         (altivec_stvx_<mode>_1op): Likewise.
14437         (altivec_lvx_<VM2:mode>): New define_expand.
14438         (altivec_stvx_<VM2:mode>): Likewise.
14439         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14440         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14441         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14442         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14443         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14444         (rs6000_gen_lvx): Likewise.
14445         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14446         (altivec_expand_stv_builtin): Likewise.
14447         (altivec_expand_builtin): Likewise.
14448         * config/rs6000/vector.md: Likewise.
14450 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14452         PR target/82518
14453         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14454         BYTES_BIG_ENDIAN.
14456 2018-03-20  Richard Biener  <rguenther@suse.de>
14458         PR target/84986
14459         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14460         sign-conversions as zero, fall back to standard scalar_stmt
14461         cost for the rest.
14463 2018-03-20  Martin Liska  <mliska@suse.cz>
14465         PR ipa/84825
14466         * predict.c (rebuild_frequencies): Handle case when we have
14467         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14469 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14471         PR target/84990
14472         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14473         flag_section_anchors.
14474         * varasm.c (use_blocks_for_decl_p): Remove hack for
14475         dw2_force_const_mem.
14477         PR target/84845
14478         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14479         to ...
14480         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14481         be created, use lowpart_subreg of operands[0] rather than operands[0]
14482         itself.
14483         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14484         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14485         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14486         and n constraint instead of aarch64_shift_imm_di and Usd.
14487         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14488         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14490 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14492         PR target/82989
14493         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14494         to favor GPR over NEON registers.
14495         (<shift>di3_neon): Likewise.
14497 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14499         PR target/84952
14500         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14501         (nvptx_process_pars): Emit bar.sync asap and alap.
14503 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14505         PR target/84954
14506         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14507         seen_label if seen_label is already set.
14509 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14511         PR target/84945
14512         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14513         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14514         Use 1U instead of 1.  Formatting fixes.
14516         PR c/84953
14517         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14518         instead of TREE_TYPE (s1) for the return value.
14520 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14522         PR tree-optimization/84946
14523         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14524         bitsize + bitsize in poly_uint64 rather than poly_int64.
14526         PR sanitizer/78651
14527         * dwarf2asm.c: Include fold-const.c.
14528         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14529         of decl rather than decl itself.
14531         PR rtl-optimization/84643
14532         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14534 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14536         PR sanitizer/78651
14537         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14538         calling assemble_variable.
14540 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14542         PR target/81647
14543         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14544         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14546 2018-03-19  Jim Wilson  <jimw@sifive.com>
14548         PR bootstrap/84856
14549         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14550         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14551         (riscv_first_stack_step): Likewise.
14552         (riscv_option_override): Use STACK_BOUNDARY instead of
14553         MIN_STACK_BOUNDARY.
14554         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14555         MIN_STACK_BOUNDARY.
14556         (BIGGEST_ALIGNMENT): Set to 128.
14557         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14558         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14559         STACK_BOUNDARY.
14561 2018-03-19  Richard Biener  <rguenther@suse.de>
14563         PR tree-optimization/84933
14564         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14565         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14567 2018-03-19  Richard Biener  <rguenther@suse.de>
14569         PR tree-optimization/84859
14570         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14571         (cond_if_else_store_replacement): Perform sinking operation on
14572         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14573         Generalize what a BB with a single eligible store is.
14575 2018-03-19  Richard Biener  <rguenther@suse.de>
14577         PR tree-optimization/84929
14578         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14579         chrec_is_positive against non-chrec arg.
14581 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14583         PR target/84711
14584         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14586 2018-03-18  Martin Liska  <mliska@suse.cz>
14588         PR rtl-optimization/84635
14589         * regrename.c (build_def_use): Use matches_mode only when
14590         matches >= 0.
14592 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14594         PR tree-optimization/84913
14595         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14596         vectorize chains of COND_EXPRs.
14598 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14600         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14602 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14604         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14606 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14608         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14610 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14611             Kito Cheng  <kito.cheng@gmail.com>
14613         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14614         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14615         (nds32_adjust_reg_alloc_order): New function.
14616         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14618 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14620         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14621         nds32_print_operand, nds32_print_operand_address): Use
14622         HOST_WIDE_INT_PRINT_DEC instead.
14624 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14626         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14628 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14630         PR target/84902
14631         * config/i386/i386.c (initial_ix86_tune_features,
14632         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14633         unsigned long long.
14634         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14635         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14636         rather than 1u << ix86_tune.  Formatting fix.
14637         (ix86_option_override_internal): Change ix86_arch_mask from
14638         unsigned int to unsigned HOST_WIDE_INT, initialize to
14639         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14640         (ix86_function_specific_restore): Likewise.
14642 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14644         PR target/84899
14645         * postreload.c (reload_combine_recognize_pattern): Perform
14646         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14647         truncate_int_for_mode the result for the destination's mode.
14649         PR c/84909
14650         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14651         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14652         Likewise.
14653         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14654         Likewise.
14656 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14658         PR target/84876
14659         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14660         regno_allocno_class_array and sorted_pseudos.
14661         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14662         insns where regno is used.
14664 2018-03-16  Martin Liska  <mliska@suse.cz>
14666         PR ipa/84833
14667         * multiple_target.c (create_dispatcher_calls): Redirect
14668         reference in the symbol table.
14670 2018-03-16  Martin Liska  <mliska@suse.cz>
14672         PR ipa/84722
14673         * multiple_target.c (create_dispatcher_calls): Redirect also
14674         an alias.
14676 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14678         PR c++/79937
14679         PR c++/82410
14680         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14681         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14682         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14684 2018-03-16  Julia Koval  <julia.koval@intel.com>
14686         * doc/invoke.texi (Skylake Server): Add CLWB.
14687         Cannonlake): Remove CLWB.
14689 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14691         PR tree-optimization/84841
14692         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14693         1 << 3.
14694         (FLOAT_ONE_CONST_TYPE): Define.
14695         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14696         (sort_by_operand_rank): Put entries with higher constant_type last
14697         rather than first to match comments.
14699 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14701         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14702         split predicate.
14704 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14706         PR c++/79085
14707         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14708         check and use address of target always.
14710 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14712         PR target/84574
14713         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14714         (indirect_thunk_bnd_needed): Likewise.
14715         (indirect_thunks_used): Likewise.
14716         (indirect_thunks_bnd_used): Likewise.
14717         (indirect_return_needed): New.
14718         (indirect_return_bnd_needed): Likewise.
14719         (output_indirect_thunk_function): Add a bool argument for
14720         function return.
14721         (output_indirect_thunk_function): Don't generate alias for
14722         function return thunk.
14723         (ix86_code_end): Call output_indirect_thunk_function to generate
14724         function return thunks.
14725         (ix86_output_function_return): Set indirect_return_bnd_needed
14726         and indirect_return_needed instead of indirect_thunk_bnd_needed
14727         and indirect_thunk_needed.
14729 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14731         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14732         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14733         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14735 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14736             Paul Hua <paul.hua.gm@gmail.com>
14738         PR c/84852
14739         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14741 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14743         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14744         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14745         resp. SFmode cases.
14747 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14749         PR target/84711
14750         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14751         instead of GET_MODE_SIZE when comparing Units.
14753 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14755         PR target/68256
14756         * varasm.c (hash_section): Return an unchangeble hash value
14757         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14758         Return !aarch64_can_use_per_function_literal_pools_p ().
14760 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14762         PR target/84860
14763         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14764         rather than address of cmode as last argument to prepare_cmp_insn.
14766 2018-03-15  Julia Koval  <julia.koval@intel.com>
14768         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14769         F_AVX512VNNI, F_AVX512BITALG): New.
14771 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14773         PR target/83451
14774         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14775         insn for floating-point loads and stores.
14777 2018-03-14  Carl Love  <cel@us.ibm.com>
14779         * config/rs6000/rs6000-c.c: Add macro definitions for
14780         ALTIVEC_BUILTIN_VEC_PERMXOR.
14781         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14782         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14783         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14784         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14785         UNSPEC_VPERMXOR.
14786         * config/doc/extend.texi: Add prototypes for vec_permxor.
14788 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14790         PR c/84852
14791         * diagnostic-show-locus.c (class layout_point): Convert m_line
14792         from int to linenum_type.
14793         (line_span::comparator): Use linenum "compare" function when
14794         comparing line numbers.
14795         (test_line_span): New function.
14796         (layout_range::contains_point): Convert param "row" from int to
14797         linenum_type.
14798         (layout_range::intersects_line_p): Likewise.
14799         (layout::will_show_line_p): Likewise.
14800         (layout::print_source_line): Likewise.
14801         (layout::should_print_annotation_line_p): Likewise.
14802         (layout::print_annotation_line): Likewise.
14803         (layout::print_leading_fixits): Likewise.
14804         (layout::annotation_line_showed_range_p): Likewise.
14805         (struct line_corrections): Likewise for field m_row.
14806         (line_corrections::line_corrections): Likewise for param "row".
14807         (layout::print_trailing_fixits): Likewise.
14808         (layout::get_state_at_point): Likewise.
14809         (layout::get_x_bound_for_row): Likewise.
14810         (layout::print_line): Likewise.
14811         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14812         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14813         * input.c (selftest::test_linenum_comparisons): New function.
14814         (selftest::input_c_tests): Call it.
14815         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14816         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14817         * selftest.h (ASSERT_GT): New macro.
14818         (ASSERT_GT_AT): New macro.
14819         (ASSERT_LT): New macro.
14820         (ASSERT_LT_AT): New macro.
14822 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14824         PR rtl-optimization/84780
14825         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14827 2018-03-14  Martin Liska  <mliska@suse.cz>
14829         * tree.c (record_node_allocation_statistics): Use
14830         get_stats_node_kind.
14831         (get_stats_node_kind): New function extracted from
14832         record_node_allocation_statistics.
14833         (free_node): Use get_stats_node_kind.
14835 2018-03-14  Richard Biener  <rguenther@suse.de>
14837         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14838         that the value-set of ANTIC_IN doesn't grow.
14840         Revert
14841         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14842         member.
14843         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14844         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14846 2018-03-14  Julia Koval  <julia.koval@intel.com>
14848         * config.gcc (icelake-client, icelake-server): New.
14849         (icelake): Remove.
14850         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14851         (initial_ix86_arch_features): Ditto.
14852         (PTA_SKYLAKE): Add SGX.
14853         (PTA_ICELAKE): Remove.
14854         (PTA_ICELAKE_CLIENT): New.
14855         (PTA_ICELAKE_SERVER): New.
14856         (ix86_option_override_internal): Split up icelake on icelake client and
14857         icelake server.
14858         (get_builtin_code_for_version): Ditto.
14859         (fold_builtin_cpu): Ditto.
14860         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14861         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14862         * config/i386/i386.h (processor_type): Ditto.
14863         * doc/invoke.texi: Ditto.
14865 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14867         PR sanitizer/83392
14868         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14869         INTEGER_CST offset, add it together with bitpos / 8 and
14870         sign extend based on POINTER_SIZE.
14872         PR target/84844
14873         Revert
14874         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14876         PR target/78090
14877         * config/i386/constraints.md (Yc): New register constraint.
14878         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14879         Use Yc constraint for alternative 2 of operand 0.  Remove
14880         preferred_for_speed attribute.
14882 2018-03-14  Richard Biener  <rguenther@suse.de>
14884         PR tree-optimization/84830
14885         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14886         with the old one to avoid oscillations.
14888 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14890         PR target/83712
14891         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14892         pseudos.
14893         (assign_by_spills): Return a flag of reload assignment failure.
14894         Do not process the reload assignment failures.  Do not spill other
14895         reload pseudos if they has the same reg class.  Update n if
14896         necessary.
14897         (lra_assign): Add a return arg.  Set up from the result of
14898         assign_by_spills call.
14899         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14900         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14901         usage_insns if it is not NULL.
14902         (spill_hard_reg_in_range): New function.
14903         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14904         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14905         function prototypes.
14906         (lra_assign): Change prototype.
14907         * lra.c (lra): Add code to deal with fails by splitting hard reg
14908         live ranges.
14910 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14912         * config/riscv/riscv.opt (mrelax): New option.
14913         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14914         "norelax" when riscv_mrelax is disabled.
14915         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14917 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14919         PR target/84743
14920         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14921         reassociation for int modes.
14923 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14925         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14926         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14927         for big-endian.
14928         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14929         * config/aarch64/aarch64-sve.md
14930         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14931         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14932         (*extend<mode><Vwide>2): Rename to...
14933         (aarch64_sve_extend<mode><Vwide>2): ...this.
14934         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14935         renaming the old pattern to...
14936         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14937         unsigned packs.
14938         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14939         define_expand, renaming the old pattern to...
14940         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14941         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14942         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14943         account when deciding which SVE instruction the optab should use.
14944         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14946 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14948         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14949         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14950         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14951         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14952         (tlsdesc_small_<mode>): Turn a define_expand and use
14953         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14954         (tlsdesc_small_advsimd_<mode>): ...this.
14955         (tlsdesc_small_sve_<mode>): New pattern.
14957 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14959         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14960         (UNSPEC_UMUL_HIGHPART): New constants.
14961         (MUL_HIGHPART): New int iteraor.
14962         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14963         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14964         define_expand.
14965         (*<su>mul<mode>3_highpart): New define_insn.
14967 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14969         PR lto/84805
14970         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14971         incomplete types.
14973 2018-03-13  Martin Liska  <mliska@suse.cz>
14975         PR ipa/84658.
14976         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14977         vector.
14978         (sem_item_optimizer::~sem_item_optimizer): Release it.
14979         (sem_item_optimizer::merge_classes): Register variable aliases.
14980         (sem_item_optimizer::fixup_pt_set): New function.
14981         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14982         * ipa-icf.h: Declare new variables and functions.
14984 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14986         PR middle-end/84834
14987         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14988         integer_pow2p@2 and test integer_pow2p in condition.
14989         (A < 0 ? C : 0): Similarly for @1.
14991         PR middle-end/84831
14992         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14993         characters starting at p contain '\0' character, don't look beyond
14994         that.
14996         PR target/84827
14997         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14998         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
15000         PR target/84828
15001         * reg-stack.c (change_stack): Change update_end var from int to
15002         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
15003         also call set_block_for_insn on the newly added insns and rescan.
15005         PR target/84786
15006         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
15007         on the last operand.
15009         PR c++/84704
15010         * tree.c (stabilize_reference_1): Return save_expr (e) for
15011         STATEMENT_LIST even if it doesn't have side-effects.
15013 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
15015         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
15017 2018-03-12  Renlin Li  <renlin.li@arm.com>
15019         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
15020         aarch64_output_scalar_simd_mov_immediate.
15022 2018-03-12  Martin Sebor  <msebor@redhat.com>
15024         PR tree-optimization/83456
15025         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
15026         for perfectly overlapping calls to memcpy.
15027         (gimple_fold_builtin_memory_chk): Same.
15028         (gimple_fold_builtin_strcpy): Handle no-warning.
15029         (gimple_fold_builtin_stxcpy_chk): Same.
15030         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
15032 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15034         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
15035         parameter.  Use it for SFmode.
15036         (rs6000_function_arg_advance_1): Adjust.
15037         (rs6000_function_arg): Adjust.
15038         (rs6000_gimplify_va_arg): Pass false for that new parameter.
15040 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
15042         PR rtl-optimization/84169
15043         PR rtl-optimization/84780
15044         * combine.c (can_combine_p): Check for a 2-insn combination whether
15045         the destination register is used between the two insns, too.
15047 2018-03-12  Richard Biener  <rguenther@suse.de>
15049         PR tree-optimization/84803
15050         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15051         for refs DR analysis didn't process.
15053 2018-03-12  Richard Biener  <rguenther@suse.de>
15055         PR tree-optimization/84777
15056         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15057         force-vectorize loops ignore whether we are optimizing for size.
15059 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15061         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15062         (TARGET_MD_ASM_ADJUST): Define.
15064 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15065             Kito Cheng  <kito.cheng@gmail.com>
15066             Chung-Ju Wu  <jasonwucj@gmail.com>
15068         * config/nds32/nds32.c (nds32_compute_stack_frame,
15069         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15070         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15071         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15072         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15073         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15074         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15075         * config/nds32/nds32.md (prologue, epilogue): Use macro
15076         NDS32_V3PUSH_AVAILABLE_P to do checking.
15078 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15080         PR debug/58150
15081         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15082         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15083         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15084         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15085         addition of most attributes on !orig_type_die or the attribute not
15086         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15088 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15089             Chung-Ju Wu  <jasonwucj@gmail.com>
15091         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15092         __NDS32_VH__ macro.
15093         * config/nds32/nds32.opt (mvh): New option.
15095 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15096             Chung-Ju Wu  <jasonwucj@gmail.com>
15098         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15099         function.
15100         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15101         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15102         definition.
15104 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15105             Chung-Ju Wu  <jasonwucj@gmail.com>
15107         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15108         function.
15109         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15110         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15112 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15113             Kito Cheng  <kito.cheng@gmail.com>
15114             Chung-Ju Wu  <jasonwucj@gmail.com>
15116         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15117         UNSPEC_FFMISM and UNSPEC_FLMISM.
15118         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15119         for ffb, ffmism and flmism.
15120         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15121         (unspec_ffmism): Ditto.
15122         (unspec_flmism): Ditto.
15123         (nds32_expand_builtin_impl): Check if string extension is available.
15124         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15125         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15127 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15129         Reverting patch:
15130         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15132         PR target/83712
15133         * lra-assigns.c (assign_by_spills): Return a flag of reload
15134         assignment failure.  Do not process the reload assignment
15135         failures.  Do not spill other reload pseudos if they has the same
15136         reg class.
15137         (lra_assign): Add a return arg.  Set up from the result of
15138         assign_by_spills call.
15139         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15140         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15141         usage_insns if it is not NULL.
15142         (spill_hard_reg_in_range): New function.
15143         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15144         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15145         function prototypes.
15146         (lra_assign): Change prototype.
15147         * lra.c (lra): Add code to deal with fails by splitting hard reg
15148         live ranges.
15150 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15152         PR target/84807
15153         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15155 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15157         PR debug/84620
15158         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15159         (dw_val_node): Add val_symbolic_view.
15160         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15161         (symview_upper_bound): New.
15162         (new_line_info_table): Initialize symviews_since_reset.
15163         (dwarf2out_source_line): Count symviews_since_reset and set
15164         symview_upper_bound.
15165         (dw_val_equal_p): Handle symview.
15166         (add_AT_symview): New.
15167         (print_dw_val): Handle symview.
15168         (attr_checksum, attr_checksum_ordered): Likewise.
15169         (same_dw_val_p, size_of_die): Likewise.
15170         (value_format, output_die): Likewise.
15171         (add_high_low_attributes): Use add_AT_symview for entry_view.
15172         (dwarf2out_finish): Reset symview_upper_bound, clear
15173         zero_view_p.
15175 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15177         PR target/83969
15178         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15179         Add strict argument and use it.
15180         (rs6000_split_multireg_move): Update for new strict argument.
15181         (mem_operand_gpr): Disallow all non-offsettable addresses.
15182         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15184 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15186         PR target/84772
15187         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15188         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15189         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15191         PR c++/84767
15192         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15193         decl, use remap_type if we want to use the type.
15195 2018-03-09  Martin Sebor  <msebor@redhat.com>
15197         PR tree-optimization/84526
15198         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15199         Remove dead code.
15200         (builtin_access::generic_overlap): Be prepared to handle non-array
15201         base objects.
15203 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15205         PR rtl-optimization/84682
15206         * lra-constraints.c (process_address_1): Check is_address flag
15207         for address constraints.
15208         (process_alt_operands): Likewise.
15209         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15210         preprocess_constraints.
15211         * recog.h (preprocess_constraints): Add oploc parameter.
15212         Adjust callers.
15213         * recog.c (preprocess_constraints): Test address_operand for
15214         CT_ADDRESS constraints.
15216 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15218         PR target/83712
15219         * lra-assigns.c (assign_by_spills): Return a flag of reload
15220         assignment failure.  Do not process the reload assignment
15221         failures.  Do not spill other reload pseudos if they has the same
15222         reg class.
15223         (lra_assign): Add a return arg.  Set up from the result of
15224         assign_by_spills call.
15225         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15226         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15227         usage_insns if it is not NULL.
15228         (spill_hard_reg_in_range): New function.
15229         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15230         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15231         function prototypes.
15232         (lra_assign): Change prototype.
15233         * lra.c (lra): Add code to deal with fails by splitting hard reg
15234         live ranges.
15236 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15238         PR target/83193
15239         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15240         Accept complain bool parameter.  Only emit errors if it is true.
15241         (arm_parse_cpu_option_name): Likewise.
15242         (arm_target_thumb_only): Adjust callers of the above.
15243         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15244         prototype to take a default true bool parameter.
15245         (arm_parse_arch_option_name): Likewise.
15247 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15248             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15250         PR jit/64089
15251         PR jit/84288
15252         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15253         * configure: Regenerate.
15254         * configure.ac ("linker --version-script option"): New.
15255         ("linker soname option"): New.
15257 2018-03-09  Richard Biener  <rguenther@suse.de>
15259         PR tree-optimization/84775
15260         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15261         immediate uses of predicate stmts and mark them modified.
15263         Revert
15264         PR tree-optimization/84178
15265         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15266         to caller.
15267         (version_loop_for_if_conversion): Delay update_ssa call.
15268         (tree_if_conversion): Delay update_ssa until after predicate
15269         insertion.
15271 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15273         PR target/84763
15274         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15275         when the function accesses prior frames.
15277 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15279         PR debug/84456
15280         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15281         gen_llsym, otherwise call maybe_gen_llsym.
15283         PR inline-asm/84742
15284         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15285         has ',' character inside of it.
15287 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15289         PR target/84748
15290         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15291         as clobbering CC_REGNUM.
15293 2018-03-08  Richard Biener  <rguenther@suse.de>
15295         PR middle-end/84552
15296         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15297         (follow_copies_to_constant): Do not follow SSA names registered
15298         for update.
15300 2018-03-08  Richard Biener  <rguenther@suse.de>
15302         PR tree-optimization/84178
15303         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15304         to caller.
15305         (version_loop_for_if_conversion): Delay update_ssa call.
15306         (tree_if_conversion): Delay update_ssa until after predicate
15307         insertion.
15309 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15311         PR tree-optimization/84178
15312         * tree-if-conv.c (release_bb_predicate): Remove the
15313         the assertion that the stmts have NULL use_ops.
15314         Discard the statements, asserting that they haven't
15315         yet been added to a BB.
15317 2018-03-08  Richard Biener  <rguenther@suse.de>
15319         PR tree-optimization/84746
15320         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15321         (phi_translate): Pass in destination ANTIC_OUT set.
15322         (phi_translate_1): Likewise.  For a simplified result lookup
15323         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15324         (phi_translate_set): Adjust.
15325         (do_pre_regular_insertion): Likewise.
15326         (do_pre_partial_partial_insertion): Likewise.
15328 2018-03-08  Martin Liska  <mliska@suse.cz>
15330         PR gcov-profile/84735
15331         * doc/gcov.texi: Document usage of profile files.
15332         * gcov-io.h: Document changes in the format.
15334 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15336         PR debug/84404
15337         PR debug/84408
15338         * dwarf2out.c (struct dw_line_info_table): Update comments for
15339         view == -1.
15340         (FORCE_RESET_NEXT_VIEW): New.
15341         (FORCE_RESETTING_VIEW_P): New.
15342         (RESETTING_VIEW_P): Check for -1 too.
15343         (ZERO_VIEW_P): Likewise.
15344         (new_line_info_table): Force-reset next view.
15345         (dwarf2out_begin_function): Likewise.
15346         (dwarf2out_source_line): Simplify zero_view_p initialization.
15347         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15348         view directly.  Omit view when omitting .loc at line 0.
15350 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15352         PR tree-optimization/84740
15353         * tree-switch-conversion.c (process_switch): Call build_constructors
15354         only if info.phi_count is non-zero.
15356         PR tree-optimization/84739
15357         * tree-tailcall.c (find_tail_calls): Check call arguments against
15358         DECL_ARGUMENTS (current_function_decl) rather than
15359         DECL_ARGUMENTS (func) when checking for tail recursion.
15361 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15363         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15364         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15365         Volker Reichelt's entry and add entries for people that perform
15366         GCC fuzzy testing and report numerous bugs.
15368 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15370         PR target/82411
15371         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15372         readonly data in sdata, if that is disabled.
15373         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15374         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15375         -mreadonly-in-sdata option.
15377 2018-03-07  Martin Sebor  <msebor@redhat.com>
15379         PR tree-optimization/84468
15380         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15381         basic block when looking for nul assignment.
15383 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15385         PR target/84277
15386         * except.h (output_function_exception_table): Adjust prototype.
15387         * except.c (output_function_exception_table): Remove FNNAME parameter
15388         and add SECTION parameter.  Ouput one part of the table at a time.
15389         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15390         the first part of the exception table and emit unwind directives.
15391         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15392         (i386_pe_seh_cold_init): Likewise.
15393         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15394         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15395         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15396         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15397         * config/i386/winnt.c: Include except.h.
15398         (struct seh_frame_state): Add reg_offset, after_prologue and
15399         in_cold_section fields.
15400         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15401         (i386_pe_seh_cold_init): New function.
15402         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15403         to seh->in_cold_section.
15404         (seh_emit_push): Record the offset of the push.
15405         (seh_emit_save): Record the offet of the save.
15406         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15407         Test seh->after_prologue to disregard the epilogue.
15408         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15409         (i386_pe_end_cold_function): New function.
15411 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15413         PR fortran/84565
15414         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15415         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15417         PR c++/84704
15418         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15419         on tmp_var.
15420         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15421         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15423         PR middle-end/84723
15424         * multiple_target.c: Include tree-inline.h and intl.h.
15425         (expand_target_clones): Diagnose and fail if node->definition and
15426         !tree_versionable_function_p (node->decl).
15428 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15430         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15431         sprint_ul.
15432         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15433         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15434         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15436 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15438         PR target/84710
15439         * combine.c (try_combine): Use reg_or_subregno instead of handling
15440         just paradoxical SUBREGs and REGs.
15442 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15444         * config/arc/arc.c (arc_finalize_pic): Remove function.
15445         (arc_must_save_register): We use single base PIC register, remove
15446         checks to save/restore the PIC register.
15447         (arc_expand_prologue): Likewise.
15448         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15449         Remove.
15450         (arc_verify_short): Likewise.
15451         (arc_attr_type): Likewise.
15452         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15453         (walk_stores): Likewise.
15454         (arc_address_cost): Make it static.
15455         (arc_verify_short): Likewise.
15456         (branch_dest): Likewise.
15457         (arc_attr_type): Likewise.
15458         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15459         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15460         (arc_final_prescan_insn): Remove inserting the nops due to
15461         hardware hazards.  It is done in reorg step.
15462         (insn_length_variant_t): Remove.
15463         (insn_length_parameters_t): Likewise.
15464         (arc_insn_length_parameters): Likewise.
15465         (arc_get_insn_variants): Likewise.
15466         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15468 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15470         PR inline-asm/84683
15471         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15472         assertion failure.
15474         PR tree-optimization/84687
15475         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15476         on new_node->decl.
15477         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15479 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15481         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15482         Rename to ppc_speculation_barrier.
15483         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15484         __builtin_ppc_speculation_barrier.
15486 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15488         PR target/84700
15489         * combine.c (combine_simplify_rtx): Don't try to simplify if
15490         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15491         are equal to x.
15493 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15495         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15496         to 32 bytes when compiling for POWER9.
15498 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15500         PR target/84564
15501         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15502         regparm >= 3 with no arg reg available also for calls with
15503         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15505         PR target/84524
15506         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15507         orig,vex.
15508         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15510 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15512         PR target/84264
15513         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15515 2018-03-05  Richard Biener  <rguenther@suse.de>
15517         PR tree-optimization/84486
15518         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15519         When inserting a __builtin_assume_aligned call set the LHS
15520         SSA name alignment info accordingly.
15522 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15524         PR tree-optimization/84114
15525         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15526         Avoid reassociation of FLOAT_MODE addition.
15528 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15530         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15531         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15532         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15533         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15534         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15535         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15536         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15537         and -mwbnoinvd.
15538         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15539         __builtin_ia32_wbinvd): New builtins.
15540         (SPECIAL_ARGS2): New.
15541         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15542         (SPECIAL_ARGS2): New.
15543         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15544         (ix86_valid_target_attribute_inner_p): Ditto.
15545         (ix86_init_mmx_sse_builtins): Add special_args2.
15546         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15547         TARGET_WBNOINVD_P): New.
15548         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15549         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15550         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15551         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15552         * config/i386/pconfigintrin.h: New file.
15553         * config/i386/wbnoinvdintrin.h: Ditto.
15554         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15555         wbnoinvdintrin.h.
15556         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15558 2018-03-05  Richard Biener  <rguenther@suse.de>
15560         PR tree-optimization/84670
15561         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15562         member.
15563         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15564         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15565         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15566         doesn't grow if all successors (recursively) were visited at least
15567         once.
15569 2018-03-05  Richard Biener  <rguenther@suse.de>
15571         PR tree-optimization/84650
15572         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15573         if executed in the loop pipeline.
15575 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15577         * doc/configfiles.texi (Configuration Files): Move info about
15578         conditionalizing $target-protos.h to...
15579         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15580         differs from $target-protos.h.
15582 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15583             Chung-Ju Wu  <jasonwucj@gmail.com>
15585         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15586         * config/nds32/nds32-multiple.md (setmemsi): Define.
15587         * config/nds32/nds32-memory-manipulation.c
15588         (nds32_gen_dup_4_byte_to_word_value): New.
15589         (emit_setmem_word_loop): New.
15590         (emit_setmem_byte_loop): New.
15591         (nds32_expand_setmem_loop): New.
15592         (nds32_expand_setmem_loop_v3m): New.
15593         (nds32_expand_setmem_unroll): New.
15594         (nds32_expand_setmem): New.
15596 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15597             Chung-Ju Wu  <jasonwucj@gmail.com>
15599         * config/nds32/nds32-memory-manipulation.c
15600         (nds32_emit_load_store): New.
15601         (nds32_emit_post_inc_load_store): New.
15602         (nds32_emit_mem_move): New.
15603         (nds32_emit_mem_move_block): New.
15604         (nds32_expand_movmemsi_loop_unknown_size): New.
15605         (nds32_expand_movmemsi_loop_known_size): New.
15606         (nds32_expand_movmemsi_loop): New.
15607         (nds32_expand_movmemsi_unroll): New.
15608         (nds32_expand_movmemqi): Rename ...
15609         (nds32_expand_movmemsi): ... to this.
15610         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15611         (movmemsi): ... to this.
15612         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15613         (nds32_expand_movmemsi): ... to this.
15615 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15616             Monk Chiang  <sh.chiang04@gmail.com>
15617             Chung-Ju Wu  <jasonwucj@gmail.com>
15619         * config/nds32/nds32-protos.h
15620         (nds32_expand_load_multiple): New arguments.
15621         (nds32_expand_store_multiple): Ditto.
15622         (nds32_valid_multiple_load_store): Rename ...
15623         (nds32_valid_multiple_load_store_p): ... to this.
15624         * config/nds32/nds32-memory-manipulation.c
15625         (nds32_expand_load_multiple): Refine implementation.
15626         (nds32_expand_store_multiple): Ditto.
15627         * config/nds32/nds32-multiple.md
15628         (load_multiple): Update nds32_expand_load_multiple interface.
15629         (store_multiple): Update nds32_expand_store_multiple interface.
15630         * config/nds32/nds32-predicates.c
15631         (nds32_valid_multiple_load_store): Rename ...
15632         (nds32_valid_multiple_load_store_p): ... to this and refine
15633         implementation.
15634         * config/nds32/predicates.md
15635         (nds32_load_multiple_and_update_address_operation): New predicate.
15636         (nds32_store_multiple_and_update_address_operation): New predicate.
15638 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15639             Chung-Ju Wu  <jasonwucj@gmail.com>
15641         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15642         (combo): New attribute.
15643         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15645 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15647         * config/nds32/nds32.opt: Change -mcmodel= default value.
15649 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15650             Monk Chiang  <sh.chiang04@gmail.com>
15651             Chung-Ju Wu  <jasonwucj@gmail.com>
15653         * config/nds32/constants.md (unspec_element): New enum.
15654         * config/nds32/constraints.md (Umw): New constraint.
15655         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15656         * config/nds32/nds32-intrinsic.md: Likewise.
15657         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15658         (nds32_valid_smw_lwm_base_p): New.
15659         (nds32_output_smw_single_word): New.
15660         (nds32_output_lmw_single_word): New.
15661         (nds32_expand_unaligned_load): New.
15662         (nds32_expand_unaligned_store): New.
15663         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15664         (nds32_output_smw_single_word): Declare.
15665         (nds32_output_lmw_single_word): Declare.
15666         (nds32_expand_unaligned_load): Declare.
15667         (nds32_expand_unaligned_store): Declare.
15668         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15669         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15670         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15671         NDS32_BUILTIN_UASTORE_DW.
15672         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15673         predicate.
15675 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15676             Kito Cheng  <kito.cheng@gmail.com>
15677             Chung-Ju Wu  <jasonwucj@gmail.com>
15679         * config/nds32/nds32-intrinsic.c
15680         (nds32_expand_builtin_null_ftype_reg): Delete.
15681         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15682         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15683         (nds32_read_argument): New.
15684         (nds32_legitimize_target): Ditto.
15685         (nds32_legitimize_argument): Ditto.
15686         (nds32_check_constant_argument): Ditto.
15687         (nds32_expand_unop_builtin): Ditto.
15688         (nds32_expand_unopimm_builtin): Ditto.
15689         (nds32_expand_binop_builtin): Ditto.
15690         (nds32_builtin_decl_impl): Ditto.
15691         (builtin_description): Ditto.
15692         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15693         (nds32_init_builtins_impl): Ditto.
15694         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15695         (nds32_builtin_decl): New.
15696         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15697         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15699 2018-03-02  Jeff Law  <law@redhat.com>
15701         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15702         (redundant_insn, fill_simple_delay_slots): Likewise.
15703         (fill_slots_from_thread): Likewise.
15704         * resource.c (mark_referenced_resources): Likewise.
15705         (mark_set_resources, find_dead_or_set_registers): Likewise.
15707 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15709         * substring-locations.h (format_warning_va): Formatting fix for
15710         ATTRIBUTE_GCC_DIAG.
15711         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15712         argument.
15713         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15714         * substring-locations.c: Include intl.h.
15715         (format_warning_va): Turned into small wrapper around
15716         format_warning_n_va, renamed to ...
15717         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15718         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15719         use ngettext.
15720         (format_warning_at_substring_n): New function.
15721         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15722         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15723         format_warning_at_substring with just a shorter name instead of
15724         const function pointer.
15725         (fmtwarn_n): New function.
15726         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15727         appropriate, get rid of all the fmtstr temporaries, move conditionals
15728         with G_() wrapped string literals directly into fmtwarn arguments,
15729         cast dir.len to (int), formatting fixes.
15731 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15733         * doc/invoke.texi: Remove "Cilk Plus" references.
15735 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15736             Richard Biener  <rguenther@suse.de>
15738         PR ipa/84628
15739         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15740         for error or warning attributes if CALL_FROM_THUNK_P is set.
15741         Formatting fixes.
15743 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15745         PR target/56540
15746         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15747         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15749         PR target/56540
15750         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15751         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15753         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15754         instead of -1U in last predictors element's probability member.
15756 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15758         PR ipa/83983
15759         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15760         arguments if they are comparable.
15762 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15764         PR tree-optimization/84634
15765         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15766         masks and masked_loop_p with a single loop_masks, making sure it's
15767         null for bb vectorization.
15769 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15771         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15772         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15773         loop->force_vectorize to check whether there is no alias.
15775 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15777         PR target/84614
15778         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15779         prototypes.
15780         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15781         comments.
15782         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15783         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15784         instead of a loop around prev_real_insn.
15785         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15786         prev_real_insn.
15788         PR inline-asm/84625
15789         * config/i386/i386.c (ix86_print_operand): Use conditional
15790         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15791         zero vector.
15793 2018-03-02  Richard Biener  <rguenther@suse.de>
15795         PR tree-optimization/84427
15796         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15797         (bitmap_set_subtract_values): Rewrite to handle multiple
15798         exprs per value.
15799         (clean): Likewise.
15800         (prune_clobbered_mems): Likewise.
15801         (phi_translate): Take edge instead of pred/phiblock.
15802         (phi_translate_1): Likewise.
15803         (phi_translate_set): Likewise.  Insert all translated
15804         exprs for a value into the set, keeping possibly multiple
15805         expressions per value.
15806         (compute_antic_aux): Adjust for phi_translate changes.
15807         When intersecting union the expressions and prune those
15808         not in the final value set, keeping possibly multiple
15809         expressions per value.  Do not use value-insertion
15810         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15811         all expressions.  Add verification that the value-sets
15812         only shrink during iteration.
15813         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15814         (do_pre_regular_insertion): Likewise.
15815         (do_pre_partial_partial_insertion): Likewise.
15817 2018-03-02  Richard Biener  <rguenther@suse.de>
15819         PR target/82005
15820         * config/darwin.c (saved_debug_info_level): New static global.
15821         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15822         (darwin_asm_lto_end): Restore debug info generation settings.
15824 2018-03-01  Martin Liska  <mliska@suse.cz>
15826         PR sanitizer/82484
15827         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15828         volatile arguments.
15830 2018-03-01  Richard Biener  <rguenther@suse.de>
15832         PR debug/84645
15833         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15834         type annotation with LTO when debug was disabled at compile-time.
15836 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15838         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15839         XINT with INTVAL.
15840         (mips_final_postscan_insn): Likewise.
15842 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15844         PR rtl-optimization/84528
15845         * alias.c (init_alias_target): Add commentary.
15846         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15847         a unique base value if the frame pointer is not eliminated
15848         to the stack pointer.
15850 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15852         PR rtl-optimization/83327
15853         * lra-int.h (hard_regs_spilled_into): Declare.
15854         * lra.c (hard_regs_spilled_into): Define.
15855         (init_reg_info): Init hard_regs_spilled_into.
15856         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15857         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15858         (process_bb_lives): Handle hard_regs_spilled_into.
15859         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15860         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15862 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15864         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15865         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15866         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15867         * config/rs6000/aix72.h: New file.
15869 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15871         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15872         instead of warning_at with conditional singular and plural messages
15873         where possible.
15875         PR target/52991
15876         * stor-layout.c (update_alignment_for_field): For
15877         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15878         && !DECL_PACKED (field), do the alignment update, just use
15879         only desired_align instead of MAX (type_align, desired_align)
15880         as the alignment.
15881         (place_field): Don't do known_align < desired_align handling
15882         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15883         is non-NULL, instead do it after rli->prev_field handling and
15884         only if not within a bitfield word.  For DECL_PACKED (field)
15885         use type_align of BITS_PER_UNIT.
15887 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15889         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15890         superfluous parentheses and trailing spaces.
15892 2018-02-28  Richard Biener  <rguenther@suse.de>
15894         PR tree-optimization/84584
15895         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15896         SCoPs with fake exit edge.
15898 2018-02-28  Martin Liska  <mliska@suse.cz>
15900         PR testsuite/84597
15901         * timevar.c (timer::print): Fix format to properly print 100%
15902         values.
15904 2018-02-28  Richard Biener  <rguenther@suse.de>
15906         PR middle-end/84607
15907         * genmatch.c (capture_info::walk_match): Do not mark
15908         captured expressions without operands as expr_p given
15909         they act more like predicates and should be subject to
15910         "lost tail" side-effect preserving.
15912 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15914         PR rtl-optimization/81611
15915         * auto-inc-dec.c (attempt_change): Move dead note from
15916         mem_insn if it's the next use of regno
15917         (find_address): Take address use of reg holding
15918         non-incremented value.  Add parm to limit search to the named
15919         reg only.
15920         (merge_in_block): Attempt to use a mem insn that is the next
15921         use of the original regno.
15923 2018-02-27  Martin Sebor  <msebor@redhat.com>
15925         PR c++/83871
15926         * doc/invoke.texi (-Wmissing-attributes): New option.
15927         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15929 2018-02-27  Martin Sebor  <msebor@redhat.com>
15931         PR translation/84207
15932         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15933         n argument to unsigned HOST_WIDE_INT.
15934         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15935         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15936         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15937         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15939 2018-02-27  Richard Biener  <rguenther@suse.de>
15941         PR tree-optimization/84512
15942         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15943         Do not use the estimate returned from record_stmt_cost for
15944         the scalar iteration cost but sum properly using add_stmt_cost.
15946 2018-02-27  Richard Biener  <rguenther@suse.de>
15948         PR tree-optimization/84466
15949         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15950         Adjust last change to less strictly validate use operands.
15952 2018-02-27  Martin Liska  <mliska@suse.cz>
15954         PR gcov-profile/84548
15955         * gcov.c (process_file): Allow partial overlap and consider it
15956         also as group functions.
15957         (output_lines): Properly calculate range of lines for a group.
15959 2018-02-27  Martin Liska  <mliska@suse.cz>
15961         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15962         'ggc' suffixes.  Change first column width.
15963         (timer::print): Fix formatting of the column.
15965 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15967         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15968         preserve inline entry blocks for the sake of debug inline
15969         entry point markers alone.
15970         (remove_unused_locals): Suggest in comments a better place to
15971         force the preservation of inline entry blocks that are
15972         otherwise unused, but do not preserve them.
15974 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15976         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15978 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15980         PR target/84039
15981         * config/i386/constraints.md (Bs): Replace
15982         ix86_indirect_branch_register with
15983         TARGET_INDIRECT_BRANCH_REGISTER.
15984         (Bw): Likewise.
15985         * config/i386/i386.md (indirect_jump): Likewise.
15986         (tablejump): Likewise.
15987         (*sibcall_memory): Likewise.
15988         (*sibcall_value_memory): Likewise.
15989         Peepholes of indirect call and jump via memory: Likewise.
15990         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15991         (*sibcall_value_GOT_32): Likewise.
15992         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15993         (GOT_memory_operand): Likewise.
15994         (call_insn_operand): Likewise.
15995         (sibcall_insn_operand): Likewise.
15996         (GOT32_symbol_operand): Likewise.
15997         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15999 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16001         PR rtl-optimization/83496
16002         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
16003         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
16004         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
16005         redundant insn, if any.
16006         (relax_delay_slots): Likewise.
16007         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
16009 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
16011         PR tree-optimization/83965
16012         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
16013         that grouped statements are part of a reduction chain.  Return
16014         true if the statement is not marked as a reduction itself but
16015         is part of a group.
16016         (vect_recog_dot_prod_pattern): Don't check whether the statement
16017         is part of a group here.
16018         (vect_recog_sad_pattern): Likewise.
16019         (vect_recog_widen_sum_pattern): Likewise.
16021 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
16023         PR debug/84545
16024         * final.c (rest_of_clean_state): Also look for calls inside sequences.
16026 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
16028         PR target/84530
16029         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
16030         the bool argument.
16031         (ix86_output_indirect_function_return): New prototype.
16032         (ix86_split_simple_return_pop_internal): Likewise.
16033         * config/i386/i386.c (indirect_return_via_cx): New.
16034         (indirect_return_via_cx_bnd): Likewise.
16035         (indirect_thunk_name): Handle return va CX_REG.
16036         (output_indirect_thunk_function): Create alias for
16037         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
16038         (ix86_output_indirect_jmp): Remove the bool argument.
16039         (ix86_output_indirect_function_return): New function.
16040         (ix86_split_simple_return_pop_internal): Likewise.
16041         * config/i386/i386.md (*indirect_jump): Don't pass false
16042         to ix86_output_indirect_jmp.
16043         (*tablejump_1): Likewise.
16044         (simple_return_pop_internal): Change it to define_insn_and_split.
16045         Call ix86_split_simple_return_pop_internal to split it for
16046         -mfunction-return=.
16047         (simple_return_indirect_internal): Call
16048         ix86_output_indirect_function_return instead of
16049         ix86_output_indirect_jmp.
16051 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16053         PR bootstrap/84405
16054         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16055         memset and value initialization afterwards.
16057 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16059         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16061 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16063         PR target/84521
16064         * common/config/aarch64/aarch64-common.c
16065         (aarch_option_optimization_table[]): Switch
16066         off fomit-frame-pointer
16068 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16069             Chung-Ju Wu  <jasonwucj@gmail.com>
16071         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16072         volatile memory.
16073         (store_multiple): Ditto.
16075 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16077         * config.gcc: Add --with-cpu support for nds32 target.
16078         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16079         * config/nds32/nds32.opt: Add -mcpu= option.
16081 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16083         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16084         isel=yes): Warn for these deprecated options.
16086 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16088         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16089         ISA_2_5_MASKS_EMBEDDED.
16091 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16093         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16094         p->max as pointers rather than using iterative_hash_expr.
16096 2018-02-23  Carl Love  <cel@us.ibm.com>
16098         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16099         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16100         BU_P8V_OVERLOAD_2.
16101         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16102         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16103         P8V_BUILTIN_VEC_VUNSIGNED2.
16105 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16107         PR target/81572
16108         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16109         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16110         LRA_UNKNOWN_ALT.
16111         * lra-constraints.c (curr_insn_transform): Set up
16112         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16113         LRA_UNKNOWN_ALT.
16114         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16115         * lra-eliminations.c (spill_pseudos): Ditto.
16116         (process_insn_for_elimination): Ditto.
16117         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16118         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16119         LRA_NON_CLOBBERED_ALT.
16121 2018-02-22  Martin Sebor  <msebor@redhat.com>
16123         PR tree-optimization/84480
16124         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16125         to maybe_diag_stxncpy_trunc.  Call it.
16126         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16127         from gimple_fold_builtin_strcpy.  Print inlining stack.
16128         (handle_builtin_stxncpy): Print inlining stack.
16129         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16131 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16133         PR target/84176
16134         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16135         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16136         and -fcheck-pointer-bounds are used together.
16137         (indirect_thunk_prefix): New enum.
16138         (indirect_thunk_need_prefix): New function.
16139         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16140         "_nt" instead of "_bnd" for NOTRACK prefix.
16141         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16142         (output_indirect_thunk_function): Likewise.
16143         (): Likewise.
16144         (ix86_code_end): Update output_indirect_thunk_function calls.
16145         (ix86_output_indirect_branch_via_reg): Replace
16146         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16147         (ix86_output_indirect_branch_via_push): Likewise.
16148         (ix86_output_function_return): Likewise.
16149         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16150         incompatible with -fcf-protection=branch and
16151         -fcheck-pointer-bounds.
16153 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16155         PR target/83335
16156         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16157         Change gcc_assert call to output_operand_lossage.
16159 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16161         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16163 2018-02-22  DJ Delorie  <dj@redhat.com>
16164             Sebastian Perta  <sebastian.perta@renesas.com>
16165             Oleg Endo  <olegendo@gcc.gnu.org>
16167         * config/rx/rx.c (rx_rtx_costs): New function.
16168         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16170 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16172         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16174 2018-02-22  Martin Liska  <mliska@suse.cz>
16176         PR driver/83193
16177         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16178         Add "native" as a possible value.
16180 2018-02-22  Martin Liska  <mliska@suse.cz>
16182         PR driver/83193
16183         * config/i386/i386.c (ix86_option_override_internal):
16184         Add "native" as a possible value for -march and -mtune.
16186 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16188         PR target/84502
16189         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16190         to all type variants.
16192         PR tree-optimization/84503
16193         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16194         width as info->bitpos + info->bitsize - start.
16195         (merged_store_group::merge_overlapping): Simplify width computation.
16196         (check_no_overlap): New function.
16197         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16198         start + width and last_order of the group, fail if check_no_overlap
16199         fails.
16200         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16201         to group if check_no_overlap fails.
16203 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16205         * config/rs6000/altivec.md: Delete contraint arguments to
16206         define_expand, define_split, and define_peephole2, and in
16207         define_insn_and_split if always unused.
16208         * config/rs6000/darwin.md: Ditto.
16209         * config/rs6000/dfp.md: Ditto.
16210         * config/rs6000/rs6000.md: Ditto.
16211         * config/rs6000/sync.md: Ditto.
16212         * config/rs6000/vector.md: Ditto.
16213         * config/rs6000/vsx.md: Ditto.
16215 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16217         * config/rs6000/altivec.md: Write output control strings as braced
16218         blocks instead of double-quoted strings.
16219         * config/rs6000/darwin.md: Ditto.
16220         * config/rs6000/rs6000.md: Ditto.
16221         * config/rs6000/vector.md: Ditto.
16222         * config/rs6000/vsx.md: Ditto.
16224 2018-02-21  Jason Merrill  <jason@redhat.com>
16226         PR c++/84314 - ICE with templates and fastcall attribute.
16227         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16229 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16231         * ipa-cp.c (determine_versionability): Fix comment typos.
16233 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16235         PR c/84229
16236         * ipa-cp.c (determine_versionability): Do not version functions caling
16237         va_arg_pack.
16239 2018-02-21  Martin Liska  <mliska@suse.cz>
16241         PR driver/83193
16242         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16243         Add "native" as a possible value.
16244         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16245         the macro when native cpu detection is available.
16247 2018-02-21  Martin Liska  <mliska@suse.cz>
16249         PR driver/83193
16250         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16251         Add "native" as a possible value.
16252         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16253         when native cpu detection is available.
16255 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16256             Martin Sebor  <msebor@redhat.com>
16258         PR tree-optimization/84478
16259         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16260         false.
16261         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16262         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16263         support which is conservatively correct, for 2 only stay conservative
16264         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16265         argument to the 2 argument get_range_strlen, adjust 6 arg
16266         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16267         false.
16268         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16269         (gimple_fold_builtin_strlen): Pass true as last argument to
16270         get_range_strlen.
16272 2018-02-20  Martin Sebor  <msebor@redhat.com>
16274         PR middle-end/84095
16275         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16276         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16277         (builtin_memref::builtin_memref): Factor out parts into
16278         set_base_and_offset and call it.
16280 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16282         PR middle-end/84406
16283         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16284         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16285         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16286         search at the associated MODE_INT.
16288 2018-02-20  Jeff Law  <law@redhat.com>
16290         PR middle-end/82123
16291         PR tree-optimization/81592
16292         PR middle-end/79257
16293         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16294         for range data rather than using global data.
16295         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16296         range data rather than using global data.
16297         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16298         pass it to children as needed.
16299         (struct directive::fmtresult): Similarly.
16300         (struct directive::set_width): Similarly.
16301         (struct directive::set_precision): Similarly.
16302         (format_integer, format_directive, parse_directive): Similarly.
16303         (format_none): Accept unnamed vr_values parameter.
16304         (format_percent, format_floating, format_character): Similarly.
16305         (format_string, format_plain): Similarly.
16306         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16307         the EVRP range analyzer for range data rather than using global data.
16308         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16309         gimple-ssa-evrp-analyze.h
16310         (class sprintf_dom_walker): Add after_dom_children member function.
16311         Add evrp_range_analyzer member.
16312         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16313         range analyzer as needed.
16314         (sprintf_dom_walker::after_dom_children): New member function.
16315         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16316         if not optimizing.
16317         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16318         (evrp_range_analyzer::pop_to_marker): Likewise.
16320 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16322         PR tree-optimization/84419
16323         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16324         with the required type if its current type is compatible but
16325         different.
16327 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16329         PR middle-end/82004
16330         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16331         after vectorization.
16333 2018-02-20  Martin Liska  <mliska@suse.cz>
16335         PR driver/83193
16336         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16337         possible values if we don't have a hint.
16339 2018-02-20  Martin Liska  <mliska@suse.cz>
16341         PR c/84310
16342         PR target/79747
16343         * final.c (shorten_branches): Build align_tab array with one
16344         more element.
16345         * opts.c (finish_options): Add alignment option limit check.
16346         (MAX_CODE_ALIGN): Likewise.
16347         (MAX_CODE_ALIGN_VALUE): Likewise.
16348         * doc/invoke.texi: Document maximum allowed option value for
16349         all -falign-* options.
16351 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16353         PR target/84146
16354         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16355         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16356         * var-tracking.c (emit_note_insn_var_location): Remove all references
16357         to NOTE_INSN_CALL_ARG_LOCATION.
16358         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16359         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16360         Use copy_rtx_if_shared.
16361         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16362         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16363         (dwarf2out_var_location): Remove handling of
16364         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16365         on call_insn.
16366         * final.c (final_scan_insn): Remove all references to
16367         NOTE_INSN_CALL_ARG_LOCATION.
16368         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16369         before dumping final insns.
16370         * except.c (emit_note_eh_region_end): Remove all references to
16371         NOTE_INSN_CALL_ARG_LOCATION.
16372         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16373         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16374         * config/arc/arc.c (hwloop_optimize): Likewise.
16375         * config/arm/arm.c (create_fix_barrier): Likewise.
16376         * config/s390/s390.c (s390_chunkify_start): Likewise.
16377         * config/sh/sh.c (find_barrier): Likewise.
16378         * config/i386/i386.c (rest_of_insert_endbranch,
16379         ix86_seh_fixup_eh_fallthru): Likewise.
16380         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16381         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16382         * config/frv/frv.c (frv_function_prologue): Likewise.
16383         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16384         reg note.
16385         (note_outside_basic_block_p): Remove all references to
16386         NOTE_INSN_CALL_ARG_LOCATION.
16387         * gengtype.c (adjust_field_rtx_def): Likewise.
16388         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16389         Likewise.
16390         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16391         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16393         PR c++/84444
16394         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16395         is ADDR_EXPR.
16397         PR tree-optimization/84452
16398         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16399         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16400         is NULL.
16402 2018-02-19  Martin Liska  <mliska@suse.cz>
16404         PR sanitizer/82183
16405         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16407 2018-02-19  Martin Liska  <mliska@suse.cz>
16408             Richard Sandiford  <richard.sandiford@linaro.org>
16410         PR tree-optimization/82491
16411         * gimple-fold.c (get_base_constructor): Make earlier bail out
16412         to prevent ubsan.
16414 2018-02-19  Carl Love  <cel@us.ibm.com>
16416         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16417         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16418         BU_P8V_OVERLOAD_1.
16419         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16420         P8V_BUILTIN_VEC_NEG.
16422 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16424         * config/rl78/rl78.md (movdf): New define expand.
16426 2018-02-19  Martin Liska  <mliska@suse.cz>
16428         PR other/80589
16429         * doc/invoke.texi: Fix typo.
16430         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16432 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16434         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16435         handle rs6000_single_float and rs6000_double_float specially for
16436         e500 family CPUs.
16438 2018-02-16  Jeff Law  <law@redhat.com>
16440         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16441         (pop_regs): Use it.
16443 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16445         PR ipa/84425
16446         * ipa-inline.c (inline_small_functions): Fix a typo.
16448 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16450         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16452 2018-02-16  Carl Love  <cel@us.ibm.com>
16454         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16455         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16456         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16457         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16458         expansion to P8V_BUILTIN_VEC_FLOAT2.
16460 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16462         PR rtl-optimization/70023
16463         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16464         src_regno into account.
16466 2018-02-16  Carl Love  <cel@us.ibm.com>
16468         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16469         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16470         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16471         * config/rs6000/rs6000.c: Remove case statements for
16472         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16473         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16474         and P9V_BUILTIN_VEC_VINSERT4B.
16475         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16476         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16477         * config/rs6000/vsx.md:
16478         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16479         vec_insert4b.
16481 2018-02-16  Carl Love  <cel@us.ibm.com>
16483         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16484         vec_insert4b.
16485         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16486         definitions.
16487         * config/rs6000/rs6000-c.c: Add the definitions for
16488         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16489         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16490         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16491         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16492         definition for insert4b and define insn *insert3b_internal.
16493         * doc/extend.texi: Add documentation for vec_extract4b.
16495 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16497         * doc/extend.texi (Backwards Compatibility): Mention friend
16498         injection.  Note for-scope is deprecated.
16499         * doc/invoke.texi (-ffriend-injection): Deprecate.
16501 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16503         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16504         that moved to I2, also allow destinations that are a paradoxical
16505         subreg (instead of a normal reg).
16507 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16509         PR target/83831
16510         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16511         to QImode.
16513 2018-02-16  Richard Biener  <rguenther@suse.de>
16515         PR tree-optimization/84037
16516         PR tree-optimization/84016
16517         PR target/82862
16518         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16519         Adjust vec_construct for the fact we need additional higher latency
16520         128bit inserts for AVX256 and AVX512 vector builds.
16521         (ix86_add_stmt_cost): Scale vector construction cost for
16522         elementwise loads.
16524 2018-02-16  Richard Biener  <rguenther@suse.de>
16526         PR tree-optimization/84417
16527         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16528         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16529         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16531 2018-02-16  Martin Liska  <mliska@suse.cz>
16533         PR sanitizer/84307
16534         * internal-fn.def (ASAN_CHECK): Set proper flags.
16535         (ASAN_MARK): Likewise.
16537 2018-02-16  Julia Koval  <julia.koval@intel.com>
16539         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16540         from PTA_CANNONLAKE.
16542 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16544         PR target/84272
16545         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16546         Use ++iter rather than iter++ for std::list iterators.
16547         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16548         defer deleting them until all nodes in the forest are processed.  Do
16549         free even leaf nodes.  Change to_process into auto_vec.
16551         PR bootstrap/84405
16552         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16553         * vec.h (vec_default_construct): Use memset instead of placement new
16554         if BROKEN_VALUE_INITIALIZATION is defined.
16555         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16556         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16557         is defined.
16559         PR rtl-optimization/83723
16560         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16561         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16562         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16563         recursive calls.
16564         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16565         callers.
16566         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16568 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16570         PR rtl-optimization/81443
16571         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16572         from inner REGs to paradoxical SUBREGs.
16574 2018-02-16  Richard Biener  <rguenther@suse.de>
16576         PR tree-optimization/84399
16577         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16578         For operands we can analyze at their definition make sure we can
16579         analyze them at each use as well.
16581 2018-02-16  Richard Biener  <rguenther@suse.de>
16583         PR tree-optimization/84190
16584         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16585         volatile accesses if the decl isn't volatile.
16587 2018-02-15  Jason Merrill  <jason@redhat.com>
16589         PR c++/84314 - ICE with templates and fastcall attribute.
16590         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16591         TYPE_CANONICAL on an existing type.
16593 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16595         PR tree-optimization/84383
16596         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16597         dstoff nor call operand_equal_p if dstbase is NULL.
16599         PR tree-optimization/84334
16600         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16601         also a CONSTANT_CLASS_P, punt.
16603 2018-02-14  Jim Wilson  <jimw@sifive.com>
16605         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16606         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16607         to where locals are set.  Add TARGET_RVC support.
16608         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16610 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16612         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16614 2018-02-14  Martin Sebor  <msebor@redhat.com>
16616         PR tree-optimization/83698
16617         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16618         arrays constrain the offset range to their bounds.
16619         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16620         (builtin_access::overlap): Avoid setting the size of overlap if it's
16621         already been set.
16622         (maybe_diag_overlap): Also consider arrays when deciding what values
16623         of offsets to include in diagnostics.
16625 2018-02-14  Martin Sebor  <msebor@redhat.com>
16627         PR c/84108
16628         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16629         that correspond to the kind of a declaration.
16631 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16633         PR target/83984
16634         * config/pa/pa.md: Load address of PIC label using the linkage table
16635         if the label is nonlocal.
16637 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16639         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16640         warning message if user requests -maltivec=be.
16641         * doc/invoke.texi: Document deprecation of -maltivec=be.
16643 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16645         PR target/84220
16646         * config/rs6000/rs6000-c.c: Update definitions for
16647         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16648         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16650 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16652         PR target/84239
16653         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16654         add _get_ssp intrinsics. Remove argument from
16655         __builtin_ia32_rdssp[d|q].
16656         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16657         * config/i386/i386-builtin.def: Remove argument from
16658         __builtin_ia32_rdssp[d|q].
16659         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16660         ix86_expand_special_args_builtin for _rdssp[d|q].
16661         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16662         Clear register before usage.
16663         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16664         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16666 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16668         PR tree-optimization/84357
16669         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16670         operand 1 of an ARRAY_REF too.
16672 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16674         PR target/83831
16675         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16676         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16677         declarations.
16678         (set_of_reg): New struct.
16679         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16680         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16681         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16682         functions.
16683         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16684         Split into bitclr, bitset, bitinvert patterns if appropriate.
16685         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16686         use rx_fuse_in_memory_bitop.
16687         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16688         to named insn, correct maximum insn length.
16690 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16692         PR target/79242
16693         * machmode.def: Define a complex mode for PARTIAL_INT.
16694         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16695         MODE_PARTIAL_INT.
16696         * doc/rtl.texi: Document CSPImode.
16697         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16698         handling.
16699         (msp430_hard_regno_nregs_with_padding): Likewise.
16701 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16703         PR target/84279
16704         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16706 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16708         PR rtl-optimization/84169
16709         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16710         we generated a parallel as new i3 and we split that to new i2 and i3
16711         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16712         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16713         those to i2, not i1.  Partially rewrite this scan code.
16715 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16717         PR c/82210
16718         * stor-layout.c (place_field): For variable length fields, adjust
16719         offset_align afterwards not just based on the field's alignment,
16720         but also on the size.
16722         PR middle-end/84309
16723         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16724         of exps and logs in the use_exp2 case.
16726 2018-02-13  Jeff Law  <law@redhat.com>
16728         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16729         entry for "vector".
16731         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16732         ARGS as unused.
16734 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16736         PR debug/84342
16737         PR debug/84319
16738         * common.opt (gas-loc-support, gas-locview-support): New.
16739         (ginline-points, ginternal-reset-location-views): New.
16740         * doc/invoke.texi: Document them.  Use @itemx where intended.
16741         (gvariable-location-views): Adjust.
16742         * target.def (reset_location_view): New.
16743         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16744         (TARGET_RESET_LOCATION_VIEW): New.
16745         * doc/tm.texi: Rebuilt.
16746         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16747         (dwarf2out_default_as_locview_support): New.
16748         (output_asm_line_debug_info): Use option variables.
16749         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16750         (output_loc_list): Likewise.
16751         (add_high_low_attributes): Check option variables.
16752         Don't output entry view attribute in strict mode.
16753         (gen_inlined_subroutine_die): Check option variables.
16754         (dwarf2out_inline_entry): Likewise.
16755         (init_sections_and_labels): Likewise.
16756         (dwarf2out_early_finish): Likewise.
16757         (maybe_reset_location_view): New, from...
16758         (dwarf2out_var_location): ... here.  Call it.
16759         * debug.h (dwarf2out_default_as_loc_support): Declare.
16760         (dwarf2out_default_as_locview_support): Declare.
16761         * hooks.c (hook_int_rtx_insn_0): New.
16762         * hooks.h (hook_int_rtx_insn_0): Declare.
16763         * toplev.c (process_options): Take -gas-loc-support and
16764         -gas-locview-support from dwarf2out.  Enable
16765         -gvariable-location-views by default only with locview
16766         assembler support.  Enable -ginternal-reset-location-views by
16767         default only if the target defines the corresponding hook.
16768         Enable -ginline-points by default if location views are
16769         enabled; force it disabled if statement frontiers are
16770         disabled.
16771         * tree-inline.c (expand_call_inline): Check option variables.
16772         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16774 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16776         PR tree-optimization/84321
16777         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16778         handling.  Also check whether the anti-range contains any values
16779         that satisfy the mask; switch to a VR_RANGE if not.
16781 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16783         PR sanitizer/84340
16784         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16786 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16788         PR c++/83990
16789         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16790         of call statements, also set location of a load to a temporary.
16792 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16794         * config/rl78/rl78.c (add_vector_labels): New function.
16795         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16796         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16797         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16798         which checks that no arguments are passed.
16799         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16800         * doc/extend.texi: Documentation for the new attribute.
16802 2018-02-13  Andreas Schwab  <schwab@suse.de>
16804         * config/riscv/linux.h (CPP_SPEC): Define.
16806 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16808         PR target/84335
16809         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16810         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16811         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16812         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16813         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16814         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16815         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16816         temporarily for AES and PCLMUL builtins.
16818         PR tree-optimization/84339
16819         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16820         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16821         Formatting fixes.
16823         PR middle-end/84309
16824         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16825         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16826         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16827         inline function.
16828         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16829         inline function.
16830         * omp-simd-clone.h: New file.
16831         * omp-simd-clone.c: Include omp-simd-clone.h.
16832         (expand_simd_clones): No longer static.
16833         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16834         cgraph.h and omp-simd-clone.h.
16835         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16836         (vect_recog_widen_shift_pattern): Formatting fix.
16837         (vect_pattern_recog_1): Don't check optab for calls.
16839         PR target/84336
16840         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16841         operands[2] into a REG before using gen_lowpart on it.
16843 2018-02-12  Jeff Law  <law@redhat.com>
16845         PR target/83760
16846         * config/sh/sh.c (find_barrier): Consider a sibling call
16847         a barrier as well.
16849         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16850         successfully back substituting a reg.
16852 2018-02-12  Richard Biener  <rguenther@suse.de>
16854         PR tree-optimization/84037
16855         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16856         parameter, move visited init to caller.
16857         (vect_slp_analyze_operations): Separate cost from validity
16858         check, initialize visited once for all instances.
16859         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16860         for all instances.
16861         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16862         out an assert.
16863         (vect_model_promotion_demotion_cost): Likewise.
16864         (vectorizable_bswap): Guard cost modeling with !slp_node
16865         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16866         SLP stmts.
16867         (vectorizable_call): Likewise.
16868         (vectorizable_conversion): Likewise.
16869         (vectorizable_assignment): Likewise.
16870         (vectorizable_shift): Likewise.
16871         (vectorizable_operation): Likewise.
16872         (vectorizable_store): Likewise.
16873         (vectorizable_load): Likewise.
16874         (vectorizable_condition): Likewise.
16875         (vectorizable_comparison): Likewise.
16877 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16879         PR sanitizer/84307
16880         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16881         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16882         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16884 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16886         PR middle-end/83665
16887         * params.def (inline-min-speedup): Increase from 8 to 15.
16888         (max-inline-insns-auto): Decrease from 40 to 30.
16889         * ipa-split.c (consider_split): Add some buffer for function to
16890         be considered inlining candidate.
16891         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16892         default values.
16894 2018-02-12  Richard Biener  <rguenther@suse.de>
16896         PR tree-optimization/84037
16897         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16898         matched stmts if we cannot swap the non-matched ones.
16900 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16902         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16903         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16904         _mm_maskz_scalef_round_ss): New intrinsics.
16905         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16906         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16907         __builtin_ia32_scalefss_round): Remove.
16908         (__builtin_ia32_scalefsd_mask_round,
16909         __builtin_ia32_scalefss_mask_round): New intrinsics.
16910         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16911         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16912         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16913         "<round_constraint>")): Changed to ...
16914         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16915         "<round_scalar_constraint>")): ... this.
16916         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16917         %0, %1, %2<round_op3>}"): Changed to ...
16918         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16919         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16920         %2<round_scalar_mask_op3>}"): ... this.
16921         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16923 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16925         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16926         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16927         (_mm_maskz_sqrt_round_ss): New intrinsics.
16928         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16929         (__builtin_ia32_sqrtsd_mask_round)
16930         (__builtin_ia32_sqrtss_mask_round): New builtins.
16931         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16932         (__builtin_ia32_sqrtss_round): Remove.
16933         (__builtin_ia32_sqrtsd_mask_round)
16934         (__builtin_ia32_sqrtss_mask_round): New builtins.
16935         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16936         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16937         ((match_operand:VF_128 1 "vector_operand"
16938         "xBm,<round_constraint>")): Changed to ...
16939         ((match_operand:VF_128 1 "vector_operand"
16940         "xBm,<round_scalar_constraint>")): ... this.
16941         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16942         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16943         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16944         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16945         %<iptr>1<round_scalar_mask_op3>}): ... this.
16946         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16947         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16949 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16951         PR target/84266
16952         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16953         Cast vec_cmpeq result to correct type.
16954         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16955         Cast vec_cmpgt result to correct type.
16957 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16959         * final.c (final_scan_insn_1): Renamed from...
16960         (final_scan_insn): ... this.  New wrapper, to recover
16961         seen from the outermost call in recursive ones.
16962         * config/sparc/sparc.c (output_return): Drop seen from call.
16963         (output_sibcall): Likewise.
16964         * config/visium/visium.c (output_branch): Likewise.
16966 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16968         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16969         function label.
16971 2018-02-10  Alan Modra  <amodra@gmail.com>
16973         PR target/84300
16974         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16975         Specify LR as an input.
16977 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16979         PR sanitizer/83987
16980         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16981         remove_member_access_dummy_vars): New functions.
16982         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16983         lower_omp_1, execute_lower_omp): Use them.
16985         PR rtl-optimization/84308
16986         * shrink-wrap.c (spread_components): Release todo vector.
16988 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16990         PR rtl-optimization/57193
16991         * ira-color.c (struct allocno_color_data): Add member
16992         conflict_allocno_hard_prefs.
16993         (update_conflict_allocno_hard_prefs): New.
16994         (bucket_allocno_compare_func): Add a preference based on
16995         conflict_allocno_hard_prefs.
16996         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16997         (color_allocnos): Remove a dead code.  Initiate
16998         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
17000 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17002         PR target/84226
17003         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
17004         constraint from =wa to wa.  Avoid a subreg on the output operand,
17005         instead use a pseudo and subreg it in a move.
17006         (p9_xxbrd_<mode>): Changed to ...
17007         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
17008         (p9_xxbrd_v2df): New expander.
17009         (p9_xxbrw_<mode>): Changed to ...
17010         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
17011         (p9_xxbrw_v4sf): New expander.
17013 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17015         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
17017 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
17019         PR target/83926
17020         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
17021         multiply in 32-bit mode.
17022         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
17023         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
17024         mode.
17026 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
17028         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
17029         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
17030         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
17031         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
17033 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
17035         PR lto/84213
17036         * dwarf2out.c (is_trivial_indirect_ref): New function.
17037         (dwarf2out_late_global_decl): Do not generate a location
17038         attribute for variables that have a non-trivial DECL_VALUE_EXPR
17039         and that are not defined in the current unit.
17041 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17043         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17044         instead of a libcall for UNORDERED.
17046 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17048         PR target/82641
17049         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17050         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17052 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17054         PR target/PR84295
17055         * config/s390/s390.c (s390_set_current_function): Invoke
17056         s390_indirect_branch_settings also if fndecl didn't change.
17058 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17060         * config/rs6000/rs6000.md (blockage): Set length to zero.
17062 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17064         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17066 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17068         PR sanitizer/84285
17069         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17070         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17071         -static-lib*san.
17073         PR debug/84252
17074         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17075         PARALLEL incoming that failed vt_get_decl_and_offset check.
17077         PR middle-end/84237
17078         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17079         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17080         TREE_READONLY bit.
17081         (get_variable_section): For decls in named .bss* sections pass true as
17082         second argument to bss_initializer_p.
17084 2018-02-09  Marek Polacek  <polacek@redhat.com>
17085             Jakub Jelinek  <jakub@redhat.com>
17087         PR c++/83659
17088         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17089         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17090         Sync some changes from cxx_fold_indirect_ref.
17092 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17094         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17095         markers.
17096         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17097         (BLOCK_INLINE_ENTRY_LABEL): New.
17098         (dwarf2out_var_location): Disregard inline entry markers.
17099         (inline_entry_data): New struct.
17100         (inline_entry_data_hasher): New hashtable type.
17101         (inline_entry_data_hasher::hash): New.
17102         (inline_entry_data_hasher::equal): New.
17103         (inline_entry_data_table): New variable.
17104         (add_high_low_attributes): Add DW_AT_entry_pc and
17105         DW_AT_GNU_entry_view attributes if a pending entry is found
17106         in inline_entry_data_table.  Add old entry_pc attribute only
17107         if debug nonbinding markers are disabled.
17108         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17109         markers are enabled.
17110         (block_within_block_p, dwarf2out_inline_entry): New.
17111         (dwarf2out_finish): Check that no entries remained in
17112         inline_entry_data_table.
17113         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17114         (final_scan_insn, notice_source_line): Likewise.
17115         (rest_of_clean_state): Skip inline entry markers.
17116         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17117         markers.
17118         * gimple.c (gimple_build_debug_inline_entry): New.
17119         * gimple.h (enum gimple_debug_subcode): Add
17120         GIMPLE_DEBUG_INLINE_ENTRY.
17121         (gimple_build_debug_inline_entry): Declare.
17122         (gimple_debug_inline_entry_p): New.
17123         (gimple_debug_nonbind_marker_p): Adjust.
17124         * insn-notes.def (INLINE_ENTRY): New.
17125         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17126         inline entry marker notes.
17127         (print_insn): Likewise.
17128         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17129         (INSN_DEBUG_MARKER_KIND): Likewise.
17130         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17131         * tree-inline.c (expand_call_inline): Build and insert
17132         debug_inline_entry stmt.
17133         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17134         inline entry blocks early, if nonbind markers are enabled.
17135         (dump_scope_block): Dump fragment info.
17136         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17137         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17138         (gimple_build_debug_inline_entry): New.
17139         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17140         Enable/disable inline entry points too.
17141         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17142         (DEBUG_INSN): Describe inline entry markers.
17144         * common.opt (gvariable-location-views): New.
17145         (gvariable-location-views=incompat5): New.
17146         * config.in: Rebuilt.
17147         * configure: Rebuilt.
17148         * configure.ac: Test assembler for view support.
17149         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17150         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17151         * dwarf2out.c (var_loc_view): New typedef.
17152         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17153         (dwarf2out_locviews_in_attribute): New.
17154         (dwarf2out_locviews_in_loclist): New.
17155         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17156         (enum dw_line_info_opcode): Add LI_adv_address.
17157         (struct dw_line_info_table): Add view.
17158         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17159         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17160         (zero_view_p): New variable.
17161         (ZERO_VIEW_P): New macro.
17162         (output_asm_line_debug_info): New.
17163         (struct var_loc_node): Add view.
17164         (add_AT_view_list, AT_loc_list): New.
17165         (add_var_loc_to_decl): Add view param.  Test it against last.
17166         (new_loc_list): Add view params.  Record them.
17167         (AT_loc_list_ptr): Handle loc and view lists.
17168         (view_list_to_loc_list_val_node): New.
17169         (print_dw_val): Handle dw_val_class_view_list.
17170         (size_of_die): Likewise.
17171         (value_format): Likewise.
17172         (loc_list_has_views): New.
17173         (gen_llsym): Set vl_symbol too.
17174         (maybe_gen_llsym, skip_loc_list_entry): New.
17175         (dwarf2out_maybe_output_loclist_view_pair): New.
17176         (output_loc_list): Output view list or entries too.
17177         (output_view_list_offset): New.
17178         (output_die): Handle dw_val_class_view_list.
17179         (output_dwarf_version): New.
17180         (output_compilation_unit_header): Use it.
17181         (output_skeleton_debug_sections): Likewise.
17182         (output_rnglists, output_line_info): Likewise.
17183         (output_pubnames, output_aranges): Update version comments.
17184         (output_one_line_info_table): Output view numbers in asm comments.
17185         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17186         Call maybe_gen_llsym.
17187         (loc_list_from_tree_1): Adjust.
17188         (add_AT_location_description): Create view list attribute if
17189         needed, check it's absent otherwise.
17190         (convert_cfa_to_fb_loc_list): Adjust.
17191         (maybe_emit_file): Call output_asm_line_debug_info for test.
17192         (dwarf2out_var_location): Reset views as needed.  Precompute
17193         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17194         attribute.  Set view.
17195         (new_line_info_table): Reset next view.
17196         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17197         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17198         the assembler, or select appropriate line info opcodes.
17199         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17200         (optimize_string_length): Catch it.  Adjust.
17201         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17202         dw_val_class_view_list, and remove it if no longer needed.
17203         (hash_loc_list): Hash view numbers.
17204         (loc_list_hasher::equal): Compare them.
17205         (optimize_location_lists): Check whether a view list symbol is
17206         needed, and whether the locview attribute is present, and
17207         whether they match.  Remove the locview attribute if no longer
17208         needed.
17209         (index_location_lists): Call skip_loc_list_entry for test.
17210         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17211         Use output_dwarf_version.
17212         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17213         (struct dw_val_node): Add val_view_list.
17214         * final.c (SEEN_NEXT_VIEW): New.
17215         (set_next_view_needed): New.
17216         (clear_next_view_needed): New.
17217         (maybe_output_next_view): New.
17218         (final_start_function): Rename to...
17219         (final_start_function_1): ... this.  Take pointer to FIRST,
17220         add SEEN parameter.  Emit param bindings in the initial view.
17221         (final_start_function): Reintroduce SEEN-less interface.
17222         (final): Rename to...
17223         (final_1): ... this.  Take SEEN parameter.  Output final pending
17224         next view at the end.
17225         (final): Reintroduce seen-less interface.
17226         (final_scan_insn): Output pending next view before switching
17227         sections or ending a block.  Mark the next view as needed when
17228         outputting variable locations.  Notify debug backend of section
17229         changes, and of location view changes.
17230         (rest_of_handle_final): Adjust.
17231         * toplev.c (process_options): Autodetect value for debug variable
17232         location views option.  Warn on incompat5 without -gdwarf-5.
17233         * doc/invoke.texi (gvariable-location-views): New.
17234         (gvariable-location-views=incompat5): New.
17235         (gno-variable-location-views): New.
17237 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17239         PR tree-optimization/84136
17240         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17241         that the result of find_edge is non-NULL.
17243 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17245         PR target/83008
17246         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17247         storing integer register in SImode.  Fix cost of 256 and 512
17248         byte aligned SSE register store.
17250 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17252         * config/i386/i386.c (ix86_multiplication_cost): Fix
17253         multiplication cost for TARGET_AVX512DQ.
17255 2018-02-08  Marek Polacek  <polacek@redhat.com>
17257         PR tree-optimization/84238
17258         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17259         get_range_strlen.
17261 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17263         PR tree-optimization/84265
17264         * tree-vect-stmts.c (vectorizable_store): Don't treat
17265         VMAT_CONTIGUOUS accesses as grouped.
17266         (vectorizable_load): Likewise.
17268 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17270         PR tree-optimization/81635
17271         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17272         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17273         (test_round_for_mask): New functions.
17274         (wide_int_cc_tests): Call test_round_for_mask.
17275         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17276         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17277         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17278         range returned by get_range_info.
17280 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17282         PR ipa/81360
17283         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17284         * symtab.c: Include builtins.h
17285         (symtab_node::output_to_lto_symbol_table_p): Move here
17286         from lto-streamer-out.c:output_symbol_p.
17287         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17288         (output_symbol_p): Move all logic to symtab.c
17289         (produce_symtab): Update.
17291 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17293         * config/s390/s390-opts.h (enum indirect_branch): Define.
17294         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17295         (s390_indirect_branch_via_thunk)
17296         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17297         (enum s390_indirect_branch_type): Define.
17298         * config/s390/s390.c (struct s390_frame_layout, struct
17299         machine_function): Remove.
17300         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17301         (indirect_branch_table_label_no, indirect_branch_table_name):
17302         Define variables.
17303         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17304         (enum s390_indirect_branch_option): Define.
17305         (s390_return_addr_from_memory): New function.
17306         (s390_handle_string_attribute): New function.
17307         (s390_attribute_table): Add new attribute handler.
17308         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17309         (s390_indirect_branch_via_thunk): New function.
17310         (s390_indirect_branch_via_inline_thunk): New function.
17311         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17312         sibling call optimization for non z10 compiles.
17313         (s390_emit_call): Force indirect branch target to be a single
17314         register.  Add r1 clobber for non-z10 compiles.
17315         (s390_emit_epilogue): Emit return jump via return_use expander.
17316         (s390_reorg): Handle JUMP_INSNs as execute targets.
17317         (s390_option_override_internal): Perform validity checks for the
17318         new command line options.
17319         (s390_indirect_branch_attrvalue): New function.
17320         (s390_indirect_branch_settings): New function.
17321         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17322         (s390_output_indirect_thunk_function):  New function.
17323         (s390_code_end): Implement target hook.
17324         (s390_case_values_threshold): Implement target hook.
17325         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17326         macros.
17327         * config/s390/s390.h (struct s390_frame_layout)
17328         (struct machine_function): Move here from s390.c.
17329         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17330         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17331         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17332         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17333         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17334         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17335         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17336         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17337         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17338         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17339         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17340         (mnemonic attribute): Add values which aren't recognized
17341         automatically.
17342         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17343         pattern for branch conversion.  Fix mnemonic attribute.
17344         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17345         indirect branch via thunk if requested.
17346         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17347         ("*indirect_jump"): Disable for branch conversion using out of
17348         line thunks.
17349         ("indirect_jump_via_thunk<mode>_z10")
17350         ("indirect_jump_via_thunk<mode>")
17351         ("indirect_jump_via_inlinethunk<mode>_z10")
17352         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17353         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17354         ("casesi_jump_via_inlinethunk<mode>_z10")
17355         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17356         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17357         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17358         ("*indirect2_jump"): Disable for branch conversion.
17359         ("casesi_jump"): Turn into expander and expand patterns for branch
17360         conversion.
17361         ("return_use"): New expander.
17362         ("*return"): Emit return via thunk and rename it to ...
17363         ("*return<mode>"): ... this one.
17364         * config/s390/s390.opt: Add new options and and enum for the
17365         option values.
17367 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17369         * lra-constraints.c (match_reload): Unconditionally use
17370         gen_lowpart_SUBREG, rather than selecting between that
17371         and equivalent gen_rtx_SUBREG code.
17373 2018-02-08  Richard Biener  <rguenther@suse.de>
17375         PR tree-optimization/84233
17376         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17377         changed flag instead of boguously re-using phi_inserted.
17379 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17381         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17382         static local variables.
17384 2018-02-08  Richard Biener  <rguenther@suse.de>
17386         PR tree-optimization/84278
17387         * tree-vect-stmts.c (vectorizable_store): When looking for
17388         smaller vector types to perform grouped strided loads/stores
17389         make sure the mode is supported by the target.
17390         (vectorizable_load): Likewise.
17392 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17394         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17395         Increase LDP/STP opportunities by adding adjacent callee-saves.
17397 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17399         PR rtl-optimization/84068
17400         PR rtl-optimization/83459
17401         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17403 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17405         PR tree-optimization/84224
17406         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17407         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17408         non-zero arguments.
17410 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17412         PR target/84113
17413         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17414         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17415         count, remove one USE.
17417 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17419         * doc/install.texi (Configuration): Document the
17420         --with-long-double-format={ibm,ieee} PowerPC configuration
17421         options.
17423         PR target/84154
17424         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17425         Convert from define_expand to be define_insn_and_split.  Rework
17426         float/double/_Float128 conversions to QI/HI/SImode to work with
17427         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17428         conversions to QI/HImode types did a store and then a load to
17429         truncate the value.  For conversions to VSX registers, don't split
17430         the insn, instead emit the code directly.  Use the code iterator
17431         any_fix to combine signed and unsigned conversions.
17432         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17433         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17434         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17435         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17436         (fix_<mode>di2_hw): Likewise.
17437         (fixuns_<mode>di2_hw): Likewise.
17438         (fix_<mode>si2_hw): Likewise.
17439         (fixuns_<mode>si2_hw): Likewise.
17440         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17441         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17442         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17443         fix<uns>_trunc<SFDF:mode>si2_p8.
17444         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17445         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17446         (fix<uns>_<mode>_mem): Likewise.
17447         (fctiw<u>z_<mode>_mem): Likewise.
17448         (fix<uns>_<mode>_mem): Likewise.
17449         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17450         the register allocator from doing a direct move to the GPRs to do
17451         a store, and instead use the ISA 3.0 store byte/half-word from
17452         vector register instruction.  For IEEE 128-bit floating point,
17453         also optimize stores of 32-bit ints.
17454         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17456 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17458         * genextract.c (push_pathstr_operand): New function to support
17459         [a-zA-Z].
17460         (walk_rtx): Call push_pathstr_operand.
17461         (print_path): Support [a-zA-Z].
17463 2018-02-07  Richard Biener  <rguenther@suse.de>
17465         PR tree-optimization/84037
17466         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17467         (cse_and_gimplify_to_preheader): Declare.
17468         (vect_get_place_in_interleaving_chain): Likewise.
17469         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17470         ivexpr_map.
17471         (_loop_vec_info::~_loop_vec_info): Delete it.
17472         (cse_and_gimplify_to_preheader): New function.
17473         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17474         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17475         (vectorizable_load): Likewise.  For grouped stores always base
17476         the IV on the first element.
17477         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17478         condition before gimplifying.
17480 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17482         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17483         *DIV_EXPR and *MOD_EXPR.
17485 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17487         PR target/84248
17488         * config/i386/i386.c (ix86_option_override_internal): Mask out
17489         the CF_SET bit when checking -fcf-protection.
17491 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17493         PR libgomp/84217
17494         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17495         enough.
17497 2018-02-07  Richard Biener  <rguenther@suse.de>
17499         PR tree-optimization/84204
17500         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17501         this place.
17503         PR tree-optimization/84205
17504         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17505         special-case isl_ast_op_zdiv_r.
17507         PR tree-optimization/84223
17508         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17509         Only add conditions from within the region.
17510         (gather_bbs::after_dom_children): Adjust.
17512 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17514         PR target/84209
17515         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17516         * config/avr/avr.md: Only post-reload split REG-REG moves if
17517         either register is GENERAL_REG_P.
17519 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17521         PR tree-optimization/84235
17522         * tree-ssa-scopedtables.c
17523         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17524         if the subtraction is performed in floating point type where NaNs are
17525         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17526         build 1.  Formatting fix.
17528 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17530         PR target/84146
17531         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17532         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17533         and skip it regardless of bb boundaries.  Use CALL_P macro,
17534         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17535         unnecessarily, formatting fix.
17537 2018-02-06  Michael Collison  <michael.collison@arm.com>
17539         * config/arm/thumb2.md:
17540         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17541         (*thumb_mov_notscc): Ditto.
17543 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17545         PR target/84154
17546         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17547         unsigned_fix, not "s".
17549 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17551         * configure.ac (gcc_fn_eh_frame_ro): New function.
17552         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17553         correct .eh_frame permissions.
17554         * configure: Regenerate.
17556 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17558         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17559         irrelevant options.
17561 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17563         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17564         Display warning message for -mno-speculate-indirect-jumps.
17566 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17568         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17569         Undocumented.
17570         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17572 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17574         PR tree-optimization/84225
17575         * tree-eh.c (find_trapping_overflow): Only call
17576         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17578 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17580         PR target/84145
17581         * config/i386/i386.c: Reimplement the check of possible options
17582         -mibt/-mshstk conbination. Change error messages.
17583         * doc/invoke.texi: Fix a typo: remove extra '='.
17585 2018-02-06  Marek Polacek  <polacek@redhat.com>
17587         PR tree-optimization/84228
17588         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17590 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17592         PR target/82641
17593         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17594         emitted arch directives.
17595         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17596         __ARM_FEATURE_COPROC before changing architectures.
17598 2018-02-06  Richard Biener  <rguenther@suse.de>
17600         * config/i386/i386.c (print_reg): Fix typo.
17601         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17603 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17605         * configure: Regenerate.
17607 2018-02-05  Martin Sebor  <msebor@redhat.com>
17609         PR tree-optimization/83369
17610         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17611         inlining context.
17613 2018-02-05  Martin Liska  <mliska@suse.cz>
17615         * doc/invoke.texi: Cherry-pick upstream r323995.
17617 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17619         * ira.c (ira_init_register_move_cost): Adjust comment.
17621 2018-02-05  Martin Liska  <mliska@suse.cz>
17623         PR gcov-profile/84137
17624         * doc/gcov.texi: Fix typo in documentation.
17626 2018-02-05  Martin Liska  <mliska@suse.cz>
17628         PR gcov-profile/83879
17629         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17630         using dlopen functionality.
17632 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17634         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17635         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17636         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17637         _mm_maskz_range_round_ss): New intrinsics.
17638         (__builtin_ia32_rangesd128_round)
17639         (__builtin_ia32_rangess128_round): Remove.
17640         (__builtin_ia32_rangesd128_mask_round,
17641         __builtin_ia32_rangess128_mask_round): New builtins.
17642         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17643         __builtin_ia32_rangess128_round): Remove.
17644         (__builtin_ia32_rangesd128_mask_round,
17645         __builtin_ia32_rangess128_mask_round): New builtins.
17646         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17647         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17648         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17649         "<round_saeonly_constraint>")): Changed to ...
17650         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17651         "<round_saeonly_scalar_constraint>")): ... this.
17652         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17653         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17654         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17655         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17656         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17658 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17660         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17661         options.
17662         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17663         Remove all values except native, 8540 and 8548.
17665 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17667         * config/i386/i386.c (ix86_output_function_return): Pass
17668         INVALID_REGNUM, instead of -1, as invalid register number to
17669         indirect_thunk_name and output_indirect_thunk.
17671 2018-02-02  Julia Koval  <julia.koval@intel.com>
17673         * config.gcc: Add -march=icelake.
17674         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17675         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17676         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17677         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17678         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17679         (processor_target_table): Add icelake.
17680         (ix86_option_override_internal): Handle new PTAs.
17681         (get_builtin_code_for_version): Handle icelake.
17682         (M_INTEL_COREI7_ICELAKE): New.
17683         (fold_builtin_cpu): Handle icelake.
17684         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17685         * doc/invoke.texi: Add -march=icelake.
17687 2018-02-02  Julia Koval  <julia.koval@intel.com>
17689         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17690         to wide_int_bitmask.
17691         * wide-int-bitmask.h: New.
17693 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17695         PR target/84066
17696         * config/i386/i386.md: Replace Pmode with word_mode in
17697         builtin_setjmp_setup and builtin_longjmp to support x32.
17699 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17701         PR target/56010
17702         PR target/83743
17703         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17704         #include "opts.h".
17705         (rs6000_supported_cpu_names): New static variable.
17706         (linux_cpu_translation_table): Likewise.
17707         (elf_platform) <cpu>: Define new static variable and use it.
17708         Translate kernel AT_PLATFORM name to canonical name if needed.
17709         Error if platform name is unknown.
17711 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17713         PR target/84089
17714         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17716 2018-02-01  Jeff Law  <law@redhat.com>
17718         PR target/84128
17719         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17720         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17721         the scratch if RELEASE_VIA_POP is false.
17722         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17723         If we have to save a temporary register, decrement SIZE appropriately.
17724         Pass new arguments to release_scratch_register_on_entry.
17725         (ix86_adjust_stack_and_probe): Likewise.
17726         (ix86_emit_probe_stack_range): Pass new arguments to
17727         release_scratch_register_on_entry.
17729 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17731         PR rtl-optimization/84157
17732         * combine.c (change_zero_ext): Use REG_P predicate in
17733         front of HARD_REGISTER_P predicate.
17735 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17737         * config/avr/avr.c (avr_option_override): Move disabling of
17738         -fdelete-null-pointer-checks to...
17739         * common/config/avr/avr-common.c (avr_option_optimization_table):
17740         ...here.
17742 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17744         PR tree-optimization/81635
17745         * tree-data-ref.c (split_constant_offset_1): For types that
17746         wrap on overflow, try to use range info to prove that wrapping
17747         cannot occur.
17749 2018-02-01  Renlin Li  <renlin.li@arm.com>
17751         PR target/83370
17752         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17753         TAILCALL_ADDR_REGS.
17754         (aarch64_register_move_cost): Likewise.
17755         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17756         TAILCALL_ADDR_REGS.
17757         (REG_CLASS_NAMES): Likewise.
17758         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17759         TAILCALL_ADDR_REGS. Remove IP registers.
17760         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17762 2018-02-01  Richard Biener  <rguenther@suse.de>
17764         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17765         for specifying RPO order and allow NULL for that.
17766         * domwalk.c (dom_walker::dom_walker): Likewise.
17767         (dom_walker::walk): Handle NULL RPO order.
17768         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17769         in RPO order.
17770         (rewrite_update_dom_walker): Likewise.
17771         (mark_def_dom_walker): Likewise.
17773 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17775         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17776         (aarch64_maybe_expand_sve_subreg_move): Declare.
17777         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17778         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17779         predicate.
17780         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17781         that are semantically a reverse operation.
17782         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17783         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17784         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17785         functions.
17786         (aarch64_can_change_mode_class): For big-endian, forbid changes
17787         between two SVE modes if they have different element sizes.
17789 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17791         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17792         the TImode handling for big-endian targets.
17794 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17796         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17797         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17798         not just bytes.
17799         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17800         Remove BSWAP handing for big-endian targets and use the form of
17801         LD1RQ appropariate for the mode.
17803 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17805         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17806         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17807         duplicated element.
17809 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17811         PR tearget/83845
17812         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17813         check for operands that need to go through aarch64_sve_reload_be.
17815 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17817         PR tree-optimization/81661
17818         PR tree-optimization/84117
17819         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17820         * tree-eh.c: Include gimplify.h.
17821         (find_trapping_overflow, replace_trapping_overflow,
17822         rewrite_to_non_trapping_overflow): New functions.
17823         * tree-vect-loop.c: Include tree-eh.h.
17824         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17825         * tree-data-ref.c: Include tree-eh.h.
17826         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17828 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17830         PR rtl-optimization/84123
17831         * combine.c (change_zero_ext): Check if hard register satisfies
17832         can_change_dest_mode before calling gen_lowpart_SUBREG.
17834 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17836         PR target/82444
17837         * ira.c (ira_init_register_move_cost): Remove assert.
17839 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17841         PR rtl-optimization/84071
17842         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17843         * doc/tm.texi: Regenerate.
17845 2018-01-31  Richard Biener  <rguenther@suse.de>
17847         PR tree-optimization/84132
17848         * tree-data-ref.c (analyze_miv_subscript): Properly
17849         check whether evolution_function_is_affine_multivariate_p
17850         before calling gcd_of_steps_may_divide_p.
17852 2018-01-31  Julia Koval  <julia.koval@intel.com>
17854         PR target/83618
17855         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17856         * config/i386/i386.md (rdpid_rex64) New.
17857         (rdpid): Make 32bit only.
17859 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17861         PR lto/84105
17862         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17863         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17865 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17867         Revert
17868         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17870         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17872 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17874         PR rtl-optimization/84071
17875         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17876         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17878 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17880         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17881         (arc_attribute_table): Add 'aux' attribute.
17882         (arc_in_small_data_p): Consider aux like variables.
17883         (arc_is_aux_reg_p): New function.
17884         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17885         (arc_get_aux_arg): New function.
17886         (prepare_move_operands): Handle aux-register access.
17887         (arc_handle_aux_attribute): New function.
17888         * doc/extend.texi (ARC Variable attributes): Add subsection.
17890 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17892         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17893         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17894         (arc_attribute_table): Add 'uncached' attribute.
17895         (arc_print_operand): Print '.di' flag for uncached memory
17896         accesses.
17897         (arc_in_small_data_p): Do not consider for small data the uncached
17898         types.
17899         (arc_is_uncached_mem_p): New function.
17900         * config/arc/predicates.md (compact_store_memory_operand): Check
17901         for uncached memory accesses.
17902         (nonvol_nonimm_operand): Likewise.
17903         * doc/extend.texi (ARC Type Attribute): New subsection.
17905 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17907         PR c/84100
17908         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17909         falign-loops=): Add Optimization flag.
17911 2018-01-30  Jeff Law  <law@redhat.com>
17913         PR target/84064
17914         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17915         INT_REGISTERS_SAVED.  Check it prior to calling
17916         get_scratch_register_on_entry.
17917         (ix86_adjust_stack_and_probe): Similarly.
17918         (ix86_emit_probe_stack_range): Similarly.
17919         (ix86_expand_prologue): Corresponding changes.
17921 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17923         PR target/40411
17924         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17925         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17927 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17929         PR target/84112
17930         * lra-constraints.c (curr_insn_transform): Process AND in the
17931         address.
17933 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17935         PR rtl-optimization/83986
17936         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17937         dependence against last_pending_memory_flush in addition to
17938         pending_jump_insns.
17940 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17942         PR tree-optimization/81611
17943         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17944         copies.
17946 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17948         PR target/83758
17949         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17950         a reg rtx.
17952 2018-01-30  Richard Biener  <rguenther@suse.de>
17953             Jakub Jelinek  <jakub@redhat.com>
17955         PR tree-optimization/84111
17956         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17957         inner loops added during recursion, as they don't have up-to-date
17958         SSA form.
17960 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17962         PR ipa/81360
17963         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17964         (can_inline_edge_by_limits_p): ... here.
17965         (can_early_inline_edge_p, check_callers,
17966         update_caller_keys, update_callee_keys, recursive_inlining,
17967         add_new_edges_to_heap, speculation_useful_p,
17968         inline_small_functions,
17969         inline_small_functions, flatten_function,
17970         inline_to_all_callers_1): Update.
17972 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17974         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17975         zeros correctly.
17977 2018-01-30  Richard Biener  <rguenther@suse.de>
17979         PR tree-optimization/83008
17980         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17981         invariant and constant vector uses in stmts when they need
17982         more than one stmt.
17984 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17986         PR bootstrap/84017
17987         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17988         * configure: Regenerate.
17990 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17992         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17993         pattern.
17994         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17995         Use gen_rtx_REG rather than gen_lowpart.
17997 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17999         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
18000         rather than 0 when creating partial subregs.
18002 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
18004         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
18005         of usage.
18007 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
18009         PR target/81550
18010         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
18011         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
18012         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
18013         flags.  This restores the settings used before the 2017-07-24.
18014         Turning off pre increment/decrement/modify allows IVOPTS to
18015         optimize DF/SF loops where the index is an int.
18017 2018-01-29  Richard Biener  <rguenther@suse.de>
18018             Kelvin Nilsen  <kelvin@gcc.gnu.org>
18020         PR bootstrap/80867
18021         * tree-vect-stmts.c (vectorizable_call): Don't call
18022         targetm.vectorize_builtin_md_vectorized_function if callee is
18023         NULL.
18025 2018-01-22  Carl Love  <cel@us.ibm.com>
18027         * doc/extend.tex: Fix typo in second arg in
18028         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
18030 2018-01-29  Richard Biener  <rguenther@suse.de>
18032         PR tree-optimization/84086
18033         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
18034         (flush_ssaname_freelist): When SSA names were released reset
18035         the SCEV hash table.
18037 2018-01-29  Richard Biener  <rguenther@suse.de>
18039         PR tree-optimization/84057
18040         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
18041         removed paths when removing edges.
18043 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18045         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18046         -mfunction-return=@var{choice}.
18048 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18050         PR diagnostic/84034
18051         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18052         Handle CR like TAB.
18053         (layout::print_source_line): Likewise.
18054         (test_get_line_width_without_trailing_whitespace): Add test cases.
18056 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18058         PR middle-end/84040
18059         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18060         debug insns.
18062 2018-01-26  Jim Wilson  <jimw@sifive.com>
18064         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18066         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18067         specified.
18069 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18071         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18072         and CMP + SUB-immediate -> SUBS.
18074 2018-01-26  Martin Sebor  <msebor@redhat.com>
18076         PR tree-optimization/83896
18077         * tree-ssa-strlen.c (get_string_len): Rename...
18078         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18079         Avoid assuming length is constant.
18080         (handle_char_store): Use HOST_WIDE_INT for string length.
18082 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18084         PR target/81763
18085         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18086         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18088 2018-01-26  Richard Biener  <rguenther@suse.de>
18090         PR rtl-optimization/84003
18091         * dse.c (record_store): Only record redundant stores when
18092         the earlier store aliases at least all accesses the later one does.
18094 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18096         PR rtl-optimization/83985
18097         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18098         REG_CFA_RESTORE insns.
18099         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18100         REG_CFA_RESTORE insns here.
18102         PR c/83989
18103         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18104         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18106 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18108         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18109         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18110         (arc_init): Likewise.
18111         (arc_override_options): Likewise.
18112         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18113         value.
18114         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18115         support.
18116         * config/arc/arc.h (TARGET_DBNZ): Define.
18117         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18118         properly set the tune attribute.
18119         (dbnz): Use TARGET_DBNZ guard.
18120         * config/arc/arc.opt (mtune): Add core3 option.
18122 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18124         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18125         recognize new pic like addresses.
18126         (arc_delegitimize_address): Clean up.
18128 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18130         * config/arc/arc-arches.def: Option mrf16 valid for all
18131         architectures.
18132         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18133         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18134         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18135         * config/arc/arc-tables.opt: Regenerate.
18136         * config/arc/arc.c (arc_conditional_register_usage): Handle
18137         reduced register file case.
18138         (arc_file_start): Set must have build attributes.
18139         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18140         mrf16 option value.
18141         * config/arc/arc.opt (mrf16): Add new option.
18142         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18143         * config/arc/genmultilib.awk: Handle new mrf16 option.
18144         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18145         * config/arc/t-multilib: Regenerate.
18146         * doc/invoke.texi (ARC Options): Document mrf16 option.
18148 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18150         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18151         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18152         (arc_attribute_table): Add 'secure_call' attribute.
18153         (arc_print_operand): Print secure call operand.
18154         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18155         secure.
18156         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18157         (call_i): Add support for sjli instruction.
18158         (call_value_i): Likewise.
18159         * config/arc/constraints.md (Csc): New constraint.
18161 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18162             John Eric Martin  <John.Martin@emmicro-us.com>
18164         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18165         * config/arc/arc.c (_arc_jli_section): New struct.
18166         (arc_jli_section): New type.
18167         (rc_jli_sections): New static variable.
18168         (arc_handle_jli_attribute): New function.
18169         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18170         (arc_file_end): New function.
18171         (TARGET_ASM_FILE_END): Define.
18172         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18173         (arc_add_jli_section): New function.
18174         (jli_call_scan): Likewise.
18175         (arc_reorg): Call jli_call_scan.
18176         (arc_output_addsi): Remove 'S' from printing asm operand.
18177         (arc_is_jli_call_p): New function.
18178         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18179         operand.
18180         (movhi_insn): Likewise.
18181         (movsi_insn): Likewise.
18182         (movsi_set_cc_insn): Likewise.
18183         (loadqi_update): Likewise.
18184         (load_zeroextendqisi_update): Likewise.
18185         (load_signextendqisi_update): Likewise.
18186         (loadhi_update): Likewise.
18187         (load_zeroextendhisi_update): Likewise.
18188         (load_signextendhisi_update): Likewise.
18189         (loadsi_update): Likewise.
18190         (loadsf_update): Likewise.
18191         (movsicc_insn): Likewise.
18192         (bset_insn): Likewise.
18193         (bxor_insn): Likewise.
18194         (bclr_insn): Likewise.
18195         (bmsk_insn): Likewise.
18196         (bicsi3_insn): Likewise.
18197         (cmpsi_cc_c_insn): Likewise.
18198         (movsi_ne): Likewise.
18199         (movsi_cond_exec): Likewise.
18200         (clrsbsi2): Likewise.
18201         (norm_f): Likewise.
18202         (normw): Likewise.
18203         (swap): Likewise.
18204         (divaw): Likewise.
18205         (flag): Likewise.
18206         (sr): Likewise.
18207         (kflag): Likewise.
18208         (ffs): Likewise.
18209         (ffs_f): Likewise.
18210         (fls): Likewise.
18211         (call_i): Remove 'S' asm letter, add jli instruction.
18212         (call_value_i): Likewise.
18213         * config/arc/arc.op (mjli-always): New option.
18214         * config/arc/constraints.md (Cji): New constraint.
18215         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18216         operand.
18217         (subsf3_fpx): Likewise.
18218         (mulsf3_fpx): Likewise.
18219         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18220         asm operand.
18221         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18222         function attrbutes.
18223         * doc/invoke.texi (ARC): Document mjli-always option.
18225 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18227         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18228         avoid addition with 0 and use incw and decw where possible.
18230 2018-01-26  Richard Biener  <rguenther@suse.de>
18232         PR tree-optimization/81082
18233         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18234         association if it requires casting to unsigned.
18235         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18236         from fold_plusminus_mult_expr to catch important cases late when
18237         range info is available.
18239 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18241         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18242         * configure.ac (hidden_linkonce): New test.
18243         * configure: Regenerate.
18244         * config.in: Regenerate.
18246 2018-01-26  Julia Koval  <julia.koval@intel.com>
18248         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18249         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18250         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18251         _mm_mask_bitshuffle_epi64_mask): Fix type.
18252         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18253         USI_FTYPE_V4DI_V4DI_USI): Remove.
18254         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18255         __builtin_ia32_vpshufbitqmb256_mask,
18256         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18257         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18258         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18260 2018-01-26  Alan Modra  <amodra@gmail.com>
18262         PR target/84033
18263         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18264         UNSPEC_VBPERMQ.  Sort other unspecs.
18266 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18268         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18270 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18272         PR middle-end/83055
18273         * predict.c (drop_profile): Do not push/pop cfun; update also
18274         node->count.
18275         (handle_missing_profiles): Fix logic looking for zero profiles.
18277 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18279         PR middle-end/83977
18280         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18281         on functions with #pragma omp declare simd or functions with simd
18282         attribute.
18283         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18284         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18285         Remove trailing \n from warning_at calls.
18287 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18289         PR target/84028
18290         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18291         for neutered workers.
18293 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18295         PR target/68467
18296         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18297         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18299 2018-01-24  Jeff Law  <law@redhat.com>
18301         PR target/83994
18302         * i386.c (get_probe_interval): Move to earlier point.
18303         (ix86_compute_frame_layout): If -fstack-clash-protection and
18304         the frame is larger than the probe interval, then use pushes
18305         to save registers rather than reg->mem moves.
18306         (ix86_expand_prologue): Remove conditional for int_registers_saved
18307         assertion.
18309 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18311         PR target/84014
18312         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18313         min/max for never referenced object.
18315 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18317         PR middle-end/83977
18318         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18319         here.
18320         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18321         attributes from DECL_ATTRIBUTES (decl) without affecting
18322         DECL_ATTRIBUTES (current_function_decl).
18323         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18324         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18326 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18328         PR tree-optimization/83979
18329         * fold-const.c (fold_comparison): Use constant_boolean_node
18330         instead of boolean_{true,false}_node.
18332 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18334         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18335         with zero counts.
18337 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18339         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18340         Simplify the clause that sets the length attribute.
18341         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18342         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18343         clause that sets the length attribute.
18344         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18346 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18348         PR target/83589
18349         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18350         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18351         Add strict parameter.
18352         (prevent_branch_around_nothing): Insert dummy insn between branch to
18353         label and label with no ptx insn inbetween.
18354         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18356 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18358         PR target/81352
18359         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18360         for neutered threads in warp.
18361         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18363 2018-01-24  Richard Biener  <rguenther@suse.de>
18365         PR tree-optimization/83176
18366         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18367         operands.
18369 2018-01-24  Richard Biener  <rguenther@suse.de>
18371         PR tree-optimization/82819
18372         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18373         code generating pluses that are no-ops in the target precision.
18375 2018-01-24  Richard Biener  <rguenther@suse.de>
18377         PR middle-end/84000
18378         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18380 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18382         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18383         to merge probabilities.
18384         * predict.c (probably_never_executed): Also mark as cold functions
18385         with global 0 profile and guessed local profile.
18386         * profile-count.c (profile_probability::combine_with_count): New
18387         member function.
18388         * profile-count.h (profile_probability::operator*,
18389         profile_probability::operator*=, profile_probability::operator/,
18390         profile_probability::operator/=): Reduce precision to adjusted
18391         and set value to guessed on contradictory divisions.
18392         (profile_probability::combine_with_freq): Remove.
18393         (profile_probability::combine_wiht_count): Declare.
18394         (profile_count::force_nonzero):: Set to adjusted.
18395         (profile_count::probability_in):: Set quality to adjusted.
18396         * tree-ssa-tail-merge.c (replace_block_by): Use
18397         combine_with_count.
18399 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18400             Jim Wilson  <jimw@sifive.com>
18402         * config/riscv/riscv.c (riscv_stack_boundary): New.
18403         (riscv_option_override): Set riscv_stack_boundary.  Handle
18404         riscv_preferred_stack_boundary_arg.
18405         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18406         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18407         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18408         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18409         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18410         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18412 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18414         PR target/83905
18415         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18416         of struct ix86_frame.
18417         (ix86_expand_epilogue): Likewise.  Add a local variable for
18418         the reg_save_offset field in struct ix86_frame.
18420 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18422         PR tree-optimization/82604
18423         * tree-loop-distribution.c (enum partition_kind): New enum item
18424         PKIND_PARTIAL_MEMSET.
18425         (partition_builtin_p): Support above new enum item.
18426         (generate_code_for_partition): Ditto.
18427         (compute_access_range): Differentiate cases that equality can be
18428         proven at all loops, the innermost loops or no loops.
18429         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18430         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18431         (finalize_partitions, distribute_loop): Don't fuse partition of
18432         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18433         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18434         parloop is enabled.
18436 2018-01-23  Martin Liska  <mliska@suse.cz>
18438         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18439         order to ignore the predictor.
18440         (PRED_POLYMORPHIC_CALL): Likewise.
18441         (PRED_RECURSIVE_CALL): Likewise.
18443 2018-01-23  Martin Liska  <mliska@suse.cz>
18445         * tree-profile.c (tree_profiling): Print function header to
18446         aware reader which function we are working on.
18447         * value-prof.c (gimple_find_values_to_profile): Do not print
18448         not interesting value histograms.
18450 2018-01-23  Martin Liska  <mliska@suse.cz>
18452         * profile-count.h (enum profile_quality): Add
18453         profile_uninitialized as the first value. Do not number values
18454         as they are zero based.
18455         (profile_count::verify): Update sanity check.
18456         (profile_probability::verify): Likewise.
18458 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18460         * doc/invoke.texi (ffor-scope): Deprecate.
18462 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18464         PR tree-optimization/83510
18465         * domwalk.c (set_all_edges_as_executable): New function.
18466         (dom_walker::dom_walker): Convert bool param
18467         "skip_unreachable_blocks" to enum reachability.  Move setup of
18468         edge flags to set_all_edges_as_executable and only do it when
18469         reachability is REACHABLE_BLOCKS.
18470         * domwalk.h (enum dom_walker::reachability): New enum.
18471         (dom_walker::dom_walker): Convert bool param
18472         "skip_unreachable_blocks" to enum reachability.
18473         (set_all_edges_as_executable): New decl.
18474         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18475         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18476         "reachability".
18477         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18478         but converting true to REACHABLE_BLOCKS.
18479         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18480         * tree-vrp.c
18481         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18482         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18483         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18484         REACHABLE_BLOCKS.
18485         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18486         if check_all_array_refs will be called.
18488 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18490         * tree.c (selftest::test_location_wrappers): Add more test
18491         coverage.
18493 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18495         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18496         (selftest::test_bit_in_range): Likewise.
18498 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18500         PR testsuite/83888
18501         * doc/sourcebuild.texi (vect_float): Say that the selector
18502         only describes the situation when -funsafe-math-optimizations is on.
18503         (vect_float_strict): Document.
18505 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18507         PR tree-optimization/83965
18508         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18509         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18510         instead of checking only for a reduction.
18511         (vect_recog_widen_sum_pattern): Likewise.
18513 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18515         * predict.c (probably_never_executed): Only use precise profile info.
18516         (compute_function_frequency): Skip after inlining hack since we now
18517         have quality checking.
18519 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18521         * profile-count.h (profile_probability::very_unlikely,
18522         profile_probability::unlikely, profile_probability::even): Set
18523         precision to guessed.
18525 2018-01-23  Richard Biener  <rguenther@suse.de>
18527         PR tree-optimization/83963
18528         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18529         Properly terminate dominator walk when crossing the exit edge not
18530         when visiting its source block.
18532 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18534         PR c++/83918
18535         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18536         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18538 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18540         PR tree-optimization/83957
18541         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18542         semicolon after for body surrounded by braces.
18544         PR tree-optimization/83081
18545         * profile-count.h (profile_probability::split): New method.
18546         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18547         Use profile_probability::split.
18548         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18549         when splitting a single conditional jump into 2.
18551 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18553         PR tree-optimization/69452
18554         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18555         decl.
18557 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18559         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18560         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18561         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18563 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18565         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18566         declaration.
18567         * config/rl78/rl78.md (movdi): New define_expand.
18568         * config/rl78/rl78.c (rl78_split_movdi): New function.
18570 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18572         PR target/83862
18573         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18574         no longer used.
18575         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18576         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18577         128-bit to produce an UNSPEC move to get the double word with the
18578         signbit and then a shift directly to do signbit.
18579         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18580         implementation with a new version that just does either a direct
18581         move or a regular move.  Move memory interface to separate insns.
18582         Move insns so they are next to the expander.
18583         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18584         with signbit move.  Split big and little endian case.
18585         (signbit<mode>2_dm_mem_le): Likewise.
18586         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18587         (signbit<mode>2_dm2): Likewise.
18589 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18591         * config/rl78/rl78.md (anddi3): New define_expand.
18593 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18595         * config/rl78/rl78.md (umindi3): New define_expand.
18597 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18599         * config/rl78/rl78.md (smindi3): New define_expand.
18601 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18603         * config/rl78/rl78.md (smaxdi3): New define_expand.
18605 2018-01-22  Carl Love  <cel@us.ibm.com>
18607         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18608         LVX_V1TI): Add macro expansion.
18609         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18610         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18611         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18612         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18613         Change check to determine if the instruction is a byte reversing
18614         entry.  Fix typo in comment.
18615         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18616         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18617         Add def_builtin calls for new builtins.
18618         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18619         Add define_insn expansion.
18621 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18623         * config/rl78/rl78.md (umaxdi3): New define_expand.
18625 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18627         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18628         for non-QImode registers.
18630 2018-01-22  Richard Biener  <rguenther@suse.de>
18632         PR tree-optimization/83963
18633         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18634         including the loop exit block.
18635         (scop_detection::merge_sese): Likewise.
18636         (scop_detection::add_scop): Do it here instead.
18638 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18640         * doc/sourcebuild.texi (arm_softfloat): Document.
18642 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18644         PR gcc/77734
18645         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18646         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18647         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18649 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18650             David Edelsohn  <dje.gcc@gmail.com>
18652         PR target/83946
18653         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18654         Change "crset eq" to "crset 2".
18655         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18656         (*call_indirect_aix<mode>_nospec): Likewise.
18657         (*call_value_indirect_aix<mode>_nospec): Likewise.
18658         (*call_indirect_elfv2<mode>_nospec): Likewise.
18659         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18660         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18661         change assembly output from . to $.
18662         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18663         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18664         (*tablejump<mode>_internal1_nospec): Likewise.
18666 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18668         PR target/80870
18669         * config/sh/sh_optimize_sett_clrt.cc:
18670         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18672 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18674         PR tree-optimization/83940
18675         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18676         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18677         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18678         use it to pass back the definition type.
18679         (vect_check_store_rhs): Likewise rhs_dt_out.
18680         (vect_build_gather_load_calls): Add a mask_dt argument and use
18681         it instead of a call to vect_is_simple_use.
18682         (vectorizable_store): Update calls to vect_check_load_store_mask
18683         and vect_check_store_rhs.  Use the dt returned by the latter instead
18684         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18685         instead of calls to vect_is_simple_use.  Pass the scalar rather
18686         than the vector operand to vect_is_simple_use when handling
18687         second and subsequent copies of an rhs value.
18688         (vectorizable_load): Update calls to vect_check_load_store_mask
18689         and vect_build_gather_load_calls.  Use the cached mask_dt and
18690         gs_info.offset_dt instead of calls to vect_is_simple_use.
18692 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18694         PR middle-end/83945
18695         * tree-emutls.c: Include gimplify.h.
18696         (lower_emutls_2): New function.
18697         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18698         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18699         it before further processing.
18701         PR target/83930
18702         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18703         UINTVAL (trueop1) instead of INTVAL (op1).
18705 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18707         PR debug/81570
18708         PR debug/83728
18709         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18710         INCOMING_FRAME_SP_OFFSET if not defined.
18711         (scan_trace): Add ENTRY argument.  If true and
18712         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18713         emit a note to adjust the CFA offset.
18714         (create_cfi_notes): Adjust scan_trace callers.
18715         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18716         INCOMING_FRAME_SP_OFFSET in the CIE.
18717         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18718         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18719         Likewise.
18720         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18721         * doc/tm.texi: Regenerated.
18723 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18725         PR rtl-optimization/83147
18726         * lra-constraints.c (remove_inheritance_pseudos): Use
18727         lra_substitute_pseudo_within_insn.
18729 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18730             Cesar Philippidis  <cesar@codesourcery.com>
18732         PR target/83920
18733         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18735 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18737         PR target/83790
18738         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18739         spaces for function labels.
18741 2018-01-19  Martin Liska  <mliska@suse.cz>
18743         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18744         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18745         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18746         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18747         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18748         (PRED_CONST_RETURN): Change from 69 to 65.
18749         (PRED_NULL_RETURN): Change from 91 to 71.
18750         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18751         (PRED_LOOP_GUARD): Change from 66 to 73.
18753 2018-01-19  Martin Liska  <mliska@suse.cz>
18755         * predict.c (predict_insn_def): Add new assert.
18756         (struct branch_predictor): Change type to signed integer.
18757         (test_prediction_value_range): Amend test to cover
18758         PROB_UNINITIALIZED.
18759         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18760         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18761         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18762         (PRED_LOOP_IV_COMPARE): Likewise.
18763         * predict.h (PROB_UNINITIALIZED): Define new constant.
18765 2018-01-19  Martin Liska  <mliska@suse.cz>
18767         * predict.c (dump_prediction): Add new format for
18768         analyze_brprob.py script which is enabled with -details
18769         suboption.
18770         * profile-count.h (precise_p): New function.
18772 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18774         PR tree-optimization/83922
18775         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18776         there are no statements that need masking.
18777         (vect_active_double_reduction_p): New function.
18778         (vect_analyze_loop_operations): Use it when handling phis that
18779         are not in the loop header.
18781 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18783         PR tree-optimization/83914
18784         * tree-vect-loop.c (vectorizable_induction): Don't convert
18785         init_expr or apply the peeling adjustment for inductions
18786         that are nested within the vectorized loop.
18788 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18790         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18791         instead of NEG.
18793 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18795         PR sanitizer/81715
18796         PR testsuite/83882
18797         * function.h (gimplify_parameters): Add gimple_seq * argument.
18798         * function.c: Include gimple.h and options.h.
18799         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18800         for the added local temporaries if needed.
18801         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18802         if there are any parameter cleanups, wrap whole body into a
18803         try/finally with the cleanups.
18805 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18807         PR target/82964
18808         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18809         Use GET_MODE_CLASS for scalar floating point.
18811 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18813         PR ipa/82256
18814         patch by PaX Team
18815         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18816         Fix call of call_cgraph_insertion_hooks.
18818 2018-01-18  Martin Sebor  <msebor@redhat.com>
18820         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18822 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18824         PR ipa/83619
18825         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18826         frequencies.
18828 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18830         PR other/70268
18831         * common.opt: (-ffile-prefix-map): New option.
18832         * opts.c (common_handle_option): Defer it.
18833         * opts-global.c (handle_common_deferred_options): Handle it.
18834         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18835         * file-prefix-map.h: New file.
18836         (remap_debug_filename, add_debug_prefix_map): ...here.
18837         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18838         * final.c (debug_prefix_map, add_debug_prefix_map
18839         remap_debug_filename): Move to...
18840         * file-prefix-map.c: New file.
18841         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18842         generalize, get rid of alloca(), use strrchr() instead of strchr().
18843         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18844         Implement in terms of add_prefix_map().
18845         (remap_macro_filename, remap_debug_filename): Implement in term of
18846         remap_filename().
18847         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18848         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18849         * dbxout.c: Include file-prefix-map.h.
18850         * varasm.c: Likewise.
18851         * vmsdbgout.c: Likewise.
18852         * xcoffout.c: Likewise.
18853         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18854         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18855         * doc/invoke.texi (-ffile-prefix-map): Document.
18856         (-fdebug-prefix-map): Update description.
18858 2018-01-18  Martin Liska  <mliska@suse.cz>
18860         * config/i386/i386.c (indirect_thunk_name): Document that also
18861         lfence is emitted.
18862         (output_indirect_thunk): Document why both instructions
18863         (pause and lfence) are generated.
18865 2018-01-18  Richard Biener  <rguenther@suse.de>
18867         PR tree-optimization/83887
18868         * graphite-scop-detection.c
18869         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18870         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18871         (scop_detection::merge_sese): Re-implement with a flood-fill
18872         algorithm that properly finds a SESE region if it exists.
18874 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18876         PR c/61240
18877         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18878         pointer_diff optimizations use view_convert instead of convert.
18880 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18882         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18883         Generate different code for -mno-speculate-indirect-jumps.
18884         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18885         (*call_indirect_aix<mode>): Disable for
18886         -mno-speculate-indirect-jumps.
18887         (*call_indirect_aix<mode>_nospec): New define_insn.
18888         (*call_value_indirect_aix<mode>): Disable for
18889         -mno-speculate-indirect-jumps.
18890         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18891         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18892         -mno-speculate-indirect-jumps.
18893         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18895 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18897         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18898         long double type, set the flags for noting the default long double
18899         type, even if we don't pass or return a long double type.
18901 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18903         PR ipa/83051
18904         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18905         failure.
18907 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18909         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18910         support for merge[hl].
18911         (fold_mergehl_helper): New helper function.
18912         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18913         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18914         (altivec_vmrglw_direct): Add xxmrglw insn.
18916 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18918         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18919         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18921 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18923         PR lto/83121
18924         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18925         call the lto_location_cache before reading the
18926         DECL_SOURCE_LOCATION of the types.
18928 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18929             Richard Sandiford  <richard.sandiford@linaro.org>
18931         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18932         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18933         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18934         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18935         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18936         Add declaration.
18937         * config/aarch64/constraints.md (aarch64_movti_operand):
18938         Limit immediates.
18939         * config/aarch64/predicates.md (Uti): Add new constraint.
18941 2018-01-17  Carl Love  <cel@us.ibm.com>
18943         * config/rs6000/vsx.md (define_expand xl_len_r,
18944         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18945         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18946         lxvll.
18947         (define_expand, define_insn): Move the shift left from  the
18948         define_insn to the define_expand for lxvl and stxvl instructions.
18949         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18950         and XL_LEN_R definitions to PURE.
18952 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18954         * config/i386/i386.c (indirect_thunk_name): Declare regno
18955         as unsigned int.  Compare regno with INVALID_REGNUM.
18956         (output_indirect_thunk): Ditto.
18957         (output_indirect_thunk_function): Ditto.
18958         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18959         in the call to output_indirect_thunk_function.
18961 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18963         PR middle-end/83884
18964         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18965         rather than the size of inner_type to determine the stack slot size
18966         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18968 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18970         PR target/83546
18971         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18972         to PTA_SILVERMONT.
18974 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18976         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18977         endian Linux systems to optionally enable multilibs for selecting
18978         the long double type if the user configured an explicit type.
18979         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18980         have no long double multilibs if not defined.
18981         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18982         warn if the user used -mabi={ieee,ibm}longdouble and we built
18983         multilibs for long double.
18984         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18985         appropriate multilib option.
18986         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18987         multilib options.
18988         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18989         for building long double multilibs.
18990         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18992 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18994         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18995         copies.
18997         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18998         64 bits.
18999         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
19000         128 bits.
19002         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
19003         variables.
19005         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
19006         return value.
19008 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19010         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
19011         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
19013 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19015         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
19016         different rtl trees depending on TARGET_64BIT.
19017         (rs6000_gen_lvx): Likewise.
19019 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
19021         * config/visium/visium.md (nop): Tweak comment.
19022         (hazard_nop): Likewise.
19024 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19026         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
19027         -mspeculate-indirect-jumps.
19028         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
19029         for -mno-speculate-indirect-jumps.
19030         (*call_indirect_elfv2<mode>_nospec): New define_insn.
19031         (*call_value_indirect_elfv2<mode>): Disable for
19032         -mno-speculate-indirect-jumps.
19033         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
19034         (indirect_jump): Emit different RTL for
19035         -mno-speculate-indirect-jumps.
19036         (*indirect_jump<mode>): Disable for
19037         -mno-speculate-indirect-jumps.
19038         (*indirect_jump<mode>_nospec): New define_insn.
19039         (tablejump): Emit different RTL for
19040         -mno-speculate-indirect-jumps.
19041         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
19042         (tablejumpsi_nospec): New define_expand.
19043         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19044         (tablejumpdi_nospec): New define_expand.
19045         (*tablejump<mode>_internal1): Disable for
19046         -mno-speculate-indirect-jumps.
19047         (*tablejump<mode>_internal1_nospec): New define_insn.
19048         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19049         option.
19051 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19053         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19054         callers updated.
19056 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19057             Richard Biener  <rguenth@suse.de>
19059         PR libgomp/83590
19060         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19061         return early, inline manually is_gimple_sizepos.  Make sure if we
19062         call gimplify_expr we don't end up with a gimple constant.
19063         * tree.c (variably_modified_type_p): Don't return true for
19064         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19065         * gimplify.h (is_gimple_sizepos): Remove.
19067 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19069         PR tree-optimization/83857
19070         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19071         vectorizable_live_operation for pure SLP statements.
19072         (vectorizable_live_operation): Handle PHIs.
19074 2018-01-16  Richard Biener  <rguenther@suse.de>
19076         PR tree-optimization/83867
19077         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19078         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19080 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19082         PR c/83844
19083         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19084         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19085         If off is not INTEGER_CST, issue a may not be aligned warning
19086         rather than isn't aligned.  Use isn%'t rather than isn't.
19087         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19088         into MULT_EXPR.
19089         <case MULT_EXPR>: Improve the case when bottom and one of the
19090         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19091         operand, in that case check if the other operand is multiple of
19092         bottom divided by the INTEGER_CST operand.
19094 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19096         PR target/83858
19097         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19098         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19099         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19100         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19101         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19102         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19103         (pa_function_arg_size): New function.
19105 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19107         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19108         in a separate statement.
19110 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19112         PR tree-optimization/83847
19113         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19114         group gathers and scatters.
19116 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19118         PR rtl-optimization/86620
19119         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19121         PR rtl-optimization/83213
19122         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19123         to last if both are JUMP_INSNs.
19125         PR tree-optimization/83843
19126         * gimple-ssa-store-merging.c
19127         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19128         store_immediate_info for bswap/nop orig_stores.
19130 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19132         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19133         !TARGET_MUL.
19134         <UDIV>: Increase cost if !TARGET_DIV.
19136 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19138         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19139         (define_attr "cr_logical_3op"): New.
19140         (cceq_ior_compare): Adjust.
19141         (cceq_ior_compare_complement): Adjust.
19142         (*cceq_rev_compare): Adjust.
19143         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19144         (is_cracked_insn): Adjust.
19145         (insn_must_be_first_in_group): Adjust.
19146         * config/rs6000/40x.md: Adjust.
19147         * config/rs6000/440.md: Adjust.
19148         * config/rs6000/476.md: Adjust.
19149         * config/rs6000/601.md: Adjust.
19150         * config/rs6000/603.md: Adjust.
19151         * config/rs6000/6xx.md: Adjust.
19152         * config/rs6000/7450.md: Adjust.
19153         * config/rs6000/7xx.md: Adjust.
19154         * config/rs6000/8540.md: Adjust.
19155         * config/rs6000/cell.md: Adjust.
19156         * config/rs6000/e300c2c3.md: Adjust.
19157         * config/rs6000/e500mc.md: Adjust.
19158         * config/rs6000/e500mc64.md: Adjust.
19159         * config/rs6000/e5500.md: Adjust.
19160         * config/rs6000/e6500.md: Adjust.
19161         * config/rs6000/mpc.md: Adjust.
19162         * config/rs6000/power4.md: Adjust.
19163         * config/rs6000/power5.md: Adjust.
19164         * config/rs6000/power6.md: Adjust.
19165         * config/rs6000/power7.md: Adjust.
19166         * config/rs6000/power8.md: Adjust.
19167         * config/rs6000/power9.md: Adjust.
19168         * config/rs6000/rs64.md: Adjust.
19169         * config/rs6000/titan.md: Adjust.
19171 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19173         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19174         ix86_indirect_branch_register logic.
19176 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19178         * config/i386/constraints.md (Bs): Update
19179         ix86_indirect_branch_register check.  Don't check
19180         ix86_indirect_branch_register with GOT_memory_operand.
19181         (Bw): Likewise.
19182         * config/i386/predicates.md (GOT_memory_operand): Don't check
19183         ix86_indirect_branch_register here.
19184         (GOT32_symbol_operand): Likewise.
19186 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19188         * config/i386/predicates.md (constant_call_address_operand):
19189         Rewrite ix86_indirect_branch_register logic.
19190         (sibcall_insn_operand): Likewise.
19192 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19194         * config/i386/constraints.md (Bs): Replace
19195         ix86_indirect_branch_thunk_register with
19196         ix86_indirect_branch_register.
19197         (Bw): Likewise.
19198         * config/i386/i386.md (indirect_jump): Likewise.
19199         (tablejump): Likewise.
19200         (*sibcall_memory): Likewise.
19201         (*sibcall_value_memory): Likewise.
19202         Peepholes of indirect call and jump via memory: Likewise.
19203         * config/i386/i386.opt: Likewise.
19204         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19205         (GOT_memory_operand): Likewise.
19206         (call_insn_operand): Likewise.
19207         (sibcall_insn_operand): Likewise.
19208         (GOT32_symbol_operand): Likewise.
19210 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19212         PR middle-end/83837
19213         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19214         type rather than type addr's type points to.
19215         (expand_omp_atomic_mutex): Likewise.
19216         (expand_omp_atomic): Likewise.
19218 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19220         PR target/83839
19221         * config/i386/i386.c (output_indirect_thunk_function): Use
19222         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19223         for  __x86_return_thunk.
19225 2018-01-15  Richard Biener  <rguenther@suse.de>
19227         PR middle-end/83850
19228         * expmed.c (extract_bit_field_1): Fix typo.
19230 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19232         PR target/83687
19233         * config/arm/iterators.md (VF): New mode iterator.
19234         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19235         Remove integer-related logic from pattern.
19236         (neon_vabd<mode>_3): Likewise.
19238 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19240         PR middle-end/82694
19241         * common.opt (fstrict-overflow): No longer an alias.
19242         (fwrapv-pointer): New option.
19243         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19244         also for pointer types based on flag_wrapv_pointer.
19245         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19246         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19247         opts->x_flag_wrapv got set.
19248         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19249         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19250         POINTER_TYPE_OVERFLOW_UNDEFINED.
19251         * match.pd: Likewise in address comparison pattern.
19252         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19254 2018-01-15  Richard Biener  <rguenther@suse.de>
19256         PR lto/83804
19257         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19258         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19259         Reset type names to their identifier if their TYPE_DECL doesn't
19260         have linkage (and thus is used for ODR and devirt).
19261         (save_debug_info_for_decl): Remove.
19262         (save_debug_info_for_type): Likewise.
19263         (add_tree_to_fld_list): Adjust.
19264         * tree-pretty-print.c (dump_generic_node): Make dumping of
19265         type names more robust.
19267 2018-01-15  Richard Biener  <rguenther@suse.de>
19269         * BASE-VER: Bump to 8.0.1.
19271 2018-01-14  Martin Sebor  <msebor@redhat.com>
19273         PR other/83508
19274         * builtins.c (check_access): Avoid warning when the no-warning bit
19275         is set.
19277 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19279         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19280         * ira-color (allocno_hard_regs_compare): Likewise.
19282 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19284         PR target/83013
19285         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19286         Use .pushsection/.popsection.
19288 2018-01-14  Martin Sebor  <msebor@redhat.com>
19290         PR c++/81327
19291         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19293 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19295         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19296         entry from extra_headers.
19297         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19298         extra_headers, make the list bitwise identical to the i?86-*-* one.
19300 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19302         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19303         -mcmodel=large with -mindirect-branch=thunk,
19304         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19305         -mfunction-return=thunk-extern.
19306         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19307         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19308         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19310 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19312         * config/i386/i386.c (print_reg): Print the name of the full
19313         integer register without '%'.
19314         (ix86_print_operand): Handle 'V'.
19315         * doc/extend.texi: Document 'V' modifier.
19317 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19319         * config/i386/constraints.md (Bs): Disallow memory operand for
19320         -mindirect-branch-register.
19321         (Bw): Likewise.
19322         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19323         (GOT_memory_operand): Likewise.
19324         (call_insn_operand): Likewise.
19325         (sibcall_insn_operand): Likewise.
19326         (GOT32_symbol_operand): Likewise.
19327         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19328         for -mindirect-branch-register.
19329         (tablejump): Likewise.
19330         (*sibcall_memory): Likewise.
19331         (*sibcall_value_memory): Likewise.
19332         Disallow peepholes of indirect call and jump via memory for
19333         -mindirect-branch-register.
19334         (*call_pop): Replace m with Bw.
19335         (*call_value_pop): Likewise.
19336         (*sibcall_pop_memory): Replace m with Bs.
19337         * config/i386/i386.opt (mindirect-branch-register): New option.
19338         * doc/invoke.texi: Document -mindirect-branch-register option.
19340 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19342         * config/i386/i386-protos.h (ix86_output_function_return): New.
19343         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19344         set function_return_type.
19345         (indirect_thunk_name): Add ret_p to indicate thunk for function
19346         return.
19347         (output_indirect_thunk_function): Pass false to
19348         indirect_thunk_name.
19349         (ix86_output_indirect_branch_via_reg): Likewise.
19350         (ix86_output_indirect_branch_via_push): Likewise.
19351         (output_indirect_thunk_function): Create alias for function
19352         return thunk if regno < 0.
19353         (ix86_output_function_return): New function.
19354         (ix86_handle_fndecl_attribute): Handle function_return.
19355         (ix86_attribute_table): Add function_return.
19356         * config/i386/i386.h (machine_function): Add
19357         function_return_type.
19358         * config/i386/i386.md (simple_return_internal): Use
19359         ix86_output_function_return.
19360         (simple_return_internal_long): Likewise.
19361         * config/i386/i386.opt (mfunction-return=): New option.
19362         (indirect_branch): Mention -mfunction-return=.
19363         * doc/extend.texi: Document function_return function attribute.
19364         * doc/invoke.texi: Document -mfunction-return= option.
19366 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19368         * config/i386/i386-opts.h (indirect_branch): New.
19369         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19370         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19371         with local indirect jump when converting indirect call and jump.
19372         (ix86_set_indirect_branch_type): New.
19373         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19374         (indirectlabelno): New.
19375         (indirect_thunk_needed): Likewise.
19376         (indirect_thunk_bnd_needed): Likewise.
19377         (indirect_thunks_used): Likewise.
19378         (indirect_thunks_bnd_used): Likewise.
19379         (INDIRECT_LABEL): Likewise.
19380         (indirect_thunk_name): Likewise.
19381         (output_indirect_thunk): Likewise.
19382         (output_indirect_thunk_function): Likewise.
19383         (ix86_output_indirect_branch_via_reg): Likewise.
19384         (ix86_output_indirect_branch_via_push): Likewise.
19385         (ix86_output_indirect_branch): Likewise.
19386         (ix86_output_indirect_jmp): Likewise.
19387         (ix86_code_end): Call output_indirect_thunk_function if needed.
19388         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19389         needed.
19390         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19391         (ix86_attribute_table): Add indirect_branch.
19392         * config/i386/i386.h (machine_function): Add indirect_branch_type
19393         and has_local_indirect_jump.
19394         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19395         to true.
19396         (tablejump): Likewise.
19397         (*indirect_jump): Use ix86_output_indirect_jmp.
19398         (*tablejump_1): Likewise.
19399         (simple_return_indirect_internal): Likewise.
19400         * config/i386/i386.opt (mindirect-branch=): New option.
19401         (indirect_branch): New.
19402         (keep): Likewise.
19403         (thunk): Likewise.
19404         (thunk-inline): Likewise.
19405         (thunk-extern): Likewise.
19406         * doc/extend.texi: Document indirect_branch function attribute.
19407         * doc/invoke.texi: Document -mindirect-branch= option.
19409 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19411         PR ipa/83051
19412         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19414 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19416         * ipa-inline.c (want_inline_small_function_p): Return false if
19417         inlining has already failed with CIF_FINAL_ERROR.
19418         (update_caller_keys): Call want_inline_small_function_p before
19419         can_inline_edge_p.
19420         (update_callee_keys): Likewise.
19422 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19424         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19425         New function.
19426         (rs6000_quadword_masked_address_p): Likewise.
19427         (quad_aligned_load_p): Likewise.
19428         (quad_aligned_store_p): Likewise.
19429         (const_load_sequence_p): Add comment to describe the outer-most loop.
19430         (mimic_memory_attributes_and_flags): New function.
19431         (rs6000_gen_stvx): Likewise.
19432         (replace_swapped_aligned_store): Likewise.
19433         (rs6000_gen_lvx): Likewise.
19434         (replace_swapped_aligned_load): Likewise.
19435         (replace_swapped_load_constant): Capitalize argument name in
19436         comment describing this function.
19437         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19438         and stores that access quad-word aligned addresses and replace
19439         with stvx or lvx instructions when appropriate.
19440         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19441         New function prototype.
19442         (rs6000_quadword_masked_address_p): Likewise.
19443         (rs6000_gen_lvx): Likewise.
19444         (rs6000_gen_stvx): Likewise.
19445         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19446         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19447         when memory address is aligned.
19448         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19449         this split to select lvx instruction when memory address is aligned.
19450         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19451         instruction when memory address is aligned.
19452         (*vsx_le_perm_load_v16qi): Likewise.
19453         (four unnamed splitters): Modify to select the stvx instruction
19454         when memory is aligned.
19456 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19458         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19459         which appears in the queue multiple times.
19461 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19462             Alan Hayward  <alan.hayward@arm.com>
19463             David Sherwood  <david.sherwood@arm.com>
19465         * tree-vectorizer.h (vec_lower_bound): New structure.
19466         (_loop_vec_info): Add check_nonzero and lower_bounds.
19467         (LOOP_VINFO_CHECK_NONZERO): New macro.
19468         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19469         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19470         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19471         fields.  Make seg_len the distance travelled, not including the
19472         access size.
19473         (dr_direction_indicator): Declare.
19474         (dr_zero_step_indicator): Likewise.
19475         (dr_known_forward_stride_p): Likewise.
19476         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19477         tree-ssanames.h.
19478         (runtime_alias_check_p): Allow runtime alias checks with
19479         variable strides.
19480         (operator ==): Compare access_size and align.
19481         (prune_runtime_alias_test_list): Rework for new distinction between
19482         the access_size and seg_len.
19483         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19484         segment lengths.
19485         (get_segment_min_max): New function.
19486         (create_intersect_range_checks): Use it.
19487         (dr_step_indicator): New function.
19488         (dr_direction_indicator): Likewise.
19489         (dr_zero_step_indicator): Likewise.
19490         (dr_known_forward_stride_p): Likewise.
19491         * tree-loop-distribution.c (data_ref_segment_size): Return
19492         DR_STEP * (niters - 1).
19493         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19494         constructor.
19495         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19496         (vect_preserves_scalar_order_p): New function, split out from...
19497         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19498         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19499         (vect_vfa_access_size): New function.
19500         (vect_vfa_align): Likewise.
19501         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19502         (dump_lower_bound): New function.
19503         (vect_check_lower_bound): Likewise.
19504         (vect_small_gap_p): Likewise.
19505         (vectorizable_with_step_bound_p): Likewise.
19506         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19507         depencies if the vectorization factor is 1.  Convert the checks
19508         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19509         a bunds check for variable steps if the minimum required step is
19510         relatively small. Update calls to the dr_with_seg_len
19511         constructor and to vect_compile_time_alias.
19512         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19513         function.
19514         (vect_loop_versioning): Call it.
19515         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19516         when retrying.
19517         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19519 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19520             Alan Hayward  <alan.hayward@arm.com>
19521             David Sherwood  <david.sherwood@arm.com>
19523         * doc/sourcebuild.texi (vect_scatter_store): Document.
19524         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19525         optabs.
19526         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19527         Document.
19528         * genopinit.c (main): Add supports_vec_scatter_store and
19529         supports_vec_scatter_store_cached to target_optabs.
19530         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19531         IFN_MASK_SCATTER_STORE.
19532         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19533         functions.
19534         * internal-fn.h (internal_store_fn_p): Declare.
19535         (internal_fn_stored_value_index): Likewise.
19536         * internal-fn.c (scatter_store_direct): New macro.
19537         (expand_scatter_store_optab_fn): New function.
19538         (direct_scatter_store_optab_supported_p): New macro.
19539         (internal_store_fn_p): New function.
19540         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19541         IFN_MASK_SCATTER_STORE.
19542         (internal_fn_mask_index): Likewise.
19543         (internal_fn_stored_value_index): New function.
19544         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19545         for scatter stores.
19546         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19547         * optabs-query.c (supports_vec_scatter_store_p): New function.
19548         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19549         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19550         true for scatter stores.
19551         (vect_gather_scatter_fn_p): Handle scatter stores too.
19552         (vect_check_gather_scatter): Consider using scatter stores if
19553         supports_vec_scatter_store_p.
19554         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19555         scatter stores too.
19556         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19557         internal_fn_stored_value_index.
19558         (check_load_store_masking): Handle scatter stores too.
19559         (vect_get_store_rhs): Make public.
19560         (vectorizable_call): Use internal_store_fn_p.
19561         (vectorizable_store): Handle scatter store internal functions.
19562         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19563         when deciding whether the end of the group has been reached.
19564         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19565         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19566         (mask_scatter_store<mode>): New insns.
19568 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19569             Alan Hayward  <alan.hayward@arm.com>
19570             David Sherwood  <david.sherwood@arm.com>
19572         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19573         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19574         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19575         function.
19576         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19577         Use vect_truncate_gather_scatter_offset if we can't treat the
19578         operation as a normal gather load or scatter store.
19579         (get_group_load_store_type): Take the gather_scatter_info
19580         as argument.  Try using a gather load or scatter store for
19581         single-element groups.
19582         (get_load_store_type): Update calls to get_group_load_store_type
19583         and vect_use_strided_gather_scatters_p.
19585 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19586             Alan Hayward  <alan.hayward@arm.com>
19587             David Sherwood  <david.sherwood@arm.com>
19589         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19590         optional tree argument.
19591         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19592         null target hooks.
19593         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19594         but continue to use the current value as a fallback.
19595         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19596         to compare the updates.
19597         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19598         (get_load_store_type): Use it when handling a strided access.
19599         (vect_get_strided_load_store_ops): New function.
19600         (vect_get_data_ptr_increment): Likewise.
19601         (vectorizable_load): Handle strided gather loads.  Always pass
19602         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19605             Alan Hayward  <alan.hayward@arm.com>
19606             David Sherwood  <david.sherwood@arm.com>
19608         * doc/md.texi (gather_load@var{m}): Document.
19609         (mask_gather_load@var{m}): Likewise.
19610         * genopinit.c (main): Add supports_vec_gather_load and
19611         supports_vec_gather_load_cached to target_optabs.
19612         * optabs-tree.c (init_tree_optimization_optabs): Use
19613         ggc_cleared_alloc to allocate target_optabs.
19614         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19615         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19616         functions.
19617         * internal-fn.h (internal_load_fn_p): Declare.
19618         (internal_gather_scatter_fn_p): Likewise.
19619         (internal_fn_mask_index): Likewise.
19620         (internal_gather_scatter_fn_supported_p): Likewise.
19621         * internal-fn.c (gather_load_direct): New macro.
19622         (expand_gather_load_optab_fn): New function.
19623         (direct_gather_load_optab_supported_p): New macro.
19624         (direct_internal_fn_optab): New function.
19625         (internal_load_fn_p): Likewise.
19626         (internal_gather_scatter_fn_p): Likewise.
19627         (internal_fn_mask_index): Likewise.
19628         (internal_gather_scatter_fn_supported_p): Likewise.
19629         * optabs-query.c (supports_at_least_one_mode_p): New function.
19630         (supports_vec_gather_load_p): Likewise.
19631         * optabs-query.h (supports_vec_gather_load_p): Declare.
19632         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19633         and memory_type field.
19634         (NUM_PATTERNS): Bump to 15.
19635         * tree-vect-data-refs.c: Include internal-fn.h.
19636         (vect_gather_scatter_fn_p): New function.
19637         (vect_describe_gather_scatter_call): Likewise.
19638         (vect_check_gather_scatter): Try using internal functions for
19639         gather loads.  Recognize existing calls to a gather load function.
19640         (vect_analyze_data_refs): Consider using gather loads if
19641         supports_vec_gather_load_p.
19642         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19643         (vect_get_gather_scatter_offset_type): Likewise.
19644         (vect_convert_mask_for_vectype): Likewise.
19645         (vect_add_conversion_to_patterm): Likewise.
19646         (vect_try_gather_scatter_pattern): Likewise.
19647         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19648         (vect_vect_recog_func_ptrs): Add it.
19649         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19650         internal_fn_mask_index and internal_gather_scatter_fn_p.
19651         (check_load_store_masking): Take the gather_scatter_info as an
19652         argument and handle gather loads.
19653         (vect_get_gather_scatter_ops): New function.
19654         (vectorizable_call): Check internal_load_fn_p.
19655         (vectorizable_load): Likewise.  Handle gather load internal
19656         functions.
19657         (vectorizable_store): Update call to check_load_store_masking.
19658         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19659         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19660         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19661         (aarch64_gather_scale_operand_d): New predicates.
19662         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19663         (mask_gather_load<mode>): New insns.
19665 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19666             Alan Hayward  <alan.hayward@arm.com>
19667             David Sherwood  <david.sherwood@arm.com>
19669         * optabs.def (fold_left_plus_optab): New optab.
19670         * doc/md.texi (fold_left_plus_@var{m}): Document.
19671         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19672         * internal-fn.c (fold_left_direct): Define.
19673         (expand_fold_left_optab_fn): Likewise.
19674         (direct_fold_left_optab_supported_p): Likewise.
19675         * fold-const-call.c (fold_const_fold_left): New function.
19676         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19677         * tree-parloops.c (valid_reduction_p): New function.
19678         (gather_scalar_reductions): Use it.
19679         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19680         (vect_finish_replace_stmt): Declare.
19681         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19682         (needs_fold_left_reduction_p): New function, split out from...
19683         (vect_is_simple_reduction): ...here.  Accept reductions that
19684         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19685         (vect_force_simple_reduction): Also store the reduction type in
19686         the assignment's STMT_VINFO_REDUC_TYPE.
19687         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19688         (merge_with_identity): New function.
19689         (vect_expand_fold_left): Likewise.
19690         (vectorize_fold_left_reduction): Likewise.
19691         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19692         scalar phi in place for it.  Check for target support and reject
19693         cases that would reassociate the operation.  Defer the transform
19694         phase to vectorize_fold_left_reduction.
19695         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19696         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19697         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19699 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19701         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19702         call to ifc_temp_var.
19704 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19705             Alan Hayward  <alan.hayward@arm.com>
19706             David Sherwood  <david.sherwood@arm.com>
19708         * target.def (legitimize_address_displacement): Take the original
19709         offset as a poly_int.
19710         * targhooks.h (default_legitimize_address_displacement): Update
19711         accordingly.
19712         * targhooks.c (default_legitimize_address_displacement): Likewise.
19713         * doc/tm.texi: Regenerate.
19714         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19715         as an argument, moving assert of ad->disp == ad->disp_term to...
19716         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19717         Try calling targetm.legitimize_address_displacement before expanding
19718         the address rather than afterwards, and adjust for the new interface.
19719         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19720         Match the new hook interface.  Handle SVE addresses.
19721         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19722         new hook interface.
19724 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19726         * Makefile.in (OBJS): Add early-remat.o.
19727         * target.def (select_early_remat_modes): New hook.
19728         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19729         * doc/tm.texi: Regenerate.
19730         * targhooks.h (default_select_early_remat_modes): Declare.
19731         * targhooks.c (default_select_early_remat_modes): New function.
19732         * timevar.def (TV_EARLY_REMAT): New timevar.
19733         * passes.def (pass_early_remat): New pass.
19734         * tree-pass.h (make_pass_early_remat): Declare.
19735         * early-remat.c: New file.
19736         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19737         function.
19738         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19740 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19741             Alan Hayward  <alan.hayward@arm.com>
19742             David Sherwood  <david.sherwood@arm.com>
19744         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19745         vfm1 with a bound_epilog parameter.
19746         (vect_do_peeling): Update calls accordingly, and move the prologue
19747         call earlier in the function.  Treat the base bound_epilog as 0 for
19748         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19749         this base when peeling for gaps.
19750         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19751         with fully-masked loops.
19752         (vect_estimate_min_profitable_iters): Handle the single peeled
19753         iteration in that case.
19755 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19756             Alan Hayward  <alan.hayward@arm.com>
19757             David Sherwood  <david.sherwood@arm.com>
19759         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19760         single-element interleaving even if the size is not a power of 2.
19761         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19762         accesses for single-element interleaving if the group size is
19763         not a power of 2.
19765 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19766             Alan Hayward  <alan.hayward@arm.com>
19767             David Sherwood  <david.sherwood@arm.com>
19769         * doc/md.texi (fold_extract_last_@var{m}): Document.
19770         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19771         * optabs.def (fold_extract_last_optab): New optab.
19772         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19773         * internal-fn.c (fold_extract_direct): New macro.
19774         (expand_fold_extract_optab_fn): Likewise.
19775         (direct_fold_extract_optab_supported_p): Likewise.
19776         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19777         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19778         EXTRACT_LAST_REDUCTION.
19779         (get_initial_def_for_reduction): Do not create an initial vector
19780         for EXTRACT_LAST_REDUCTION reductions.
19781         (vectorizable_reduction): Leave the scalar phi in place for
19782         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19783         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19784         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19785         transform phase to vectorizable_condition.
19786         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19787         split out from...
19788         (vect_finish_stmt_generation): ...here.
19789         (vect_finish_replace_stmt): New function.
19790         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19791         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19792         pattern.
19793         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19795 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19796             Alan Hayward  <alan.hayward@arm.com>
19797             David Sherwood  <david.sherwood@arm.com>
19799         * doc/md.texi (extract_last_@var{m}): Document.
19800         * optabs.def (extract_last_optab): New optab.
19801         * internal-fn.def (EXTRACT_LAST): New internal function.
19802         * internal-fn.c (cond_unary_direct): New macro.
19803         (expand_cond_unary_optab_fn): Likewise.
19804         (direct_cond_unary_optab_supported_p): Likewise.
19805         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19806         loops using EXTRACT_LAST.
19807         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19808         (extract_last_<mode>): ...this optab.
19809         (vec_extract<mode><Vel>): Update accordingly.
19811 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19812             Alan Hayward  <alan.hayward@arm.com>
19813             David Sherwood  <david.sherwood@arm.com>
19815         * target.def (empty_mask_is_expensive): New hook.
19816         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19817         * doc/tm.texi: Regenerate.
19818         * targhooks.h (default_empty_mask_is_expensive): Declare.
19819         * targhooks.c (default_empty_mask_is_expensive): New function.
19820         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19821         if the target says that empty masks are expensive.
19822         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19823         New function.
19824         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19826 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19827             Alan Hayward  <alan.hayward@arm.com>
19828             David Sherwood  <david.sherwood@arm.com>
19830         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19831         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19832         (vect_use_loop_mask_for_alignment_p): New function.
19833         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19834         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19835         niters_skip argument.  Make sure that the first niters_skip elements
19836         of the first iteration are inactive.
19837         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19838         Update call to vect_set_loop_masks_directly.
19839         (get_misalign_in_elems): New function, split out from...
19840         (vect_gen_prolog_loop_niters): ...here.
19841         (vect_update_init_of_dr): Take a code argument that specifies whether
19842         the adjustment should be added or subtracted.
19843         (vect_update_init_of_drs): Likewise.
19844         (vect_prepare_for_masked_peels): New function.
19845         (vect_do_peeling): Skip prologue peeling if we're using a mask
19846         instead.  Update call to vect_update_inits_of_drs.
19847         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19848         mask_skip_niters.
19849         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19850         alignment.  Do not include the number of peeled iterations in
19851         the minimum threshold in that case.
19852         (vectorizable_induction): Adjust the start value down by
19853         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19854         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19855         Take the number of skipped iterations into account when calculating
19856         the loop bounds.
19857         * tree-vect-stmts.c (vect_gen_while_not): New function.
19859 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19860             Alan Hayward  <alan.hayward@arm.com>
19861             David Sherwood  <david.sherwood@arm.com>
19863         * doc/sourcebuild.texi (vect_fully_masked): Document.
19864         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19865         default value to 0.
19866         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19867         split out from...
19868         (vect_analyze_loop_2): ...here. Don't check the vectorization
19869         factor against the number of loop iterations if the loop is
19870         fully-masked.
19872 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19873             Alan Hayward  <alan.hayward@arm.com>
19874             David Sherwood  <david.sherwood@arm.com>
19876         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19877         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19878         (dump_groups): Update accordingly.
19879         (iv_use::mem_type): New member variable.
19880         (address_p): New function.
19881         (record_use): Add a mem_type argument and initialize the new
19882         mem_type field.
19883         (record_group_use): Add a mem_type argument.  Use address_p.
19884         Remove obsolete null checks of base_object.  Update call to record_use.
19885         (find_interesting_uses_op): Update call to record_group_use.
19886         (find_interesting_uses_cond): Likewise.
19887         (find_interesting_uses_address): Likewise.
19888         (get_mem_type_for_internal_fn): New function.
19889         (find_address_like_use): Likewise.
19890         (find_interesting_uses_stmt): Try find_address_like_use before
19891         calling find_interesting_uses_op.
19892         (addr_offset_valid_p): Use the iv mem_type field as the type
19893         of the addressed memory.
19894         (add_autoinc_candidates): Likewise.
19895         (get_address_cost): Likewise.
19896         (split_small_address_groups_p): Use address_p.
19897         (split_address_groups): Likewise.
19898         (add_iv_candidate_for_use): Likewise.
19899         (autoinc_possible_for_pair): Likewise.
19900         (rewrite_groups): Likewise.
19901         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19902         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19903         (get_alias_ptr_type_for_ptr_address): New function.
19904         (rewrite_use_address): Rewrite address uses in calls that were
19905         identified by find_address_like_use.
19907 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19908             Alan Hayward  <alan.hayward@arm.com>
19909             David Sherwood  <david.sherwood@arm.com>
19911         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19912         TARGET_MEM_REFs.
19913         * gimple-expr.h (is_gimple_addressable: Likewise.
19914         * gimple-expr.c (is_gimple_address): Likewise.
19915         * internal-fn.c (expand_call_mem_ref): New function.
19916         (expand_mask_load_optab_fn): Use it.
19917         (expand_mask_store_optab_fn): Likewise.
19919 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19920             Alan Hayward  <alan.hayward@arm.com>
19921             David Sherwood  <david.sherwood@arm.com>
19923         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19924         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19925         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19926         (cond_umax@var{mode}): Document.
19927         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19928         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19929         (cond_umin_optab, cond_umax_optab): New optabs.
19930         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19931         (COND_IOR, COND_XOR): New internal functions.
19932         * internal-fn.h (get_conditional_internal_fn): Declare.
19933         * internal-fn.c (cond_binary_direct): New macro.
19934         (expand_cond_binary_optab_fn): Likewise.
19935         (direct_cond_binary_optab_supported_p): Likewise.
19936         (get_conditional_internal_fn): New function.
19937         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19938         Cope with reduction statements that are vectorized as calls rather
19939         than assignments.
19940         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19941         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19942         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19943         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19944         (UNSPEC_COND_EOR): New unspecs.
19945         (optab): Add mappings for them.
19946         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19947         (sve_int_op, sve_fp_op): New int attributes.
19949 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19950             Alan Hayward  <alan.hayward@arm.com>
19951             David Sherwood  <david.sherwood@arm.com>
19953         * optabs.def (while_ult_optab): New optab.
19954         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19955         * internal-fn.def (WHILE_ULT): New internal function.
19956         * internal-fn.h (direct_internal_fn_supported_p): New override
19957         that takes two types as argument.
19958         * internal-fn.c (while_direct): New macro.
19959         (expand_while_optab_fn): New function.
19960         (convert_optab_supported_p): Likewise.
19961         (direct_while_optab_supported_p): New macro.
19962         * wide-int.h (wi::udiv_ceil): New function.
19963         * tree-vectorizer.h (rgroup_masks): New structure.
19964         (vec_loop_masks): New typedef.
19965         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19966         and fully_masked_p.
19967         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19968         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19969         (vect_max_vf): New function.
19970         (slpeel_make_loop_iterate_ntimes): Delete.
19971         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19972         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19973         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19974         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19975         internal-fn.h, stor-layout.h and optabs-query.h.
19976         (vect_set_loop_mask): New function.
19977         (add_preheader_seq): Likewise.
19978         (add_header_seq): Likewise.
19979         (interleave_supported_p): Likewise.
19980         (vect_maybe_permute_loop_masks): Likewise.
19981         (vect_set_loop_masks_directly): Likewise.
19982         (vect_set_loop_condition_masked): Likewise.
19983         (vect_set_loop_condition_unmasked): New function, split out from
19984         slpeel_make_loop_iterate_ntimes.
19985         (slpeel_make_loop_iterate_ntimes): Rename to..
19986         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19987         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19988         (vect_do_peeling): Update call accordingly.
19989         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19990         loops.
19991         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19992         mask_compare_type, can_fully_mask_p and fully_masked_p.
19993         (release_vec_loop_masks): New function.
19994         (_loop_vec_info): Use it to free the loop masks.
19995         (can_produce_all_loop_masks_p): New function.
19996         (vect_get_max_nscalars_per_iter): Likewise.
19997         (vect_verify_full_masking): Likewise.
19998         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19999         retries, and free the mask rgroups before retrying.  Check loop-wide
20000         reasons for disallowing fully-masked loops.  Make the final decision
20001         about whether use a fully-masked loop or not.
20002         (vect_estimate_min_profitable_iters): Do not assume that peeling
20003         for the number of iterations will be needed for fully-masked loops.
20004         (vectorizable_reduction): Disable fully-masked loops.
20005         (vectorizable_live_operation): Likewise.
20006         (vect_halve_mask_nunits): New function.
20007         (vect_double_mask_nunits): Likewise.
20008         (vect_record_loop_mask): Likewise.
20009         (vect_get_loop_mask): Likewise.
20010         (vect_transform_loop): Handle the case in which the final loop
20011         iteration might handle a partial vector.  Call vect_set_loop_condition
20012         instead of slpeel_make_loop_iterate_ntimes.
20013         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
20014         (check_load_store_masking): New function.
20015         (prepare_load_store_mask): Likewise.
20016         (vectorizable_store): Handle fully-masked loops.
20017         (vectorizable_load): Likewise.
20018         (supportable_widening_operation): Use vect_halve_mask_nunits for
20019         booleans.
20020         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
20021         (vect_gen_while): New function.
20022         * config/aarch64/aarch64.md (umax<mode>3): New expander.
20023         (aarch64_uqdec<mode>): New insn.
20025 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20026             Alan Hayward  <alan.hayward@arm.com>
20027             David Sherwood  <david.sherwood@arm.com>
20029         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
20030         (reduc_xor_scal_optab): New optabs.
20031         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
20032         (reduc_xor_scal_@var{m}): Document.
20033         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
20034         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
20035         internal functions.
20036         * fold-const-call.c (fold_const_call): Handle them.
20037         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
20038         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
20039         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
20040         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
20041         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
20042         (UNSPEC_XORV): New unspecs.
20043         (optab): Add entries for them.
20044         (BITWISEV): New int iterator.
20045         (bit_reduc_op): New int attributes.
20047 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20048             Alan Hayward  <alan.hayward@arm.com>
20049             David Sherwood  <david.sherwood@arm.com>
20051         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20052         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20053         * optabs.def (vec_shl_insert_optab): New optab.
20054         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20055         (duplicate_and_interleave): Likewise.
20056         * tree-vect-loop.c: Include internal-fn.h.
20057         (neutral_op_for_slp_reduction): New function, split out from
20058         get_initial_defs_for_reduction.
20059         (get_initial_def_for_reduction): Handle option 2 for variable-length
20060         vectors by loading the neutral value into a vector and then shifting
20061         the initial value into element 0.
20062         (get_initial_defs_for_reduction): Replace the code argument with
20063         the neutral value calculated by neutral_op_for_slp_reduction.
20064         Use gimple_build_vector for constant-length vectors.
20065         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20066         but the first group_size elements have a neutral value.
20067         Use duplicate_and_interleave otherwise.
20068         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20069         Update call to get_initial_defs_for_reduction.  Handle SLP
20070         reductions for variable-length vectors by creating one vector
20071         result for each scalar result, with the elements associated
20072         with other scalar results stubbed out with the neutral value.
20073         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20074         Require IFN_VEC_SHL_INSERT for double reductions on
20075         variable-length vectors, or SLP reductions that have
20076         a neutral value.  Require can_duplicate_and_interleave_p
20077         support for variable-length unchained SLP reductions if there
20078         is no neutral value, such as for MIN/MAX reductions.  Also require
20079         the number of vector elements to be a multiple of the number of
20080         SLP statements when doing variable-length unchained SLP reductions.
20081         Update call to vect_create_epilog_for_reduction.
20082         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20083         and remove initial values.
20084         (duplicate_and_interleave): Make public.
20085         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20086         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20088 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20089             Alan Hayward  <alan.hayward@arm.com>
20090             David Sherwood  <david.sherwood@arm.com>
20092         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20093         (can_duplicate_and_interleave_p): New function.
20094         (vect_get_and_check_slp_defs): Take the vector of statements
20095         rather than just the current one.  Remove excess parentheses.
20096         Restriction rejectinon of vect_constant_def and vect_external_def
20097         for variable-length vectors to boolean types, or types for which
20098         can_duplicate_and_interleave_p is false.
20099         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20100         (duplicate_and_interleave): New function.
20101         (vect_get_constant_vectors): Use gimple_build_vector for
20102         constant-length vectors and suitable variable-length constant
20103         vectors.  Use duplicate_and_interleave for other variable-length
20104         vectors.  Don't defer the update when inserting new statements.
20106 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20107             Alan Hayward  <alan.hayward@arm.com>
20108             David Sherwood  <david.sherwood@arm.com>
20110         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20111         min_profitable_iters doesn't go negative.
20113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20114             Alan Hayward  <alan.hayward@arm.com>
20115             David Sherwood  <david.sherwood@arm.com>
20117         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20118         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20119         * optabs.def (vec_mask_load_lanes_optab): New optab.
20120         (vec_mask_store_lanes_optab): Likewise.
20121         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20122         (MASK_STORE_LANES): Likewise.
20123         * internal-fn.c (mask_load_lanes_direct): New macro.
20124         (mask_store_lanes_direct): Likewise.
20125         (expand_mask_load_optab_fn): Handle masked operations.
20126         (expand_mask_load_lanes_optab_fn): New macro.
20127         (expand_mask_store_optab_fn): Handle masked operations.
20128         (expand_mask_store_lanes_optab_fn): New macro.
20129         (direct_mask_load_lanes_optab_supported_p): Likewise.
20130         (direct_mask_store_lanes_optab_supported_p): Likewise.
20131         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20132         parameter.
20133         (vect_load_lanes_supported): Likewise.
20134         * tree-vect-data-refs.c (strip_conversion): New function.
20135         (can_group_stmts_p): Likewise.
20136         (vect_analyze_data_ref_accesses): Use it instead of checking
20137         for a pair of assignments.
20138         (vect_store_lanes_supported): Take a masked_p parameter.
20139         (vect_load_lanes_supported): Likewise.
20140         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20141         vect_store_lanes_supported and vect_load_lanes_supported.
20142         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20143         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20144         parameter.  Don't allow gaps for masked accesses.
20145         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20146         and vect_load_lanes_supported.
20147         (get_load_store_type): Take a masked_p parameter and update
20148         call to get_group_load_store_type.
20149         (vectorizable_store): Update call to get_load_store_type.
20150         Handle IFN_MASK_STORE_LANES.
20151         (vectorizable_load): Update call to get_load_store_type.
20152         Handle IFN_MASK_LOAD_LANES.
20154 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20155             Alan Hayward  <alan.hayward@arm.com>
20156             David Sherwood  <david.sherwood@arm.com>
20158         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20159         modes for SVE.
20160         * config/aarch64/aarch64-protos.h
20161         (aarch64_sve_struct_memory_operand_p): Declare.
20162         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20163         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20164         (VPRED, vpred): Handle SVE structure modes.
20165         * config/aarch64/constraints.md (Utx): New constraint.
20166         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20167         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20168         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20169         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20170         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20171         structure modes.  Split into pieces after RA.
20172         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20173         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20174         New patterns.
20175         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20176         SVE structure modes.
20177         (aarch64_classify_address): Likewise.
20178         (sizetochar): Move earlier in file.
20179         (aarch64_print_operand): Handle SVE register lists.
20180         (aarch64_array_mode): New function.
20181         (aarch64_sve_struct_memory_operand_p): Likewise.
20182         (TARGET_ARRAY_MODE): Redefine.
20184 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20185             Alan Hayward  <alan.hayward@arm.com>
20186             David Sherwood  <david.sherwood@arm.com>
20188         * target.def (array_mode): New target hook.
20189         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20190         * doc/tm.texi: Regenerate.
20191         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20192         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20193         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20194         targetm.array_mode.
20195         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20196         type sizes.
20198 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20199             Alan Hayward  <alan.hayward@arm.com>
20200             David Sherwood  <david.sherwood@arm.com>
20202         * fold-const.c (fold_binary_loc): Check the argument types
20203         rather than the result type when testing for a vector operation.
20205 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20207         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20208         * doc/tm.texi: Regenerate.
20210 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20211             Alan Hayward  <alan.hayward@arm.com>
20212             David Sherwood  <david.sherwood@arm.com>
20214         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20215         (sve): Document new AArch64 extension.
20216         * doc/md.texi (w): Extend the description of the AArch64
20217         constraint to include SVE vectors.
20218         (Upl, Upa): Document new AArch64 predicate constraints.
20219         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20220         enum.
20221         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20222         (msve-vector-bits=): New option.
20223         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20224         SVE when these are disabled.
20225         (sve): New extension.
20226         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20227         modes.  Adjust their number of units based on aarch64_sve_vg.
20228         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20229         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20230         aarch64_addr_query_type.
20231         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20232         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20233         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20234         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20235         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20236         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20237         (aarch64_simd_imm_zero_p): Delete.
20238         (aarch64_check_zero_based_sve_index_immediate): Declare.
20239         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20240         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20241         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20242         (aarch64_sve_float_mul_immediate_p): Likewise.
20243         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20244         rather than an rtx.
20245         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20246         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20247         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20248         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20249         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20250         (aarch64_regmode_natural_size): Likewise.
20251         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20252         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20253         left one place.
20254         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20255         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20256         for VG and the SVE predicate registers.
20257         (V_ALIASES): Add a "z"-prefixed alias.
20258         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20259         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20260         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20261         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20262         (REG_CLASS_NAMES): Add entries for them.
20263         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20264         and the predicate registers.
20265         (aarch64_sve_vg): Declare.
20266         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20267         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20268         (REGMODE_NATURAL_SIZE): Define.
20269         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20270         SVE macros.
20271         * config/aarch64/aarch64.c: Include cfgrtl.h.
20272         (simd_immediate_info): Add a constructor for series vectors,
20273         and an associated step field.
20274         (aarch64_sve_vg): New variable.
20275         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20276         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20277         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20278         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20279         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20280         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20281         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20282         (aarch64_get_mask_mode): New functions.
20283         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20284         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20285         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20286         predicate modes and predicate registers.  Explicitly restrict
20287         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20288         to store a vector mode if it is recognized by
20289         aarch64_classify_vector_mode.
20290         (aarch64_regmode_natural_size): New function.
20291         (aarch64_hard_regno_caller_save_mode): Return the original mode
20292         for predicates.
20293         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20294         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20295         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20296         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20297         functions.
20298         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20299         does not overlap dest if the function is frame-related.  Handle
20300         SVE constants.
20301         (aarch64_split_add_offset): New function.
20302         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20303         them aarch64_add_offset.
20304         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20305         and update call to aarch64_sub_sp.
20306         (aarch64_add_cfa_expression): New function.
20307         (aarch64_expand_prologue): Pass extra temporary registers to the
20308         functions above.  Handle the case in which we need to emit new
20309         DW_CFA_expressions for registers that were originally saved
20310         relative to the stack pointer, but now have to be expressed
20311         relative to the frame pointer.
20312         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20313         functions above.
20314         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20315         IP0 and IP1 values for SVE frames.
20316         (aarch64_expand_vec_series): New function.
20317         (aarch64_expand_sve_widened_duplicate): Likewise.
20318         (aarch64_expand_sve_const_vector): Likewise.
20319         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20320         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20321         into the register, rather than emitting a SET directly.
20322         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20323         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20324         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20325         (offset_9bit_signed_scaled_p): New functions.
20326         (aarch64_replicate_bitmask_imm): New function.
20327         (aarch64_bitmask_imm): Use it.
20328         (aarch64_cannot_force_const_mem): Reject expressions involving
20329         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20330         (aarch64_classify_index): Handle SVE indices, by requiring
20331         a plain register index with a scale that matches the element size.
20332         (aarch64_classify_address): Handle SVE addresses.  Assert that
20333         the mode of the address is VOIDmode or an integer mode.
20334         Update call to aarch64_classify_symbol.
20335         (aarch64_classify_symbolic_expression): Update call to
20336         aarch64_classify_symbol.
20337         (aarch64_const_vec_all_in_range_p): New function.
20338         (aarch64_print_vector_float_operand): Likewise.
20339         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20340         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20341         and the FP immediates 1.0 and 0.5.
20342         (aarch64_print_address_internal): Handle SVE addresses.
20343         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20344         (aarch64_regno_regclass): Handle predicate registers.
20345         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20346         data modes.
20347         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20348         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20349         (aarch64_convert_sve_vector_bits): New function.
20350         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20351         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20352         rather than an rtx.
20353         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20354         Handle SVE vector and predicate modes.  Accept VL-based constants
20355         that need only one temporary register, and VL offsets that require
20356         no temporary registers.
20357         (aarch64_conditional_register_usage): Mark the predicate registers
20358         as fixed if SVE isn't available.
20359         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20360         Return true for SVE vector and predicate modes.
20361         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20362         rather than an unsigned int.  Handle SVE modes.
20363         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20364         SVE modes.
20365         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20366         if SVE is enabled.
20367         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20368         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20369         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20370         (aarch64_sve_float_mul_immediate_p): New functions.
20371         (aarch64_sve_valid_immediate): New function.
20372         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20373         Explicitly reject structure modes.  Check for INDEX constants.
20374         Handle PTRUE and PFALSE constants.
20375         (aarch64_check_zero_based_sve_index_immediate): New function.
20376         (aarch64_simd_imm_zero_p): Delete.
20377         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20378         vector modes.  Accept constants in the range of CNT[BHWD].
20379         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20380         ask for an Advanced SIMD mode.
20381         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20382         (aarch64_simd_vector_alignment): Handle SVE predicates.
20383         (aarch64_vectorize_preferred_vector_alignment): New function.
20384         (aarch64_simd_vector_alignment_reachable): Use it instead of
20385         the vector size.
20386         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20387         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20388         functions.
20389         (MAX_VECT_LEN): Delete.
20390         (expand_vec_perm_d): Add a vec_flags field.
20391         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20392         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20393         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20394         for SVE modes.
20395         (aarch64_evpc_rev): Rename to...
20396         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20397         (aarch64_evpc_rev_global): New function.
20398         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20399         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20400         MAX_VECT_LEN.
20401         (aarch64_evpc_sve_tbl): New function.
20402         (aarch64_expand_vec_perm_const_1): Update after rename of
20403         aarch64_evpc_rev.  Handle SVE permutes too, trying
20404         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20405         than aarch64_evpc_tbl.
20406         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20407         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20408         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20409         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20410         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20411         (aarch64_expand_sve_vcond): New functions.
20412         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20413         of aarch64_vector_mode_p.
20414         (aarch64_dwarf_poly_indeterminate_value): New function.
20415         (aarch64_compute_pressure_classes): Likewise.
20416         (aarch64_can_change_mode_class): Likewise.
20417         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20418         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20419         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20420         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20421         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20422         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20423         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20424         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20425         constraints.
20426         (Dn, Dl, Dr): Accept const as well as const_vector.
20427         (Dz): Likewise.  Compare against CONST0_RTX.
20428         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20429         of "vector" where appropriate.
20430         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20431         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20432         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20433         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20434         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20435         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20436         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20437         (v_int_equiv): Extend to SVE modes.
20438         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20439         mode attributes.
20440         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20441         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20442         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20443         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20444         (SVE_COND_FP_CMP): New int iterators.
20445         (perm_hilo): Handle the new unpack unspecs.
20446         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20447         attributes.
20448         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20449         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20450         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20451         (aarch64_equality_operator, aarch64_constant_vector_operand)
20452         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20453         (aarch64_sve_nonimmediate_operand): Likewise.
20454         (aarch64_sve_general_operand): Likewise.
20455         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20456         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20457         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20458         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20459         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20460         (aarch64_sve_float_arith_immediate): Likewise.
20461         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20462         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20463         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20464         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20465         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20466         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20467         (aarch64_sve_float_arith_operand): Likewise.
20468         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20469         (aarch64_sve_float_mul_operand): Likewise.
20470         (aarch64_sve_vec_perm_operand): Likewise.
20471         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20472         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20473         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20474         as well as const_vector.
20475         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20476         in file.  Use CONST0_RTX and CONSTM1_RTX.
20477         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20478         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20479         Use aarch64_simd_imm_zero.
20480         * config/aarch64/aarch64-sve.md: New file.
20481         * config/aarch64/aarch64.md: Include it.
20482         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20483         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20484         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20485         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20486         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20487         (sve): New attribute.
20488         (enabled): Disable instructions with the sve attribute unless
20489         TARGET_SVE.
20490         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20491         aarch64_expand_mov_immediate.
20492         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20493         CNT[BHSD] immediates.
20494         (movti): Split CONST_POLY_INT moves into two halves.
20495         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20496         Split additions that need a temporary here if the destination
20497         is the stack pointer.
20498         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20499         (*add<mode>3_poly_1): New instruction.
20500         (set_clobber_cc): New expander.
20502 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20504         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20505         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20506         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20507         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20508         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20509         Change innermode from fixed_mode_size to machine_mode.
20510         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20511         subreg of a variable-length CONST_VECTOR.
20513 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20514             Alan Hayward  <alan.hayward@arm.com>
20515             David Sherwood  <david.sherwood@arm.com>
20517         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20518         (add_offset_to_base): New function, split out from...
20519         (create_mem_ref): ...here.  When handling a scale other than 1,
20520         check first whether the address is valid without the offset.
20521         Add it into the base if so, leaving the index and scale as-is.
20523 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20525         PR c++/83778
20526         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20527         fold_for_warn before checking if arg2 is INTEGER_CST.
20529 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20531         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20532         (store_multiple_operation): Delete.
20533         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20534         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20535         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20536         guarded by TARGET_STRING.
20537         (rs6000_output_load_multiple): Delete.
20538         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20539         OPTION_MASK_STRING / TARGET_STRING handling.
20540         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20541         (const rs6000_opt_masks) <"string">: Change mask to 0.
20542         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20543         (MASK_STRING): Delete.
20544         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20545         parts.  Simplify.
20546         (load_multiple): Delete.
20547         (*ldmsi8): Delete.
20548         (*ldmsi7): Delete.
20549         (*ldmsi6): Delete.
20550         (*ldmsi5): Delete.
20551         (*ldmsi4): Delete.
20552         (*ldmsi3): Delete.
20553         (store_multiple): Delete.
20554         (*stmsi8): Delete.
20555         (*stmsi7): Delete.
20556         (*stmsi6): Delete.
20557         (*stmsi5): Delete.
20558         (*stmsi4): Delete.
20559         (*stmsi3): Delete.
20560         (movmemsi_8reg): Delete.
20561         (corresponding unnamed define_insn): Delete.
20562         (movmemsi_6reg): Delete.
20563         (corresponding unnamed define_insn): Delete.
20564         (movmemsi_4reg): Delete.
20565         (corresponding unnamed define_insn): Delete.
20566         (movmemsi_2reg): Delete.
20567         (corresponding unnamed define_insn): Delete.
20568         (movmemsi_1reg): Delete.
20569         (corresponding unnamed define_insn): Delete.
20570         * config/rs6000/rs6000.opt (mno-string): New.
20571         (mstring): Replace by deprecation warning stub.
20572         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20574 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20576         * regrename.c (regrename_do_replace): If replacing the same
20577         reg multiple times, try to reuse last created gen_raw_REG.
20579         PR debug/81155
20580         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20581         main to workaround a bug in GDB.
20583 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20585         PR target/83737
20586         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20588 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20590         PR rtl-optimization/80481
20591         * ira-color.c (get_cap_member): New function.
20592         (allocnos_conflict_by_live_ranges_p): Use it.
20593         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20594         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20596 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20598         PR target/83628
20599         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20600         (*saddl_se_1): Ditto.
20601         (*ssubsi_1): Ditto.
20602         (*ssubl_se_1): Ditto.
20604 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20606         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20607         rather than wi::to_widest for DR_INITs.
20608         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20609         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20610         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20611         INTEGER_CSTs.
20612         (vect_analyze_group_access_1): Note that here.
20614 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20616         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20617         polynomial type sizes.
20619 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20621         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20622         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20623         (gimple_add_tmp_var): Likewise.
20625 2018-01-12  Martin Liska  <mliska@suse.cz>
20627         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20628         (gimple_alloc_sizes): Likewise.
20629         (dump_gimple_statistics): Use PRIu64 in printf format.
20630         * gimple.h: Change uint64_t to int.
20632 2018-01-12  Martin Liska  <mliska@suse.cz>
20634         * tree-core.h: Use uint64_t instead of int.
20635         * tree.c (tree_node_counts): Likewise.
20636         (tree_node_sizes): Likewise.
20637         (dump_tree_statistics): Use PRIu64 in printf format.
20639 2018-01-12  Martin Liska  <mliska@suse.cz>
20641         * Makefile.in: As qsort_chk is implemented in vec.c, add
20642         vec.o to linkage of gencfn-macros.
20643         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20644         passing the info to record_node_allocation_statistics.
20645         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20646         and pass the info.
20647         * ggc-common.c (struct ggc_usage): Add operator== and use
20648         it in operator< and compare function.
20649         * mem-stats.h (struct mem_usage): Likewise.
20650         * vec.c (struct vec_usage): Remove operator< and compare
20651         function. Can be simply inherited.
20653 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20655         PR target/81616
20656         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20657         * tree-ssa-math-opts.c: Include domwalk.h.
20658         (convert_mult_to_fma_1): New function.
20659         (fma_transformation_info): New type.
20660         (fma_deferring_state): Likewise.
20661         (cancel_fma_deferring): New function.
20662         (result_of_phi): Likewise.
20663         (last_fma_candidate_feeds_initial_phi): Likewise.
20664         (convert_mult_to_fma): Added deferring logic, split actual
20665         transformation to convert_mult_to_fma_1.
20666         (math_opts_dom_walker): New type.
20667         (math_opts_dom_walker::after_dom_children): New method, body moved
20668         here from pass_optimize_widening_mul::execute, added deferring logic
20669         bits.
20670         (pass_optimize_widening_mul::execute): Moved most of code to
20671         math_opts_dom_walker::after_dom_children.
20672         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20673         * config/i386/i386.c (ix86_option_override_internal): Added
20674         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20676 2018-01-12  Richard Biener  <rguenther@suse.de>
20678         PR debug/83157
20679         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20680         inline instance vars.
20682 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20684         PR target/81819
20685         * config/rx/rx.c (rx_is_restricted_memory_address):
20686         Handle SUBREG case.
20688 2018-01-12  Richard Biener  <rguenther@suse.de>
20690         PR tree-optimization/80846
20691         * target.def (split_reduction): New target hook.
20692         * targhooks.c (default_split_reduction): New function.
20693         * targhooks.h (default_split_reduction): Declare.
20694         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20695         target requests first reduce vectors by combining low and high
20696         parts.
20697         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20698         (get_vectype_for_scalar_type_and_size): Export.
20699         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20700         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20701         * doc/tm.texi: Regenerate.
20702         * config/i386/i386.c (ix86_split_reduction): Implement
20703         TARGET_VECTORIZE_SPLIT_REDUCTION.
20705 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20707         PR target/83368
20708         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20709         in PIC mode except for TARGET_VXWORKS_RTP.
20710         * config/sparc/sparc.c: Include cfgrtl.h.
20711         (TARGET_INIT_PIC_REG): Define.
20712         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20713         (sparc_pic_register_p): New predicate.
20714         (sparc_legitimate_address_p): Use it.
20715         (sparc_legitimize_pic_address): Likewise.
20716         (sparc_delegitimize_address): Likewise.
20717         (sparc_mode_dependent_address_p): Likewise.
20718         (gen_load_pcrel_sym): Remove 4th parameter.
20719         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20720         (sparc_expand_prologue): Do not call load_got_register here.
20721         (sparc_flat_expand_prologue): Likewise.
20722         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20723         (sparc_use_pseudo_pic_reg): New function.
20724         (sparc_init_pic_reg): Likewise.
20725         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20726         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20728 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20730         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20731         Add item for branch_cost.
20733 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20735         PR rtl-optimization/83565
20736         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20737         not extend the result to a larger mode for rotate operations.
20738         (num_sign_bit_copies1): Likewise.
20740 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20742         PR target/40411
20743         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20744         -symbolic.
20745         Use values-Xc.o for -pedantic.
20746         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20748 2018-01-12  Martin Liska  <mliska@suse.cz>
20750         PR ipa/83054
20751         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20752         New function.
20753         (possible_polymorphic_call_targets): Use it.
20754         (ipa_devirt): Likewise.
20756 2018-01-12  Martin Liska  <mliska@suse.cz>
20758         * profile-count.h (enum profile_quality): Use 0 as invalid
20759         enum value of profile_quality.
20761 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20763         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20764         -mext-string options.
20766 2018-01-12  Richard Biener  <rguenther@suse.de>
20768         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20769         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20770         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20771         Likewise.
20772         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20774 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20776         * configure.ac (--with-long-double-format): Add support for the
20777         configuration option to change the default long double format on
20778         PowerPC systems.
20779         * config.gcc (powerpc*-linux*-*): Likewise.
20780         * configure: Regenerate.
20781         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20782         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20783         used without modification.
20785 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20787         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20788         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20789         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20790         MISC_BUILTIN_SPEC_BARRIER.
20791         (rs6000_init_builtins): Likewise.
20792         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20793         enum value.
20794         (speculation_barrier): New define_insn.
20795         * doc/extend.texi: Document __builtin_speculation_barrier.
20797 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20799         PR target/83203
20800         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20801         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20802         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20803         iterators.
20804         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20805         integral modes instead of "ss" and "sd".
20806         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20807         vectors with 32-bit and 64-bit elements.
20808         (vecdupssescalarmodesuffix): New mode attribute.
20809         (vec_dup<mode>): Use it.
20811 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20813         PR target/83330
20814         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20815         frame if argument is passed on stack.
20817 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20819         PR target/82682
20820         * ree.c (combine_reaching_defs): Optimize also
20821         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20822         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20824 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20826         PR middle-end/83189
20827         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20829 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20831         PR middle-end/83718
20832         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20833         after they are computed.
20835 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20837         PR tree-optimization/83695
20838         * gimple-loop-linterchange.cc
20839         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20840         reset cached scev information after interchange.
20841         (pass_linterchange::execute): Remove call to scev_reset_htab.
20843 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20845         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20846         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20847         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20848         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20849         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20850         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20851         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20852         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20853         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20854         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20855         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20856         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20857         (V_lane_reg): Likewise.
20858         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20859         New define_expand.
20860         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20861         (vfmal_lane_low<mode>_intrinsic,
20862         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20863         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20864         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20865         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20866         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20867         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20869 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20871         * config/arm/arm-cpus.in (fp16fml): New feature.
20872         (ALL_SIMD): Add fp16fml.
20873         (armv8.2-a): Add fp16fml as an option.
20874         (armv8.3-a): Likewise.
20875         (armv8.4-a): Add fp16fml as part of fp16.
20876         * config/arm/arm.h (TARGET_FP16FML): Define.
20877         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20878         when appropriate.
20879         * config/arm/arm-modes.def (V2HF): Define.
20880         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20881         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20882         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20883         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20884         vfmsl_low, vfmsl_high): New set of builtins.
20885         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20886         (vfml_op): New code attribute.
20887         (VFMLHALVES): New int iterator.
20888         (VFML, VFMLSEL): New mode attributes.
20889         (V_reg): Define mapping for V2HF.
20890         (V_hi, V_lo): New mode attributes.
20891         (VF_constraint): Likewise.
20892         (vfml_half, vfml_half_selector): New int attributes.
20893         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20894         define_expand.
20895         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20896         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20897         New define_insn.
20898         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20899         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20900         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20901         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20902         documentation.
20903         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20904         Document new effective target and option set.
20906 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20908         * config/arm/arm-cpus.in (armv8_4): New feature.
20909         (ARMv8_4a): New fgroup.
20910         (armv8.4-a): New arch.
20911         * config/arm/arm-tables.opt: Regenerate.
20912         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20913         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20914         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20915         Add matching rules for -march=armv8.4-a and extensions.
20916         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20918 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20920         PR target/81821
20921         * config/rx/rx.md (BW): New mode attribute.
20922         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20924 2018-01-11  Richard Biener  <rguenther@suse.de>
20926         PR tree-optimization/83435
20927         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20928         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20929         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20931 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20932             Alan Hayward  <alan.hayward@arm.com>
20933             David Sherwood  <david.sherwood@arm.com>
20935         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20936         field.
20937         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20938         (aarch64_print_address_internal): Use it to check for a zero offset.
20940 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20941             Alan Hayward  <alan.hayward@arm.com>
20942             David Sherwood  <david.sherwood@arm.com>
20944         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20945         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20946         Return a poly_int64 rather than a HOST_WIDE_INT.
20947         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20948         rather than a HOST_WIDE_INT.
20949         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20950         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20951         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20952         final_offset from HOST_WIDE_INT to poly_int64.
20953         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20954         to_constant when getting the number of units in an Advanced SIMD
20955         mode.
20956         (aarch64_builtin_vectorized_function): Check for a constant number
20957         of units.
20958         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20959         GET_MODE_SIZE.
20960         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20961         attribute instead of GET_MODE_NUNITS.
20962         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20963         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20964         GET_MODE_SIZE for fixed-size registers.
20965         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20966         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20967         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20968         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20969         (aarch64_print_operand, aarch64_print_address_internal)
20970         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20971         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20972         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20973         Handle polynomial GET_MODE_SIZE.
20974         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20975         wider than SImode without modification.
20976         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20977         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20978         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20979         passing and returning SVE modes.
20980         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20981         rather than GEN_INT.
20982         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20983         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20984         (aarch64_allocate_and_probe_stack_space): Likewise.
20985         (aarch64_layout_frame): Cope with polynomial offsets.
20986         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20987         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20988         polynomial offsets.
20989         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20990         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20991         poly_int64 rather than a HOST_WIDE_INT.
20992         (aarch64_get_separate_components, aarch64_process_components)
20993         (aarch64_expand_prologue, aarch64_expand_epilogue)
20994         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20995         (aarch64_anchor_offset): New function, split out from...
20996         (aarch64_legitimize_address): ...here.
20997         (aarch64_builtin_vectorization_cost): Handle polynomial
20998         TYPE_VECTOR_SUBPARTS.
20999         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
21000         GET_MODE_NUNITS.
21001         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
21002         number of elements from the PARALLEL rather than the mode.
21003         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
21004         rather than GET_MODE_BITSIZE.
21005         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
21006         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
21007         (aarch64_expand_vec_perm_const_1): Handle polynomial
21008         d->perm.length () and d->perm elements.
21009         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
21010         Apply to_constant to d->perm elements.
21011         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
21012         polynomial CONST_VECTOR_NUNITS.
21013         (aarch64_move_pointer): Take amount as a poly_int64 rather
21014         than an int.
21015         (aarch64_progress_pointer): Avoid temporary variable.
21016         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
21017         the mode attribute instead of GET_MODE.
21019 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21020             Alan Hayward  <alan.hayward@arm.com>
21021             David Sherwood  <david.sherwood@arm.com>
21023         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
21024         x exists before using it.
21025         (aarch64_add_constant_internal): Rename to...
21026         (aarch64_add_offset_1): ...this.  Replace regnum with separate
21027         src and dest rtxes.  Handle the case in which they're different,
21028         including when the offset is zero.  Replace scratchreg with an rtx.
21029         Use 2 additions if there is no spare register into which we can
21030         move a 16-bit constant.
21031         (aarch64_add_constant): Delete.
21032         (aarch64_add_offset): Replace reg with separate src and dest
21033         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
21034         Use aarch64_add_offset_1.
21035         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
21036         an rtx rather than an int.  Take the delta as a poly_int64
21037         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
21038         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
21039         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
21040         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
21041         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
21042         and aarch64_add_sp.
21043         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21044         aarch64_add_constant.
21046 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21048         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21049         Use scalar_float_mode.
21051 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21053         * config/aarch64/aarch64-simd.md
21054         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21055         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21056         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21057         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21058         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21059         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21060         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21061         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21062         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21063         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21065 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21067         PR target/83514
21068         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21069         targ_options->x_arm_arch_string is non NULL.
21071 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21073         * config/aarch64/aarch64.h
21074         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21076 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21078         PR target/82096
21079         * expmed.c (emit_store_flag_force): Swap if const op0
21080         and change VOIDmode to mode of op0.
21082 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21084         PR rtl-optimization/83761
21085         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21086         than bytes to mode_for_size.
21088 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21090         PR middle-end/83189
21091         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21092         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21093         profile.
21095 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21097         PR middle-end/83575
21098         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21099         when in layout mode.
21100         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21101         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21102         partition fixup.
21104 2018-01-10  Michael Collison  <michael.collison@arm.com>
21106         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21107         * config/aarch64/aarch64-option-extension.def: Add
21108         AARCH64_OPT_EXTENSION of 'fp16fml'.
21109         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21110         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21111         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21112         * config/aarch64/constraints.md (Ui7): New constraint.
21113         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21114         (VFMLA_SEL_W): Ditto.
21115         (f16quad): Ditto.
21116         (f16mac1): Ditto.
21117         (VFMLA16_LOW): New int iterator.
21118         (VFMLA16_HIGH): Ditto.
21119         (UNSPEC_FMLAL): New unspec.
21120         (UNSPEC_FMLSL): Ditto.
21121         (UNSPEC_FMLAL2): Ditto.
21122         (UNSPEC_FMLSL2): Ditto.
21123         (f16mac): New code attribute.
21124         * config/aarch64/aarch64-simd-builtins.def
21125         (aarch64_fmlal_lowv2sf): Ditto.
21126         (aarch64_fmlsl_lowv2sf): Ditto.
21127         (aarch64_fmlalq_lowv4sf): Ditto.
21128         (aarch64_fmlslq_lowv4sf): Ditto.
21129         (aarch64_fmlal_highv2sf): Ditto.
21130         (aarch64_fmlsl_highv2sf): Ditto.
21131         (aarch64_fmlalq_highv4sf): Ditto.
21132         (aarch64_fmlslq_highv4sf): Ditto.
21133         (aarch64_fmlal_lane_lowv2sf): Ditto.
21134         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21135         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21136         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21137         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21138         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21139         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21140         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21141         (aarch64_fmlal_lane_highv2sf): Ditto.
21142         (aarch64_fmlsl_lane_highv2sf): Ditto.
21143         (aarch64_fmlal_laneq_highv2sf): Ditto.
21144         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21145         (aarch64_fmlalq_lane_highv4sf): Ditto.
21146         (aarch64_fmlsl_lane_highv4sf): Ditto.
21147         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21148         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21149         * config/aarch64/aarch64-simd.md:
21150         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21151         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21152         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21153         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21154         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21155         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21156         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21157         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21158         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21159         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21160         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21161         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21162         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21163         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21164         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21165         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21166         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21167         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21168         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21169         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21170         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21171         (vfmlsl_low_u32): Ditto.
21172         (vfmlalq_low_u32): Ditto.
21173         (vfmlslq_low_u32): Ditto.
21174         (vfmlal_high_u32): Ditto.
21175         (vfmlsl_high_u32): Ditto.
21176         (vfmlalq_high_u32): Ditto.
21177         (vfmlslq_high_u32): Ditto.
21178         (vfmlal_lane_low_u32): Ditto.
21179         (vfmlsl_lane_low_u32): Ditto.
21180         (vfmlal_laneq_low_u32): Ditto.
21181         (vfmlsl_laneq_low_u32): Ditto.
21182         (vfmlalq_lane_low_u32): Ditto.
21183         (vfmlslq_lane_low_u32): Ditto.
21184         (vfmlalq_laneq_low_u32): Ditto.
21185         (vfmlslq_laneq_low_u32): Ditto.
21186         (vfmlal_lane_high_u32): Ditto.
21187         (vfmlsl_lane_high_u32): Ditto.
21188         (vfmlal_laneq_high_u32): Ditto.
21189         (vfmlsl_laneq_high_u32): Ditto.
21190         (vfmlalq_lane_high_u32): Ditto.
21191         (vfmlslq_lane_high_u32): Ditto.
21192         (vfmlalq_laneq_high_u32): Ditto.
21193         (vfmlslq_laneq_high_u32): Ditto.
21194         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21195         (AARCH64_FL_FOR_ARCH8_4): New.
21196         (AARCH64_ISA_F16FML): New ISA flag.
21197         (TARGET_F16FML): New feature flag for fp16fml.
21198         (doc/invoke.texi): Document new fp16fml option.
21200 2018-01-10  Michael Collison  <michael.collison@arm.com>
21202         * config/aarch64/aarch64-builtins.c:
21203         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21204         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21205         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21206         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21207         (AARCH64_ISA_SHA3): New ISA flag.
21208         (TARGET_SHA3): New feature flag for sha3.
21209         * config/aarch64/iterators.md (sha512_op): New int attribute.
21210         (CRYPTO_SHA512): New int iterator.
21211         (UNSPEC_SHA512H): New unspec.
21212         (UNSPEC_SHA512H2): Ditto.
21213         (UNSPEC_SHA512SU0): Ditto.
21214         (UNSPEC_SHA512SU1): Ditto.
21215         * config/aarch64/aarch64-simd-builtins.def
21216         (aarch64_crypto_sha512hqv2di): New builtin.
21217         (aarch64_crypto_sha512h2qv2di): Ditto.
21218         (aarch64_crypto_sha512su0qv2di): Ditto.
21219         (aarch64_crypto_sha512su1qv2di): Ditto.
21220         (aarch64_eor3qv8hi): Ditto.
21221         (aarch64_rax1qv2di): Ditto.
21222         (aarch64_xarqv2di): Ditto.
21223         (aarch64_bcaxqv8hi): Ditto.
21224         * config/aarch64/aarch64-simd.md:
21225         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21226         (aarch64_crypto_sha512su0qv2di): Ditto.
21227         (aarch64_crypto_sha512su1qv2di): Ditto.
21228         (aarch64_eor3qv8hi): Ditto.
21229         (aarch64_rax1qv2di): Ditto.
21230         (aarch64_xarqv2di): Ditto.
21231         (aarch64_bcaxqv8hi): Ditto.
21232         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21233         (vsha512h2q_u64): Ditto.
21234         (vsha512su0q_u64): Ditto.
21235         (vsha512su1q_u64): Ditto.
21236         (veor3q_u16): Ditto.
21237         (vrax1q_u64): Ditto.
21238         (vxarq_u64): Ditto.
21239         (vbcaxq_u16): Ditto.
21240         * config/arm/types.md (crypto_sha512): New type attribute.
21241         (crypto_sha3): Ditto.
21242         (doc/invoke.texi): Document new sha3 option.
21244 2018-01-10  Michael Collison  <michael.collison@arm.com>
21246         * config/aarch64/aarch64-builtins.c:
21247         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21248         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21249         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21250         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21251         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21252         (AARCH64_ISA_SM4): New ISA flag.
21253         (TARGET_SM4): New feature flag for sm4.
21254         * config/aarch64/aarch64-simd-builtins.def
21255         (aarch64_sm3ss1qv4si): Ditto.
21256         (aarch64_sm3tt1aq4si): Ditto.
21257         (aarch64_sm3tt1bq4si): Ditto.
21258         (aarch64_sm3tt2aq4si): Ditto.
21259         (aarch64_sm3tt2bq4si): Ditto.
21260         (aarch64_sm3partw1qv4si): Ditto.
21261         (aarch64_sm3partw2qv4si): Ditto.
21262         (aarch64_sm4eqv4si): Ditto.
21263         (aarch64_sm4ekeyqv4si): Ditto.
21264         * config/aarch64/aarch64-simd.md:
21265         (aarch64_sm3ss1qv4si): Ditto.
21266         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21267         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21268         (aarch64_sm4eqv4si): Ditto.
21269         (aarch64_sm4ekeyqv4si): Ditto.
21270         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21271         (sm3part_op): Ditto.
21272         (CRYPTO_SM3TT): Ditto.
21273         (CRYPTO_SM3PART): Ditto.
21274         (UNSPEC_SM3SS1): New unspec.
21275         (UNSPEC_SM3TT1A): Ditto.
21276         (UNSPEC_SM3TT1B): Ditto.
21277         (UNSPEC_SM3TT2A): Ditto.
21278         (UNSPEC_SM3TT2B): Ditto.
21279         (UNSPEC_SM3PARTW1): Ditto.
21280         (UNSPEC_SM3PARTW2): Ditto.
21281         (UNSPEC_SM4E): Ditto.
21282         (UNSPEC_SM4EKEY): Ditto.
21283         * config/aarch64/constraints.md (Ui2): New constraint.
21284         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21285         * config/arm/types.md (crypto_sm3): New type attribute.
21286         (crypto_sm4): Ditto.
21287         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21288         (vsm3tt1aq_u32): Ditto.
21289         (vsm3tt1bq_u32): Ditto.
21290         (vsm3tt2aq_u32): Ditto.
21291         (vsm3tt2bq_u32): Ditto.
21292         (vsm3partw1q_u32): Ditto.
21293         (vsm3partw2q_u32): Ditto.
21294         (vsm4eq_u32): Ditto.
21295         (vsm4ekeyq_u32): Ditto.
21296         (doc/invoke.texi): Document new sm4 option.
21298 2018-01-10  Michael Collison  <michael.collison@arm.com>
21300         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21301         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21302         (AARCH64_FL_FOR_ARCH8_4): New.
21303         (AARCH64_FL_V8_4): New flag.
21304         (doc/invoke.texi): Document new armv8.4-a option.
21306 2018-01-10  Michael Collison  <michael.collison@arm.com>
21308         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21309         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21310         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21311         * config/aarch64/aarch64-option-extension.def: Add
21312         AARCH64_OPT_EXTENSION of 'sha2'.
21313         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21314         (crypto): Disable sha2 and aes if crypto disabled.
21315         (crypto): Enable aes and sha2 if enabled.
21316         (simd): Disable sha2 and aes if simd disabled.
21317         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21318         New flags.
21319         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21320         (TARGET_SHA2): New feature flag for sha2.
21321         (TARGET_AES): New feature flag for aes.
21322         * config/aarch64/aarch64-simd.md:
21323         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21324         conditional on TARGET_AES.
21325         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21326         (aarch64_crypto_sha1hsi): Make pattern conditional
21327         on TARGET_SHA2.
21328         (aarch64_crypto_sha1hv4si): Ditto.
21329         (aarch64_be_crypto_sha1hv4si): Ditto.
21330         (aarch64_crypto_sha1su1v4si): Ditto.
21331         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21332         (aarch64_crypto_sha1su0v4si): Ditto.
21333         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21334         (aarch64_crypto_sha256su0v4si): Ditto.
21335         (aarch64_crypto_sha256su1v4si): Ditto.
21336         (doc/invoke.texi): Document new aes and sha2 options.
21338 2018-01-10  Martin Sebor  <msebor@redhat.com>
21340         PR tree-optimization/83781
21341         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21342         as string arrays.
21344 2018-01-11  Martin Sebor  <msebor@gmail.com>
21345             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21347         PR tree-optimization/83501
21348         PR tree-optimization/81703
21350         * tree-ssa-strlen.c (get_string_cst): Rename...
21351         (get_string_len): ...to this.  Handle global constants.
21352         (handle_char_store): Adjust.
21354 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21355             Jim Wilson  <jimw@sifive.com>
21357         * config/riscv/riscv-protos.h (riscv_output_return): New.
21358         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21359         (riscv_attribute_table, riscv_output_return),
21360         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21361         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21362         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21363         function.
21364         (riscv_expand_prologue): Add early return for naked function.
21365         (riscv_expand_epilogue): Likewise.
21366         (riscv_function_ok_for_sibcall): Return false for naked function.
21367         (riscv_set_current_function): New.
21368         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21369         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21370         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21371         * doc/extend.texi (RISC-V Function Attributes): New.
21373 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21375         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21376         check for 128-bit long double before checking TCmode.
21377         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21378         128-bit long doubles before checking TFmode or TCmode.
21379         (FLOAT128_IBM_P): Likewise.
21381 2018-01-10  Martin Sebor  <msebor@redhat.com>
21383         PR tree-optimization/83671
21384         * builtins.c (c_strlen): Unconditionally return zero for the empty
21385         string.
21386         Use -Warray-bounds for warnings.
21387         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21388         for non-constant array indices with COMPONENT_REF, arrays of
21389         arrays, and pointers to arrays.
21390         (gimple_fold_builtin_strlen): Determine and set length range for
21391         non-constant character arrays.
21393 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21395         PR middle-end/81897
21396         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21397         empty blocks.
21399 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21401         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21403 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21405         PR target/83399
21406         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21407         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21408         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21409         indexed_or_indirect_operand predicate.
21410         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21411         (*vsx_le_perm_load_v8hi): Likewise.
21412         (*vsx_le_perm_load_v16qi): Likewise.
21413         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21414         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21415         (*vsx_le_perm_store_v8hi): Likewise.
21416         (*vsx_le_perm_store_v16qi): Likewise.
21417         (eight unnamed splitters): Likewise.
21419 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21421         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21422         * config/rs6000/emmintrin.h: Likewise.
21423         * config/rs6000/mmintrin.h: Likewise.
21424         * config/rs6000/xmmintrin.h: Likewise.
21426 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21428         PR c++/43486
21429         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21430         "public_flag".
21431         * tree.c (tree_nop_conversion): Return true for location wrapper
21432         nodes.
21433         (maybe_wrap_with_location): New function.
21434         (selftest::check_strip_nops): New function.
21435         (selftest::test_location_wrappers): New function.
21436         (selftest::tree_c_tests): Call it.
21437         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21438         (maybe_wrap_with_location): New decl.
21439         (EXPR_LOCATION_WRAPPER_P): New macro.
21440         (location_wrapper_p): New inline function.
21441         (tree_strip_any_location_wrapper): New inline function.
21443 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21445         PR target/83735
21446         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21447         stack_realign_offset for the largest alignment of stack slot
21448         actually used.
21449         (ix86_find_max_used_stack_alignment): New function.
21450         (ix86_finalize_stack_frame_flags): Use it.  Set
21451         max_used_stack_alignment if we don't realign stack.
21452         * config/i386/i386.h (machine_function): Add
21453         max_used_stack_alignment.
21455 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21457         * config/arm/arm.opt (-mbranch-cost): New option.
21458         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21459         account.
21461 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21463         PR target/83629
21464         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21465         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21467 2018-01-10  Richard Biener  <rguenther@suse.de>
21469         PR debug/83765
21470         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21471         early out so it also covers the case where we have a non-NULL
21472         origin.
21474 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21476         PR tree-optimization/83753
21477         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21478         for non-strided grouped accesses if the number of elements is 1.
21480 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21482         PR target/81616
21483         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21484         * i386.h (TARGET_USE_GATHER): Define.
21485         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21487 2018-01-10  Martin Liska  <mliska@suse.cz>
21489         PR bootstrap/82831
21490         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21491         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21492         partitioning.
21493         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21494         CLEANUP_NO_PARTITIONING is not set.
21496 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21498         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21499         for vectors, as a partial revert of r254296.
21500         * rtl.h (const_vec_p): Delete.
21501         (const_vec_duplicate_p): Don't test for vector CONSTs.
21502         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21503         * expmed.c (make_tree): Likewise.
21505         Revert:
21506         * common.md (E, F): Use CONSTANT_P instead of checking for
21507         CONST_VECTOR.
21508         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21509         checking for CONST_VECTOR.
21511 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21513         PR middle-end/83575
21514         * predict.c (force_edge_cold): Handle in more sane way edges
21515         with no prediction.
21517 2018-01-09  Carl Love  <cel@us.ibm.com>
21519         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21520         V4SI, V4SF types.
21521         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21522         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21523         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21524         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21525         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21526         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21527         * config/rs6000/rs6000-protos.h: Add extern defition for
21528         rs6000_generate_float2_double_code.
21529         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21530         function.
21531         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21532         (float2_v2df): Add define_expand.
21534 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21536         PR target/83628
21537         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21538         op_mode in the force_to_mode call.
21540 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21542         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21543         instead of checking each element individually.
21544         (aarch64_evpc_uzp): Likewise.
21545         (aarch64_evpc_zip): Likewise.
21546         (aarch64_evpc_ext): Likewise.
21547         (aarch64_evpc_rev): Likewise.
21548         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21549         instead of checking each element individually.  Return true without
21550         generating rtl if
21551         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21552         whether all selected elements come from the same input, instead of
21553         checking each element individually.  Remove calls to gen_rtx_REG,
21554         start_sequence and end_sequence and instead assert that no rtl is
21555         generated.
21557 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21559         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21560         order of HIGH and CONST checks.
21562 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21564         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21565         if the destination isn't an SSA_NAME.
21567 2018-01-09  Richard Biener  <rguenther@suse.de>
21569         PR tree-optimization/83668
21570         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21571         move prologue...
21572         (canonicalize_loop_form): ... here, renamed from ...
21573         (canonicalize_loop_closed_ssa_form): ... this and amended to
21574         swap successor edges for loop exit blocks to make us use
21575         the RPO order we need for initial schedule generation.
21577 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21579         PR tree-optimization/64811
21580         * match.pd: When optimizing comparisons with Inf, avoid
21581         introducing or losing exceptions from comparisons with NaN.
21583 2018-01-09  Martin Liska  <mliska@suse.cz>
21585         PR sanitizer/82517
21586         * asan.c (shadow_mem_size): Add gcc_assert.
21588 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21590         Don't save registers in main().
21592         PR target/83738
21593         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21594         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21595         * config/avr/avr.c (avr_set_current_function): Don't error if
21596         naked, OS_task or OS_main are specified at the same time.
21597         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21598         OS_main.
21599         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21600         attribute.
21601         * common/config/avr/avr-common.c (avr_option_optimization_table):
21602         Switch on -mmain-is-OS_task for optimizing compilations.
21604 2018-01-09  Richard Biener  <rguenther@suse.de>
21606         PR tree-optimization/83572
21607         * graphite.c: Include cfganal.h.
21608         (graphite_transform_loops): Connect infinite loops to exit
21609         and remove fake edges at the end.
21611 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21613         * ipa-inline.c (edge_badness): Revert accidental checkin.
21615 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21617         PR ipa/80763
21618         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21619         symbols; not inline clones.
21621 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21623         PR target/83507
21624         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21625         hard registers.  Formatting fixes.
21627         PR preprocessor/83722
21628         * gcc.c (try_generate_repro): Pass
21629         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21630         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21631         do_report_bug.
21633 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21634             Kito Cheng  <kito.cheng@gmail.com>
21636         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21637         (riscv_leaf_function_p): Delete.
21638         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21640 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21642         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21643         function.
21644         (do_ifelse): New function.
21645         (do_isel): New function.
21646         (do_sub3): New function.
21647         (do_add3): New function.
21648         (do_load_mask_compare): New function.
21649         (do_overlap_load_compare): New function.
21650         (expand_compare_loop): New function.
21651         (expand_block_compare): Call expand_compare_loop() when appropriate.
21652         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21653         option description.
21654         (-mblock-compare-inline-loop-limit): New option.
21656 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21658         PR target/83677
21659         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21660         Reverse order of second and third operands in first alternative.
21661         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21662         of first and second elements in UNSPEC_VPERMR vector.
21663         (altivec_expand_vec_perm_le): Likewise.
21665 2018-01-08  Jeff Law  <law@redhat.com>
21667         PR rtl-optimizatin/81308
21668         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21669         (process_switch): If group_case_labels makes a change, then set
21670         cfg_altered.
21671         (pass_convert_switch::execute): If a switch is converted, then
21672         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21674         PR rtl-optimization/81308
21675         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21676         splitting insns.
21678 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21680         PR target/83663 - Revert r255946
21681         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21682         generation for cases where splatting a value is not useful.
21683         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21684         across a vec_duplicate and a paradoxical subreg forming a vector
21685         mode to a vec_concat.
21687 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21689         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21690         -march=armv8.3-a variants.
21691         * config/arm/t-multilib: Likewise.
21692         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21694 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21696         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21697         to generate rtl.
21698         (cceq_ior_compare_complement): Give it a name so I can use it, and
21699         change boolean_or_operator predicate to boolean_operator so it can
21700         be used to generate a crand.
21701         (eqne): New code iterator.
21702         (bd/bd_neg): New code_attrs.
21703         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21704         a single define_insn.
21705         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21706         decrement (bdnzt/bdnzf/bdzt/bdzf).
21707         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21708         with the new names of the branch decrement patterns, and added the
21709         names of the branch decrement conditional patterns.
21711 2018-01-08  Richard Biener  <rguenther@suse.de>
21713         PR tree-optimization/83563
21714         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21715         cache.
21717 2018-01-08  Richard Biener  <rguenther@suse.de>
21719         PR middle-end/83713
21720         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21722 2018-01-08  Richard Biener  <rguenther@suse.de>
21724         PR tree-optimization/83685
21725         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21726         references to abnormals.
21728 2018-01-08  Richard Biener  <rguenther@suse.de>
21730         PR lto/83719
21731         * dwarf2out.c (output_indirect_strings): Handle empty
21732         skeleton_debug_str_hash.
21733         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21735 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21737         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21738         (emit_store_direct): Likewise.
21739         (arc_trampoline_adjust_address): Likewise.
21740         (arc_asm_trampoline_template): New function.
21741         (arc_initialize_trampoline): Use asm_trampoline_template.
21742         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21743         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21744         * config/arc/arc.md (flush_icache): Delete pattern.
21746 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21748         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21749         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21750         munaligned-access.
21752 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21754         PR target/83681
21755         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21756         by not USED_FOR_TARGET.
21757         (make_pass_resolve_sw_modes): Likewise.
21759 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21761         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21762         USED_FOR_TARGET.
21764 2018-01-08  Richard Biener  <rguenther@suse.de>
21766         PR middle-end/83580
21767         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21769 2018-01-08  Richard Biener  <rguenther@suse.de>
21771         PR middle-end/83517
21772         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21774 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21776         PR middle-end/81897
21777         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21778         basic blocks with a small number of successors.
21779         (convert_control_dep_chain_into_preds): Improve handling of
21780         forwarder blocks.
21781         (dump_predicates): Split apart into...
21782         (dump_pred_chain): ...here...
21783         (dump_pred_info): ...and here.
21784         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21785         (can_chain_union_be_invalidated_p): Improve check for invalidation
21786         of paths.
21787         (uninit_uses_cannot_happen): Avoid unnecessary if
21788         convert_control_dep_chain_into_preds yielded nothing.
21790 2018-01-06  Martin Sebor  <msebor@redhat.com>
21792         PR tree-optimization/83640
21793         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21794         subtracting negative offset from size.
21795         (builtin_access::overlap): Adjust offset bounds of the access to fall
21796         within the size of the object if possible.
21798 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21800         PR rtl-optimization/83699
21801         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21802         extract_bit_field_as_subreg to cases in which the extracted
21803         value is also a vector.
21805         * lra-constraints.c (process_alt_operands): Test for the equivalence
21806         substitutions when detecting a possible reload cycle.
21808 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21810         PR debug/83480
21811         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21812         by default if flag_selective_schedling{,2}.  Formatting fixes.
21814         PR rtl-optimization/83682
21815         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21816         if it has non-VECTOR_MODE element mode.
21817         (vec_duplicate_p): Likewise.
21819         PR middle-end/83694
21820         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21821         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21823 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21825         PR target/83604
21826         * config/i386/i386-builtin.def
21827         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21828         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21829         Require also OPTION_MASK_ISA_AVX512F in addition to
21830         OPTION_MASK_ISA_GFNI.
21831         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21832         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21833         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21834         to OPTION_MASK_ISA_GFNI.
21835         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21836         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21837         OPTION_MASK_ISA_AVX512BW.
21838         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21839         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21840         addition to OPTION_MASK_ISA_GFNI.
21841         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21842         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21843         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21844         to OPTION_MASK_ISA_GFNI.
21845         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21846         a requirement for all ISAs rather than any of them with a few
21847         exceptions.
21848         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21849         processing.
21850         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21851         bitmasks to be enabled with 3 exceptions, instead of requiring any
21852         enabled ISA with lots of exceptions.
21853         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21854         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21855         Change avx512bw in isa attribute to avx512f.
21856         * config/i386/sgxintrin.h: Add license boilerplate.
21857         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21858         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21859         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21860         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21861         defined.
21862         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21863         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21864         temporarily sse2 rather than sse if not enabled already.
21866         PR target/83604
21867         * config/i386/sse.md (VI248_VLBW): Rename to ...
21868         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21869         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21870         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21871         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21872         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21873         mode iterator instead of VI248_VLBW.
21875 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21877         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21878         (record_modified): Skip clobbers; add debug output.
21879         (param_change_prob): Use sreal frequencies.
21881 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21883         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21884         punt for user-aligned variables.
21886 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21888         * tree-chrec.c (chrec_contains_symbols): Return true for
21889         POLY_INT_CST.
21891 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21893         PR target/82439
21894         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21895         of (x|y) == x for BICS pattern.
21897 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21899         PR tree-optimization/83605
21900         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21901         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21902         can throw.
21904 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21906         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21907         * config/epiphany/rtems.h: New file.
21909 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21910             Uros Bizjak  <ubizjak@gmail.com>
21912         PR target/83554
21913         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21914         QIreg_operand instead of register_operand predicate.
21915         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21916         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21917         comments instead of -fmitigate[-_]rop.
21919 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21921         PR bootstrap/81926
21922         * cgraphunit.c (symbol_table::compile): Switch to text_section
21923         before calling assembly_start debug hook.
21924         * run-rtl-passes.c (run_rtl_passes): Likewise.
21925         Include output.h.
21927 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21929         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21930         range_int_cst_p rather than !symbolic_range_p before calling
21931         extract_range_from_multiplicative_op_1.
21933 2018-01-04  Jeff Law  <law@redhat.com>
21935         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21936         redundant test in assertion.
21938 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21940         * doc/rtl.texi: Document machine_mode wrapper classes.
21942 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21944         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21945         using tree_to_uhwi.
21947 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21949         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21950         the VEC_PERM_EXPR fold to fail.
21952 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21954         PR debug/83585
21955         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21956         to switched_sections.
21958 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21960         PR target/83680
21961         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21962         test for d.testing.
21964 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21966         PR target/83387
21967         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21968         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21970 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21972         PR debug/83666
21973         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21974         is BLKmode and bitpos not zero or mode change is needed.
21976 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21978         PR target/83675
21979         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21980         TARGET_VIS2.
21982 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21984         PR target/83628
21985         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21986         instead of MULT rtx.  Update all corresponding splitters.
21987         (*saddl_se): Ditto.
21988         (*ssub<modesuffix>): Ditto.
21989         (*ssubl_se): Ditto.
21990         (*cmp_sadd_di): Update split patterns.
21991         (*cmp_sadd_si): Ditto.
21992         (*cmp_sadd_sidi): Ditto.
21993         (*cmp_ssub_di): Ditto.
21994         (*cmp_ssub_si): Ditto.
21995         (*cmp_ssub_sidi): Ditto.
21996         * config/alpha/predicates.md (const23_operand): New predicate.
21997         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21998         Look for ASHIFT, not MULT inner operand.
21999         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
22001 2018-01-04  Martin Liska  <mliska@suse.cz>
22003         PR gcov-profile/83669
22004         * gcov.c (output_intermediate_file): Add version to intermediate
22005         gcov file.
22006         * doc/gcov.texi: Document new field 'version' in intermediate
22007         file format. Fix location of '-k' option of gcov command.
22009 2018-01-04  Martin Liska  <mliska@suse.cz>
22011         PR ipa/82352
22012         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
22014 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
22016         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
22018 2018-01-03  Martin Sebor  <msebor@redhat.com>
22020         PR tree-optimization/83655
22021         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
22022         checking calls with invalid arguments.
22024 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22026         * tree-vect-stmts.c (vect_get_store_rhs): New function.
22027         (vectorizable_mask_load_store): Delete.
22028         (vectorizable_call): Return false for masked loads and stores.
22029         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
22030         instead of gimple_assign_rhs1.
22031         (vectorizable_load): Handle IFN_MASK_LOAD.
22032         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
22034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22036         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
22037         split out from..,
22038         (vectorizable_mask_load_store): ...here.
22039         (vectorizable_load): ...and here.
22041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22043         * tree-vect-stmts.c (vect_build_all_ones_mask)
22044         (vect_build_zero_merge_argument): New functions, split out from...
22045         (vectorizable_load): ...here.
22047 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22049         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22050         split out from...
22051         (vectorizable_mask_load_store): ...here.
22052         (vectorizable_store): ...and here.
22054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22056         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22057         split out from...
22058         (vectorizable_mask_load_store): ...here.
22060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22062         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22063         (vect_model_store_cost): Take a vec_load_store_type instead of a
22064         vect_def_type.
22065         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22066         (vect_model_store_cost): Take a vec_load_store_type instead of a
22067         vect_def_type.
22068         (vectorizable_mask_load_store): Update accordingly.
22069         (vectorizable_store): Likewise.
22070         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22072 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22074         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22075         IFN_MASK_LOAD calls here rather than...
22076         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22078 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22079             Alan Hayward  <alan.hayward@arm.com>
22080             David Sherwood  <david.sherwood@arm.com>
22082         * expmed.c (extract_bit_field_1): For vector extracts,
22083         fall back to extract_bit_field_as_subreg if vec_extract
22084         isn't available.
22086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22087             Alan Hayward  <alan.hayward@arm.com>
22088             David Sherwood  <david.sherwood@arm.com>
22090         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22091         they are variable or constant sized.
22092         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22093         slots for constant-sized data.
22095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22096             Alan Hayward  <alan.hayward@arm.com>
22097             David Sherwood  <david.sherwood@arm.com>
22099         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22100         handling COND_EXPRs with boolean comparisons, try to find a better
22101         basis for the mask type than the boolean itself.
22103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22105         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22106         is calculated and how it can be overridden.
22107         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22108         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22109         if defined.
22110         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22111         if nonzero.
22113 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22114             Alan Hayward  <alan.hayward@arm.com>
22115             David Sherwood  <david.sherwood@arm.com>
22117         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22118         Remove the mode argument.
22119         (aarch64_simd_valid_immediate): Remove the mode and inverse
22120         arguments.
22121         * config/aarch64/iterators.md (bitsize): New iterator.
22122         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22123         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22124         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22125         aarch64_simd_valid_immediate.
22126         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22127         (aarch64_reg_or_bic_imm): Likewise.
22128         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22129         with an insn_type enum and msl with a modifier_type enum.
22130         Replace element_width with a scalar_mode.  Change the shift
22131         to unsigned int.  Add constructors for scalar_float_mode and
22132         scalar_int_mode elements.
22133         (aarch64_vect_float_const_representable_p): Delete.
22134         (aarch64_can_const_movi_rtx_p)
22135         (aarch64_simd_scalar_immediate_valid_for_move)
22136         (aarch64_simd_make_constant): Update call to
22137         aarch64_simd_valid_immediate.
22138         (aarch64_advsimd_valid_immediate_hs): New function.
22139         (aarch64_advsimd_valid_immediate): Likewise.
22140         (aarch64_simd_valid_immediate): Remove mode and inverse
22141         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22142         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22143         and aarch64_float_const_representable_p on the result.
22144         (aarch64_output_simd_mov_immediate): Remove mode argument.
22145         Update call to aarch64_simd_valid_immediate and use of
22146         simd_immediate_info.
22147         (aarch64_output_scalar_simd_mov_immediate): Update call
22148         accordingly.
22150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22151             Alan Hayward  <alan.hayward@arm.com>
22152             David Sherwood  <david.sherwood@arm.com>
22154         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22155         (mode_nunits): Likewise CONST_MODE_NUNITS.
22156         * machmode.def (ADJUST_NUNITS): Document.
22157         * genmodes.c (mode_data::need_nunits_adj): New field.
22158         (blank_mode): Update accordingly.
22159         (adj_nunits): New variable.
22160         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22161         parameter.
22162         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22163         listed in adj_nunits.
22164         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22165         listed in adj_nunits.  Don't emit case statements for such modes.
22166         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22167         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22168         nothing if adj_nunits is nonnull.
22169         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22170         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22171         (emit_mode_fbit): Update use of print_maybe_const_decl.
22172         (emit_move_size): Likewise.  Treat the array as non-const
22173         if adj_nunits.
22174         (emit_mode_adjustments): Handle adj_nunits.
22176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22178         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22179         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22180         (VECTOR_MODES): Use it.
22181         (make_vector_modes): Take the prefix as an argument.
22183 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22184             Alan Hayward  <alan.hayward@arm.com>
22185             David Sherwood  <david.sherwood@arm.com>
22187         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22188         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22189         for MODE_VECTOR_BOOL.
22190         * machmode.def (VECTOR_BOOL_MODE): Document.
22191         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22192         (make_vector_bool_mode): New function.
22193         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22194         MODE_VECTOR_BOOL.
22195         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22196         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22197         Likewise.
22198         * stor-layout.c (int_mode_for_mode): Likewise.
22199         * tree.c (build_vector_type_for_mode): Likewise.
22200         * varasm.c (output_constant_pool_2): Likewise.
22201         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22202         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22203         for MODE_VECTOR_BOOL.
22204         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22205         of mode class checks.
22206         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22207         instead of a list of mode class checks.
22208         (expand_vector_scalar_condition): Likewise.
22209         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22211 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22212             Alan Hayward  <alan.hayward@arm.com>
22213             David Sherwood  <david.sherwood@arm.com>
22215         * machmode.h (mode_size): Change from unsigned short to
22216         poly_uint16_pod.
22217         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22218         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22219         or if measurement_type is not polynomial.
22220         (fixed_size_mode::includes_p): Check for constant-sized modes.
22221         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22222         return a poly_uint16 rather than an unsigned short.
22223         (emit_mode_size): Change the type of mode_size from unsigned short
22224         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22225         (emit_mode_adjustments): Cope with polynomial vector sizes.
22226         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22227         for GET_MODE_SIZE.
22228         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22229         for GET_MODE_SIZE.
22230         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22231         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22232         * caller-save.c (setup_save_areas): Likewise.
22233         (replace_reg_with_saved_mem): Likewise.
22234         * calls.c (emit_library_call_value_1): Likewise.
22235         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22236         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22237         (gen_lowpart_for_combine): Likewise.
22238         * convert.c (convert_to_integer_1): Likewise.
22239         * cse.c (equiv_constant, cse_insn): Likewise.
22240         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22241         (cselib_subst_to_values): Likewise.
22242         * dce.c (word_dce_process_block): Likewise.
22243         * df-problems.c (df_word_lr_mark_ref): Likewise.
22244         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22245         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22246         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22247         (rtl_for_decl_location): Likewise.
22248         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22249         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22250         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22251         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22252         (expand_expr_real_1): Likewise.
22253         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22254         (pad_below): Likewise.
22255         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22256         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22257         * ira.c (get_subreg_tracking_sizes): Likewise.
22258         * ira-build.c (ira_create_allocno_objects): Likewise.
22259         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22260         (ira_sort_regnos_for_alter_reg): Likewise.
22261         * ira-costs.c (record_operand_costs): Likewise.
22262         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22263         (resolve_simple_move): Likewise.
22264         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22265         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22266         (lra_constraints): Likewise.
22267         (CONST_POOL_OK_P): Reject variable-sized modes.
22268         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22269         (add_pseudo_to_slot, lra_spill): Likewise.
22270         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22271         * optabs-query.c (get_best_extraction_insn): Likewise.
22272         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22273         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22274         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22275         * recog.c (offsettable_address_addr_space_p): Likewise.
22276         * regcprop.c (maybe_mode_change): Likewise.
22277         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22278         * regrename.c (build_def_use): Likewise.
22279         * regstat.c (dump_reg_info): Likewise.
22280         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22281         (find_reloads, find_reloads_subreg_address): Likewise.
22282         * reload1.c (eliminate_regs_1): Likewise.
22283         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22284         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22285         (simplify_binary_operation_1, simplify_subreg): Likewise.
22286         * targhooks.c (default_function_arg_padding): Likewise.
22287         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22288         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22289         (verify_gimple_assign_ternary): Likewise.
22290         * tree-inline.c (estimate_move_cost): Likewise.
22291         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22292         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22293         (get_address_cost_ainc): Likewise.
22294         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22295         (vect_supportable_dr_alignment): Likewise.
22296         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22297         (vectorizable_reduction): Likewise.
22298         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22299         (vectorizable_operation, vectorizable_load): Likewise.
22300         * tree.c (build_same_sized_truth_vector_type): Likewise.
22301         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22302         * var-tracking.c (emit_note_insn_var_location): Likewise.
22303         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22304         (ADDR_VEC_ALIGN): Likewise.
22306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22307             Alan Hayward  <alan.hayward@arm.com>
22308             David Sherwood  <david.sherwood@arm.com>
22310         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22311         unsigned short.
22312         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22313         or if measurement_type is polynomial.
22314         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22315         * combine.c (make_extraction): Likewise.
22316         * dse.c (find_shift_sequence): Likewise.
22317         * dwarf2out.c (mem_loc_descriptor): Likewise.
22318         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22319         (extract_bit_field, extract_low_bits): Likewise.
22320         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22321         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22322         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22323         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22324         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22325         * reload.c (find_reloads): Likewise.
22326         * reload1.c (alter_reg): Likewise.
22327         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22328         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22329         * tree-if-conv.c (predicate_mem_writes): Likewise.
22330         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22331         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22332         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22333         * valtrack.c (dead_debug_insert_temp): Likewise.
22334         * varasm.c (mergeable_constant_section): Likewise.
22335         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22337 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22338             Alan Hayward  <alan.hayward@arm.com>
22339             David Sherwood  <david.sherwood@arm.com>
22341         * expr.c (expand_assignment): Cope with polynomial mode sizes
22342         when assigning to a CONCAT.
22344 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22345             Alan Hayward  <alan.hayward@arm.com>
22346             David Sherwood  <david.sherwood@arm.com>
22348         * machmode.h (mode_precision): Change from unsigned short to
22349         poly_uint16_pod.
22350         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22351         short.
22352         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22353         or if measurement_type is not polynomial.
22354         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22355         in which the mode is already known to be a scalar_int_mode.
22356         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22357         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22358         initializer.
22359         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22360         for GET_MODE_PRECISION.
22361         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22362         for GET_MODE_PRECISION.
22363         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22364         as polynomial.
22365         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22366         (expand_field_assignment, make_extraction): Likewise.
22367         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22368         (get_last_value): Likewise.
22369         * convert.c (convert_to_integer_1): Likewise.
22370         * cse.c (cse_insn): Likewise.
22371         * expr.c (expand_expr_real_1): Likewise.
22372         * lra-constraints.c (simplify_operand_subreg): Likewise.
22373         * optabs-query.c (can_atomic_load_p): Likewise.
22374         * optabs.c (expand_atomic_load): Likewise.
22375         (expand_atomic_store): Likewise.
22376         * ree.c (combine_reaching_defs): Likewise.
22377         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22378         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22379         * tree.h (type_has_mode_precision_p): Likewise.
22380         * ubsan.c (instrument_si_overflow): Likewise.
22382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22383             Alan Hayward  <alan.hayward@arm.com>
22384             David Sherwood  <david.sherwood@arm.com>
22386         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22387         polynomial numbers of units.
22388         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22389         (valid_vector_subparts_p): New function.
22390         (build_vector_type): Remove temporary shim and take the number
22391         of units as a poly_uint64 rather than an int.
22392         (build_opaque_vector_type): Take the number of units as a
22393         poly_uint64 rather than an int.
22394         * tree.c (build_vector_from_ctor): Handle polynomial
22395         TYPE_VECTOR_SUBPARTS.
22396         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22397         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22398         (build_vector_from_val): If the number of units is variable,
22399         use build_vec_duplicate_cst for constant operands and
22400         VEC_DUPLICATE_EXPR otherwise.
22401         (make_vector_type): Remove temporary is_constant ().
22402         (build_vector_type, build_opaque_vector_type): Take the number of
22403         units as a poly_uint64 rather than an int.
22404         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22405         VECTOR_CST_NELTS.
22406         * cfgexpand.c (expand_debug_expr): Likewise.
22407         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22408         (store_constructor, expand_expr_real_1): Likewise.
22409         (const_scalar_mask_from_tree): Likewise.
22410         * fold-const-call.c (fold_const_reduction): Likewise.
22411         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22412         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22413         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22414         (fold_relational_const): Likewise.
22415         (native_interpret_vector): Likewise.  Change the size from an
22416         int to an unsigned int.
22417         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22418         TYPE_VECTOR_SUBPARTS.
22419         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22420         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22421         duplicating a non-constant operand into a variable-length vector.
22422         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22423         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22424         * ipa-icf.c (sem_variable::equals): Likewise.
22425         * match.pd: Likewise.
22426         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22427         * print-tree.c (print_node): Likewise.
22428         * stor-layout.c (layout_type): Likewise.
22429         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22430         * tree-cfg.c (verify_gimple_comparison): Likewise.
22431         (verify_gimple_assign_binary): Likewise.
22432         (verify_gimple_assign_ternary): Likewise.
22433         (verify_gimple_assign_single): Likewise.
22434         * tree-pretty-print.c (dump_generic_node): Likewise.
22435         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22436         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22437         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22438         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22439         (vect_shift_permute_load_chain): Likewise.
22440         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22441         (expand_vector_condition, optimize_vector_constructor): Likewise.
22442         (lower_vec_perm, get_compute_type): Likewise.
22443         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22444         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22445         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22446         (vect_recog_mask_conversion_pattern): Likewise.
22447         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22448         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22449         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22450         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22451         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22452         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22453         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22454         (supportable_widening_operation): Likewise.
22455         (supportable_narrowing_operation): Likewise.
22456         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22457         Likewise.
22458         * varasm.c (output_constant): Likewise.
22460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22461             Alan Hayward  <alan.hayward@arm.com>
22462             David Sherwood  <david.sherwood@arm.com>
22464         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22465         so that both the length == 3 and length != 3 cases set up their
22466         own permute vectors.  Add comments explaining why we know the
22467         number of elements is constant.
22468         (vect_permute_load_chain): Likewise.
22470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22471             Alan Hayward  <alan.hayward@arm.com>
22472             David Sherwood  <david.sherwood@arm.com>
22474         * machmode.h (mode_nunits): Change from unsigned char to
22475         poly_uint16_pod.
22476         (ONLY_FIXED_SIZE_MODES): New macro.
22477         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22478         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22479         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22480         New typedefs.
22481         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22482         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22483         or if measurement_type is not polynomial.
22484         * genmodes.c (ZERO_COEFFS): New macro.
22485         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22486         poly_uint16.
22487         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22488         Use ZERO_COEFFS when emitting initializers.
22489         * data-streamer.h (bp_pack_poly_value): New function.
22490         (bp_unpack_poly_value): Likewise.
22491         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22492         for GET_MODE_NUNITS.
22493         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22494         for GET_MODE_NUNITS.
22495         * tree.c (make_vector_type): Remove temporary shim and make
22496         the real function take the number of units as a poly_uint64
22497         rather than an int.
22498         (build_vector_type_for_mode): Handle polynomial nunits.
22499         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22500         * emit-rtl.c (const_vec_series_p_1): Likewise.
22501         (gen_rtx_CONST_VECTOR): Likewise.
22502         * fold-const.c (test_vec_duplicate_folding): Likewise.
22503         * genrecog.c (validate_pattern): Likewise.
22504         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22505         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22506         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22507         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22508         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22509         * rtlanal.c (subreg_get_info): Likewise.
22510         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22511         (vect_grouped_load_supported): Likewise.
22512         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22513         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22514         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22515         (simplify_const_unary_operation, simplify_binary_operation_1)
22516         (simplify_const_binary_operation, simplify_ternary_operation)
22517         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22518         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22519         instead of CONST_VECTOR_NUNITS.
22520         * varasm.c (output_constant_pool_2): Likewise.
22521         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22522         explicit-encoded elements in the XVEC for variable-length vectors.
22524 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22526         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22529             Alan Hayward  <alan.hayward@arm.com>
22530             David Sherwood  <david.sherwood@arm.com>
22532         * coretypes.h (fixed_size_mode): Declare.
22533         (fixed_size_mode_pod): New typedef.
22534         * builtins.h (target_builtins::x_apply_args_mode)
22535         (target_builtins::x_apply_result_mode): Change type to
22536         fixed_size_mode_pod.
22537         * builtins.c (apply_args_size, apply_result_size, result_vector)
22538         (expand_builtin_apply_args_1, expand_builtin_apply)
22539         (expand_builtin_return): Update accordingly.
22541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22543         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22544         * cselib.c (cselib_hash_rtx): Likewise.
22545         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22546         CONST_VECTOR encoding.
22548 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22549             Jeff Law  <law@redhat.com>
22551         PR target/83641
22552         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22553         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22554         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22555         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22557         PR target/83641
22558         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22559         explicitly probe *sp in a noreturn function if there were any callee
22560         register saves or frame pointer is needed.
22562 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22564         PR debug/83621
22565         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22566         BLKmode for ternary, binary or unary expressions.
22568         PR debug/83645
22569         * var-tracking.c (delete_vta_debug_insn): New inline function.
22570         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22571         insns from get_insns () to NULL instead of each bb separately.
22572         Use delete_vta_debug_insn.  No longer static.
22573         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22574         delete_vta_debug_insns callers.
22575         * rtl.h (delete_vta_debug_insns): Declare.
22576         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22577         instead of variable_tracking_main.
22579 2018-01-03  Martin Sebor  <msebor@redhat.com>
22581         PR tree-optimization/83603
22582         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22583         arguments past the endof the argument list in functions declared
22584         without a prototype.
22585         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22586         Avoid checking when arguments are null.
22588 2018-01-03  Martin Sebor  <msebor@redhat.com>
22590         PR c/83559
22591         * doc/extend.texi (attribute const): Fix a typo.
22592         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22593         issuing -Wsuggest-attribute for void functions.
22595 2018-01-03  Martin Sebor  <msebor@redhat.com>
22597         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22598         offset_int::from instead of wide_int::to_shwi.
22599         (maybe_diag_overlap): Remove assertion.
22600         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22601         * gimple-ssa-sprintf.c (format_directive): Same.
22602         (parse_directive): Same.
22603         (sprintf_dom_walker::compute_format_length): Same.
22604         (try_substitute_return_value): Same.
22606 2018-01-03  Jeff Law  <law@redhat.com>
22608         PR middle-end/83654
22609         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22610         non-constant residual for zero at runtime and avoid probing in
22611         that case.  Reorganize code for trailing problem to mirror handling
22612         of the residual.
22614 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22616         PR tree-optimization/83501
22617         * tree-ssa-strlen.c (get_string_cst): New.
22618         (handle_char_store): Call get_string_cst.
22620 2018-01-03  Martin Liska  <mliska@suse.cz>
22622         PR tree-optimization/83593
22623         * tree-ssa-strlen.c: Include tree-cfg.h.
22624         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22625         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22626         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22627         to false.
22628         (strlen_dom_walker::before_dom_children): Call
22629         gimple_purge_dead_eh_edges. Dump tranformation with details
22630         dump flags.
22631         (strlen_dom_walker::before_dom_children): Update call by adding
22632         new argument cleanup_eh.
22633         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22635 2018-01-03  Martin Liska  <mliska@suse.cz>
22637         PR ipa/83549
22638         * cif-code.def (VARIADIC_THUNK): New enum value.
22639         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22640         thunks.
22642 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22644         * sse.md (mov<mode>_internal): Tighten condition for when to use
22645         vmovdqu<ssescalarsize> for TI and OI modes.
22647 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22649         Update copyright years.
22651 2018-01-03  Martin Liska  <mliska@suse.cz>
22653         PR ipa/83594
22654         * ipa-visibility.c (function_and_variable_visibility): Skip
22655         functions with noipa attribure.
22657 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22659         * gcc.c (process_command): Update copyright notice dates.
22660         * gcov-dump.c (print_version): Ditto.
22661         * gcov.c (print_version): Ditto.
22662         * gcov-tool.c (print_version): Ditto.
22663         * gengtype.c (create_file): Ditto.
22664         * doc/cpp.texi: Bump @copying's copyright year.
22665         * doc/cppinternals.texi: Ditto.
22666         * doc/gcc.texi: Ditto.
22667         * doc/gccint.texi: Ditto.
22668         * doc/gcov.texi: Ditto.
22669         * doc/install.texi: Ditto.
22670         * doc/invoke.texi: Ditto.
22672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22674         * vector-builder.h (vector_builder::m_full_nelts): Change from
22675         unsigned int to poly_uint64.
22676         (vector_builder::full_nelts): Update prototype accordingly.
22677         (vector_builder::new_vector): Likewise.
22678         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22679         (vector_builder::operator ==): Likewise.
22680         (vector_builder::finalize): Likewise.
22681         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22682         Take the number of elements as a poly_uint64 rather than an
22683         unsigned int.
22684         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22685         from unsigned int to poly_uint64.
22686         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22687         (vec_perm_indices::new_vector): Likewise.
22688         (vec_perm_indices::length): Likewise.
22689         (vec_perm_indices::nelts_per_input): Likewise.
22690         (vec_perm_indices::input_nelts): Likewise.
22691         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22692         number of elements per input as a poly_uint64 rather than an
22693         unsigned int.  Use the original encoding for variable-length
22694         vectors, rather than clamping each individual element.
22695         For the second and subsequent elements in each pattern,
22696         clamp the step and base before clamping their sum.
22697         (vec_perm_indices::series_p): Handle polynomial element counts.
22698         (vec_perm_indices::all_in_range_p): Likewise.
22699         (vec_perm_indices_to_tree): Likewise.
22700         (vec_perm_indices_to_rtx): Likewise.
22701         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22702         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22703         (tree_vector_builder::new_binary_operation): Handle polynomial
22704         element counts.  Return false if we need to know the number
22705         of elements at compile time.
22706         * fold-const.c (fold_vec_perm): Punt if the number of elements
22707         isn't known at compile time.
22709 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22711         * vec-perm-indices.h (vec_perm_builder): Change element type
22712         from HOST_WIDE_INT to poly_int64.
22713         (vec_perm_indices::element_type): Update accordingly.
22714         (vec_perm_indices::clamp): Handle polynomial element_types.
22715         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22716         (vec_perm_indices::all_in_range_p): Likewise.
22717         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22718         than shwi trees.
22719         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22720         polynomial vec_perm_indices element types.
22721         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22722         * fold-const.c (fold_vec_perm): Likewise.
22723         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22724         * tree-vect-generic.c (lower_vec_perm): Likewise.
22725         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22726         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22727         element type to HOST_WIDE_INT.
22729 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22730             Alan Hayward  <alan.hayward@arm.com>
22731             David Sherwood  <david.sherwood@arm.com>
22733         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22734         rather than an int.  Use plus_constant.
22735         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22736         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22738 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22739             Alan Hayward  <alan.hayward@arm.com>
22740             David Sherwood  <david.sherwood@arm.com>
22742         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22743         a HOST_WIDE_INT to a poly_int64.
22745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22746             Alan Hayward  <alan.hayward@arm.com>
22747             David Sherwood  <david.sherwood@arm.com>
22749         * calls.c (load_register_parameters): Cope with polynomial
22750         mode sizes.  Require a constant size for BLKmode parameters
22751         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22752         forces a parameter to be padded at the lsb end in order to
22753         fill a complete number of words, require the parameter size
22754         to be ordered wrt UNITS_PER_WORD.
22756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22757             Alan Hayward  <alan.hayward@arm.com>
22758             David Sherwood  <david.sherwood@arm.com>
22760         * reload1.c (spill_stack_slot_width): Change element type
22761         from unsigned int to poly_uint64_pod.
22762         (alter_reg): Treat mode sizes as polynomial.
22764 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22765             Alan Hayward  <alan.hayward@arm.com>
22766             David Sherwood  <david.sherwood@arm.com>
22768         * reload.c (complex_word_subreg_p): New function.
22769         (reload_inner_reg_of_subreg, push_reload): Use it.
22771 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22772             Alan Hayward  <alan.hayward@arm.com>
22773             David Sherwood  <david.sherwood@arm.com>
22775         * lra-constraints.c (process_alt_operands): Reject matched
22776         operands whose sizes aren't ordered.
22777         (match_reload): Refer to this check here.
22779 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22780             Alan Hayward  <alan.hayward@arm.com>
22781             David Sherwood  <david.sherwood@arm.com>
22783         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22784         that the mode size is in the set {1, 2, 4, 8, 16}.
22786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22787             Alan Hayward  <alan.hayward@arm.com>
22788             David Sherwood  <david.sherwood@arm.com>
22790         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22791         Use plus_constant instead of gen_rtx_PLUS.
22793 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22794             Alan Hayward  <alan.hayward@arm.com>
22795             David Sherwood  <david.sherwood@arm.com>
22797         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22798         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22799         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22800         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22801         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22802         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22803         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22804         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22805         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22806         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22807         a poly_int64.
22808         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22809         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22810         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22811         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22812         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22813         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22814         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22815         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22816         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22817         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22818         function.
22819         * expr.c (emit_move_resolve_push): Treat the input and result
22820         of PUSH_ROUNDING as a poly_int64.
22821         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22822         (emit_push_insn): Likewise.
22823         * lra-eliminations.c (mark_not_eliminable): Likewise.
22824         * recog.c (push_operand): Likewise.
22825         * reload1.c (elimination_effects): Likewise.
22826         * rtlanal.c (nonzero_bits1): Likewise.
22827         * calls.c (store_one_arg): Likewise.  Require the padding to be
22828         known at compile time.
22830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22831             Alan Hayward  <alan.hayward@arm.com>
22832             David Sherwood  <david.sherwood@arm.com>
22834         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22835         Use plus_constant instead of gen_rtx_PLUS.
22837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22838             Alan Hayward  <alan.hayward@arm.com>
22839             David Sherwood  <david.sherwood@arm.com>
22841         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22842         rather than an int.
22844 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22845             Alan Hayward  <alan.hayward@arm.com>
22846             David Sherwood  <david.sherwood@arm.com>
22848         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22849         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22850         via stack temporaries.  Treat the mode size as polynomial too.
22852 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22853             Alan Hayward  <alan.hayward@arm.com>
22854             David Sherwood  <david.sherwood@arm.com>
22856         * expr.c (expand_expr_real_2): When handling conversions involving
22857         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22858         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22859         as a poly_uint64 too.
22861 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22862             Alan Hayward  <alan.hayward@arm.com>
22863             David Sherwood  <david.sherwood@arm.com>
22865         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
22872         REGMODE_NATURAL_SIZE.
22873         * expmed.c (store_bit_field_1): Likewise.
22874         * expr.c (store_constructor): Likewise.
22875         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22876         and polynomial REGMODE_NATURAL_SIZE.
22877         (gen_lowpart_common): Likewise.
22878         * reginfo.c (record_subregs_of_mode): Likewise.
22879         * rtlanal.c (read_modify_subreg_p): Likewise.
22881 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22882             Alan Hayward  <alan.hayward@arm.com>
22883             David Sherwood  <david.sherwood@arm.com>
22885         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22886         numbers of elements.
22888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22889             Alan Hayward  <alan.hayward@arm.com>
22890             David Sherwood  <david.sherwood@arm.com>
22892         * match.pd: Cope with polynomial numbers of vector elements.
22894 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22895             Alan Hayward  <alan.hayward@arm.com>
22896             David Sherwood  <david.sherwood@arm.com>
22898         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22899         in a POINTER_PLUS_EXPR.
22901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22902             Alan Hayward  <alan.hayward@arm.com>
22903             David Sherwood  <david.sherwood@arm.com>
22905         * omp-simd-clone.c (simd_clone_subparts): New function.
22906         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22907         (ipa_simd_modify_function_body): Likewise.
22909 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22910             Alan Hayward  <alan.hayward@arm.com>
22911             David Sherwood  <david.sherwood@arm.com>
22913         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22914         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22915         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22916         (expand_vector_condition, vector_element): Likewise.
22917         (subparts_gt): New function.
22918         (get_compute_type): Use subparts_gt.
22919         (count_type_subparts): Delete.
22920         (expand_vector_operations_1): Use subparts_gt instead of
22921         count_type_subparts.
22923 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22924             Alan Hayward  <alan.hayward@arm.com>
22925             David Sherwood  <david.sherwood@arm.com>
22927         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22928         (vect_compile_time_alias): ...this new function.  Do the calculation
22929         on poly_ints rather than trees.
22930         (vect_prune_runtime_alias_test_list): Update call accordingly.
22932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22933             Alan Hayward  <alan.hayward@arm.com>
22934             David Sherwood  <david.sherwood@arm.com>
22936         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22937         numbers of units.
22938         (vect_schedule_slp_instance): Likewise.
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         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22945         constant and extern definitions for variable-length vectors.
22946         (vect_get_constant_vectors): Note that the number of units
22947         is known to be constant.
22949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22950             Alan Hayward  <alan.hayward@arm.com>
22951             David Sherwood  <david.sherwood@arm.com>
22953         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22954         of units as polynomial.  Choose between WIDE and NARROW based
22955         on multiple_p.
22957 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22958             Alan Hayward  <alan.hayward@arm.com>
22959             David Sherwood  <david.sherwood@arm.com>
22961         * tree-vect-stmts.c (simd_clone_subparts): New function.
22962         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22969         vectors as polynomial.  Use build_index_vector for
22970         IFN_GOMP_SIMD_LANE.
22972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22973             Alan Hayward  <alan.hayward@arm.com>
22974             David Sherwood  <david.sherwood@arm.com>
22976         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22977         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22978         for variable-length vectors.
22979         (vectorizable_mask_load_store): Treat the number of units as
22980         polynomial, asserting that it is constant if the condition has
22981         already been enforced.
22982         (vectorizable_store, vectorizable_load): 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         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22989         of units as polynomial.  Punt if we can't tell at compile time
22990         which vector contains the final result.
22992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22993             Alan Hayward  <alan.hayward@arm.com>
22994             David Sherwood  <david.sherwood@arm.com>
22996         * tree-vect-loop.c (vectorizable_induction): Treat the number
22997         of units as polynomial.  Punt on SLP inductions.  Use an integer
22998         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22999         cast of such a series for variable-length floating-point
23000         reductions.
23002 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23003             Alan Hayward  <alan.hayward@arm.com>
23004             David Sherwood  <david.sherwood@arm.com>
23006         * tree.h (build_index_vector): Declare.
23007         * tree.c (build_index_vector): New function.
23008         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
23009         of units as polynomial, forcibly converting it to a constant if
23010         vectorizable_reduction has already enforced the condition.
23011         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
23012         to create a {1,2,3,...} vector.
23013         (vectorizable_reduction): Treat the number of units as polynomial.
23014         Choose vectype_in based on the largest scalar element size rather
23015         than the smallest number of units.  Enforce the restrictions
23016         relied on above.
23018 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23019             Alan Hayward  <alan.hayward@arm.com>
23020             David Sherwood  <david.sherwood@arm.com>
23022         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
23023         number of units as polynomial.
23025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23026             Alan Hayward  <alan.hayward@arm.com>
23027             David Sherwood  <david.sherwood@arm.com>
23029         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
23030         * target.def (autovectorize_vector_sizes): Return the vector sizes
23031         by pointer, using vector_sizes rather than a bitmask.
23032         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
23033         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
23034         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
23035         Likewise.
23036         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
23037         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
23038         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
23039         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
23040         * omp-general.c (omp_max_vf): Likewise.
23041         * omp-low.c (omp_clause_aligned_alignment): Likewise.
23042         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
23043         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23044         * tree-vect-slp.c (vect_slp_bb): Likewise.
23045         * doc/tm.texi: Regenerate.
23046         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23047         to a poly_uint64.
23048         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23049         the vector size as a poly_uint64 rather than an unsigned int.
23050         (current_vector_size): Change from an unsigned int to a poly_uint64.
23051         (get_vectype_for_scalar_type): Update accordingly.
23052         * tree.h (build_truth_vector_type): Take the size and number of
23053         units as a poly_uint64 rather than an unsigned int.
23054         (build_vector_type): Add a temporary overload that takes
23055         the number of units as a poly_uint64 rather than an unsigned int.
23056         * tree.c (make_vector_type): Likewise.
23057         (build_truth_vector_type): Take the number of units as a poly_uint64
23058         rather than an unsigned int.
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         * target.def (get_mask_mode): Take the number of units and length
23065         as poly_uint64s rather than unsigned ints.
23066         * targhooks.h (default_get_mask_mode): Update accordingly.
23067         * targhooks.c (default_get_mask_mode): Likewise.
23068         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23069         * doc/tm.texi: Regenerate.
23071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23072             Alan Hayward  <alan.hayward@arm.com>
23073             David Sherwood  <david.sherwood@arm.com>
23075         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23076         * omp-general.c (omp_max_vf): Likewise.
23077         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23078         (expand_omp_simd): Handle polynomial safelen.
23079         * omp-low.c (omplow_simd_context): Add a default constructor.
23080         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23081         (lower_rec_simd_input_clauses): Update accordingly.
23082         (lower_rec_input_clauses): Likewise.
23084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23085             Alan Hayward  <alan.hayward@arm.com>
23086             David Sherwood  <david.sherwood@arm.com>
23088         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23089         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23090         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23091         (vect_analyze_slp_cost): Likewise.
23092         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23093         (vect_model_load_cost): Likewise.
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-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23100         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23101         from an unsigned int * to a poly_uint64_pod *.
23102         (calculate_unrolling_factor): New function.
23103         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
23110         from an unsigned int to a poly_uint64.
23111         (_loop_vec_info::slp_unrolling_factor): Likewise.
23112         (_loop_vec_info::vectorization_factor): Change from an int
23113         to a poly_uint64.
23114         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23115         (vect_get_num_vectors): New function.
23116         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23117         (vect_get_num_copies): Use vect_get_num_vectors.
23118         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23119         to an unsigned int *.
23120         (vect_analyze_data_refs): Change min_vf from an int * to a
23121         poly_uint64 *.
23122         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23123         than an unsigned HOST_WIDE_INT.
23124         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23125         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23126         to an unsigned int *.
23127         (vect_analyze_data_ref_dependences): Likewise.
23128         (vect_compute_data_ref_alignment): Handle polynomial vf.
23129         (vect_enhance_data_refs_alignment): Likewise.
23130         (vect_prune_runtime_alias_test_list): Likewise.
23131         (vect_shift_permute_load_chain): Likewise.
23132         (vect_supportable_dr_alignment): Likewise.
23133         (dependence_distance_ge_vf): Take the vectorization factor as a
23134         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23135         (vect_analyze_data_refs): Change min_vf from an int * to a
23136         poly_uint64 *.
23137         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23138         vfm1 as a poly_uint64 rather than an int.  Make the same change
23139         for the returned bound_scalar.
23140         (vect_gen_vector_loop_niters): Handle polynomial vf.
23141         (vect_do_peeling): Likewise.  Update call to
23142         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23143         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23144         be constant.
23145         * tree-vect-loop.c (vect_determine_vectorization_factor)
23146         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23147         (vect_get_known_peeling_cost): Likewise.
23148         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23149         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23150         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23151         updating the upper bounds of the loop.
23152         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23153         rather than an int.
23154         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23155         polynomial unroll factors.
23156         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23157         (vect_make_slp_decision): Likewise.
23158         (vect_supported_load_permutation_p): Likewise, and polynomial
23159         vf too.
23160         (vect_analyze_slp_cost): Handle polynomial vf.
23161         (vect_slp_analyze_node_operations): Likewise.
23162         (vect_slp_analyze_bb_1): Likewise.
23163         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23164         than an unsigned HOST_WIDE_INT.
23165         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23166         (vectorizable_load): Handle polynomial vf.
23167         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23168         a poly_uint64.
23169         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23171 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23172             Alan Hayward  <alan.hayward@arm.com>
23173             David Sherwood  <david.sherwood@arm.com>
23175         * match.pd: Handle bit operations involving three constants
23176         and try to fold one pair.
23178 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23180         * tree-vect-loop-manip.c: Include gimple-fold.h.
23181         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23182         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23183         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23184         Add a path that uses a step of VF instead of 1, but disable it
23185         for now.
23186         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23187         and niters_no_overflow parameters.  Update calls to
23188         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23189         Create a new SSA name if the latter choses to use a ste other
23190         than zero, and return it via niters_vector_mult_vf_var.
23191         * tree-vect-loop.c (vect_transform_loop): Update calls to
23192         vect_do_peeling, vect_gen_vector_loop_niters and
23193         slpeel_make_loop_iterate_ntimes.
23194         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23195         (vect_gen_vector_loop_niters): Update declarations after above changes.
23197 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23199         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23200         128-bit round to integer instructions.
23201         (ceil<mode>2): Likewise.
23202         (btrunc<mode>2): Likewise.
23203         (round<mode>2): Likewise.
23205 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23207         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23208         unaligned VSX load/store on P8/P9.
23209         (expand_block_clear): Allow the use of unaligned VSX
23210         load/store on P8/P9.
23212 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23214         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23215         New function.
23216         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23217         swap associated with both a load and a store.
23219 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23221         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23222         * config/riscv/riscv.md (clear_cache): Use it.
23224 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23226         * web.c: Remove out-of-date comment.
23228 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23230         * expr.c (fixup_args_size_notes): Check that any existing
23231         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23232         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23233         (emit_single_push_insn): ...here.
23235 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23237         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23238         (const_vector_encoded_nelts): New function.
23239         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23240         (const_vector_int_elt, const_vector_elt): Declare.
23241         * emit-rtl.c (const_vector_int_elt_1): New function.
23242         (const_vector_elt): Likewise.
23243         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23244         of CONST_VECTOR_ELT.
23246 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23248         * expr.c: Include rtx-vector-builder.h.
23249         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23250         directly on the tree encoding.
23251         (const_vector_from_tree): Likewise.
23252         * optabs.c: Include rtx-vector-builder.h.
23253         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23254         sequence of "u" values.
23255         * vec-perm-indices.c: Include rtx-vector-builder.h.
23256         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23257         directly on the vec_perm_indices encoding.
23259 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23261         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23262         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23263         * rtx-vector-builder.h: New file.
23264         * rtx-vector-builder.c: Likewise.
23265         * rtl.h (rtx_def::u2): Add a const_vector field.
23266         (CONST_VECTOR_NPATTERNS): New macro.
23267         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23268         (CONST_VECTOR_DUPLICATE_P): Likewise.
23269         (CONST_VECTOR_STEPPED_P): Likewise.
23270         (CONST_VECTOR_ENCODED_ELT): Likewise.
23271         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23272         (unwrap_const_vec_duplicate): Likewise.
23273         (const_vec_series_p): Check for a non-duplicated vector encoding.
23274         Say that the function only returns true for integer vectors.
23275         * emit-rtl.c: Include rtx-vector-builder.h.
23276         (gen_const_vec_duplicate_1): Delete.
23277         (gen_const_vector): Call gen_const_vec_duplicate instead of
23278         gen_const_vec_duplicate_1.
23279         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23280         (gen_const_vec_duplicate): Use rtx_vector_builder.
23281         (gen_const_vec_series): Likewise.
23282         (gen_rtx_CONST_VECTOR): Likewise.
23283         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23284         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23285         Build a new vector rather than modifying a CONST_VECTOR in-place.
23286         (handle_special_swappables): Update call accordingly.
23287         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23288         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23289         Build a new vector rather than modifying a CONST_VECTOR in-place.
23290         (handle_special_swappables): Update call accordingly.
23292 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23294         * simplify-rtx.c (simplify_const_binary_operation): Use
23295         CONST_VECTOR_ELT instead of XVECEXP.
23297 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23299         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23300         the selector elements to be different from the data elements
23301         if the selector is a VECTOR_CST.
23302         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23303         ssizetype for the selector.
23305 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23307         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23308         before testing each element individually.
23309         * tree-vect-generic.c (lower_vec_perm): Likewise.
23311 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23313         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23314         * selftest-run-tests.c (selftest::run_tests): Call it.
23315         * vector-builder.h (vector_builder::operator ==): New function.
23316         (vector_builder::operator !=): Likewise.
23317         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23318         (vec_perm_indices::all_from_input_p): New function.
23319         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23320         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23321         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23322         instead of reading the VECTOR_CST directly.  Detect whether both
23323         vector inputs are the same before constructing the vec_perm_indices,
23324         and update the number of inputs argument accordingly.  Use the
23325         utility functions added above.  Only construct sel2 if we need to.
23327 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23329         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23330         the broadcast of the low byte.
23331         (expand_mult_highpart): Use an explicit encoding for the permutes.
23332         * optabs-query.c (can_mult_highpart_p): Likewise.
23333         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23334         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23335         (vectorizable_bswap): Likewise.
23336         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23337         explicit encoding for the power-of-2 permutes.
23338         (vect_permute_store_chain): Likewise.
23339         (vect_grouped_load_supported): Likewise.
23340         (vect_permute_load_chain): Likewise.
23342 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23344         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23345         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23346         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23347         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23348         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23349         (vect_gen_perm_mask_any): Likewise.
23351 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23353         * int-vector-builder.h: New file.
23354         * vec-perm-indices.h: Include int-vector-builder.h.
23355         (vec_perm_indices): Redefine as an int_vector_builder.
23356         (auto_vec_perm_indices): Delete.
23357         (vec_perm_builder): Redefine as a stand-alone class.
23358         (vec_perm_indices::vec_perm_indices): New function.
23359         (vec_perm_indices::clamp): Likewise.
23360         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23361         (vec_perm_indices::new_vector): New function.
23362         (vec_perm_indices::new_expanded_vector): Update for new
23363         vec_perm_indices class.
23364         (vec_perm_indices::rotate_inputs): New function.
23365         (vec_perm_indices::all_in_range_p): Operate directly on the
23366         encoded form, without computing elided elements.
23367         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23368         encoding.  Update for new vec_perm_indices class.
23369         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23370         the given vec_perm_builder.
23371         (expand_vec_perm_var): Update vec_perm_builder constructor.
23372         (expand_mult_highpart): Use vec_perm_builder instead of
23373         auto_vec_perm_indices.
23374         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23375         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23376         or double series encoding as appropriate.
23377         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23378         vec_perm_indices instead of auto_vec_perm_indices.
23379         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23380         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23381         (vect_permute_store_chain): Likewise.
23382         (vect_grouped_load_supported): Likewise.
23383         (vect_permute_load_chain): Likewise.
23384         (vect_shift_permute_load_chain): Likewise.
23385         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23386         (vect_transform_slp_perm_load): Likewise.
23387         (vect_schedule_slp_instance): Likewise.
23388         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23389         (vectorizable_mask_load_store): Likewise.
23390         (vectorizable_bswap): Likewise.
23391         (vectorizable_store): Likewise.
23392         (vectorizable_load): Likewise.
23393         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23394         vec_perm_indices instead of auto_vec_perm_indices.  Use
23395         tree_to_vec_perm_builder to read the vector from a tree.
23396         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23397         vec_perm_builder instead of a vec_perm_indices.
23398         (have_whole_vector_shift): Use vec_perm_builder and
23399         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23400         truncation to calc_vec_perm_mask_for_shift.
23401         (vect_create_epilog_for_reduction): Likewise.
23402         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23403         from auto_vec_perm_indices to vec_perm_indices.
23404         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23405         instead of changing individual elements.
23406         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23407         the vector in d.perm.
23408         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23409         from auto_vec_perm_indices to vec_perm_indices.
23410         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23411         instead of changing individual elements.
23412         (arm_vectorize_vec_perm_const): Use new_vector to install
23413         the vector in d.perm.
23414         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23415         Update vec_perm_builder constructor.
23416         (rs6000_expand_interleave): Likewise.
23417         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23418         (rs6000_expand_interleave): Likewise.
23420 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23422         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23423         to qimode could truncate the indices.
23424         * optabs.c (expand_vec_perm_var): Likewise.
23426 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23428         * Makefile.in (OBJS): Add vec-perm-indices.o.
23429         * vec-perm-indices.h: New file.
23430         * vec-perm-indices.c: Likewise.
23431         * target.h (vec_perm_indices): Replace with a forward class
23432         declaration.
23433         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23434         * optabs.h: Include vec-perm-indices.h.
23435         (expand_vec_perm): Delete.
23436         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23437         (expand_vec_perm_const): Declare.
23438         * target.def (vec_perm_const_ok): Replace with...
23439         (vec_perm_const): ...this new hook.
23440         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23441         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23442         * doc/tm.texi: Regenerate.
23443         * optabs.def (vec_perm_const): Delete.
23444         * doc/md.texi (vec_perm_const): Likewise.
23445         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23446         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23447         expand_vec_perm for constant permutation vectors.  Assert that
23448         the mode of variable permutation vectors is the integer equivalent
23449         of the mode that is being permuted.
23450         * optabs-query.h (selector_fits_mode_p): Declare.
23451         * optabs-query.c: Include vec-perm-indices.h.
23452         (selector_fits_mode_p): New function.
23453         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23454         is defined, instead of checking whether the vec_perm_const_optab
23455         exists.  Use targetm.vectorize.vec_perm_const instead of
23456         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23457         fit in the vector mode before using a variable permute.
23458         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23459         vec_perm_indices instead of an rtx.
23460         (expand_vec_perm): Replace with...
23461         (expand_vec_perm_const): ...this new function.  Take the selector
23462         as a vec_perm_indices rather than an rtx.  Also take the mode of
23463         the selector.  Update call to shift_amt_for_vec_perm_mask.
23464         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23465         Use vec_perm_indices::new_expanded_vector to expand the original
23466         selector into bytes.  Check whether the indices fit in the vector
23467         mode before using a variable permute.
23468         (expand_vec_perm_var): Make global.
23469         (expand_mult_highpart): Use expand_vec_perm_const.
23470         * fold-const.c: Includes vec-perm-indices.h.
23471         * tree-ssa-forwprop.c: Likewise.
23472         * tree-vect-data-refs.c: Likewise.
23473         * tree-vect-generic.c: Likewise.
23474         * tree-vect-loop.c: Likewise.
23475         * tree-vect-slp.c: Likewise.
23476         * tree-vect-stmts.c: Likewise.
23477         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23478         Delete.
23479         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23480         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23481         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23482         (aarch64_vectorize_vec_perm_const): ...this new function.
23483         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23484         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23485         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23486         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23487         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23488         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23489         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23490         into...
23491         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23492         check for NEON modes.
23493         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23494         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23495         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23496         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23497         into...
23498         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23499         the old VEC_PERM_CONST conditions.
23500         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23501         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23502         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23503         (ia64_vectorize_vec_perm_const_ok): Merge into...
23504         (ia64_vectorize_vec_perm_const): ...this new function.
23505         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23506         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23507         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23508         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23509         * config/mips/mips.c (mips_expand_vec_perm_const)
23510         (mips_vectorize_vec_perm_const_ok): Merge into...
23511         (mips_vectorize_vec_perm_const): ...this new function.
23512         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23513         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23514         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23515         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23516         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23517         (rs6000_expand_vec_perm_const): Delete.
23518         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23519         Delete.
23520         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23521         (altivec_expand_vec_perm_const_le): Take each operand individually.
23522         Operate on constant selectors rather than rtxes.
23523         (altivec_expand_vec_perm_const): Likewise.  Update call to
23524         altivec_expand_vec_perm_const_le.
23525         (rs6000_expand_vec_perm_const): Delete.
23526         (rs6000_vectorize_vec_perm_const_ok): Delete.
23527         (rs6000_vectorize_vec_perm_const): New function.
23528         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23529         an element count and rtx array.
23530         (rs6000_expand_extract_even): Update call accordingly.
23531         (rs6000_expand_interleave): Likewise.
23532         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23533         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23534         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23535         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23536         (rs6000_expand_vec_perm_const): Delete.
23537         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23538         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23539         (altivec_expand_vec_perm_const_le): Take each operand individually.
23540         Operate on constant selectors rather than rtxes.
23541         (altivec_expand_vec_perm_const): Likewise.  Update call to
23542         altivec_expand_vec_perm_const_le.
23543         (rs6000_expand_vec_perm_const): Delete.
23544         (rs6000_vectorize_vec_perm_const_ok): Delete.
23545         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23546         reference to the SPE evmerge intructions.
23547         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23548         an element count and rtx array.
23549         (rs6000_expand_extract_even): Update call accordingly.
23550         (rs6000_expand_interleave): Likewise.
23551         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23552         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23553         new function.
23554         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23556 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23558         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23559         vector mode and that that mode matches the mode of the data
23560         being permuted.
23561         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23562         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23563         directly using expand_vec_perm_1 when forcing selectors into
23564         registers.
23565         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23567 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23569         * optabs-query.h (can_vec_perm_p): Delete.
23570         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23571         * optabs-query.c (can_vec_perm_p): Split into...
23572         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23573         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23574         particular selector is valid.
23575         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23576         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23577         (vect_grouped_load_supported): Likewise.
23578         (vect_shift_permute_load_chain): Likewise.
23579         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23580         (vect_transform_slp_perm_load): Likewise.
23581         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23582         (vectorizable_bswap): Likewise.
23583         (vect_gen_perm_mask_checked): Likewise.
23584         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23585         implementations of variable permutation vectors into account
23586         when deciding which selector to use.
23587         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23588         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23589         with a false third argument.
23590         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23591         to test whether the constant selector is valid and can_vec_perm_var_p
23592         to test whether a variable selector is valid.
23594 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23596         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23597         * optabs-query.c (can_vec_perm_p): Likewise.
23598         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23599         instead of vec_perm_indices.
23600         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23601         (vect_gen_perm_mask_checked): Likewise,
23602         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23603         (vect_gen_perm_mask_checked): Likewise,
23605 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23607         * optabs-query.h (qimode_for_vec_perm): Declare.
23608         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23609         (qimode_for_vec_perm): ...this new function.
23610         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23612 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23614         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23615         does not have a conditional at the top.
23617 2018-01-02  Richard Biener  <rguenther@suse.de>
23619         * ipa-inline.c (big_speedup_p): Fix expression.
23621 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23623         PR target/81616
23624         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23625         for generic 4->6.
23627 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23629         PR target/81616
23630         Generic tuning.
23631         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23632         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23633         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23634         cond_taken_branch_cost 3->4.
23636 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23638         PR tree-optimization/83581
23639         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23640         TODO_cleanup_cfg if any changes have been made.
23642         PR middle-end/83608
23643         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23644         convert_modes if target mode has the right side, but different mode
23645         class.
23647         PR middle-end/83609
23648         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23649         last argument when extracting from CONCAT.  If either from_real or
23650         from_imag is NULL, use expansion through memory.  If result is not
23651         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23652         the parts directly to inner mode, if even that fails, use expansion
23653         through memory.
23655         PR middle-end/83623
23656         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23657         check for bswap in mode rather than HImode and use that in expand_unop
23658         too.
23660 Copyright (C) 2018 Free Software Foundation, Inc.
23662 Copying and distribution of this file, with or without modification,
23663 are permitted in any medium without royalty provided the copyright
23664 notice and this notice are preserved.