[debug] Add debug and earlydebug dumps
[official-gcc.git] / gcc / ChangeLog
blob47dd9eaa4cae2ebee61b54d2c7d584717e594ecd
1 2018-08-21  Tom de Vries  <tdevries@suse.de>
3         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
5         (debuginfo_early_stop): Declare.
6         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8         (debuginfo_early_stop): New function.
9         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10         and debuginfo_early_stop.
11         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
12         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
13         (general_init): Call debuginfo_early_init.
14         (finalize): Call debuginfo_fini.
15         (do_compile): Call debuginfo_init.
16         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
17         -fdump-early-debug.
18         (@item -fdump-debug, @item -fdump-earlydebug): Add.
20 2018-08-21  Tom de Vries  <tdevries@suse.de>
22         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
23         flag_dump_noaddr and flag_dump_unnumbered.
25 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
27         * wide-int-range.cc (wide_int_range_abs): New.
28         (wide_int_range_order_set): Rename from wide_int_range_min_max.
29         * wide-int-range.h (wide_int_range_abs): New.
30         (wide_int_range_min_max): New.
31         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
32         case to call wide_int_range_abs.
33         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
34         (extract_range_from_abs_expr): Delete.
36 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
38         PR target/87033
39         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
40         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
41         for indexed loads.
43 2018-08-20  Nathan Sidwell  <nathan@acm.org>
44             Jeff Law <law@redhat.com>
46         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
47         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
49 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
51         PR other/84889
52         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
53         (decl_attributes): Likewise.
54         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
55         instance.
56         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
57         * diagnostic-core.h (class auto_diagnostic_group): New class.
58         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
59         (diagnostic_report_diagnostic): Handle the first diagnostics within
60         a group.
61         (emit_diagnostic): Add auto_diagnostic_group instance.
62         (inform): Likewise.
63         (inform_n): Likewise.
64         (warning): Likewise.
65         (warning_at): Likewise.
66         (warning_n): Likewise.
67         (pedwarn): Likewise.
68         (permerror): Likewise.
69         (error): Likewise.
70         (error_n): Likewise.
71         (error_at): Likewise.
72         (sorry): Likewise.
73         (fatal_error): Likewise.
74         (internal_error): Likewise.
75         (internal_error_no_backtrace): Likewise.
76         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
77         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
78         * diagnostic.h (struct diagnostic_context): Add fields
79         "diagnostic_group_nesting_depth",
80         "diagnostic_group_emission_count", "begin_group_cb",
81         "end_group_cb".
82         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
83         Add auto_diagnostic_group instance(s).
84         (find_explicit_erroneous_behavior): Likewise.
85         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
86         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
87         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
88         (gimplify_va_arg_expr): Likewise.
89         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
90         (HSA_SORRY_AT): Likewise.
91         * ipa-devirt.c (compare_virtual_tables): Likewise.
92         (warn_odr): Likewise.
93         * multiple_target.c (expand_target_clones): Likewise.
94         * opts-common.c (cmdline_handle_error): Likewise.
95         * reginfo.c (globalize_reg): Likewise.
96         * substring-locations.c (format_warning_n_va): Likewise.
97         * tree-inline.c (expand_call_inline): Likewise.
98         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
99         * tree-ssa-loop-niter.c
100         (do_warn_aggressive_loop_optimizations): Likewise.
101         * tree-ssa-uninit.c (warn_uninit): Likewise.
102         * tree.c (warn_deprecated_use): Likewise.
104 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
106         PR target/87014
107         * config/i386/i386.md (eh_return): Always update EH return
108         address in word_mode.
110 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
112         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
113         TARGET_SPLIT_COMPLEX_ARG is defined.
115 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
117         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
119 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
121         PR target/86984
122         * expr.c (expand_assignment): Assert that bitpos is positive.
123         (store_field): Likewise
124         (expand_expr_real_1): Make sure that bitpos is positive.
125         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
126         integer overflow.
128 2018-08-20  Nathan Sidwell  <nathan@acm.org>
130         * Makefile.in (CPP_ID_DATA_H): Delete.
131         (CPP_INTERNAL_H): Don't add it.
132         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
133         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
135 2018-08-20  Richard Biener  <rguenther@suse.de>
137         PR tree-optimization/78655
138         * tree-vrp.c (extract_range_from_binary_expr_1): Make
139         pointer + offset nonnull if either operand is nonnull work.
141 2018-08-20  Tom de Vries  <tdevries@suse.de>
143         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
144         unless the referenced die describes the added property using
145         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
146         Otherwise, add a DW_AT_location to the referenced die.
148 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
150         PR target/86994
151         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
152         register_operand when calling ix86_set_reg_reg_cost.
153         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
154         Set *total to 0 for operands that satisfy x86_64_immediate_operand
155         predicate and to 1 otherwise.
157 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
159         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
160         emit a diagnostic that it is not supported and reset the option.
161         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
162         supported and consume the option.  (ASM_FINAL_SPEC): New.
164 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
166         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
167         a sentence.
169 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
171         C-SKY port: Documentation
173         * doc/extend.texi (C-SKY Function Attributes): New section.
174         * doc/invoke.texi (Option Summary): Add C-SKY options.
175         (C-SKY Options): New section.
176         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
178 2018-08-17  Jojo  <jijie_rong@c-sky.com>
179             Huibin Wang  <huibin_wang@c-sky.com>
180             Sandra Loosemore  <sandra@codesourcery.com>
181             Chung-Lin Tang  <cltang@codesourcery.com>
183         C-SKY port: Backend implementation
185         * config/csky/*: New.
186         * common/config/csky/*: New.
188 2018-08-17  Jojo  <jijie_rong@c-sky.com>
189             Huibin Wang  <huibin_wang@c-sky.com>
190             Sandra Loosemore  <sandra@codesourcery.com>
191             Chung-Lin Tang  <cltang@codesourcery.com>
192             Andrew Jenner  <andrew@codesourcery.com>
194         C-SKY port: Configury
196         * config.gcc (csky-*-*): New.
197         * configure.ac: Add csky to targets for dwarf2 debug_line support.
198         * configure: Regenerated.
200 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
202         * dump-context.h: Include "dumpfile.h".
203         (dump_context::dump_printf_va): Convert final param from va_list
204         to va_list *.  Convert from ATTRIBUTE_PRINTF to
205         ATTRIBUTE_GCC_DUMP_PRINTF.
206         (dump_context::dump_printf_loc_va): Likewise.
207         * dumpfile.c: Include "stringpool.h".
208         (make_item_for_dump_printf_va): Delete.
209         (make_item_for_dump_printf): Delete.
210         (class dump_pretty_printer): New class.
211         (dump_pretty_printer::dump_pretty_printer): New ctor.
212         (dump_pretty_printer::emit_items): New member function.
213         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
214         function.
215         (dump_pretty_printer::emit_item): New member function.
216         (dump_pretty_printer::stash_item): New member function.
217         (dump_pretty_printer::format_decoder_cb): New member function.
218         (dump_pretty_printer::decode_format): New member function.
219         (dump_context::dump_printf_va): Reimplement in terms of
220         dump_pretty_printer.
221         (dump_context::dump_printf_loc_va): Convert final param from va_list
222         to va_list *.
223         (dump_context::begin_scope): Reimplement call to
224         make_item_for_dump_printf.
225         (dump_printf): Update for change to dump_printf_va.
226         (dump_printf_loc): Likewise.
227         (selftest::test_capture_of_dump_calls): Convert "stmt" from
228         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
229         with %T, %E, and %G.
230         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
231         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
232         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
233         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
234         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
235         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
236         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
237         within a dump_printf_loc call to "%wu".
238         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
239         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
240         missing space after "=".
241         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
242         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
243         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
244         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
245         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
246         duplicate "vectorized" from message.
248 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
250         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
251         polyNxK_t element's TYPE_STRING_FLAG.
253 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
255         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
256         (they were unnamed before).  Fix comments.
258 2018-08-17  Nathan Sidwell  <nathan@acm.org>
260         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
262 2018-08-17  Richard Biener  <rguenther@suse.de>
264         PR tree-optimization/86841
265         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
267 2018-08-17  Martin Liska  <mliska@suse.cz>
269         * common.opt: Remove Warn, Init and Report for options with
270         Ignore/Deprecated flag. Warning is done automatically for
271         Deprecated flags.
272         * config/i386/i386.opt: Likewise.
273         * config/ia64/ia64.opt: Likewise.
274         * config/rs6000/rs6000.opt: Likewise.
275         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
276         Remove usage of flag_check_pointer_bounds.
277         * lto-wrapper.c (merge_and_complain): Do not handle
278         OPT_fcheck_pointer_bounds.
279         (append_compiler_options): Likewise.
280         * opt-functions.awk: Do not handle Deprecated.
281         * optc-gen.awk: Check that Var, Report and Init are not
282         used for an option with Ignore/Deprecated flag.
283         * opts-common.c (decode_cmdline_option): Do not report
284         CL_ERR_DEPRECATED.
285         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
286         options.
287         * opts.h (struct cl_option): Remove cl_deprecated flag.
288         (CL_ERR_DEPRECATED): Remove error enum value.
290 2018-08-17  Richard Biener  <rguenther@suse.de>
292         PR middle-end/86505
293         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
294         across a va-arg-pack using call adjust its return value accordingly.
296 2018-08-16  Martin Sebor  <msebor@redhat.com>
298         PR tree-optimization/86853
299         * gimple-ssa-sprintf.c (struct format_result): Rename member.
300         (struct fmtresult): Add member and initialize it in ctors.
301         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
302         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
303         (format_directive): Set POSUNDER4K when MAYFAIL is set.
304         (parse_directive): Handle %C same as %c.
305         (sprintf_dom_walker::compute_format_length): Adjust.
306         (is_call_safe): Adjust.
308 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
310         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
311         for determining how to count the elements.
312         * builtins.h (c_strlen): Adjust prototype.
313         * expr.c (string_constant): Add new parameter mem_size.
314         Set *mem_size appropriately.
315         * expr.h (string_constant): Adjust protoype.
316         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
317         * gimple-fold.h (get_range_strlen): Adjust prototype.
318         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
319         (format_string): Call get_string_length with eltsize.
321 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
323         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
324         to emit the span, rather than setting it as the prefix.
326 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
328         * diagnostic-show-locus.c (layout::start_annotation_line): Add
329         "margin_char" parameter, defaulting to space.  Use it in place
330         of pp_space for the initial part of the margin.
331         (layout::print_leading_fixits): Use '+' when filling the margin
332         of line-insertion fix-it hints.
334 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
336         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
337         Delete.
339 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
341         * config/rs6000/altivec.md: Don't set length attribute to the default
342         value.
343         * config/rs6000/darwin.md: Ditto.
344         * config/rs6000/dfp.md: Ditto.
345         * config/rs6000/htm.md: Ditto.
346         * config/rs6000/rs6000.md: Ditto.
347         * config/rs6000/sync.md: Ditto.
348         * config/rs6000/vsx.md: Ditto.
350 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
352         * config/rs6000/altivec.md: Don't set length attribute to the default
353         value, for branch instructions.
354         * config/rs6000/darwin.md: Ditto.
355         * config/rs6000/rs6000.md: Ditto.
357 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
359         * config/rs6000/rs6000.md (length): Always define as const_int 4.
360         (unnamed conditional branch define_insn): Set length to 4 or 8
361         depending on offset.
362         (<bd>_<mode>): Similar, for alternative 0.
363         (<bd>tf_<mode>): Ditto.
365 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
367         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
369 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
371         * doc/rtl.texi: Replace old RTX class names with new names.
374 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
376         * expmed.h (canonicalize_comparison): New declaration.
377         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
378         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
379         * optabs.c (prepare_cmp_insn): Likewise.
380         * rtl.h (unsigned_condition_p): New function which checks if a
381         comparison operator is unsigned.
383 2018-08-16  Nathan Sidwell  <nathan@acm.org>
385         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
386         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
388 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
390         PR target/84711
391         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
392         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
393         (mov<mov>): ..this and enable unconditionally.
395 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
397         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
399 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
401         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
402         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
403         "Common" with "Target".
405 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
407         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
408         * doc/invoke.texi (mmitigate-rop): Remove.
409         * config/i386/i386.c: Do not include "regrename.h".
410         (ix86_rop_should_change_byte_p, reg_encoded_number)
411         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
412         Remove.
413         (ix86_reorg): Remove call to ix86_mitigate_rop.
414         * config/i386/i386.md (attr "modrm_class"): Remove.
415         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
416         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
417         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
419 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
421         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
422         allow folding of mergeh() and mergel() for the float and double types.
423         (fold_mergehl_helper): Rework to handle building a permute tree
424         for float vectors.
426 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
428         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
429         for TARGET_SSE.
431 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
433         * common.opt (fdiagnostics-show-labels): New option.
434         * diagnostic-show-locus.c (class layout_range): Add field
435         "m_label".
436         (class layout): Add field "m_show_labels_p".
437         (layout_range::layout_range): Add param "label" and use it to
438         initialize m_label.
439         (make_range): Pass in NULL for new "label" param of layout_range's
440         ctor.
441         (layout::layout): Initialize m_show_labels_p.
442         (layout::maybe_add_location_range): Pass in loc_range->m_label
443         when constructing layout_range instances.
444         (struct line_label): New struct.
445         (layout::print_any_labels): New member function.
446         (layout::print_line): Call it if label-printing is enabled.
447         (selftest::test_one_liner_labels): New test.
448         (selftest::test_diagnostic_show_locus_one_liner): Call it.
449         * diagnostic.c (diagnostic_initialize): Initialize
450         context->show_labels_p.
451         * diagnostic.h (struct diagnostic_context): Add field
452         "show_labels_p".
453         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
454         -fno-diagnostics-show-labels.
455         * dwarf2out.c (gen_producer_string): Add
456         OPT_fdiagnostics_show_labels to the ignored options.
457         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
458         param.
459         (gcc_rich_location::maybe_add_expr): Likewise.
460         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
461         label" param, defaulting to NULL.
462         (gcc_rich_location::add_expr): Add "label" param.
463         (gcc_rich_location::maybe_add_expr): Likewise.
464         (class text_range_label): New class.
465         (class range_label_for_type_mismatch): New class.
466         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
467         of format_warning_va.
468         (fmtwarn_n): Likewise for new params of format_warning_n_va.
469         * lto-wrapper.c (merge_and_complain): Add
470         OPT_fdiagnostics_show_labels to the "pick one setting" options.
471         (append_compiler_options): Likewise to the dropped options.
472         (append_diag_options): Likewise to the passed-on options.
473         * opts.c (common_handle_option): Handle the new option.
474         * selftest-diagnostic.c
475         (test_diagnostic_context::test_diagnostic_context): Enable
476         show_labels_p.
477         * substring-locations.c: Include "gcc-rich-location.h".
478         (format_warning_n_va): Add "fmt_label" and "param_label" params
479         and use them as appropriate.
480         (format_warning_va): Add "fmt_label" and "param_label" params,
481         passing them on to format_warning_n_va.
482         (format_warning_at_substring): Likewise.
483         (format_warning_at_substring_n): Likewise.
484         * substring-locations.h (format_warning_va): Add "fmt_label" and
485         "param_label" params.
486         (format_warning_n_va): Likewise.
487         (format_warning_at_substring): Likewise.
488         (format_warning_at_substring_n): Likewise.
489         * toplev.c (general_init): Initialize global_dc->show_labels_p.
491 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
493         PR testsuite/86519
494         * builtins.c (expand_builtin_memcmp): Do not expand the call
495         when overflow is detected.
497 2018-08-15  Martin Sebor  <msebor@redhat.com>
499         PR tree-optimization/71625
500         * config/aarch64/aarch64-builtins.c
501         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
503 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
505         * config/s390/s390.c (s390_reorg): Remove loop.
507 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
509         * config/darwin.c
510          (darwin_function_switched_text_sections): Delete.
511         * gcc/config/darwin.h
512          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
514 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
516         PR target/81685
517         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
518         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
519         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
521 2018-08-15  Martin Liska  <mliska@suse.cz>
523         PR tree-optimization/86925
524         * predict.c (expr_expected_value_1): When taking
525         later predictor, assign also probability.
526         Use fold_build2_initializer_loc in order to fold
527         the expression in -frounding-math.
529 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
531         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
532         patterns.
533         (expand_vec_perm_1): Try the new method.
535 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
537         PR target/86547
538         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
539         Check whether lra_live_max_point is 0 before dividing.
541 2018-08-14  Martin Sebor  <msebor@redhat.com>
543         PR tree-optimization/86650
544         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
545         (vrp_prop::check_mem_ref): Same.
547 2018-08-13  Liu Hao <lh_mouse@126.com>
549         * pretty-print.c (eat_esc_sequence): Swap the foreground and
550         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
551         and clear it thereafter, as it only works for DBCS.
553 2018-08-13  Liu Hao <lh_mouse@126.com>
555         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
556         handle returned by _get_osf_handle().
558 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
560         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
561         for folding vec_perm.
563 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
565         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
566         Add support for gimple-folding of vec_pack() and vec_unpack()
567         intrinsics.
569 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
571         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
572         vec_xst variants to the list.
573         (rs6000_gimple_fold_builtin): Add support for folding unaligned
574         vector loads and stores.
576 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
578         * config.gcc (rs6000-ibm-aix4.x): Delete.
579         (rs6000-ibm-aix5.1): Delete.
580         (rs6000-ibm-aix5.2): Delete.
581         (rs6000-ibm-aix5.3): Delete.
582         * config/rs6000/aix43.h: Delete.
583         * config/rs6000/aix51.h: Delete.
584         * config/rs6000/aix52.h: Delete.
585         * config/rs6000/t-aix43: Delete.
587 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
589         * config/s390/s390.c (s390_decompose_constant_pool_ref):
590         New function.
591         (s390_decompose_address): Factor out constant pool ref
592         decomposition.
594 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
596         * config/nds32/nds32-predicates.c
597         (nds32_can_use_bclr_p): Change return type as bool.
598         (nds32_can_use_bset_p): Ditto.
599         (nds32_can_use_btgl_p): Ditto.
600         (nds32_can_use_bitci_p): Ditto.
601         * config/nds32/nds32-protos.h
602         (nds32_can_use_bclr_p): Change declaration.
603         (nds32_can_use_bset_p): Ditto.
604         (nds32_can_use_btgl_p): Ditto.
605         (nds32_can_use_bitci_p): Ditto.
607 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
609         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
610         Support -msched-prolog-epilog option.
611         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
613 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
615         * common/config/nds32/nds32-common.c
616         (nds32_option_optimization_table): Enalbe -malways-align.
618 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
620         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
621         extra_headers.
622         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
623         OPT_misr_secure_ case.
624         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
625         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
626         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
627         secure attribute.
628         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
629         (nds32_isr_info): New field security_level.
630         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
631         * config/nds32/nds32.md (return_internal): Consider critical attribute.
632         * config/nds32/nds32.opt (misr-secure): New option.
633         * config/nds32/nds32_init.inc: New file.
634         * config/nds32/nds32_isr.h: New file.
636 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
638         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
639         Update comment for atomic instructions.
640         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
641         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
642         Remove.
643         (atomic_loaddi): Revise fence expansion to only emit fence prior to
644         load for __ATOMIC_SEQ_CST model.
645         (atomic_loaddi_1): Remove float register target.
646         (atomic_storedi): Handle CONST_INT values.
647         (atomic_storedi_1): Remove float register source.  Add special case
648         for zero value.
649         (memory_barrier): New expander and insn.
651 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
653         PR tree-optimization/86835
654         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
655         new_stmt after def_gsi, make sure to insert new_square_stmt after
656         that stmt, not 2 stmts before it.
658 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
660         PR target/82418
661         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
662         instead of SWI48.
664 2018-08-10  Martin Liska  <mliska@suse.cz>
666         PR target/83610
667         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
668         function type.
669         * builtins.c (expand_builtin_expect_with_probability):
670         New function.
671         (expand_builtin_expect_with_probability): New function.
672         (build_builtin_expect_predicate): Add new argumnet probability
673         for BUILT_IN_EXPECT_WITH_PROBABILITY.
674         (fold_builtin_expect):
675         (fold_builtin_2):
676         (fold_builtin_3):
677         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
678         * builtins.h (fold_builtin_expect): Set new argument.
679         * doc/extend.texi: Document __builtin_expect_with_probability.
680         * doc/invoke.texi: Likewise.
681         * gimple-fold.c (gimple_fold_call): Pass new argument.
682         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
683         also BUILT_IN_EXPECT_WITH_PROBABILITY.
684         * predict.c (get_predictor_value): New function.
685         (expr_expected_value): Add new argument probability. Assume
686         that predictor and probability are always non-null.
687         (expr_expected_value_1): Likewise.  For __builtin_expect and
688         __builtin_expect_with_probability set probability.  Handle
689         combination in binary expressions.
690         (tree_predict_by_opcode): Simplify code by simply calling
691         get_predictor_value.
692         (pass_strip_predict_hints::execute): Add handling of
693         BUILT_IN_EXPECT_WITH_PROBABILITY.
694         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
695         new predictor.
696         * tree.h (DECL_BUILT_IN_P): New function.
698 2018-08-10  Martin Liska  <mliska@suse.cz>
700         PR tree-optimization/85799
701         * passes.def: Add argument for pass_strip_predict_hints.
702         * predict.c (class pass_strip_predict_hints): Add new argument
703         early_p.
704         (strip_predictor_early): New function.
705         (pass_strip_predict_hints::execute): Call the function to
706         strip predictors.
707         (strip_predict_hints): New function.
708         * predict.def: Fix comment.
710 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
712         * Makefile.in: Clarify which tm.texi to copy over to assert the
713         right to grant a GFDL license for all.
715 2018-08-09  Jeff Law  <law@redhat.com>
717         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
718         unused variable.
720 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
722         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
723         prototype.
725 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
727         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
728         reductions for variable-length vectors.
730 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
732         PR other/84889
733         * common.opt (fdiagnostics-show-line-numbers): New option.
734         * diagnostic-show-locus.c (class layout): Add fields
735         "m_show_line_numbers_p" and "m_linenum_width";
736         (num_digits): New function.
737         (test_num_digits): New function.
738         (layout::layout): Initialize new fields.  Update m_x_offset
739         logic to handle any left margin.
740         (layout::print_source_line): Print line number when requested.
741         (layout::start_annotation_line): New member function.
742         (layout::print_annotation_line): Call it.
743         (layout::print_leading_fixits): Likewise.
744         (layout::print_trailing_fixits): Likewise.  Update calls to
745         move_to_column for new parameter.
746         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
747         it to potentially call start_annotation_line.
748         (layout::show_ruler): Call start_annotation_line.
749         (selftest::test_line_numbers_multiline_range): New selftest.
750         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
751         and selftest::test_line_numbers_multiline_range.
752         * diagnostic.c (diagnostic_initialize): Initialize
753         show_line_numbers_p.
754         * diagnostic.h (struct diagnostic_context): Add field
755         "show_line_numbers_p".
756         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
757         -fno-diagnostics-show-line-numbers.
758         * dwarf2out.c (gen_producer_string): Add
759         OPT_fdiagnostics_show_line_numbers to the ignored options.
760         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
761         one setting" options.
762         (append_compiler_options): Likewise to the dropped options.
763         (append_diag_options): Likewise to the passed-on options.
764         * opts.c (common_handle_option): Handle the new option.
765         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
767 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
769         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
770         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
771         third argument of type "const signed char" to descriptions of
772         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
773         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
774         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
775         __builtin_bcdsub_ov functions.
777 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
779         PR tree-optimization/86858
780         * tree-vect-loop.c (vect_is_simple_reduction): Restore
781         flow_bb_inside_loop_p calls.
783 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
785         PR tree-optimization/86871
786         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
787         instead of gimple_assign_lhs.
789 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
791         PR target/86887
792         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
793         register constraint to operand 0.
794         (add<mode>3_carryinC): Likewise.
795         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
797 2018-08-09  Martin Liska  <mliska@suse.cz>
799         PR c/86895
800         * common.opt: Remove extra line.
802 2018-08-09  Martin Liska  <mliska@suse.cz>
804         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
805         at the end of a line, make first letter capital and end up
806         a sentence with a dot.
807         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
808         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
809         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
810         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
811         (PARAM_MAX_ISL_OPERATIONS): Likewise.
812         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
813         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
814         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
815         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
816         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
817         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
818         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
819         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
820         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
821         (PARAM_TREE_REASSOC_WIDTH): Likewise.
822         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
823         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
824         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
826 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
828         PR target/84332
829         * config/s390/s390.c (s390_option_override_internal): Reduce the
830         stack-clash-protection-probe-interval param if it would be too big
831         for z900.
833 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
835         PR target/46179
836         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
837         * config/m68k/m68k.c (handle_move_double): Don't call
838         m68k_final_prescan_insn.
839         (m68k_adjust_decorated_operand): Renamed from
840         m68k_final_prescan_insn, remove first and third operand and
841         simplify.
842         (print_operand): Call it.
843         (print_operand_address): Call it.
845 2018-08-08  Nathan Sidwell  <nathan@acm.org>
847         * diagnostic.c (diagnostic_report_current_module): Use
848         linemap_included_from & linemap_included_from_linemap.
850 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
852         * config/aarch64/aarch64-cores.def: Add phecda core.
853         * config/aarch64/aarch64-tune.md: Regenerate.
854         * doc/invoke.texi: Add phecda core.
856 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
858         PR target/85295
859         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
860         definitions.
861         * config/s390/s390.md ("movti"): Add more alternatives for
862         constant to GPR copies.
864 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
866         * config/s390/s390.c: Fix whitespace damage throughout the file.
867         * config/s390/s390.h: Likewise.
868         * config/s390/tpf.h: Likewise.
870 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
872         * config/s390/s390.c (s390_loadrelative_operand_p):
873         Remove TARGET_CPU_ZARCH usages.
874         (s390_rtx_costs): Likewise.
875         (s390_legitimate_constant_p): Likewise.
876         (s390_cannot_force_const_mem): Likewise.
877         (legitimate_reload_constant_p): Likewise.
878         (s390_preferred_reload_class): Likewise.
879         (legitimize_pic_address): Likewise.
880         (legitimize_tls_address): Likewise.
881         (s390_split_branches): Removed.
882         (s390_add_execute): Removed.
883         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
884         (s390_mainpool_start): Likewise.
885         (s390_mainpool_finish): Likewise.
886         (s390_mainpool_cancel): Removed.
887         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
888         (s390_chunkify_cancel): Likewise.
889         (s390_return_addr_rtx): Likewise.
890         (s390_register_info): Remove split_branches_pending_p uages.
891         (s390_optimize_register_info): Likewise.
892         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
893         split_branches_pending_p usages.
894         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
895         (s390_load_got): Likewise.
896         (s390_expand_split_stack_prologue): Likewise.
897         (output_asm_nops): Likewise.
898         (s390_function_profiler): Likewise.
899         (s390_emit_call): Likewise.
900         (s390_conditional_register_usage): Likewise.
901         (s390_optimize_prologue): Likewise.
902         (s390_reorg): Remove TARGET_CPU_ZARCH and
903         split_branches_pending_p usages.
904         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
905         usages.
906         (s390_output_indirect_thunk_function): Likewise.
907         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
908         (TARGET_CPU_ZARCH_P): Removed.
909         (struct machine_function): Remove split_branches_pending_p.
910         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
912 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
914         * common/config/s390/s390-common.c (processor_flags_table):
915         Remove flags.
916         * config.gcc: Remove with_arch/with_tune support.
917         * config/s390/2064.md: Remove cpu attribute comparisons.
918         * config/s390/driver-native.c (s390_host_detect_local_cpu):
919         Remove MTN.
920         * config/s390/linux.h (ASM_SPEC):
921         Remove -march support.
922         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
923         Use a table to get an arch level.
924         * config/s390/s390-opts.h (enum processor_type):
925         Remove enum values.
926         * config/s390/s390.c
927         (processor_table): Remove entries, add arch_level values.
928         (s390_issue_rate): Remove cases.
929         (s390_option_override): Adjust
930         s390_option_override_internal() call.
931         (s390_option_override_internal): Remove deprecation warning.
932         (s390_valid_target_attribute_tree): Adjust
933         s390_option_override_internal() call.
934         * config/s390/s390.h (struct s390_processor):
935         Share with s390-c.c, add arch_level field.
936         * config/s390/s390.md:
937         Remove occurrences in cpu attribute.
938         * config/s390/s390.opt: Remove -march/-mtune support.
939         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
940         * doc/invoke.texi: Remove deprecation warning.
942 2018-08-08  Luis Machado  <luis.machado@linaro.org>
944         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
945         global.
946         (qdf24xx_tunings): Set vector cost structure to
947         qdf24xx_vector_cost.
949         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
950         <register_sextend>: Set to 3.
952 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
954         PR target/86838
955         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
956         * config/aarch64/aarch64-simd.md
957         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
958         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
959         (aarch64_frecpx<mode>): ...this new pattern.
960         * config/aarch64/aarch64-simd-builtins.def: Remove comment
961         about aarch64_frecp<FRECP:frecp_suffix><mode>.
963 2018-08-07  Martin Liska  <mliska@suse.cz>
965         PR middle-end/83023
966         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
967         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
968         * predict.def (PRED_MALLOC_NONNULL): New predictor.
969         * doc/extend.texi: Document that malloc attribute adds
970         hit to compiler.
972 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
974         PR target/86785
975         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
976         Define to speculation_safe_value_not_needed.
978 2018-08-06  Jeff Law  <law@redhat.com>
980         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
981         the vr_values instance to cprop_into_stmt.
982         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
983         (cprop_operand): Also query EVRP to determine if OP is a constant.
985 2018-08-06  Nathan Sidwell  <nathan@acm.org>
987         * diagnostic.c (diagnostic_report_current_module): Reroll
988         included-at loop.  Translate text.
990 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
992         * function-tests.c (selftest::test_expansion_to_rtl): Call
993         free_after_compilation.
995 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
997         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
999 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1001         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
1002         loops with memory block operations from getting unrolled.
1004 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
1006         PR target/86807
1007         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1008         Define to speculation_safe_value_not_needed.
1010 2018-08-06  Jeff Law  <law@redhat.com>
1012         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
1013         assert.
1015 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1017         PR target/86662
1018         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
1019         with all enabled __intN types.
1021         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
1023 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1025         * alias.c (record_set): Check for clobber high.
1026         * cfgexpand.c (expand_gimple_stmt): Likewise.
1027         * combine-stack-adj.c (single_set_for_csa): Likewise.
1028         * combine.c (find_single_use_1): Likewise.
1029         (set_nonzero_bits_and_sign_copies): Likewise.
1030         (get_combine_src_dest): Likewise.
1031         (is_parallel_of_n_reg_sets): Likewise.
1032         (try_combine): Likewise.
1033         (record_dead_and_set_regs_1): Likewise.
1034         (reg_dead_at_p_1): Likewise.
1035         (reg_dead_at_p): Likewise.
1036         * dce.c (deletable_insn_p): Likewise.
1037         (mark_nonreg_stores_1): Likewise.
1038         (mark_nonreg_stores_2): Likewise.
1039         * df-scan.c (df_find_hard_reg_defs): Likewise.
1040         (df_uses_record): Likewise.
1041         (df_get_call_refs): Likewise.
1042         * dwarf2out.c (mem_loc_descriptor): Likewise.
1043         * haifa-sched.c (haifa_classify_rtx): Likewise.
1044         * ira-build.c (create_insn_allocnos): Likewise.
1045         * ira-costs.c (scan_one_insn): Likewise.
1046         * ira.c (equiv_init_movable_p): Likewise.
1047         (rtx_moveable_p): Likewise.
1048         (interesting_dest_for_shprep): Likewise.
1049         * jump.c (mark_jump_label_1): Likewise.
1050         * postreload-gcse.c (record_opr_changes): Likewise.
1051         * postreload.c (reload_cse_simplify): Likewise.
1052         (struct reg_use): Add source expr.
1053         (reload_combine): Check for clobber high.
1054         (reload_combine_note_use): Likewise.
1055         (reload_cse_move2add): Likewise.
1056         (move2add_note_store): Likewise.
1057         * print-rtl.c (print_pattern): Likewise.
1058         * recog.c (decode_asm_operands): Likewise.
1059         (store_data_bypass_p): Likewise.
1060         (if_test_bypass_p): Likewise.
1061         * regcprop.c (kill_clobbered_value): Likewise.
1062         (kill_set_value): Likewise.
1063         * reginfo.c (reg_scan_mark_refs): Likewise.
1064         * reload1.c (maybe_fix_stack_asms): Likewise.
1065         (eliminate_regs_1): Likewise.
1066         (elimination_effects): Likewise.
1067         (mark_not_eliminable): Likewise.
1068         (scan_paradoxical_subregs): Likewise.
1069         (forget_old_reloads_1): Likewise.
1070         * reorg.c (find_end_label): Likewise.
1071         (try_merge_delay_insns): Likewise.
1072         (redundant_insn): Likewise.
1073         (own_thread_p): Likewise.
1074         (fill_simple_delay_slots): Likewise.
1075         (fill_slots_from_thread): Likewise.
1076         (dbr_schedule): Likewise.
1077         * resource.c (update_live_status): Likewise.
1078         (mark_referenced_resources): Likewise.
1079         (mark_set_resources): Likewise.
1080         * rtl.c (copy_rtx): Likewise.
1081         * rtlanal.c (reg_referenced_p): Likewise.
1082         (single_set_2): Likewise.
1083         (noop_move_p): Likewise.
1084         (note_stores): Likewise.
1085         * sched-deps.c (sched_analyze_reg): Likewise.
1086         (sched_analyze_insn): Likewise.
1088 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1090         * cse.c (invalidate_reg): New function extracted from...
1091         (invalidate): ...here.
1092         (canonicalize_insn): Check for clobber high.
1093         (invalidate_from_clobbers): invalidate clobber highs.
1094         (invalidate_from_sets_and_clobbers): Likewise.
1095         (count_reg_usage): Check for clobber high.
1096         (insn_live_p): Likewise.
1097         * cselib.c (cselib_expand_value_rtx_1):Likewise.
1098         (cselib_invalidate_regno): Check for clobber in setter.
1099         (cselib_invalidate_rtx): Pass through setter.
1100         (cselib_invalidate_rtx_note_stores):
1101         (cselib_process_insn): Check for clobber high.
1102         * cselib.h (cselib_invalidate_rtx): Add operand.
1104 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1106         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
1107         (mark_not_eliminable): Likewise.
1108         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
1109         * lra-lives.c (process_bb_lives): Check for clobber high.
1110         * lra.c (new_insn_reg): Remember clobber highs.
1111         (collect_non_operand_hard_regs): Check for clobber high.
1112         (lra_set_insn_recog_data): Likewise.
1113         (add_regs_to_insn_regno_info): Likewise.
1114         (lra_update_insn_regno_info): Likewise.
1116 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1118         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
1119         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
1121 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1123         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
1124         (copy_insn_1): Likewise.
1125         (gen_hard_reg_clobber_high): New gen function.
1126         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
1127         * genemit.c (gen_exp): Likewise.
1128         (gen_emit_seq): Pass through info.
1129         (gen_insn): Check for CLOBBER_HIGH.
1130         (gen_expand): Pass through info.
1131         (gen_split): Likewise.
1132         (output_add_clobbers): Likewise.
1133         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
1134         (remove_clobbers): Likewise.
1135         * rtl.h (gen_hard_reg_clobber_high): New declaration.
1137 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
1139         * doc/rtl.texi (clobber_high): Add.
1140         (parallel): Add in clobber high
1141         * rtl.c (rtl_check_failed_code3): Add function.
1142         * rtl.def (CLOBBER_HIGH): Add expression.
1143         * rtl.h (RTL_CHECKC3): Add macro.
1144         (rtl_check_failed_code3): Add declaration.
1145         (XC3EXP): Add macro.
1147 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1149         PR target/86386
1150         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1151         cfun->machine->max_used_stack_alignment if needed.
1153 2018-08-04  Martin Sebor  <msebor@redhat.com>
1155         PR tree-optimization/86571
1156         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1157         NaN output to 4.
1159 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1161         PR target/86799
1162         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1163         Define.
1165 2018-08-03  Jeff Law  <law@redhat.com>
1167         PR target/86795
1168         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1169         Define to speculation_safe_value_not_needed.
1171 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1173         * doc/gcov.texi (-x): Remove duplicate "to".
1174         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1175         (-Wif-not-aligned): Remove duplicate "is".
1176         (-flto): Remove duplicate "the".
1177         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1178         duplicate "v5.00.b".
1179         (MSP430 Options): Remove duplicate "and" from the description
1180         of "-mgprel-sec=regexp".
1181         (x86 Options): Remove duplicate copies of "vmldLog102" and
1182         vmlsLog104 from description of "-mveclibabi=type".
1184 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1186         * internal-fn.h (first_commutative_argument): Declare.
1187         * internal-fn.c (first_commutative_argument): New function.
1188         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1189         restrictions for pattern statements.  Use first_commutative_argument
1190         to look for commutative operands in calls to internal functions.
1192 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1194         * Makefile.in (wide-int-range.o): New.
1195         * tree-vrp.c: Move all the wide_int_* functions to...
1196         * wide-int-range.cc: ...here.
1197         * tree-vrp.h: Move all the wide_int_* prototypes to...
1198         * wide-int-range.h: ...here.
1200 2018-08-03  Tom de Vries  <tdevries@suse.de>
1202         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1203         UI_NONE.
1204         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1205         * except.c (output_function_exception_table): Do early exit if
1206         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1208 2018-08-03  Martin Liska  <mliska@suse.cz>
1210         * predict.c (dump_prediction): Change to 2 digits
1211         in fraction part.
1213 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1215         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1216         neon_dup_q to...
1217         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1219 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1221         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1222         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1223         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1224         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1225         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1227 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1229         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1230         pp_take_prefix when saving the existing prefix.
1231         * diagnostic.c (diagnostic_append_note): Likewise.
1232         * langhooks.c (lhd_print_error_function): Likewise.
1233         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1234         param's type.  Free the existing prefix.
1235         (pp_take_prefix): New function.
1236         (pretty_printer::pretty_printer): Drop the prefix parameter.
1237         Rename the length parameter to match the comment.
1238         (pretty_printer::~pretty_printer): Free the prefix.
1239         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1240         parameter.
1241         (struct pretty_printer): Drop the "const" from "prefix" field's
1242         type and clarify memory management.
1243         (pp_set_prefix): Drop the "const" from the 2nd param.
1244         (pp_take_prefix): New decl.
1246 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1248         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1249         for word_mode_ok here instead of passing as argument.
1250         (expand_block_compare): Change select_block_compare_mode() call.
1251         (expand_strncmp_gpr_sequence): New function.
1252         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1254 2018-08-02  Jeff Law  <law@redhat.com>
1256         PR target/86790
1257         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1258         Define to speculation_safe_value_not_needed.
1260         PR target/86784
1261         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1262         Define to speculation_safe_value_not_needed.
1264 2018-08-02  Tom de Vries  <tdevries@suse.de>
1266         PR target/86660
1267         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1268         function.  Return UI_TARGET unconditionally.
1269         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1270         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1272 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1274         * genemit.c (print_overload_test): Fix typo.
1276 2018-08-02  Richard Biener  <rguenther@suse.de>
1278         PR tree-optimization/86816
1279         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1280         which checks for value availability before querying it.
1281         (gvn_uses_equal): Use it.
1282         (same_succ_hash): Likewise.
1283         (gimple_equal_p): Likewise.
1285 2018-08-02  Nick Clifton  <nickc@redhat.com>
1287         PR target/86813
1288         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1289         Define to speculation_safe_value_not_needed.
1291         PR target/86810
1292         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1293         Define to speculation_safe_value_not_needed.
1295         PR target/86810
1296         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1297         Define to speculation_safe_value_not_needed.
1299         PR target/86803
1300         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1301         Define to speculation_safe_value_not_needed.
1303         PR target/86797
1304         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1305         Define to speculation_safe_value_not_needed.
1307         PR target/86791
1308         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1309         Define to speculation_safe_value_not_needed.
1311         PR target/86789
1312         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1313         Define to speculation_safe_value_not_needed.
1315         PR target/86787
1316         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1317         Define to speculation_safe_value_not_needed.
1319         PR target/86782
1320         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1321         speculation_safe_value_not_needed.
1323         PR target/86781
1324         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1325         to speculation_safe_value_not_needed.
1327 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1329         * doc/md.texi: Expand the documentation of instruction names
1330         to mention port-local uses.  Document '@' in pattern names.
1331         * read-md.h (overloaded_instance, overloaded_name): New structs.
1332         (mapping): Declare.
1333         (md_reader::handle_overloaded_name): New member function.
1334         (md_reader::get_overloads): Likewise.
1335         (md_reader::m_first_overload): New member variable.
1336         (md_reader::m_next_overload_ptr): Likewise.
1337         (md_reader::m_overloads_htab): Likewise.
1338         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1339         m_next_overload_ptr and m_overloads_htab.
1340         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1341         (get_mode_token, get_code_token, get_int_token): New functions.
1342         (map_attr_string): Add an optional argument that passes back
1343         the associated iterator.
1344         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1345         (md_reader::handle_overloaded_name, add_overload_instance): New
1346         functions.
1347         (apply_iterators): Handle '@' names.  Report an error if '@'
1348         is used without iterators.
1349         (initialize_iterators): Initialize the new iterator_group fields.
1350         * genopinit.c (handle_overloaded_code_for)
1351         (handle_overloaded_gen): New functions.
1352         (main): Use them to print declarations of maybe_code_for_* and
1353         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1354         * genemit.c (print_overload_arguments, print_overload_test)
1355         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1356         (main): Use it to print definitions of maybe_code_for_* and
1357         maybe_gen_* functions.
1358         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1359         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1360         instead of explicit mode checks.
1361         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1362         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1363         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1364         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1365         (aarch64_expand_compare_and_swap): Likewise
1366         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1367         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1368         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1369         (aarch64_constant_pool_reload_icode): Delete.
1370         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1371         instead of aarch64_constant_pool_reload_icode.  Use
1372         code_for_aarch64_reload_mov instead of explicit mode checks.
1373         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1374         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1375         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1376         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1377         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1378         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1379         (aarch64_atomic_load_op_code): Delete.
1380         (aarch64_emit_atomic_load_op): Likewise.
1381         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1382         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1383         instead of aarch64_emit_atomic_load_op.
1384         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1385         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1386         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1387         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1388         character before the pattern name.
1389         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1390         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1391         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1392         (aarch64_frecps<mode>): Likewise.
1393         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1394         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1395         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1396         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1397         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1399 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1401         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1402         Allow HFmode constants if TARGET_FP_F16INST.
1404 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1406         PR target/86014
1407         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1408         No longer check last store for clobber of address register.
1410 2018-08-02  Martin Liska  <mliska@suse.cz>
1412         PR gcov-profile/86817
1413         * gcov.c (process_all_functions): New function.
1414         (main): Call it.
1415         (process_file): Move functions processing to
1416         process_all_functions.
1418 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1420         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1421         "const" to the "gimple *" and "rtx_insn *" parameters.
1422         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1423         Likewise.
1424         (dump_location_t::dump_location_t): Likewise.
1426 2018-08-01  Martin Sebor  <msebor@redhat.com>
1428         PR tree-optimization/86650
1429         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1430         rather than a "gcall *".  Directly pass the data of interest
1431         to percent_K_format, rather than building a temporary CALL_EXPR
1432         to hold it.
1433         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1434         (gimple_fold_builtin_strncat): Adjust.
1435         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1436         gcall* argument with gimple*.
1437         * gimple-ssa-warn-restrict.c (check_call): Same.
1438         (wrestrict_dom_walker::before_dom_children): Same.
1439         (builtin_access::builtin_access): Same.
1440         (check_bounds_or_overlap): Same
1441         (maybe_diag_overlap): Same.
1442         (maybe_diag_offset_bounds): Same.
1443         * tree-diagnostic.c (default_tree_printer): Move usage of
1444         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1445         to this callsite.
1446         * tree-pretty-print.c (percent_K_format): Add argument.
1447         * tree-pretty-print.h: Add argument.
1448         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1449         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1450         (maybe_diag_stxncpy_trunc): Same.
1451         (handle_builtin_stxncpy): Same.
1452         (handle_builtin_strcat): Same.
1454 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1456         * match.pd: Optimise pointer range checks.
1458 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1460         PR tree-optimization/86758
1461         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1462         to remove pattern statements.
1464 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1466         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1467         result of dfs_enumerate_from when constructing stmt_vec_infos,
1468         instead of additionally calling get_loop_body.
1470 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1472         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1473         parameter.
1474         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1475         When creating an iv, assert that the step is not known to be zero.
1476         (vect_setup_realignment): Update call accordingly.
1477         * tree-vect-stmts.c (vectorizable_store): Likewise.
1478         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1480 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1482         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1483         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1484         (vectorizable_reduction): Likewise.
1485         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1486         (vect_detect_hybrid_slp_stmts): Likewise.
1487         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1489 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1491         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1492         (wide_int_set_zero_nonzero_bits): ...this.
1493         (zero_nonzero_bits_from_vr): Rename to...
1494         (vrp_set_zero_nonzero_bits): ...this.
1495         (extract_range_from_multiplicative_op_1): Abstract wide int
1496         code...
1497         (wide_int_range_multiplicative_op): ...here.
1498         (extract_range_from_binary_expr_1): Extract wide int binary
1499         operations into their own functions.
1500         (wide_int_range_lshift): New.
1501         (wide_int_range_can_optimize_bit_op): New.
1502         (wide_int_range_shift_undefined_p): New.
1503         (wide_int_range_bit_xor): New.
1504         (wide_int_range_bit_ior): New.
1505         (wide_int_range_bit_and): New.
1506         (wide_int_range_trunc_mod): New.
1507         (extract_range_into_wide_ints): New.
1508         (vrp_shift_undefined_p): New.
1509         (extract_range_from_multiplicative_op): New.
1510         (vrp_can_optimize_bit_op): New.
1511         * tree-vrp.h (value_range::dump): New.
1512         (wide_int_range_multiplicative_op): New.
1513         (wide_int_range_lshift):New.
1514         (wide_int_range_shift_undefined_p): New.
1515         (wide_int_range_bit_xor): New.
1516         (wide_int_range_bit_ior): New.
1517         (wide_int_range_bit_and): New.
1518         (wide_int_range_trunc_mod): New.
1519         (zero_nonzero_bits_from_bounds): Rename to...
1520         (wide_int_set_zero_nonzero_bits): ...this.
1521         (zero_nonzero_bits_from_vr): Rename to...
1522         (vrp_set_zero_nonzero_bits): ...this.
1523         (range_easy_mask_min_max): Rename to...
1524         (wide_int_range_can_optimize_bit_op): this.
1525         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1526         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1528 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1530         * tree-vectorizer.h (vect_orig_stmt): New function.
1531         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1532         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1533         (vect_create_epilog_for_reduction): Likewise.
1534         (vectorizable_live_operation): Likewise.
1535         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1536         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1537         * tree-vect-stmts.c (vectorizable_call): Likewise.
1538         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1540 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1542         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1543         argument.
1544         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1545         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1546         (vect_transform_loop): Likewise.
1547         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1549 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1551         * tree-vectorizer.h (vect_schedule_slp): Return void.
1552         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1553         (vect_schedule_slp): Likewise.
1555 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1557         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1558         argument.
1559         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1560         instances before the main loop, if any exist.
1562 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1564         PR tree-optimization/86749
1565         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1566         If the lhs is used in a COND_EXPR, check that it is being used
1567         as the "then" or "else" value.
1569 2018-08-01  Tom de Vries  <tdevries@suse.de>
1571         PR target/86800
1572         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1573         speculation_safe_value_not_needed.
1575 2018-08-01  Richard Biener  <rguenther@suse.de>
1577         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1578         as base and offset.
1580 2018-08-01  Martin Liska  <mliska@suse.cz>
1582         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1583         format how successful transformation is dumped.
1584         (gimple_mod_pow2_value_transform): Likewise.
1585         (gimple_mod_subtract_transform): Likewise.
1586         (gimple_stringops_transform): Likewise.
1588 2018-08-01  Martin Liska  <mliska@suse.cz>
1590         PR value-prof/35543
1591         * value-prof.c (interesting_stringop_to_profile_p):
1592         Simplify the code and add BUILT_IN_MEMMOVE.
1593         (gimple_stringops_transform): Likewise.
1595 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1597         * config/aarch64/aarch64-simd.md
1598         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1599         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1600         use GPI iterator instead of SI mode.
1602 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1604         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1605         rs6000_speculation_barrier.
1606         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1607         new barrier pattern name.
1609 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1611         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1612         (speculation_barrier): New insn.
1614 2018-08-01  Richard Biener  <rguenther@suse.de>
1616         PR bootstrap/86724
1617         * graphite.h: Include isl/id.h and isl/space.h to allow build
1618         with ISL 0.20.
1620 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1622         PR target/86651
1623         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1624         mode for COFF targets.
1625         * defaults.h (TARGET_COFF): Define.
1626         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1627         TARGET_COFF): Define.
1628         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1629         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1630         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1632 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1634         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1635         * gimple-streamer-out.c (output_bb): Save it.
1636         * lto-streamer-in.c (input_struct_function_base): Restore
1637         instance discriminator if available.  Create map on demand.
1638         * lto-streamer-out.c (output_struct_function_base): Save it if
1639         available.
1640         * final.c (decl_to_instance_map): Document LTO strategy.
1642 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1643             Olivier Hainque  <hainque@adacore.com>
1645         * debug.h (decl_to_instance_map_t): New type.
1646         (decl_to_instance_map): Declare.
1647         (maybe_create_decl_to_instance_map): New inline function.
1648         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1649         to track basic block discriminators.
1650         (final_start_function_1): Initialize them.
1651         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1652         bb_discriminator.
1653         (decl_to_instance_map): New variable.
1654         (map_decl_to_instance, maybe_set_discriminator): New functions.
1655         (notice_source_line): Set discriminator.
1657 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1659         * targhooks.c (default_have_speculation_safe_value): Add
1660         ATTRIBUTE_UNUSED.
1662 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1664         * dump-context.h: Include "pretty-print.h".
1665         (dump_context::refresh_dumps_are_enabled): New decl.
1666         (dump_context::emit_item): New decl.
1667         (class dump_context): Add fields "m_test_pp" and
1668         "m_test_pp_flags".
1669         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1670         (temp_dump_context::get_dumped_text): New decl.
1671         (class temp_dump_context): Add field "m_pp".
1672         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1673         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1674         m_test_pp.
1675         (set_dump_file): Update for above change.
1676         (set_alt_dump_file): Likewise.
1677         (dump_loc): New overload, taking a pretty_printer *.
1678         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1679         to any test pretty-printer.
1680         (make_item_for_dump_gimple_stmt): New function, adapted from
1681         optinfo::add_gimple_stmt.
1682         (dump_context::dump_gimple_stmt): Call it, and use the result,
1683         eliminating the direct usage of dump_file and alt_dump_file in
1684         favor of indirectly using them via emit_item.
1685         (make_item_for_dump_gimple_expr): New function, adapted from
1686         optinfo::add_gimple_expr.
1687         (dump_context::dump_gimple_expr): Call it, and use the result,
1688         eliminating the direct usage of dump_file and alt_dump_file in
1689         favor of indirectly using them via emit_item.
1690         (make_item_for_dump_generic_expr): New function, adapted from
1691         optinfo::add_tree.
1692         (dump_context::dump_generic_expr): Call it, and use the result,
1693         eliminating the direct usage of dump_file and alt_dump_file in
1694         favor of indirectly using them via emit_item.
1695         (make_item_for_dump_printf_va): New function, adapted from
1696         optinfo::add_printf_va.
1697         (make_item_for_dump_printf): New function.
1698         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1699         and use the result, eliminating the direct usage of dump_file and
1700         alt_dump_file in favor of indirectly using them via emit_item.
1701         (make_item_for_dump_dec): New function.
1702         (dump_context::dump_dec): Call it, and use the result,
1703         eliminating the direct usage of dump_file and alt_dump_file in
1704         favor of indirectly using them via emit_item.
1705         (make_item_for_dump_symtab_node): New function, adapted from
1706         optinfo::add_symtab_node.
1707         (dump_context::dump_symtab_node): Call it, and use the result,
1708         eliminating the direct usage of dump_file and alt_dump_file in
1709         favor of indirectly using them via emit_item.
1710         (dump_context::begin_scope): Reimplement, avoiding direct usage
1711         of dump_file and alt_dump_file in favor of indirectly using them
1712         via emit_item.
1713         (dump_context::emit_item): New member function.
1714         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1715         Set up test pretty-printer on the underlying context.  Call
1716         refresh_dumps_are_enabled.
1717         (temp_dump_context::~temp_dump_context): Call
1718         refresh_dumps_are_enabled.
1719         (temp_dump_context::get_dumped_text): New member function.
1720         (selftest::verify_dumped_text): New function.
1721         (ASSERT_DUMPED_TEXT_EQ): New macro.
1722         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1723         and then without optinfo enabled.  Add uses of
1724         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1725         * dumpfile.h: Update comment for the dump_* API.
1726         * optinfo-emit-json.cc
1727         (selftest::test_building_json_from_dump_calls): Update for new
1728         param for temp_dump_context ctor.
1729         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1730         and "m_owned" field.
1731         (optinfo_item::~optinfo_item): Likewise.
1732         (optinfo::add_item): New member function.
1733         (optinfo::emit): Update comment.
1734         (optinfo::add_string): Delete.
1735         (optinfo::add_printf): Delete.
1736         (optinfo::add_printf_va): Delete.
1737         (optinfo::add_gimple_stmt): Delete.
1738         (optinfo::add_gimple_expr): Delete.
1739         (optinfo::add_tree): Delete.
1740         (optinfo::add_symtab_node): Delete.
1741         (optinfo::add_dec): Delete.
1742         * optinfo.h (class dump_context): New forward decl.
1743         (optinfo::add_item): New decl.
1744         (optinfo::add_string): Delete.
1745         (optinfo::add_printf): Delete.
1746         (optinfo::add_printf_va): Delete.
1747         (optinfo::add_gimple_stmt): Delete.
1748         (optinfo::add_gimple_expr): Delete.
1749         (optinfo::add_tree): Delete.
1750         (optinfo::add_symtab_node): Delete.
1751         (optinfo::add_dec): Delete.
1752         (optinfo::add_poly_int): Delete.
1753         (optinfo_item::optinfo_item): Remove "owned" param.
1754         (class optinfo_item): Remove field "m_owned".
1756 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1758         PR middle-end/86705
1759         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1760         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1761         requested variable alignment.
1762         (expand_one_ssa_partition): Likewise.
1763         (expand_one_var): Likewise.
1765 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1767         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1768         to speculation_safe_value_not_needed.
1770 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1772         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1773         * targhooks.c (speculation_safe_value_not_needed): New function.
1774         * target.def (have_speculation_safe_value): Update documentation.
1775         * doc/tm.texi: Regenerated.
1777 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1779         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1780         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1781         expand.
1782         (despeculate_copy<ALLI:mode>_insn): New insn.
1783         (despeculate_copyti_insn): New insn.
1784         (despeculate_simple<ALLI:mode>): New insn
1785         (despeculate_simpleti): New insn.
1786         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1787         function.
1788         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1789         aarch64_speculation_safe_value.
1790         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1792 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1794         * config/aarch64/aarch64-speculation.cc: New file.
1795         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1796         before pass_reorder_blocks.
1797         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1798         prototype.
1799         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1800         X14 and X15 when tracking speculation.
1801         * config/aarch64/aarch64.md (register name constants): Add
1802         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1803         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1804         (speculation_barrier): New insn attribute.
1805         (cmp<mode>): Allow SP in comparisons.
1806         (speculation_tracker): New insn.
1807         (speculation_barrier): Add speculation_barrier attribute.
1808         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1809         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1810         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1812 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1814         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1815         aarch64_track_speculation is true.
1816         (tb<optab><mode>1): Likewise.
1817         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1818         generate CB[N]Z when tracking speculation.
1819         (aarch64_split_compare_and_swap): Likewise.
1820         (aarch64_split_atomic_op): Likewise.
1822 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1824         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1826 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1828         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1829         (speculation_barrier): New insn.
1831 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1833         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1834         * config/arm/arm.md (speculation_barrier): New expand.
1835         (speculation_barrier_insn): New pattern.
1837 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1839         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1840         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1841         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1842         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1843         list.
1844         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1845         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1846         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1847         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1848         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1849         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1850         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1851         * builtins.c (expand_speculation_safe_value): New function.
1852         (expand_builtin): Call it.
1853         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1854         * doc/extend.texi: Document __builtin_speculation_safe_value.
1855         * doc/md.texi: Document "speculation_barrier" pattern.
1856         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1857         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1858         * doc/tm.texi: Regenerated.
1859         * target.def (have_speculation_safe_value, speculation_safe_value): New
1860         hooks.
1861         * targhooks.c (default_have_speculation_safe_value): New function.
1862         (default_speculation_safe_value): New function.
1863         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1864         (default_speculation_safe_value): Add prototype.
1866 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1868         * dump-context.h (dump_context::dump_loc): New decl.
1869         * dumpfile.c (dump_context::dump_loc): New member function.
1870         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1871         and dump_gimple_stmt.
1872         (dump_context::dump_gimple_expr_loc): Likewise, using
1873         dump_gimple_expr.
1874         (dump_context::dump_generic_expr_loc): Likewise, using
1875         dump_generic_expr.
1876         (dump_context::dump_printf_loc_va): Likewise, using
1877         dump_printf_va.
1878         (dump_context::begin_scope): Explicitly using the global function
1879         "dump_loc", rather than the member function.
1881 2018-07-31  Martin Sebor  <msebor@redhat.com>
1883         PR tree-optimization/86741
1884         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1886 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1888         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1889         depend on whether prefetch instructions will be emitted or not.
1890         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1891         will be emitted or not.
1892         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1893         (TARGET_SETMEM_PFD): New macros.
1895 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1897         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1898         (NULL_STMT_VEC_INFO): Delete.
1899         (stmt_vec_info::operator*): Likewise.
1900         (stmt_vec_info::operator gimple *): Likewise.
1901         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1902         of NULL_STMT_VEC_INFO.
1903         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1904         (vect_reassociating_reduction_p): Likewise.
1905         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1906         (vectorizable_store): Likewise.
1907         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1908         (vec_info::free_stmt_vec_infos): Likewise.
1910 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1912         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1913         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1915 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1917         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1918         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1919         (vec_info::free_stmt_vec_info): New private member functions.
1920         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1921         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1922         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1923         set_stmt_vec_info_vec and free_stmt_vec_infos.
1924         * tree-vect-loop.c (_loop_vec_info): Remove call to
1925         set_stmt_vec_info_vec.
1926         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1927         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1928         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1929         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1930         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1931         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1932         with the clearing in the xcalloc.
1933         (stmt_vec_info_vec): Delete.
1934         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1935         (vectorize_loops): Likewise.
1936         (vec_info::~vec_info): Remove argument from call to
1937         free_stmt_vec_infos.
1938         (vec_info::add_stmt): Remove vinfo argument from call to
1939         new_stmt_vec_info.
1941 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1943         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1944         rather than a gimple stmt.
1945         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1946         information for pattern statements when passed the original
1947         statement; instead wait to be passed the pattern statement itself.
1948         Don't call set_vinfo_for_stmt here.
1949         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1950         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1951         stmt_vec_infos here.
1952         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1953         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1954         stmt_vec_infos entry.
1956 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1958         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1959         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1960         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1961         * tree-vect-stmts.c (vectorizable_call): Likewise.
1962         (vectorizable_simd_clone_call): Likewise.
1964 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1966         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1967         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1968         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1969         * tree-vect-loop.c (vect_transform_loop): Likewise.
1970         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1971         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1973 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1975         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1976         (vect_dr_stmt): Delete.
1977         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1978         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1979         of DR_VECT_AUX.
1980         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1981         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1982         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1983         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1984         (vect_analyze_data_refs): Likewise.
1985         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1986         argument.
1987         (vect_find_same_alignment_drs): Likewise.
1988         (vect_slp_analyze_node_dependences): Update calls accordingly.
1989         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1990         instead of DR_VECT_AUX.
1991         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1992         of a vector data references.  Use vec_info::lookup_dr instead of
1993         DR_VECT_AUX.
1994         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1995         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1996         instead of DR_VECT_AUX.
1998 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2000         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
2001         dr_vec_info.
2002         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2003         accordingly.
2004         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2005         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2006         (vect_gen_prolog_loop_niters): Likewise.
2008 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2010         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
2011         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
2012         (vect_known_alignment_in_bytes, vect_dr_behavior)
2013         (vect_get_scalar_dr_size): Take references as dr_vec_infos
2014         instead of data_references.  Update calls to other routines for
2015         which the same change has been made.
2016         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
2017         dr_vec_infos instead of stmt_vec_infos.
2018         (vect_analyze_data_ref_dependence): Update call accordingly.
2019         (vect_slp_analyze_data_ref_dependence)
2020         (vect_record_base_alignments): Use DR_VECT_AUX.
2021         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
2022         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
2023         (vector_alignment_reachable_p, vect_get_data_access_cost)
2024         (vect_peeling_supportable, vect_analyze_group_access_1)
2025         (vect_analyze_group_access, vect_analyze_data_ref_access)
2026         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
2027         (vect_compile_time_alias, vect_small_gap_p)
2028         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
2029         (vect_supportable_dr_alignment): Take references as dr_vec_infos
2030         instead of data_references.  Update calls to other routines for
2031         which the same change has been made.
2032         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
2033         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2034         (vect_slp_analyze_and_verify_node_alignment)
2035         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
2036         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2037         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
2038         above changes.
2039         (_vect_peel_info::dr): Replace with...
2040         (_vect_peel_info::dr_info): ...this new field.
2041         (vect_peeling_hash_get_most_frequent)
2042         (vect_peeling_hash_choose_best_peeling): Update accordingly.
2043         (vect_peeling_hash_get_lowest_cost):
2044         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
2045         routines for which the same change has been made.
2046         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
2047         data_reference.
2048         * tree-vect-loop-manip.c (get_misalign_in_elems)
2049         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
2050         above changes.
2051         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2052         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
2053         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
2054         (get_group_load_store_type, get_negative_load_store_type)
2055         (vect_get_data_ptr_increment, vectorizable_store)
2056         (vectorizable_load): Likewise.
2057         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
2058         Update calls to other routines for which the same change has been made.
2060 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2062         * tree-vectorizer.h (vec_info::move_dr): New member function.
2063         (dataref_aux): Rename to...
2064         (dr_vec_info): ...this and add "dr" and "stmt" fields.
2065         (_stmt_vec_info::dr_aux): Update accordingly.
2066         (_stmt_vec_info::data_ref_info): Delete.
2067         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
2068         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
2069         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
2070         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
2071         of data_ref.
2072         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
2073         (STMT_VINFO_DR_INFO): New macro.
2074         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
2075         (set_dr_misalignment): Update after rename of dataref_aux.
2076         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
2077         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
2078         initialization of STMT_VINFO_DATA_REF.
2079         * tree-vectorizer.c (vec_info::move_dr): New function.
2080         * tree-vect-patterns.c (vect_recog_bool_pattern)
2081         (vect_recog_mask_conversion_pattern)
2082         (vect_recog_gather_scatter_pattern): Use it.
2083         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
2084         the "dr" and "stmt" fields of dr_vec_info instead of
2085         STMT_VINFO_DATA_REF.
2087 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2089         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
2090         (is_pattern_stmt_p): Use it.
2091         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
2092         on pattern statements.
2094 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2096         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
2097         original stmt as a stmt_vec_info rather than a gimple stmt.
2098         (vect_pattern_recog_1): Take the statement directly as a
2099         stmt_vec_info, rather than via a gimple_stmt_iterator.
2100         Update call to vect_mark_pattern_stmts.
2101         (vect_pattern_recog): Update calls accordingly.
2103 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2105         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
2106         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
2107         a vect_def_type for the first argument.
2108         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
2109         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
2110         operand if it isn't defined by a vectorized statement.
2111         (vect_build_gather_load_calls): Remove the mask_dt argument and
2112         update calls to vect_get_vec_def_for_stmt_copy.
2113         (vectorizable_bswap): Likewise the dt argument.
2114         (vectorizable_call): Update calls to vectorizable_bswap and
2115         vect_get_vec_def_for_stmt_copy.
2116         (vectorizable_simd_clone_call, vectorizable_assignment)
2117         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
2118         (vectorizable_comparison): Update calls to
2119         vect_get_vec_def_for_stmt_copy.
2120         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
2121         vect_is_simple_use.
2122         (vect_get_loop_based_defs): Remove dt argument and update call
2123         to vect_get_vec_def_for_stmt_copy.
2124         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
2125         and vect_get_vec_def_for_stmt_copy.
2126         (vectorizable_load): Update calls to vect_build_gather_load_calls
2127         and vect_get_vec_def_for_stmt_copy.
2128         * tree-vect-loop.c (vect_create_epilog_for_reduction)
2129         (vectorizable_reduction, vectorizable_live_operation): Update calls
2130         to vect_get_vec_def_for_stmt_copy.
2132 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2134         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
2135         and gimple stmt arguments with a stmt_vec_info.
2136         (vect_record_base_alignments): Update calls accordingly.
2137         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
2138         and gimple stmt arguments with a stmt_vec_info.
2139         (vect_build_slp_tree_1): Remove vinfo argument and update call
2140         to vect_record_max_nunits.
2141         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
2142         and vect_record_max_nunits.
2144 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2146         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2147         file and take a stmt_vec_info instead of a gimple stmt.
2148         (supportable_widening_operation, vect_finish_replace_stmt)
2149         (vect_finish_stmt_generation, vect_get_store_rhs)
2150         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2151         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2152         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2153         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2154         (vect_create_data_ref_ptr, bump_vector_ptr)
2155         (vect_permute_store_chain, vect_setup_realignment)
2156         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2157         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2158         (vectorizable_reduction, vectorizable_induction)
2159         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2160         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2161         than gimple stmts as arguments.
2162         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2163         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2164         (can_group_stmts_p, vect_check_gather_scatter)
2165         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2166         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2167         (vect_permute_load_chain, vect_shift_permute_load_chain)
2168         (vect_transform_grouped_load)
2169         (vect_record_grouped_load_vectors): Likewise.
2170         * tree-vect-loop.c (vect_fixup_reduc_chain)
2171         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2172         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2173         (vectorizable_reduction, vectorizable_induction)
2174         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2175         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2176         (vect_get_load_store_mask): Likewise.
2177         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2178         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2179         * tree-vect-stmts.c (vect_mark_relevant)
2180         (is_simple_and_all_uses_invariant)
2181         (exist_non_indexing_operands_for_use_p, process_use)
2182         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2183         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2184         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2185         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2186         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2187         (get_negative_load_store_type, get_load_store_type)
2188         (vect_check_load_store_mask, vect_check_store_rhs)
2189         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2190         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2191         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2192         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2193         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2194         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2195         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2196         (supportable_widening_operation): Likewise.
2198 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2200         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2201         a stmt_vec_info instead of a gcall.
2202         (vect_check_gather_scatter): Update call accordingly.
2203         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2204         of a gphi.
2205         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2206         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2207         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2208         instead of a gimple stmt.
2209         (vect_transform_loop): Update calls accordingly.
2210         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2211         stmt_vec_infos instead of gimple stmts.
2212         (vect_analyze_slp_instance): Update use accordingly.
2213         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2214         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2215         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2216         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2217         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2218         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2219         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2220         down to subroutines.
2222 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2224         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2225         of the worklist from a vector of gimple stmts to a vector of
2226         stmt_vec_infos.
2227         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2228         (vect_mark_stmts_to_be_vectorized): Likewise
2230 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2232         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2233         statement before passing it to vect_analyze_stmt.
2234         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2235         the chain of phi vector definitions.  Track the exit phi via its
2236         stmt_vec_info.
2237         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2238         STMT_VINFO_REDUC_DEF.
2239         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2240         stmt_vec_infos to handle the statement chains.
2241         (vect_get_slp_defs): Record the first statement in the node
2242         using a stmt_vec_info.
2243         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2244         statements here and pass their stmt_vec_info down to subroutines.
2245         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2246         down to vect_finish_stmt_generation.
2247         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2248         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2249         stmt_vec_infos to subroutines.
2250         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2251         chains.
2253 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2255         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2256         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2257         (vect_permute_store_chain, vect_setup_realignment)
2258         (vect_permute_load_chain, vect_shift_permute_load_chain)
2259         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2260         stmts internally, and when passing values to other vectorizer routines.
2261         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2262         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2263         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2264         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2265         (vectorizable_reduction, vectorizable_induction)
2266         (vectorizable_live_operation, vect_transform_loop_stmt)
2267         (vect_transform_loop): Likewise.
2268         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2269         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2270         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2271         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2272         (vect_slp_analyze_node_operations_1): Likewise.
2273         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2274         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2275         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2276         (vect_finish_stmt_generation_1, get_group_load_store_type)
2277         (get_load_store_type, vect_build_gather_load_calls)
2278         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2279         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2280         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2281         (vectorizable_store, vectorizable_load, vectorizable_condition)
2282         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2283         (supportable_widening_operation): Likewise.
2284         (vect_get_vector_types_for_stmt): Likewise.
2285         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2287 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2289         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2290         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2291         (vect_permute_store_chain, vect_permute_load_chain)
2292         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2293         repeated stmt_vec_info lookups.
2294         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2295         (vect_update_ivs_after_vectorizer): Likewise.
2296         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2297         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2298         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2299         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2300         (vect_bb_slp_scalar_cost): Likewise.
2301         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2303 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2305         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2306         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2307         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2308         to get gassigns and gcalls, rather than operating on generc gimple
2309         stmts.
2310         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2311         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2312         (vectorizable_load, vect_analyze_stmt): Likewise.
2313         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2315 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2317         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2318         return stmt_vec_infos rather than gimple stmts.  Do not accept
2319         null arguments.
2320         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2321         of a gimple stmt.
2322         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2323         Update use of get_later_stmt.
2324         (vect_get_constant_vectors): Update call accordingly.
2325         (vect_schedule_slp_instance): Likewise
2326         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2327         (vect_slp_analyze_instance_dependence): Likewise.
2328         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2330 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2332         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2333         (stmt_info_for_cost::stmt_info): ...this new field.
2334         (add_stmt_costs): Update accordingly.
2335         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2336         (vect_get_known_peeling_cost): Likewise.
2337         (vect_estimate_min_profitable_iters): Likewise.
2338         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2340 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2342         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2343         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2344         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2345         accordingly.
2346         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2348 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2350         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2351         a gimple stmt to a stmt_vec_info.
2352         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2356         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2357         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2358         (_loop_vec_info::reduction_chains): Likewise.
2359         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2360         accordingly.
2361         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2363 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2365         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2366         a gimple stmt to a stmt_vec_info.
2367         (_stmt_vec_info::next_element): Likewise.
2368         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2369         (vect_slp_analyze_and_verify_node_alignment)
2370         (vect_analyze_group_access_1, vect_analyze_group_access)
2371         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2372         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2373         (vect_supportable_dr_alignment): Update accordingly.
2374         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2375         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2376         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2377         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2378         * tree-vect-slp.c (vect_build_slp_tree_1)
2379         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2380         (vect_split_slp_store_group, vect_analyze_slp_instance)
2381         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2382         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2383         (get_group_load_store_type, get_load_store_type)
2384         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2385         (vect_transform_stmt, vect_remove_stores): Likewise.
2387 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2389         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2390         than a gimple stmt.
2391         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2392         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2393         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2394         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2395         (vector_alignment_reachable_p, vect_get_data_access_cost)
2396         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2397         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2398         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2399         (vect_analyze_group_access_1, vect_analyze_group_access)
2400         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2401         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2402         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2403         result of vect_dr_stmt and use the stmt_vec_info instead of
2404         the associated gimple stmt.
2405         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2406         (vect_gen_prolog_loop_niters): Likewise.
2407         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2409 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2411         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2412         to a vec<stmt_vec_info>.
2413         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2414         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2415         vec<stmt_vec_info>.
2416         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2417         to a vec<stmt_vec_info>.
2418         (bst_traits::value_type, bst_traits::value_type): Likewise.
2419         (bst_traits::hash): Update accordingly.
2420         (vect_get_and_check_slp_defs): Change the stmts parameter from
2421         a vec<gimple *> to a vec<stmt_vec_info>.
2422         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2423         (vect_build_slp_tree): Likewise.
2424         (vect_build_slp_tree_2): Likewise.  Update uses of
2425         SLP_TREE_SCALAR_STMTS.
2426         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2427         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2428         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2429         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2430         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2431         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2432         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2433         (vect_get_constant_vectors, vect_get_slp_defs)
2434         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2435         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2436         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2437         instead of gimple stmts.
2438         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2439         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2440         (vect_slp_analyze_instance_dependence): Update uses of
2441         SLP_TREE_SCALAR_STMTS.
2442         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2443         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2444         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2445         (get_initial_defs_for_reduction): Likewise.
2446         (vect_create_epilog_for_reduction): Likewise.
2447         (vectorize_fold_left_reduction): Likewise.
2448         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2449         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2450         (can_vectorize_live_stmts): Likewise.
2452 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2454         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2455         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2456         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2457         than gimple stmts.
2458         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2459         of a gimple stmt.
2460         (gather_scalar_reductions): Update after above interface changes.
2461         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2462         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2463         than gimple stmts.
2464         (vect_force_simple_reduction): Likewise.
2465         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2466         LOOP_VINFO_REDUCTIONS.
2467         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2469 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2471         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2472         a gimple stmt to a stmt_vec_info.
2473         * tree-vect-loop.c (vect_active_double_reduction_p)
2474         (vect_force_simple_reduction, vectorizable_reduction): Update
2475         accordingly.
2477 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2479         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2480         vec<gimple *> to a vec<stmt_vec_info>.
2481         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2482         the reduction_phis argument from a vec<gimple *> to a
2483         vec<stmt_vec_info>.
2484         (vectorizable_reduction): Likewise the phis local variable that
2485         is passed to vect_create_epilog_for_reduction.  Update for new type
2486         of SLP_TREE_VEC_STMTS.
2487         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2488         (vectorizable_live_operation): Likewise.
2489         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2490         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2492 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2494         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2495         a gimple stmt to a stmt_vec_info.
2496         (vectorizable_condition, vectorizable_live_operation)
2497         (vectorizable_reduction, vectorizable_induction): Pass back the
2498         vectorized statement as a stmt_vec_info.
2499         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2500         use of STMT_VINFO_VEC_STMT.
2501         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2502         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2503         as stmt_vec_infos rather than gimple stmts.
2504         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2505         to a stmt_vec_info.
2506         (vectorizable_live_operation): Likewise.
2507         (vectorizable_reduction, vectorizable_induction): Likewise,
2508         updating use of STMT_VINFO_VEC_STMT.
2509         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2510         of STMT_VINFO_VEC_STMT.
2511         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2512         (vectorizable_simd_clone_call, vectorizable_conversion)
2513         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2514         (vectorizable_store, vectorizable_load, vectorizable_condition)
2515         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2516         from a gimple stmt to a stmt_vec_info.
2517         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2518         pointer to a stmt_vec_info to the vectorizable_* routines.
2520 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2522         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2523         a gimple stmt to a stmt_vec_info.
2524         (is_pattern_stmt_p): Update accordingly.
2525         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2526         (vect_record_grouped_load_vectors): Likewise.
2527         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2528         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2529         (vect_model_reduction_cost): Likewise.
2530         (vect_create_epilog_for_reduction): Likewise.
2531         (vectorizable_reduction, vectorizable_induction): Likewise.
2532         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2533         Return the stmt_vec_info for the pattern statement.
2534         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2535         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2536         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2537         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2538         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2539         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2540         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2541         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2543 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2545         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2546         (vect_finish_stmt_generation): Likewise.
2547         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2548         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2549         (vect_build_gather_load_calls): Use the return value of the above
2550         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2551         scopes for the input gimple stmt and wider scopes for the associated
2552         stmt_vec_info.  Use vec_info::lookup_def when setting these
2553         stmt_vec_infos from an SSA_NAME definition.
2554         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2555         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2556         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2557         (vectorizable_store, vectorizable_load, vectorizable_condition)
2558         (vectorizable_comparison): Likewise.
2559         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2560         (vectorizable_reduction): Likewise.
2562 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2564         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2565         stmt_vec_info * parameter before the optional gimple **.
2566         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2567         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2568         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2569         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2570         (vectorizable_live_operation): Likewise.
2571         * tree-vect-patterns.c (type_conversion_p): Likewise.
2572         (vect_look_through_possible_promotion): Likewise.
2573         (vect_recog_rotate_pattern): Likewise.
2574         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2576 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2578         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2579         a typedef to a wrapper class.
2580         (NULL_STMT_VEC_INFO): New macro.
2581         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2582         (stmt_vec_info::operator*): New function.
2583         (stmt_vec_info::operator gimple *): Likewise.
2584         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2585         (add_stmt_costs): Likewise.
2586         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2587         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2588         (vect_get_known_peeling_cost): Likewise.
2589         (vect_estimate_min_profitable_iters): Likewise.
2590         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2591         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2592         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2593         (vectorizable_store, free_stmt_vec_infos): Likewise.
2594         (new_stmt_vec_info): Change return type of xcalloc to
2595         _stmt_vec_info *.
2597 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2599         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2600         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2601         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2602         a single_imm_use-based sequence.
2603         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2605 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2607         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2608         * tree-vectorizer.c (vec_info::lookup_def): New function.
2609         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2610         (vect_widened_op_tree): Likewise.
2611         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2612         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2613         (vectorizable_reduction): Likewise.
2614         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2615         of a gimple *.
2616         (vect_is_slp_reduction): Update calls accordingly.  Use
2617         vec_info::lookup_def.
2618         (vect_is_simple_reduction): Likewise
2619         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2621 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2623         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2624         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2625         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2626         of vinfo_for_stmt.
2627         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2628         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2629         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2630         (vect_is_slp_reduction, vectorizable_induction)
2631         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2632         * tree-vect-patterns.c (vect_init_pattern_stmt):
2633         (vect_determine_min_output_precision_1, vect_determine_precisions)
2634         (vect_pattern_recog): Likewise.
2635         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2636         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2637         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2638         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2639         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2640         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2641         info field from a loop to a loop_vec_info.
2643 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2645         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2646         (vec_info::add_stmt): Declare.
2647         * tree-vectorizer.c (vec_info::add_stmt): New function.
2648         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2649         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2650         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2651         (vectorizable_induction): Likewise.
2652         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2653         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2654         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2655         (vectorizable_load): Likewise.
2656         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2657         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2658         (vect_recog_gather_scatter_pattern): Likewise.
2659         (append_pattern_def_seq): Likewise.  Remove a check that is
2660         performed by add_stmt itself.
2662 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2664         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2665         which make_ssa_name was called with new_stmt before new_stmt
2666         had been created.
2668 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2670         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2671         split out from...
2672         (vect_is_slp_reduction): ...here...
2673         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2674         that are already known to be false.
2676 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2678         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2679         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2680         STMT_VINFO_NUM_SLP_USES when it's true.
2681         (vect_free_slp_instance): Add a final_p parameter and pass it to
2682         vect_free_slp_tree.
2683         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2684         (vect_analyze_slp_instance): Likewise.
2685         (vect_slp_analyze_operations): Likewise.
2686         (vect_slp_analyze_bb_1): Likewise.
2687         * tree-vectorizer.c (vec_info): Likewise.
2688         * tree-vect-loop.c (vect_transform_loop): Likewise.
2690 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2692         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2693         function is not called for second and subsequent members of
2694         a reduction group.
2696 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2698         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2699         cases for nested loops from here to ...
2700         (vect_create_epilog_for_reduction): ...here.  Only call
2701         vect_is_simple_use for inner-loop reductions.
2703 2018-07-31  Martin Liska  <mliska@suse.cz>
2705         PR gcov-profile/85338
2706         PR gcov-profile/85350
2707         PR gcov-profile/85372
2708         * profile.c (struct location_triplet): New.
2709         (struct location_triplet_hash): Likewise.
2710         (output_location): Do not output a BB that
2711         is already recorded for a line.
2712         (branch_prob): Use streamed_locations.
2714 2018-07-31  Martin Liska  <mliska@suse.cz>
2716         PR gcov-profile/85370
2717         * coverage.c (coverage_begin_function): Do not mark target
2718         clones as artificial functions.
2720 2018-07-31  Martin Liska  <mliska@suse.cz>
2722         PR gcov-profile/83813
2723         PR gcov-profile/84758
2724         PR gcov-profile/85217
2725         PR gcov-profile/85332
2726         * profile.c (branch_prob): Do not record GOTO expressions
2727         for GIMPLE statements which locations are already streamed.
2729 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2731         * gcc.c (handle_spec_function): Accept a soft_matched_part
2732         argument, as do_spec_1.  Pass it down to ...
2733         (eval_spec_function): Accept a soft_matched_part argument,
2734         and pass it down to ...
2735         (do_spec_2): Accept a soft_matched_part argument, and pass
2736         it down to do_spec_1.
2737         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2738         (handle_braces): Update call to handle_spec_function.
2739         (driver::set_up_specs): Update calls to do_spec_2.
2740         (compare_debug_dump_opt_spec_function): Likewise.
2741         (compare_debug_self_opt_spec_function): Likewise.
2743 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2745         * common.opt (nolibc): New option.
2746         * doc/invoke.texi (Link Options): Document it.
2747         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2748         * config/alpha/linux.h: Likewise.
2749         * config/arc/elf.h: Likewise.
2750         * config/arm/uclinux-elf.h: Likewise.
2751         * config/arm/unknown-elf.h: Likewise.
2752         * config/avr/avrlibc.h: Likewise.
2753         * config/bfin/bfin.h: Likewise.
2754         * config/bfin/linux.h: Likewise.
2755         * config/bfin/uclinux.h: Likewise.
2756         * config/darwin.h: Likewise.
2757         * config/darwin10.h: Likewise.
2758         * config/darwin12.h: Likewise.
2759         * config/gnu-user.h: Likewise.
2760         * config/lm32/uclinux-elf.h: Likewise.
2761         * config/pa/pa-hpux11.h: Likewise.
2762         * config/pa/pa64-hpux.h: Likewise.
2763         * config/sparc/sparc.h: Likewise.
2765 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2767         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2768         undefined variables.
2770 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2772         PR target/86640
2773         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2774         instead of GEN_INT.
2776 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2778         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2779         terminated string literal.
2781 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2783         PR rtl-optimization/85160
2784         * combine.c (is_just_move): New function.
2785         (try_combine): Allow combining two instructions into two if neither of
2786         the original instructions was a move.
2788 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2790         PR target/86673
2791         * doc/extend.texi (Global Register Variables): Discourage use of type
2792         qualifiers.
2793         (Local Register Variables): Likewise.
2795 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2797         PR tree-optimization/86506
2798         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2800 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2802         PR target/86547
2803         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2804         hard_regno, make sure no insn between `from` and `to` clobbers it.
2806 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2807             Tom de Vries  <tdevries@suse.de>
2809         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2810         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2811         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2812         PTX_DEFAULT_RUNTIME_DIM.
2813         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2815 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2817         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2818         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2819         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2821 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2823         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2824         used.
2825         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2826         predicate to reflect toc fusion has been deleted.
2827         (toc_fusion_mem_raw): Delete, no longer used.
2828         (toc_fusion_mem_wrapped): Likewise.
2829         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2830         fusion mask bit.
2831         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2832         Delete, no longer used.
2833         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2834         meant to be used for toc fusion.
2835         (rs6000_debug_print_mode): Delete toc fusion debugging.
2836         (rs6000_debug_reg_global): Likewise.
2837         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2838         fusion and secondary reload support that were never used.
2839         (rs6000_option_override_internal): Delete TOC fusion, that was only
2840         partially defined, and it did not work unless you also used the
2841         -mcmodel= switch.
2842         (rs6000_legitimate_address_p): Delete TOC fusion support.
2843         (rs6000_opt_masks): Likewise.
2844         (fusion_wrap_memory_address): Delete function, no longer used.
2845         (fusion_split_address); Delete TOC fusion support.
2846         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2847         longer used with toc fusion being deleted.
2848         (TARGET_TOC_FUSION_FP): Likewise.
2849         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2850         UNSPEC.
2851         (toc fusion spliter): Delete TOC fusion support.
2852         (toc_fusionload_<mode>): Likewise.
2853         (toc_fusionload_di): Likewise.
2854         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2855         longer needs to be named.  Rename predicate to delete TOC fusion.
2856         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2857         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2858         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2859         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2860         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2862 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2864         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2865         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2866         __int128 in built-in function prototypes.
2867         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2868         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2870 2018-07-27  Martin Sebor  <msebor@redhat.com>
2872         PR tree-optimization/86696
2873         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2874         types, including enums.
2875         (handle_char_store): Be prepared for the above function to fail.
2877 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2879         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2880         when optimization level is lower than 2 or optimize for size.
2882 2018-07-26  Martin Sebor  <msebor@redhat.com>
2884         PR tree-optimization/86043
2885         PR tree-optimization/86042
2886         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2887         (get_string_cst_length): Rename...
2888         (get_min_string_length): ...to this.  Add argument.
2889         (handle_char_store): Extend to handle multi-character stores by
2890         MEM_REF.
2891         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2892         * tree.h (initializer_zerop): Add argument.
2894 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2896         PR middle-end/86660
2897         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2898         declare target to variables if they have always,{to,from,tofrom} map
2899         kinds.
2901 2018-07-26  Martin Liska  <mliska@suse.cz>
2903         PR lto/86548
2904         * lto-wrapper.c: Add linker_output as prefix
2905         for ltrans_output_file.
2907 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2909         PR rtl-optimization/85805
2910         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2911         value for hard registers if that was written in the same mode.
2913 2018-07-26  Martin Liska  <mliska@suse.cz>
2915         PR gcov-profile/86536
2916         * gcov.c (format_gcov): Use printf format %.*f directly
2917         and do not handle special values.
2919 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2921         * common/config/arc/arc-common.c (arc_option_optimization_table):
2922         Update default optimizations for size.
2924 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2926         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2927         * config/arc/constraints.md (CfZ): New constraint.
2928         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2929         (subsf3_fpu): Likewise.
2930         (cmpsf_fpu): Likewise.
2931         (cmpsf_fpu_uneq): Likewise.
2933 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2935         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2936         accesses as well.
2937         (arc_is_uncached_mem_p): uncached applies to both the variable and
2938         the pointer.
2940 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2942         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2943         register names.
2945 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2947         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2948         field "m_scopes" from vec to auto_vec.
2950 2018-07-25  Martin Liska  <mliska@suse.cz>
2952         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2953         return type.
2955 2018-07-25  Richard Biener  <rguenther@suse.de>
2957         PR debug/86654
2958         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2959         special wrt context_die late.
2960         (gen_subprogram_die): Re-use DIEs in local scope.
2962 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2964         PR tree-optimization/86644
2965         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2967 2018-07-25  Martin Liska  <mliska@suse.cz>
2969         PR middle-end/86645
2970         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2971         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2973 2018-07-25  Martin Liska  <mliska@suse.cz>
2975         PR sanitizer/79635
2976         * params.def: Explain ASan abbreviation and provide
2977         a documentation link.
2979 2018-07-24  Martin Sebor  <msebor@redhat.com>
2981         PR tree-optimization/86622
2982         PR tree-optimization/86532
2983         * builtins.h (string_length): Declare.
2984         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2985         (check_access): Be prepared for non-constant length ranges.
2986         (string_length): Make extern.
2987         * expr.c (string_constant): Only handle the minor non-constant
2988         array index.  Use string_constant to compute the length of
2989         a generic string constant.
2991 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2993         PR tree-optimization/86618
2994         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2995         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2997 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2999         PR tree-optimization/86636
3000         * json.cc (json::object::set): Fix comment.  Add assertions.
3001         (json::array::append): Move here from json.h.  Add comment and an
3002         assertion.
3003         (json::string::string): Likewise.
3004         * json.h (json::array::append): Move to json.cc.
3005         (json::string::string): Likewise.
3006         * optinfo-emit-json.cc
3007         (optrecord_json_writer::impl_location_to_json): Assert that we
3008         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
3009         wrapper around it.  Expand the location once, rather than three
3010         times.
3011         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
3012         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
3013         wrappers.
3014         (optrecord_json_writer::optinfo_to_json): Likewise, in four
3015         places.  Fix some overlong lines.
3017 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
3019         * config/aarch64/aarch64-simd.md
3020         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
3021         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
3022         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
3023         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
3024         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
3025         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
3026         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
3027         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
3028         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
3030 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
3032         PR middle-end/86627
3033         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3034         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
3035         and abs_d == d, do the power of two handling if profitable.
3037 2018-07-24  Richard Biener  <rguenther@suse.de>
3039         * match.pd: Add BIT_FIELD_REF canonicalizations.
3041 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3043         PR c/86617
3044         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3046 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3048         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
3049         terminated STRING_CST object.
3051 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3053         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
3055 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3057         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
3058         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
3059         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
3060         the elements into a register.
3061         (rs6000_split_v4si_init_di_reg): Delete.
3062         (rs6000_split_v4si_init): Delete.
3063         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
3064         (vsx_init_v4si): Rewrite as a define_expand.
3066 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
3068         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
3069         zero_extend argument from memory): New.
3071 2018-07-22  Martin Sebor  <msebor@redhat.com>
3073         PR bootstrap/86621
3074         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
3075         diagnosing calls with unknown arguments unless -Walloca-larger-than
3076         is restricted to less than PTRDIFF_MAX bytes.
3078 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
3080         * doc/gcov.texi (Invoking Gcov): Editorial changes.
3082 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3084         * pretty-print.c (text_info::set_location): Remove redundant
3085         "line_table" parameter from call to rich_location::set_range.
3087 2018-07-20  Martin Sebor  <msebor@redhat.com>
3089         PR middle-end/82063
3090         * builtins.c (expand_builtin_alloca): Adjust.
3091         * calls.c (alloc_max_size): Simplify.
3092         * cgraphunit.c (cgraph_node::expand): Adjust.
3093         * common.opt (larger_than_size, warn_frame_larger_than): Remove
3094         variables.
3095         (frame_larger_than_size): Same.
3096         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
3097         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
3098         Initialize.
3099         * doc/invoke.texi (GCC Command Options): Document option arguments.
3100         Explain byte-size arguments and suffixes.
3101         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
3102         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
3103         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
3104         * doc/options.texi (UInteger): Expand.
3105         (Host_Wide_Int, ByteSize): Document new properties.
3106         * final.c (final_start_function_1): Include sizes in an error message.
3107         * function.c (frame_offset_overflow): Same.
3108         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
3109         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
3110         Diagnose unbounded alloca calls only for limits of less than
3111         PTRDIFF_MAX.
3112         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
3113         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
3114         for alloca(0).
3115         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
3116         only for limits of less than PTRDIFF_MAX.
3117         * langhooks-def.h (lhd_handle_option): Change function argument
3118         to HOST_WIDE_INT.
3119         * langhooks.c (lhd_handle_option): Same.
3120         * langhooks.h (handle_option): Same.
3121         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
3122         ByteSize flags.
3123         (var_type, var_type_struct): Same.
3124         (var_set): Handle ByteSize flag.
3125         * optc-gen.awk: Add comments to output to ease debugging.  Make
3126         use of HOST_WIDE_INT where appropriate.
3127         * opts-gen-save.awk:  Use %lx to format unsigned long.
3128         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
3129         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
3130         arguments.  Parse bytes-size suffixes.
3131         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
3132         (enum_value_to_arg): Same.
3133         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
3134         (handle_option): Adjust.
3135         (generate_option): Change function argument to HOST_WIDE_INT.
3136         (cmdline_handle_error): Adjust.
3137         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
3138         (set_option): Change function argument to HOST_WIDE_INT.
3139         (option_enabled): Handle cl_host_wide_int.
3140         (get_option_state): Handle CLVC_SIZE.
3141         (control_warning_option): Same.
3142         * opts.c (common_handle_option): Change function argument to
3143         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
3144         OPT_Wvla_larger_than_.
3145         * opts.h (enum cl_var_type): Add an enumerator.
3146         * stor-layout.c (layout_decl): Print a more meaningful warning.
3147         * toplev.c (output_stack_usage): Adjust.
3149 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3151         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3152         call to inline_expand_builtin_string_cmp.
3153         (expand_builtin_strcmp): Likewise.
3154         (expand_builtin_strncmp): Likewise.
3155         (inline_string_cmp): Delete the last parameter, change char_type_node
3156         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3157         two operands.
3158         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3159         the inlining expansion on target where the type of the call has same or
3160         narrower precision than unsigned char.
3162 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3164         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3165         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3166         * common.opt (fsave-optimization-record): New option.
3167         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3168         * doc/invoke.texi (-fsave-optimization-record): New option.
3169         * dumpfile.c: Include "optinfo-emit-json.h".
3170         (struct kv_pair): Move to coretypes.h.
3171         (optgroup_options): Make non-static.
3172         (dump_context::end_scope): Call
3173         optimization_records_maybe_pop_dump_scope.
3174         * dumpfile.h (optgroup_options): New decl.
3175         * json.cc: New file.
3176         * json.h: New file.
3177         * optinfo-emit-json.cc: New file.
3178         * optinfo-emit-json.h: New file.
3179         * optinfo.cc: Include "optinfo-emit-json.h".
3180         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3181         (optinfo_enabled_p): Check optimization_records_enabled_p.
3182         (optinfo_wants_inlining_info_p): Likewise.
3183         * optinfo.h: Update comment.
3184         * profile-count.c (profile_quality_as_string): New function.
3185         * profile-count.h (profile_quality_as_string): New decl.
3186         (profile_count::quality): New accessor.
3187         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3188         and optinfo_emit_json_cc_tests.
3189         * selftest.h (selftest::json_cc_tests): New decl.
3190         (selftest::optinfo_emit_json_cc_tests): New decl.
3191         * toplev.c: Include "optinfo-emit-json.h".
3192         (compile_file): Call optimization_records_finish.
3193         (do_compile): Call optimization_records_start.
3194         * tree-ssa-live.c: Include optinfo.h.
3195         (remove_unused_scope_block_p): Retain inlining information if
3196         optinfo_wants_inlining_info_p returns true.
3198 2018-07-20  Richard Biener  <rguenther@suse.de>
3200         PR debug/86585
3201         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3202         to cover -flto-partition=none.
3204 2018-07-20  Martin Liska  <mliska@suse.cz>
3206         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3207         (get_decl_source_range): Remove unused function.
3209 2018-07-20  Richard Biener  <rguenther@suse.de>
3211         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3212         (struct vn_phi_s): Likewise.
3213         (struct vn_reference_s): Likewise.
3214         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3215         for searching the slot of an entry known to be in the hash itself.
3216         (vn_phi_hasher::equal): Likewise.
3217         (vn_reference_hasher::equal): Likewise.
3218         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3219         globals.
3220         (optimistic_info, current_info): Remove, keeping only valid_info.
3221         (vn_reference_lookup_1): Remove fallback lookup.
3222         (vn_reference_lookup_2): Likewise.
3223         (vn_nary_op_lookup_1): Likewise.
3224         (vn_phi_lookup): Likewise.
3225         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3226         hash element.
3227         (vn_reference_insert): Adjust, chain the inserted hash element
3228         at last_inserted_ref.
3229         (vn_reference_insert_pieces): Likewise.
3230         (visit_reference_op_call): Likewise.
3231         (vn_nary_op_insert_into): Chain the inserted hash element at
3232         last_inserted_nary.
3233         (vn_nary_op_insert_pieces): Adjust.
3234         (vn_nary_op_insert): Likewise.
3235         (vn_nary_op_insert_stmt): Likewise.
3236         (vn_phi_insert): Adjust, chain the inserted hash element at
3237         last_inserted_phi.
3238         (process_scc): Remove clearing and copying the optimistic
3239         table.  Instead remove elements inserted during an optimistic
3240         iteration from the single table we maintain.
3241         (init_scc_vn): Adjust.
3242         (free_scc_vn): Likewise.
3243         (sccvn_dom_walker::record_cond): Likewise.
3244         (sccvn_dom_walker::after_dom_children): Likewise.
3246 2018-07-19  Martin Sebor  <msebor@redhat.com>
3248         PR tree-optimization/84047
3249         PR tree-optimization/83776
3250         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3251         (check_array_bounds): Call it.
3253 2018-07-19  Martin Sebor  <msebor@redhat.com>
3255         * align.h (align_flags): Use member initialization.
3257 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3259         * Makefile.in (OBJS): Add optinfo.o.
3260         * coretypes.h (class symtab_node): New forward decl.
3261         (struct cgraph_node): New forward decl.
3262         (class varpool_node): New forward decl.
3263         * dump-context.h: New file.
3264         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3265         "tree-pass.h".
3266         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3267         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3268         (set_alt_dump_file): Likewise.
3269         (dump_context::~dump_context): New dtor.
3270         (dump_gimple_stmt): Move implementation to...
3271         (dump_context::dump_gimple_stmt): ...this new member function.
3272         Add the stmt to any pending optinfo, creating one if need be.
3273         (dump_gimple_stmt_loc): Move implementation to...
3274         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3275         Start a new optinfo and add the stmt to it.
3276         (dump_gimple_expr): Move implementation to...
3277         (dump_context::dump_gimple_expr): ...this new member function.
3278         Add the stmt to any pending optinfo, creating one if need be.
3279         (dump_gimple_expr_loc): Move implementation to...
3280         (dump_context::dump_gimple_expr_loc): ...this new member function.
3281         Start a new optinfo and add the stmt to it.
3282         (dump_generic_expr): Move implementation to...
3283         (dump_context::dump_generic_expr): ...this new member function.
3284         Add the tree to any pending optinfo, creating one if need be.
3285         (dump_generic_expr_loc): Move implementation to...
3286         (dump_context::dump_generic_expr_loc): ...this new member
3287         function.  Add the tree to any pending optinfo, creating one if
3288         need be.
3289         (dump_printf): Move implementation to...
3290         (dump_context::dump_printf_va): ...this new member function.  Add
3291         the text to any pending optinfo, creating one if need be.
3292         (dump_printf_loc): Move implementation to...
3293         (dump_context::dump_printf_loc_va): ...this new member function.
3294         Start a new optinfo and add the stmt to it.
3295         (dump_dec): Move implementation to...
3296         (dump_context::dump_dec): ...this new member function.  Add the
3297         value to any pending optinfo, creating one if need be.
3298         (dump_context::dump_symtab_node): New member function.
3299         (dump_context::get_scope_depth): New member function.
3300         (dump_context::begin_scope): New member function.
3301         (dump_context::end_scope): New member function.
3302         (dump_context::ensure_pending_optinfo): New member function.
3303         (dump_context::begin_next_optinfo): New member function.
3304         (dump_context::end_any_optinfo): New member function.
3305         (dump_context::s_current): New global.
3306         (dump_context::s_default): New global.
3307         (dump_scope_depth): Delete global.
3308         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3309         (dump_symtab_node): New function.
3310         (get_dump_scope_depth): Reimplement in terms of dump_context.
3311         (dump_begin_scope): Likewise.
3312         (dump_end_scope): Likewise.
3313         (selftest::temp_dump_context::temp_dump_context): New ctor.
3314         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3315         (selftest::verify_item): New function.
3316         (ASSERT_IS_TEXT): New macro.
3317         (ASSERT_IS_TREE): New macro.
3318         (ASSERT_IS_GIMPLE): New macro.
3319         (selftest::test_capture_of_dump_calls): New test.
3320         (selftest::dumpfile_c_tests): Call it.
3321         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3322         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3323         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3324         descriptive comment.
3325         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3326         (dump_node, dump_bb): Move these unrelated decls.
3327         (class dump_manager): Add leading comment.
3328         * optinfo.cc: New file.
3329         * optinfo.h: New file.
3331 2018-07-19  Michael Collison  <michael.collison@arm.com>
3332             Richard Henderson <rth@redhat.com>
3334         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3335         (subti): Handle op1 zero.
3336         (subvti4, usub4ti4): New.
3337         (*sub<GPI>3_compare1_imm): New.
3338         (sub<GPI>3_carryinCV): New.
3339         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3340         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3342 2018-07-19  Michael Collison  <michael.collison@arm.com>
3343             Richard Henderson <rth@redhat.com>
3345         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3346         (addti3): Create simpler code if low part is already known to be 0.
3347         (addvti4, uaddvti4): New.
3348         (*add<GPI>3_compareC_cconly_imm): New.
3349         (*add<GPI>3_compareC_cconly): New.
3350         (*add<GPI>3_compareC_imm): New.
3351         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3352         handle constants within this pattern..
3353         (*add<GPI>3_compareV_cconly_imm): New.
3354         (*add<GPI>3_compareV_cconly): New.
3355         (*add<GPI>3_compareV_imm): New.
3356         (add<GPI>3_compareV): New.
3357         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3358         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3359         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3360         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3361         with 'comparison' operator.
3362         (*add<GPI>3_compareV_cconly_imm): Ditto.
3363         (*add<GPI>3_compareV_cconly): Ditto.
3364         (*add<GPI>3_compareV_imm): Ditto.
3365         (add<GPI>3_compareV): Ditto.
3366         (add<mode>3_carryinC): Ditto.
3367         (*add<mode>3_carryinC_zero): Ditto.
3368         (*add<mode>3_carryinC): Ditto.
3369         (add<mode>3_carryinV): Ditto.
3370         (*add<mode>3_carryinV_zero): Ditto.
3371         (*add<mode>3_carryinV): Ditto.
3373 2018-07-19  Michael Collison  <michael.collison@arm.com>
3374             Richard Henderson <rth@redhat.com>
3376         * config/aarch64/aarch64-modes.def (CC_V): New.
3377         * config/aarch64/aarch64-protos.h
3378         (aarch64_addti_scratch_regs): Declare
3379         (aarch64_subvti_scratch_regs): Declare.
3380         (aarch64_expand_subvti): Declare.
3381         (aarch64_gen_unlikely_cbranch): Declare
3382         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3383         for signed overflow using CC_Vmode.
3384         (aarch64_get_condition_code_1): Handle CC_Vmode.
3385         (aarch64_gen_unlikely_cbranch): New function.
3386         (aarch64_addti_scratch_regs): New function.
3387         (aarch64_subvti_scratch_regs): New function.
3388         (aarch64_expand_subvti): New function.
3390 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3392         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3393         extension.
3394         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3395         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3396         extension.
3398 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3400         PR target/83009
3401         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3402         address check not strict.
3404 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3406         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3407         Umq with Umn.
3408         (store_pair_lanes<mode>): Likewise.
3409         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3410         enum value 'ADDR_QUERY_LDP_STP_N'.
3411         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3412         (aarch64_print_address_internal): Add declaration.
3413         (aarch64_print_ldpstp_address): Remove.
3414         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3415         (aarch64_print_operand): Change printing of 'y'.
3416         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3417         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3418         'true' rather than '1'.
3419         * config/aarch64/constraints.md (Uml): Likewise.
3420         (Uml): Rename to Umn.
3421         (Umq): Remove.
3423 2018-07-19  Richard Biener  <rguenther@suse.de>
3425         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3426         a trailing array.
3427         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3428         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3429         (vn_reference_hasher): Likewise.
3430         (struct vn_tables_s): Remove obstack and alloc-pool members.
3431         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3432         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3433         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3434         (vn_reference_insert_pieces): Likewise.
3435         (alloc_vn_nary_op_noinit): Adjust.
3436         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3437         (vn_phi_eq): Adjust.
3438         (shared_lookup_phiargs): Remove.
3439         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3440         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3441         (visit_reference_op_call): Likewise.
3442         (copy_nary, copy_phi, copy_reference): Remove.
3443         (process_scc): Rewind the obstack when iterating.  Do not
3444         copy the elements to valid_info but just move them from one
3445         hashtable to the other.
3446         (allocate_vn_table): Adjust.
3447         (free_vn_table): Likewise.
3448         (init_scc_vn): Likewise.
3449         (free_scc_vn): Likewise.
3451 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3453         PR target/86560
3454         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3455         indirect_return as function type attribute.
3456         (ix86_attribute_table): Change indirect_return to function
3457         type attribute.
3458         * doc/extend.texi: Update indirect_return attribute.
3460 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3462         * wide-int.h (widest2_int): New.
3463         * gimple-fold.c (arith_overflowed_p): Use it.
3464         * tree.h (widest2_int_cst): New.
3465         * tree-vrp.c (wide_int_binop_overflow): Rename from
3466         vrp_int_const_binop.
3467         Rewrite to work on trees.
3468         (extract_range_from_multiplicative_op_1): Abstract code to...
3469         (wide_int_range_min_max): ...here.
3470         (wide_int_range_cross_product): ...and here.
3471         (extract_range_from_binary_expr_1): Abstract overflow code to...
3472         (wide_int_range_mult_wrapping): ...here.
3473         * tree-vrp.h (wide_int_range_cross_product): New.
3474         (wide_int_range_mult_wrapping): New.
3476 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3477             Julia Koval  <julia.koval@intel.com>
3479         * config/i386/x86-tune-costs.h (skylake_memcpy,
3480         skylake_memset): Replace rep_prefix with unrolling for size 512.
3482 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3484         PR middle-end/86544
3485         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3486         comparision with EQ_EXPR in last stmt.
3488 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3490         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3491         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3492         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3493         previously known as "PowerPC AltiVec Built-in Functions".  Move
3494         some material to new subsubsections "PowerPC AltiVec Built-in
3495         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3496         ISA 2.07".
3497         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3498         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3499         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3500         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3502 2018-07-18  Richard Biener  <rguenther@suse.de>
3504         PR tree-optimization/86557
3505         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3506         EXACT_DIV_EXPR.
3508 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3510         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3512 2018-07-17  Jeff Law  <law@redhat.com>
3514         * config/arm/arm.c (get_label_padding): Update for recent
3515         changes to label_to_alignment.
3517         PR tree-optimization/86010
3518         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3520         * config/mips/mips.c (vr4130_align_insns): Update for recent
3521         changes to label_to_alignment.
3523         * config/frv/frv.c (frv_label_align): Update for recent changes
3524         to label_to_alignment.
3526         * config/nios2/nios2.c (nios2_label_align): Update for recent
3527         changes which dropped ALIGN_LABELS_LOG.
3529 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3531         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3532         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3534 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3536         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3537         deprecated align_labels_log.
3539 2018-07-17  Richard Biener  <rguenther@suse.de>
3541         PR lto/86456
3542         * dwarf2out.c (init_sections_and_labels): Always generate
3543         a debug_line_str_section for early LTO debug.
3544         (dwarf2out_finish): Reset debug_line_str_hash output early.
3545         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3546         with fat LTO part.
3547         (dwarf2out_early_finish): Output debug_line_str.
3549 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3551         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3552         index register on z196 or later.
3554 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3556         * config/s390/s390.c (s390_default_align): Set default function
3557         alignment to 16.
3558         (s390_override_options_after_change): Call s390_default align.
3559         (s390_option_override_internal): Call s390_default_align.
3560         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3562 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3564         PR middle-end/86542
3565         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3566         to _looptemp_ clauses, other than the first two.
3568 2018-07-17  Martin Liska  <mliska@suse.cz>
3570         * opts.c: Do not enable OPT_falign_* for -Os.
3572 2018-07-17  Martin Liska  <mliska@suse.cz>
3574         * align.h (MAX_CODE_ALIGN): New.
3575         (MAX_CODE_ALIGN_VALUE): New.
3576         * common/config/i386/i386-common.c (ix86_handle_option):
3577         (MAX_CODE_ALIGN): Moved to align.h.
3578         * final.c (MAX_CODE_ALIGN): Likewise.
3579         * opts.c (parse_and_check_align_values):
3580         (MAX_CODE_ALIGN): Likewise.
3581         (MAX_CODE_ALIGN_VALUE): Likewise.
3583 2018-07-17  Martin Liska  <mliska@suse.cz>
3585         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3586         in order to fulfil coding style.
3587         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3588         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3589         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3590         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3591         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3592         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3593         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3594         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3595         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3597 2018-07-17  Martin Liska  <mliska@suse.cz>
3599         * align.h: New file.
3600         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3601         directly.
3602         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3603         align_flags of label_to_alignment.
3604         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3605         align_flags class.
3606         * config/m68k/m68k.c: Do not use removed align_labels_value and
3607         align_loops_value.
3608         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3609         (LOOP_ALIGN): Likewise.
3610         (LABEL_ALIGN): Likewise.
3611         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3612         Remove not used macro.
3613         (rs6000_loop_align): Change return type to align_flags.
3614         (rs6000_loop_align_max_skip): Remove.
3615         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3616         Change return type to align_flags.
3617         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3618         Remove not used macro.
3619         (rs6000_loop_align):  Change return type to align_flags.
3620         (rs6000_loop_align_max_skip): Remove.
3621         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3622         * config/rx/rx-protos.h (rx_align_for_label): Make it
3623         static function.
3624         * config/rx/rx.c (rx_align_for_label): Change return type
3625         to align_flags.
3626         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3627         macro definitions.
3628         into align_flags class.
3629         (LABEL_ALIGN): Likewise.
3630         (LOOP_ALIGN): Likewise.
3631         * config/s390/s390.c (s390_label_align): Use align_flags
3632         class member.
3633         (s390_asm_output_function_label): Likewise.
3634         * config/sh/sh.c (sh_override_options_after_change):
3635         Use align_flags class directly without macros.
3636         (find_barrier): Likewise.
3637         (barrier_align): Likewise.
3638         (sh_loop_align): Likewise.
3639         * config/spu/spu.c (spu_option_override):
3640         Use align_flags_tuple::get_value instead of removed macros.
3641         (spu_sched_init): Likewise.
3642         * config/spu/spu.h (GTY): Likewise.
3643         * config/visium/visium.c (visium_option_override):
3644         Set "8" as default secondary alignment.
3645         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3646         in order to guarantee secondary alignment of 8.
3647         * coretypes.h: Include align.h header file.
3648         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3649         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3650         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3651         * doc/tm.texi.in: Likewise.
3652         * final.c (struct label_alignment): Remove not used structure.
3653         (LABEL_ALIGN): Change type to align_flags.
3654         (LOOP_ALIGN): Likewise.
3655         (JUMP_ALIGN): Likewise.
3656         (default_loop_align_max_skip): Remove.
3657         (default_label_align_max_skip): Likewise.
3658         (default_jump_align_max_skip): Likewise.
3659         (default_label_align_after_barrier_max_skip):
3660         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3661         (LABEL_TO_MAX_SKIP): Remove.
3662         (label_to_alignment): Return align_flags type instead of integer.
3663         (label_to_max_skip): Remove.
3664         (align_fuzz): Use align_flags type.
3665         (compute_alignments): Use align_flags type and use align_flags::max
3666         to combine multiple alignments.
3667         (grow_label_align): Grow vec instead of C array.
3668         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3669         (shorten_branches):  Use align_flags type and use align_flags::max
3670         to combine multiple alignments.
3671         (final_scan_insn_1): Remove usage of secondary alignment that comes
3672         from label alignment, but instead use proper secondary alignment
3673         which is computed in grow_label_align.
3674         * flags.h (struct align_flags_tuple): Move to align.h.
3675         (struct align_flags): Likewise.
3676         (state_align_loops): Rename to align_loops.
3677         (state_align_jumps): Rename to align_jumps.
3678         (state_align_labels): Rename to align_labels.
3679         (state_align_functions): Rename to align_functions.
3680         (align_loops_log): Remove.
3681         (align_jumps_log): Remove.
3682         (align_labels_log): Remove.
3683         (align_functions_log): Remove.
3684         (align_loops_max_skip): Remove.
3685         (align_jumps_max_skip): Remove.
3686         (align_labels_max_skip): Remove.
3687         (align_functions_max_skip): Remove.
3688         (align_loops_value): Remove.
3689         (align_jumps_value): Remove.
3690         (align_labels_value): Remove.
3691         (align_functions_value): Remove.
3692         * output.h (label_to_alignment): Change return type to align_flags.
3693         (label_to_max_skip): Remove.
3694         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3695         jump_align_max_skip macros.
3696         * targhooks.h (default_loop_align_max_skip): Remove.
3697         (default_label_align_max_skip): Likewise.
3698         (default_jump_align_max_skip): Likewise.
3699         (default_label_align_after_barrier_max_skip): Remove.
3700         * toplev.c (read_log_maxskip): Use ::normalize function.
3701         (parse_N_M): Remove not used argument and also call ::normalize.
3702         (parse_alignment_opts): Do not pass unused arguments.
3703         * varasm.c (assemble_start_function): Use directly align_functions
3704         instead of removed macros.
3705         * system.h: Do not poison removed macros.
3707 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3709         PR middle-end/86539
3710         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3711         and cond temporaries don't have reference type if iterator has
3712         pointer type.  For init use &for_pre_body instead of pre_p if
3713         for_pre_body is non-empty.
3715 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3717         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3718         double-double modes to SFmode directly directly.
3719         (trunc<mode>sf2_fprs): Delete.
3721 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3723         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3724         for conversions between IFmode and the decimal floating point modes.
3725         (init_float128_ieee): Use the correct names for conversions between
3726         KFmode and the decimal floating point modes.
3728 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3730         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3731         for the conversions between TDmode and IFmode.
3732         (init_float128_ieee): Use more correct names for the conversions
3733         between TDmode and KFmode.
3735 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3737         PR tree-optimization/86526
3738         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3739         (inline_expand_builtin_string_cmp): Likewise.
3740         (inline_string_cmp): Likewise.  Use c_readstr instead of
3741         builtin_memcpy_read_str.  Add unit_mode temporary.
3743 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3745         PR middle-end/86528
3746         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3747         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3749 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3751         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3752         Alphabetize prototypes of built-in functions, separating out
3753         built-in functions that are listed in this section but should be
3754         described elsewhere.
3756 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3758         PR target/86511
3759         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3760         conditional move when trapping comparison was split to a
3761         non-trapping one (and vice versa).
3763 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3765         * config/s390/s390.c (s390_function_profiler): Generate nops
3766         instead of profiler call sequences.
3767         * config/s390/s390.opt: Add the new option.
3769 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3771         * config/s390/s390.c (s390_function_profiler): Generate
3772         __mcount_loc section.
3773         * config/s390/s390.opt: Add the new option.
3775 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3777         * common.opt: Add the new warning.
3778         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3779         %r0,__fentry__" when -mfentry is specified.
3780         (s390_option_override_internal): Disallow -mfentry for 31-bit
3781         CPUs.
3782         * config/s390/s390.opt: Add the new option.
3784 2018-07-16  Richard Biener  <rguenther@suse.de>
3786         PR lto/86523
3787         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3788         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3790 2018-07-16  Martin Liska  <mliska@suse.cz>
3792         PR ipa/86529
3793         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3794         to ::get_create.
3796 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3798         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3800 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3802         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3803         for ARCHS4x.
3804         * config/arc/arc-cpus.def (hs4x): New cpu.
3805         (hs4xd): Likewise.
3806         * config/arc/arc-tables.opt: Regenerate.
3807         * config/arc/arc.c (arc_sched_issue_rate): New function.
3808         (TARGET_SCHED_ISSUE_RATE): Define.
3809         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3810         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3811         fpu_cvt.
3812         (attr tune): Add ARCHS4x tune values.
3813         (attr tune_dspmpy): Define.
3814         (*tst): Correct instruction type.
3815         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3816         * config/arc/arcHS4x.md: New file.
3817         * config/arc/fpu.md: Update instruction type attributes.
3818         * config/arc/t-multilib: Regenerate.
3820 2018-07-16  Tom de Vries  <tdevries@suse.de>
3822         PR debug/86455
3823         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3825 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3827         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3828         early clobber.
3830 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3832         PR tree-optimization/86514
3833         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3834         conversion to a boolean type from a type with greater precision.
3836 2018-07-16  Tom de Vries  <tdevries@suse.de>
3838         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3839         dump_flags request TDF_SLIM.
3841 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3843         * fold-const.c (int_const_binop_1): Abstract...
3844         (wide_int_binop): ...wide int code here.
3845         (poly_int_binop): ...poly int code here.
3846         Abstract the rest of int_const_binop_1 into int_const_binop.
3847         * fold-const.h (wide_int_binop): New.
3848         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3849         Remove useless PLUS/MINUS_EXPR case.
3850         (zero_nonzero_bits_from_vr): Move wide int code...
3851         (zero_nonzero_bits_from_bounds): ...here.
3852         (extract_range_from_binary_expr_1): Move mask optimization code...
3853         (range_easy_mask_min_max): ...here.
3854         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3855         (range_easy_mask_min_max): New.
3857 2018-07-15  Jeff Law  <law@redhat.com>
3859         PR target/85993
3860         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3861         block.
3863 2018-07-14  Jim Wilson  <jimw@sifive.com>
3865         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3867 2018-07-14  Paul Koning  <ni1d@arrl.net>
3869         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3871 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3873         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3874         copying section.
3876 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3877             Steve Munroe  <munroesj52@gmail.com>
3879         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3880         (_mm_andnot_si128): Likewise.
3881         (_mm_or_si128): Likewise.
3882         (_mm_xor_si128): Likewise.
3884 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3886         PR middle-end/78809
3887         * builtins.c (expand_builtin_memcmp): Inline the calls first
3888         when result_eq is false.
3889         (expand_builtin_strcmp): Inline the calls first.
3890         (expand_builtin_strncmp): Likewise.
3891         (inline_string_cmp): New routine. Expand a string compare
3892         call by using a sequence of char comparison.
3893         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3894         a call to str(n)cmp/memcmp.
3895         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3896         New option.
3897         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3899 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3901         * config/arm/driver-arm.c: Include arm-native.h.
3902         (host_detect_local_cpu): Use auto-generated data tables.
3903         (vendors, arm_cpu_table): Delete.  Move part information to ...
3904         * config/arm/arm-cpus.in: ... here.
3905         * config/arm/parsecpu.awk (gen_native): New function.
3906         (vendor, part): New CPU fields.
3907         (END): Add support for building the native CPU detection tables.
3908         * config/arm/t-arm (arm-native.h): Add build rule.
3909         (driver-arm.o): Add dependency on arm-native.h.
3911 2018-07-13  Richard Biener  <rguenther@suse.de>
3913         PR middle-end/85974
3914         * match.pd (addr1 - addr2): Allow either of the operand to
3915         have a conversion.
3917 2018-07-13  Tom de Vries  <tdevries@suse.de>
3919         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3920         in remap_ssa_name.
3922 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3924         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3925         arrays instead of numbered variables.
3927 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3929         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3930         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3932 2018-07-13  Richard Biener  <rguenther@suse.de>
3934         PR debug/86452
3935         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3936         instead of get_context_die.
3938 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3939             Richard Biener  <rguenther@suse.de>
3941         PR middle-end/86489
3942         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3943         that the loop latch destination where phi is defined.
3945 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3947         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3948         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3949         (riscv_set_current_function): Extract getting interrupt type to new
3950         function.
3951         (riscv_get_interrupt_type): New function.
3952         (riscv_merge_decl_attributes): New function, checking interrupt type is
3953         same.
3954         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3956 2018-07-12  Paul Koning  <ni1d@arrl.net>
3958         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3959         directive.
3961 2018-07-12  Paul Koning  <ni1d@arrl.net>
3963         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3964         zero reference, add doloop_end instead.
3965         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3966         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3967         detail for doloop_end.
3969 2018-07-12  Martin Sebor  <msebor@redhat.com>
3971         PR c/86453
3972         * attribs.c (decl_attributes): Reject conflicting attributes before
3973         calling attribute handlers.
3975 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3977         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3978          parameter.
3979         (gcc::dump_manager::get_dump_file_name): likewise.
3980         (dump_begin): Likewise.
3981         * dumpfile.h (dump_begin): Update prototype.
3982         (gcc::dump_manager::get_dump_file_name,
3983         gcc::dump_manager::get_dump_file_name): Update prototype.
3985 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3987         * internal-fn.h (vectorizable_internal_fn_p): New function.
3988         * tree-vect-slp.c (compatible_calls_p): Likewise.
3989         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3990         to internal functions.
3991         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3993 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3995         * fold-const.h (inverse_conditions_p): Declare.
3996         * fold-const.c (inverse_conditions_p): New function.
3997         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3998         that test the inverse condition of a conditional internal function.
3999         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
4000         * internal-fn.c (internal_fn_mask_index): Handle conditional
4001         internal functions.
4002         (vectorized_internal_fn_supported_p): New function.
4003         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
4004         (any_pred_load_store): Replace with...
4005         (need_to_predicate): ...this new variable.
4006         (redundant_ssa_names): New variable.
4007         (ifcvt_can_use_mask_load_store): Move initial checks to...
4008         (ifcvt_can_predicate): ...this new function.  Handle tree codes
4009         for which a conditional internal function exists.
4010         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
4011         instead of ifcvt_can_use_mask_load_store.  Update after variable
4012         name change.
4013         (predicate_load_or_store): New function, split out from
4014         predicate_mem_writes.
4015         (check_redundant_cond_expr): New function.
4016         (value_available_p): Likewise.
4017         (predicate_rhs_code): Likewise.
4018         (predicate_mem_writes): Rename to...
4019         (predicate_statements): ...this.  Use predicate_load_or_store
4020         and predicate_rhs_code.
4021         (combine_blocks, tree_if_conversion): Update after above name changes.
4022         (ifcvt_local_dce): Handle redundant_ssa_names.
4023         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
4024         general conditional functions.
4025         * tree-vect-stmts.c (vectorizable_call): Likewise.
4027 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4028             Alan Hayward  <alan.hayward@arm.com>
4029             David Sherwood  <david.sherwood@arm.com>
4031         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
4032         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
4033         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
4034         plus and minus and convert them into IFN_COND_FMA-based sequences.
4035         (convert_mult_to_fma): Handle conditional plus and minus.
4037 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4039         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
4040         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
4041         (cond_fnms_optab): New optabs.
4042         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
4043         internal functions.
4044         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
4045         * internal-fn.h (get_conditional_internal_fn): Declare.
4046         (get_unconditional_internal_fn): Likewise.
4047         * internal-fn.c (cond_ternary_direct): New macro.
4048         (expand_cond_ternary_optab_fn): Likewise.
4049         (direct_cond_ternary_optab_supported_p): Likewise.
4050         (FOR_EACH_COND_FN_PAIR): Likewise.
4051         (get_conditional_internal_fn): New function.
4052         (get_unconditional_internal_fn): Likewise.
4053         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
4054         (gimple_match_op::gimple_match_op): Add a new overload for 5
4055         operands.
4056         (gimple_match_op::set_op): Likewise.
4057         (gimple_resimplify5): Declare.
4058         * genmatch.c (decision_tree::gen): Generate simplifications for
4059         5 operands.
4060         * gimple-match-head.c (gimple_simplify): Define an overload for
4061         5 operands.  Handle calls with 5 arguments in the top-level overload.
4062         (convert_conditional_op): Handle conversions from unconditional
4063         internal functions to conditional ones.
4064         (gimple_resimplify5): New function.
4065         (build_call_internal): Pass a fifth operand.
4066         (maybe_push_res_to_seq): Likewise.
4067         (try_conditional_simplification): Try converting conditional
4068         internal functions to unconditional internal functions.
4069         Handle 3-operand unconditional forms.
4070         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
4071         Define ternary equivalents of the current rules for binary conditional
4072         internal functions.
4073         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
4074         ternary operations.
4075         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
4076         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
4077         (optab): Handle them.
4078         (SVE_COND_FP_TERNARY): New int iterator.
4079         (sve_fmla_op, sve_fmad_op): New int attributes.
4080         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
4081         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
4082         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
4084 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
4086         * target.def (preferred_else_value): New target hook.
4087         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
4088         * doc/tm.texi: Regenerate.
4089         * targhooks.h (default_preferred_else_value): Declare.
4090         * targhooks.c (default_preferred_else_value): New function.
4091         * internal-fn.h (conditional_internal_fn_code): Declare.
4092         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
4093         (get_conditional_internal_fn): Use it.
4094         (conditional_internal_fn_code): New function.
4095         * gimple-match.h (gimple_match_cond): New struct.
4096         (gimple_match_op): Add a cond member function.
4097         (gimple_match_op::gimple_match_op): Update all forms to take a
4098         gimple_match_cond.
4099         * genmatch.c (expr::gen_transform): Use the same condition as res_op
4100         for the suboperation, but don't specify a particular else_value.
4101         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
4102         (visit_nary_op, visit_reference_op_load): Pass
4103         gimple_match_cond::UNCOND to the gimple_match_op constructor.
4104         * gimple-match-head.c: Include tree-eh.h
4105         (convert_conditional_op): New function.
4106         (maybe_resimplify_conditional_op): Likewise.
4107         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
4108         (gimple_resimplify2): Likewise.
4109         (gimple_resimplify3): Likewise.
4110         (gimple_resimplify4): Likewise.
4111         (maybe_push_res_to_seq): Return null for conditional operations.
4112         (try_conditional_simplification): New function.
4113         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
4114         constructor.
4115         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
4116         IFN_COND_* call.
4117         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
4118         function.
4119         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
4121 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
4123         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
4124         DECL_FCONTEXT
4125         (hash_tree): Do not hash DECL_FCONTEXT
4126         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
4127         Do not stream DECL_FCONTEXT.
4128         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
4129         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
4131 2018-07-12  Richard Biener  <rguenther@suse.de>
4133         PR debug/86462
4134         * dwarf2out.c (gen_block_die): Only output blocks when they have
4135         at least one !DECL_IGNORED_P variable.
4137 2018-07-12  Richard Biener  <rguenther@suse.de>
4139         PR target/84829
4140         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
4141         Remove -mieee-fp handling.
4143 2018-07-12  Richard Biener  <rguenther@suse.de>
4145         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
4146         left-over from last patch.
4148 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4150         PR tree-optimization/86492
4151         * gimple-ssa-store-merging.c
4152         (imm_store_chain_info::coalesce_immediate_stores): Call
4153         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4155 2018-07-12  Richard Biener  <rguenther@suse.de>
4157         PR middle-end/86479
4158         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4159         move possibly trapping operations into the conditional.
4161 2018-07-12  Richard Biener  <rguenther@suse.de>
4163         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4164         (vn_lookup_simplify_result): Remove recursion limit applied
4165         here.
4166         (vn_nary_build_or_lookup_1): Adjust.
4167         (try_to_simplify): Likewise.
4168         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4169         here.
4170         (gimple_resimplify2): Likewise.
4171         (gimple_resimplify3): Likewise.
4172         (gimple_resimplify4): Likewise.
4174 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4176         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4177         Use __mmask64 type instead of __mmask8 for __M argument.
4178         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4179         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4180         __U argument.
4181         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4182         __mmask16 for __M argument.
4183         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4184         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4185         to __mmask16 instead of __mmask8.
4186         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4187         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4188         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4189         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4190         instead of __mmask16 for __U argument.
4191         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4192         __mmask16 instead of __mmask8 for __U argument.
4193         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4194         __U argument.
4195         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4196         __mmask16.
4197         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4198         argument.
4199         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4200         __U argument.
4201         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4202         __mmask16.
4203         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4204         of __mmask16.
4205         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4206         __U argument.
4207         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4208         __U argument.
4209         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4210         __U argument.
4211         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4212         __U argument.
4213         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4214         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4215         return type as well as __M argument type and all casts from __mmask8
4216         to __mmask32.
4217         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4218         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4219         return type as well as __M argument type and all casts from __mmask8
4220         to __mmask16.
4221         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4222         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4223         return type as well as __M argument type and all casts from __mmask8
4224         to __mmask32.
4225         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4226         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4227         return type as well as __M argument type and all casts from __mmask8
4228         to __mmask16.
4229         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4230         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4231         __mmask16.
4233 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4235         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4236         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4237         for __U argument.
4239 2018-07-11  Paul Koning  <ni1d@arrl.net>
4241         * doc/md.texi (define_subst): Document how multiple occurrences of
4242         the same argument in the replacement pattern are handled.
4244 2018-07-11  Paul Koning  <ni1d@arrl.net>
4246         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4247         alphabetical order.
4248         (Common Type Attributes): Add "mode" attribute.
4250 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4252         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4253         stream DECL_ORIGINAL_TYPE.
4254         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4255         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4256         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4257         Do not walk original type.
4258         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4259         external decls.
4260         (write_ts_decl_non_common_tree_pointers): Do not stream
4261         DECL_ORIGINAL_TYPE
4262         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4263         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4265 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4267         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4268         thread twice from the same starting edge.
4270 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4272         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4273         * gimple.c (gimple_call_nonnull_result_p): ...here...
4274         (gimple_call_nonnull_arg): ...and here.
4275         * gimple.h (gimple_call_nonnull_result_p): New.
4276         (gimple_call_nonnull_arg): New.
4278 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4280         * config/arm/arm-cpus.in: Move information from fpu field of each
4281         cpu definition to the isa field.
4282         * config/arm/parsecpu.awk (fpu): Delete match rule.
4283         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4285 2018-07-11  Richard Biener  <rguenther@suse.de>
4287         PR debug/86457
4288         * dwarf2out.c (init_sections_and_labels): Use
4289         output_asm_line_debug_info consistently.
4290         (dwarf2out_early_finish): Likewise.
4291         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4292         type units.
4294 2018-07-11  Richard Biener  <rguenther@suse.de>
4296         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4297         Rework father_bb setting in a way to avoid propagating constants
4298         multiple times on a loop body.
4300 2018-07-10  Mark Wielaard  <mark@klomp.org>
4302         PR debug/86459
4303         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4305 2018-07-10  Richard Biener  <rguenther@suse.de>
4307         * hash-map.h (hash_map::iterator::operator*): Return
4308         references to key and value.
4310 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4312         PR c++/86443
4313         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4314         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4315         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4316         (gimplify_omp_for): For composite loops, move outer
4317         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4318         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4319         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4320         TREE_LIST for both the original class iterator and the "last" helper
4321         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4322         loop, remember has_decl_expr from outer composite loops for the
4323         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4325 2018-07-09  Martin Sebor  <msebor@redhat.com>
4327         PR middle-end/77357
4328         PR middle-end/86428
4329         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4330         accessing implicitly initialized array elements.
4331         * expr.c (string_constant): Handle string initializers of
4332         character arrays within aggregates.
4333         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4334         Store element offset.  As a special case, handle zero size.
4335         (fold_nonarray_ctor_reference): Same.
4336         (fold_ctor_reference): Add argument.  Store subobject offset.
4337         * gimple-fold.h (fold_ctor_reference): Add argument.
4339 2018-07-09  Paul Koning  <ni1d@arrl.net>
4341         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4342         (pdp11_insn_cost): New function.
4343         (pdp11_md_asm_adjust): New function.
4344         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4345         (pdp11_rtx_costs): Update to match machine better.
4346         (output_addr_const_pdp11): Correct format mismatch warnings.
4347         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4348         * config/pdp11/pdp11.md: General change to add base_cost and/or
4349         length attributes for use by new pdp11_insn_cost function.
4350         (MIN_BRANCH): Correct definition.
4351         (MIN_SOB): Ditto.
4352         (doloop_end): Use standard pattern name for looping pattern.
4353         (doloop_end_nocc): New.
4354         (movsf): Add another constraint alternative.
4355         (zero_extendqihi2): Add constraint alternatives for not in place
4356         extend.
4357         (zero_extendhisi2): Remove.
4358         (shift patterns): Add CC handling variants.
4359         (bswaphi2): New.
4360         (bswapsi2): New.
4361         (rothi3): New.
4362         (define_peephole2): New peephole to recognize mov that sets CC for
4363         subsequent test.
4365 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4367         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4368         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4369         wi::add.
4371 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4373         PR c/86420
4374         * real.c (real_nextafter): Return true if result is denormal.
4376 2018-07-09  Martin Liska  <mliska@suse.cz>
4378         * common.opt: Add back wrongly removed attribute.
4380 2018-07-09  Richard Biener  <rguenther@suse.de>
4382         PR debug/86413
4383         * dwarf2out.c (gen_block_die): For an early generated DIE
4384         always output high/low PC attributes.
4386 2018-07-09  Tom de Vries  <tdevries@suse.de>
4388         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4389         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4390         onto VAR_DECL with abstract origin.
4392 2018-07-07  Jim Wilson  <jimw@sifive.com>
4394         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4396 2018-07-07  Tom de Vries  <tdevries@suse.de>
4398         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4400 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4402         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4403         overflow_type.
4404         (combine_bound): Use wide-int overflow calculation instead of
4405         rolling our own.
4406         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4407         overflow_type.
4408         * fold-const.c (int_const_binop_2): Same.
4409         (extract_muldiv_1): Same.
4410         (fold_div_compare): Same.
4411         (fold_abs_const): Same.
4412         * match.pd: Same.
4413         * poly-int.h (add): Same.
4414         (sub): Same.
4415         (neg): Same.
4416         (mul): Same.
4417         * predict.c (predict_iv_comparison): Same.
4418         * profile-count.c (slow_safe_scale_64bit): Same.
4419         * simplify-rtx.c (simplify_const_binary_operation): Same.
4420         * tree-chrec.c (tree_fold_binomial): Same.
4421         * tree-data-ref.c (split_constant_offset_1): Same.
4422         * tree-if-conv.c (idx_within_array_bound): Same.
4423         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4424         * tree-ssa-phiopt.c (minmax_replacement): Same.
4425         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4426         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4427         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4428         * wide-int.cc (wi::add_large): Same.
4429         (wi::mul_internal): Same.
4430         (wi::sub_large): Same.
4431         (wi::divmod_internal): Same.
4432         * wide-int.h: Change overflow type to overflow_type for neg, add,
4433         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4434         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4435         mul_internal, divmod_internal.
4436         (overflow_type): New enum.
4437         (accumulate_overflow): New.
4439 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4441         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4442         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4444 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4446         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4447         argument is checked for zero before entering loop, avoid checking again.
4449 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4451         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4452         * gimplify.h (generic_expr_could_trap_p): Likwise.
4453         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4455 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4457         PR tree-optimization/86401
4458         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4459         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4460         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4461         * fold-const.h (fold_bit_and_mask): Declare.
4462         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4464 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4466         PR target/86324
4467         * target.def (translate_mode_attribute): New hook.
4468         * targhooks.h (default_translate_mode_attribute): Declare.
4469         * targhooks.c (default_translate_mode_attribute): New function.
4470         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4471         * doc/tm.texi: Regenerate.
4472         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4473         (rs6000_translate_mode_attribute): New function.
4475 2018-07-06  Paul Koning  <ni1d@arrl.net>
4477         * doc/md.texi (define_split): Document DONE and FAIL.
4478         (define_peephole2): Ditto.
4480 2018-07-05  Jeff Law  <law@redhat.com>
4482         PR tree-optimization/86010
4483         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4484         both the head and tail of mem* and str* calls.
4486 2018-07-05  Jim Wilson  <jimw@sifive.com>
4488         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4490 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4492         * config/aarch64/aarch64-simd.md: correct flags text for
4493         MIN_EXPR replacement.
4495 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4497         * configure: Regenerated.
4499 2018-07-05  Carl Love  <cel@us.ibm.com>
4501         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4502         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4503         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4504         VSX_BUILTIN_DOUBLEL_V4SF.
4506 2018-07-05  Martin Sebor  <msebor@redhat.com>
4508         PR c++/86400
4509         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4510         than its domain to compute its the upper bound of a char array.
4512 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4514         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4515         * doc/cpp.texi: Update comment.
4516         * doc/tm.texi: Rebuilt.
4517         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4518         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4519         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4520         headers affected by extern "C".
4521         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4522         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4523         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4524         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4525         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4526         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4527         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4528         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4529         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4530         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4531         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4532         config/sparc/sp64-elf.h, config/spu/spu.h,
4533         config/stormy16/stormy16.h, config/v850/v850.h,
4534         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4535         define NO_IMPLICIT_EXTERN_C.
4536         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4538 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4540         PR target/84711
4541         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4542         instead of GET_MODE_SIZE when comparing Units.
4544 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4546         PR target/84711
4547         * rtlanal.c (set_noop_p): Constrain on mode change,
4548         include hard-reg-set.h
4550 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4552         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4554 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4556         Revert
4557         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4559         PR sanitizer/84250
4560         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4561         libasan.
4562         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4564 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4566         PR sanitizer/84250
4567         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4568         libasan.
4569         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4571 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4573         PR middle-end/86380
4574         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4576 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4578         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4579         neg_*_op* variables.
4581 2018-07-04  Martin Liska  <mliska@suse.cz>
4583         * tree-switch-conversion.c: Define
4584         max_ratio_for_speed and max_ratio_for_size constants.
4586 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4587             Martin Liska  <mliska@suse.cz>
4589         PR middle-end/66240
4590         PR target/45996
4591         PR c/84100
4592         * common.opt: Rename align options with 'str_' prefix.
4593         * common/config/i386/i386-common.c (set_malign_value): New
4594         function.
4595         (ix86_handle_option): Use it to set -falign-* options/
4596         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4597         type from int to string.
4598         * config/aarch64/aarch64.c: Update default values from int
4599         to string.
4600         * config/alpha/alpha.c (alpha_override_options_after_change):
4601         Likewise.
4602         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4603         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4604         max skip conditionally.
4605         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4606         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4607         max skip conditionally.
4608         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4609         max skip conditionally.
4610         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4611         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4612         max skip conditionally.
4613         * config/i386/i386.c (struct ptt): Change type from int to
4614         string.
4615         (ix86_default_align): Set default values.
4616         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4617         max skip conditionally.
4618         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4619         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4620         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4621         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4622         max skip conditionally.
4623         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4624         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4625         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4626         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4627         max skip conditionally.
4628         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4629         * config/ia64/ia64.c (ia64_option_override): Set default values
4630         for alignment options.
4631         * config/m68k/m68k.c: Handle new str_align_* options.
4632         * config/mips/mips.c (mips_set_compression_mode): Change
4633         type of constants.
4634         (mips_option_override): Set default values for options.
4635         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4636         Likewise.
4637         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4638         Likewise.
4639         * config/rx/rx.c (rx_option_override): Likewise.
4640         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4641         (LABEL_ALIGN): Use align_labels_log.
4642         (LOOP_ALIGN): Use align_loops_align.
4643         * config/s390/s390.c (s390_asm_output_function_label): Use new
4644         macros.
4645         * config/sh/sh.c (sh_override_options_after_change):
4646         Change type of constants.
4647         * config/spu/spu.c (spu_sched_init): Likewise.
4648         * config/sparc/sparc.c (sparc_option_override): Set default
4649         values for options.
4650         * config/visium/visium.c (visium_option_override): Likewise.
4651         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4652         emit p2align format with last argument if it's not needed.
4653         * doc/invoke.texi: Document extended format of -falign-*.
4654         * final.c: Use align_labels alignment.
4655         * flags.h (struct target_flag_state): Change type to use
4656         align_flags.
4657         (struct align_flags_tuple): New.
4658         (struct align_flags): Likewise.
4659         (align_loops_log): Redefine macro to use new types.
4660         (align_loops_max_skip): Redefine macro to use new types.
4661         (align_jumps_log): Redefine macro to use new types.
4662         (align_jumps_max_skip): Redefine macro to use new types.
4663         (align_labels_log): Redefine macro to use new types.
4664         (align_labels_max_skip): Redefine macro to use new types.
4665         (align_functions_log): Redefine macro to use new types.
4666         (align_loops): Redefine macro to use new types.
4667         (align_jumps): Redefine macro to use new types.
4668         (align_labels): Redefine macro to use new types.
4669         (align_functions): Redefine macro to use new types.
4670         (align_functions_max_skip): Redefine macro to use new types.
4671         (align_loops_value): New macro.
4672         (align_jumps_value): New macro.
4673         (align_labels_value): New macro.
4674         (align_functions_value): New macro.
4675         * function.c (invoke_set_current_function_hook): Propagate
4676         alignment values from flags to global variables default in
4677         topleev.h.
4678         * ipa-icf.c (sem_function::equals_wpa): Use
4679         cl_optimization_option_eq instead of memcmp.
4680         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4681         of string types.
4682         (cl_optimization_stream_in): Likewise.
4683         * optc-save-gen.awk: Support strings in cl_optimization.
4684         * opth-gen.awk: Likewise.
4685         * opts.c (finish_options): Remove error checking of invalid
4686         value ranges.
4687         (MAX_CODE_ALIGN): Remove.
4688         (MAX_CODE_ALIGN_VALUE): Likewise.
4689         (parse_and_check_align_values): New function.
4690         (check_alignment_argument): Likewise.
4691         (common_handle_option): Use check_alignment_argument.
4692         * opts.h (parse_and_check_align_values): Declare.
4693         * toplev.c (init_alignments): Remove.
4694         (read_log_maxskip): New.
4695         (parse_N_M): Likewise.
4696         (parse_alignment_opts): Likewise.
4697         (backend_init_target): Remove usage of init_alignments.
4698         * toplev.h (parse_alignment_opts): Declare.
4699         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4700         argument.
4701         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4702         * tree.c (cl_option_hasher::equal): New.
4703         * varasm.c: Use new global macros.
4705 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4707         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4708         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4709         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4710         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4711         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4712         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4713         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4714         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4715         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4716         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4717         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4718         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4719         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4721 2018-07-04  Martin Liska  <mliska@suse.cz>
4722             Jonathan Wakely  <jwakely@redhat.com>
4724         * coverage.c: Use correct type.
4725         * doc/invoke.texi: Language correction.
4727 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4729         PR target/85620
4730         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4731         ENDBRANCH for non-tail call which may return via indirect branch.
4732         * doc/extend.texi: Document indirect_return attribute.
4734 2018-07-03  Martin Sebor  <msebor@redhat.com>
4736         PR tree-optimization/86274
4737         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4738         precondition.
4739         (format_floating): Correct handling of infinities and NaNs.
4741 2018-07-03  Martin Sebor  <msebor@redhat.com>
4743         * print-tree.c (print_real_cst): New function.
4744         (print_node_brief): Call it.
4745         (print_node): Ditto.
4747 2018-07-03  Jeff Law  <law@redhat.com>
4749         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4750         into a single pattern.
4752         * config/h8300/h8300.md (ors code_iterator): New.
4753         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4754         a single pattern and single splitter.
4755         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4756         (iorqi3_1, xorqi3_1): Likewise.
4757         (iorqi3, xorqi3 expanders): Similarly.
4759         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4760         (movmd_internal) into a single pattern using the P mode iterator.
4761         (movmd splitters): Similarly.
4762         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4763         (movsd splitters): Similarly.
4765         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4766         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4767         right table based on the size of the operand.
4768         * config/h8300/h8300.md (length_table): Corresponding changes. All
4769         references to "addb", "addw" and "addl" changed to "add".
4770         (btst patterns): Merge two variants into a single pattern.
4771         (tstqi, tsthi): Likewise.
4772         (addhi3_incdec, addsi3_incdec): Likewise.
4773         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4774         (mulhi3, mulsi3): Likewise.
4775         (udivhi3, udivsi3): Likewise.
4776         (divhi3, divsi3): Likewise.
4777         (andorqi3, andorhi3, andorsi3): Likewise.
4779 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4781         PR target/85694
4782         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4783         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4785 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4787         PR tree-optimization/85694
4788         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4789         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4790         UNSPEC_URHADD.
4791         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4792         (<u>avg<mode>3_ceil): New patterns.
4794 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4796         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4797         scan-tree-dump directive.
4798         * gcc.dg/vect/slp-perm-2.c: Likewise.
4799         * gcc.dg/vect/slp-perm-3.c: Likewise.
4800         * gcc.dg/vect/slp-perm-5.c: Likewise.
4801         * gcc.dg/vect/slp-perm-6.c: Likewise.
4802         * gcc.dg/vect/slp-perm-7.c: Likewise.
4803         * gcc.dg/vect/slp-perm-8.c: Likewise.
4805 2018-07-03  Marek Polacek  <polacek@redhat.com>
4807         PR middle-end/86202
4808         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4810 2018-07-03  Richard Biener  <rguenther@suse.de>
4812         PR ipa/86389
4813         * tree-ssa-structalias.c (find_func_clobbers): Properly
4814         handle indirect calls.
4816 2018-07-03  Jeff Law  <law@redhat.com>
4818         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4819         (shifts): New code iterator.
4820         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4821         expander.  Fix HImode handling on H8/SX.
4822         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4823         (subqi3, subhi3, subsi3 expanders): Likewise.
4824         (andqi3, andhi3, andsi3 expanders): Likewise.
4825         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4826         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4827         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4828         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4829         (zero_extendqihi2, zero_extendqisi2): Likewise.
4830         (extendqihi2, extendqisi2): Likewise.
4831         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4832         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4833         (rotlqi3_1, rotlhi3_1): Likewise.
4834         (logicalhi3_sn, logicalsi3_sn): Likewise.
4835         (logicalhi3, logicalsi3): Likewise.
4837 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4839         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4840         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4841         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4842         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4843         type to append_pattern_def_seq instead of creating a stmt_vec_info
4844         directly.
4845         (build_mask_conversion): Likewise.  Remove vinfo argument.
4846         (vect_add_conversion_to_patterm): Likewise, renaming to...
4847         (vect_add_conversion_to_pattern): ...this.
4848         (vect_recog_mask_conversion_pattern): Update call to
4849         build_mask_conversion.  Pass the vector type to
4850         append_pattern_def_seq here too.
4851         (vect_recog_gather_scatter_pattern): Update call to
4852         vect_add_conversion_to_pattern.
4854 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4856         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4857         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4858         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4859         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4860         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4861         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4862         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4863         append_pattern_def_seq instead of new_pattern_def_seq.
4864         (vect_recog_divmod_pattern): Do both of the above.
4865         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4866         is null.
4868 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4870         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4871         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4872         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4873         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4874         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4875         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4876         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4877         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4878         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4879         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4880         parameter with a single stmt_vec_info.
4881         (vect_recog_func_ptr): Likewise.
4882         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4883         (vect_try_gather_scatter_pattern): ...this.
4884         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4885         the stmt_vec_info of the statement to be matched.  Don't clear
4886         STMT_VINFO_RELATED_STMT.
4887         (vect_pattern_recog): Update call accordingly.
4889 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4891         PR tree-optimization/85694
4892         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4893         (uavgM3_ceil): Document new optabs.
4894         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4895         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4896         functions.
4897         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4898         (savg_ceil_optab): New optabs.
4899         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4900         (vect_vect_recog_func_ptrs): Add it.
4901         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4902         constant directly from the associated lhs.
4904 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4906         * tree-vect-patterns.c (vect_split_statement): New function.
4907         (vect_convert_input): Use it to try to split an existing cast.
4909 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4911         * poly-int.h (print_hex): New function.
4912         * dumpfile.h (dump_dec, dump_hex): Declare.
4913         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4914         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4915         min_input_precision, operation_precision and operation_sign.
4916         * tree-vect-patterns.c (vect_get_range_info): New function.
4917         (vect_same_loop_or_bb_p, vect_single_imm_use)
4918         (vect_operation_fits_smaller_type): Delete.
4919         (vect_look_through_possible_promotion): Add an optional
4920         single_use_p parameter.
4921         (vect_recog_over_widening_pattern): Rewrite to use new
4922         stmt_vec_info infomration.  Handle one operation at a time.
4923         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4924         (vect_truncatable_operation_p, vect_set_operation_type)
4925         (vect_set_min_input_precision): New functions.
4926         (vect_determine_min_output_precision_1): Likewise.
4927         (vect_determine_min_output_precision): Likewise.
4928         (vect_determine_precisions_from_range): Likewise.
4929         (vect_determine_precisions_from_users): Likewise.
4930         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4931         (vect_vect_recog_func_ptrs): Put over_widening first.
4932         Add cast_forwprop.
4933         (vect_pattern_recog): Call vect_determine_precisions.
4935 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4937         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4938         statements that have been replaced by further pattern statements.
4939         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4941 2018-07-03  Richard Biener  <rguenther@suse.de>
4943         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4944         always set *dt.  Dump vectype in vectype overload.
4945         * dumpfile.h (dump_gimple_expr): New function.
4946         (dump_gimple_expr_loc): Likewise.
4947         * dumpfile.c (dump_gimple_expr): New function.
4948         (dump_gimple_expr_loc): Likewise.
4950 2018-07-02  Jeff Law  <law@redhat.com>
4952         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4953         the H8/300, H8/300H and H8/S variants into a single pattern.
4954         (movhi_h8300, movqi_h8300hs): Similarly.
4955         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4956         (QHI mode iterator): New.
4958         * config/h8300/h8300.md: Remove trailing whitespace.
4960 2018-07-02  Jim Wilson  <jimw@sifive.com>
4962         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4963         instead of emit_insn for interrupt returns.
4964         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4965         (riscv_sret, riscv_uret): Likewise.
4967 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4969         * pretty-print.c (selftest::test_pp_format): Move save and restore
4970         of quotes to class auto_fix_quotes, and add an instance.
4971         * selftest.c: Include "intl.h".
4972         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4973         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4974         * selftest.h (selftest::auto_fix_quotes): New class.
4976 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4978         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4979         (aarch64_sve_prepare_conditional_op): Remove.
4980         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4981         Allow aarch64_simd_reg_or_zero as select operand; remove
4982         the aarch64_sve_prepare_conditional_op call.
4983         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4984         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4985         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4986         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4987         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4988         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4989         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4990         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4991         and a splitters to match all of the *_any patterns.
4992         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4994         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4995         (SVE_COND_FP_BINARY_REV): Remove.
4996         (sve_int_op_rev, sve_fp_op_rev): New.
4997         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4998         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4999         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
5000         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
5001         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
5002         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
5003         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
5004         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
5005         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
5007         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
5008         Remove match_dup 1 from the inner unspec.
5009         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
5011         * config/aarch64/aarch64.md (movprfx): New attr.
5012         (length): Default movprfx to 8.
5013         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
5014         (*madd<SVE_I>, *msub<SVE_I): Likewise.
5015         (*<su>mul<SVE_I>3_highpart): Likewise.
5016         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
5017         (*v<ASHIFT><SVE_I>3): Likewise.
5018         (*<su><MAXMIN><SVE_I>3): Likewise.
5019         (*<su><MAXMIN><SVE_F>3): Likewise.
5020         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
5021         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
5022         (*div<SVE_F>4): Likewise.
5024 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
5026         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
5027         in dump string.
5029 2018-07-02  Richard Biener  <rguenther@suse.de>
5031         PR tree-optimization/86363
5032         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
5033         memset argument refers to a non-variable address.
5035 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5037         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
5038         {PLUS,MINUS}_EXPR code to...
5039         (adjust_symbolic_bound): ...here,
5040         (combine_bound): ...here,
5041         (set_value_range_with_overflow): ...and here.
5043 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
5045         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
5046         code...
5047         (extract_range_from_abs_expr): ...here.
5049 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
5051         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
5052         -fno-omit-frame-pointer when not optimizing.
5054 2018-07-02  Martin Liska  <mliska@suse.cz>
5056         PR ipa/86279
5057         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
5058         (propagate_nothrow): Likewise.
5060 2018-07-02  Martin Liska  <mliska@suse.cz>
5062         PR ipa/86323
5063         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
5065 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
5067         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
5068         function in r262149, changing "loc" param from source_location to
5069         const dump_location_t &.
5070         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
5071         declaration, as above.
5073 2018-07-01  Paul Koning  <ni1d@arrl.net>
5075         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5076         -munit-asm, -mgnu-asm, -mdec-asm.
5077         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
5078         (pdp11_output_labelref): New.
5079         (pdp11_output_def): New.
5080         (pdp11_output_addr_vec_elt): New.
5081         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
5082         %# and %@ format codes.
5083         (pdp11_option_override): New.
5084         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
5085         (pdp11_output_ident): New.
5086         (pdp11_asm_named_section): New.
5087         (pdp11_asm_init_sections): New.
5088         (pdp11_file_start): New.
5089         (pdp11_file_end): New.
5090         (output_ascii): Use .ascii/.asciz for -mdec-asm.
5091         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
5092         %o, like %c but octal.
5093         (pdp11_option_override): New.
5094         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
5095         -mdec-asm.
5096         (DATA_SECTION_ASM_OP): Ditto.
5097         (READONLY_DATA_SECTION_ASM_OP): New.
5098         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
5099         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
5100         (ASM_OUTPUT_LABELREF): Ditto.
5101         (ASM_OUTPUT_DEF): Ditto.
5102         (ASM_OUTPUT_EXTERNAL): New.
5103         (ASM_OUTPUT_SOURCE_FILENAME): New.
5104         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
5105         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
5106         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
5107         %# and %@ format codes.
5108         * config/pdp11/pdp11.opt (mgnu-asm): New.
5109         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
5110         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
5111         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
5113 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
5115         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
5116         dereferencing path[] beyond its length.
5117         (debug_path): New.
5118         (debug_all_paths): New.
5119         (rewire_first_differing_edge): New.
5120         (adjust_paths_after_duplication): New.
5121         (duplicate_thread_path): Call adjust_paths_after_duplication.
5122         Add new argument.
5123         (thread_through_all_blocks): Add new argument to
5124         duplicate_thread_path.
5126 2018-06-30  Jim Wilson  <jimw@sifive.com>
5128         * config/riscv/predicates.md (p2m1_shift_operand): New.
5129         (high_mask_shift_operand): New.
5130         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
5131         pattern using p2m1_shift_operand.
5132         (lshsi3_zero_extend_3+2): New combiner pattern using
5133         high_mask_shift_operand.
5135 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5137         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
5138         split out from...
5139         (vect_recog_rotate_pattern): ...here.
5140         (vect_convert_input): Try to insert casts of invariants in the
5141         preheader.
5142         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
5143         preheader to be empty.
5145 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5147         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5148         vector type.  If given, install it in the new statement's
5149         STMT_VINFO_VECTYPE.
5150         (vect_element_precision): New function.
5151         (vect_unpromoted_value): New struct.
5152         (vect_unpromoted_value::vect_unpromoted_value): New function.
5153         (vect_unpromoted_value::set_op): Likewise.
5154         (vect_look_through_possible_promotion): Likewise.
5155         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5156         (vect_widened_op_tree, vect_convert_input): Likewise.
5157         (vect_convert_inputs, vect_convert_output): Likewise.
5158         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5159         to handle the optional cast of the multiplication result and
5160         vect_widened_op_tree to detect the widened multiplication itself.
5161         Do not require the input and output of promotion casts to have
5162         the same sign, but base the signedness of the operation on the
5163         input rather than the result.  If the pattern includes two
5164         promotions, check that those promotions have the same sign.
5165         Do not restrict the MULT_EXPR handling to a double-width result;
5166         handle quadruple-width results and wider.  Use vect_convert_inputs
5167         to convert the inputs to the common type.
5168         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5169         to handle the optional cast of the ABS result.  Also allow a sign
5170         change or a sign extension between the ABS and MINUS.
5171         Use vect_widened_op_tree to detect the widened subtraction and use
5172         vect_convert_inputs to convert the inputs to the common type.
5173         (vect_handle_widen_op_by_const): Delete.
5174         (vect_recog_widen_op_pattern): New function.
5175         (vect_recog_widen_mult_pattern): Use it.
5176         (vect_recog_widen_shift_pattern): Likewise.
5177         (vect_recog_widen_sum_pattern): Use
5178         vect_look_through_possible_promotion to handle the promoted
5179         PLUS_EXPR operand.
5181 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5183         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5184         the containing gimple_seq *.
5185         * gimple-iterator.h (gsi_for_stmt): Declare it.
5186         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5187         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5188         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5189         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5190         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5191         checks.
5192         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5193         split out from...
5194         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5195         statement being replaced is part of an existing pattern
5196         definition sequence, inserting the new pattern statements before
5197         the original one.
5198         (vect_pattern_recog_1): Don't return a bool.  If the statement
5199         is already part of a pattern, instead apply pattern matching
5200         to the pattern definition statements.  Don't clear the
5201         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5202         (vect_pattern_recog): Don't break after the first match;
5203         continue processing the pattern definition statements instead.
5204         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5206 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5208         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5209         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5210         (vect_recog_widen_sum_pattern): Use it.
5212 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5214         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5215         phi is not a pattern statement and has not been replaced by
5216         a pattern statement.
5217         * tree-vect-patterns.c (type_conversion_p): Don't check
5218         STMT_VINFO_IN_PATTERN_P.
5219         (vect_recog_vector_vector_shift_pattern): Likewise.
5220         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5221         the pattern statement rather than the original statement; check
5222         directly for a WIDEN_MULT_EXPR here.
5223         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5224         vect_is_simple_use to return the pattern statement rather
5225         than the original statement; use is_pattern_stmt_p to check
5226         for such a pattern statement.
5227         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5228         to return the pattern statement rather than the original statement;
5229         don't do the same transformation here.
5230         (vect_is_simple_use): If the defining statement has been replaced
5231         by a pattern statement, return the pattern statement instead.
5232         Remove the corresponding (local) transformation from the vectype
5233         overload.
5235 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5237         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5238         end and default to null.
5239         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5240         (vectorizable_reduction): Update calls accordingly, dropping the
5241         gimple ** argument if the passed-back statement isn't needed.
5242         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5243         (vect_recog_rotate_pattern): Likewise.
5244         (vect_recog_mask_conversion_pattern): Likewise.
5245         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5246         (vect_mask_constant_operand_p): Likewise.
5247         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5248         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5249         (get_group_load_store_type, get_load_store_type): Likewise.
5250         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5251         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5252         (vectorizable_conversion, vectorizable_assignment): Likewise.
5253         (vectorizable_shift, vectorizable_operation): Likewise.
5254         (vectorizable_store, vect_is_simple_cond): Likewise.
5255         (vectorizable_condition, vectorizable_comparison): Likewise.
5256         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5257         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5258         and move it to the end.  Cope with null def_stmt_outs.
5260 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5262         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5264 2018-06-29  Jeff Law  <law@redhat.com>
5266         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5267         displacements for TARGET_V850E2V3 and newer.
5268         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5269         * config/v850/v850.md (sign23byte_load): Remove.
5270         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5271         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5273 2018-06-29  Martin Liska  <mliska@suse.cz>
5275         PR lto/85759
5276         * coverage.c (coverage_init): Mangle full path name.
5277         * doc/invoke.texi: Document the change.
5278         * gcov-io.c (mangle_path): New.
5279         * gcov-io.h (mangle_path): Likewise.
5280         * gcov.c (mangle_name): Use mangle_path for path mangling.
5282 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5284         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5285         if starting source register is not even.
5287 2018-06-29  Martin Liska  <mliska@suse.cz>
5289         PR tree-optimization/86263
5290         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5291         Make edge redirection.
5293 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5295         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5296         (dump_scope_depth): New variable.
5297         (get_dump_scope_depth): New function.
5298         (dump_begin_scope): New function.
5299         (dump_end_scope): New function.
5300         * dumpfile.h (get_dump_scope_depth): New declaration.
5301         (dump_begin_scope): New declaration.
5302         (dump_end_scope): New declaration.
5303         (class auto_dump_scope): New class.
5304         (AUTO_DUMP_SCOPE): New macro.
5305         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5306         AUTO_DUMP_SCOPE.
5308 2018-06-29  Richard Biener  <rguenther@suse.de>
5310         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5311         compute_all_dependences succeeds.
5312         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5313         exceed --param loop-max-datarefs-for-datadeps.
5315 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5317         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5319 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5321         PR target/86348
5322         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5323         alternative 0 in preferred_for_speed attribute.
5325 2018-06-28  Paul Koning  <ni1d@arrl.net>
5327         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5328         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5329         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5330         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5331         for shift insn patterns.
5333 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5335         * cgraph.c (cgraph_node::get_body): Replace assignments to
5336         "dump_file" with calls to set_dump_file.
5337         * dumpfile.c (alt_dump_file): Make static, and group with...
5338         (alt_flags): ...this definition.
5339         (dumps_are_enabled): New variable.
5340         (refresh_dumps_are_enabled): New function.
5341         (set_dump_file): New function.
5342         (set_alt_dump_file): New function.
5343         (gcc::dump_manager::dump_start): Replace assignments to
5344         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5345         set_alt_dump_file.
5346         (gcc::dump_manager::dump_finish): Likewise.
5347         * dumpfile.h (alt_dump_file): Delete decl.
5348         (dumps_are_enabled): New variable decl.
5349         (set_dump_file): New function decl.
5350         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5351         global.
5352         * tree-nested.c (lower_nested_functions): Replace assignments to
5353         "dump_file" with calls to set_dump_file.
5355 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5357         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5358         goto_locus of each outgoing edge of each basic block.
5360 2018-06-28  Richard Biener  <rguenther@suse.de>
5362         * dwarf2out.c (decl_scope_table): Remove.
5363         (push_decl_scope): Likewise.
5364         (pop_decl_scope): Likewise.
5365         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5366         (gen_struct_or_union_type_die): Likewise.
5367         (gen_tagged_type_die): Likewise.
5368         (dwarf2out_init): Do not initialize decl_scope_table.
5369         (dwarf2out_c_finalize): Do not free it.
5371 2018-06-28  Richard Biener  <rguenther@suse.de>
5373         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5374         deciding whether to not re-use a DIE.
5376 2018-06-28  Richard Biener  <rguenther@suse.de>
5378         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5379         DW_AT_abstract_origin attribute.
5381 2018-06-28  Martin Liska  <mliska@suse.cz>
5383         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5384         Use newly introduced constants.
5385         * tree-switch-conversion.h (struct jump_table_cluster):
5386         Define max_ratio_for_size and max_ratio_for_speed.
5388 2018-06-28  Martin Liska  <mliska@suse.cz>
5390         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5391         Add new checking assert to catch invalid state.
5392         (jump_table_cluster::can_be_handled): Handle single case
5393         clusters.
5394         (jump_table_cluster::is_beneficial): Bail out for such case.
5395         (bit_test_cluster::find_bit_tests):
5396         Add new checking assert to catch invalid state.
5397         (bit_test_cluster::can_be_handled): Handle single case
5398         clusters.
5399         (bit_test_cluster::is_beneficial): Bail out for such case.
5400         (switch_decision_tree::analyze_switch_statement):
5401         Fix comment.
5403 2018-06-28  Martin Liska  <mliska@suse.cz>
5405         * common.opt: Introduce -completion option.
5406         * gcc.c (driver_handle_option): Handle it.
5407         (driver::main): Print completions if completion
5408         is set.
5409         * opt-suggestions.c (option_proposer::get_completions):
5410         New function.
5411         (option_proposer::suggest_completion): Likewise.
5412         (option_proposer::find_param_completions): Likewise.
5413         (verify_autocompletions): Likewise.
5414         (test_completion_valid_options): Likewise.
5415         (test_completion_valid_params): Likewise.
5416         (in_completion_p): Likewise.
5417         (empty_completion_p): Likewise.
5418         (test_completion_partial_match): Likewise.
5419         (test_completion_garbage): Likewise.
5420         (opt_proposer_c_tests): Likewise.
5421         * opt-suggestions.h: Declare new functions.
5422         * opts.c (common_handle_option): Handle OPT__completion_.
5423         * selftest-run-tests.c (selftest::run_tests): Add
5424         opt_proposer_c_tests.
5425         * selftest.c (assert_str_startswith): New.
5426         * selftest.h (assert_str_startswith): Likewise.
5427         (opt_proposer_c_tests): New.
5428         (ASSERT_STR_STARTSWITH): Likewise.
5430 2018-06-28  Martin Liska  <mliska@suse.cz>
5432         * Makefile.in: Add opt-suggestions.o.
5433         * gcc-main.c: Include opt-suggestions.h.
5434         * gcc.c (driver::driver): Likewise.
5435         (driver::~driver): Remove m_option_suggestions.
5436         (driver::build_option_suggestions): Moved to option_proposer.
5437         (driver::suggest_option): Likewise.
5438         (driver::handle_unrecognized_options): Use option_proposer.
5439         * gcc.h (class driver): Add new memver m_option_proposer.
5440         * opt-suggestions.c: New file.
5441         * opt-suggestions.h: New file.
5443 2018-06-28  Martin Liska  <mliska@suse.cz>
5445         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5446         (auto_string_vec::~auto_string_vec): Likewise.
5448 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5450         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5451         prevent_decl_creation_for_types fields up and add reset_location field.
5452         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5453         statement if id->reset_location is true.
5454         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5455         id->reset_location is true.
5456         (copy_phis_for_bb): Force input_location on the arguments if
5457         id->reset_location is true.
5458         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5459         is set on the function to be inlined.
5461 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5463         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5465 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5467         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5468         registers for Pmode.
5469         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5470         hard registers for the clobbered pseudo.
5472 2018-06-27  Paul Koning  <ni1d@arrl.net>
5474         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5475         mutually exclusive options.
5476         * config/pdp11/constraints.md (h): New constraint.
5477         (O): Update definition to match shift code generation.
5478         (D): New constraint.
5479         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5480         (CCFP): Remove.
5481         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5482         function.
5483         (output_jump): Change arguments.
5484         (pdp11_fixed_cc_regs): New function.
5485         (pdp11_cc_mode): Ditto.
5486         (pdp11_expand_shift): Ditto.
5487         (pdp11_assemble_shift): Ditto.
5488         (pdp11_small_shift): Ditto.
5489         (pdp11_branch_cost): Remove.
5490         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5491         from output.
5492         (pdp11_register_move_cost): Update for CC registers.
5493         (pdp11_rtx_costs): Add case for LSHIFTRT.
5494         (pdp11_output_jump): Add CCNZ mode conditional branches.
5495         (notice_update_cc_on_set): Remove.
5496         (pdp11_cc_mode): New function.
5497         (simple_memory_operand): Correct pre/post decrement case.
5498         (no_side_effect_operand): New function.
5499         (pdp11_regno_reg_class): Add CC_REGS class.
5500         (pdp11_fixed_cc_regs): New function.
5501         (pdp11_small_shift): New function.
5502         (pdp11_expand_shift): New function to expand shift insns.
5503         (pdp11_assemble_shift): New function to output shifts.
5504         (pdp11_branch_cost): Remove.
5505         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5506         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5507         (WCHAR_TYPE): Ditto.
5508         (PTRDIFF_TYPE): Ditto.
5509         (ADJUST_INSN_LENGTH): New macro.
5510         (FIXED_REGISTERS): Add CC registers.
5511         (CALL_USED_REGISTERS): Ditto.
5512         (reg_class): Ditto.
5513         (REG_CLASS_NAMES): Ditto.
5514         (REG_CLASS_CONTENTS): Ditto.
5515         (SELECT_CC_MODE): Use new function.
5516         (TARGET_FLAGS_REGNUM): New macro.
5517         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5518         (cc0_reg_rtx): Remove.
5519         (CC_STATUS_MDEP): Remove.
5520         (CC_STATUS_MDEFP_INIT): Remove.
5521         (CC_IN_FPU): Remove.
5522         (NOTICE_UPDATE_CC): Remove.
5523         (REGISTER_NAMES): Add CC registers.
5524         (BRANCH_COST): Change to constant 1.
5525         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5526         handling.
5527         * config/pdp11/pdp11.opt (mbcopy): Remove.
5528         (mbcopy-builtin): Remove.
5529         (mbranch-cheap): Remove.
5530         (mbranch-expensive): Remove.
5531         * config/pdp11/predicates.md (expand_shift_operand): Update to
5532         match shift code generation.
5533         (ccnz_operator): New predicate.
5534         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5535         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5536         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5537         exclusive options.
5538         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5539         description of O constraint.
5541 2018-06-27  Jeff Law  <law@redhat.com>
5542             Austin Law  <austinklaw@gmail.com>
5544         * config/v850/v850.md (addsi3_set_flags): New pattern.
5545         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5546         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5547         (zero_extendhisi2_v850_set_flags): Likewise.
5548         (zero_extendqisi2_v850_set_flags): Likewise.
5549         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5550         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5551         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5553         * config/v850/v850-protos.h (notice_update_cc): Remove.
5554         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5555         (v850_print_operand): Handle 'D' and "d".
5556         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5557         Add handling of arithmetic/logical operations compared against zero.
5558         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5559         Do not look at v850_compare_op, instead get mode from last argument.
5560         (v850_gen_compare): Remove
5561         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5562         after reload for prologue insns.
5563         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5564         patterns.
5565         (construct_save_jarl): Likewise.
5566         (TARGET_FLAGS_REGNUM): Define.
5567         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5568         (NOTICE_UPDATE_CC): Remove.
5569         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5570         than cc0.  Conditionalize on reload_completed.
5571         (cmpsi_insn, setfcc_insn): Likewise.
5572         (tst1 splitter): Turn into define_and_split which sets the flags
5573         after reload.
5574         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5575         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5576         (cstoresf4, cstoredf4): Clobber the flags.
5577         (cmpsi, cmpsf, cmpdf): Remove expanders.
5578         (setf_insn): Remove pattern.
5579         (addsi3): Turn into define_and_split which clobbers the flags after
5580         reload and a suitable pattern (addsi3_clobber_flags) for use after
5581         reload.
5582         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5583         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5584         (ashrsi3, ashrsi3_v850e2): Likewise.
5585         (bins): Clobber the flags.
5586         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5587         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5588         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5589         (call_value_internal_short, call_value_internal_long): Likewise.
5590         (callt_save_interrupt, callt_return_interrupt): Likewise.
5591         (save_interrupt, return_interrupt): Likewise.
5592         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5593         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5594         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5595         (All FP comparisons): Only allow after reload has completed.
5596         (trfsr): Likewise.
5597         (divh, divhu): Tweak output template.
5598         (branch_z_normal, branch_z_invert): Remove
5599         (branch_nz_normal, branch_nz_invert): Likewise.
5600         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5602         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5603         * config/v850/v850.c (notice_update_cc): Remove.
5604         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5605         (CC_NO_CARRY): Likewise.
5606         (NOTICE_UPDATE_CC): Define to nothing.
5607         * config/v850/v850.md: Remove block comment on cc0 handling
5608         Remove "cc" attribute from all patterns.  Remove cc_status handling
5609         from all patterns.  Minor formatting fixes.
5611 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5613         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5614         (cortex-a76.cortex-a55): Likewise.
5615         * config/aarch64/aarch64-tune.md: Regenerate.
5616         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5617         cortex-a76.cortex-a55.
5619 2018-06-27  Jeff Law  <law@redhat.com>
5621         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5622         (MULTILIB_DIRNAMES): Similarly.
5624 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5626         * gimple.h (gimple_return_retbnd): Delete.
5627         (gimple_return_set_retbnd): Likewise.
5628         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5629         gimple_return_set_retbnd.
5630         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5631         gimple_return_retbnd and adjust.
5632         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5633         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5634         Explicitly return NULL in a couple more cases.  Move assertion
5635         on debug statements and remove unreachable code.
5636         (reset_debug_binding): Do not test id->retbnd.
5637         (expand_call_inline): Do not set it.
5639 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5641         * configure.ac: Add --disable-gcov option.
5642         * configure: Regenerate.
5643         * Makefile.in: Honour @enable_gcov@.
5644         * doc/install.texi: Document --disable-gcov.
5646 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5648         * config/arm/arm-cpus.in (cortex-a76): New entry.
5649         (cortex-a76.cortex-a55): Likewise.
5650         * config/arm/arm-tables.opt: Regenerate.
5651         * config/arm/arm-tune.md: Likewise.
5652         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5653         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5654         cortex-a76.cortex-a55.
5656 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5658         PR target/85769
5659         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5661 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5663         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5664         comment.
5665         (EPILOGUE_USES): Likewise.
5667 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5669         * tree-inline.c (remap_location): New function extracted from...
5670         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5671         (copy_phis_for_bb): ...here.  Call remap_location.
5672         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5674 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5676         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5677         unaligned vsx for 16B memset.
5679 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5681         PR target/86285
5682         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5683         ieee128_float_type_node to long_double_type_node unless
5684         TARGET_LONG_DOUBLE_128 is set.
5686 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5688         * cfgloop.c (get_loop_location): Convert return type from
5689         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5690         by implicit construction from rtx_insn *, and using
5691         dump_user_location_t::from_function_decl for the fallback case.
5692         * cfgloop.h (get_loop_location): Convert return type from
5693         location_t to dump_user_location_t.
5694         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5695         dump_printf_loc to pass in a dump_location_t rather than a
5696         location_t, via the gimple stmt.
5697         * coverage.c (get_coverage_counts): Update calls to
5698         dump_printf_loc to pass in dump_location_t rather than a
5699         location_t.
5700         * doc/optinfo.texi (Dump types): Convert example of
5701         dump_printf_loc from taking "locus" to taking "insn".  Update
5702         description of the "_loc" calls to cover dump_location_t.
5703         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5704         "selftest.h".
5705         (dump_user_location_t::dump_user_location_t): New constructors,
5706         from gimple *stmt and rtx_insn *.
5707         (dump_user_location_t::from_function_decl): New function.
5708         (dump_loc): Make static.
5709         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5710         const dump_location_t &.
5711         (dump_generic_expr_loc): Delete.
5712         (dump_printf_loc): Convert param "loc" from location_t to
5713         const dump_location_t &.
5714         (selftest::test_impl_location): New function.
5715         (selftest::dumpfile_c_tests): New function.
5716         * dumpfile.h: Include "profile-count.h".
5717         (class dump_user_location_t): New class.
5718         (struct dump_impl_location_t): New struct.
5719         (class dump_location_t): New class.
5720         (dump_printf_loc): Convert 2nd param from source_location to
5721         const dump_location_t &.
5722         (dump_generic_expr_loc): Delete.
5723         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5724         const dump_location_t &.
5725         * gimple-fold.c (fold_gimple_assign): Update call to
5726         dump_printf_loc to pass in a dump_location_t rather than a
5727         location_t, via the gimple stmt.
5728         (gimple_fold_call): Likewise.
5729         * gimple-loop-interchange.cc
5730         (loop_cand::analyze_iloop_reduction_var): Update for change to
5731         check_reduction_path.
5732         (tree_loop_interchange::interchange): Update for change to
5733         find_loop_location.
5734         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5735         change in return-type of find_loop_location.
5736         (graphite_regenerate_ast_isl): Likewise.
5737         * graphite-optimize-isl.c (optimize_isl): Likewise.
5738         * graphite.c (graphite_transform_loops): Likewise.
5739         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5740         pass in a dump_location_t rather than a location_t, via the
5741         gimple stmt.
5742         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5743         * ipa.c (walk_polymorphic_call_targets): Likewise.
5744         * loop-unroll.c (report_unroll): Convert "locus" param from
5745         location_t to dump_location_t.
5746         (decide_unrolling): Update for change to get_loop_location's
5747         return type.
5748         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5749         location_t to dump_user_location_t.
5750         (grid_find_single_omp_among_assignments_1): Updates calls to
5751         dump_printf_loc to pass in a dump_location_t rather than a
5752         location_t, via the gimple stmt.
5753         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5754         location_t to dump_location_t.  Updates calls to dump_printf_loc
5755         to pass in a dump_location_t rather than a location_t, via the
5756         gimple stmt.
5757         (grid_inner_loop_gridifiable_p): Likewise.
5758         (grid_dist_follows_simple_pattern): Likewise.
5759         (grid_gfor_follows_tiling_pattern): Likewise.
5760         (grid_target_follows_gridifiable_pattern): Likewise.
5761         (grid_attempt_target_gridification): Convert initialization
5762         of local "grid" from memset to zero-initialization; FIXME: does
5763         this require C++11?  Update call to dump_printf_loc to pass in a
5764         optinfo_location rather than a location_t, via the gimple stmt.
5765         * profile.c (read_profile_edge_counts): Updates call to
5766         dump_printf_loc to pass in a dump_location_t rather than a
5767         location_t
5768         (compute_branch_probabilities): Likewise.
5769         * selftest-run-tests.c (selftest::run_tests): Call
5770         dumpfile_c_tests.
5771         * selftest.h (dumpfile_c_tests): New decl.
5772         * tree-loop-distribution.c (pass_loop_distribution::execute):
5773         Update for change in return type of find_loop_location.
5774         * tree-parloops.c (parallelize_loops): Likewise.
5775         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5776         "locus" from location_t to dump_user_location_t.
5777         (canonicalize_loop_induction_variables): Likewise.
5778         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5779         for change in return type of find_loop_location.
5780         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5781         to dump_printf_loc to pass in a dump_location_t rather than a
5782         location_t, via the stmt.
5783         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5784         Likewise.
5785         * tree-vect-loop-manip.c (find_loop_location): Convert return
5786         type from source_location to dump_user_location_t.
5787         (vect_do_peeling): Update for above change.
5788         (vect_loop_versioning): Update for change in type of
5789         vect_location.
5790         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5791         from location_t to dump_user_location_t.
5792         (vect_estimate_min_profitable_iters): Update for change in type
5793         of vect_location.
5794         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5795         location_t to dump_location_t.
5796         (vect_slp_bb): Update for change in type of vect_location.
5797         * tree-vectorizer.c (vect_location): Convert from source_location
5798         to dump_user_location_t.
5799         (try_vectorize_loop_1): Update for change in vect_location's type.
5800         (vectorize_loops): Likewise.
5801         (increase_alignment): Likewise.
5802         * tree-vectorizer.h (vect_location): Convert from source_location
5803         to dump_user_location_t.
5804         (find_loop_location): Convert return type from source_location to
5805         dump_user_location_t.
5806         (check_reduction_path): Convert 1st param from location_t to
5807         dump_user_location_t.
5808         * value-prof.c (check_counter): Update call to dump_printf_loc to
5809         pass in a dump_user_location_t rather than a location_t; update
5810         call to error_at for change in type of "locus".
5811         (check_ic_target): Update call to dump_printf_loc to
5812         pass in a dump_user_location_t rather than a location_t, via the
5813         call_stmt.
5815 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5817         * config/s390/s390.h (enum processor_flags): Do not use
5818         default tune parameter when -march was specified.
5820 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5822         PR target/86314
5823         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5824         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5825         operands.
5827 2018-06-26  Richard Biener  <rguenther@suse.de>
5829         PR tree-optimization/86287
5830         PR bootstrap/86316
5831         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5832         (vect_analyze_loop): Initialize n_stmts.
5834 2018-06-26  Richard Biener  <rguenther@suse.de>
5836         PR middle-end/86271
5837         * fold-const.c (fold_convertible_p): Pointer extension
5838         isn't valid.
5840 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5842         PR debug/86064
5843         * dwarf2out.c (loc_list_has_views): Adjust comments.
5844         (dw_loc_list): Split single cross-partition range with
5845         nonzero locview.
5847 2018-06-25  Jeff Law  <law@redhat.com>
5849         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5850         on -mbig-switch by default.
5852         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5853         test.
5854         (const_float_0_operand): Remove unused predicate.
5855         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5856         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5857         (recipsf2): New expander.  Original pattern now called
5858         (recipsf2_insn).
5859         (recipdf2, recipdf2_insn): Similarly.
5860         (rsqrtsf2, rsqrtsf2_insn): Similarly
5861         (rsqrtdf2, rsqrtdf2_insn): Similarly
5863 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5865         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5866         Simplify logic for FreeBSD (twice).
5868 2018-06-25  Martin Sebor  <msebor@redhat.com>
5870         PR tree-optimization/86204
5871         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5872         a strnlen result if it's less than the length of the string.
5874 2018-06-25  Martin Sebor  <msebor@redhat.com>
5876         PR tree-optimization/85700
5877         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5878         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5879         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5881 2018-06-25  Martin Sebor  <msebor@redhat.com>
5883         * doc/extend.texi (Zero-length arrays): Update and clarify.
5885 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5887         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5888         added IEEE/IBM long double multilib support on PowerPC little
5889         endian Linux systems.
5890         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5891         (MULTILIB_DEFAULTS): Likewise.
5892         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5893         Likewise.
5894         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5895         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5896         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5898 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5900         PR middle-end/86311
5901         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5902         (REORDER_45): Likewise.
5904 2018-06-25  Jeff Law  <law@redhat.com>
5906         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5907         dividend to 32 bits.  Adjust length.
5908         (udivmodhi4): Cleanup output template.  Fix length.
5910 2018-06-25  Carl Love  <cel@us.ibm.com>
5912         * config/rs6000/vsx.md: Change word selector to prefered location.
5914 2018-06-25  Richard Biener  <rguenther@suse.de>
5916         PR tree-optimization/86304
5917         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5918         epilogue-if-converted loops as well.
5920 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5922         * lto-section-out.c (lto_begin_section): Do not print section
5923         name for noaddr and unnumbered dumps.
5925 2018-06-25  Richard Biener  <rguenther@suse.de>
5927         * tree-vectorizer.h (struct vec_info_shared): New structure
5928         with parts split out from struct vec_info and loop_nest from
5929         struct _loop_vec_info.
5930         (struct vec_info): Adjust accordingly.
5931         (struct _loop_vec_info): Likewise.
5932         (LOOP_VINFO_LOOP_NEST): Adjust.
5933         (LOOP_VINFO_DATAREFS): Likewise.
5934         (LOOP_VINFO_DDRS): Likewise.
5935         (struct _bb_vec_info): Likewise.
5936         (BB_VINFO_DATAREFS): Likewise.
5937         (BB_VINFO_DDRS): Likewise.
5938         (struct _stmt_vec_info): Add dr_aux member.
5939         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5940         (DR_MISALIGNMENT_UNINITIALIZED): New.
5941         (set_dr_misalignment): Adjust.
5942         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5943         (vect_analyze_loop): Adjust prototype.
5944         (vect_analyze_loop_form): Likewise.
5945         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5946         Compute dependences lazily.
5947         (vect_record_base_alignments): Use shared datarefs/ddrs.
5948         (vect_verify_datarefs_alignment): Likewise.
5949         (vect_analyze_data_refs_alignment): Likewise.
5950         (vect_analyze_data_ref_accesses): Likewise.
5951         (vect_analyze_data_refs): Likewise.
5952         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5953         constructor parameter for shared part.
5954         (vect_analyze_loop_form): Pass in shared part and adjust.
5955         (vect_analyze_loop_2): Pass in storage for the number of
5956         stmts.  Move loop nest finding to the caller.  Compute
5957         datarefs lazily.
5958         (vect_analyze_loop): Pass in shared part.
5959         (vect_transform_loop): Verify shared datarefs are unchanged.
5960         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5961         constructor parameter for shared part.
5962         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5963         (vect_slp_bb): Verify shared datarefs are unchanged before
5964         transform.
5965         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5966         change.
5967         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5968         DR_MISALIGNMENT_UNINITIALIZED.
5969         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5970         parameter for shared part.
5971         (vec_info::~vec_info): Adjust.
5972         (vec_info_shared::vec_info_shared): New.
5973         (vec_info_shared::~vec_info_shared): Likewise.
5974         (vec_info_shared::save_datarefs): Likewise.
5975         (vec_info_shared::check_datarefs): Likewise.
5976         (try_vectorize_loop_1): Construct shared part live for analyses
5977         of a single loop for multiple vector sizes.
5978         * tree-parloops.c (gather_scalar_reductions): Adjust.
5980 2018-06-25  Richard Biener  <rguenther@suse.de>
5982         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5983         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5984         (vect_analyze_data_refs): Remove similar code from here and
5985         simplify accordingly.
5987 2018-06-25  Richard Biener  <rguenther@suse.de>
5989         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5990         for reverse storage order accesses rather than asserting
5991         they cannot happen here.
5993 2018-06-25  Tom de Vries  <tdevries@suse.de>
5995         PR debug/86257
5996         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5997         Use data16 instead of .byte for insn prefix.
5999 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
6001         PR C++/86082
6002         * parser.c (make_char_string_pack): Pass this literal chars
6003         through cpp_interpret_string.
6004         (cp_parser_userdef_numeric_literal): Check the result of
6005         make_char_string_pack.
6007 2018-06-24  Maya Rashish  <coypu@sdf.org>
6009         * ginclude/stddef.h: Simplify conditions around avoiding
6010         re-definition of __size_t.
6012 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6014         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
6015         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
6017 2018-06-22  Maya Rashish  <coypu@sdf.org>
6019         * doc/invoke.texi (mno-fancy-math-387): Update for changes
6020         made to OpenBSD and NetBSD through the years.
6022 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6024         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6025         behavior of vec_pack (vector double, vector double) to match
6026         behavior of vec_float2 (vector double, vector double).
6028 2018-06-22  Olivier Hainque  <hainque@adacore.com>
6030         * gimplify.c (gimplify_function_tree): Prevent creation
6031         of a trampoline for the address of the current function
6032         passed to entry/exit instrumentation hooks.
6034 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
6036         PR target/86222
6037         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
6038         correctly.
6040 2018-06-22  Martin Liska  <mliska@suse.cz>
6042         PR tree-optimization/86263
6043         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6044         Bail out if is_enabled is false.
6045         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
6046         New declaration.
6047         (jump_table_cluster::is_enabled): New function.
6049 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6051         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6052         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
6053         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
6054         (lto_input_ts_binfo_tree_pointers): Likewise.
6055         * tree-streamer-out.c (streamer_write_tree_bitfields,
6056         write_ts_binfo_tree_pointers): Likewise.
6057         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
6059 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
6061         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
6063 2018-06-22  Martin Liska  <mliska@suse.cz>
6065         * symbol-summary.h (get): Make it pure and inline move
6066         functionality from ::get function.
6067         (get): Remove and inline into ::get and ::get_create.
6068         (get_create): Move code from ::get function.
6070 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6072         PR target/85994
6073         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
6074         -x assembler-with-cpp.
6076 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6078         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
6079         _FILE_OFFSET_BITS=64 for C++.
6081 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
6083         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
6084         conversion insn that shows up when pr85657-3.c is compiled using
6085         IEEE 128-bit long double.
6086         (neg<mode>2_internal): Use the correct mode to check whether the
6087         mode is IBM extended.
6088         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
6089         multiply and divide external functions from being created more
6090         than once.
6092 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6094         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
6095         functions.
6096         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
6097         the edge can be forwarded.
6098         (cfg_layout_merge_blocks): Likewise.
6100 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6102         * except.c (finish_eh_generation): Commit edge insertions only after
6103         the EH edges have been redirected from post-landing to landing pads.
6105 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6107         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
6108         create_tmp_var_for to create the FRAME decl.
6109         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
6111 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
6113         * tree-inline.c (copy_edges_for_bb): Minor tweak.
6114         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
6115         debug statement when resetting its value.
6116         (expand_call_inline): Copy the locus of the call onto the assignment
6117         of the return value, if any.  Use local variable in more cases.
6119 2018-06-21  Martin Liska  <mliska@suse.cz>
6121         * ipa-pure-const.c (propagate_nothrow): Use
6122         funct_state_summaries->get.
6123         (dump_malloc_lattice): Likewise.
6124         (propagate_malloc): Likewise.
6126 2018-06-21  Richard Biener  <rguenther@suse.de>
6128         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
6129         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
6130         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
6131         comment.
6132         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
6133         BLOCK_ABSTRACT_ORIGIN unconditionally.
6135 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
6137         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
6138         deleting it.
6139         * ipa-reference.c (ipa_reference_c_finalize): Delete
6140         ipa_ref_opt_sum_summaries and set it to NULL.
6142 2018-06-21  Tom de Vries  <tdevries@suse.de>
6144         PR tree-optimization/85859
6145         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
6146         test with comment from bb_no_side_effects_p.
6148 2018-06-21  Richard Biener  <rguenther@suse.de>
6150         PR tree-optimization/86232
6151         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6152         max for constant niter.
6154 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6156         * config/aarch64/aarch64-simd.md
6157         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6159 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6161         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6162         Make opernads of the unspec commutative.
6164 2018-06-21  Richard Biener  <rguenther@suse.de>
6166         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6167         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6168         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6169         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6170         NULL DR_STEP.
6171         (vect_record_base_alignments): Do not record base alignment
6172         for gathers or scatters.
6173         (vect_compute_data_ref_alignment): Drop return value that is always
6174         true.  Bail out early for gathers or scatters.
6175         (vect_enhance_data_refs_alignment): Bail out early for gathers
6176         or scatters.
6177         (vect_find_same_alignment_drs): Likewise.
6178         (vect_analyze_data_refs_alignment): Remove dead code.
6179         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6180         (vect_analyze_data_refs): For possible gathers or scatters do
6181         not create an alternate DR, just check their possible validity
6182         and mark them.  Adjust DECL_NONALIASED handling to not rely
6183         on DR_BASE_ADDRESS.
6184         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6185         update inits of gathers or scatters.
6186         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6187         Also copy gather/scatter flag to pattern vinfo.
6189 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6191         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6192         behavior of vec_packsu (vector unsigned long long, vector unsigned
6193         long long) to match behavior of vec_packs with same signature.
6195 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6196             Thomas Schwinge <thomas@codesourcery.com>
6197             Cesar Philippidis  <cesar@codesourcery.com>
6199         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6200         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6201         (gimplify_adjust_omp_clauses): Likewise.
6202         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6203         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6204         (gimplify_omp_target_update): Update handling of acc update and
6205         enter/exit data.
6206         * omp-low.c (install_var_field): Remove unused parameter
6207         base_pointers_restrict.
6208         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6209         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6210         FINALIZE}
6211         (omp_target_base_pointers_restrict_p): Delete.
6212         (scan_omp_target): Update call to scan_sharing_clauses.
6213         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6214         FINALIZE}.
6215         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6216         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6217         (convert_local_omp_clauses): Likewise.
6218         * tree-pretty-print.c (dump_omp_clause): Likewise.
6219         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6220         FINALIZE}.
6221         (omp_clause_code_name): Likewise.
6223 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6225         PR debug/86194
6226         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6227         be narrowed.
6229         PR tree-optimization/86231
6230         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6231         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6233 2018-06-20  Tom de Vries  <tdevries@suse.de>
6235         PR tree-optimization/86097
6236         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6237         iv type if signedness of iv type is not the same as that of *nit.
6239 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6241         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6242         EDGE_EH edges, verify they are all EDGE_EH.
6244 2018-06-20  Maya Rashish  <coypu@sdf.org>
6246         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6248 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6250         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6251         * config/aarch64/aarch64.c (xgene1_tunings): Add
6252         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6253         (aarch64_mode_valid_for_sched_fusion_p):
6254         Allow 16-byte modes.
6255         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6256         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6257         128-bit modes.
6258         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6259         New pattern.
6260         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6261         * config/aarch64/iterators.md (VQ2): New mode iterator.
6263 2018-06-20  Martin Liska  <mliska@suse.cz>
6265         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6266         Change default ratio from 10 to 8.
6268 2018-06-20  Martin Liska  <mliska@suse.cz>
6270         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6271         New.
6272         (bit_test_cluster::find_bit_tests): Likewise.
6273         (switch_decision_tree::analyze_switch_statement): Find clusters.
6274         * tree-switch-conversion.h (struct jump_table_cluster): Document
6275         hierarchy.
6277 2018-06-20  Martin Liska  <mliska@suse.cz>
6279         * tree-switch-conversion.c (switch_conversion::collect):
6280         Record m_uniq property.
6281         (switch_conversion::expand): Bail out for special conditions.
6282         (group_cluster::~group_cluster): New.
6283         (group_cluster::group_cluster): Likewise.
6284         (group_cluster::dump): Likewise.
6285         (jump_table_cluster::emit): New.
6286         (switch_decision_tree::fix_phi_operands_for_edges): New.
6287         (struct case_node): Remove struct.
6288         (jump_table_cluster::can_be_handled): New.
6289         (case_values_threshold): Moved to header.
6290         (reset_out_edges_aux): Likewise.
6291         (jump_table_cluster::is_beneficial): New.
6292         (bit_test_cluster::can_be_handled): Likewise.
6293         (add_case_node): Remove.
6294         (bit_test_cluster::is_beneficial): New.
6295         (case_bit_test::cmp): New.
6296         (bit_test_cluster::emit): New.
6297         (expand_switch_as_decision_tree_p): Remove.
6298         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6299         (fix_phi_operands_for_edge): Likewise.
6300         (switch_decision_tree::analyze_switch_statement): New.
6301         (compute_cases_per_edge): Move ...
6302         (switch_decision_tree::compute_cases_per_edge): ... here.
6303         (try_switch_expansion): Likewise.
6304         (switch_decision_tree::try_switch_expansion): Likewise.
6305         (record_phi_operand_mapping): Likewise.
6306         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6307         (emit_case_decision_tree): Likewise.
6308         (switch_decision_tree::emit): Likewise.
6309         (balance_case_nodes): Likewise.
6310         (switch_decision_tree::balance_case_nodes): Likewise.
6311         (dump_case_nodes): Likewise.
6312         (switch_decision_tree::dump_case_nodes): Likewise.
6313         (emit_jump): Likewise.
6314         (switch_decision_tree::emit_jump): Likewise.
6315         (emit_cmp_and_jump_insns): Likewise.
6316         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6317         (emit_case_nodes): Likewise.
6318         (switch_decision_tree::emit_case_nodes): Likewise.
6319         (conditional_probability): Remove.
6320         * tree-switch-conversion.h (enum cluster_type): New.
6321         (PRINT_CASE): New.
6322         (struct cluster): Likewise.
6323         (cluster::cluster): Likewise.
6324         (struct simple_cluster): Likewise.
6325         (simple_cluster::simple_cluster): Likewise.
6326         (struct group_cluster): Likewise.
6327         (struct jump_table_cluster): Likewise.
6328         (struct bit_test_cluster): Likewise.
6329         (struct min_cluster_item): Likewise.
6330         (struct case_tree_node): Likewise.
6331         (case_tree_node::case_tree_node): Likewise.
6332         (jump_table_cluster::case_values_threshold): Likewise.
6333         (struct case_bit_test): Likewise.
6334         (struct switch_decision_tree): Likewise.
6335         (struct switch_conversion): Likewise.
6336         (switch_decision_tree::reset_out_edges_aux): Likewise.
6338 2018-06-20  Martin Liska  <mliska@suse.cz>
6340         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6341         (hoist_edge_and_branch_if_true): Likewise.
6342         (expand_switch_using_bit_tests_p): Likewise.
6343         (struct case_bit_test): Likewise.
6344         (case_bit_test_cmp): Likewise.
6345         (emit_case_bit_tests): Likewise.
6346         (switch_conversion::switch_conversion): New class.
6347         (struct switch_conv_info): Remove old struct.
6348         (collect_switch_conv_info): More to ...
6349         (switch_conversion::collect): ... this.
6350         (check_range): Likewise.
6351         (switch_conversion::check_range): Likewise.
6352         (check_all_empty_except_final): Likewise.
6353         (switch_conversion::check_all_empty_except_final): Likewise.
6354         (check_final_bb): Likewise.
6355         (switch_conversion::check_final_bb): Likewise.
6356         (create_temp_arrays): Likewise.
6357         (switch_conversion::create_temp_arrays): Likewise.
6358         (free_temp_arrays): Likewise.
6359         (gather_default_values): Likewise.
6360         (switch_conversion::gather_default_values): Likewise.
6361         (build_constructors): Likewise.
6362         (switch_conversion::build_constructors): Likewise.
6363         (constructor_contains_same_values_p): Likewise.
6364         (switch_conversion::contains_same_values_p): Likewise.
6365         (array_value_type): Likewise.
6366         (switch_conversion::array_value_type): Likewise.
6367         (build_one_array): Likewise.
6368         (switch_conversion::build_one_array): Likewise.
6369         (build_arrays): Likewise.
6370         (switch_conversion::build_arrays): Likewise.
6371         (gen_def_assigns): Likewise.
6372         (switch_conversion::gen_def_assigns): Likewise.
6373         (prune_bbs): Likewise.
6374         (switch_conversion::prune_bbs): Likewise.
6375         (fix_phi_nodes): Likewise.
6376         (switch_conversion::fix_phi_nodes): Likewise.
6377         (gen_inbound_check): Likewise.
6378         (switch_conversion::gen_inbound_check): Likewise.
6379         (process_switch): Use the newly created class.
6380         (switch_conversion::expand): New.
6381         (switch_conversion::~switch_conversion): New.
6382         * tree-switch-conversion.h: New file.
6384 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6386         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6387         tree-vect-patterns.c.
6388         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6389         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6390         (vect_recog_sad_pattern): Likewise.
6391         (vect_recog_widen_sum_pattern): Likewise.
6392         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6393         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6394         (vect_recog_rotate_pattern): Likewise.
6395         (vect_recog_mult_pattern): Likewise.
6396         (vect_recog_vector_vector_shift_pattern): Likewise.
6397         (vect_recog_divmod_pattern): Likewise.
6398         (vect_recog_mixed_size_cond_pattern): Likewise.
6399         (vect_recog_bool_pattern): Likewise.
6400         (vect_recog_mask_conversion_pattern): Likewise.
6401         (vect_try_gather_scatter_pattern): Likewise.
6402         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6403         (vect_recog_over_widening_pattern): Likewise.
6404         (vect_recog_gather_scatter_pattern): Likewise.
6405         (vect_recog_func_ptr): Move from tree-vectorizer.h
6406         (vect_vect_recog_func_ptrs): Move further down the file.
6407         (vect_recog_func): Likewise.  Remove the third argument.
6408         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6409         (vect_pattern_recog_1): Expect the pattern function to do any
6410         necessary target tests.  Also expect it to provide a vector type.
6411         Remove the type_in handling.
6413 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6415         * tree-vect-patterns.c (vect_pattern_detected): New function.
6416         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6417         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6418         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6419         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6420         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6421         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6422         (vect_recog_mask_conversion_pattern)
6423         (vect_try_gather_scatter_pattern): Likewise.
6425 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6427         * tree-vect-patterns.c (vect_get_internal_def): New function.
6428         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6429         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6430         (search_type_for_mask_1): Use it.
6432 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6434         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6435         redundant WIDEN_SUM_EXPR handling.
6436         (vect_recog_sad_pattern): Likewise.
6438 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6440         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6441         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6442         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6443         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6444         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6446 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6448         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6449         use the stmt_vec_info of the original bb statement for the
6450         new zero assignment, even if the call is part of a pattern.
6452 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6454         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6455         that the sequence is attached to the original statement rather
6456         than the pattern statement.
6457         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6458         PATTERN_DEF_SEQ from the original statement rather than
6459         the main pattern statement.
6460         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6461         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6462         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6464 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6466         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6467         definition statements before the early exit for statements that aren't
6468         live or relevant.
6469         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6470         split out from...
6471         (vect_transform_loop): ...here.  Process pattern definition
6472         statements without first checking whether the main pattern
6473         statement is live or relevant.
6475 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6477         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6478         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6480 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6482         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6483         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6484         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6485         (expand_block_compare): Change select_block_compare_mode call.
6486         (expand_strncmp_align_check): Use new functions, fix comment.
6487         (emit_final_str_compare_gpr): New function.
6488         (expand_strn_compare): Refactor and clean up code.
6489         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6491 2018-06-19  Tony Reix  <tony.reix@atos.com>
6492             Damien Bergamini  <damien.bergamini@atos.com>
6493             David Edelsohn  <dje.gcc@gmail.com>
6495         * collect2.c (static_obj): New variable.
6496         (static_libs): New variable.
6497         (is_in_list): Uncomment declaration.
6498         (main): Track AIX libraries linked statically.
6499         (is_in_list): Uncomment definition.
6500         (scan_prog_file): Don't add AIX shared libraries initializer
6501         to constructor list if linking statically.
6503 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6505         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6506         constant.
6507         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6509 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6511         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6512         blocks.
6514 2018-06-19  Martin Liska  <mliska@suse.cz>
6516         * config/i386/i386.c (ix86_can_inline_p): Do not use
6517         ipa_fn_summaries::get_create.
6518         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6519         get.
6520         (devirtualization_time_bonus): Likewise.
6521         (ipcp_propagate_stage): Likewise.
6522         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6523         (edge_set_predicate): Likewise.
6524         (evaluate_conditions_for_known_args): Likewise.
6525         (evaluate_properties_for_edge): Likewise.
6526         (ipa_call_summary::reset): Tranform to ...
6527         (ipa_call_summary::~ipa_call_summary): ... this.
6528         (ipa_fn_summary::reset): Transform to ...
6529         (ipa_fn_summary::~ipa_fn_summary): ... this.
6530         (ipa_fn_summary_t::remove): Rename to ...
6531         (ipa_fn_summary_t::remove_callees): ... this.
6532         (ipa_fn_summary_t::duplicate): Use placement new
6533         instead of memory copy.
6534         (ipa_call_summary_t::duplicate): Likewise.
6535         (ipa_call_summary_t::remove): Remove.
6536         (dump_ipa_call_summary): Change get_create to get.
6537         (ipa_dump_fn_summary): Dump only when summary exists.
6538         (analyze_function_body): Use symbol_summary::get instead
6539         of get_create.
6540         (compute_fn_summary): Likewise.
6541         (estimate_edge_devirt_benefit): Likewise.
6542         (estimate_edge_size_and_time): Likewise.
6543         (inline_update_callee_summaries): Likewise.
6544         (remap_edge_change_prob): Likewise.
6545         (remap_edge_summaries): Likewise.
6546         (ipa_merge_fn_summary_after_inlining): Likewise.
6547         (write_ipa_call_summary): Likewise.
6548         (ipa_fn_summary_write): Likewise.
6549         (ipa_free_fn_summary): Likewise.
6550         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6551         (struct ipa_call_summary): Likewise.
6552         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6553         of get_create.
6554         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6555         (estimate_size_after_inlining): Likewise.
6556         (estimate_growth): Likewise.
6557         (growth_likely_positive): Likewise.
6558         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6559         (inline_call): Likewise.
6560         * ipa-inline.c (caller_growth_limits): Likewise.
6561         (can_inline_edge_p): Likewise.
6562         (can_inline_edge_by_limits_p): Likewise.
6563         (compute_uninlined_call_time): Likewise.
6564         (compute_inlined_call_time): Likewise.
6565         (want_inline_small_function_p): Likewise.
6566         (edge_badness): Likewise.
6567         (update_caller_keys): Likewise.
6568         (update_callee_keys): Likewise.
6569         (inline_small_functions): Likewise.
6570         (inline_to_all_callers_1): Likewise.
6571         (dump_overall_stats): Likewise.
6572         (early_inline_small_functions): Likewise.
6573         (early_inliner): Likewise.
6574         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6575         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6576         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6577         * ipa-split.c (execute_split_functions): Likewise.
6578         * symbol-summary.h: Likewise.
6579         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6581 2018-06-19  Richard Biener  <rguenther@suse.de>
6583         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6584         (vectorize_loops): ... here.  Fix dbgcnt handling.
6585         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6587 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6589         PR target/86197
6590         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6591         ieee128 argument takes up only one (vector) register, not two (floating
6592         point) registers.
6594 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6596         * gimplify.c (gimplify_init_constructor): Really never clear for an
6597         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6599 2018-06-19  Richard Biener  <rguenther@suse.de>
6601         PR tree-optimization/86179
6602         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6603         after failed recognition.
6605 2018-06-18  Martin Sebor  <msebor@redhat.com>
6607         PR middle-end/85602
6608         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6609         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6610         Handle integer subtraction.
6611         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6612         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6614 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6616         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6617         param from rtx to rtx_insn *.
6618         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6619         param.
6620         (frv_ifcvt_modify_insn): Likwise.
6621         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6622         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6623         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6624         as_a <rtx_insn *> cast to local "unprotected_region" once
6625         it's been established that it's not NULL or pc_rtx.
6626         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6627         param "sethi" from rtx to rtx_insn *.
6628         (nds32_group_float_insns): Likewise for param "insn".
6629         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6630         param.
6631         (vax_output_int_subtract): Likewise.
6632         * config/vax/vax.c (vax_output_int_add): Likewise for param
6633         "insn".
6634         (vax_output_int_subtract): Likewise.
6635         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6636         (emit_pattern_after): Likewise for param "after".
6637         (emit_insn_after): Likewise.
6638         (emit_jump_insn_after): Likewise.
6639         (emit_call_insn_after): Likewise.
6640         (emit_debug_insn_after): Likewise.
6641         (emit_pattern_before): Likewise for param "before".
6642         (emit_insn_before): Likewise.
6643         (emit_jump_insn_before): Likewise.
6644         * final.c (get_insn_template): Likewise for param "insn", removing
6645         a cast.
6646         * output.h (get_insn_template): Likewise for 2nd param.
6647         * rtl.h (emit_insn_before): Likewise.
6648         (emit_jump_insn_before): Likewise.
6649         (emit_debug_insn_before_noloc): Likewise.
6650         (emit_insn_after): Likewise.
6651         (emit_jump_insn_after): Likewise.
6652         (emit_call_insn_after): Likewise.
6653         (emit_debug_insn_after): Likewise.
6654         (set_insn_deleted): Likewise for param.
6656 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6658         PR target/85358
6659         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6660         floating point modes, so that IFmode is numerically greater than
6661         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6662         to declare the ordering.  This prevents IFmode from being
6663         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6664         machine.  Include rs6000-modes.h to share the fractional values
6665         between genmodes* and the rest of the compiler.
6666         (IFmode): Likewise.
6667         (KFmode): Likewise.
6668         (TFmode): Likewise.
6669         * config/rs6000/rs6000-modes.h: New file.
6670         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6671         meaning of rs6000_long_double_size so that 126..128 selects an
6672         appropriate 128-bit floating point type.
6673         (rs6000_option_override_internal): Likewise.
6674         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6675         (TARGET_LONG_DOUBLE_128): Change the meaning of
6676         rs6000_long_double_size so that 126..128 selects an appropriate
6677         128-bit floating point type.
6678         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6679         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6680         source and destination to match the standard usage.
6681         (truncifkf2): Likewise.
6682         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6683         ISA 2.07 to use an explicit clobber, instead of passing in a
6684         temporary.
6685         (copysign<mode>3_soft): Likewise.
6687 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6689         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6690         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6691         (vect_slp_analyze_instance_dependence): Likewise.
6692         (vect_enhance_data_refs_alignment): Likewise.
6693         (vect_analyze_data_refs_alignment): Likewise.
6694         (vect_slp_analyze_and_verify_instance_alignment
6695         (vect_analyze_data_ref_accesses): Likewise.
6696         (vect_prune_runtime_alias_test_list): Likewise.
6697         (vect_analyze_data_refs): Likewise.
6698         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6699         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6700         (vect_analyze_scalar_cycles_1): Likewise.
6701         (vect_get_loop_niters): Likewise.
6702         (vect_analyze_loop_form_1): Likewise.
6703         (vect_update_vf_for_slp): Likewise.
6704         (vect_analyze_loop_operations): Likewise.
6705         (vect_analyze_loop): Likewise.
6706         (vectorizable_induction): Likewise.
6707         (vect_transform_loop): Likewise.
6708         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6709         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6710         (vect_make_slp_decision): Likewise.
6711         (vect_detect_hybrid_slp): Likewise.
6712         (vect_slp_analyze_operations): Likewise.
6713         (vect_slp_bb): Likewise.
6714         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6715         (vectorizable_bswap): Likewise.
6716         (vectorizable_call): Likewise.
6717         (vectorizable_simd_clone_call): Likewise.
6718         (vectorizable_conversion): Likewise.
6719         (vectorizable_assignment): Likewise.
6720         (vectorizable_shift): Likewise.
6721         (vectorizable_operation): Likewise.
6722         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6724 2018-06-18  Martin Sebor  <msebor@redhat.com>
6726         PR tree-optimization/81384
6727         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6728         * builtins.c (expand_builtin_strnlen): New function.
6729         (expand_builtin): Call it.
6730         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6731         * builtins.def (BUILT_IN_STRNLEN): New.
6732         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6733         Warn for bounds in excess of maximum object size.
6734         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6735         single-value ranges.  Handle strnlen.
6736         (handle_builtin_strlen): Handle strnlen.
6737         (strlen_check_and_optimize_stmt): Same.
6738         * doc/extend.texi (Other Builtins): Document strnlen.
6740 2018-06-18  Maya Rashish  <coypu@sdf.org>
6742         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6743         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6744         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6746         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6747         here to ...
6748         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6750 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6752         * tree.c (escaped_string::escape): Replace cast to char * by
6753         const_cast<char *> (unescaped).
6755 2018-06-18  Nick Clifton  <nickc@redhat.com>
6757         PR 84195
6758         * tree.c (escaped_string): New class.  Converts an unescaped
6759         string into its escaped equivalent.
6760         (warn_deprecated_use): Use the new class to convert the
6761         deprecation message, if present.
6762         (test_escaped_strings): New self test.
6763         (test_c_tests): Add test_escaped_strings.
6764         * doc/extend.texi (deprecated): Add a note that the
6765         deprecation message is affected by the -fmessage-length
6766         option, and that control characters will be escaped.
6767         (#pragma GCC error): Document this pragma.
6768         (#pragma GCC warning): Likewise.
6769         * doc/invoke.texi (-fmessage-length): Document this option's
6770         effect on the #warning and #error preprocessor directives and
6771         the deprecated attribute.
6773 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6775         * tree.c (decl_value_expr_lookup): Revert latest change.
6776         (decl_value_expr_insert): Likewise.
6778 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6780         * gimplify.c (nonlocal_vlas): Delete.
6781         (nonlocal_vla_vars): Likewise.
6782         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6783         referenced VLAs.
6784         (gimplify_body): Do not create and destroy nonlocal_vlas.
6785         * tree-nested.c: Include diagnostic.h.
6786         (use_pointer_in_frame): Tweak.
6787         (lookup_field_for_decl): Add assertion and declare the transformation.
6788         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6789         internal error when the reference is in a wrong context.  Do not
6790         create a debug decl by default.
6791         (note_nonlocal_block_vlas): Delete.
6792         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6793         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6794         create a debug decl by default.
6795         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6796         call is in a wrong context.
6797         (fixup_vla_decls): New function.
6798         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6799         debug variables were created.
6800         * tree.c (decl_value_expr_lookup): Add checking assertion.
6801         (decl_value_expr_insert): Likewise.
6803 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6805         PR middle-end/82479
6806         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6807         * tree-scalar-evolution.c (interpret_expr): Likewise.
6808         (expression_expensive_p): Likewise.
6809         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6810         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6811         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6812         (ssa_defined_by_minus_one_stmt_p): New.
6814 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6816         PR middle-end/64946
6817         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6818         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6819         * dojump.c (do_jump): Likewise.
6820         * expr.c (expand_expr_real_2): Check operand type's sign.
6821         * fold-const.c (const_unop): Handle ABSU_EXPR.
6822         (fold_abs_const): Likewise.
6823         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6824         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6825         (strip_sign_op_1): Likesise.
6826         * match.pd: Add new pattern to generate ABSU_EXPR.
6827         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6828         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6829         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6830         * tree-inline.c (estimate_operator_cost): Likewise.
6831         * tree-pretty-print.c (dump_generic_node): Likewise.
6832         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6833         * tree.def (ABSU_EXPR): New.
6835 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6837         PR middle-end/86095
6838         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6839         documented as preserved for backward compatibility only.
6840         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6842         PR rtl-optimization/86108
6843         * bb-reorder.c (create_forwarder_block): Renamed to ...
6844         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6845         jump from new landing pad to the second part.
6846         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6847         Adjust callers.
6849 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6851         PR middle-end/85878
6852         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6853         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6854         Only call store_expr for halves if the mode is the same.
6856         PR middle-end/86123
6857         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6858         Fix up comment formatting.
6860 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6862         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6863         (typed_splay_tree::closure,
6864         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6865         (typed_splay_tree::typed_splay_tree,
6866         typed_splay_tree::operator =): Declared private.
6867         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6868         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6869         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6870         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6871         typed_splay_tree::splay_tree_splay,
6872         typed_splay_tree::splay_tree_foreach_helper,
6873         typed_splay_tree::splay_tree_insert,
6874         typed_splay_tree::splay_tree_remove,
6875         typed_splay_tree::splay_tree_lookup,
6876         typed_splay_tree::splay_tree_predecessor,
6877         typed_splay_tree::splay_tree_successor,
6878         typed_splay_tree::splay_tree_min,
6879         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6880         (typed_splay_tree::root, typed_splay_tree::comp,
6881         typed_splay_tree::delete_key,
6882         typed_splay_tree::delete_value): New data members.
6883         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6884         typed_splay_tree::remove.
6886 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6888         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6889         -mginv and -mno-ginv to the assembler.
6890         * config/mips/mips.opt (-mcrc): New option.
6891         (-mginv): Likewise.
6892         * doc/invoke.text (-mcrc): Document.
6893         (-mginv): Likewise.
6895 2018-06-15  Nick Clifton  <nickc@redhat.com>
6897         PR 84195
6898         * tree.c (escaped_string): New class.  Converts an unescaped
6899         string into its escaped equivalent.
6900         (warn_deprecated_use): Use the new class to convert the
6901         deprecation message, if present.
6902         (test_escaped_strings): New self test.
6903         (test_c_tests): Add test_escaped_strings.
6904         * doc/extend.texi (deprecated): Add a note that the
6905         deprecation message is affected by the -fmessage-length
6906         option, and that control characters will be escaped.
6907         (#pragma GCC error): Document this pragma.
6908         (#pragma GCC warning): Likewise.
6909         * doc/invoke.texi (-fmessage-length): Document this option's
6910         effect on the #warning and #error preprocessor directives and
6911         the deprecated attribute.
6913 2018-06-15  Richard Biener  <rguenther@suse.de>
6915         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6916         here, also noting vector size used.
6917         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6918         size used in MSG_OPTIMIZED_LOCATIONS dump.
6919         (pass_slp_vectorize::execute): Adjust.
6921 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6923         PR target/85968
6924         * config/arc/arc.c (arc_return_address_register): Fix
6925         if-condition.
6927 2018-06-15  Richard Biener  <rguenther@suse.de>
6929         PR middle-end/86159
6930         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6931         leave useless conversion stripping to force_gimple_operand_gsi.
6932         (gimplify_build2): Likewise.
6933         (gimplify_build1): Likewise.
6935 2018-06-15  Richard Biener  <rguenther@suse.de>
6937         PR middle-end/86076
6938         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6939         before adjusting their block.
6941 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6943         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6944         multilibs for *-*-rtems*.
6945         * config/riscv/t-rtems: New file.
6947 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6949         PR middle-end/86122
6950         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6951         unsigned_type_for returns NULL.
6953         PR target/85945
6954         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6955         subregs of multi-word pseudos unless the float mode has word size.
6957 2018-06-14  Richard Biener  <rguenther@suse.de>
6959         PR middle-end/86139
6960         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6961         duplicate and harmful type_hash_canon.
6962         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6964 2018-06-14  Richard Biener  <rguenther@suse.de>
6966         PR ipa/86124
6967         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6968         NULL cgraph_node.
6970 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6972         * config/rtems.h (STDINT_LONG32): Define.
6974 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6975             Prachi Godbole  <prachi.godbole@imgtec.com>
6977         * config/mips/mips-cpus.def: Define P6600.
6978         * config/mips/mips-tables.opt: Regenerate.
6979         * config/mips/mips.c (mips_ucbranch_type): New enum.
6980         (mips_rtx_cost_data): Add support for P6600.
6981         (mips_issue_rate): Likewise.
6982         (mips_multipass_dfa_lookahead): Likewise.
6983         (mips_avoid_hazard): Likewise.
6984         (mips_reorg_process_insns): Likewise.
6985         (mips_classify_branch_p6600): New function.
6986         * config/mips/mips.h (TUNE_P6600): New define.
6987         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6988         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6989         * config/mips/mips.md: Include p6600.md.
6990         (processor): Add p6600.
6991         * config/mips/p6600.md: New file.
6992         * doc/invoke.texi: Add p6600 to supported architectures.
6994 2018-06-13  Martin Sebor  <msebor@redhat.com>
6996         PR tree-optimization/86114
6997         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6998         of integer types.
6999         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
7001 2018-06-13  Richard Biener  <rguenther@suse.de>
7003         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
7004         Properly set vector type of the intermediate stmt.
7005         * tree-vect-stmts.c (vectorizable_operation): The destination
7006         var always has vectype_out type.
7008 2018-06-13  Jeff Law  <law@redhat.com>
7010         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
7011         integer 0 for argument to print_rtl_with_bb.
7012         (rl78_reorg): Likewise.
7014 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
7016         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
7017         from rtx to rtx_insn *.
7018         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
7019         "label".
7020         (add_sched_insns_for_speculation): Likewise for local "target",
7021         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7022         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
7023         from rtx_insn ** to rtx_code_label **.
7024         (reorg_emit_nops): Likewise.
7025         (c6x_reorg): Likewise for local "call_labels".
7026         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
7027         rtx to rtx_insn *.
7028         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
7029         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
7030         the loops over LABEL_REFS.
7031         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
7032         braf_label.
7033         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
7034         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
7035         (split_branches): Strengthen local "olabel" from rtx to
7036         rtx_insn *, adding a safe_as_a cast.
7037         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
7038         to "rtx_insn *".
7039         (add_insn_after): Likewise for first two params.
7040         (add_insn_before): Likewise.
7041         (remove_insn): Likewise for param.
7042         (emit_pattern_before_noloc): Likewise for second and third params.
7043         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
7044         (emit_call_insn_before_noloc): Likewise.
7045         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
7046         to "rtx_insn *".
7047         (emit_barrier_before): Likewise.
7048         (emit_label_before): Strengthen "label" param from "rtx" to
7049         "rtx_code_label *".  Strengthen "before" param from "rtx" to
7050         "rtx_insn *".
7051         (emit_insn_after_1): Strengthen "after" param from "rtx" to
7052         "rtx_insn *".
7053         (emit_pattern_after_noloc): Likewise.
7054         (emit_insn_after_noloc): Likewise.
7055         (emit_jump_insn_after_noloc): Likewise.
7056         (emit_call_insn_after_noloc): Likewise.
7057         (emit_debug_insn_after_noloc): Likewise.
7058         (emit_barrier_after): Likewise.
7059         (emit_label_after): Likewise for both params.
7060         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
7061         "loc" param from "int" to "location_t".
7062         (emit_insn_after_setloc): Likewise.
7063         (emit_jump_insn_after_setloc): Likewise.
7064         (emit_call_insn_after_setloc): Likewise.
7065         (emit_debug_insn_after_setloc): Likewise.
7066         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
7067         "loc" param from "int" to "location_t".
7068         (emit_pattern_before): Convert NULL_RTX to NULL.
7069         (emit_insn_before_setloc): Convert "loc" param from "int" to
7070         "location_t".
7071         (emit_jump_insn_before_setloc): Likewise.
7072         (emit_call_insn_before_setloc): Likewise.
7073         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
7074         rtx_insn *.  Convert "loc" param from "int" to "location_t".
7075         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
7076         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
7077         Convert 3rd param from "int" to "location_t".
7078         (emit_barrier_before, emit_barrier_after, next_real_insn):
7079         Strengthen param from rtx to rtx_insn *.
7080         (emit_label_before): Strengthen 1st param from "rtx" to
7081         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
7082         "rtx_insn *".
7083         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
7084         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
7085         Strengthen 2nd param from "rtx" to "rtx_insn *".
7086         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
7087         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
7088         Likewise. Convert 3rd param from "int" to "location_t".
7089         (emit_label_after): Strengthen 1st param from "rtx" to
7090         "rtx_code_label *".
7091         (next_real_insn, remove_insn): Strengthen param from "rtx" to
7092         "rtx_insn *".
7093         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
7094         from "rtx" to "rtx_insn *".
7096 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
7098         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
7099         bodies streamed in with -Q.
7100         * dumpfile.c (dump_files): Add lto-stream-out dump file.
7101         * dumpfile.h (tree_dump_index): Add lto_stream_out.
7102         * gimple-streamer-out.c: Include gimple-pretty-print.h
7103         (output_bb): Dump stmts streamed.
7104         * lto-section-out.c: Include print-tree.h
7105         (lto_begin_section): Dump sections created.
7106         (lto_output_decl_index): Dump decl encoded.
7107         * lto-streamer-out.c: Include print-tree.h
7108         (create_output_block): Dump output block created.
7109         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
7110         (output_function): Dump function output.
7111         (output_constructor): Dump constructor streamed.
7112         (write_global_stream): Output indexes encoded.
7113         (produce_asm_for_decls): Dump streams encoded.
7114         * lto-streamer.c (streamer_dump_file): New global var.
7115         * lto-streamer.h (streamer_dump_file): Declare.
7116         * passes.c (ipa_write_summaries): Initialize streamer dump.
7117         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
7118         in.
7120 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7122         PR target/86048
7123         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
7124         offsets for register save directives.  Emit a second batch of save
7125         directives, if need be, when the function accesses prior frames.
7127 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7129         * config/arc/fpu.md (fmasf4): Force operand to register.
7130         (fnmasf4): Likewise.
7132 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7134         * config/arc/arc-protos.h (arc_pad_return): Remove.
7135         * config/arc/arc.c (machine_function): Remove force_short_suffix
7136         and size_reason.
7137         (arc_print_operand): Adjust printing of '&'.
7138         (arc_verify_short): Remove conditional printing of short suffix.
7139         (arc_final_prescan_insn): Remove reference to size_reason.
7140         (pad_return): New function.
7141         (arc_reorg): Call pad_return.
7142         (arc_pad_return): Remove.
7143         (arc_init_machine_status): Remove reference to force_short_suffix.
7144         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
7145         (attr length): When attribute iscompact is true force to 2
7146         regardless; in the case of maybe check if we want to force the
7147         instruction to have 4 bytes length.
7148         (nopv): Change it to generate 4 byte long nop as well.
7149         (blockage): New pattern.
7150         (simple_return): Remove call to arc_pad_return.
7151         (p_return_i): Likewise.
7153 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7155         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7157 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7159         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7160         ARC cores.
7162 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7164         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7165         for ARC700 and ARCv2.
7167 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7169         PR target/86076
7170         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7171         operands[2] instead of operands[1].
7174 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7176         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7177         case, check whether the outer register overlaps an unallocatable
7178         register, not just whether it fits the required class.
7180 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7182         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7183         are poly_ints.
7184         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7185         (memrefs_conflict_p): Likewise.
7186         (init_alias_analysis): Likewise.
7187         * cfgexpand.c (expand_debug_expr): Likewise.
7188         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7189         * cse.c (fold_rtx): Likewise.
7190         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7191         * expr.c (emit_block_move_hints): Likewise.
7192         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7193         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7194         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7195         (emit_group_store): Likewise.
7196         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7197         to read the PRE/POST_MODIFY increment.
7198         * calls.c (store_one_arg): Use strip_offset.
7199         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7200         poly_int_rtx_p.
7201         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7202         by a VEC_SELECT.
7203         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7204         (simplify_binary_operation_1): Extend CONST_INT handling to
7205         poly_int_rtx_p.
7206         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7207         than a HOST_WIDE_INT.
7208         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7209         poly_int64.
7210         (adjust_mems, add_stores): Update accodingly.
7211         (vt_canonicalize_addr): Track polynomial offsets.
7212         (emit_note_insn_var_location): Likewise.
7213         (vt_add_function_parameter): Likewise.
7214         (vt_initialize): Likewise.
7216 2018-06-12  Jeff Law  <law@redhat.com>
7218         * config.gcc (alpha*-*-freebsd*): Remove.
7219         * config/alpha/freebsd.h: Remove.
7221 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7223         PR other/69968
7224         * spellcheck-tree.c (levenshtein_distance): Rename to...
7225         (get_edit_distance): ...this, and update for underlying renaming.
7226         * spellcheck-tree.h (levenshtein_distance): Rename to...
7227         (get_edit_distance): ...this.
7228         * spellcheck.c (levenshtein_distance): Rename to...
7229         (get_edit_distance): ...this.  Convert from Levenshtein distance
7230         to Damerau-Levenshtein distance by supporting transpositions of
7231         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7232         "v_one_ago".
7233         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7234         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7235         update for underlying renaming.
7236         (selftest::levenshtein_distance_unit_test): Rename to...
7237         (selftest::test_get_edit_distance_unit): ...this, and update for
7238         underlying renaming.
7239         (selftest::test_find_closest_string): Add example from PR 69968
7240         where transposition helps
7241         (selftest::test_metric_conditions): Update for renaming.
7242         (selftest::test_metric_conditions): Likewise.
7243         (selftest::spellcheck_c_tests): Likewise.
7244         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7245         (get_edit_distance): ...this.
7246         (best_match::consider): Update for renaming.
7248 2018-06-12  Martin Sebor  <msebor@redhat.com>
7250         PR tree-optimization/85259
7251         * builtins.c (compute_objsize): Handle constant offsets.
7252         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7253         true iff a warning has been issued.
7254         * gimple.h (gimple_nonartificial_location): New function.
7255         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7256         gimple_nonartificial_location and handle -Wno-system-headers.
7257         (handle_builtin_stxncpy): Same.
7259 2018-06-12  Martin Sebor  <msebor@redhat.com>
7261         PR c/85931
7262         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7264 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7266         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7267         BUILTIN_VEC_XST entries for pointer to double and long long.
7269 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7271         PR target/85990
7272         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7273         Update comments.
7274         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7275         Likewise.
7277 2018-06-12  Martin Liska  <mliska@suse.cz>
7279         * doc/options.texi: Document IntegerRange.
7281 2018-06-12  Martin Liska  <mliska@suse.cz>
7283         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7284         * opt-functions.awk: Handle Deprecated flag.
7285         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7286         and report error.
7287         (read_cmdline_option): Report warning for a deprecated option.
7288         * opts.h (struct cl_option): Add new field cl_deprecated.
7289         (CL_ERR_DEPRECATED): New.
7291 2018-06-12  Martin Liska  <mliska@suse.cz>
7293         * doc/options.texi: Document Deprecated option flag.
7295 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7297         * config/arc/arc-arch.h (arc_extras): New enum.
7298         (arc_cpu_t):Add field extra.
7299         (arc_cpu_types): Consider the extras.
7300         * config/arc/arc-cpus.def: Add extras info.
7301         * config/arc/arc-opts.h (processor_type): Consider extra field.
7302         * config/arc/arc.c (arc_override_options): Handle extra field.
7304 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7306         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7307         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7308         field.
7309         * config/arc/arc.c (arc_init): Update pic warning.
7310         (irq_range): Update irq range parsing warnings.
7311         (arc_override_options): Update various warning messages.
7312         (arc_handle_aux_attribute): Likewise.
7314 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7316         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7318 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7320         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7321         compiler messages directives.
7323 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7325         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7326         * config/mips/mips-tables.opt: Regenerate.
7327         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7328         mips64r6.
7329         * doc/invoke.texi: Document -march=i6500.
7331 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7333         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7334         (i6400_gpmul): Add cpu_unit.
7335         (i6400_gpdiv): Likewise.
7336         (i6400_msa_add_d): Update reservations.
7337         (i6400_msa_int_add) Likewise.
7338         (i6400_msa_short_logic3) Likewise.
7339         (i6400_msa_short_logic2) Likewise.
7340         (i6400_msa_short_logic) Likewise.
7341         (i6400_msa_move) Likewise.
7342         (i6400_msa_cmp) Likewise.
7343         (i6400_msa_short_float2) Likewise.
7344         (i6400_msa_div_d) Likewise.
7345         (i6400_msa_long_logic1) Likewise.
7346         (i6400_msa_long_logic2) Likewise.
7347         (i6400_msa_mult) Likewise.
7348         (i6400_msa_long_float2) Likewise.
7349         (i6400_msa_long_float4) Likewise.
7350         (i6400_msa_long_float5) Likewise.
7351         (i6400_msa_long_float8) Likewise.
7352         (i6400_fpu_fadd): Include frint type.
7353         (i6400_fpu_store): New define_insn_reservation.
7354         (i6400_fpu_load): Likewise.
7355         (i6400_fpu_move): Likewise.
7356         (i6400_fpu_fcmp): Likewise.
7357         (i6400_fpu_fmadd): Likewise.
7358         (i6400_int_mult): Include imul3nc type and update reservation.
7359         (i6400_int_div): Include idiv3 type and update reservation.
7360         (i6400_int_load): Update to check type not move_type.
7361         (i6400_int_store): Likewise.
7362         (i6400_int_prefetch): Set zero latency.
7364 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7366         * gcc.c: Document new %@{...} sequence.
7367         (LINK_COMMAND_SPEC): Use it for the -L switches.
7368         (cpp_unique_options): Use it for the -I switches.
7369         (at_file_argbuf): New global variable.
7370         (in_at_file): Likewise.
7371         (alloc_args): Create at_file_argbuf.
7372         (clear_args): Truncate at_file_argbuf.
7373         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7374         (open_at_file): New function.
7375         (close_at_file): Likewise.
7376         (create_at_file): Delete.
7377         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7378         <'o'>: Likewise.
7379         <'@'>: New case.
7380         (validate_switches_from_spec): Deal with %@{...} sequence.
7381         (validate_switches): Likewise.
7382         (driver::finalize): Call clear_args.
7384 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7386         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7388 2018-06-11  Martin Sebor  <msebor@redhat.com>
7390         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7391         (Wno-class-memaccess): Add @opindex.
7392         (Wno-templates, Wno-multiple-inheritance): Same.
7393         (Wno-virtual-inheritance, Wno-namespaces): Same.
7394         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7395         (Wno-format-overflow, Wno-format-truncation): Same.
7396         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7397         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7398         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7399         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7400         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7401         (Wno-misspelled-isr): Same.
7403 2018-06-11  Martin Sebor  <msebor@redhat.com>
7405         * PR tree-optimization/86083
7406         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7408 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7410         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7412 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7414         PR target/85755
7415         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7416         on the correct operand.
7417         (*movdi_internal64): Ditto.
7419 2018-06-11  Martin Liska  <mliska@suse.cz>
7421         PR tree-optimization/86089
7422         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7424 2018-06-11  Julia Koval  <julia.koval@intel.com>
7426         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7427         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7428         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7430 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7432         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7433         for Ada with strict dwarf2.
7435 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7437         PR target/85755
7438         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7439         addresses.
7441 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7443         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7445 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7447         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7448         TARGET_ELF.
7450 2018-06-08  Martin Liska  <mliska@suse.cz>
7452         * tree-cfg.h (debug_function): Fix argument type to match
7453         implementation.
7455 2018-06-08  Martin Liska  <mliska@suse.cz>
7457         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7458         Remove usage of MPX-related (and removed) fields.
7459         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7461 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7463         * cfg.c (debug): Use TDF_NONE rather than 0.
7464         * cfghooks.c (debug): Likewise.
7465         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7466         (struct dump_option_value_info): Convert to...
7467         (struct kv_pair): ...this template type.
7468         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7469         rather than 0.
7470         (optinfo_verbosity_options): Likewise.
7471         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7472         OPTGROUP_NONE.
7473         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7474         than int for "optgroup_flags" param.
7475         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7476         "dump_kind" param.
7477         (dump_dec): Likewise.
7478         (dump_finish): Use TDF_NONE rather than 0.
7479         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7480         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7481         than 0.  Update for change to option_ptr.
7482         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7483         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7484         0.  Update for changes to optinfo_verbosity_options and
7485         optgroup_options.
7486         (opt_info_switch_p): Convert optgroup_flags from int to
7487         optgroup_flags_t.
7488         (dump_basic_block): Use dump_flags_t rather than int
7489         for "dump_kind" param.
7490         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7491         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7492         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7493         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7494         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7495         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7496         TDF_NONE): Convert from macros to...
7497         (enum dump_flag): ...this new enum.
7498         (dump_flags_t): Update to use enum.
7499         (operator|, operator&, operator~, operator|=, operator&=):
7500         Implement for dump_flags_t.
7501         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7502         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7503         Convert from macros to...
7504         (enum optgroup_flag): ...this new enum.
7505         (optgroup_flags_t): New typedef.
7506         (operator|, operator|=): Implement for optgroup_flags_t.
7507         (struct dump_file_info): Convert field "alt_flags" to
7508         dump_flags_t.  Convert field "optgroup_flags" to
7509         optgroup_flags_t.
7510         (dump_basic_block): Use dump_flags_t rather than int for param.
7511         (dump_generic_expr_loc): Likewise.
7512         (dump_dec): Likewise.
7513         (dump_register): Convert param "optgroup_flags" to
7514         optgroup_flags_t.
7515         (opt_info_enable_passes): Likewise.
7516         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7517         than 0.
7518         * gimple-pretty-print.c (debug): Likewise.
7519         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7520         (merged_store_group::apply_stores): Likewise.
7521         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7522         * gimple.c (verify_gimple_pp): Likewise.
7523         * graphite-poly.c (print_pbb_body): Likewise.
7524         * passes.c (pass_manager::register_one_dump_file): Convert
7525         local "optgroup_flags" to optgroup_flags_t.
7526         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7527         (debug): Likewise.
7528         (debug_body): Likewise.
7529         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7530         to optgroup_flags_t.
7531         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7532         than 0.
7533         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7534         (convert_mult_to_fma): Likewise.
7535         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7536         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7537         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7538         "dump_kind" to dump_flags_t.
7540 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7542         * config/rs6000/rs6000.c (min, max): Delete.
7544 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7546         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7547         -mabi=spe and -mabi=no-spe.
7549 2018-06-08  Martin Liska  <mliska@suse.cz>
7551         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7552         where we expect an existing summary.
7554 2018-06-08  Martin Liska  <mliska@suse.cz>
7556         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7557         * ipa-inline.h (estimate_edge_growth): Likewise.
7559 2018-06-08  Martin Liska  <mliska@suse.cz>
7561         * cgraph.c (function_version_hasher::hash): Use
7562         cgraph_node::get_uid ().
7563         (function_version_hasher::equal):
7564         * cgraph.h (cgraph_node::get_uid): New method.
7565         * ipa-inline.c (update_caller_keys): Use
7566         cgraph_node::get_uid ().
7567         (update_callee_keys): Likewise.
7568         * ipa-utils.c (searchc): Likewise.
7569         (ipa_reduced_postorder): Likewise.
7570         * lto-cgraph.c (input_node): Likewise.
7571         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7572         * symbol-summary.h (symtab_insertion): Likewise.
7573         (symtab_removal): Likewise.
7574         (symtab_duplication): Likewise.
7575         * tree-pretty-print.c (dump_function_header): Likewise.
7576         * tree-sra.c (convert_callers_for_node): Likewise.
7578 2018-06-08  Martin Liska  <mliska@suse.cz>
7580         * cgraph.c (symbol_table::create_edge): Always assign a new
7581         unique number.
7582         (symbol_table::free_edge): Do not recycle numbers.
7583         * cgraph.h (cgraph_edge::get): New method.
7584         * symbol-summary.h (symtab_removal): Use it.
7585         (symtab_duplication): Likewise.
7586         (call_summary::hashable_uid): Remove.
7588 2018-06-08  Martin Liska  <mliska@suse.cz>
7590         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7591         (initialize_growth_caches): Remove.
7592         (free_growth_caches): Likewise.
7593         (do_estimate_edge_time): Use edge_growth_cache.
7594         (do_estimate_edge_size): Likewise.
7595         (do_estimate_edge_hints): Likewise.
7596         * ipa-inline.c (reset_edge_caches): Likewise.
7597         (recursive_inlining): Likewise.
7598         (inline_small_functions): Likewise.
7599         * ipa-inline.h (initialize_growth_caches): Remove.
7600         (estimate_edge_size): Likewise.
7601         (estimate_edge_time): Likewise.
7602         (estimate_edge_hints): Likewise.
7603         (reset_edge_growth_cache): Likewise.
7604         * symbol-summary.h (call_summary::remove): New method.
7606 2018-06-08  Martin Liska  <mliska@suse.cz>
7608         * ipa-cp.c (class edge_clone_summary): New summary.
7609         (grow_edge_clone_vectors): Remove.
7610         (ipcp_edge_duplication_hook): Remove.
7611         (class edge_clone_summary_t): New call_summary class.
7612         (ipcp_edge_removal_hook): Remove.
7613         (edge_clone_summary_t::duplicate): New function.
7614         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7615         (create_specialized_node): Likewise.
7616         (ipcp_driver): Initialize edge_clone_summaries and do not
7617         register hooks.
7619 2018-06-08  Martin Liska  <mliska@suse.cz>
7621         * symbol-summary.h (get): New function.
7622         (call_summary::m_initialize_when_cloning): New class member.
7624 2018-06-08  Martin Liska  <mliska@suse.cz>
7626         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7627         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7628         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7629         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7630         (remove_cgraph_node_from_order): Use the removed_nodes set.
7631         (do_per_function_toporder): Likwise.
7632         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7633         instead of summary_uid.
7634         (symtab_removal): Likewise.
7635         (symtab_duplication): Likewise.
7637 2018-06-08  Martin Liska  <mliska@suse.cz>
7639         * ipa-cp.c (ipcp_store_bits_results): Use
7640         ipcp_transformation_sum.
7641         (ipcp_store_vr_results): Likewise.
7642         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7643         to ...
7644         (ipcp_transformation_initialize): ... this.
7645         (ipa_set_node_agg_value_chain):
7646         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7647         (write_ipcp_transformation_info): Likewise.
7648         (read_ipcp_transformation_info): Likewise.
7649         (ipcp_update_bits): Likewise.
7650         (ipcp_update_vr): Likewise.
7651         (ipcp_transform_function): Likewise.
7652         * ipa-prop.h: Rename ipcp_transformation_summary to
7653         ipcp_transformation.
7654         (class ipcp_transformation_t): New function summary.
7655         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7656         (ipa_get_agg_replacements_for_node): Likewise.
7658 2018-06-08  Martin Liska  <mliska@suse.cz>
7660         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7661         of struct.
7662         (class funct_state_summary_t): New function_summary class.
7663         (has_function_state): Remove.
7664         (get_function_state): Likewise.
7665         (set_function_state): Likewise.
7666         (add_new_function): Likewise.
7667         (funct_state_summary_t::insert): New function.
7668         (duplicate_node_data): Remove.
7669         (remove_node_data): Remove.
7670         (funct_state_summary_t::duplicate): New function.
7671         (register_hooks): Create new funct_state_summaries.
7672         (pure_const_generate_summary): Use it.
7673         (pure_const_write_summary): Likewise.
7674         (pure_const_read_summary): Likewise.
7675         (propagate_pure_const): Likewise.
7676         (propagate_nothrow): Likewise.
7677         (dump_malloc_lattice): Likewise.
7678         (propagate_malloc): Likewise.
7679         (execute): Do not register hooks, just remove summary
7680         instead.
7681         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7682         constructor.
7684 2018-06-08  Martin Liska  <mliska@suse.cz>
7686         * ipa-reference.c (remove_node_data): Remove.
7687         (duplicate_node_data): Likewise.
7688         (class ipa_ref_var_info_summary_t): New class.
7689         (class ipa_ref_opt_summary_t): Likewise.
7690         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7691         (get_reference_optimization_summary): Use
7692         ipa_ref_opt_sum_summaries.
7693         (set_reference_vars_info): Remove.
7694         (set_reference_optimization_summary): Likewise.
7695         (ipa_init): Create summaries.
7696         (init_function_info): Use function summary.
7697         (ipa_ref_opt_summary_t::duplicate): New function.
7698         (ipa_ref_opt_summary_t::remove): New function.
7699         (get_read_write_all_from_node): Fix GNU coding style.
7700         (propagate): Use function summary.
7701         (write_node_summary_p): Fix GNU coding style.
7702         (stream_out_bitmap): Likewise.
7703         (ipa_reference_read_optimization_summary): Use function summary.
7704         (ipa_reference_c_finalize): Do not release hooks.
7706 2018-06-08  Martin Liska  <mliska@suse.cz>
7708         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7709         (analyze_function_body): Extract multiple calls of get_create.
7710         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7711         * ipa-inline.c (recursive_inlining): Use ::get method.
7712         * ipa-inline.h (estimate_edge_growth): Likewise.
7714 2018-06-08  Martin Liska  <mliska@suse.cz>
7716         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7717         HSA_INVALID.
7718         (hsa_function_summary::hsa_function_summary): Use the new enum
7719         value.
7720         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7721         * hsa-gen.c (hsa_get_host_function): Likewise.
7722         (get_brig_function_name): Likewise.
7723         * ipa-hsa.c (process_hsa_functions): Likewise.
7724         (ipa_hsa_write_summary): Likewise.
7725         * symbol-summary.h (symtab_duplication): Use ::get function/
7726         (get): New function.
7728 2018-06-08  Martin Liska  <mliska@suse.cz>
7730         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7731         of get.
7732         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7733         (hsa_register_kernel): Likewise.
7734         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7735         * hsa-gen.c (hsa_get_host_function): Likewise.
7736         (get_brig_function_name): Likewise.
7737         (generate_hsa): Likewise.
7738         (pass_gen_hsail::execute): Likewise.
7739         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7740         (devirtualization_time_bonus): Likewise.
7741         (ipcp_propagate_stage): Likewise.
7742         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7743         (edge_set_predicate): Likewise.
7744         (evaluate_conditions_for_known_args): Likewise.
7745         (evaluate_properties_for_edge): Likewise.
7746         (ipa_fn_summary::reset): Likewise.
7747         (ipa_fn_summary_t::duplicate): Likewise.
7748         (dump_ipa_call_summary): Likewise.
7749         (ipa_dump_fn_summary): Likewise.
7750         (analyze_function_body): Likewise.
7751         (compute_fn_summary): Likewise.
7752         (estimate_edge_devirt_benefit): Likewise.
7753         (estimate_edge_size_and_time): Likewise.
7754         (estimate_calls_size_and_time): Likewise.
7755         (estimate_node_size_and_time): Likewise.
7756         (inline_update_callee_summaries): Likewise.
7757         (remap_edge_change_prob): Likewise.
7758         (remap_edge_summaries): Likewise.
7759         (ipa_merge_fn_summary_after_inlining): Likewise.
7760         (ipa_update_overall_fn_summary): Likewise.
7761         (read_ipa_call_summary): Likewise.
7762         (inline_read_section): Likewise.
7763         (write_ipa_call_summary): Likewise.
7764         (ipa_fn_summary_write): Likewise.
7765         (ipa_free_fn_summary): Likewise.
7766         * ipa-hsa.c (process_hsa_functions): Likewise.
7767         (ipa_hsa_write_summary): Likewise.
7768         (ipa_hsa_read_section): Likewise.
7769         * ipa-icf.c (sem_function::merge): Likewise.
7770         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7771         (do_estimate_edge_time): Likewise.
7772         (estimate_size_after_inlining): Likewise.
7773         (estimate_growth): Likewise.
7774         (growth_likely_positive): Likewise.
7775         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7776         (inline_call): Likewise.
7777         * ipa-inline.c (caller_growth_limits): Likewise.
7778         (can_inline_edge_p): Likewise.
7779         (can_inline_edge_by_limits_p): Likewise.
7780         (compute_uninlined_call_time): Likewise.
7781         (compute_inlined_call_time): Likewise.
7782         (want_inline_small_function_p): Likewise.
7783         (edge_badness): Likewise.
7784         (update_caller_keys): Likewise.
7785         (update_callee_keys): Likewise.
7786         (recursive_inlining): Likewise.
7787         (inline_small_functions): Likewise.
7788         (inline_to_all_callers_1): Likewise.
7789         (dump_overall_stats): Likewise.
7790         (early_inline_small_functions): Likewise.
7791         (early_inliner): Likewise.
7792         * ipa-inline.h (estimate_edge_growth): Likewise.
7793         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7794         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7795         * ipa-prop.h (IPA_NODE_REF): Likewise.
7796         (IPA_EDGE_REF): Likewise.
7797         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7798         (propagate_malloc): Likewise.
7799         * ipa-split.c (execute_split_functions): Likewise.
7800         * symbol-summary.h: Rename get to get_create.
7801         (get): Likewise.
7802         (get_create): Likewise.
7803         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7805 2018-06-08  Martin Liska  <mliska@suse.cz>
7807         * symbol-summary.h (release): Move definition out of class
7808         declaration.
7809         (symtab_removal): Likewise.
7810         (symtab_duplication): Likewise.
7812 2018-06-08  Martin Liska  <mliska@suse.cz>
7814         * symbol-summary.h (function_summary): Move constructor
7815         implementation out of class declaration.
7816         (release): Likewise.
7817         (symtab_insertion): Likewise.
7818         (symtab_removal): Likewise.
7819         (symtab_duplication): Likewise.
7820         (get): Likewise.
7822 2018-06-08  Martin Liska  <mliska@suse.cz>
7824         * Makefile.in: Remove support for MPX (macros, related functions,
7825         fields in cgraph_node, ...).
7826         * builtin-types.def (BT_BND): Likewise.
7827         (BT_FN_BND_CONST_PTR): Likewise.
7828         (BT_FN_CONST_PTR_BND): Likewise.
7829         (BT_FN_VOID_PTR_BND): Likewise.
7830         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7831         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7832         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7833         (expand_builtin_mempcpy_with_bounds): Likewise.
7834         (expand_builtin_memset_with_bounds): Likewise.
7835         (expand_builtin_memset_args): Likewise.
7836         (std_expand_builtin_va_start): Likewise.
7837         (expand_builtin): Likewise.
7838         (expand_builtin_with_bounds): Likewise.
7839         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7840         (DEF_LIB_BUILTIN_CHKP): Likewise.
7841         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7842         (DEF_CHKP_BUILTIN): Likewise.
7843         (BUILT_IN_MEMCPY): Likewise.
7844         (BUILT_IN_MEMMOVE): Likewise.
7845         (BUILT_IN_MEMPCPY): Likewise.
7846         (BUILT_IN_MEMSET): Likewise.
7847         (BUILT_IN_STPCPY): Likewise.
7848         (BUILT_IN_STRCAT): Likewise.
7849         (BUILT_IN_STRCHR): Likewise.
7850         (BUILT_IN_STRCPY): Likewise.
7851         (BUILT_IN_STRLEN): Likewise.
7852         (BUILT_IN_MEMCPY_CHK): Likewise.
7853         (BUILT_IN_MEMMOVE_CHK): Likewise.
7854         (BUILT_IN_MEMPCPY_CHK): Likewise.
7855         (BUILT_IN_MEMSET_CHK): Likewise.
7856         (BUILT_IN_STPCPY_CHK): Likewise.
7857         (BUILT_IN_STRCAT_CHK): Likewise.
7858         (BUILT_IN_STRCPY_CHK): Likewise.
7859         * calls.c (store_bounds): Likewise.
7860         (emit_call_1): Likewise.
7861         (special_function_p): Likewise.
7862         (maybe_warn_nonstring_arg): Likewise.
7863         (initialize_argument_information): Likewise.
7864         (finalize_must_preallocate): Likewise.
7865         (compute_argument_addresses): Likewise.
7866         (expand_call): Likewise.
7867         * cfgexpand.c (expand_call_stmt): Likewise.
7868         (expand_return): Likewise.
7869         (expand_gimple_stmt_1): Likewise.
7870         (pass_expand::execute): Likewise.
7871         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7872         (cgraph_node::remove): Likewise.
7873         (cgraph_node::dump): Likewise.
7874         (cgraph_node::verify_node): Likewise.
7875         * cgraph.h (chkp_function_instrumented_p): Likewise.
7876         (symtab_node::get_alias_target): Likewise.
7877         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7878         (cgraph_local_p): Likewise.
7879         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7880         (cgraph_edge::rebuild_references): Likewise.
7881         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7882         (walk_polymorphic_call_targets): Likewise.
7883         (cgraph_node::expand_thunk): Likewise.
7884         (symbol_table::output_weakrefs): Likewise.
7885         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7886         (ix86_handle_option): Likewise.
7887         * config/i386/constraints.md: Likewise.
7888         * config/i386/i386-builtin-types.def (BND): Likewise.
7889         (VOID): Likewise.
7890         (PVOID): Likewise.
7891         (ULONG): Likewise.
7892         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7893         (BDESC_FIRST): Likewise.
7894         (BDESC): Likewise.
7895         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7896         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7897         * config/i386/i386.c (enum reg_class): Likewise.
7898         (ix86_target_string): Likewise.
7899         (ix86_option_override_internal): Likewise.
7900         (ix86_conditional_register_usage): Likewise.
7901         (ix86_valid_target_attribute_inner_p): Likewise.
7902         (ix86_set_indirect_branch_type): Likewise.
7903         (ix86_set_current_function): Likewise.
7904         (ix86_function_arg_regno_p): Likewise.
7905         (init_cumulative_args): Likewise.
7906         (ix86_function_arg_advance): Likewise.
7907         (ix86_function_arg): Likewise.
7908         (ix86_pass_by_reference): Likewise.
7909         (ix86_function_value_regno_p): Likewise.
7910         (ix86_function_value_1): Likewise.
7911         (ix86_function_value_bounds): Likewise.
7912         (ix86_return_in_memory): Likewise.
7913         (ix86_setup_incoming_vararg_bounds): Likewise.
7914         (ix86_va_start): Likewise.
7915         (indirect_thunk_need_prefix): Likewise.
7916         (print_reg): Likewise.
7917         (ix86_print_operand): Likewise.
7918         (ix86_expand_call): Likewise.
7919         (ix86_output_function_return): Likewise.
7920         (reg_encoded_number): Likewise.
7921         (BDESC_VERIFYS): Likewise.
7922         (ix86_init_mpx_builtins): Likewise.
7923         (ix86_init_builtins): Likewise.
7924         (ix86_emit_cmove): Likewise.
7925         (ix86_emit_move_max): Likewise.
7926         (ix86_expand_builtin): Likewise.
7927         (ix86_builtin_mpx_function): Likewise.
7928         (ix86_get_arg_address_for_bt): Likewise.
7929         (ix86_load_bounds): Likewise.
7930         (ix86_store_bounds): Likewise.
7931         (ix86_load_returned_bounds): Likewise.
7932         (ix86_store_returned_bounds): Likewise.
7933         (ix86_class_likely_spilled_p): Likewise.
7934         (ix86_hard_regno_mode_ok): Likewise.
7935         (x86_order_regs_for_local_alloc): Likewise.
7936         (ix86_mitigate_rop): Likewise.
7937         (ix86_bnd_prefixed_insn_p): Likewise.
7938         (ix86_mpx_bound_mode): Likewise.
7939         (ix86_make_bounds_constant): Likewise.
7940         (ix86_initialize_bounds): Likewise.
7941         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7942         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7943         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7944         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7945         (TARGET_CHKP_BOUND_MODE): Likewise.
7946         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7947         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7948         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7949         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7950         * config/i386/i386.h (TARGET_MPX): Likewise.
7951         (TARGET_MPX_P): Likewise.
7952         (VALID_BND_REG_MODE): Likewise.
7953         (FIRST_BND_REG): Likewise.
7954         (LAST_BND_REG): Likewise.
7955         (enum reg_class): Likewise.
7956         (BND_REG_P): Likewise.
7957         (BND_REGNO_P): Likewise.
7958         (BNDmode): Likewise.
7959         (ADJUST_INSN_LENGTH): Likewise.
7960         * config/i386/i386.md: Likewise.
7961         * config/i386/i386.opt: Likewise.
7962         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7963         (defined): Likewise.
7964         (LINK_MPX): Likewise.
7965         (MPX_SPEC): Likewise.
7966         (LIBMPX_SPEC): Likewise.
7967         (LIBMPXWRAPPERS_SPEC): Likewise.
7968         (CHKP_SPEC): Likewise.
7969         * config/i386/predicates.md: Likewise.
7970         * dbxout.c (dbxout_type): Likewise.
7971         * doc/extend.texi: Likewise.
7972         * doc/invoke.texi: Likewise.
7973         * doc/md.texi: Likewise.
7974         * doc/tm.texi: Likewise.
7975         * doc/tm.texi.in: Likewise.
7976         * dwarf2out.c (is_base_type): Likewise.
7977         (gen_formal_types_die): Likewise.
7978         (gen_subprogram_die): Likewise.
7979         (gen_type_die_with_usage): Likewise.
7980         (gen_decl_die): Likewise.
7981         (dwarf2out_late_global_decl): Likewise.
7982         * expr.c (expand_assignment): Likewise.
7983         (emit_storent_insn): Likewise.
7984         (store_expr_with_bounds): Likewise.
7985         (store_expr): Likewise.
7986         (expand_expr_real_1): Likewise.
7987         * expr.h (store_expr_with_bounds): Likewise.
7988         * function.c (use_register_for_decl): Likewise.
7989         (struct bounds_parm_data): Likewise.
7990         (assign_parms_augmented_arg_list): Likewise.
7991         (assign_parm_find_entry_rtl): Likewise.
7992         (assign_parm_is_stack_parm): Likewise.
7993         (assign_parm_load_bounds): Likewise.
7994         (assign_bounds): Likewise.
7995         (assign_parms): Likewise.
7996         (expand_function_start): Likewise.
7997         * gcc.c (CHKP_SPEC): Likewise.
7998         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7999         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
8000         (wrestrict_dom_walker::check_call): Likewise.
8001         * gimple.c (gimple_build_call_from_tree): Likewise.
8002         * gimple.h (enum gf_mask): Likewise.
8003         (gimple_call_with_bounds_p): Likewise.
8004         (gimple_call_set_with_bounds): Likewise.
8005         * gimplify.c (gimplify_init_constructor): Likewise.
8006         * ipa-cp.c (initialize_node_lattices): Likewise.
8007         (propagate_constants_across_call): Likewise.
8008         (find_more_scalar_values_for_callers_subset): Likewise.
8009         * ipa-hsa.c (process_hsa_functions): Likewise.
8010         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
8011         * ipa-icf.c (sem_function::merge): Likewise.
8012         * ipa-inline.c (early_inliner): Likewise.
8013         * ipa-pure-const.c (warn_function_noreturn): Likewise.
8014         (warn_function_cold): Likewise.
8015         (propagate_pure_const): Likewise.
8016         * ipa-ref.h (enum GTY): Likewise.
8017         * ipa-split.c (find_retbnd): Likewise.
8018         (consider_split): Likewise.
8019         (split_function): Likewise.
8020         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8021         * ipa.c (walk_polymorphic_call_targets): Likewise.
8022         (symbol_table::remove_unreachable_nodes): Likewise.
8023         (process_references): Likewise.
8024         (cgraph_build_static_cdtor_1): Likewise.
8025         * lto-cgraph.c (lto_output_node): Likewise.
8026         (output_refs): Likewise.
8027         (compute_ltrans_boundary): Likewise.
8028         (input_overwrite_node): Likewise.
8029         (input_node): Likewise.
8030         (input_cgraph_1): Likewise.
8031         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
8032         * passes.c (pass_manager::execute_early_local_passes): Likewise.
8033         (class pass_chkp_instrumentation_passes): Likewise.
8034         (make_pass_chkp_instrumentation_passes): Likewise.
8035         * passes.def: Likewise.
8036         * rtl.h (struct GTY): Likewise.
8037         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
8038         * stor-layout.c (layout_type): Likewise.
8039         * symtab.c: Likewise.
8040         * target.def: Likewise.
8041         * targhooks.c (default_chkp_bound_type): Likewise.
8042         (default_chkp_bound_mode): Likewise.
8043         (default_builtin_chkp_function): Likewise.
8044         (default_chkp_function_value_bounds): Likewise.
8045         (default_chkp_make_bounds_constant): Likewise.
8046         (default_chkp_initialize_bounds): Likewise.
8047         * targhooks.h (default_chkp_bound_type): Likewise.
8048         (default_chkp_bound_mode): Likewise.
8049         (default_builtin_chkp_function): Likewise.
8050         (default_chkp_function_value_bounds): Likewise.
8051         (default_chkp_make_bounds_constant): Likewise.
8052         (default_chkp_initialize_bounds): Likewise.
8053         * toplev.c (compile_file): Likewise.
8054         (process_options): Likewise.
8055         * tree-core.h (DEF_BUILTIN): Likewise.
8056         (DEF_BUILTIN_CHKP): Likewise.
8057         * tree-inline.c (declare_return_variable): Likewise.
8058         (remap_gimple_stmt): Likewise.
8059         (copy_bb): Likewise.
8060         (initialize_inlined_parameters): Likewise.
8061         (expand_call_inline): Likewise.
8062         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
8063         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
8064         (make_pass_ipa_chkp_produce_thunks): Likewise.
8065         (make_pass_chkp): Likewise.
8066         (make_pass_chkp_opt): Likewise.
8067         (make_pass_chkp_instrumentation_passes): Likewise.
8068         * tree-pretty-print.c (dump_generic_node): Likewise.
8069         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
8070         * tree-ssa-dce.c (propagate_necessity): Likewise.
8071         (eliminate_unnecessary_stmts): Likewise.
8072         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
8073         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
8074         * tree-ssa-sccvn.h: Likewise.
8075         * tree-ssa-strlen.c (get_string_length): Likewise.
8076         (valid_builtin_call): Likewise.
8077         (adjust_last_stmt): Likewise.
8078         (handle_builtin_strchr): Likewise.
8079         (handle_builtin_strcpy): Likewise.
8080         (handle_builtin_stxncpy): Likewise.
8081         (handle_builtin_memcpy): Likewise.
8082         (handle_builtin_strcat): Likewise.
8083         (strlen_check_and_optimize_stmt): Likewise.
8084         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
8085         * tree-streamer-in.c: Likewise.
8086         * tree-streamer.c (record_common_node): Likewise.
8087         * tree.c (tree_code_size): Likewise.
8088         (wide_int_to_tree_1): Likewise.
8089         (type_contains_placeholder_1): Likewise.
8090         (build_common_tree_nodes): Likewise.
8091         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
8092         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
8093         (POINTER_BOUNDS_P): Likewise.
8094         (BOUNDED_TYPE_P): Likewise.
8095         (BOUNDED_P): Likewise.
8096         (CALL_WITH_BOUNDS_P): Likewise.
8097         (pointer_bounds_type_node): Likewise.
8098         * value-prof.c (gimple_ic): Likewise.
8099         * var-tracking.c (vt_add_function_parameters): Likewise.
8100         * varasm.c (make_decl_rtl): Likewise.
8101         (assemble_start_function): Likewise.
8102         (output_constant): Likewise.
8103         (maybe_assemble_visibility): Likewise.
8104         * varpool.c (ctor_for_folding): Likewise.
8105         * chkp-builtins.def: Remove.
8106         * ipa-chkp.c: Remove.
8107         * ipa-chkp.h: Remove.
8108         * rtl-chkp.c: Remove.
8109         * rtl-chkp.h: Remove.
8110         * tree-chkp-opt.c: Remove.
8111         * tree-chkp.c: Remove.
8112         * tree-chkp.h: Remove.
8114 2018-06-07  Carl Love  <cel@us.ibm.com>
8116         * config/rs6000/vsx.md (vextract_fp_from_shorth,
8117         vextract_fp_from_shortl): Add BE support.
8119 2018-06-07  Paul Koning  <ni1d@arrl.net>
8121         * compare-elim.c (try_merge_compare): Don't merge compare if
8122         address contains a side effect.
8123         (try_eliminate_compare): Likewise.
8125 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
8127         * config.gcc: Support "tremont".
8128         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
8129         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
8130         PROCESSOR_TREMONT.
8131         * config/i386/i386.c (m_TREMONT): Define.
8132         (processor_target_table): Add "tremont".
8133         (PTA_TREMONT): Define.
8134         (ix86_lea_outperforms): Add TARGET_TREMONT.
8135         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
8136         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
8137         and M_INTEL_GOLDMONT_PLUS.
8138         (fold_builtin_cpu): Add "tremont".
8139         (ix86_add_stmt_cost): Add TARGET_TREMONT.
8140         (ix86_option_override_internal): Add "tremont".
8141         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
8142         (processor_type): Add PROCESSOR_TREMONT.
8143         * config/i386/x86-tune.def: Add m_TREMONT.
8144         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
8146 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8148         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8149         symbol defined for msp430i* devices to be lower case.
8151 2018-06-07  Richard Biener  <rguenther@suse.de>
8153         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8154         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8155         Properly wrap signed arithmetic if overflow wraps.
8157 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8159         PR tree-optimization/69615
8160         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8161         of a cast from a same precision integral SSA_NAME in a bb dominated
8162         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8163         cast to utype if rhs2 has already a compatible type.
8165 2018-06-07  Richard Biener  <rguenther@suse.de>
8167         PR tree-optimization/85935
8168         * graphite-scop-detection.c (find_params_in_bb): Analyze
8169         condition operands with respect to the correct loop.  Assert
8170         the analysis doesn't fail.
8172 2018-06-04  Carl Love  <cel@us.ibm.com>
8174         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8175         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8176         as it is slightly cheaper.
8177         (first_match_or_eos_index_<mode>):
8178         Calculate index using natural element order.
8179         (first_match_index_<mode>):
8180         Calculate index using natural element order.
8181         (first_match_or_eos_index_<mode>):
8182         Calculate index using natural order.
8183         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8184         for BE and LE modes.
8185         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8186         P9V_BUILTIN_VCLZLSBB_V16QI.
8187         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8188         specific.
8190 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8192         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8193         indentation and line wrap for many prototypes.  Add missing
8194         @smallexample directives around block of prototypes for vec_xl and
8195         vec_xst.
8197 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8199         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8200         track if we pass or return IEEE 128-bit floating point.
8201         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8202         C++ mangling that is compatible with GCC 8.1.
8203         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8204         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8205         floating point types.
8206         (rs6000_function_arg_advance_1): Likewise.
8207         (rs6000_mangle_type): Optionally generate mangled names that match
8208         what GCC 8.1 generated for IEEE 128-bit floating point types.
8209         (rs6000_globalize_decl_name): If we have an external function that
8210         passes or returns IEEE 128-bit types, generate a weak reference
8211         from the mangled name used in GCC 8.1 to the current mangled
8212         name.
8213         (rs6000_init_builtins): Make __ibm128 use the long double type if
8214         long double is IBM extended double.  Make __float128 use the long
8215         double type if long double is IEEE 128-bit.
8217         PR target/85657
8218         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8219         macro for __ibm128 built-in functions.
8220         (PACK_IF): Add __ibm128 pack/unpack functions.
8221         (UNPACK_IF): Likewise.
8222         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8223         enable long double built-in functions if long double is IEEE
8224         128-bit floating point.
8225         (rs6000_invalid_builtin): Update long double built-in function
8226         error message.
8227         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8228         functions, adjust the built-in function to use the long double
8229         built-in function if __ibm128 and long double are the same type.
8230         * doc/extend.texi (PowerPC builtins): Update documention for
8231         __builtin_{,un}pack_longdouble.  Add documentation for
8232         __builtin_{,un}pack_ibm128.
8234 2018-06-06  Jim Wilson  <jimw@sifive.com>
8236         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8237         (struct machine_function): New field interrupt_mode.
8238         (riscv_handle_type_attribute): New function.  Add forward declaration.
8239         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8240         (riscv_expand_epilogue): Check interrupt_mode field.
8241         (riscv_set_current_function): Check interrupt attribute args and
8242         set interrupt_mode field.
8243         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8244         (riscv_sret, riscv_uret): New.
8245         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8246         new arguments to interrupt attribute.
8248 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8250         PR target/63177
8251         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8252         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8254 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8256         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8257         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8258         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8259         several redundant entries.
8261 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8263         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8264         type from "rtx" to "rtx_insn *".
8265         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8266         for local "call_insn", removing cast.
8267         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8269 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8271         PR tree-optimization/86066
8272         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8273         for BIT_INSERT_EXPR stores.
8275 2018-06-06  Richard Biener  <rguenther@suse.de>
8277         PR tree-optimization/86062
8278         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8279         component refs ontop
8280         of to be offsetted base.
8282 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8284         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8285         to be static and remove check on interrupt attribute name.
8287 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8289         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8290         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8292 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8294         PR target/79924
8295         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8296         second argument.
8297         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8298         Remove second argument, change how error is called.
8299         (aarch64_layout_arg): Remove second argument from
8300         aarch64_err_no_fpadvsimd call.
8301         (aarch64_init_cumulative_args): Ditto.
8302         (aarch64_gimplify_va_arg_expr): Ditto.
8303         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8305 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8307         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8308         (*simple_return_indirect_internal<mode>): Rename from
8309         simple_return_indirect_internal.  Use W mode iterator.
8310         (rstorssp): New expander.
8311         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8312         (clrssbsy): New expander.
8313         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8315 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8317         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8318         __typeof__.
8319         (cmse_check_pointed_object): Likewise.
8321 2018-06-05  Martin Liska  <mliska@suse.cz>
8323         PR gcov-profile/47618
8324         * doc/invoke.texi: Document how -fprofile-dir format
8325         is extended.
8327 2018-06-05  Richard Biener  <rguenther@suse.de>
8329         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8330         removal pretend DOM info isn't available so we do not update
8331         it and only remove edges, not dominated blocks.  Actually free
8332         DOM info in case we removed something.  Remove unreachable blocks.
8333         (mfb_keep_latches): Work with either DOM info or marked backedges.
8334         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8335         first.  Mark backedges if DOM info isn't available.
8336         (Re-)compute DOM info after cleanup_control_flow_pre.
8338 2018-06-05  Richard Biener  <rguenther@suse.de>
8340         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8341         (locus_discrim_hasher::hash): Adjust.
8342         (locus_discrim_hasher::equal): Likewise.
8343         (next_discriminator_for_locus): Work on line directly.
8344         (same_line_p): Pass in expanded locus1 as well.
8345         (assign_discriminators): Avoid redundant location expansions.
8347 2018-06-05  Richard Biener  <rguenther@suse.de>
8349         PR tree-optimization/86046
8350         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8351         if required after clearing TREE_ADDRESSABLE.
8353 2018-06-05  Richard Biener  <rguenther@suse.de>
8355         PR tree-optimization/86047
8356         * tree-ssa-loop.c (for_each_index): Glob handling of all
8357         decls and constants and really handle all of them.
8359 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8361         PR target/81497
8362         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8363         qualifier_void_pointer and qualifier_const_void_pointer.
8364         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8365         (arm_init_builtins): Handle the above.
8366         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8367         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8368         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8369         void intrinsics.
8371 2018-06-05  Martin Liska  <mliska@suse.cz>
8373         * auto-profile.c (read_autofdo_file): Do not use
8374         gcov_ctr_summary struct.
8375         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8376         * coverage.c (struct counts_entry): Likewise.
8377         (read_counts_file): Read just single summary entry.
8378         (get_coverage_counts): Use gcov_summary struct.
8379         * coverage.h (get_coverage_counts): Likewise.
8380         * gcov-dump.c (dump_working_sets): Likewise.
8381         (tag_summary): Dump just single summary.
8382         * gcov-io.c (gcov_write_summary): Write just histogram
8383         summary.
8384         (gcov_read_summary): Read just single summary.
8385         (compute_working_sets): Use gcov_summary struct.
8386         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8387         of GCOV_COUNTERS_SUMMABLE.
8388         (GCOV_COUNTERS_SUMMABLE): Remove.
8389         (GCOV_FIRST_VALUE_COUNTER): Replace with
8390         GCOV_COUNTER_V_INTERVAL.
8391         (struct gcov_ctr_summary): Remove.
8392         (struct gcov_summary): Directly use fields of former
8393         gcov_ctr_summary.
8394         (compute_working_sets): Use gcov_summary struct.
8395         * gcov.c (read_count_file): Do not use ctrs fields.
8396         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8397         struct.
8398         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8399         struct.
8400         * profile.c: Likewise.
8401         * profile.h: Likewise.
8403 2018-06-05  Martin Liska  <mliska@suse.cz>
8405         PR gcov-profile/84846
8406         * gcov.c (output_lines): Print working directory only
8407         in intermediate format.
8409 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8411         * config/s390/s390-builtin-types.def: Add void function type.
8412         * config/s390/s390-builtins.def: Use the function type for the
8413         tbeginc builtin.
8415 2018-06-04  Jim Wilson  <jimw@sifive.com>
8417         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8418         to int.
8419         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8420         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8421         handle EH_RETURN_DATA_REGNO registers properly.
8422         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8423         (riscv_expand_epilogue): Update comment.  Change argument name and
8424         type.  Update code to use new name and type.  Pass new args to
8425         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8426         EXCEPTION_RETURN.
8427         * config/riscv/riscv.md (NORMAL_RETURN): New.
8428         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8429         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8430         (eh_return): Call gen_eh_return_internal and emit barrier.
8431         (eh_return_internal): Call riscv_expand_epilogue.
8433 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8435         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8436         bit_insertion field and declare can_be_merged_into method.
8437         (merged_store_group::can_be_merged_into): New method.
8438         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8439         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8440         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8442 2018-06-04  Richard Biener  <rguenther@suse.de>
8444         PR tree-optimization/85955
8445         * builtins.c (fold_builtin_sincos): Convert pointers to
8446         destination to appropriate type before dereferencing.
8448 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8450         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8452 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8454         * expr.c (expand_expr_real_1): Force the operand into memory if
8455         its TYPE_MODE is BLKmode and if there is no integer mode for
8456         the number of bits being extracted.
8458 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8460         PR target/85832
8461         PR target/86036
8462         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8463         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8465 2018-06-04  Richard Biener  <rguenther@suse.de>
8467         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8468         (cleanup_tree_cfg_noloop): ... single caller.  Do
8469         start_recording_case_labels later.
8471 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8473         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8474         to _IMMINTRIN_H_INCLUDED.
8475         * config/i386/pconfigintrin.h: Ditto.
8476         * config/i386/waitpkgintrin.h: Ditto.
8477         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8478         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8479         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8480         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8481         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8482         waitpkgintrin.h and cldemoteintrin.h.
8484 2018-06-04  Richard Biener  <rguenther@suse.de>
8486         PR tree-optimization/86038
8487         * tracer.c (find_best_successor): Check probability for
8488         being initialized, bail out if not.
8490 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8492         PR target/86003
8493         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8494         of bits to ignore when comparing architectures.
8496 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8498         PR tree-optimization/69615
8499         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8500         maximum or minimum of the type, try to merge it also as if
8501         range1 is + [-, x - 1] or + [x + 1, -].
8503         PR c++/86025
8504         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8506 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8508         PR tree-optimization/86034
8509         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8510         the unsigned bitfield type in a bit insertion sequence if it does not
8511         have a larger precision than the bitfield size.
8512         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8514 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8516         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8518 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8520         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8521         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8522         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8523         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8525 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8527         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8528         Disable -fdelete-null-pointer-checks for ELF toolchain.
8530 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8531             Kito Cheng  <kito.cheng@gmail.com>
8533         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8534         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8535         (nds32*-*-*): Add glibc and uclibc conditions.
8536         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8537         (TARGET_EXCEPT_UNWIND_INFO): Define.
8538         * config/nds32/elf.h: New file.
8539         * config/nds32/linux.h: New file.
8540         * config/nds32/nds32-elf.opt: New file.
8541         * config/nds32/nds32-linux.opt: New file.
8542         * config/nds32/nds32-fp-as-gp.c
8543         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8544         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8545         TARGET_LINUX_ABI.
8546         (nds32_asm_file_end): Ditto.
8547         (nds32_print_operand): Ditto.
8548         (nds32_insert_attributes): Ditto.
8549         (nds32_init_libfuncs): New function.
8550         (TARGET_HAVE_TLS): Define.
8551         (TARGET_INIT_LIBFUNCS): Define.
8552         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8553         spec content.
8554         (TARGET_ELF): Apply different mcmodel setting.
8555         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8556         been migrated into elf.h and linux.h files.
8557         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8558         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8559         (mcmodel): The content has been migrated into nds32-elf.opt and
8560         nds32-linux.opt files.
8561         * config/nds32/t-elf: New file.
8562         * config/nds32/t-linux: New file.
8564 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8565             Shiva Chen  <shiva0217@gmail.com>
8567         * config/nds32/constants.md (unspec_volatile_element): Add
8568         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8569         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8570         optimization.
8571         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8572         (make_pass_nds32_fp_as_gp): Declare.
8573         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8574         optmization pass.
8575         (nds32_asm_function_end_prologue): Remove unused asm output.
8576         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8577         (nds32_asm_file_start): Output necessary fp_as_gp information.
8578         (nds32_option_override): Adjust register usage.
8579         (nds32_expand_prologue): Consider fp_as_gp situation.
8580         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8581         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8582         (epilogue): Ditto.
8583         (return): Ditto.
8584         (simple_return): Ditto.
8585         (omit_fp_begin): Output special directive for fp_as_gp.
8586         (omit_fp_end): Output special directive for fp_as_gp.
8587         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8588         mforbid-fp-as-gp): New options.
8590 2018-06-01  Mark Wielaard  <mark@klomp.org>
8592         * dwarf2out.c (dwarf2out_finish): Remove generation of
8593         DW_AT_loclists_base.
8595 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8597         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8598         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8599         (struct merged_store_group): Add bit_insertion field.
8600         (dump_char_array): Use standard hexadecimal format.
8601         (merged_store_group::merged_store_group): Set bit_insertion to false.
8602         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8603         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8604         also print the mask in the dump file.
8605         (pass_store_merging::gate): Minor tweak.
8606         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8607         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8608         stores with INTEGER_CST stores.
8609         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8610         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8611         and use it throughout.  Generate bit insertion sequences if need be.
8612         (pass_store_merging::process_store): Remove redundant condition.
8613         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8615 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8617         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8618         the 128-bit floating point types.  Fix function comment.
8620 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8622         * config/aarch64/aarch64-simd.md
8623         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8624         mnemonics.
8625         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8626         mnemonics.
8628 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8630         PR tree-optimization/85989
8631         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8632         variable.
8633         (backprop::intersect_uses): Check it when deciding whether this
8634         is a backedge reference.
8635         (backprop::process_block): Add each phi to m_visited_phis
8636         after visiting it, then clear it at the end.
8638 2018-06-01  Richard Biener  <rguenther@suse.de>
8640         * tree-vectorizer.h (vect_dr_stmt): New function.
8641         (vect_get_load_cost): Adjust.
8642         (vect_get_store_cost): Likewise.
8643         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8644         Use vect_dr_stmt instead of DR_SMTT.
8645         (vect_record_base_alignments): Likewise.
8646         (vect_calculate_target_alignment): Likewise.
8647         (vect_compute_data_ref_alignment): Likewise and make static.
8648         (vect_update_misalignment_for_peel): Likewise.
8649         (vect_verify_datarefs_alignment): Likewise.
8650         (vector_alignment_reachable_p): Likewise.
8651         (vect_get_data_access_cost): Likewise.  Pass down
8652         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8653         (vect_get_peeling_costs_all_drs): Likewise.
8654         (vect_peeling_hash_get_lowest_cost): Likewise.
8655         (vect_enhance_data_refs_alignment): Likewise.
8656         (vect_find_same_alignment_drs): Likewise.
8657         (vect_analyze_data_refs_alignment): Likewise.
8658         (vect_analyze_group_access_1): Likewise.
8659         (vect_analyze_group_access): Likewise.
8660         (vect_analyze_data_ref_access): Likewise.
8661         (vect_analyze_data_ref_accesses): Likewise.
8662         (vect_vfa_segment_size): Likewise.
8663         (vect_small_gap_p): Likewise.
8664         (vectorizable_with_step_bound_p): Likewise.
8665         (vect_prune_runtime_alias_test_list): Likewise.
8666         (vect_analyze_data_refs): Likewise.
8667         (vect_supportable_dr_alignment): Likewise.
8668         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8669         (vect_gen_prolog_loop_niters): Likewise.
8670         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8671         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8672         modify DR_STMT.
8673         (vect_recog_mask_conversion_pattern): Likewise.
8674         (vect_try_gather_scatter_pattern): Likewise.
8675         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8676         to vect_get_store_cost.
8677         (vect_get_store_cost): Get stmt_info instead of DR.
8678         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8679         (vect_get_load_cost): Get stmt_info instead of DR.
8681 2018-06-01  Richard Biener  <rguenther@suse.de>
8683         PR middle-end/86017
8684         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8685         vars wrapped in MEM_REFs.
8687 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8689         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8690         Fix subreg tests so that we only return a choice between
8691         GENERAL_REGS and FP_REGS if the original classes included both.
8693 2018-06-01  Richard Biener  <rguenther@suse.de>
8695         PR ipa/85960
8696         * tree-ssa-structalias.c (get_function_part_constraint):
8697         Handle NULL fi->decl.
8698         (find_func_aliases_for_call): Properly handle indirect
8699         fi from direct call.
8700         (find_func_clobbers): Likewise.
8701         (ipa_pta_execute): Likewise.
8702         (create_variable_info_for): For functions that are ifunc_resolver
8703         resolve to a varinfo that contains the result of the resolver call.
8704         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8705         aliases.
8707 2018-05-31  Michael Collison  <michael.collison@arm.com>
8709         * config/aarch64/aarch64.md:
8710         (*fix_to_zero_extenddfdi2): New pattern.
8711         * gcc.target/aarch64/fix_extend1.c: New testcase.
8713 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8715         PR middle-end/78809
8716         PR middle-end/83026
8717         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8718         and BUILT_IN_STRNCMP_EQ.
8719         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8720         BUILT_IN_STRNCMP_EQ.
8721         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8722         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8723         (gimple_fold_builtin): Likewise.
8724         * tree-ssa-strlen.c (compute_string_length): New function.
8725         (determine_min_obsize): New function.
8726         (handle_builtin_string_cmp): New function to handle calls to
8727         string compare functions.
8728         (strlen_optimize_stmt): Add handling to builtin string compare
8729         calls.
8730         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8731         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8732         * tree.c (build_common_builtin_nodes): Add new defines of
8733         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8735 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8737         PR target/85984
8738         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8739         functions with naked attribute.
8741 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8743         * config/i386/sse.md (avx_vec_concat<mode>):
8744         Substitute concat_tg_mode mode attribute with xtg_mode.
8745         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8746         (concat_tg_mode): Remove mode attribute.
8748 2018-05-31  Martin Sebor  <msebor@redhat.com>
8750         PR c/82063
8751         * calls.c (alloc_max_size): Correct a logic error/typo.
8752         Treat excessive arguments as infinite.  Warn for invalid arguments.
8753         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8755 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8757         PR target/85829
8758         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8759         and movx for Haswell.
8761 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8762             Cesar Philippidis  <cesar@codesourcery.com>
8764         PR middle-end/85879
8765         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8766         when emitting error on private/firstprivate reductions.
8767         * omp-low.c (lower_omp_target): Avoid reference-type processing
8768         on pointers for firstprivate clause.
8770 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8772         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8773         (st1x2): Likewise.
8774         (st1x3): Likewise.
8775         * config/aarch64/aarch64-simd.md
8776         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8777         (aarch64_ld1_x3_<mode>): Likewise
8778         (aarch64_st1x2<VALLDIF:mode>): Likewise
8779         (aarch64_st1_x2_<mode>): Likewise
8780         (aarch64_st1x3<VALLDIF:mode>): Likewise
8781         (aarch64_st1_x3_<mode>): Likewise
8782         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8783         (vld1_s8_x3): Likewise.
8784         (vld1_u16_x3): Likewise.
8785         (vld1_s16_x3): Likewise.
8786         (vld1_u32_x3): Likewise.
8787         (vld1_s32_x3): Likewise.
8788         (vld1_u64_x3): Likewise.
8789         (vld1_s64_x3): Likewise.
8790         (vld1_f16_x3): Likewise.
8791         (vld1_f32_x3): Likewise.
8792         (vld1_f64_x3): Likewise.
8793         (vld1_p8_x3): Likewise.
8794         (vld1_p16_x3): Likewise.
8795         (vld1_p64_x3): Likewise.
8796         (vld1q_u8_x3): Likewise.
8797         (vld1q_s8_x3): Likewise.
8798         (vld1q_u16_x3): Likewise.
8799         (vld1q_s16_x3): Likewise.
8800         (vld1q_u32_x3): Likewise.
8801         (vld1q_s32_x3): Likewise.
8802         (vld1q_u64_x3): Likewise.
8803         (vld1q_s64_x3): Likewise.
8804         (vld1q_f16_x3): Likewise.
8805         (vld1q_f32_x3): Likewise.
8806         (vld1q_f64_x3): Likewise.
8807         (vld1q_p8_x3): Likewise.
8808         (vld1q_p16_x3): Likewise.
8809         (vld1q_p64_x3): Likewise.
8810         (vst1_s64_x2): Likewise.
8811         (vst1_u64_x2): Likewise.
8812         (vst1_f64_x2): Likewise.
8813         (vst1_s8_x2): Likewise.
8814         (vst1_p8_x2): Likewise.
8815         (vst1_s16_x2): Likewise.
8816         (vst1_p16_x2): Likewise.
8817         (vst1_s32_x2): Likewise.
8818         (vst1_u8_x2): Likewise.
8819         (vst1_u16_x2): Likewise.
8820         (vst1_u32_x2): Likewise.
8821         (vst1_f16_x2): Likewise.
8822         (vst1_f32_x2): Likewise.
8823         (vst1_p64_x2): Likewise.
8824         (vst1q_s8_x2): Likewise.
8825         (vst1q_p8_x2): Likewise.
8826         (vst1q_s16_x2): Likewise.
8827         (vst1q_p16_x2): Likewise.
8828         (vst1q_s32_x2): Likewise.
8829         (vst1q_s64_x2): Likewise.
8830         (vst1q_u8_x2): Likewise.
8831         (vst1q_u16_x2): Likewise.
8832         (vst1q_u32_x2): Likewise.
8833         (vst1q_u64_x2): Likewise.
8834         (vst1q_f16_x2): Likewise.
8835         (vst1q_f32_x2): Likewise.
8836         (vst1q_f64_x2): Likewise.
8837         (vst1q_p64_x2): Likewise.
8838         (vst1_s64_x3): Likewise.
8839         (vst1_u64_x3): Likewise.
8840         (vst1_f64_x3): Likewise.
8841         (vst1_s8_x3): Likewise.
8842         (vst1_p8_x3): Likewise.
8843         (vst1_s16_x3): Likewise.
8844         (vst1_p16_x3): Likewise.
8845         (vst1_s32_x3): Likewise.
8846         (vst1_u8_x3): Likewise.
8847         (vst1_u16_x3): Likewise.
8848         (vst1_u32_x3): Likewise.
8849         (vst1_f16_x3): Likewise.
8850         (vst1_f32_x3): Likewise.
8851         (vst1_p64_x3): Likewise.
8852         (vst1q_s8_x3): Likewise.
8853         (vst1q_p8_x3): Likewise.
8854         (vst1q_s16_x3): Likewise.
8855         (vst1q_p16_x3): Likewise.
8856         (vst1q_s32_x3): Likewise.
8857         (vst1q_s64_x3): Likewise.
8858         (vst1q_u8_x3): Likewise.
8859         (vst1q_u16_x3): Likewise.
8860         (vst1q_u32_x3): Likewise.
8861         (vst1q_u64_x3): Likewise.
8862         (vst1q_f16_x3): Likewise.
8863         (vst1q_f32_x3): Likewise.
8864         (vst1q_f64_x3): Likewise.
8865         (vst1q_p64_x3): Likewise.
8867 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8869         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8870         user_label_prefix to name.
8872         * tree-core.h: Update comment about the format of NAME string
8873         passed to handler in attribute_spec.
8875         * config/msp430/msp430.md: Remove erroneous subreg expression from
8876         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8877         zero_extend{q,h}isi2.
8879 2018-05-30  Borislav Petkov  <bp@suse.de>
8881         * doc/extend.texi: Document some architecture specific
8882         constraints and sort entries.
8884 2018-05-30  Martin Sebor  <msebor@redhat.com>
8886         PR middle-end/85369
8887         * builtins.c (expand_builtin_stpcpy_1): New function.
8888         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8889         only if the former succeeds.
8891 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8893         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8894         in saphira.
8896 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8898         * doc/invoke.texi (-flinker-output): Document
8900 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8902         * passes.c (ipa_write_summaries): Only modify statements if body
8903         is in memory.
8904         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8905         incrementally linking.
8906         (ipa_passes): Likewise.
8907         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8908         pass down resolution info.
8909         * common.opt (flag_incremental_link): Update info.
8910         * gcc.c (plugin specs): Turn flinker-output=* to
8911         -plugin-opt=-linker-output-known
8912         * toplev.c (compile_file): Also cut compilation when doing incremental
8913         link.
8914         * flag-types. (enum lto_partition_model): Add
8915         LTO_LINKER_OUTPUT_NOLTOREL.
8916         (invoke.texi): Add -flinker-output docs.
8917         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8918         link same way as WPA; do not stream in dead initializers.
8920         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8921         darf2out_register_external_decl): Support incremental link.
8923 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8925         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8927 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8929         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8930         it down to simple_object_copy_lto_debug_sections.
8931         (run_gcc): Determine incremental LTO link time and configure
8932         lto1 into non-wpa mode, disable renaming of debug sections.
8934 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8936         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8937         descriptions of various incorrectly documented functions.
8939 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8941         Revert:
8942         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8943         address check not strict.
8945 2018-05-30  Richard Biener  <rguenther@suse.de>
8947         PR tree-optimization/85964
8948         * tracer.c (better_p): Drop initialized count check, we only
8949         call the function with initialized counts now.
8950         (find_best_successor): Do find a best edge if one
8951         has uninitialized count.
8952         (find_best_predecessor): Likewise.  Do BB frequency check only
8953         if count is initialized.
8955 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8957         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8958         (aarch64_ldrstr_offset_compare): New.
8959         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8960         load/store orderings.
8961         (aarch64_gen_adjusted_ldpstp): Likewise.
8963 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8965         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8966         Check for subset of GENERAL_REGS and FP_REGS.
8967         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8968         r=w alternative.
8970 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8972         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8973         and wi::to_poly_offset.  Add the current offset and then check
8974         whether the sum fits, rather than using an unchecked addition of
8975         a checked term.  Check for a shwi rather than a uhwi.
8976         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8977         (store_constructor): Use poly_int_tree_p.
8978         (expand_expr_real_1): Likewise.
8979         * function.c (assign_temp): Likewise.
8980         * fold-const.c (const_binop): Use poly_int_tree_p and
8981         wi::to_poly_offset.
8982         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8983         division.
8984         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8985         to_poly_offset for MEM offsets.
8986         * ipa-icf.c (sem_variable::equals): Likewise.
8987         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8988         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8989         wi::to_poly_offset for BIT_FIELD_REF offsets.
8990         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8991         wi::to_poly_offset.
8992         * var-tracking.c (emit_note_insn_var_location): Use
8993         tree_to_poly_uint64.
8995 2018-05-29  Jim Wilson  <jimw@sifive.com>
8997         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8999 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
9001         PR target/85950
9002         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
9003         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
9004         sequence.
9005         (sse4_1_round<mode>2): Use nonimmediate_operand
9006         for operand 1 predicate.
9008 2018-05-29  Martin Sebor  <msebor@redhat.com>
9009             Richard Biener  <rguenther@suse.de>
9011         PR testsuite/85888
9012         * calls.c (get_size_range): Call determine_value_range instead
9013         of get_value_range..
9014         * tree-vrp.h (determine_value_range): Declared new function.
9015         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
9017 2018-05-29  Richard Biener  <rguenther@suse.de>
9019         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
9020         sure to use non-pattern stmts for get_earlier_stmt arguments.
9021         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
9022         called on pattern stmts.
9023         (get_later_stmt): Likewise.
9025 2018-05-29  Martin Liska  <mliska@suse.cz>
9027         PR gcov-profile/85759
9028         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
9029         env variables.
9031 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
9033         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
9034         VEC_UNPACK_*_EXPR.
9035         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
9036         VEC_PACK_*_EXPR.
9038         PR target/85918
9039         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9040         VEC_PACK_FLOAT_EXPR): New tree codes.
9041         * tree-pretty-print.c (op_code_prio): Handle
9042         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9043         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9044         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9045         * tree-inline.c (estimate_operator_cost): Likewise.
9046         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
9047         * fold-const.c (const_binop): Likewise.
9048         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
9049         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
9050         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
9051         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
9052         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
9053         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
9054         * expr.c (expand_expr_real_2): Likewise.
9055         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
9056         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
9057         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
9058         optabs.
9059         * optabs.c (expand_widen_pattern_expr): For
9060         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
9061         sign from result type rather than operand's type.
9062         (expand_binop_directly): For vec_packu_float_optab and
9063         vec_packs_float_optab allow result type to be different from operand's
9064         type.
9065         * optabs-tree.c (optab_for_tree_code): Handle
9066         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9067         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
9068         * tree-vect-generic.c (expand_vector_operations_1):  Handle
9069         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
9070         VEC_PACK_FLOAT_EXPR.
9071         * tree-vect-stmts.c (supportable_widening_operation): Handle
9072         FIX_TRUNC_EXPR.
9073         (supportable_narrowing_operation): Handle FLOAT_EXPR.
9074         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
9075         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
9076         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
9077         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
9078         mode attributes.
9079         (vec_pack<floatprefix>_float_<mode>): New expander.
9080         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
9081         attributes.
9082         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
9083         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
9084         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
9085         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
9086         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
9087         Document.
9088         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
9089         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
9090         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
9091         VEC_PACK_FLOAT_EXPR): Document.
9093 2018-05-29  Richard Biener  <rguenther@suse.de>
9095         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
9096         member.
9097         (stmt_vec_info_vec): Make pointer.
9098         (init_stmt_vec_info_vec): Remove.
9099         (free_stmt_vec_info_vec): Likewise.
9100         (set_stmt_vec_info_vec): New function.
9101         (free_stmt_vec_infos): Likewise.
9102         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
9103         (set_vinfo_for_stmt): Likewise.
9104         (get_earlier_stmt): Likewise.
9105         (get_later_stmt): Likewise.
9106         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
9107         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
9108         (vec_info::~vec_info): Free stmt_vec_infos.
9109         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
9110         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
9111         (pass_slp_vectorize::execute): Likewise.
9112         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
9113         (free_stmt_vec_info_vec): Likewise.
9114         (set_stmt_vec_info_vec): New function.
9115         (free_stmt_vec_infos): Likewise.
9116         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
9117         the global stmt_vec_info_vec.
9118         * tree-parloops.c (gather_scalar_reductions): Use
9119         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
9120         vector.
9122 2018-05-29  Richard Biener  <rguenther@suse.de>
9124         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
9126 2018-05-29  Martin Liska  <mliska@suse.cz>
9127             David Malcolm  <dmalcolm@redhat.com>
9129         * vec.c (test_reverse): New.
9130         (vec_c_tests): Add new test.
9131         * vec.h (vl_ptr>::reverse): New function.
9133 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
9135         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
9137         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
9138         and later.
9140 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9142         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
9144 2018-05-28  Richard Biener  <rguenther@suse.de>
9146         PR tree-optimization/85933
9147         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9148         look at stmts marked as vectorizable.
9150 2018-05-28  Richard Biener  <rguenther@suse.de>
9152         PR tree-optimization/85934
9153         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9154         vector boolean check before scalar optimization.
9156 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9158         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9159         for armv5te.
9161 2018-05-28  Mark Wielaard  <mark@klomp.org>
9163         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9164         if it is an expression containing a minus sign.
9166 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9168         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9170 2018-05-27  Paul Koning  <ni1d@arrl.net>
9172         * config/pdp11/pdp11.md (truncsihi2): Remove.
9174 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9175             Chung-Ju Wu  <jasonwucj@gmail.com>
9177         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9178         implementation.
9179         (unaligned_store_dw): Ditto.
9180         * config/nds32/nds32-memory-manipulation.c
9181         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9182         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9183         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9184         (emit_setmem_word_loop): Rename to ...
9185         (emit_setmem_doubleword_loop): ... this.
9186         (nds32_gen_dup_4_byte_to_word_value): New function.
9187         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9188         (nds32_expand_setmem_loop): Refine implementation.
9189         (nds32_expand_setmem_loop_v3m): Ditto.
9190         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9191         pattern.
9193 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9195         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9197 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9199         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9200         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9201         machine->attr_no_prologue_p.
9202         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9203         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9204         (nds32_expand_epilogue): Consider attr_naked_p.
9205         (nds32_expand_epilogue_v3pop): Likewise.
9206         (nds32_can_use_return_insn): Likewise.
9207         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9208         attr_no_prologue_p fields.
9209         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9211 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9213         PR target/85918
9214         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9215         attributes.
9216         * config/i386/sse.md
9217         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9218         Rename to ...
9219         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9220         ... this.
9221         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9222         Rename to ...
9223         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9224         ... this.
9225         (*<floatsuffix>floatv2div2sf2): Rename to ...
9226         (*float<floatunssuffix>v2div2sf2): ... this.
9227         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9228         (float<floatunssuffix>v2div2sf2_mask): ... this.
9229         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9230         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9231         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9232         to ...
9233         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9234         ... this.
9235         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9236         Rename to ...
9237         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9238         ... this.
9239         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9240         Rename to ...
9241         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9242         ... this.
9243         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9244         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9245         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9246         gen_ufix_truncv8dfv8si2.
9247         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9248         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9249         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9250         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9251         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9252         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9253         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9254         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9256 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9258         PR target/85900
9259         PR target/85345
9260         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9262 2018-05-25  Jim Wilson  <jimw@sifive.com>
9264         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9265         * config/riscv/riscv.c (struct machine_function): Add
9266         interrupt_handler_p and attribute_checked_p fields.
9267         (riscv_attribute_table): Add interrupt.
9268         (riscv_interrupt_type_p): New.
9269         (riscv_save_reg_p): Save extra regs for interrupt handler.
9270         (riscv_use_save_libcall): Return false  for interrupt handler.
9271         (riscv_first_stack_step): Add forward declaration.
9272         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9273         for interrupt handler with large frame.  Use it for saved reg list.
9274         (riscv_expand_prologue): Move flag_stack_usage_info support to
9275         eliminate duplication.
9276         (riscv_expand_epilogue): Generate mret for interrupt handler.
9277         (riscv_epilogue_uses): New.
9278         (riscv_can_use_return_insn): Return false for interrupt handler.
9279         (riscv_function_ok_for_sibcall): Likewise.
9280         (riscv_set_current_function): Add interrupt handler support.
9281         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9282         * config/riscv/riscv.md (UNSPECV_MRET): New.
9283         (GP_REGNUM): New.
9284         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9285         (riscv_mret): New.
9286         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9288 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9290         PR tree-optimization/85712
9291         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9292         this candidate has already been replaced in-situ by a copy.
9294 2018-05-25  Jason Merrill  <jason@redhat.com>
9296         PR c++/80485 - inline function non-zero address.
9297         * symtab.c (nonzero_address): Check DECL_COMDAT.
9299 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9301         PR target/83628
9302         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9303         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9304         extension of SImode operation.  Use const123_operand predicate.
9305         (*saddsi_1): Remove.
9306         (*saddl_se_1): Ditto.
9307         (*ssubsi_1): Ditto.
9308         (*ssubl_se_1): Ditto.
9309         * config/alpha/predicates.md (const123_operand): New predicate.
9310         * config/alpha/constraints.md (P): Use IN_RANGE.
9312 2018-05-25  Richard Biener  <rguenther@suse.de>
9314         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9315         defaulted to true.
9316         (ref_maybe_used_by_stmt_p): Likewise.
9317         (stmt_may_clobber_ref_p): Likewise.
9318         (stmt_may_clobber_ref_p_1): Likewise.
9319         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9320         and pass it along.
9321         (ref_maybe_used_by_stmt_p): Likewise.
9322         (stmt_may_clobber_ref_p): Likewise.
9323         (stmt_may_clobber_ref_p_1): Likewise.
9324         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9325         the alias oracle to disambiguate DRs with stmts DR analysis
9326         couldn't handle.
9327         (vect_analyze_data_refs): Do not give up on not analyzable
9328         DRs for BB vectorization.  Remove code truncating the dataref
9329         vector.
9331 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9333         PR target/85832
9334         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9335         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9336         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9338 2018-05-25  Richard Biener  <rguenther@suse.de>
9340         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9341         function, combining stmt data ref gathering and fatal analysis
9342         parts.
9343         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9344         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9345         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9346         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9347         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9349 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9351         PR tree-optimization/85720
9352         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9353         SCC if all partitions are builtins.
9354         (version_loop_by_alias_check): New parameter.  Generate cancelable
9355         runtime alias check if all partitions are builtins.
9356         (distribute_loop): Update call to above function.
9358 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9360         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9361         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9362         (parm_default_def_partition_arg): Ditto.
9363         (set_parm_default_def_partition): Ditto.
9364         (get_parm_default_def_partitions): Ditto and make it static.
9365         (get_undefined_value_partitions): Ditto and make it static.
9366         (remove_ssa_form): Refactor call to init_var_map here.
9367         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9368         computation for loop region.
9369         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9370         (register_default_def): Delete.
9371         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9372         (parm_default_def_partition_arg): Ditto.
9373         (set_parm_default_def_partition): Ditto.
9374         (get_parm_default_def_partitions): Ditto and make it static.
9375         (get_undefined_value_partitions): Ditto and make it static.
9376         (coalesce_with_default, coalesce_with_default): Update comment.
9377         (create_coalesce_list_for_region): New func factored out from
9378         create_outofssa_var_map.
9379         (populate_coalesce_list_for_outofssa): New func factored out from
9380         create_outofssa_var_map and coalesce_ssa_name.
9381         (create_outofssa_var_map): Delete.
9382         (coalesce_ssa_name): Refactor to support live range computation.
9383         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9384         (get_parm_default_def_partitions): Delete.
9385         (get_undefined_value_partitions): Ditto.
9386         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9387         computation for loop region.
9388         (new_tree_live_info, loe_visit_block): Ditto.
9389         (live_worklist, set_var_live_on_entry): Ditto.
9390         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9391         * tree-ssa-live.h (struct _var_map): New fields.
9392         (init_var_map): Change decl.
9393         (region_contains_p): New.
9395 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9397         * tree-ssa-live.h (live_merge_and_clear): Delete.
9399 2018-05-25  Richard Biener  <rguenther@suse.de>
9401         PR c++/85912
9402         * tree-dump.c (dequeue_and_dump): Remove access to removed
9403         operand 2 of a SWITCH_EXPR.
9405 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9407         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9408         multiplication and division.
9409         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9410         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9411         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9412         (cond_udiv_optab, cond_umod_optab): New optabs.
9413         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9414         (IFN_COND_RDIV): New internal functions.
9415         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9416         TRUNC_MOD_EXPR and RDIV_EXPR.
9417         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9418         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9419         New unspecs.
9420         (SVE_INT_BINARY): Include mult.
9421         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9422         (optab, sve_int_op): Handle mult.
9423         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9424         UNSPEC_COND_DIV.
9425         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9426         for SVE_INT_BINARY_SD.
9428 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9430         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9431         (optab, sve_int_op): Handle div and udiv.
9432         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9433         for SVE_INT_BINARY_SD.
9434         (*<optab><mode>3): New insn for the same.
9436 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9438         * tree-vect-patterns.c: Include predict.h.
9439         (vect_recog_divmod_pattern): Restrict check for division support
9440         to when optimizing for size.
9442 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9444         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9445         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9446         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9447         (gimple_match_op::set_op): Likewise.
9448         (gimple_resimplify4): Declare.
9449         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9450         (expr::gen_transform): Likewise.
9451         (decision_tree::gen): Generate a simplification routine for 4 operands.
9452         * gimple-match-head.c (gimple_simplify): Add an overload for
9453         4 operands.  In the top-level function, handle up to 4 call
9454         arguments and call gimple_resimplify4.
9455         (gimple_resimplify4): New function.
9456         (build_call_internal): Pass a fourth operand.
9457         (maybe_push_to_seq): Likewise.
9458         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9459         Fold VEC_COND_EXPRs of an operation and a default value into
9460         an IFN_COND_* function if possible.
9461         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9462         New unspecs.
9463         (SVE_COND_FP_BINARY): Include them.
9464         (optab, sve_fp_op): Handle them.
9465         (SVE_INT_BINARY_REV): New code iterator.
9466         (SVE_COND_FP_BINARY_REV): New int iterator.
9467         (commutative): New int attribute.
9468         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9469         Declare.
9470         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9471         function.
9472         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9473         (*cond_<optab><mode>): New patterns for reversed operands.
9475 2018-05-25  Richard Biener  <rguenther@suse.de>
9477         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9478         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9479         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9480         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9481         * tree-vect-data-refs.c (everywhere): Adjust users.
9482         * tree-vect-loop.c (everywhere): Likewise.
9483         * tree-vect-slp.c (everywhere): Likewise.
9484         * tree-vect-stmts.c (everywhere): Likewise.
9485         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9487 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9489         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9490         Rename to...
9491         (gcc_cv_as_section_exclude): ... this.
9492         Try Solaris as #exclude syntax.
9493         * configure: Regenerate.
9494         * config.in: Regenerate.
9495         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9496         SECTION_EXCLUDE.
9497         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9498         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9500         * varasm.c (default_elf_asm_named_section): Don't check if
9501         HAVE_GAS_SECTION_EXCLUDE is defined.
9503 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9505         * doc/md.texi: Update the documentation of the cond_* optabs
9506         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9507         Describe the scalar case too.
9508         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9509         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9510         instead of 2.
9511         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9512         (get_conditional_internal_fn): Update comment.
9513         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9514         accumulator value as a final argument to conditional functions.
9515         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9516         a define_expand and add an "else" operand.  Assert for now that
9517         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9518         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9519         (*cond_<optab><mode>): New patterns.
9520         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9521         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9522         (UNSPEC_COND_EOR): Delete.
9523         (optab): Remove associated mappings.
9524         (SVE_INT_BINARY): New code iterator.
9525         (sve_int_op): Remove int attribute and add "minus" to the code
9526         attribute.
9527         (SVE_COND_INT_OP): Delete.
9528         (SVE_COND_FP_OP): Rename to...
9529         (SVE_COND_FP_BINARY): ...this.
9531 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9533         * optabs.c (can_reuse_operands_p): New function.
9534         (maybe_legitimize_operands): Try to reuse the results for
9535         earlier operands.
9537 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9539         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9540         Add {q} suffix to insn mnemonic.
9542 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9544         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9545         (msp430_warn_func_return): New.
9547 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9549         * fold-const.c (tree_nonzero_bits): New function.
9550         * fold-const.h (tree_nonzero_bits): Likewise.
9551         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9552         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9554 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9556         PR target/85900
9557         PR target/85345
9558         * varasm.c (assemble_alias): Check ifunc_resolver only on
9559         FUNCTION_DECL.
9561 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9563         PR target/85903
9564         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9565         when memory input operand is handled.
9567 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9569         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9570         global.
9571         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9573 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9575         * match.pd: Delay FMA folds until after vectorization.
9577 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9579         PR target/83009
9580         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9581         address check not strict.
9583 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9585         * gimple-match.h (gimple_match_op): New class.
9586         (mprts_hook): Replace parameters with a gimple_match_op *.
9587         (maybe_build_generic_op): Likewise.
9588         (gimple_simplified_result_is_gimple_val): Replace parameters with
9589         a const gimple_match_op *.
9590         (gimple_simplify): Replace code_helper * and tree * parameters with
9591         a gimple_match_op * parameter.
9592         (gimple_resimplify1): Replace code_helper *, tree and tree *
9593         parameters with a gimple_match_op * parameter.
9594         (gimple_resimplify2): Likewise.
9595         (gimple_resimplify3): Likewise.
9596         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9597         parameters with a gimple_match_op * parameter.
9598         * gimple-match-head.c (gimple_simplify): Change prototypes of
9599         auto-generated functions to take a gimple_match_op * instead of
9600         separate code_helper * and tree * parameters.  Make the same
9601         change in the top-level overload and update calls to the
9602         gimple_resimplify routines.  Update calls to the auto-generated
9603         functions and to maybe_push_res_to_seq in the publicly-facing
9604         operation-specific gimple_simplify overloads.
9605         (gimple_match_op::MAX_NUM_OPS): Define.
9606         (gimple_resimplify1): Replace rcode and ops with a single res_op
9607         parameter.  Update call to gimple_simplify.
9608         (gimple_resimplify2): Likewise.
9609         (gimple_resimplify3): Likewise.
9610         (mprts_hook): Replace parameters with a gimple_match_op *.
9611         (maybe_build_generic_op): Likewise.
9612         (build_call_internal): Replace type, nargs and ops with
9613         a gimple_match_op *.
9614         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9615         with a single gimple_match_op *.  Update calls to mprts_hook,
9616         build_call_internal and gimple_simplified_result_is_gimple_val.
9617         Factor out code that is common to the tree_code and combined_fn cases.
9618         * genmatch.c (expr::gen_transform): Replace tem_code and
9619         tem_ops with a gimple_match_op called tem_op.  Update calls
9620         to the gimple_resimplify functions and maybe_push_res_to_seq.
9621         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9622         res_ops.  Update call to the gimple_resimplify functions.
9623         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9624         (decision_tree::gen): Make the functions take a gimple_match_op *
9625         called res_op instead of separate res_code and res_ops parameters.
9626         Update call accordingly.
9627         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9628         and ops with a single res_op parameter.  Update calls to
9629         maybe_build_generic_op and maybe_push_res_to_seq.
9630         (fold_stmt_1): Update calls to gimple_simplify and
9631         replace_stmt_with_simplification.
9632         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9633         and gimple_simplified_result_is_gimple_val.
9634         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9635         gimple_simplify.
9636         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9637         with a gimple_match_op *.
9638         (vn_nary_build_or_lookup): Likewise.  Update call to
9639         vn_nary_build_or_lookup_1.
9640         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9641         gimple_match_op *.  Update calls to the gimple_resimplify routines
9642         and to gimple_simplified_result_is_gimple_val.
9643         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9644         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9645         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9646         (visit_nary_op): Likewise.
9647         (visit_reference_op_load): Likewise.
9649 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9651         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9652         modifier for printing the step amount.
9654 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9656         PR target/78849
9657         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9658         types.
9660 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9662         * doc/sourcebuild.texi (Endianness): New subsubsection.
9664 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9666         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9667         <prefetch_dynamic_strides>: New const bool field.
9668         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9669         prefetch_dynamic_strides.
9670         (exynosm1_prefetch_tune): Likewise.
9671         (thunderxt88_prefetch_tune): Likewise.
9672         (thunderx_prefetch_tune): Likewise.
9673         (thunderx2t99_prefetch_tune): Likewise.
9674         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9675         false.
9676         (aarch64_override_options_internal): Update to set
9677         PARAM_PREFETCH_DYNAMIC_STRIDES.
9678         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9679         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9680         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9681         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9682         prefetch-dynamic-strides setting.
9684 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9686         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9687         <minimum_stride>: New const int field.
9688         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9689         minimum_stride field defaulting to -1.
9690         (exynosm1_prefetch_tune): Likewise.
9691         (thunderxt88_prefetch_tune): Likewise.
9692         (thunderx_prefetch_tune): Likewise.
9693         (thunderx2t99_prefetch_tune): Likewise.
9694         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9695         <default_opt_level>: Set to 3.
9696         (aarch64_override_options_internal): Update to set
9697         PARAM_PREFETCH_MINIMUM_STRIDE.
9698         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9699         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9700         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9701         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9702         stride is constant and is below the minimum stride threshold.
9704 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9706         * config/arm/arm-cpus.in (mode26): Delete.
9707         (armv4): Delete mode26 reference.
9708         * config/arm/arm.c (arm_configure_build_target): Delete use of
9709         isa_bit_mode26.
9711 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9713         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9714         New insn pattern.
9715         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9716         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9717         for non-SSE modes.
9718         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9719         (floatunsdidf2): Ditto.
9721 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9723         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9724         (fixuns_trunc<mode>si2_avx512f): Ditto.
9725         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9726         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9727         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9729 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9731         PR rtl-optimization/79985
9732         * df-scan.c (df_insn_refs_collect): Remove special case for
9733         global registers and asm statements.
9735 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9737         * extend.texi (Global Register Variables): Rewrite the bullet list.
9738         Note that the register is available for allocation. Note that access
9739         via inline asm must use constraints. Add note about async-signal
9740         handlers. Remove paragraph about automagic register selection.
9742 2018-05-23  Richard Biener  <rguenther@suse.de>
9744         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9745         of fixed offset from memset VN.
9747 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9749         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9750         first_interp field.
9751         (alloc_cand_and_find_basis): Initialize first_interp field.
9752         (slsr_process_mul): Modify first_interp field.
9753         (slsr_process_add): Likewise.
9754         (slsr_process_cast): Modify first_interp field for each new
9755         interpretation.
9756         (slsr_process_copy): Likewise.
9757         (dump_candidate): Dump first_interp field.
9758         (replace_mult_candidate): Process all interpretations, not just
9759         subsequent ones.
9760         (replace_rhs_if_not_dup): Likewise.
9761         (replace_one_candidate): Likewise.
9763 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9765         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9766         Add new boolean.
9767         (aarch64_needs_frame_chain): New function.
9768         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9770 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9772         PR target/84882
9773         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9774         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9775         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9776         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9777         as true for strict-align.
9778         (aarch64_can_inline_p): Perform checks even when callee has no
9779         attributes to check for strict alignment.
9780         * doc/extend.texi (AArch64 Function Attributes): Document
9781         no-strict-align.
9782         * doc/invoke.texi: (AArch64 Options): Likewise.
9784 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9786         PR tree-optimization/85853
9787         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9788         the handling of the root of the node to...
9789         (vect_slp_analyze_node_operations_1): ...this new function,
9790         and run the whole thing with the child nodes' def types
9791         set according to their SLP node's def type.
9793 2018-05-23  Richard Biener  <rguenther@suse.de>
9795         PR middle-end/85874
9796         * tree-data-ref.c (create_runtime_alias_checks): Defer
9797         and ignore overflow warnings.
9799 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9801         PR tree-optimization/85822
9802         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9803         constants.
9805 2018-05-23  Richard Biener  <rguenther@suse.de>
9807         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9808         memset constants via native_interpret_expr.
9810 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9812         PR target/85345
9813         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9814         attribute.
9815         (cgraph_node::create_alias): Likewise.
9816         (cgraph_node::get_availability): Check ifunc_resolver instead
9817         of looking up ifunc attribute.
9818         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9819         * varasm.c (do_assemble_alias): Likewise.
9820         (assemble_alias): Likewise.
9821         (default_binds_local_p_3): Likewise.
9822         * cgraph.h (cgraph_node): Add ifunc_resolver.
9823         (cgraph_node::only_called_directly_or_aliased_p): Return false
9824         for IFUNC resolver.
9825         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9826         attribute.
9827         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9828         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9829         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9830         instead of looking up ifunc attribute.
9832 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9834         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9836 2018-05-22  Martin Sebor  <msebor@redhat.com>
9838         PR middle-end/85359
9839         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9840         only when expasion succeeds.
9841         (expand_builtin_strcmp): Same.
9842         (expand_builtin_strncmp): Same.
9844 2018-05-22  Martin Sebor  <msebor@redhat.com>
9846         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9848 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9849             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9851         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9852         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9853         code.
9854         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9855         Add check for legitimate_address.
9856         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9857         (aarch64_swap_ldrstr_operands): New.
9858         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9859         Define prototype.
9861 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9862             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9864         * config/aarch64/aarch64.md: New patterns to generate stp
9865         and ldp.
9866         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9867         single words and double words.
9868         (load_pair_sw, load_pair_dw): Likewise.
9869         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9870         Delete.
9871         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9872         Delete.
9873         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9874         for different mode ldpstp and add peephole for merged zero stores.
9875         Likewise for loads.
9876         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9877         Add size check.
9878         (aarch64_gen_store_pair): Rename calls to match new patterns.
9879         (aarch64_gen_load_pair): Rename calls to match new patterns.
9880         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9881         (load_pair<DREG:mode><DREG2:mode>): ... This.
9882         (store_pair<mode>): Rename to...
9883         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9884         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9885         New mode iterators.
9886         (V_INT_EQUIV): Handle SImode.
9887         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9888         New predicate.
9890 2018-05-22  Martin Sebor  <msebor@redhat.com>
9892         PR c/85623
9893         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9894         or ajust the presumed bound on an operation to avoid unnecessary
9895         warnings.
9897 2018-05-22  Martin Sebor  <msebor@redhat.com>
9899         PR tree-optimization/85826
9900         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9901         assuming that a DECL necesarily has a constant size.
9903 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9905         PR middle-end/85862
9906         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9908 2018-05-22  Richard Biener  <rguenther@suse.de>
9910         PR tree-optimization/85834
9911         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9912         non-constant and non-zero memset arguments.
9914 2018-05-22  Martin Liska  <mliska@suse.cz>
9916         PR ipa/85607
9917         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9919 2018-05-22  Richard Biener  <rguenther@suse.de>
9921         PR tree-optimization/85863
9922         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9923         comparisons when vectype is specified.
9924         (vectorizable_condition): Do not specify vectype for
9925         vect_is_simple_cond when SLP vectorizing.
9927 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9929         PR target/85657
9930         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9931         define __ibm128 as long double.
9932         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9933         as a distinct type when IEEE 128-bit support is enabled.
9934         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9935         128-bit types to use the correct functions.
9936         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9937         convert between 128-bit floating point types that have different
9938         modes but the same representation, instead of using gen_lowpart to
9939         makean alias.
9940         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9941         KFmode.
9942         (IFKF_reg): New attributes to give the register constraints for
9943         IFmode and KFmode.
9944         (extend<mode>tf2_internal): New insns to mark an explicit
9945         conversion between 128-bit floating point types that have a
9946         different mode but share the same representation.
9948 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9950         PR tree-optimization/85814
9951         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9952         a null return from get_strinfo when unsharing the next
9953         strinfo in the chain.
9955 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9957         PR gcc/84923
9958         * varasm.c (weak_finish): Clean up weak_decls.
9960 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9962         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9963         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9964         UNSPEC_UADALP values.
9965         * config/aarch64/iterators.md (ABAL): New int iterator.
9966         (ABDL2): Likewise.
9967         (ADALP): Likewise.
9968         (sur): Add mappings for the above.
9969         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9970         New define_insn.
9971         (aarch64_<sur>abal<mode>_4): Likewise.
9972         (aarch64_<sur>adalp<mode>_3): Likewise.
9973         (<sur>sadv16qi): New define_expand.
9975 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9977         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9978         (*movdf_internal): Ditto.
9979         (*rcpsf2_sse): Ditto.
9980         (*rsqrtsf2_sse): Ditto.
9981         (*sqrt<mode>2_sse): Ditto.
9983 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9985         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9986         eor3q<mode>4.
9987         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9988         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9989         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9990         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9991         vbcaxq_s64): New.
9992         * config/aarch64/arm_neon.h: Likewise.
9993         * config/aarch64/iterators.md (VQ_I): New.
9995 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9997         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9998         arc*-*-linux*.
9999         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
10000         MULTILIB_DIRNAMES
10002 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10004         * config/nds32/constraints.md (S): New constraint.
10005         * config/nds32/nds32.md (call_internal): Use constraint S.
10006         (call_value_internal): Likewise.
10007         (sibcall_internal): Likewise.
10008         (sibcall_value_internal): Likewise.
10010 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10011             Chung-Ju Wu  <jasonwucj@gmail.com>
10013         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
10014         into consideration.
10016 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
10017             Chung-Ju Wu  <jasonwucj@gmail.com>
10019         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
10020         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
10021         (nds32_rtx_costs_impl): Simplify.
10022         (nds32_address_cost_impl): Simplify.
10023         (nds32_init_rtx_costs): New function.
10024         (nds32_rtx_costs_speed_prefer): Likewise.
10025         (nds32_rtx_costs_size_prefer): Likewise.
10026         (nds32_address_cost_speed_prefer): Likewise.
10027         (nds32_address_cost_speed_fwprop): Likewise.
10028         (nds32_address_cost_size_prefer): Likewise.
10029         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
10030         * config/nds32/nds32.c (nds32_option_override): Use
10031         nds32_init_rtx_costs function.
10033 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
10035         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
10036         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
10037         (TARGET_PIPELINE_N8): Likewise.
10038         (TARGET_PIPELINE_N10): Likewise.
10039         (TARGET_PIPELINE_N13): Likewise.
10040         (TARGET_PIPELINE_GRAYWOLF): Likewise.
10042 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
10044         * config/nds32/nds32-fpu.md: Update copyright year.
10046 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10048         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
10050 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10052         * config/nds32/nds32.c
10053         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
10054         * config/nds32/nds32.opt (minline-asm-r15): New option.
10056 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10058         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
10059         MASK_HW_ABS.
10060         * config/nds32/nds32.md (abssi2): New pattern.
10062 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
10064         * config/i386/i386.md (rex64namesuffix): New mode attribute.
10065         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
10066         Merge insn pattern from sse_cvtsi2ss<round_name> and
10067         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
10068         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
10069         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
10070         using SWI48 mode iterator.
10071         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
10072         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
10073         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
10074         pattern from sse_cvttss2si<round_saeonly_name>
10075         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
10076         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
10077         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
10078         using SWI48 mode iterator.
10079         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
10080         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
10081         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
10082         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
10083         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
10084         using SWI48 mode iterator.
10085         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
10086         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
10087         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
10088         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
10089         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
10090         SWI48 mode iterator.
10091         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
10092         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
10093         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
10094         pattern from sse_cvttsd2si<round_saeonly_name>
10095         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
10097 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10099         * config/nds32/nds32-md-auxiliary.c
10100         (nds32_valid_smw_lwm_base_p): Refine.
10101         (nds32_output_smw_single_word): Refine.
10102         (nds32_output_smw_double_word): New.
10103         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
10105 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10107         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
10108         (nds32_output_stack_pop): Refine.
10109         (nds32_expand_unaligned_load): Refine.
10110         (nds32_expand_unaligned_store): Refine.
10112 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10113             Chung-Ju Wu  <jasonwucj@gmail.com>
10115         * config/nds32/constants.md: Add TP_REGNUM constant.
10116         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
10117         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
10118         UNSPEC_ADD32.
10119         * config/nds32/nds32-doubleword.md: Consider flag_pic.
10120         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
10121         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
10122         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
10123         and PIC code generation.
10124         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
10125         code generation.
10126         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
10127         optimization.
10128         * config/nds32/nds32.md: Support TLS and PIC.
10129         * config/nds32/nds32.c: Support TLS and PIC.
10130         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
10131         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
10132         predicate.
10134 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
10136         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
10137         mode with E_ prefix.
10139 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
10140             Chung-Ju Wu  <jasonwucj@gmail.com>
10142         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
10143         * config/nds32/nds32-md-auxiliary.c
10144         (symbolic_reference_mentioned_p): New.
10145         (nds32_legitimize_ict_address): New.
10146         (nds32_expand_ict_move): New.
10147         (nds32_indirect_call_referenced_p): New.
10148         (nds32_symbol_binds_local_p): Delete.
10149         (nds32_long_call_p): Modify.
10150         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10151         * config/nds32/nds32-protos.h
10152         (symbolic_reference_mentioned_p): Declare.
10153         (nds32_legitimize_ict_address): Declare.
10154         (nds32_expand_ict_move): Declare.
10155         (nds32_indirect_call_referenced_p): Declare.
10156         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10157         (nds32_relax_group): Use nds32_ict_const_p as condition.
10158         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10159         (nds32_asm_file_start): Output ict_model directive in asm code.
10160         (nds32_legitimate_address_p): Consider indirect call.
10161         (nds32_print_operand): Consider indirect call.
10162         (nds32_print_operand_address): Consider indirect call.
10163         (nds32_insert_attributes): Handle "indirect_call" attribute.
10164         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10165         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10166         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10167         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10168         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10169         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10170         (TARGET_ICT_MODEL_SMALL): Define.
10171         (TARGET_ICT_MODEL_LARGE): Define.
10172         * config/nds32/nds32.md (movsi): Consider ict model.
10173         (call, call_value): Consider ict model.
10174         (sibcall, sibcall_value): Consider ict model.
10175         * config/nds32/nds32.opt (mict-model): New option.
10176         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10177         model.
10179 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10180             Monk Chiang  <sh.chiang04@gmail.com>
10181             Jim Wilson <jimw@sifive.com>
10183         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10184         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10185         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10186         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10187         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10188         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10189         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10190         compute save_libcall_adjustment properly.
10191         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10192         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10193         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10194         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10195         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10196         (ABI_SPEC): Handle mabi=ilp32e.
10197         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10198         (RVE): Add RVE mask.
10199         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10200         <-march>: Add rv32e as an example.
10202 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10204         PR c++/82899
10205         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10206         (intra_create_variable_infos): Handle C++ constructors.
10208 2018-05-18  Martin Liska  <mliska@suse.cz>
10210         * passes.def: Remove a redundant pass.
10212 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10214         PR bootstrap/85838
10215         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10217 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10219         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10220         (ARMv4): Update.
10221         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10222         (ARMv6m): Update.
10223         (armv2, armv2a, armv3, armv3m): Delete architectures.
10224         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10225         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10226         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10227         Delete cpus.
10228         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10229         (*mulsidi3adddi): Likewise.
10230         (mulsidi3): Likewise.
10231         (*mulsidi3_nov6): Likewise.
10232         (umulsidi3): Likewise.
10233         (umulsidi3_nov6): Likewise.
10234         (umaddsidi4): Likewise.
10235         (*umulsidi3adddi): Likewise.
10236         (smulsi3_highpart): Likewise.
10237         (*smulsi3_highpart_nov6): Likewise.
10238         (umulsi3_highpart): Likewise.
10239         (*umulsi3_highpart_nov6): Likewise.
10240         * config/arm/arm.h (arm_arch3m): Delete.
10241         * config/arm/arm.c (arm_arch3m): Delete.
10242         (arm_option_override_internal): Update armv3-related comment.
10243         (arm_configure_build_target): Delete use of isa_bit_mode32.
10244         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10245         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10246         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10247         (mulsa3): Likewise.
10248         (mulusa3): Likewise.
10249         * config/arm/arm-protos.h (arm_arch3m): Delete.
10250         * config/arm/arm-tables.opt: Regenerate.
10251         * config/arm/arm-tune.md: Likewise.
10252         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10253         deleted architectures.
10255 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10257         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10258         (armv5t, armv5te): New features.
10259         (ARMv5, ARMv5e): Delete fgroups.
10260         (ARMv5t, ARMv5te): Adjust for above changes.
10261         (ARMv6m): Likewise.
10262         (armv5, armv5e): Delete arches.
10263         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10264         arm_arch5.
10265         (*call_reg_arm): Likewise.
10266         (*call_value_reg_armv5): Likewise.
10267         (*call_value_reg_arm): Likewise.
10268         (*call_symbol): Likewise.
10269         (*call_value_symbol): Likewise.
10270         (*sibcall_insn): Likewise.
10271         (*sibcall_value_insn): Likewise.
10272         (clzsi2): Likewise.
10273         (prefetch): Likewise.
10274         (define_split and define_peephole2 dependent on arm_arch5):
10275         Likewise.
10276         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10277         arm_arch5e.
10278         (TARGET_ARM_QBIT): Likewise.
10279         (TARGET_DSP_MULTIPLY): Likewise.
10280         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10281         (arm_arch5, arm_arch5e): Delete.
10282         (arm_arch5t, arm_arch5te): Declare.
10283         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10284         (arm_arch5t): Declare.
10285         (arm_option_reconfigure_globals): Update for the above.
10286         (arm_options_perform_arch_sanity_checks): Update comment, replace
10287         use of arm_arch5 with arm_arch5t.
10288         (use_return_insn): Likewise.
10289         (arm_emit_call_insn): Likewise.
10290         (output_return_instruction): Likewise.
10291         (arm_final_prescan_insn): Likewise.
10292         (arm_coproc_builtin_available): Likewise.
10293         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10294         arm_arch5e with arm_arch5t and arm_arch5te.
10295         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10296         (arm_arch5t, arm_arch5te): Declare.
10297         * config/arm/arm-tables.opt: Regenerate.
10298         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10299         * config/arm/t-multilib: Likewise.
10300         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10301         instead of arm_arch5.
10302         (*call_reg_thumb1): Likewise.
10303         (*call_value_reg_thumb1_v5): Likewise.
10304         (*call_value_reg_thumb1): Likewise.
10305         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10306         unreachable path.
10307         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10309 2018-05-18  Martin Liska  <mliska@suse.cz>
10311         PR gcov-profile/84846
10312         * doc/gcov.texi: Document -t option of gcov tool.
10314 2018-05-18  Martin Liska  <mliska@suse.cz>
10316         PR gcov-profile/84846
10317         * gcov.c (print_usage): Add new -t option.
10318         (process_args): Handle the option.
10319         (generate_results): Use stdout as output when requested by
10320         the option.
10322 2018-05-18  Martin Liska  <mliska@suse.cz>
10324         PR gcov-profile/84846
10325         * coverage.c (coverage_init): Write PWD to .gcno file.
10326         * doc/gcov.texi: Document how working directory is printed.
10327         * gcov-dump.c (dump_gcov_file): Print PWD.
10328         * gcov.c (output_intermediate_file): Likewise.
10329         (read_graph_file): Read PWD string.
10330         (output_lines): Print PWD.
10332 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10334         PR middle-end/85817
10335         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10336         for retval and return false if all args to phi are zero.
10338 2018-05-18  Richard Biener  <rguenther@suse.de>
10340         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10341         method.
10342         (evrp_dom_walker::before_dom_children): Call it.
10344 2018-05-18  Richard Biener  <rguenther@suse.de>
10346         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10347         results when processing array refs with variable index.
10349 2018-05-18  Toon Moene  <toon@moene.org>
10351         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10352         directly after that of -floop-interchange. Indicate that both
10353         options are enabled by default when specifying -O3.
10355 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10357         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10358         iterator.  Delete separate integer-mode vec_set<mode> expander.
10359         (aarch64_simd_vec_setv2di): Delete.
10360         (vec_setv2di): Delete.
10361         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10362         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10363         the "w, r" alternative.
10365 2018-05-18  Martin Liska  <mliska@suse.cz>
10367         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10368         * tree-pass.h (make_pass_lower_switch_O0): New function.
10369         * tree-switch-conversion.c (node_has_low_bound): Remove.
10370         (node_has_high_bound): Likewise.
10371         (node_is_bounded): Likewise.
10372         (class pass_lower_switch): Make it a template type and create
10373         two instances.
10374         (pass_lower_switch::execute): Add template argument.
10375         (make_pass_lower_switch): New function.
10376         (make_pass_lower_switch_O0): New function.
10377         (do_jump_if_equal): Remove.
10378         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10379         all the hard work to tree optimization passes.
10381 2018-05-18  Martin Liska  <mliska@suse.cz>
10383         * dbgcnt.c (limit_low): Renamed from limit.
10384         (limit_high): New variable.
10385         (dbg_cnt_is_enabled): Check for upper limit.
10386         (dbg_cnt): Adjust dumping.
10387         (dbg_cnt_set_limit_by_index): Add new argument for high
10388         value.
10389         (dbg_cnt_set_limit_by_name): Likewise.
10390         (dbg_cnt_process_single_pair): Parse new format.
10391         (dbg_cnt_process_opt): Use strtok.
10392         (dbg_cnt_list_all_counters): Remove 'value' and add
10393         'limit_high'.
10394         * doc/invoke.texi: Document changes.
10396 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10398         * doc/sourcebuild.texi (scalar_all_fma): Document.
10399         * tree.def (FMA_EXPR): Delete.
10400         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10401         * internal-fn.c (ternary_direct): New macro.
10402         (expand_ternary_optab_fn): Likewise.
10403         (direct_ternary_optab_supported_p): Likewise.
10404         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10405         * builtins.c (fold_builtin_fma): Delete.
10406         (fold_builtin_3): Don't call it.
10407         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10408         * expr.c (expand_expr_real_2): Likewise.
10409         * fold-const.c (operand_equal_p): Likewise.
10410         (fold_ternary_loc): Likewise.
10411         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10412         * gimple.c (DEFTREECODE): Likewise.
10413         * gimplify.c (gimplify_expr): Likewise.
10414         * optabs-tree.c (optab_for_tree_code): Likewise.
10415         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10416         * tree-eh.c (operation_could_trap_p): Likewise.
10417         (stmt_could_throw_1_p): Likewise.
10418         * tree-inline.c (estimate_operator_cost): Likewise.
10419         * tree-pretty-print.c (dump_generic_node): Likewise.
10420         (op_code_prio): Likewise.
10421         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10422         * tree-ssa-operands.c (get_expr_operands): Likewise.
10423         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10424         * fold-const-call.h (fold_fma): Delete.
10425         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10426         CFN_FNMA and CFN_FNMS.
10427         (fold_fma): Delete.
10428         * genmatch.c (combined_fn): New enum.
10429         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10430         (commutative_op): New function.
10431         (commutate): Use it.  Handle more than 2 operands.
10432         (dt_operand::gen_gimple_expr): Use commutative_op.
10433         (parser::parse_expr): Allow :c to be used with non-binary
10434         operators if the commutative operand is known.
10435         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10436         CFN_FMS, CFN_FNMA and CFN_FNMS.
10437         (backprop::process_assign_use): Remove FMA_EXPR handling.
10438         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10439         (gen_hsa_fma): New function.
10440         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10441         IFN_FNMA and IFN_FNMS.
10442         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10443         * gimple-fold.h (follow_all_ssa_edges): Declare.
10444         * gimple-fold.c (follow_all_ssa_edges): New function.
10445         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10446         gimple_build interface and use follow_all_ssa_edges to fold the result.
10447         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10448         instead of checking for optabs directly.
10449         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10450         rather than FMA_EXPRs.
10451         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10452         call to IFN_FMA instead of an FMA_EXPR.
10454 2018-05-17  Jim Wilson  <jimw@sifive.com>
10456         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10457         sign extended promoted subreg, and the range does not have the sign bit
10458         set, then do a sign extend.
10460         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10461         test, check for sign extended subreg and/or constant operands, and
10462         do a sign extend in that case.
10464 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10466         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10467         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10468         Add untyped.
10469         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10470         Change logics_shift_reg to logics_shift_imm.
10471         (thunderx2t99_fp_loadpair_basic): Delete.
10472         (thunderx2t99_fp_storepair_basic): Delete.
10473         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10474         (thunderx2t99_asimd_polynomial): Delete.
10475         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10476         and neon_fp_mul_d_scalar_q.
10477         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10478         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10479         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10480         (thunderx2t99_asimd_lut): Add missing tbl types.
10481         (thunderx2t99_asimd_ext): Delete.
10482         (thunderx2t99_asimd_load1_1_mult): Delete.
10483         (thunderx2t99_asimd_load1_2_mult): Delete.
10484         (thunderx2t99_asimd_load1_ldp): New.
10485         (thunderx2t99_asimd_load1): New.
10486         (thunderx2t99_asimd_load2): Add missing *load2* types.
10487         (thunderx2t99_asimd_load3): New.
10488         (thunderx2t99_asimd_load4): New.
10489         (thunderx2t99_asimd_store1_1_mult): Delete.
10490         (thunderx2t99_asimd_store1_2_mult): Delete.
10491         (thunderx2t99_asimd_store2_mult): Delete.
10492         (thunderx2t99_asimd_store2_onelane): Delete.
10493         (thunderx2t99_asimd_store_stp): New.
10494         (thunderx2t99_asimd_store1): New.
10495         (thunderx2t99_asimd_store2): New.
10496         (thunderx2t99_asimd_store3): New.
10497         (thunderx2t99_asimd_store4): New.
10499 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10501         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10502         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10504 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10505             Segher Boessenkool  <segher@kernel.crashing.org>
10507         PR target/85698
10508         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10509         operand.
10511 2018-05-17  Richard Biener  <rguenther@suse.de>
10513         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10514         for pruning loop and prune defs feeding only already visited PHIs.
10516 2018-05-17  Richard Biener  <rguenther@suse.de>
10518         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10520 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10521             Richard Biener  <rguenther@suse.de>
10523         PR tree-optimization/85793
10524         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10525         for VMAT_ELEMENTWISE.
10527 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10529         * internal-fn.h (lookup_internal_fn): Declare
10530         * internal-fn.c (lookup_internal_fn): New function.
10531         * gimple.c (gimple_build_call_from_tree): Handle calls to
10532         internal functions.
10533         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10534         internal function names.
10535         * tree-pretty-print.c (dump_generic_node): Likewise.
10536         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10538 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10540         * gimple-fold.h (gimple_build): Make the function forms take
10541         combined_fn rather than built_in_function.
10542         (gimple_simplify): Likewise.
10543         * gimple-match-head.c (gimple_simplify): Likewise.
10544         * gimple-fold.c (gimple_build): Likewise.
10545         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10546         rather than gimple_build_call_internal.
10547         (get_initial_defs_for_reduction): Likewise.
10548         (vect_create_epilog_for_reduction): Likewise.
10549         (vectorizable_live_operation): Likewise.
10551 2018-05-17  Martin Liska  <mliska@suse.cz>
10553         * gimple-ssa-sprintf.c (format_directive): Do not use
10554         space in between 'G_' and '('.
10556 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10558         PR target/85323
10559         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10560         even if the mask is not all ones.
10562         PR target/85323
10563         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10564         vector.
10565         (ix86_gimple_fold_builtin): Likewise.
10567         PR target/85323
10568         * config/i386/i386.c: Include tree-vector-builder.h.
10569         (ix86_vector_shift_count): New function.
10570         (ix86_fold_builtin): Fold shift builtins by scalar count.
10571         (ix86_gimple_fold_builtin): Likewise.
10573         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10574         _mm512_setzero): New intrinsics.
10576 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10577             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10579         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10580         code generation for cases where splatting a value is not useful.
10581         * simplify-rtx.c (simplify_ternary_operation): Simplify
10582         vec_merge across a vec_duplicate and a paradoxical subreg forming
10583         a vector mode to a vec_concat.
10585 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10587         * config.gcc: Support "goldmont-plus".
10588         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10589         "goldmont-plus".
10590         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10591         PROCESSOR_GOLDMONT_PLUS.
10592         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10593         (processor_target_table): Add "goldmont-plus".
10594         (PTA_GOLDMONT_PLUS): Define.
10595         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10596         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10597         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10598         (fold_builtin_cpu): Add "goldmont-plus".
10599         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10600         (ix86_option_override_internal): Add "goldmont-plus".
10601         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10602         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10603         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10604         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10606 2018-05-17  Richard Biener  <rguenther@suse.de>
10608         PR tree-optimization/85757
10609         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10610         remove defs that only feed that PHI from further processing.
10612 2018-05-16  Jim Wilson  <jimw@sifive.com>
10614         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10615         asterisk to name.
10616         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10618 2018-05-16  Mark Wielaard  <mark@klomp.org>
10620         * dwarf2out.c (count_index_strings): New function.
10621         (output_indirect_strings): Call count_index_strings and generate
10622         header for dwarf_version >= 5.
10624 2018-05-16  Mark Wielaard  <mark@klomp.org>
10626         * dwarf2out.c (dwarf_FORM): New function.
10627         (set_indirect_string): Use dwarf_FORM.
10628         (reset_indirect_string): Likewise.
10629         (size_of_die): Likewise.
10630         (value_format): Likewise.
10631         (output_die): Likewise.
10632         (add_skeleton_AT_string): Likewise.
10633         (output_macinfo_op): Likewise.
10634         (index_string): Likewise.
10635         (output_index_string_offset): Likewise.
10636         (output_index_string): Likewise.
10637         (count_index_strings): Likewise.
10639 2018-05-16  Carl Love  <cel@us.ibm.com>
10641         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10642         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10644 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10646         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10647         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10649 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10651         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10652         (fnma<mode>4): Likewise.
10653         (fms<mode>4): Likewise.
10654         (fnms<mode>4): Likewise.
10655         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10656         (aarch64_fnma<mode>4): Likewise.
10657         (aarch64_fms<mode>4): Likewise.
10658         (aarch64_fnms<mode>4): Likewise.
10659         (aarch64_fnmadd<mode>4): Likewise.
10661 2018-05-16  Jason Merrill  <jason@redhat.com>
10663         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10665 2018-05-16  Richard Biener  <rguenther@suse.de>
10667         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10668         (dump_stmt_cost): Declare.
10669         (add_stmt_cost): Dump cost we add.
10670         (add_stmt_costs): New function.
10671         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10672         No longer exported.
10673         (vect_analyze_stmt): Adjust prototype.
10674         (vectorizable_condition): Likewise.
10675         (vectorizable_live_operation): Likewise.
10676         (vectorizable_reduction): Likewise.
10677         (vectorizable_induction): Likewise.
10678         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10679         cost vector to pass to vectorizable_ and record afterwards.
10680         (vect_model_reduction_cost): Take cost vector argument and adjust.
10681         (vect_model_induction_cost): Likewise.
10682         (vectorizable_reduction): Likewise.
10683         (vectorizable_induction): Likewise.
10684         (vectorizable_live_operation): Likewise.
10685         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10686         SLP_TREE_NUMBER_OF_VEC_STMTS.
10687         (vect_analyze_slp_cost_1): Remove.
10688         (vect_analyze_slp_cost): Likewise.
10689         (vect_slp_analyze_node_operations): Take visited args and
10690         a target cost vector.  Avoid processing already visited stmt sets.
10691         (vect_slp_analyze_operations): Use a local cost vector to gather
10692         costs and register those of non-discarded instances.
10693         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10694         (vect_schedule_slp_instance): Remove copying of
10695         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10696         zero.
10697         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10698         adding cost.  Record cost entry location.
10699         (vect_prologue_cost_for_slp_op): Function to compute cost of
10700         a constant or invariant generated for SLP vect in the prologue,
10701         split out from vect_analyze_slp_cost_1.
10702         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10703         (vect_model_promotion_demotion_cost): Likewise.
10704         (vect_model_store_cost): Likewise, make static.
10705         (vect_model_load_cost): Likewise.
10706         (vectorizable_bswap): Add cost vector arg and adjust.
10707         (vectorizable_call): Likewise.
10708         (vectorizable_simd_clone_call): Likewise.
10709         (vectorizable_conversion): Likewise.
10710         (vectorizable_assignment): Likewise.
10711         (vectorizable_shift): Likewise.
10712         (vectorizable_operation): Likewise.
10713         (vectorizable_store): Likewise.
10714         (vectorizable_load): Likewise.
10715         (vectorizable_condition): Likewise.
10716         (vectorizable_comparison): Likewise.
10717         (can_vectorize_live_stmts): Likewise.
10718         (vect_analyze_stmt): Likewise.
10719         (vect_transform_stmt): Adjust calls to vectorizable_*.
10720         * tree-vectorizer.c: Include gimple-pretty-print.h.
10721         (dump_stmt_cost): New function.
10723 2018-05-16  Richard Biener  <rguenther@suse.de>
10725         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10726         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10727         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10728         (check_name): New callback.
10729         (dse_classify_store): Track cycles via a visited bitmap of PHI
10730         defs and simplify handling of in-loop and across loop dead stores
10731         and properly fail for loop-variant refs.  Handle byte-tracking with
10732         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10733         limiting the walk.
10735 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10737         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10738         (vect_get_mask_type_for_stmt): Likewise.
10739         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10740         split out from...
10741         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10742         to determine the statement's vector type and the vector type that
10743         should be used for calculating nunits.  Deal with cases in which
10744         the type has to be deferred.
10745         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10746         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10747         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10748         (vect_determine_vf_for_stmt): New functions, split out from...
10749         (vect_determine_vectorization_factor): ...here.
10750         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10751         (vect_get_mask_type_for_stmt): New functions, split out from
10752         vect_determine_vectorization_factor.
10754 2018-05-16  Richard Biener  <rguenther@suse.de>
10756         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10757         verify the [VEC_]COND_EXPR embedded comparison.
10759 2018-05-15  Martin Sebor  <msebor@redhat.com>
10761         PR tree-optimization/85753
10762         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10763         RECORD_TYPE in addition to ARRAY_TYPE.
10765 2018-05-15  Martin Sebor  <msebor@redhat.com>
10767         PR middle-end/85643
10768         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10770 2018-05-15  Richard Biener  <rguenther@suse.de>
10772         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10773         add by_clobber_p one.  Change algorithm to collect all defs
10774         representing uses we need to walk and try reducing them to
10775         a single one before failing.
10776         (dse_dom_walker::dse_optimize_stmt): Adjust.
10778 2018-05-13  Mark Wielaard  <mark@klomp.org>
10780         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10781         (size_of_loc_descr): Likewise.
10782         (output_loc_operands): Likewise.
10783         (output_loc_operands_raw): Likewise.
10784         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10785         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10786         (hash_loc_operands): Likewise.
10787         (compare_loc_operands): Likewise.
10789 2018-05-14  Mark Wielaard  <mark@klomp.org>
10791         * dwarf2out.c (count_index_addrs): New function.
10792         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10794 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10796         PR tree-optimization/83648
10797         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10798         return value as malloc candidate.
10800 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10802         PR ipa/85734
10803         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10804         param as true in call to suggest_attribute.
10806 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10808         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10809         -mreadonly-in-sdata.
10811 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10813         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10814         New pattern.
10815         (aarch64_crypto_aesd_fused): Likewise.
10817 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10819         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10820         (movsi_aarch64): Likewise.
10821         (load_pairsi): Likewise.
10822         (load_pairdi): Likewise.
10823         (store_pairsi): Likewise.
10824         (store_pairdi): Likewise.
10825         (load_pairsf): Likewise.
10826         (load_pairdf): Likewise.
10827         (store_pairsf): Likewise.
10828         (store_pairdf): Likewise.
10829         (zero_extend): Likewise.
10830         (trunc): Swap alternatives.
10831         (fcvt_target): Add '?' to prefer w over r.
10833 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10835         PR target/85756
10836         * config/i386/i386.md: Disallow non-commutative arithmetics in
10837         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10838         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10839         in the peephole2 before it.
10841 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10843         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10844         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10845         (ix86_handle_option): Handle -mcldemote.
10846         * config.gcc: New header.
10847         * config/i386/cldemoteintrin.h: New file.
10848         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10849         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10850         -mcldemote.
10851         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10852         OPTION_MASK_ISA_CLDEMOTE.
10853         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10854         (ix86_valid_target_attribute_inner_p): Ditto.
10855         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10856         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10857         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10858         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10859         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10860         (cldemote): New.
10861         * config/i386/i386.opt: Add -mcldemote.
10862         * config/i386/x86intrin.h: New header.
10863         * doc/invoke.texi: Add -mcldemote.
10865 2018-05-14  Richard Biener  <rguenther@suse.de>
10867         * doc/match-and-simplify.texi: Adjust :s documentation.
10869 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10871         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10872         intended memcpy size.
10873         (REORDER_45): Likewise.
10875 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10877         * sort.cc: New file.
10878         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10879         * vec.c (qsort_chk): Use gcc_qsort.
10880         * Makefile.in (OBJS-libcommon): Add sort.o.
10881         (build/sort.o): New target.  Use it...
10882         (BUILD_RTL): ... here, and...
10883         (build/gencfn-macros): ... here, and...
10884         (build/genmatch): ... here.
10886 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10887             Chung-Ju Wu  <jasonwucj@gmail.com>
10889         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10890         * config/nds32/nds32-graywolf.md: New file.
10891         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10892         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10893         pipeline.
10894         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10895         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10896         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10897         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10898         * config/nds32/pipelines.md: Include n15 settings.
10900 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10901             Chung-Ju Wu  <jasonwucj@gmail.com>
10903         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10904         * config/nds32/nds32-n13.md: New file.
10905         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10906         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10907         pipeline.
10908         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10909         * config/nds32/nds32.md (pipeline_model): Add n13.
10910         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10911         * config/nds32/pipelines.md: Include n13 settings.
10913 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10914             Chung-Ju Wu  <jasonwucj@gmail.com>
10916         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10917         * config/nds32/nds32-n10.md: New file.
10918         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10919         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10920         pipeline.
10921         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10922         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10923         * config/nds32/nds32.md (pipeline_model): Add n10.
10924         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10925         * config/nds32/pipelines.md: Include n10 settings.
10927 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10928             Kito Cheng  <kito.cheng@gmail.com>
10929             Chung-Ju Wu  <jasonwucj@gmail.com>
10931         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10932         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10933         Add enum values for DSP extension instructions.
10934         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10935         New constraints.
10936         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10937         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10938         New code iterators.
10939         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10940         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10941         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10942         * config/nds32/nds32-intrinsic.md: Likewise.
10943         * config/nds32/nds32_intrinsic.h: Likewise.
10944         * config/nds32/nds32-md-auxiliary.c: Likewise.
10945         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10946         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10947         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10948         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10949         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10950         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10951         TYPE_DMAC in switch statement.
10952         * config/nds32/nds32.c: New checking and implementation for DSP
10953         extension instructions.
10954         * config/nds32/nds32.h: Likewise.
10955         * config/nds32/nds32.md: Likewise.
10956         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10957         * config/nds32/predicates.md: Implement new predicates for DSP
10958         extension.
10960 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10962         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10963         Reformat alternatives and attributes so it is easier to identify
10964         which constraints/attributes go with which instruction.
10965         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10966         (mov<mode>_softfloat32, FMOVE64): Likewise.
10967         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10968         (mov<mode>_softfloat64, FMOVE64): Likewise.
10970 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10972         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10973         subsection.
10974         (Basic PowerPC Built-in Functions): The new name of the
10975         subsection previously known as "PowerPC Built-in Functions".
10976         (Basic PowerPC Built-in Functions Available on all Configurations):
10977         New subsubsection.
10978         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10979         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10980         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10981         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10983 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10985         PR ipa/85655
10986         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10987         single const.
10989 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10991         PR target/85733
10992         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10994 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10996         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10997         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10998         (ix86_handle_option): Handle -mwaitpkg.
10999         * config.gcc: New header.
11000         * config/i386/cpuid.h (bit_WAITPKG): New bit.
11001         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
11002         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
11003         function type.
11004         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11005         OPTION_MASK_ISA_WAITPKG.
11006         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
11007         (ix86_option_override_internal): Add PTA_WAITPKG.
11008         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
11009         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
11010         IX86_BUILTIN_TPAUSE.
11011         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
11012         __builtin_ia32_umwait and __builtin_ia32_tpause.
11013         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
11014         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
11015         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
11016         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
11017         UNSPECV_TPAUSE): New.
11018         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
11019         * config/i386/i386.opt: Add -mwaitpkg.
11020         * config/i386/waitpkgintrin.h: New file.
11021         * config/i386/x86intrin.h: New header.
11022         * doc/invoke.texi: Add -mwaitpkg.
11024 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
11026         PR target/85606
11027         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
11028         equivalent.
11029         (cortex-m0): Use armv6s-m isa.
11030         (cortex-m0plus): Likewise.
11031         (cortex-m1): Likewise.
11032         (cortex-m0.small-multiply): Likewise.
11033         (cortex-m0plus.small-multiply): Likewise.
11034         (cortex-m1.small-multiply): Likewise.
11036 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
11037             Jakub Jelinek  <jakub@redhat.com>
11039         PR tree-optimization/85692
11040         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
11041         source permute as well.
11043 2018-05-11  Martin Liska  <mliska@suse.cz>
11045         PR sanitizer/85556
11046         * doc/extend.texi: Document LLVM style format for no_sanitize
11047         attribute.
11049 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
11051         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
11052         mode_supports_vsx_dform_quad to mode_supports_dq_form.
11053         (mode_supports_vsx_dform_quad): Likewise.
11054         (mode_supports_vmx_dform): Move these functions to be next to the
11055         other mode_supports functions.
11056         (mode_supports_dq_form): Likewise.
11057         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
11058         mode_supports_dq_form.
11059         (reg_offset_addressing_ok_p): Likewise.
11060         (offsettable_ok_by_alignment): Likewise.
11061         (rs6000_legitimate_offset_address_p): Likewise.
11062         (legitimate_lo_sum_address_p): Likewise.
11063         (rs6000_legitimize_address): Likewise.
11064         (rs6000_legitimize_reload_address): Likewise.
11065         (rs6000_secondary_reload_inner): Likewise.
11066         (rs6000_preferred_reload_class): Likewise.
11067         (rs6000_output_move_128bit): Likewise.
11069 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11071         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
11072         Generate SImode target register for null target.
11073         <case IX86_BUILTIN_XGETBV>: Ditto.
11074         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
11075         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
11077 2018-05-10  Carl Love  <cel@us.ibm.com>
11079         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
11080         dcbtt and dcbtstt if operands[2] is 0.
11082 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
11084         PR target/85693
11085         * config/i386/sse.md (usadv64qi): New expander.
11087 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
11089         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
11090         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
11091         -maltivec=be support.
11092         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
11093         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
11094         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
11095         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
11096         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
11097         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
11098         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
11099         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
11100         altivec_vsumsws): Adjust.
11101         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
11102         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
11103         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
11104         support.
11105         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
11106         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
11107         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
11108         (altivec_lve<VI_char>x): Delete expand.
11109         (*altivec_lve<VI_char>x_internal): Rename to...
11110         (altivec_lve<VI_char>x): ... this.
11111         (altivec_lvxl_<mode>): Delete expand.
11112         (*altivec_lvxl_<mode>_internal): Rename to ...
11113         (altivec_lvxl_<mode>): ... this.
11114         (altivec_stvxl_<mode>): Delete expand.
11115         (*altivec_stvxl_<mode>_internal): Rename to ...
11116         (altivec_stvxl_<mode>): ... this.
11117         (altivec_stve<VI_char>x): Delete expand.
11118         (*altivec_stve<VI_char>x_internal): Rename to ...
11119         (altivec_stve<VI_char>x): ... this.
11120         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
11121         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
11122         reduc_plus_scal_<mode>): Adjust.
11123         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
11124         comment.
11125         (rs6000_cpu_cpp_builtins): Adjust.
11126         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
11127         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
11128         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
11129         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
11130         -maltivec=be support.
11131         (rs6000_split_vec_extract_var): Adjust.
11132         (rs6000_split_v4si_init): Adjust.
11133         (swap_selector_for_mode): Delete.
11134         (altivec_expand_lvx_be, altivec_expand_stvx_be,
11135         altivec_expand_stvex_be): Delete.
11136         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
11137         -maltivec=be support.
11138         (rs6000_gimple_fold_builtin): Ditto.
11139         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
11140         Adjust.
11141         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
11142         (TARGET_DIRECT_MOVE_64BIT): Adjust.
11143         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
11144         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
11145         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
11146         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11147         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11148         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11149         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11150         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11151         anonymous split): Adjust.
11152         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11153         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11155 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11157         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11158         when --with-gxx-include-dir is also specified.
11159         * configure: Regenerate.
11161 2018-05-09  Jim Wilson  <jimw@sifive.com>
11163         PR target/84797
11164         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11165         * config/riscv/t-withmultilib: New.
11166         * config/riscv/withmultilib.h: New.
11167         * doc/install.texi: Document RISC-V --with-multilib-list support.
11169 2018-05-09  Richard Biener  <rguenther@suse.de>
11171         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11172         vector.
11173         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11174         actual scalar cost using the cost vector and the add_stmt_cost
11175         machinery.
11177 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11179         PR rtl-optimization/85645
11180         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11181         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11183 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11185         PR rtl-optimization/85645
11186         * shrink-wrap.c (spread_components): Return a boolean saying if
11187         anything was changed.
11188         (try_shrink_wrapping_separate): Iterate spread_components until
11189         nothing changes anymore.
11191 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11193         PR rtl-optimization/85645
11194         * regrename.c (build_def_use): Also kill the chains that include the
11195         destination of a REG_CFA_REGISTER note.
11197 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11199         PR rtl-optimization/85645
11200         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11201         insn that has a REG_CFA_REGISTER note.
11203 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11205         * cfgexpand.c (expand_clobber): New function.
11206         (expand_gimple_stmt_1): Use it.
11207         * tree-vect-stmts.c (vect_clobber_variable): New function,
11208         split out from...
11209         (vectorizable_simd_clone_call): ...here.
11210         (vectorizable_store): Emit a clobber either side of an
11211         IFN_STORE_LANES sequence.
11212         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11214 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11216         PR target/85626
11217         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11218         (define_insn "trap_if_false"): Add exit after trap.
11220 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11222         PR rtl-optimization/85638
11223         * bb-reorder.c: Include common/common-target.h.
11224         (create_forwarder_block): New function extracted from...
11225         (fix_up_crossing_landing_pad): ...here.  Rename into...
11226         (dw2_fix_up_crossing_landing_pad): ...this.
11227         (sjlj_fix_up_crossing_landing_pad): New function.
11228         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11229         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11230         from both partitions and exit the loop after one iteration.
11232 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11234         Revert:
11235         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11236         subsection.
11237         (Basic PowerPC Built-in Functions): The new name of the
11238         subsection previously known as "PowerPC Built-in Functions".
11239         (Basic PowerPC Built-in Functions Available on all Configurations):
11240         New subsubsection.
11241         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11242         subsubsection.
11243         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11244         subsubsection.
11245         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11246         subsubsection.
11247         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11248         subsubsection.
11250 2018-05-08  Jim Wilson  <jimw@sifive.com>
11252         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11253         (LD_EMUL_SUFFIX): New.
11254         (LINK_SPEC): Use it.
11256 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11258         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11259         subsection.
11260         (Basic PowerPC Built-in Functions): The new name of the
11261         subsection previously known as "PowerPC Built-in Functions".
11262         (Basic PowerPC Built-in Functions Available on all Configurations):
11263         New subsubsection.
11264         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11265         subsubsection.
11266         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11267         subsubsection.
11268         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11269         subsubsection.
11270         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11271         subsubsection.
11273 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11275         PR target/85683
11276         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11277         after cmpelim optimization.
11279 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11281         * config.gcc: Support "goldmont".
11282         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11283         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11284         PROCESSOR_GOLDMONT.
11285         * config/i386/i386.c (m_GOLDMONT): Define.
11286         (processor_target_table): Add "goldmont".
11287         (PTA_GOLDMONT): Define.
11288         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11289         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11290         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11291         (fold_builtin_cpu): Add "goldmont".
11292         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11293         (ix86_option_override_internal): Add "goldmont".
11294         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11295         (processor_type): Add PROCESSOR_GOLDMONT.
11296         * config/i386/i386.md: Add CPU "glm".
11297         * config/i386/glm.md: New file.
11298         * config/i386/x86-tune.def: Add m_GOLDMONT.
11299         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11301 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11303         PR target/85572
11304         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11305         E_V4DImode.
11306         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11307         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11308         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11310         PR target/85317
11311         * config/i386/i386.c (ix86_fold_builtin): Handle
11312         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11314         PR target/85480
11315         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11316         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11318 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11320         PR target/85658
11321         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11322         (check_arch): Likewise.
11323         (check_fpu): Return the result rather than printing it.
11324         (end arch): Fix operator precedence.
11325         (end cpu): Likewise.
11326         (END): Print the result from check_fpu.
11328 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11329             Alan Hayward  <alan.hayward@arm.com>
11330             David Sherwood  <david.sherwood@arm.com>
11332         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11333         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11334         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11335         (*fcmuo<mode>_and): New patterns.
11337 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11339         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11340         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11341         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11342         (cmp_op, sve_imm_con): New code attributes.
11343         (SVE_COND_INT_CMP, imm_con): Delete.
11344         (cmp_op): Remove above unspecs from int attribute.
11345         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11346         to...
11347         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11348         comparison-specific unspecs.
11349         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11350         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11351         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11352         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11353         (*vec_fcm<cmp_op><mode>): Rename to...
11354         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11355         (*vec_fcmuo<mode>): Rename to...
11356         (*fcmuo<mode>): ...this and adjust likewise.
11357         (*pred_fcm<cmp_op><mode>): New pattern.
11358         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11359         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11360         functions.
11361         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11362         and UNORDERED.
11363         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11364         (aarch64_emit_sve_predicated_cond): New function.
11365         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11366         (aarch64_emit_unspec_cond_or): Replace with...
11367         (aarch64_emit_sve_or_conds): ...this new function.  Use
11368         aarch64_emit_sve_ptrue_op for the individual comparisons and
11369         aarch64_emit_binop to OR them together.
11370         (aarch64_emit_inverted_unspec_cond): Replace with...
11371         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11372         aarch64_emit_sve_ptrue_op for the comparison and
11373         aarch64_emit_unop to invert the result.
11374         (aarch64_expand_sve_vec_cmp_float): Update after the above
11375         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11377 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11379         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11380         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11381         (Backwards Compatibility): Likewise.
11383 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11385         PR bootstrap/85681
11386         Revert:
11387         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11389         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11390         <prefetch_dynamic_strides>: New const bool field.
11391         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11392         prefetch_dynamic_strides.
11393         (exynosm1_prefetch_tune): Likewise.
11394         (thunderxt88_prefetch_tune): Likewise.
11395         (thunderx_prefetch_tune): Likewise.
11396         (thunderx2t99_prefetch_tune): Likewise.
11397         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11398         to false.
11399         (aarch64_override_options_internal): Update to set
11400         PARAM_PREFETCH_DYNAMIC_STRIDES.
11401         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11402         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11403         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11404         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11405         prefetch-dynamic-strides setting.
11407         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11409         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11410         <minimum_stride>: New const int field.
11411         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11412         minimum_stride field.
11413         (exynosm1_prefetch_tune): Likewise.
11414         (thunderxt88_prefetch_tune): Likewise.
11415         (thunderx_prefetch_tune): Likewise.
11416         (thunderx2t99_prefetch_tune): Likewise.
11417         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11418         (aarch64_override_options_internal): Update to set
11419         PARAM_PREFETCH_MINIMUM_STRIDE.
11420         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11421         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11422         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11423         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11424         stride is constant and is below the minimum stride threshold.
11426 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11428         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11429         to 512.
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-06  Jakub Jelinek  <jakub@redhat.com>
11472         PR c++/85659
11473         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11474         the type is addressable.  Don't force op into register if it has
11475         BLKmode.
11477 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11479         PR other/77609
11480         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11481         any section for which we don't know a specific type it should have,
11482         regardless of name.  Previously this was done only for the exact
11483         names ".init_array", ".fini_array", and ".preinit_array".
11484         (default_elf_asm_named_section): Add comment about
11485         relationship with default_section_type_flags and SECTION_NOTYPE.
11486         (get_section): Don't consider it a type conflict if one side has
11487         SECTION_NOTYPE and the other doesn't, as long as neither has the
11488         SECTION_BSS et al used in the default_section_type_flags logic.
11490 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11492         PR target/85653
11493         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11494         (workaround_barsyncs): New function.
11495         (nvptx_reorg): Use workaround_barsyncs.
11496         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11497         (define_expand "nvptx_membar_cta"): New define_expand.
11498         (define_insn "*nvptx_membar_cta"): New insn.
11500 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11502         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11503         To improve optimization opportunities.
11504         * builtin-types.def: The new needed builtin types for the above.
11506 2018-05-04  Richard Biener  <rguenther@suse.de>
11508         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11509         * gimple-ssa-store-merging.c
11510         (imm_store_chain_info::output_merged_store): Remove redundant create,
11511         release split_store vector contents on failure.
11512         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11513         scalar stmt vector on cache hit.
11515 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11517         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11518         Xilinx FP support.
11519         * config.gcc (powerpc-xilinx-eabi*): Remove.
11520         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11521         support.
11522         (fusion_addis_mem_combo_load): Ditto.
11523         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11524         FP support.
11525         (rs6000_cpu_cpp_builtins): Ditto.
11526         * config/rs6000/rs6000-linux.c
11527         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11528         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11529         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11530         support.
11531         (rs6000_setup_reg_addr_masks): Ditto.
11532         (rs6000_init_hard_regno_mode_ok): Ditto.
11533         (rs6000_option_override_internal): Ditto.
11534         (legitimate_lo_sum_address_p): Ditto.
11535         (rs6000_legitimize_address): Ditto.
11536         (rs6000_legitimize_reload_address): Ditto.
11537         (rs6000_legitimate_address_p): Ditto.
11538         (abi_v4_pass_in_fpr): Ditto.
11539         (setup_incoming_varargs): Ditto.
11540         (rs6000_gimplify_va_arg): Ditto.
11541         (rs6000_split_multireg_move): Ditto.
11542         (rs6000_savres_strategy): Ditto.
11543         (rs6000_emit_prologue_components): Ditto.
11544         (rs6000_emit_epilogue_components): Ditto.
11545         (rs6000_emit_prologue): Ditto.
11546         (rs6000_emit_epilogue): Ditto.
11547         (rs6000_elf_file_end): Ditto.
11548         (rs6000_function_value): Ditto.
11549         (rs6000_libcall_value): Ditto.
11550         * config/rs6000/rs6000.h: Ditto.
11551         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11552         (TARGET_MINMAX): ... this.  New.
11553         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11554         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11555         (*movsi_internal1_single): Delete.
11556         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11557         mfpu=, mxilinx-fpu): Delete.
11558         * config/rs6000/singlefp.h: Delete.
11559         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11560         * config/rs6000/t-rs6000: Ditto.
11561         * config/rs6000/t-xilinx: Delete.
11562         * config/rs6000/titan.md: Adjust for fp_type removal.
11563         * config/rs6000/vsx.md: Remove Xilinx FP support.
11564         (VStype_simple): Delete.
11565         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11566         * config/rs6000/xfpu.h: Delete.
11567         * config/rs6000/xfpu.md: Delete.
11568         * config/rs6000/xilinx.h: Delete.
11569         * config/rs6000/xilinx.opt: Delete.
11570         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11571         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11573 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11575         PR libgomp/85639
11576         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11577         if ignore == 0.
11579 2018-05-04  Richard Biener  <rguenther@suse.de>
11581         PR middle-end/85627
11582         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11583         (expand_complex_div_wide): Likewise.
11584         (expand_complex_operations_1): Likewise.
11585         (expand_complex_libcall): Preserve EH info of the original stmt.
11586         (tree_lower_complex): Handle removed blocks.
11587         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11588         on complex multiplication and division libcall builtins.
11590 2018-05-04  Richard Biener  <rguenther@suse.de>
11592         PR middle-end/85574
11593         * fold-const.c (negate_expr_p): Restrict negation of operand
11594         zero of a division to when we know that can happen without
11595         overflow.
11596         (fold_negate_expr_1): Likewise.
11598 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11600         PR libstdc++/85466
11601         * real.h (real_nextafter): Declare.
11602         * real.c (real_nextafter): New function.
11603         * fold-const-call.c (fold_const_nextafter): New function.
11604         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11605         CASE_CFN_NEXTTOWARD.
11606         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11607         even when arg1_mode is different from arg0_mode.
11609 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11611         * doc/extend.texi (Deprecated Features): Remove
11612         -ffriend-injection.
11613         (Backwards Compatibility): Likewise.
11614         * doc/invoke.texi (C++ Language Options): Likewise.
11615         (C++ Dialect Options): Likewise.
11617 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11619         PR target/85530
11620         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11621         _mm512_mask_mullox_epi64): New intrinsics.
11623 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11625         PR testsuite/85106
11626         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11627         dump files): Add offload-tree.
11629 2018-05-03  Richard Biener  <rguenther@suse.de>
11631         PR tree-optimization/85615
11632         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11633         to loops not nested in BBs loop father to avoid creating multi-entry
11634         loops.
11636 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11638         PR tree-optimization/70291
11639         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11640         arguments.  Change return type to tree.  Emit libcall as a new
11641         statement rather than replacing existing one when inplace_p is true.
11642         (expand_complex_multiplication_components): New function.
11643         (expand_complex_multiplication): Expand floating-point complex
11644         multiplication using the above.
11645         (expand_complex_division): Rename inner_type parameter to type.
11646         Update expand_complex_libcall call-site.
11647         (expand_complex_operations_1): Update expand_complex_multiplication
11648         and expand_complex_division call-sites.
11650 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11652         PR target/85582
11653         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11654         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11655         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11656         the highest significant bit of the shift count mask is clear.  In
11657         check whether and[sq]i3 is needed verify that all significant bits
11658         of the shift count other than the highest are set.
11660 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11662         PR libgomp/82428
11663         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11664         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11665         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11666         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11667         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11668         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11669         __builtin_goacc_parlevel_size.
11671 2018-05-02  Richard Biener  <rguenther@suse.de>
11673         PR tree-optimization/85597
11674         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11675         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11676         directly.
11678 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11680         PR testsuite/85106
11681         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11682         dump files): Add ltrans-tree.
11684 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11686         PR testsuite/85106
11687         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11688         dump files): Add wpa-ipa.
11690 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11692         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11693         powerpc*-*-linux*paired* target.
11694         * config/rs6000/750cl.h: Delete.
11695         * config/rs6000/paired.h: Delete.
11696         * config/rs6000/paired.md: Delete.
11697         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11698         float support.
11699         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11700         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11701         comment.  Remove paired float support.
11702         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11703         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11704         VECTOR_PAIRED.
11705         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11706         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11707         declarations.
11708         * config/rs6000/rs6000.c: Remove paired float support.
11709         (paired_expand_vector_init, paired_expand_vector_move,
11710         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11711         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11712         paired_expand_builtin, paired_expand_predicate_builtin,
11713         paired_init_builtins): Delete.
11714         * config/rs6000/rs6000.h: Remove paired float support.
11715         * config/rs6000/rs6000.md: Remove paired float support.
11716         (move_from_CR_ov_bit): Delete.
11717         * config/rs6000/rs6000.opt (mpaired): Delete.
11718         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11719         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11721 2018-05-02  Richard Biener  <rguenther@suse.de>
11723         PR middle-end/85567
11724         * gimplify.c (gimplify_save_expr): When in SSA form allow
11725         SAVE_EXPRs to compute to SSA vars.
11727 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11729         PR target/85582
11730         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11731         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11732         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11733         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11735 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11737         PR tree-optimization/85586
11738         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11739         exit early for statements in the same group if the accesses are
11740         not strided.
11742 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11744         PR lto/85451
11745         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11746         error message.
11748 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11750         PR tree-optimization/85143
11751         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11753 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11755         PR lto/85451
11756         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11757         not found" error message.
11759 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11761         PR other/83786
11762         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11763         * vec.c (test_ordered_remove_if): New function.
11764         (vec_c_tests): Call test_ordered_remove_if.
11765         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11766         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11767         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11768         VEC_ORDERED_REMOVE_IF.
11770 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11772         PR tree-optimization/82665
11773         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11774         pointer subtraction where arguments come from a memchr call.
11776 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11778         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11779         --push-state --as-needed and --pop-state instead of --as-needed and
11780         --no-as-needed if ld supports it.
11781         * configure: Regenerated.
11783         PR web/85578
11784         * doc/install.texi2html: Replace _002d with - and _002a with * in
11785         generated html files using sed.
11787 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11789         PR c++/85523
11790         * gcc-rich-location.c (blank_line_before_p): New function.
11791         (use_new_line): New function.
11792         (gcc_rich_location::add_fixit_insert_formatted): New function.
11793         * gcc-rich-location.h
11794         (gcc_rich_location::add_fixit_insert_formatted): New function.
11796 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11798         * selftest.c (assert_streq): Rename "expected" and "actual" to
11799         "val1" and "val2".  Extend NULL-handling to cover both inputs
11800         symmetrically, while still requiring both to be non-NULL for a pass.
11801         * selftest.h (assert_streq): Rename "expected" and "actual" to
11802         "val1" and "val2".
11803         (ASSERT_EQ): Likewise.
11804         (ASSERT_EQ_AT): Likewise.
11805         (ASSERT_KNOWN_EQ): Likewise.
11806         (ASSERT_KNOWN_EQ_AT): Likewise.
11807         (ASSERT_NE): Likewise.
11808         (ASSERT_MAYBE_NE): Likewise.
11809         (ASSERT_MAYBE_NE_AT): Likewise.
11810         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11811         the assertion to pass.
11812         (ASSERT_STREQ_AT): Likewise.
11814 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11816         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11817         interaction with -pie.
11819 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11821         * selftest.h: Fix alphabetization of per-source-file selftest
11822         declarations.
11824 2018-04-30  Jason Merrill  <jason@redhat.com>
11826         PR c++/61982 - dead stores to destroyed objects.
11827         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11828         of clobber.
11830 2018-04-30  Jason Merrill  <jason@redhat.com>
11832         * tree.c (build_clobber): New.
11833         * tree.h: Declare it.
11834         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11836 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11838         * diagnostic-show-locus.c (layout::layout): Update for
11839         location_get_source_line returning a char_span.
11840         (struct char_span): Move to input.h.
11841         (struct correction): Update for fields in char_span becoming
11842         private.
11843         (struct source_line): Update for location_get_source_line
11844         returning a char_span.
11845         (layout::print_line): Likewise.
11846         * edit-context.c (edited_file::print_content): Likewise.
11847         (edited_file::print_diff_hunk): Likewise.
11848         (edited_file::print_run_of_changed_lines): Likewise.
11849         (edited_file::get_num_lines): Likewise.
11850         (edited_line::edited_line): Likewise.
11851         * final.c (asm_show_source): Likewise.
11852         * input.c (location_get_source_line): Convert return type
11853         from const char * to char_span, losing the final "line_len"
11854         param.
11855         (dump_location_info): Update for the above.
11856         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11857         when handling the literal within the line.
11858         (test_reading_source_line): Update for location_get_source_line
11859         returning a char_span.
11860         * input.h (class char_span): Move here from
11861         diagnostic-show-locus.c, converting from a struct to a class.
11862         Make data members private.
11863         (char_span::operator bool): New.
11864         (char_span::length): New.
11865         (char_span::get_buffer): New.
11866         (char_span::operator[]): New.
11867         (char_span::subspan): Make const.
11868         (char_span::xstrdup): New.
11869         (location_get_source_line): Convert return type from const char *
11870         to char_span, losing the final "line_size" param.
11872 2018-04-30  Jan Hubicka  <jh@suse.cz>
11874         * lto-wrapper.c (ltrans_priorities): New static var.
11875         (cmp_priority): New.
11876         (run_gcc): Read priorities and if doing parallel build order
11877         the Makefile by them.
11879 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11881         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11883 2018-04-30  Richard Biener  <rguenther@suse.de>
11885         * tree-cfg.c (verify_address): Remove base argument, add
11886         flag whether to check TREE_ADDRESSABLE and do that.
11887         (verify_expr): Remove.
11888         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11889         (verify_gimple_assign_single): Likewise.
11890         (verify_gimple_switch): Likewise.
11891         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11892         piece from verify_expr.
11893         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11895 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11897         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11899 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11901         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11902         (small_data_pattern): Likewise.
11903         (arc_rewrite_small_data): Likewise.
11904         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11905         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11906         (get_symbol_alignment): New function.
11907         (legitimate_small_data_address_p): Likewise.
11908         (legitimate_scaled_address): Update, call
11909         legitimate_small_data_address_p.
11910         (output_sdata): New static variable.
11911         (arc_print_operand): Update how we handle small data operands.
11912         (arc_print_operand_address): Likewise.
11913         (arc_legitimate_address_p): Update, use
11914         legitimate_small_data_address_p.
11915         (arc_rewrite_small_data_p): Remove.
11916         (arc_rewrite_small_data_1): Likewise.
11917         (arc_rewrite_small_data): Likewise.
11918         (small_data_pattern): Likewise.
11919         (compact_sda_memory_operand): Update to use
11920         legitimate_small_data_address_p and get_symbol_alignment.
11921         (prepare_move_operands): Don't rewite sdata pattern.
11922         (prepare_extend_operands): Remove.
11923         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11924         pattern.
11925         (zero_extendqisi2): Likewise.
11926         (zero_extendhisi2): Likewise.
11927         (extendqihi2): Likewise.
11928         (extendqisi2): Likewise.
11929         (extendhisi2): Likewise.
11930         (addsi3): Likewise.
11931         (subsi3): Likewise.
11932         (andsi3): Likewise.
11933         * config/arc/constraints.md (Usd): Change it to memory constraint.
11935 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11937         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11938         as source of std instructions.
11939         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11940         allow 6-bit constants as source for store instructions.
11941         (movdi_insn): Update instruction pattern to allow 6-bit constants
11942         as source for store instructions.
11944 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11946         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11948 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11949             Sandra Loosemore <sandra@codesourcery.com>
11951         * dumpfile.c (dump_open): Allow '-' for stdout.
11952         * doc/invoke.texi (Developer Options): Document dump filename
11953         determination early.  Document stdin/stdout selection.
11955 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11957         Microblaze Target: PIC data text relative
11959         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11960         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11961         Add declaration.
11962         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11963         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11964         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11965         New addressing mode for data-text relative position indepenedent code.
11966         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11967         'ADDRESS_SYMBOLIC_TXT_REL'.
11968         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11969         (microblaze_legitimate_pic_operand): Exclude function calls from
11970         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11971         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11972         addresses cases.
11973         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11974         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11975         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11976         for 'address + offset'.
11977         (microblaze_expand_prologue): Add new function prologue call for
11978         'r20' assignation.
11979         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11980         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11981         table in case of TARGET_PIC_DATA_TEXT_REL.
11982         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11983         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11984         Add new macros 'UNSPEC_TEXT',
11985         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11986         + exclude function calls from 'UNSPEC_PLT' in case of data text
11987         relative mode.
11988         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11989         new target hook for generating address diff vector tables in case of
11990         flag_pic.
11991         * doc/tm.texi : Regenerate.
11992         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11993         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11994         of addr diff vector generation.
11995         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11996         target hook definition.
11997         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11998         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11999         * doc/invoke.texi (Add new pic option): Add new microblaze pic
12000         option for data text relative.
12002 2018-04-30  Richard Biener  <rguenther@suse.de>
12004         * tree-chrec.h (evolution_function_is_constant_p): Remove
12005         redundant check.
12006         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
12008 2018-04-30  Richard Biener  <rguenther@suse.de>
12010         PR bootstrap/85571
12011         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
12013 2018-04-30  Richard Biener  <rguenther@suse.de>
12015         PR tree-optimization/28364
12016         PR tree-optimization/85275
12017         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
12018         copying first exit test.
12020 2018-04-28  Mark Wielaard  <mark@klomp.org>
12022         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
12023         dwarf_version >= 5.
12024         (dwarf_AT): Handle DW_AT_addr_base.
12025         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
12027 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
12029         PR target/84431
12030         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
12031         (*ashl<dwi>3_doubleword_mask_1): Ditto.
12032         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
12033         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
12035 2018-04-28  Richard Biener  <rguenther@suse.de>
12037         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
12038         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
12039         to reflect use.  Only add interesting stmts.
12041 2018-04-27  Martin Jambor  <mjambor@suse.cz>
12043         PR ipa/85549
12044         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
12045         the jump function allows for passing through aggregate values.
12047 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
12049         * input.h (in_system_header_at): Convert from macro to inline
12050         function.
12051         (from_macro_expansion_at): Likewise.
12052         (from_macro_definition_at): Likewise.
12054 2018-04-27  Jeff Law  <law@redhat.com>
12056         * config.gcc: Mark tile* targets as deprecated/obsolete.
12058 2018-04-27  Richard Biener  <rguenther@suse.de>
12060         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
12061         fix for ILP32.
12063 2018-04-27  Richard Biener  <rguenther@suse.de>
12065         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
12067 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
12069         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
12070         with Yd constraint. Set "preferred_for_speed" attribute from
12071         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
12072         with Yd constraint.
12073         (*movdi_internal): Ditto.
12074         (movti_interunit splitters): Remove
12075         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
12076         (movdi_interunit splitters): Ditto.
12077         * config/i386/constraints.md (Ye): Remove.
12078         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
12080 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12082         PR target/85512
12083         * config/aarch64/constraints.md (Usg): Limit to 31.
12084         (Usj): Limit to 63.
12086 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
12088         PR tree-optimization/85529
12089         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
12090         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
12091         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
12092         zero extension or masking of the MSB bit.
12093         (optimize_range_tests): Add FIRST_BB argument, pass it through
12094         to optimize_range_tests_var_bound.
12095         (maybe_optimize_range_tests, reassociate_bb): Adjust
12096         optimize_range_tests callers.
12098 2018-04-26  Richard Biener  <rguenther@suse.de>
12099             Jakub Jelinek  <jakub@redhat.com>
12101         * cgraph.h (symbol_table): Just declare debug method here.
12102         * symtab.c (symbol_table::debug): Define.
12104 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
12106         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
12108 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
12110         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
12111         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
12112         (*movdi_internal): Substitute Yi and Yj constraint with x
12113         and Ym and Yn constraint with y constraint.  Update "isa"
12114         attribute and set "preferred_for_speed" attribute from
12115         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
12116         (*movsi_internal): Ditto.
12117         (*movdf_internal): Ditto.
12118         (*movsf_internal): Ditto.
12119         (*zero_extendsidi2): Ditto.
12120         * config/i386/sse.md (vec_set<mode>_0): Ditto.
12121         (sse2_loadld): Ditto.
12122         (*vec_extract<ssevecmodelower>_0): Ditto.
12123         (*vec_extractv4si_0_zext_sse4): Ditto.
12124         (vec_concatv2di): Ditto.
12125         (*vec_dup<mode>): Ditto.
12126         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
12127         * config/i386/constraints.md (Yi): Remove.
12128         (Yj): Remove.
12129         (Ym): Remove.
12130         (Yn): Remove.
12132 2018-04-26  Nathan Sidwell  <nathan@acm.org>
12134         * dumpfile.c (dump_open): New.
12135         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
12136         (dump_finish): Detect stdio/stderr by value not name.
12138 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
12140         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
12142 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12144         PR target/84952
12145         * config/nvptx/nvptx.c (verify_neutering_jumps)
12146         (verify_neutering_labels): New function
12147         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12149 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12151         PR target/84025
12152         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12153         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12154         need neutering.
12156 2018-04-26  Richard Biener <rguenther@suse.de>
12157             Tom de Vries  <tom@codesourcery.com>
12159         PR lto/85422
12160         * lto-streamer-out.c (output_function): Fixup loops if required to match
12161         discovery done in the reader.
12163 2018-04-26  Richard Biener  <rguenther@suse.de>
12165         PR tree-optimization/85116
12166         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12167         have a loop exit from the single latch predecessor.  Remove
12168         case of header with just condition.
12169         (ch_base::copy_headers): Exclude infinite loops from any
12170         processing.
12171         (pass_ch::execute): Record exits.
12173 2018-04-26  Richard Biener  <rguenther@suse.de>
12175         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12176         prologue cost vector and pass it to vect_get_load_cost.
12177         (vect_get_peeling_costs_all_drs): Likewise.
12178         (vect_peeling_hash_get_lowest_cost): Likewise.
12179         (vect_enhance_data_refs_alignment): Likewise.
12181 2018-04-26  Richard Biener  <rguenther@suse.de>
12183         PR middle-end/85450
12184         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12185         checking of integer<->pointer conversions.
12186         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12187         sign-/zero-extending pointer types.
12188         (expand_omp_for_static_chunk): Likewise.
12190 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12191             Jean Lee  <xiaoyur347@gmail.com>
12193         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12194         (TARGET_ASAN_SHADOW_OFFSET): Define.
12195         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12196         true for -fsanitize=address.
12198 2018-04-25  Mark Wielaard  <mark@klomp.org>
12200         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12201         shorter ones.
12203 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12205         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12206         than "alu", remove explicit "memory" and "imm_disp" attributes.
12207         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12209         PR middle-end/85414
12210         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12211         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12212         gen_lowpart_no_emit.
12214 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12216         PR target/85473
12217         * config/i386/i386.c (ix86_expand_builtin): Change memory
12218         operand to XI, extend p0 to Pmode.
12219         * config/i386/i386.md: Change unspec volatile and operand
12220         1 mode to XI, change operand 0 mode to P.
12222 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12224         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12225         GET_MODE_MASK before any checking.
12226         (nds32_can_use_bset_p): Likewise.
12227         (nds32_can_use_btgl_p): Likewise.
12229 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12231         * config/nds32/nds32-doubleword.md: New define_split pattern for
12232         illegal register number.
12234 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12236         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12238 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12240         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12242 2018-04-25  Richard Biener  <rguenther@suse.de>
12244         * lto-streamer.h (LTO_major_version): Bump to 8.
12246 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12248         * BASE-VER: Set to 9.0.0.
12250 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12252         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12253         in __abskf2 and __powikf2.
12255 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12257         PR target/85512
12258         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12259         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12260         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12261         Use the above on operand 2.  Reindent.
12262         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12264 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12266         PR target/85485
12267         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12268         handle OPT_mcet.
12269         * config/i386/i386.opt (mcet): Removed.
12270         * doc/install.texi: Remove -mcet documentation.
12271         * doc/invoke.texi: Likewise.
12273 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12275         PR target/85485
12276         * doc/install.texi: Remove -mcet from bootstrap-cet.
12278 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12280         PR target/85511
12281         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12282         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12283         if TARGET_64BIT.
12285         PR target/85503
12286         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12287         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12288         containing a CONST_VECTOR.
12290 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12292         * doc/install.texi: Update newlib dependency for nvptx.
12294 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12296         PR target/85508
12297         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12298         instead of INTVAL when shifting x left.
12300 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12302         PR tree-optimization/85478
12303         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12304         vect_grouped_store_supported for single element vectors.
12306 2018-04-24  Richard Biener  <rguenther@suse.de>
12308         PR target/85491
12309         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12310         load cost increase to the case of non-constant step.
12312 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12314         PR target/84828
12315         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12316         destination if any_malformed_asm.
12318 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12320         PR middle-end/85496
12321         * expr.c (store_field): In the bitfield case, if the value comes from
12322         a function call and is returned in registers by means of a PARALLEL,
12323         do not change the mode of the temporary unless BLKmode and VOIDmode.
12325 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12327         PR rtl-optimization/85423
12328         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12329         dependencies to debug insns when the previous insn is non-debug.
12331 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12333         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12334         enums into a single definition.
12335         (fls): Fix predicates and printing.
12336         (seti): Likewise.
12338 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12340         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12341         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12342         and short u6 immediate.
12343         (check_if_valid_sleep_operand): Remove.
12344         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12346 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12348         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12349         flag_always_save_lp condition.
12350         * config/nds32/nds32.opt (malways-save-lp): New option.
12352 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12354         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12355         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12356         * config/nds32/nds32.h
12357         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12358         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12360 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12362         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12363         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12365 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12366             Chung-Ju Wu  <jasonwucj@gmail.com>
12368         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12369         Declare.
12370         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12371         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12373 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12375         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12377 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12379         * config/nds32/nds32-protos.h (nds32_data_alignment,
12380         nds32_local_alignment): Declare.
12381         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12382         nds32_local_alignment): New functions.
12383         (TARGET_CONSTANT_ALIGNMENT): Define.
12384         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12386 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12388         * config/nds32/nds32.c
12389         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12390         (TARGET_MODES_TIEABLE_P): Likewise.
12392 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12394         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12395         level Ofast and Og.
12397 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12398             Chung-Ju Wu  <jasonwucj@gmail.com>
12400         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12401         for unaligned access.
12402         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12403         unaligned access.
12404         * config/nds32/nds32-intrinsic.md: Likewise.
12405         * config/nds32/nds32_intrinsic.h: Likewise.
12406         * config/nds32/nds32.h (nds32_builtins): Likewise.
12407         * config/nds32/nds32.opt (munaligned-access): New option.
12408         * config/nds32/nds32.c (nds32_asm_file_start): Display
12409         flag_unaligned_access status.
12411 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12413         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12414         -mno-relax is present.
12415         * config/riscv/linux.h (LINK_SPEC): Ditto.
12417 2018-04-20  Martin Sebor  <msebor@redhat.com>
12419         PR c/85365
12420         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12421         for null pointers.
12422         (gimple_fold_builtin_stxcpy_chk): Same.
12423         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12425 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12427         PR target/85456
12428         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12429         __powikf2 when long double is IEEE 128-bit.
12431 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12433         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12434         step to make sure stack always aligned.
12436 2018-04-20  Carl Love  <cel@us.ibm.com>
12438         PR target/83402
12439         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12440         size check for arg0.
12442 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12443             Tom de Vries  <tom@codesourcery.com>
12445         PR target/85445
12446         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12447         Emit insns for calls too.
12448         (nvptx_find_par): Always look for worker-level predecessor insn.
12449         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12450         calls.
12451         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12452         (nvptx_process_pars): Propagate frames for calls.
12454 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12456         PR target/85469
12457         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12458         Removed.
12459         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12460         (ix86_handle_option): Don't handle OPT_mibt.
12461         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12462         __SHSTK__.
12463         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12464         has_ibt and ibt.
12465         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12466         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12467         (ix86_target_macros): Define __CET__ with flag_cf_protection
12468         for -fcf-protection.
12469         * config/i386/i386.c (isa2_opts): Remove -mibt.
12470         * config/i386/i386.h (TARGET_IBT): Removed.
12471         (TARGET_IBT_P): Likewise.
12472         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12473         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12474         * config/i386/i386.opt (mcet): Update help message.
12475         (mshstk): Likewise.
12476         (mibt): Removed.
12477         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12478         -mcet as an alias for -mshstk.
12480 2018-04-20  Richard Biener <rguenther@suse.de>
12482         PR middle-end/85475
12483         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12484         complexity by forcing a single use of the multiply operand.
12486 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12488         ipa/85449
12489         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12490         recursion dependency to only apply to non-clones.
12492 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12494         ipa/85447
12495         * ipa-cp.c (create_specialized_node): Check that clones of
12496         self-recursive edges exist during IPA-CP.
12498 2018-04-19  Toon Moene  <toon@moene.org>
12500         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12501         by -O3.
12503 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12505         PR tree-optimization/85467
12506         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12507         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12508         VECTOR_CST element to type.
12510 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12512         PR target/85397
12513         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12514         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12515         (builtin_longjmp): Likewise.
12516         (save_stack_nonlocal): New pattern.
12517         (restore_stack_nonlocal): Likewise.
12519 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12521         PR target/85404
12522         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12523         Replace ASM_OUTPUT_LABEL with fprintf.
12525 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12527         PR target/85417
12528         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12529         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12530         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12531         define __IBT__ and __SHSTK__ for -fcf-protection.
12532         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12533         TARGET_IBT.
12534         (ix86_trampoline_init): Likewise.
12535         (x86_output_mi_thunk): Likewise.
12536         (ix86_notrack_prefixed_insn_p): Likewise.
12537         (ix86_option_override_internal): Don't disallow -fcf-protection.
12538         * config/i386/i386.md (rdssp<mode>): Also enable for
12539         -fcf-protection.
12540         (incssp<mode>): Likewise.
12541         (nop_endbr): Likewise.
12542         * config/i386/i386.opt (mcet): Change help message to built-in
12543         functions only.
12544         (mibt): Likewise.
12545         (mshstk): Likewise.
12546         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12547         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12548         enable CET built-in functions.
12550 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12552         * common/config/i386/i386-common.c
12553         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12554         OPTION_MASK_ISA_MOVDIRI_UNSET,
12555         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12556         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12557         * config.gcc (movdirintrin.h): New header.
12558         * config/i386/cpuid.h (bit_MOVDIRI,
12559         bit_MOVDIR64B): New bits.
12560         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12561         and -mmvodir64b.
12562         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12563         (VOID, PVOID, PCVOID)): New function types.
12564         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12565         __builtin_ia32_directstoreu_u64,
12566         __builtin_ia32_movdir64b): New builtins.
12567         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12568         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12569         and -mmovdiri.
12570         (ix86_valid_target_attribute_inner_p): Ditto.
12571         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12572         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12573         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12574         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12575         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12576         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12577         (movdiri<mode>, movdir64b_<mode>): New.
12578         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12579         * config/i386/immintrin.h: Include movdirintrin.h.
12580         * config/i386/movdirintrin.h: New file.
12581         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12583 2018-04-19  Richard Biener  <rguenther@suse.de>
12585         PR middle-end/85455
12586         * cfg.c (clear_bb_flags): When loop state says we have
12587         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12589 2018-04-19  Richard Biener  <rguenther@suse.de>
12591         PR tree-optimization/84737
12592         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12593         copying restrict info.
12594         (vect_setup_realignment): Use it.
12595         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12596         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12597         the first DR to all generated stores.
12598         (vectorizable_load): Likewise for loads.
12600 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12602         PR tree-optimization/85446
12603         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12604         the integral and pointer types to have the same precision.
12606         * doc/install.texi: Document --disable-cet being the default and
12607         --enable-cet=auto.
12609 2018-04-18  Martin Liska  <mliska@suse.cz>
12611         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12612         style.
12614 2018-04-18  Martin Liska  <mliska@suse.cz>
12616         Revert
12617         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12619         PR ipa/83983
12620         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12621         arguments if they are comparable.
12623 2018-04-18  Martin Liska  <mliska@suse.cz>
12625         Revert
12626         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12628         PR lto/84805
12629         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12630         incomplete types.
12632 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12634         PR target/85388
12635         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12636         ENDBR after calling __morestack.
12638 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12640         PR jit/85384
12641         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12642         by using gcc_base_ver to generate a gcc_driver_version, and use
12643         it when generating GCC_DRIVER_NAME.
12644         * configure: Regenerate.
12646 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12648         PR target/81084
12649         * config.gcc: Obsolete powerpc*-*-*spe*.
12651 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12653         PR debug/84637
12654         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12655         (stabstr_D): Change type of unum from unsigned int to
12656         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12657         type.
12659 2018-04-17  Jim Wilson  <jimw@sifive.com>
12661         PR 84856
12662         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12663         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12664         Set arg_pointer_offset after using pretend_args_size.
12666 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12668         PR rtl-optimization/85431
12669         * dse.c (record_store): Ignore zero width stores.
12671         PR sanitizer/85230
12672         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12673         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12674         __builtin_stack_restore rather than after it.
12675         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12676         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12677         argument instead of virtual_dynamic_stack_rtx.
12679 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12681         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12682         New prototype.
12683         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12684         Add note to error message to explain internal mapping of overloaded
12685         built-in function name to non-overloaded built-in function name.
12686         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12687         function.
12689 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12691         PR target/85424
12692         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12693         where the inputs overlap with the output.
12695 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12697         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12698         (=v, v) alternative and explicit "memory" attribute.
12699         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12700         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12701         attributes.
12702         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12703         "sselog1" type instead of "sselog".
12704         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12705         "sselog".  Remove explicit "memory" attribute.
12706         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12707         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12708         attributes.
12709         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12710         "sselog1" type instead of "sselog".  Remove explicit "memory"
12711         attribute.
12712         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12713         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12714         attribute.
12715         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12716         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12717         attributes.
12718         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12719         "sselog1" type instead of "sselog".  Remove explicit "memory"
12720         attribute.
12721         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12722         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12723         attribute.
12725         PR target/85430
12726         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12728         PR middle-end/85414
12729         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12730         on a SUBREG.
12732 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12734         PR ipa/85421
12735         * ipa-cp.c (create_specialized_node): Call
12736         expand_all_artificial_thunks if necessary.
12738 2018-04-17  Martin Liska  <mliska@suse.cz>
12740         PR lto/85405
12741         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12742         in message, remote space in between '_G' and '('.
12744 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12746         PR target/85281
12747         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12748         avx512f_vmcmp<mode>3<round_saeonly_name>,
12749         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12750         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12751         avx512f_rndscale<mode><round_saeonly_name>,
12752         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12753         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12754         Use %<iptr>2 instead of %2 for -masm=intel.
12755         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12756         avx512f_vcvttss2usi<round_saeonly_name>,
12757         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12758         -masm=intel.
12759         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12760         avx512f_vcvttsd2usi<round_saeonly_name>,
12761         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12762         Use %q1 instead of %1 for -masm=intel.
12763         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12764         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12765         of %3 for -masm=intel.
12766         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12767         -masm=intel.
12768         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12769         -masm=intel.
12770         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12771         -masm=intel.
12772         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12773         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12774         %g1.
12775         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12776         -masm=intel.
12777         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12778         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12779         %g1 and one with %0 and %1.
12780         (avx512er_vmrcp28<mode><round_saeonly_name>,
12781         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12782         %1 for -masm=intel.
12783         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12784         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12785         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12786         of %0 and %{%4%} for -masm=intel.
12787         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12788         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12789         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12790         order of %0 and %{%5%}%{z%} for -masm=intel.
12792 2018-04-17  Jan Hubicka  <jh@suse.cz>
12794         PR lto/85405
12795         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12797 2018-04-17  Martin Liska  <mliska@suse.cz>
12799         PR ipa/85329
12800         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12801         for target_clone error message.  Make default implementation
12802         clone to be a local declaration.
12803         (separate_attrs): Add new argument and check for an empty
12804         string.
12805         (expand_target_clones): Handle it.
12806         (ipa_target_clone): Make redirection just for target_clones
12807         functions.
12809 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12810             Tom de Vries  <tom@codesourcery.com>
12812         PR middle-end/84955
12813         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12814         tiled basic blocks without omp continue statements.
12816 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12818         PR target/83660
12819         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12820         vec_extract expression as having side effects to make sure it gets
12821         a cleanup point.
12823 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12825         PR target/85403
12826         * config/i386/i386.c (get_builtin_code_for_version): Check
12827         error_mark_node.
12829 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12831         PR target/84331
12832         * config.gcc: Support "skylake".
12833         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12834         PROCESSOR_SKYLAKE.
12835         * config/i386/i386.c (m_SKYLAKE): Define.
12836         (processor_target_table): Add "skylake".
12837         (ix86_option_override_internal): Add "skylake".
12838         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12839         PROCESSOR_CANNONLAKE.
12840         (get_builtin_code_for_version): Fix priority for
12841         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12842         PROCESSOR_SKYLAKE-AVX512.
12843         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12844         (processor_type): Add PROCESSOR_SKYLAKE.
12846 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12847             Jason Merrill  <jason@redhat.com>
12849         PR c++/85112
12850         * convert.c (convert_to_integer_1): Use direct recursion for
12851         enumeral types and types with a precision less than the number
12852         of bits in their mode.
12854 2018-04-16  Julia Koval  <julia.koval@intel.com>
12856         PR target/84413
12857         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12858         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12860 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12862         PR target/85293
12863         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12864         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12865         and -mno-direct-move.
12867 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12869         PR target/83402
12870         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12871         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12872         Ensure negative shifts result in {0}.
12874 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12876         PR rtl-optimization/79916
12877         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12878         regs (if any) to define how to gnerate SD moves when LRA is in
12879         progress.
12881 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12883         PR rtl-optimization/85393
12884         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12885         * except.c (expand_dw2_landing_pad_for_region): Make static.
12886         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12887         a label and unconditional jump to old_bb, rather than
12888         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12889         basic block.
12891         PR rtl-optimization/85376
12892         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12893         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12894         instead of a specific value.
12896 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12897             Bin Cheng  <bin.cheng@arm.com>
12899         PR tree-optimization/82965
12900         PR tree-optimization/83991
12901         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12902         by_profile_only parameter.
12903         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12904         information if the loop was predicted to iterate too many times.
12905         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12907 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12909         PR lto/71991
12910         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12911         always inline.
12913 2018-04-13  Martin Liska  <mliska@suse.cz>
12914             Jakub Jelinek  <jakub@redhat.com>
12916         PR middle-end/81657
12917         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12918         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12919         * builtins.c (expand_builtin_memory_copy_args): Use
12920         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12921         handle dest_addr == pc_rtx.
12923 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12925         PR target/85291
12926         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12927         asked to not generate direct moves.
12928         (fix_trunc<mode>si2_stfiwx): Similar.
12929         (fix_trunc<mode>si2_internal): Similar.
12931 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12933         PR debug/83157
12934         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12935         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12936         lookup if dest in some wider mode is known to be const0_rtx and
12937         if so, record permanent equivalence for it to be ZERO_EXTEND of
12938         the narrower mode destination.
12940 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12942         * lto-streamer-out.c (output_function): Revert 259346.
12943         * omp-expand.c (expand_oacc_for): Likewise.
12945 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12947         PR rtl-optimization/85354
12948         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12949         * sel-sched.c (sel_global_init): ... here.
12951 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12953         PR target/85238
12954         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12955         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12956         mode for PE-COFF targets.
12957         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12958         (i386_pe_asm_lto_end): Likewise.
12959         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12960         (TARGET_ASM_LTO_END): Likewise.
12961         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12962         (i386_pe_asm_lto_start): New function.
12963         (i386_pe_asm_lto_end): Likewise.
12965 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12966             Richard Biener  <rguenther@suse.de>
12968         PR middle-end/84955
12969         * lto-streamer-out.c (output_function): Fix CFG loop state before
12970         streaming out.
12971         * omp-expand.c (expand_oacc_for): Handle calls to internal
12972         functions like regular functions.
12974 2018-04-12  Richard Biener  <rguenther@suse.de>
12976         PR lto/85371
12977         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12978         for the early LTO debug to properly generate references to it
12979         during DIE emission.  Do not re-use that for the skeleton for
12980         split-dwarf.
12981         (dwarf2out_early_finish): Likewise.
12983 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12985         PR target/85328
12986         * config/i386/sse.md
12987         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12988         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12989         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12990         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12991         and output is a reg, avoid creating invalid lowpart subreg, but
12992         instead split into a 512-bit move.  Don't split if not AVX512VL,
12993         input is xmm16+ reg and output is a mem.
12994         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12995         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12996         xmm16+ reg and output is a mem.
12998 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13000         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
13001         also for flag_dwarf2_cfi_asm.
13003 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
13005         PR rtl-optimization/85342
13006         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
13007         a bool scalar var inside of the loop instead.  Don't try to update
13008         recog_data.operand after failed apply_change_group.
13010 2018-04-12  Tom de Vries  <tom@codesourcery.com>
13012         PR target/85296
13013         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
13014         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
13015         array with flexible array member as array without given dimension.
13016         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
13017         argument for undefined param to true.
13019 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
13021         PR target/85321
13022         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13023         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
13024         from PowerPC section.
13025         * config/rs6000/sysv4.opt (mcall-): Improve help text.
13026         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
13027         help text that is too long.
13028         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
13029         help text that is too long.
13030         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
13031         help text that is too long.
13033 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
13035         * config/alpha/alpha.md (stack_probe_internal): Rename
13036         from "probe_stack".  Update all callers.
13038 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13040         PR rtl-optimization/84566
13041         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
13042         sched_macro_fuse_insns.
13044 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13046         PR target/84301
13047         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
13048         (compute_block_dependences): ... from here.
13050 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13052         PR tree-optimization/85331
13053         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
13054         from int to HOST_WIDE_INT.
13056 2018-04-11  Martin Jambor  <mjambor@suse.cz>
13058         PR ipa/84149
13059         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
13060         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
13061         not the same as the source val.
13062         (cgraph_edge_brings_value_p): New parameter.
13063         (gather_edges_for_value): Pass destination value to
13064         cgraph_edge_brings_value_p.
13065         (perhaps_add_new_callers): Likewise.
13066         (get_info_about_necessary_edges): Likewise and exclude values brought
13067         only by self-recursive edges.
13068         (create_specialized_node): Redirect only clones of self-calling edges.
13069         (+self_recursive_pass_through_p): New function.
13070         (find_more_scalar_values_for_callers_subset): Use it.
13071         (find_aggregate_values_for_callers_subset): Likewise.
13072         (known_aggs_to_agg_replacement_list): Removed.
13073         (decide_whether_version_node): Re-calculate known constants for all
13074         remaining context clones.
13076 2018-04-11  Richard Biener  <rguenther@suse.de>
13078         PR lto/85339
13079         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
13080         from early DWARF output.
13081         (dwarf2out_early_finish): Output line info unconditionally into
13082         early DWARF and add reference to it.
13084 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13086         PR target/85281
13087         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
13088         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
13089         other than V2DFmode using iptr mode attribute.
13090         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
13092 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
13094         PR rtl-optimization/84659
13095         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
13097 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
13099         PR debug/85302
13100         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
13101         SIZEP is NULL.
13102         (output_loc_list): Pass address of a dummy size variable even in the
13103         locview handling loop.
13104         (index_location_lists): Add comment on why skip_loc_list_entry can't
13105         call size_of_locs.
13107 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13109         PR target/85261
13110         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
13111         into register.
13113 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
13115         PR target/85321
13116         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
13117         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
13118         and -mstring-compare-inline-limit.
13120 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13122         PR target/85287
13123         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
13124         for stack clash protection in a register whenever we need it to be in
13125         a register.
13127 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13129         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
13130         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
13132 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
13134         PR target/85321
13135         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
13136         the help text.
13137         (mlong-double-): Ditto.
13138         * config/rs6000/sysv4.opt (msdata=): Ditto.
13139         (mtls-size=): Ditto.
13141 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13143         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
13144         erroneous entries for
13145         "vector int vec_ldl (int, long int *)", and
13146         "vector unsigned int vec_ldl (int, unsigned long int *)".
13147         Add comments and entries for
13148         "vector bool char vec_ldl (int, bool char *)",
13149         "vector bool short vec_ldl (int, bool short *)",
13150         "vector bool int vec_ldl (int, bool int *)",
13151         "vector bool long long vec_ldl (int, bool long long *)",
13152         "vector pixel vec_ldl (int, pixel *)",
13153         "vector long long vec_ldl (int, long long *)",
13154         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13155         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13156         type tree bool_long_long_type_node and correct definition of
13157         bool_V2DI_type_node to make reference to this new type tree.
13158         (rs6000_mangle_type): Replace erroneous reference to
13159         bool_long_type_node with bool_long_long_type_node.
13160         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13161         comments to emphasize sign distinctions for char and int types and
13162         replace RS6000_BTI_bool_long constant with
13163         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13164         use of RS6000_BTI_pixel.
13165         (bool_long_type_node): Remove this macro definition.
13166         (bool_long_long_type_node): New macro definition
13168 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13170         PR rtl-optimization/85300
13171         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13172         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13173         simplify_unary_operation fails.
13175 2018-04-10  Martin Liska  <mliska@suse.cz>
13177         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13178         cgraph_edge and ipa_ref.
13180 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13182         PR target/85177
13183         PR target/85255
13184         * config/i386/sse.md
13185         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13186         computation of the VEC_MERGE selector from mask.
13187         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13188         Fix decoding of the VEC_MERGE selector into mask.
13190 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13192         PR tree-optimization/85286
13193         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13195 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13197         * final.c (final_1): Set insn_last_address as well as
13198         insn_current_address.
13200 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13202         PR target/85173
13203         * explow.c (emit_stack_probe): Call validize_mem on memory location
13204         before passing it to gen_probe_stack.  Create address operand and
13205         legitimize it for the probe_stack_address case.
13207 2018-04-09  Jan Hubicka  <jh@suse.cz>
13209         PR lto/85078
13210         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13211         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13212         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13213         walk basetypes.
13214         (free_lang_data): Rebuild type inheritance graph.
13216 2018-04-09  Martin Sebor  <msebor@redhat.com>
13218         * invoke.texi (-finline-small-functions): Mention other optimization
13219         options.
13220         (-findirect-inlining, -fpartial-inlining): Same.
13221         (-finline-functions-called-once): Same.
13222         (-freorder-blocks-and-partition): Same.
13224 2018-04-09  Jan Hubicka  <jh@suse.cz>
13226         PR rtl/84058
13227         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13228         jumps; choose last target that matches the criteria (i.e.
13229         no partition changes for non-crossing jumps).
13230         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13231         support for redirecting crossing jumps to non-crossing.
13233 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13235         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13236         also for naked functions.
13238 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13240         * config/arc/arc.md (add_shift): New pattern.
13241         (add_shift2): Likewise.
13242         (sub_shift): Likewise.
13243         (sub_shift_cmp0_noout): Likewise.
13244         (compare_si_ashiftsi): Likewise.
13245         (xbfu_cmp0_noout): New combine pattern.
13246         (xbfu_cmp0"): Likewise.
13247         (movsi_set_cc_insn): Place the predicable variant first.
13248         (commutative_binary_cmp0_noout): Remove clobber.
13249         (commutative_binary_cmp0): New pattern.
13250         (noncommutative_binary_cmp0): Likewise.
13251         (noncommutative_binary_cmp0_noout): Likewise.
13252         (noncommutative_binary_comparison_result_used): Removed.
13253         (rsub_cmp0): New pattern.
13254         (rsub_cmp0_noout): Likewise.
13255         (extzvsi): Changed, keep only meaningful variants.
13256         (SQH, SEZ): New iterators.
13257         (SQH_postfix): New mode attribute.
13258         (SEZ_prefix): New code attribute.
13259         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13260         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13261         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13262         of numerical value.
13263         (noncommutative_operator): Check the availability of barrel
13264         shifter option.
13266 2018-04-09  Richard Biener  <rguenther@suse.de>
13268         PR tree-optimization/85284
13269         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13270         Only use the niter constraining form of simple_iv when the exit
13271         is always executed.
13273 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13275         PR target/84041
13276         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13277         (define_expand "*memory_barrier"): New define_expand.
13278         (define_insn "memory_barrier"): New insn.
13280 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13282         PR rtl-optimization/80463
13283         PR rtl-optimization/83972
13284         PR rtl-optimization/83480
13286         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13287         correct producer for the insn.
13288         (tidy_control_flow): Fixup seqnos in case of debug insns.
13290 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13292         PR rtl-optimization/83913
13294         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13295         different sched-times when merging exprs.
13297 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13299         PR rtl-optimization/83962
13301         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13302         tidy_fallthru_edge and tidy_control_flow.
13304 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13306         PR rtl-optimization/83530
13308         * sel-sched.c (force_next_insn): New global variable.
13309         (remove_insn_for_debug): When force_next_insn is true, also leave only
13310         next insn in the ready list.
13311         (sel_sched_region): When the region wasn't scheduled, make another pass
13312         over it with force_next_insn set to 1.
13314 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13316         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13317         into tm_file.
13318         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13319         for interrupt control.
13320         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13321         functions for interrupt control.
13322         * config/nds32/nds32-intrinsic.md: Likewise.
13323         * config/nds32/nds32_intrinsic.h: Likewise.
13324         * config/nds32/nds32.h (nds32_builtins): Likewise.
13326 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13328         * config/nds32/nds32.c (nds32_init_machine_status,
13329         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13330         strict_aligned_p field.
13331         (nds32_expand_to_rtl_hook): New function.
13332         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13333         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13335 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13336             Chung-Ju Wu  <jasonwucj@gmail.com>
13338         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13339         * config/nds32/nds32-n7.md: New file.
13340         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13341         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13342         pipeline.
13343         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13344         * config/nds32/nds32.md (pipeline_model): Add n7.
13345         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13346         * config/nds32/pipelines.md: Include n7 settings.
13348 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13349             Chung-Ju Wu  <jasonwucj@gmail.com>
13351         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13352         * config/nds32/nds32-e8.md: New file.
13353         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13354         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13355         pipeline.
13356         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13357         * config/nds32/nds32.md (pipeline_model): Add e8.
13358         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13359         * config/nds32/pipelines.md: Include e8 settings.
13361 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13362             Chung-Ju Wu  <jasonwucj@gmail.com>
13364         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13365         * config/nds32/nds32-n8.md: New file.
13366         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13367         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13368         pipeline.
13369         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13370         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13371         * config/nds32/nds32.md (pipeline_model): Add n8.
13372         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13373         * config/nds32/pipelines.md: Include n8 settings.
13375 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13376             Chung-Ju Wu  <jasonwucj@gmail.com>
13378         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13379         * config/nds32/nds32-n9-2r1w.md: New file.
13380         * config/nds32/nds32-n9-3r2w.md: New file.
13381         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13382         nds32_register_ports): New or modify for cpu n9.
13383         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13384         pipeline.
13385         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13386         * config/nds32/nds32-utils.c: New file.
13387         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13388         TARGET_MUL_SLOW): Define.
13389         * config/nds32/nds32.md (pipeline_model): New attribute.
13390         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13391         New options that support cpu n9.
13392         * config/nds32/pipelines.md: Include n9 settings.
13393         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13395 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13397         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13398         information if necessary.
13399         (output_cond_branch_compare_zero): Likewise.
13400         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13401         (nds32_target_alignment): Refine for alignment.
13402         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13403         (FUNCTION_BOUNDARY): Modify.
13404         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13405         align case.
13406         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13408 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13410         * config/nds32/constants.md (unspec_volatile_element): Add values for
13411         TLB operation and data prefetch.
13412         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13413         functions for TLB operation and data prefetch.
13414         * config/nds32/nds32-intrinsic.md: Likewise.
13415         * config/nds32/nds32_intrinsic.h: Likewise.
13416         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13417         (nds32_print_operand): Likewise.
13418         * config/nds32/nds32.h (nds32_builtins): Likewise.
13420 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13421         Andrew Pinski <pinsika@gcc.gnu.org>
13423         PR middle-end/82976
13424         * match.pd: Use constant_boolean_node of correct type instead of
13425         boolean_true_node or boolean_false_node for simplifying
13426         pointer comparisons to zero.
13428 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13430         PR tree-optimization/80021
13431         * tree.c (verify_type_variant): Make error call in verify_variant_match
13432         translatable and remove final full stop.
13434 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13436         * config/nds32/constants.md (unspec_volatile_element): Add
13437         UNSPEC_VOLATILE_EH_RETURN.
13438         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13439         nds32_output_stack_pop): Support dwarf exception handling process.
13440         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13441         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13442         exception handling process.
13443         (nds32_compute_stack_frame): Likewise.
13444         (nds32_return_addr_rtx): Likewise.
13445         (nds32_initial_elimination_offset): Likewise.
13446         (nds32_expand_prologue): Likewise.
13447         (nds32_expand_epilogue): Likewise.
13448         (nds32_dynamic_chain_address): New function.
13449         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13450         exception handling.
13451         (DYNAMIC_CHAIN_ADDRESS): Define.
13452         (EH_RETURN_DATA_REGNO): Define.
13453         (EH_RETURN_STACKADJ_RTX): Define.
13454         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13455         patterns for dwarf exception handling.
13457 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13459         * config/nds32/nds32.h: Clean up obsolete macros.
13461 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13463         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13464         Add enum values for particular instructions.
13465         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13466         particular intrinsic functions.
13467         * config/nds32/nds32-intrinsic.md: Likewise.
13468         * config/nds32/nds32_intrinsic.h: Likewise.
13469         * config/nds32/nds32.h (nds32_builtins): Likewise.
13470         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13471         (btst, ave): New patterns for particular instructions.
13473 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13475         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13476         Add enum values for atomic load/store and memory sync.
13477         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13478         and memory sync.
13479         * config/nds32/nds32-intrinsic.md: Likewise.
13480         * config/nds32/nds32_intrinsic.h: Likewise.
13481         * config/nds32/nds32.h (nds32_builtins): Likewise.
13483 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13485         PR tree-optimization/85257
13486         * fold-const.c (native_encode_vector): If not all elts could fit
13487         and off is -1, return 0 rather than offset.
13488         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13489         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13490         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13491         adjust buffer in native_interpret_expr call.
13493 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13495         * config/nds32/constants.md (unspec_volatile_element): Add cache
13496         control enum values.
13497         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13498         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13499         * config/nds32/nds32.c (nds32_cctl_names): New.
13500         (nds32_print_operand): Handle cache control register names.
13501         * config/nds32/nds32.h (nds32_builtins): New enum values.
13502         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13503         macros.
13504         * config/nds32/nds32.md (type): Add mmu.
13505         * config/nds32/pipelines.md (simple_insn): Add mmu.
13507 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13509         * config/nds32/nds32.md (type): Remove call.
13510         * config/nds32/pipelines.md (simple_insn): Likewise.
13512 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13514         * config/nds32/constants.md (unspec_volatile_element): Add
13515         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13516         UNSPEC_VOLATILE_FMFCFG.
13517         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13518         description for fmfcfg and fmfcsr.
13519         (bdesc_1arg): Add fmtcsr.
13520         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13521         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13522         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13523         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13524         unspec_fmfcfg): New patterns.
13525         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13526         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13527         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13528         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13529         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13530         __nds32__fmfcfg): Define.
13532 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13534         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13535         intrinsic register names.
13536         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13537         intrinsic register enum values and macros.
13539 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13541         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13542         for load/store addressing form.
13543         (nds32_print_operand_address): Likewise.
13545 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13547         PR target/85196
13548         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13549         based on LABEL_REF.  Remove useless assertion.
13550         (pic_address_needs_scratch): Fix formatting.
13551         (sparc_legitimize_pic_address): Minor tweaks.
13552         (sparc_delegitimize_address): Adjust assertion accordingly.
13553         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13554         into symbolic_operand.
13555         (movsi_high_pic_label_ref): Likewise.
13556         (movsi_lo_sum_pic_label_ref): Likewise.
13557         (movdi_pic_label_ref): Likewise.
13558         (movdi_high_pic_label_ref): Likewise.
13559         (movdi_lo_sum_pic_label_ref): Likewise.
13561 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13563         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13564         custom LIB_SPEC setup.
13566 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13567             Kito Cheng  <kito.cheng@gmail.com>
13569         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13570         * config/riscv/freebsd.h: New.
13572 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13574         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13575         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13576         file.
13578 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13579             Kito Cheng  <kito.cheng@gmail.com>
13581         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13582         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13583         * config/nds32/nds32-protos.h (nds32_output_call,
13584         nds32_output_return): Declare.
13585         * config/nds32/nds32.md: Refine all the call and return patterns.
13587 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13589         PR debug/85252
13590         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13591         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13593         PR rtl-optimization/84872
13594         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13595         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13596         EDGE_CROSSING edge.
13598 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13600         * expr.c (copy_blkmode_to_reg): Revert 254862.
13601         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13603 2018-04-06  Richard Biener  <rguenther@suse.de>
13605         PR middle-end/85244
13606         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13607         after seeing a component reference with an adjacent field.  Treat
13608         refs to arrays at struct end of external decls similar to
13609         refs to unconstrained commons.
13611 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13613         PR sanitizer/85213
13614         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13615         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13616         recursive calls.
13617         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13618         save_p here.
13620 2018-04-06  Richard Biener  <rguenther@suse.de>
13622         PR middle-end/85180
13623         * alias.c (find_base_term): New wrapper around find_base_term
13624         unwinding CSELIB_VAL_PTR changes.
13625         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13626         recursion.
13628 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13630         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13631         instructions.
13632         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13633         constant definitions.
13634         ("nop"): lr 0,0 -> nopr r0
13635         ("nop_lr0", "nop_lr1"): New insn definitions.
13637 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13639         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13640         NDS32_V3PUSH_AVAILABLE_P macro.
13642 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13643             Chung-Ju Wu  <jasonwucj@gmail.com>
13645         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13646         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13647         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13648         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13649         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13650         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13651         * config/nds32/constraints.md: New constraints and checking for hard
13652         float configuration.
13653         * config/nds32/iterators.md: New mode iterator and attribute for hard
13654         float configuration.
13655         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13656         patterns.
13657         * config/nds32/nds32-fpu.md: New file.
13658         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13659         deal with hard float code generation.
13660         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13661         ARCH_V3S.
13662         (abi_type, float_reg_number): New enum type.
13663         * config/nds32/nds32-predicates.c: New predicates for hard float.
13664         * config/nds32/nds32-protos.h: Declare functions for hard float.
13665         * config/nds32/nds32.c: Implementation for hard float configuration.
13666         * config/nds32/nds32.h: Definitions for hard float configuration.
13667         * config/nds32/nds32.md: Include hard float machine description and
13668         modify patterns for hard float configuration.
13669         * config/nds32/nds32.opt: New options for hard float configuration.
13670         * config/nds32/predicates.md: New predicates for hard float
13671         configuration.
13673 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13675         * common/config/nds32/nds32-common.c
13676         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13678 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13680         PR middle-end/85195
13681         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13682         CONSTRUCTOR_ELT (ctor, ...)->value.
13684 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13686         PR target/85193
13687         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13689 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13691         PR target/85204
13692         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13693         cond jump.
13695 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13696             Kito Cheng  <kito.cheng@gmail.com>
13698         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13699         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13700         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13701         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13703 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13704             Kito Cheng  <kito.cheng@gmail.com>
13706         * config/nds32/constraints.md (Ufe): New memory constraint.
13707         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13708         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13709         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13710         operands.
13711         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13712         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13714 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13716         * config/nds32/nds32.md: Use optimize_size in the condition for
13717         alu-shift instructions.
13719 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13721         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13723 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13725         * config/nds32/nds32.md (negsi2): Refine pattern.
13727 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13728             Chung-Ju Wu  <jasonwucj@gmail.com>
13730         * config/nds32/iterators.md (shift_rotate): New code iterator.
13731         (shift): New code attribute.
13732         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13733         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13734         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13735         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13736         bit-wise operations.
13737         (andsi3, *andsi3): Ditto.
13738         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13739         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13740         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13741         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13742         nds32_ior_operand, nds32_xor_operand): New predicates.
13744 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13746         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13747         (addsi3, subsi3): ... this.
13749 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13751         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13753 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13755         * config/nds32/nds32.md: Adjust indention.
13757 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13759         * config/nds32/nds32.md (feature): New attribute.
13761 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13763         * config/nds32/nds32.md (subtype): New attribute.
13765 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13767         PR target/85203
13768         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13769         expansion to perform a bitwise AND of the argument followed by a
13770         boolean negation of the result.
13772 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13774         PR rtl-optimization/84878
13775         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13776         the basic block.  Assert the use reference is not artificial and that
13777         it has an associated insn.
13779 2018-04-04  Michael Matz  <matz@suse.de>
13781         * builtins.c (compute_objsize): Pass correct operand
13782         to array_at_struct_end_p.
13784 2018-04-04  Richard Biener  <rguenther@suse.de>
13786         PR lto/85176
13787         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13788         from contexts for DINFO_LEVEL_TERSE and below.
13790 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13792         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13793         resiter_operand condition.
13794         * config/nds32/nds32.md (*move<mode>): Ditto.
13796 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13797             Monk Chiang  <sh.chiang04@gmail.com>
13799         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13801 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13803         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13805 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13806             Kito Cheng  <kito.cheng@gmail.com>
13808         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13809         nds32_cond_code_str, output_cond_branch,
13810         output_cond_branch_compare_zero, nds32_expand_cbranch,
13811         nds32_expand_cstore, nds32_expand_movcc,
13812         nds32_output_cbranchsi4_equality_zero,
13813         nds32_output_cbranchsi4_equality_reg,
13814         nds32_output_cbranchsi4_equality_reg_or_const_int,
13815         nds32_output_cbranchsi4_greater_less_zero: New functions.
13816         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13817         nds32_expand_cstore, nds32_expand_movcc,
13818         nds32_output_cbranchsi4_equality_zero,
13819         nds32_output_cbranchsi4_equality_reg,
13820         nds32_output_cbranchsi4_equality_reg_or_const_int,
13821         nds32_output_cbranchsi4_greater_less_zero): Declare.
13822         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13823         nds32_rimm11s_operand): New predicates.
13824         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13825         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13826         patterns.
13828 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13830         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13831         * config/nds32/nds32.md: Ditto.
13832         * config/nds32/pipelines.md: Ditto.
13834 2018-04-04  Richard Biener  <rguenther@suse.de>
13836         PR tree-optimization/85168
13837         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13838         propagating abnormals.
13840 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13842         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13844 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13845             Kito Cheng  <kito.cheng@gmail.com>
13847         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13848         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13849         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13850         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13851         * config/nds32/nds32.md (sibcall_internal): New.
13852         (sibcall_register): Remove.
13853         (sibcall_immediate): Remove.
13854         (sibcall_value_internal): New.
13855         (sibcall_value_register): Remove.
13856         (sibcall_value_immediate): Remove.
13857         * config/nds32/predicates.md (nds32_general_register_operand): New.
13858         (nds32_call_address_operand): New.
13860 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13862         PR rtl-optimization/85167
13863         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13864         bb_defs if *split_p, instead preinitialize it to NULL.
13866         PR tree-optimization/85156
13867         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13868         evaluating the argument multiple times.
13870 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13872         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13873         than vector.
13874         (_mm_cvtpd_ps): Likewise.
13875         (_mm_cvttpd_epi32): Likewise.
13876         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13877         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13878         vector, pixel, and bool following altivec.h include.
13880 2018-04-03  Martin Sebor  <msebor@redhat.com>
13882         * doc/extend.texi (Common Function Attributes): Clarify.
13883         (const attribute): Likewise.
13884         (pure attribute): Likewise.
13886 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13888         PR target/85169
13889         * config/i386/i386.c (ix86_expand_vector_set): Use
13890         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13892 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13894         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13895         instructions when changing rounding bits to preserve precision bits
13896         in the x87 control word.
13898 2018-04-03  Martin Liska  <mliska@suse.cz>
13900         PR tree-optimization/82491
13901         * rtl.h (strip_offset_and_add): Replace += suboffset with
13902         poly_uint64 () + suboffset.
13904 2018-03-29  Martin Liska  <mliska@suse.cz>
13905             Martin Jambor  <mjambor@suse.cz>
13907         PR ipa/84947
13908         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13909         param_type is not an integral or pointer type.
13911 2018-04-03  Richard Biener  <rguenther@suse.de>
13913         * sese.h (recompute_all_dominators): Remove.
13915 2018-04-02  Martin Sebor  <msebor@redhat.com>
13917         * doc/invoke.texi (-Wrestrict): Fix typos.
13919 2018-04-02  Jim Wilson  <jimw@sifive.com>
13921         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13922         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13923         (<optab>di3, <optab>si3_extend): Likewise.
13924         (<optab>si3_mask, <optab>si3_mask_1): New.
13925         (<optab>di3_mask, <optab>di3_mask_1): New.
13926         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13927         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13928         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13930 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13932         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13933         example.
13935 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13937         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13938         (nds32_canonicalize_comparison): New function.
13940 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13941             Kito Cheng  <kito.cheng@gmail.com>
13942             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13944         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13945         * config/nds32/constants.md (unspec_volatile_element): Add
13946         UNSPEC_VOLATILE_RELAX_GROUP.
13947         * config/nds32/nds32-relax-opt.c: New file.
13948         * config/nds32/nds32-predicates.c
13949         (nds32_symbol_load_store_p): New function.
13950         * config/nds32/nds32-protos.h
13951         (nds32_symbol_load_store_p): Declare function.
13952         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13953         * config/nds32/nds32.c
13954         (nds32_register_pass): New function to register pass.
13955         (nds32_register_passes): New function to register passes.
13956         * config/nds32/nds32.md (relax_group): New pattern.
13957         * config/nds32/nds32.opt (mrelax-hint): New option.
13958         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13960 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13962         * config/nds32/t-nds32: Modify files dependency.
13964 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13966         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13967         (PROFILE_HOOK): Define its implementation.
13969 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13971         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13972         type and 32-bit size.
13974 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13976         PR middle-end/85090
13977         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13978         (V_128_256): New mode iterator.
13979         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13980         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13981         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13982         of V.
13983         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13984         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13986 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13988         PR target/83315
13989         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13990         NaN inputs correctly.
13992 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13994         PR target/80546
13995         * config/rs6000/vsx.md (??r): New mode attribute.
13996         (*vsx_mov<mode>_64bit): Use it.
13997         (*vsx_mov<mode>_32bit): Likewise.
13999 2018-03-30  Martin Sebor  <msebor@redhat.com>
14001         PR tree-optimization/84818
14002         * builtins.c (check_access): Use warning_n.
14004 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14006         PR target/83822
14007         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
14008         condition.
14009         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
14010         condition.
14012 2018-03-30  Julia Koval  <julia.koval@intel.com>
14014         PR target/84413
14015         * x86-tune.def (movx, partial_reg_dependency): Enable for
14016         m_SKYLAKE_AVX512.
14018 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
14020         PR inline-asm/84985
14021         * lra-constraints.c (process_alt_operands): Move setting
14022         this_alternative_matches below.
14024 2018-03-29  Martin Liska  <mliska@suse.cz>
14026         PR lto/84995.
14027         * doc/invoke.texi: Document how LTO works with debug info.
14028         Describe auto-load support of binutils.  Mention 'x86-64'
14029         as valid option value of -march option.
14031 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
14033         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
14035         PR c/85094
14036         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
14037         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
14038         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
14039         checking.
14041 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14043         PR target/84912
14044         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
14045         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
14046         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
14047         for RS6000_BTM_POWERPC64.
14048         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
14049         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
14050         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
14051         definition.
14052         (DIVDE): Use it.
14053         (DIVDEU): Likewise.
14055 2018-03-28  Carl Love  <cel@us.ibm.com>
14057         Revert
14058         2017-09-27  Carl Love  <cel@us.ibm.com>
14060         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
14061         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
14062         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
14063         fctiw instruction.
14065 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14067         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
14068         instead of __vector bool.
14069         (_mm_max_pu8): Likewise.
14070         (_mm_min_pi16): Likewise.
14072 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
14074         PR target/84912
14075         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
14076         (DIVWEUO): Likewise.
14077         (DIVDEO): Likewise.
14078         (DIVDEUO): Likewise.
14079         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
14080         DIVWEUO and DIVDEUO.
14081         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
14082         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
14083         (div_extend): Likewise.
14084         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
14085         builtin function.
14086         (__builtin_divweuo): Likewise.
14087         (__builtin_divdeo): Likewise.
14088         (__builtin_divdeuo): Likewise.
14090 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14092         PR target/85095
14093         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
14094         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
14096         PR tree-optimization/82004
14097         * gimple-match-head.c (optimize_pow_to_exp): New function.
14098         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
14099         Don't fold to exp if optimize_pow_to_exp is false.
14101 2018-03-28  Martin Liska  <mliska@suse.cz>
14103         PR other/84819
14104         * calls.c (initialize_argument_information): Fix trailing space.
14105         * common.opt: Fix typo and provide better explanation for
14106         -fsanitize-coverage option.
14107         * config/i386/i386.opt: Fix typo.
14109 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
14110             Martin Liska  <mliska@suse.cz>
14112         PR sanitizer/85081
14113         * gimplify.c (asan_poison_variable): Don't do the check for
14114         gimplify_omp_ctxp here.
14115         (gimplify_decl_expr): Do it here.
14116         (gimplify_target_expr): Likewise.
14118 2018-03-28  Martin Liska  <mliska@suse.cz>
14120         PR target/84988
14121         * config/i386/i386.c (ix86_function_arg_advance): Do not call
14122         chkp_type_bounds_count if MPX is not enabled.
14124 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
14126         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
14128 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
14130         PR target/84914
14131         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
14132         function to create the function decl for complex long double
14133         multiply and divide for -mabi=ieeelongdouble.
14134         (init_float128_ieee): Call it.
14136 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
14138         PR target/85044
14139         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
14140         -fcf-protection=branch -mibt.
14141         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
14143 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14145         PR target/81863
14146         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14147         arm_word_relocations.
14149 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14151         PR target/85056
14152         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14153         extern array declarations.
14155 2018-03-27  Richard Biener  <rguenther@suse.de>
14157         PR middle-end/84067
14158         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14159         explicit single_use checks.
14161 2018-03-27  Richard Biener  <rguenther@suse.de>
14163         PR tree-optimization/85082
14164         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14165         Valueize the VUSE.
14167 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14169         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14170         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14171         Turn on fasynchronous-unwind-tables and funwind-tables.
14173 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14175         PR target/85073
14176         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14177         (*bmi_blsr_<mode>_ccz): Ditto.
14179 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14181         PR tree-optimization/85063
14182         * omp-general.c (offloading_function_p): New function.  Factor out
14183         of ...
14184         * omp-offload.c (pass_omp_target_link::gate): ... here.
14185         * omp-general.h (offloading_function_p): Declare.
14186         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14187         with attribute omp declare target for offloading functions.
14189 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14191         PR tree-optimization/84005
14192         * tree-data-ref.h (get_base_for_alignment): Declare.
14193         * tree-data-ref.c (get_base_for_alignment_1): New function.
14194         (get_base_for_alignment): Likewise.
14195         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14196         get_base_for_alignment to find a suitable base object, instead
14197         of always using drb->base_address.
14199 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14201         PR inline-asm/85022
14202         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14203         known size by default.
14205 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14207         PR inline-asm/85030
14208         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14209         and non BLKmode operands.
14211 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14213         PR target/85026
14214         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14215         Clean up attributes.
14217 2018-03-23  Richard Biener  <rguenther@suse.de>
14219         PR debug/85020
14220         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14221         we are going to emit early debug for LTO.
14223 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14225         PR inline-asm/85034
14226         * function.c (match_asm_constraints_1): Don't optimize if input
14227         doesn't satisfy general_operand predicate for output's mode.
14229         PR inline-asm/85022
14230         * alias.c (write_dependence_p): Don't require for x_canonicalized
14231         non-VOIDmode if x has VOIDmode.
14233         PR sanitizer/85029
14234         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14235         just don't try to optimize it rather than assert it never happens.
14237 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14239         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14240         macro expansions for definition of ST_INTERNAL_<mode> and
14241         LD_INTERNAL_<mode> builtins.
14242         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14243         Remove prototype.
14244         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14245         function.
14246         (altivec_expand_st_builtin): Likewise.
14247         (altivec_expand_builtin): Remove calls to deleted functions.
14248         (rs6000_address_for_altivec): Delete this function.
14249         * config/rs6000/vector.md: Remove expands for
14250         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14252 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14254         PR target/84826
14255         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14256         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14257         re-computing once computed.
14258         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14259         (arm_init_machine_status): Initialize
14260         machine->static_chain_stack_bytes.
14262 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14264         PR target/84760
14265         * doc/extend.texi: Add four new prototypes for vec_ld.
14266         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14267         definitions for more logical presentation.
14268         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14269         entries for V1TI variants of __builtin_altivec_ld builtin.
14270         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14271         handling of V1TI variant of LVX icode pattern.
14272         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14273         (rs6000_gimple_fold_builtin): Likewise.
14274         (altivec_init_builtins): Add code to define
14275         __builtin_altivec_lvx_v1ti function.
14277 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14279         PR inline-asm/84941
14280         * function.c (match_asm_constraints_1): Don't do the optimization
14281         if input isn't a REG, SUBREG, MEM or constant.
14283 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14285         PR tree-optimization/84956
14286         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14287         bb_has_abnormal_pred.
14289 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14291         PR sanitizer/85018
14292         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14293         DECL_INITIAL (decl) to decl at the end.
14294         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14295         adjust the comment.
14297 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14299         * doc/extend.texi (__builtin_tgmath): Document when complex
14300         integer types are treated as _Complex _Float64.
14302 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14304         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14306 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14308         PR tree-optimization/84960
14309         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14310         if it is ENTRY block, move them into single succ of ENTRY in that case.
14312 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14314         PR tree-optimization/84811
14315         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14316         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14317         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14318         (known_subrange_p): Update accordingly.  Cast each value involved
14319         in the size comparison, rather than casting the result of the
14320         subtraction.
14322 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14324         PR tree-optimization/84982
14325         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14326         by flipping the least significant bit rather than all bits from
14327         bitpos to bitpos + bitsize - 1.
14329 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14331         * doc/extend.texi (Deprecated Features): Remove mention of
14332         long-deleted deprecations.
14334 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14336         PR jit/84288
14337         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14338         * configure: Regenerate.
14340 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14342         PR tree-optimization/83126
14343         * tree-parloops.c (num_phis): New function.
14344         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14346 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14348         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14349         mention anon-struct/union members and trailing attributes.
14351 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14353         PR tree-optimization/84969
14354         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14355         builtin memset partitions if they set different rhs values.
14357 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14359         PR rtl-optimization/84989
14360         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14361         VEC_DUPLICATE with scalar result mode.
14363 2018-03-21  Martin Liska  <mliska@suse.cz>
14365         PR ipa/84963
14366         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14367         not intended return statement.
14369 2018-03-21  Martin Liska  <mliska@suse.cz>
14371         PR target/84988
14372         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14373         (chkp_find_bound_slots_1): Limit number of iterations.
14375 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14377         PR target/84838
14378         * Minor grammar fixes for x86 options.
14380 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14382         PR debug/84875
14383         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14384         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14386 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14388         PR target/83789
14389         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14390         (altivec_lvx_<mode>_1op): Likewise.
14391         (altivec_stvx_<mode>_2op): Likewise.
14392         (altivec_stvx_<mode>_1op): Likewise.
14393         (altivec_lvx_<VM2:mode>): New define_expand.
14394         (altivec_stvx_<VM2:mode>): Likewise.
14395         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14396         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14397         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14398         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14399         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14400         (rs6000_gen_lvx): Likewise.
14401         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14402         (altivec_expand_stv_builtin): Likewise.
14403         (altivec_expand_builtin): Likewise.
14404         * config/rs6000/vector.md: Likewise.
14406 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14408         PR target/82518
14409         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14410         BYTES_BIG_ENDIAN.
14412 2018-03-20  Richard Biener  <rguenther@suse.de>
14414         PR target/84986
14415         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14416         sign-conversions as zero, fall back to standard scalar_stmt
14417         cost for the rest.
14419 2018-03-20  Martin Liska  <mliska@suse.cz>
14421         PR ipa/84825
14422         * predict.c (rebuild_frequencies): Handle case when we have
14423         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14425 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14427         PR target/84990
14428         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14429         flag_section_anchors.
14430         * varasm.c (use_blocks_for_decl_p): Remove hack for
14431         dw2_force_const_mem.
14433         PR target/84845
14434         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14435         to ...
14436         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14437         be created, use lowpart_subreg of operands[0] rather than operands[0]
14438         itself.
14439         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14440         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14441         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14442         and n constraint instead of aarch64_shift_imm_di and Usd.
14443         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14444         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14446 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14448         PR target/82989
14449         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14450         to favor GPR over NEON registers.
14451         (<shift>di3_neon): Likewise.
14453 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14455         PR target/84952
14456         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14457         (nvptx_process_pars): Emit bar.sync asap and alap.
14459 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14461         PR target/84954
14462         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14463         seen_label if seen_label is already set.
14465 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14467         PR target/84945
14468         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14469         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14470         Use 1U instead of 1.  Formatting fixes.
14472         PR c/84953
14473         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14474         instead of TREE_TYPE (s1) for the return value.
14476 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14478         PR tree-optimization/84946
14479         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14480         bitsize + bitsize in poly_uint64 rather than poly_int64.
14482         PR sanitizer/78651
14483         * dwarf2asm.c: Include fold-const.c.
14484         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14485         of decl rather than decl itself.
14487         PR rtl-optimization/84643
14488         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14490 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14492         PR sanitizer/78651
14493         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14494         calling assemble_variable.
14496 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14498         PR target/81647
14499         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14500         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14502 2018-03-19  Jim Wilson  <jimw@sifive.com>
14504         PR bootstrap/84856
14505         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14506         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14507         (riscv_first_stack_step): Likewise.
14508         (riscv_option_override): Use STACK_BOUNDARY instead of
14509         MIN_STACK_BOUNDARY.
14510         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14511         MIN_STACK_BOUNDARY.
14512         (BIGGEST_ALIGNMENT): Set to 128.
14513         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14514         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14515         STACK_BOUNDARY.
14517 2018-03-19  Richard Biener  <rguenther@suse.de>
14519         PR tree-optimization/84933
14520         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14521         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14523 2018-03-19  Richard Biener  <rguenther@suse.de>
14525         PR tree-optimization/84859
14526         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14527         (cond_if_else_store_replacement): Perform sinking operation on
14528         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14529         Generalize what a BB with a single eligible store is.
14531 2018-03-19  Richard Biener  <rguenther@suse.de>
14533         PR tree-optimization/84929
14534         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14535         chrec_is_positive against non-chrec arg.
14537 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14539         PR target/84711
14540         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14542 2018-03-18  Martin Liska  <mliska@suse.cz>
14544         PR rtl-optimization/84635
14545         * regrename.c (build_def_use): Use matches_mode only when
14546         matches >= 0.
14548 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14550         PR tree-optimization/84913
14551         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14552         vectorize chains of COND_EXPRs.
14554 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14556         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14558 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14560         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14562 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14564         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14566 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14567             Kito Cheng  <kito.cheng@gmail.com>
14569         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14570         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14571         (nds32_adjust_reg_alloc_order): New function.
14572         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14574 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14576         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14577         nds32_print_operand, nds32_print_operand_address): Use
14578         HOST_WIDE_INT_PRINT_DEC instead.
14580 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14582         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14584 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14586         PR target/84902
14587         * config/i386/i386.c (initial_ix86_tune_features,
14588         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14589         unsigned long long.
14590         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14591         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14592         rather than 1u << ix86_tune.  Formatting fix.
14593         (ix86_option_override_internal): Change ix86_arch_mask from
14594         unsigned int to unsigned HOST_WIDE_INT, initialize to
14595         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14596         (ix86_function_specific_restore): Likewise.
14598 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14600         PR target/84899
14601         * postreload.c (reload_combine_recognize_pattern): Perform
14602         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14603         truncate_int_for_mode the result for the destination's mode.
14605         PR c/84909
14606         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14607         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14608         Likewise.
14609         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14610         Likewise.
14612 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14614         PR target/84876
14615         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14616         regno_allocno_class_array and sorted_pseudos.
14617         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14618         insns where regno is used.
14620 2018-03-16  Martin Liska  <mliska@suse.cz>
14622         PR ipa/84833
14623         * multiple_target.c (create_dispatcher_calls): Redirect
14624         reference in the symbol table.
14626 2018-03-16  Martin Liska  <mliska@suse.cz>
14628         PR ipa/84722
14629         * multiple_target.c (create_dispatcher_calls): Redirect also
14630         an alias.
14632 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14634         PR c++/79937
14635         PR c++/82410
14636         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14637         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14638         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14640 2018-03-16  Julia Koval  <julia.koval@intel.com>
14642         * doc/invoke.texi (Skylake Server): Add CLWB.
14643         Cannonlake): Remove CLWB.
14645 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14647         PR tree-optimization/84841
14648         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14649         1 << 3.
14650         (FLOAT_ONE_CONST_TYPE): Define.
14651         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14652         (sort_by_operand_rank): Put entries with higher constant_type last
14653         rather than first to match comments.
14655 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14657         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14658         split predicate.
14660 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14662         PR c++/79085
14663         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14664         check and use address of target always.
14666 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14668         PR target/84574
14669         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14670         (indirect_thunk_bnd_needed): Likewise.
14671         (indirect_thunks_used): Likewise.
14672         (indirect_thunks_bnd_used): Likewise.
14673         (indirect_return_needed): New.
14674         (indirect_return_bnd_needed): Likewise.
14675         (output_indirect_thunk_function): Add a bool argument for
14676         function return.
14677         (output_indirect_thunk_function): Don't generate alias for
14678         function return thunk.
14679         (ix86_code_end): Call output_indirect_thunk_function to generate
14680         function return thunks.
14681         (ix86_output_function_return): Set indirect_return_bnd_needed
14682         and indirect_return_needed instead of indirect_thunk_bnd_needed
14683         and indirect_thunk_needed.
14685 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14687         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14688         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14689         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14691 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14692             Paul Hua <paul.hua.gm@gmail.com>
14694         PR c/84852
14695         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14697 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14699         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14700         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14701         resp. SFmode cases.
14703 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14705         PR target/84711
14706         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14707         instead of GET_MODE_SIZE when comparing Units.
14709 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14711         PR target/68256
14712         * varasm.c (hash_section): Return an unchangeble hash value
14713         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14714         Return !aarch64_can_use_per_function_literal_pools_p ().
14716 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14718         PR target/84860
14719         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14720         rather than address of cmode as last argument to prepare_cmp_insn.
14722 2018-03-15  Julia Koval  <julia.koval@intel.com>
14724         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14725         F_AVX512VNNI, F_AVX512BITALG): New.
14727 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14729         PR target/83451
14730         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14731         insn for floating-point loads and stores.
14733 2018-03-14  Carl Love  <cel@us.ibm.com>
14735         * config/rs6000/rs6000-c.c: Add macro definitions for
14736         ALTIVEC_BUILTIN_VEC_PERMXOR.
14737         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14738         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14739         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14740         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14741         UNSPEC_VPERMXOR.
14742         * config/doc/extend.texi: Add prototypes for vec_permxor.
14744 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14746         PR c/84852
14747         * diagnostic-show-locus.c (class layout_point): Convert m_line
14748         from int to linenum_type.
14749         (line_span::comparator): Use linenum "compare" function when
14750         comparing line numbers.
14751         (test_line_span): New function.
14752         (layout_range::contains_point): Convert param "row" from int to
14753         linenum_type.
14754         (layout_range::intersects_line_p): Likewise.
14755         (layout::will_show_line_p): Likewise.
14756         (layout::print_source_line): Likewise.
14757         (layout::should_print_annotation_line_p): Likewise.
14758         (layout::print_annotation_line): Likewise.
14759         (layout::print_leading_fixits): Likewise.
14760         (layout::annotation_line_showed_range_p): Likewise.
14761         (struct line_corrections): Likewise for field m_row.
14762         (line_corrections::line_corrections): Likewise for param "row".
14763         (layout::print_trailing_fixits): Likewise.
14764         (layout::get_state_at_point): Likewise.
14765         (layout::get_x_bound_for_row): Likewise.
14766         (layout::print_line): Likewise.
14767         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14768         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14769         * input.c (selftest::test_linenum_comparisons): New function.
14770         (selftest::input_c_tests): Call it.
14771         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14772         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14773         * selftest.h (ASSERT_GT): New macro.
14774         (ASSERT_GT_AT): New macro.
14775         (ASSERT_LT): New macro.
14776         (ASSERT_LT_AT): New macro.
14778 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14780         PR rtl-optimization/84780
14781         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14783 2018-03-14  Martin Liska  <mliska@suse.cz>
14785         * tree.c (record_node_allocation_statistics): Use
14786         get_stats_node_kind.
14787         (get_stats_node_kind): New function extracted from
14788         record_node_allocation_statistics.
14789         (free_node): Use get_stats_node_kind.
14791 2018-03-14  Richard Biener  <rguenther@suse.de>
14793         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14794         that the value-set of ANTIC_IN doesn't grow.
14796         Revert
14797         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14798         member.
14799         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14800         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14802 2018-03-14  Julia Koval  <julia.koval@intel.com>
14804         * config.gcc (icelake-client, icelake-server): New.
14805         (icelake): Remove.
14806         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14807         (initial_ix86_arch_features): Ditto.
14808         (PTA_SKYLAKE): Add SGX.
14809         (PTA_ICELAKE): Remove.
14810         (PTA_ICELAKE_CLIENT): New.
14811         (PTA_ICELAKE_SERVER): New.
14812         (ix86_option_override_internal): Split up icelake on icelake client and
14813         icelake server.
14814         (get_builtin_code_for_version): Ditto.
14815         (fold_builtin_cpu): Ditto.
14816         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14817         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14818         * config/i386/i386.h (processor_type): Ditto.
14819         * doc/invoke.texi: Ditto.
14821 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14823         PR sanitizer/83392
14824         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14825         INTEGER_CST offset, add it together with bitpos / 8 and
14826         sign extend based on POINTER_SIZE.
14828         PR target/84844
14829         Revert
14830         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14832         PR target/78090
14833         * config/i386/constraints.md (Yc): New register constraint.
14834         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14835         Use Yc constraint for alternative 2 of operand 0.  Remove
14836         preferred_for_speed attribute.
14838 2018-03-14  Richard Biener  <rguenther@suse.de>
14840         PR tree-optimization/84830
14841         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14842         with the old one to avoid oscillations.
14844 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14846         PR target/83712
14847         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14848         pseudos.
14849         (assign_by_spills): Return a flag of reload assignment failure.
14850         Do not process the reload assignment failures.  Do not spill other
14851         reload pseudos if they has the same reg class.  Update n if
14852         necessary.
14853         (lra_assign): Add a return arg.  Set up from the result of
14854         assign_by_spills call.
14855         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14856         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14857         usage_insns if it is not NULL.
14858         (spill_hard_reg_in_range): New function.
14859         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14860         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14861         function prototypes.
14862         (lra_assign): Change prototype.
14863         * lra.c (lra): Add code to deal with fails by splitting hard reg
14864         live ranges.
14866 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14868         * config/riscv/riscv.opt (mrelax): New option.
14869         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14870         "norelax" when riscv_mrelax is disabled.
14871         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14873 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14875         PR target/84743
14876         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14877         reassociation for int modes.
14879 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14881         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14882         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14883         for big-endian.
14884         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14885         * config/aarch64/aarch64-sve.md
14886         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14887         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14888         (*extend<mode><Vwide>2): Rename to...
14889         (aarch64_sve_extend<mode><Vwide>2): ...this.
14890         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14891         renaming the old pattern to...
14892         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14893         unsigned packs.
14894         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14895         define_expand, renaming the old pattern to...
14896         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14897         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14898         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14899         account when deciding which SVE instruction the optab should use.
14900         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14902 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14904         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14905         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14906         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14907         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14908         (tlsdesc_small_<mode>): Turn a define_expand and use
14909         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14910         (tlsdesc_small_advsimd_<mode>): ...this.
14911         (tlsdesc_small_sve_<mode>): New pattern.
14913 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14915         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14916         (UNSPEC_UMUL_HIGHPART): New constants.
14917         (MUL_HIGHPART): New int iteraor.
14918         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14919         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14920         define_expand.
14921         (*<su>mul<mode>3_highpart): New define_insn.
14923 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14925         PR lto/84805
14926         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14927         incomplete types.
14929 2018-03-13  Martin Liska  <mliska@suse.cz>
14931         PR ipa/84658.
14932         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14933         vector.
14934         (sem_item_optimizer::~sem_item_optimizer): Release it.
14935         (sem_item_optimizer::merge_classes): Register variable aliases.
14936         (sem_item_optimizer::fixup_pt_set): New function.
14937         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14938         * ipa-icf.h: Declare new variables and functions.
14940 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14942         PR middle-end/84834
14943         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14944         integer_pow2p@2 and test integer_pow2p in condition.
14945         (A < 0 ? C : 0): Similarly for @1.
14947         PR middle-end/84831
14948         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14949         characters starting at p contain '\0' character, don't look beyond
14950         that.
14952         PR target/84827
14953         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14954         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14956         PR target/84828
14957         * reg-stack.c (change_stack): Change update_end var from int to
14958         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14959         also call set_block_for_insn on the newly added insns and rescan.
14961         PR target/84786
14962         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14963         on the last operand.
14965         PR c++/84704
14966         * tree.c (stabilize_reference_1): Return save_expr (e) for
14967         STATEMENT_LIST even if it doesn't have side-effects.
14969 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14971         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14973 2018-03-12  Renlin Li  <renlin.li@arm.com>
14975         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14976         aarch64_output_scalar_simd_mov_immediate.
14978 2018-03-12  Martin Sebor  <msebor@redhat.com>
14980         PR tree-optimization/83456
14981         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14982         for perfectly overlapping calls to memcpy.
14983         (gimple_fold_builtin_memory_chk): Same.
14984         (gimple_fold_builtin_strcpy): Handle no-warning.
14985         (gimple_fold_builtin_stxcpy_chk): Same.
14986         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14988 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14990         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14991         parameter.  Use it for SFmode.
14992         (rs6000_function_arg_advance_1): Adjust.
14993         (rs6000_function_arg): Adjust.
14994         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14996 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14998         PR rtl-optimization/84169
14999         PR rtl-optimization/84780
15000         * combine.c (can_combine_p): Check for a 2-insn combination whether
15001         the destination register is used between the two insns, too.
15003 2018-03-12  Richard Biener  <rguenther@suse.de>
15005         PR tree-optimization/84803
15006         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
15007         for refs DR analysis didn't process.
15009 2018-03-12  Richard Biener  <rguenther@suse.de>
15011         PR tree-optimization/84777
15012         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
15013         force-vectorize loops ignore whether we are optimizing for size.
15015 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15017         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
15018         (TARGET_MD_ASM_ADJUST): Define.
15020 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
15021             Kito Cheng  <kito.cheng@gmail.com>
15022             Chung-Ju Wu  <jasonwucj@gmail.com>
15024         * config/nds32/nds32.c (nds32_compute_stack_frame,
15025         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
15026         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
15027         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
15028         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
15029         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
15030         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
15031         * config/nds32/nds32.md (prologue, epilogue): Use macro
15032         NDS32_V3PUSH_AVAILABLE_P to do checking.
15034 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
15036         PR debug/58150
15037         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
15038         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
15039         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
15040         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
15041         addition of most attributes on !orig_type_die or the attribute not
15042         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
15044 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15045             Chung-Ju Wu  <jasonwucj@gmail.com>
15047         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
15048         __NDS32_VH__ macro.
15049         * config/nds32/nds32.opt (mvh): New option.
15051 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15052             Chung-Ju Wu  <jasonwucj@gmail.com>
15054         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
15055         function.
15056         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
15057         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
15058         definition.
15060 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
15061             Chung-Ju Wu  <jasonwucj@gmail.com>
15063         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
15064         function.
15065         * config/nds32/nds32-multiple.md (strlensi): New pattern.
15066         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
15068 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
15069             Kito Cheng  <kito.cheng@gmail.com>
15070             Chung-Ju Wu  <jasonwucj@gmail.com>
15072         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
15073         UNSPEC_FFMISM and UNSPEC_FLMISM.
15074         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
15075         for ffb, ffmism and flmism.
15076         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
15077         (unspec_ffmism): Ditto.
15078         (unspec_flmism): Ditto.
15079         (nds32_expand_builtin_impl): Check if string extension is available.
15080         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
15081         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
15083 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
15085         Reverting patch:
15086         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15088         PR target/83712
15089         * lra-assigns.c (assign_by_spills): Return a flag of reload
15090         assignment failure.  Do not process the reload assignment
15091         failures.  Do not spill other reload pseudos if they has the same
15092         reg class.
15093         (lra_assign): Add a return arg.  Set up from the result of
15094         assign_by_spills call.
15095         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15096         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15097         usage_insns if it is not NULL.
15098         (spill_hard_reg_in_range): New function.
15099         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15100         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15101         function prototypes.
15102         (lra_assign): Change prototype.
15103         * lra.c (lra): Add code to deal with fails by splitting hard reg
15104         live ranges.
15106 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
15108         PR target/84807
15109         * config/i386/i386.opt: Replace Enforcment with Enforcement.
15111 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
15113         PR debug/84620
15114         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
15115         (dw_val_node): Add val_symbolic_view.
15116         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
15117         (symview_upper_bound): New.
15118         (new_line_info_table): Initialize symviews_since_reset.
15119         (dwarf2out_source_line): Count symviews_since_reset and set
15120         symview_upper_bound.
15121         (dw_val_equal_p): Handle symview.
15122         (add_AT_symview): New.
15123         (print_dw_val): Handle symview.
15124         (attr_checksum, attr_checksum_ordered): Likewise.
15125         (same_dw_val_p, size_of_die): Likewise.
15126         (value_format, output_die): Likewise.
15127         (add_high_low_attributes): Use add_AT_symview for entry_view.
15128         (dwarf2out_finish): Reset symview_upper_bound, clear
15129         zero_view_p.
15131 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
15133         PR target/83969
15134         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
15135         Add strict argument and use it.
15136         (rs6000_split_multireg_move): Update for new strict argument.
15137         (mem_operand_gpr): Disallow all non-offsettable addresses.
15138         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
15140 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
15142         PR target/84772
15143         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
15144         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
15145         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15147         PR c++/84767
15148         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15149         decl, use remap_type if we want to use the type.
15151 2018-03-09  Martin Sebor  <msebor@redhat.com>
15153         PR tree-optimization/84526
15154         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15155         Remove dead code.
15156         (builtin_access::generic_overlap): Be prepared to handle non-array
15157         base objects.
15159 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15161         PR rtl-optimization/84682
15162         * lra-constraints.c (process_address_1): Check is_address flag
15163         for address constraints.
15164         (process_alt_operands): Likewise.
15165         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15166         preprocess_constraints.
15167         * recog.h (preprocess_constraints): Add oploc parameter.
15168         Adjust callers.
15169         * recog.c (preprocess_constraints): Test address_operand for
15170         CT_ADDRESS constraints.
15172 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15174         PR target/83712
15175         * lra-assigns.c (assign_by_spills): Return a flag of reload
15176         assignment failure.  Do not process the reload assignment
15177         failures.  Do not spill other reload pseudos if they has the same
15178         reg class.
15179         (lra_assign): Add a return arg.  Set up from the result of
15180         assign_by_spills call.
15181         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15182         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15183         usage_insns if it is not NULL.
15184         (spill_hard_reg_in_range): New function.
15185         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15186         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15187         function prototypes.
15188         (lra_assign): Change prototype.
15189         * lra.c (lra): Add code to deal with fails by splitting hard reg
15190         live ranges.
15192 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15194         PR target/83193
15195         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15196         Accept complain bool parameter.  Only emit errors if it is true.
15197         (arm_parse_cpu_option_name): Likewise.
15198         (arm_target_thumb_only): Adjust callers of the above.
15199         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15200         prototype to take a default true bool parameter.
15201         (arm_parse_arch_option_name): Likewise.
15203 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15204             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15206         PR jit/64089
15207         PR jit/84288
15208         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15209         * configure: Regenerate.
15210         * configure.ac ("linker --version-script option"): New.
15211         ("linker soname option"): New.
15213 2018-03-09  Richard Biener  <rguenther@suse.de>
15215         PR tree-optimization/84775
15216         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15217         immediate uses of predicate stmts and mark them modified.
15219         Revert
15220         PR tree-optimization/84178
15221         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15222         to caller.
15223         (version_loop_for_if_conversion): Delay update_ssa call.
15224         (tree_if_conversion): Delay update_ssa until after predicate
15225         insertion.
15227 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15229         PR target/84763
15230         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15231         when the function accesses prior frames.
15233 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15235         PR debug/84456
15236         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15237         gen_llsym, otherwise call maybe_gen_llsym.
15239         PR inline-asm/84742
15240         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15241         has ',' character inside of it.
15243 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15245         PR target/84748
15246         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15247         as clobbering CC_REGNUM.
15249 2018-03-08  Richard Biener  <rguenther@suse.de>
15251         PR middle-end/84552
15252         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15253         (follow_copies_to_constant): Do not follow SSA names registered
15254         for update.
15256 2018-03-08  Richard Biener  <rguenther@suse.de>
15258         PR tree-optimization/84178
15259         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15260         to caller.
15261         (version_loop_for_if_conversion): Delay update_ssa call.
15262         (tree_if_conversion): Delay update_ssa until after predicate
15263         insertion.
15265 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15267         PR tree-optimization/84178
15268         * tree-if-conv.c (release_bb_predicate): Remove the
15269         the assertion that the stmts have NULL use_ops.
15270         Discard the statements, asserting that they haven't
15271         yet been added to a BB.
15273 2018-03-08  Richard Biener  <rguenther@suse.de>
15275         PR tree-optimization/84746
15276         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15277         (phi_translate): Pass in destination ANTIC_OUT set.
15278         (phi_translate_1): Likewise.  For a simplified result lookup
15279         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15280         (phi_translate_set): Adjust.
15281         (do_pre_regular_insertion): Likewise.
15282         (do_pre_partial_partial_insertion): Likewise.
15284 2018-03-08  Martin Liska  <mliska@suse.cz>
15286         PR gcov-profile/84735
15287         * doc/gcov.texi: Document usage of profile files.
15288         * gcov-io.h: Document changes in the format.
15290 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15292         PR debug/84404
15293         PR debug/84408
15294         * dwarf2out.c (struct dw_line_info_table): Update comments for
15295         view == -1.
15296         (FORCE_RESET_NEXT_VIEW): New.
15297         (FORCE_RESETTING_VIEW_P): New.
15298         (RESETTING_VIEW_P): Check for -1 too.
15299         (ZERO_VIEW_P): Likewise.
15300         (new_line_info_table): Force-reset next view.
15301         (dwarf2out_begin_function): Likewise.
15302         (dwarf2out_source_line): Simplify zero_view_p initialization.
15303         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15304         view directly.  Omit view when omitting .loc at line 0.
15306 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15308         PR tree-optimization/84740
15309         * tree-switch-conversion.c (process_switch): Call build_constructors
15310         only if info.phi_count is non-zero.
15312         PR tree-optimization/84739
15313         * tree-tailcall.c (find_tail_calls): Check call arguments against
15314         DECL_ARGUMENTS (current_function_decl) rather than
15315         DECL_ARGUMENTS (func) when checking for tail recursion.
15317 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15319         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15320         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15321         Volker Reichelt's entry and add entries for people that perform
15322         GCC fuzzy testing and report numerous bugs.
15324 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15326         PR target/82411
15327         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15328         readonly data in sdata, if that is disabled.
15329         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15330         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15331         -mreadonly-in-sdata option.
15333 2018-03-07  Martin Sebor  <msebor@redhat.com>
15335         PR tree-optimization/84468
15336         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15337         basic block when looking for nul assignment.
15339 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15341         PR target/84277
15342         * except.h (output_function_exception_table): Adjust prototype.
15343         * except.c (output_function_exception_table): Remove FNNAME parameter
15344         and add SECTION parameter.  Ouput one part of the table at a time.
15345         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15346         the first part of the exception table and emit unwind directives.
15347         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15348         (i386_pe_seh_cold_init): Likewise.
15349         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15350         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15351         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15352         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15353         * config/i386/winnt.c: Include except.h.
15354         (struct seh_frame_state): Add reg_offset, after_prologue and
15355         in_cold_section fields.
15356         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15357         (i386_pe_seh_cold_init): New function.
15358         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15359         to seh->in_cold_section.
15360         (seh_emit_push): Record the offset of the push.
15361         (seh_emit_save): Record the offet of the save.
15362         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15363         Test seh->after_prologue to disregard the epilogue.
15364         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15365         (i386_pe_end_cold_function): New function.
15367 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15369         PR fortran/84565
15370         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15371         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15373         PR c++/84704
15374         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15375         on tmp_var.
15376         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15377         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15379         PR middle-end/84723
15380         * multiple_target.c: Include tree-inline.h and intl.h.
15381         (expand_target_clones): Diagnose and fail if node->definition and
15382         !tree_versionable_function_p (node->decl).
15384 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15386         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15387         sprint_ul.
15388         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15389         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15390         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15392 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15394         PR target/84710
15395         * combine.c (try_combine): Use reg_or_subregno instead of handling
15396         just paradoxical SUBREGs and REGs.
15398 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15400         * config/arc/arc.c (arc_finalize_pic): Remove function.
15401         (arc_must_save_register): We use single base PIC register, remove
15402         checks to save/restore the PIC register.
15403         (arc_expand_prologue): Likewise.
15404         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15405         Remove.
15406         (arc_verify_short): Likewise.
15407         (arc_attr_type): Likewise.
15408         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15409         (walk_stores): Likewise.
15410         (arc_address_cost): Make it static.
15411         (arc_verify_short): Likewise.
15412         (branch_dest): Likewise.
15413         (arc_attr_type): Likewise.
15414         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15415         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15416         (arc_final_prescan_insn): Remove inserting the nops due to
15417         hardware hazards.  It is done in reorg step.
15418         (insn_length_variant_t): Remove.
15419         (insn_length_parameters_t): Likewise.
15420         (arc_insn_length_parameters): Likewise.
15421         (arc_get_insn_variants): Likewise.
15422         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15424 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15426         PR inline-asm/84683
15427         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15428         assertion failure.
15430         PR tree-optimization/84687
15431         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15432         on new_node->decl.
15433         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15435 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15437         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15438         Rename to ppc_speculation_barrier.
15439         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15440         __builtin_ppc_speculation_barrier.
15442 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15444         PR target/84700
15445         * combine.c (combine_simplify_rtx): Don't try to simplify if
15446         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15447         are equal to x.
15449 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15451         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15452         to 32 bytes when compiling for POWER9.
15454 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15456         PR target/84564
15457         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15458         regparm >= 3 with no arg reg available also for calls with
15459         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15461         PR target/84524
15462         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15463         orig,vex.
15464         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15466 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15468         PR target/84264
15469         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15471 2018-03-05  Richard Biener  <rguenther@suse.de>
15473         PR tree-optimization/84486
15474         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15475         When inserting a __builtin_assume_aligned call set the LHS
15476         SSA name alignment info accordingly.
15478 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15480         PR tree-optimization/84114
15481         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15482         Avoid reassociation of FLOAT_MODE addition.
15484 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15486         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15487         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15488         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15489         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15490         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15491         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15492         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15493         and -mwbnoinvd.
15494         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15495         __builtin_ia32_wbinvd): New builtins.
15496         (SPECIAL_ARGS2): New.
15497         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15498         (SPECIAL_ARGS2): New.
15499         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15500         (ix86_valid_target_attribute_inner_p): Ditto.
15501         (ix86_init_mmx_sse_builtins): Add special_args2.
15502         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15503         TARGET_WBNOINVD_P): New.
15504         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15505         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15506         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15507         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15508         * config/i386/pconfigintrin.h: New file.
15509         * config/i386/wbnoinvdintrin.h: Ditto.
15510         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15511         wbnoinvdintrin.h.
15512         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15514 2018-03-05  Richard Biener  <rguenther@suse.de>
15516         PR tree-optimization/84670
15517         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15518         member.
15519         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15520         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15521         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15522         doesn't grow if all successors (recursively) were visited at least
15523         once.
15525 2018-03-05  Richard Biener  <rguenther@suse.de>
15527         PR tree-optimization/84650
15528         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15529         if executed in the loop pipeline.
15531 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15533         * doc/configfiles.texi (Configuration Files): Move info about
15534         conditionalizing $target-protos.h to...
15535         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15536         differs from $target-protos.h.
15538 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15539             Chung-Ju Wu  <jasonwucj@gmail.com>
15541         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15542         * config/nds32/nds32-multiple.md (setmemsi): Define.
15543         * config/nds32/nds32-memory-manipulation.c
15544         (nds32_gen_dup_4_byte_to_word_value): New.
15545         (emit_setmem_word_loop): New.
15546         (emit_setmem_byte_loop): New.
15547         (nds32_expand_setmem_loop): New.
15548         (nds32_expand_setmem_loop_v3m): New.
15549         (nds32_expand_setmem_unroll): New.
15550         (nds32_expand_setmem): New.
15552 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15553             Chung-Ju Wu  <jasonwucj@gmail.com>
15555         * config/nds32/nds32-memory-manipulation.c
15556         (nds32_emit_load_store): New.
15557         (nds32_emit_post_inc_load_store): New.
15558         (nds32_emit_mem_move): New.
15559         (nds32_emit_mem_move_block): New.
15560         (nds32_expand_movmemsi_loop_unknown_size): New.
15561         (nds32_expand_movmemsi_loop_known_size): New.
15562         (nds32_expand_movmemsi_loop): New.
15563         (nds32_expand_movmemsi_unroll): New.
15564         (nds32_expand_movmemqi): Rename ...
15565         (nds32_expand_movmemsi): ... to this.
15566         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15567         (movmemsi): ... to this.
15568         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15569         (nds32_expand_movmemsi): ... to this.
15571 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15572             Monk Chiang  <sh.chiang04@gmail.com>
15573             Chung-Ju Wu  <jasonwucj@gmail.com>
15575         * config/nds32/nds32-protos.h
15576         (nds32_expand_load_multiple): New arguments.
15577         (nds32_expand_store_multiple): Ditto.
15578         (nds32_valid_multiple_load_store): Rename ...
15579         (nds32_valid_multiple_load_store_p): ... to this.
15580         * config/nds32/nds32-memory-manipulation.c
15581         (nds32_expand_load_multiple): Refine implementation.
15582         (nds32_expand_store_multiple): Ditto.
15583         * config/nds32/nds32-multiple.md
15584         (load_multiple): Update nds32_expand_load_multiple interface.
15585         (store_multiple): Update nds32_expand_store_multiple interface.
15586         * config/nds32/nds32-predicates.c
15587         (nds32_valid_multiple_load_store): Rename ...
15588         (nds32_valid_multiple_load_store_p): ... to this and refine
15589         implementation.
15590         * config/nds32/predicates.md
15591         (nds32_load_multiple_and_update_address_operation): New predicate.
15592         (nds32_store_multiple_and_update_address_operation): New predicate.
15594 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15595             Chung-Ju Wu  <jasonwucj@gmail.com>
15597         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15598         (combo): New attribute.
15599         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15601 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15603         * config/nds32/nds32.opt: Change -mcmodel= default value.
15605 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15606             Monk Chiang  <sh.chiang04@gmail.com>
15607             Chung-Ju Wu  <jasonwucj@gmail.com>
15609         * config/nds32/constants.md (unspec_element): New enum.
15610         * config/nds32/constraints.md (Umw): New constraint.
15611         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15612         * config/nds32/nds32-intrinsic.md: Likewise.
15613         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15614         (nds32_valid_smw_lwm_base_p): New.
15615         (nds32_output_smw_single_word): New.
15616         (nds32_output_lmw_single_word): New.
15617         (nds32_expand_unaligned_load): New.
15618         (nds32_expand_unaligned_store): New.
15619         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15620         (nds32_output_smw_single_word): Declare.
15621         (nds32_output_lmw_single_word): Declare.
15622         (nds32_expand_unaligned_load): Declare.
15623         (nds32_expand_unaligned_store): Declare.
15624         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15625         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15626         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15627         NDS32_BUILTIN_UASTORE_DW.
15628         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15629         predicate.
15631 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15632             Kito Cheng  <kito.cheng@gmail.com>
15633             Chung-Ju Wu  <jasonwucj@gmail.com>
15635         * config/nds32/nds32-intrinsic.c
15636         (nds32_expand_builtin_null_ftype_reg): Delete.
15637         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15638         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15639         (nds32_read_argument): New.
15640         (nds32_legitimize_target): Ditto.
15641         (nds32_legitimize_argument): Ditto.
15642         (nds32_check_constant_argument): Ditto.
15643         (nds32_expand_unop_builtin): Ditto.
15644         (nds32_expand_unopimm_builtin): Ditto.
15645         (nds32_expand_binop_builtin): Ditto.
15646         (nds32_builtin_decl_impl): Ditto.
15647         (builtin_description): Ditto.
15648         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15649         (nds32_init_builtins_impl): Ditto.
15650         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15651         (nds32_builtin_decl): New.
15652         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15653         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15655 2018-03-02  Jeff Law  <law@redhat.com>
15657         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15658         (redundant_insn, fill_simple_delay_slots): Likewise.
15659         (fill_slots_from_thread): Likewise.
15660         * resource.c (mark_referenced_resources): Likewise.
15661         (mark_set_resources, find_dead_or_set_registers): Likewise.
15663 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15665         * substring-locations.h (format_warning_va): Formatting fix for
15666         ATTRIBUTE_GCC_DIAG.
15667         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15668         argument.
15669         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15670         * substring-locations.c: Include intl.h.
15671         (format_warning_va): Turned into small wrapper around
15672         format_warning_n_va, renamed to ...
15673         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15674         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15675         use ngettext.
15676         (format_warning_at_substring_n): New function.
15677         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15678         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15679         format_warning_at_substring with just a shorter name instead of
15680         const function pointer.
15681         (fmtwarn_n): New function.
15682         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15683         appropriate, get rid of all the fmtstr temporaries, move conditionals
15684         with G_() wrapped string literals directly into fmtwarn arguments,
15685         cast dir.len to (int), formatting fixes.
15687 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15689         * doc/invoke.texi: Remove "Cilk Plus" references.
15691 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15692             Richard Biener  <rguenther@suse.de>
15694         PR ipa/84628
15695         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15696         for error or warning attributes if CALL_FROM_THUNK_P is set.
15697         Formatting fixes.
15699 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15701         PR target/56540
15702         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15703         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15705         PR target/56540
15706         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15707         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15709         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15710         instead of -1U in last predictors element's probability member.
15712 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15714         PR ipa/83983
15715         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15716         arguments if they are comparable.
15718 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15720         PR tree-optimization/84634
15721         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15722         masks and masked_loop_p with a single loop_masks, making sure it's
15723         null for bb vectorization.
15725 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15727         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15728         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15729         loop->force_vectorize to check whether there is no alias.
15731 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15733         PR target/84614
15734         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15735         prototypes.
15736         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15737         comments.
15738         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15739         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15740         instead of a loop around prev_real_insn.
15741         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15742         prev_real_insn.
15744         PR inline-asm/84625
15745         * config/i386/i386.c (ix86_print_operand): Use conditional
15746         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15747         zero vector.
15749 2018-03-02  Richard Biener  <rguenther@suse.de>
15751         PR tree-optimization/84427
15752         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15753         (bitmap_set_subtract_values): Rewrite to handle multiple
15754         exprs per value.
15755         (clean): Likewise.
15756         (prune_clobbered_mems): Likewise.
15757         (phi_translate): Take edge instead of pred/phiblock.
15758         (phi_translate_1): Likewise.
15759         (phi_translate_set): Likewise.  Insert all translated
15760         exprs for a value into the set, keeping possibly multiple
15761         expressions per value.
15762         (compute_antic_aux): Adjust for phi_translate changes.
15763         When intersecting union the expressions and prune those
15764         not in the final value set, keeping possibly multiple
15765         expressions per value.  Do not use value-insertion
15766         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15767         all expressions.  Add verification that the value-sets
15768         only shrink during iteration.
15769         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15770         (do_pre_regular_insertion): Likewise.
15771         (do_pre_partial_partial_insertion): Likewise.
15773 2018-03-02  Richard Biener  <rguenther@suse.de>
15775         PR target/82005
15776         * config/darwin.c (saved_debug_info_level): New static global.
15777         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15778         (darwin_asm_lto_end): Restore debug info generation settings.
15780 2018-03-01  Martin Liska  <mliska@suse.cz>
15782         PR sanitizer/82484
15783         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15784         volatile arguments.
15786 2018-03-01  Richard Biener  <rguenther@suse.de>
15788         PR debug/84645
15789         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15790         type annotation with LTO when debug was disabled at compile-time.
15792 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15794         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15795         XINT with INTVAL.
15796         (mips_final_postscan_insn): Likewise.
15798 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15800         PR rtl-optimization/84528
15801         * alias.c (init_alias_target): Add commentary.
15802         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15803         a unique base value if the frame pointer is not eliminated
15804         to the stack pointer.
15806 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15808         PR rtl-optimization/83327
15809         * lra-int.h (hard_regs_spilled_into): Declare.
15810         * lra.c (hard_regs_spilled_into): Define.
15811         (init_reg_info): Init hard_regs_spilled_into.
15812         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15813         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15814         (process_bb_lives): Handle hard_regs_spilled_into.
15815         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15816         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15818 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15820         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15821         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15822         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15823         * config/rs6000/aix72.h: New file.
15825 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15827         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15828         instead of warning_at with conditional singular and plural messages
15829         where possible.
15831         PR target/52991
15832         * stor-layout.c (update_alignment_for_field): For
15833         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15834         && !DECL_PACKED (field), do the alignment update, just use
15835         only desired_align instead of MAX (type_align, desired_align)
15836         as the alignment.
15837         (place_field): Don't do known_align < desired_align handling
15838         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15839         is non-NULL, instead do it after rli->prev_field handling and
15840         only if not within a bitfield word.  For DECL_PACKED (field)
15841         use type_align of BITS_PER_UNIT.
15843 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15845         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15846         superfluous parentheses and trailing spaces.
15848 2018-02-28  Richard Biener  <rguenther@suse.de>
15850         PR tree-optimization/84584
15851         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15852         SCoPs with fake exit edge.
15854 2018-02-28  Martin Liska  <mliska@suse.cz>
15856         PR testsuite/84597
15857         * timevar.c (timer::print): Fix format to properly print 100%
15858         values.
15860 2018-02-28  Richard Biener  <rguenther@suse.de>
15862         PR middle-end/84607
15863         * genmatch.c (capture_info::walk_match): Do not mark
15864         captured expressions without operands as expr_p given
15865         they act more like predicates and should be subject to
15866         "lost tail" side-effect preserving.
15868 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15870         PR rtl-optimization/81611
15871         * auto-inc-dec.c (attempt_change): Move dead note from
15872         mem_insn if it's the next use of regno
15873         (find_address): Take address use of reg holding
15874         non-incremented value.  Add parm to limit search to the named
15875         reg only.
15876         (merge_in_block): Attempt to use a mem insn that is the next
15877         use of the original regno.
15879 2018-02-27  Martin Sebor  <msebor@redhat.com>
15881         PR c++/83871
15882         * doc/invoke.texi (-Wmissing-attributes): New option.
15883         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15885 2018-02-27  Martin Sebor  <msebor@redhat.com>
15887         PR translation/84207
15888         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15889         n argument to unsigned HOST_WIDE_INT.
15890         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15891         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15892         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15893         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15895 2018-02-27  Richard Biener  <rguenther@suse.de>
15897         PR tree-optimization/84512
15898         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15899         Do not use the estimate returned from record_stmt_cost for
15900         the scalar iteration cost but sum properly using add_stmt_cost.
15902 2018-02-27  Richard Biener  <rguenther@suse.de>
15904         PR tree-optimization/84466
15905         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15906         Adjust last change to less strictly validate use operands.
15908 2018-02-27  Martin Liska  <mliska@suse.cz>
15910         PR gcov-profile/84548
15911         * gcov.c (process_file): Allow partial overlap and consider it
15912         also as group functions.
15913         (output_lines): Properly calculate range of lines for a group.
15915 2018-02-27  Martin Liska  <mliska@suse.cz>
15917         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15918         'ggc' suffixes.  Change first column width.
15919         (timer::print): Fix formatting of the column.
15921 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15923         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15924         preserve inline entry blocks for the sake of debug inline
15925         entry point markers alone.
15926         (remove_unused_locals): Suggest in comments a better place to
15927         force the preservation of inline entry blocks that are
15928         otherwise unused, but do not preserve them.
15930 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15932         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15934 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15936         PR target/84039
15937         * config/i386/constraints.md (Bs): Replace
15938         ix86_indirect_branch_register with
15939         TARGET_INDIRECT_BRANCH_REGISTER.
15940         (Bw): Likewise.
15941         * config/i386/i386.md (indirect_jump): Likewise.
15942         (tablejump): Likewise.
15943         (*sibcall_memory): Likewise.
15944         (*sibcall_value_memory): Likewise.
15945         Peepholes of indirect call and jump via memory: Likewise.
15946         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15947         (*sibcall_value_GOT_32): Likewise.
15948         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15949         (GOT_memory_operand): Likewise.
15950         (call_insn_operand): Likewise.
15951         (sibcall_insn_operand): Likewise.
15952         (GOT32_symbol_operand): Likewise.
15953         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15955 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15957         PR rtl-optimization/83496
15958         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15959         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15960         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15961         redundant insn, if any.
15962         (relax_delay_slots): Likewise.
15963         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15965 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15967         PR tree-optimization/83965
15968         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15969         that grouped statements are part of a reduction chain.  Return
15970         true if the statement is not marked as a reduction itself but
15971         is part of a group.
15972         (vect_recog_dot_prod_pattern): Don't check whether the statement
15973         is part of a group here.
15974         (vect_recog_sad_pattern): Likewise.
15975         (vect_recog_widen_sum_pattern): Likewise.
15977 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15979         PR debug/84545
15980         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15982 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15984         PR target/84530
15985         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15986         the bool argument.
15987         (ix86_output_indirect_function_return): New prototype.
15988         (ix86_split_simple_return_pop_internal): Likewise.
15989         * config/i386/i386.c (indirect_return_via_cx): New.
15990         (indirect_return_via_cx_bnd): Likewise.
15991         (indirect_thunk_name): Handle return va CX_REG.
15992         (output_indirect_thunk_function): Create alias for
15993         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15994         (ix86_output_indirect_jmp): Remove the bool argument.
15995         (ix86_output_indirect_function_return): New function.
15996         (ix86_split_simple_return_pop_internal): Likewise.
15997         * config/i386/i386.md (*indirect_jump): Don't pass false
15998         to ix86_output_indirect_jmp.
15999         (*tablejump_1): Likewise.
16000         (simple_return_pop_internal): Change it to define_insn_and_split.
16001         Call ix86_split_simple_return_pop_internal to split it for
16002         -mfunction-return=.
16003         (simple_return_indirect_internal): Call
16004         ix86_output_indirect_function_return instead of
16005         ix86_output_indirect_jmp.
16007 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
16009         PR bootstrap/84405
16010         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
16011         memset and value initialization afterwards.
16013 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
16015         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
16017 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16019         PR target/84521
16020         * common/config/aarch64/aarch64-common.c
16021         (aarch_option_optimization_table[]): Switch
16022         off fomit-frame-pointer
16024 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16025             Chung-Ju Wu  <jasonwucj@gmail.com>
16027         * config/nds32/nds32-multiple.md (load_multiple): Disallow
16028         volatile memory.
16029         (store_multiple): Ditto.
16031 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
16033         * config.gcc: Add --with-cpu support for nds32 target.
16034         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
16035         * config/nds32/nds32.opt: Add -mcpu= option.
16037 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
16039         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
16040         isel=yes): Warn for these deprecated options.
16042 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
16044         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
16045         ISA_2_5_MASKS_EMBEDDED.
16047 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
16049         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
16050         p->max as pointers rather than using iterative_hash_expr.
16052 2018-02-23  Carl Love  <cel@us.ibm.com>
16054         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
16055         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
16056         BU_P8V_OVERLOAD_2.
16057         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
16058         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
16059         P8V_BUILTIN_VEC_VUNSIGNED2.
16061 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
16063         PR target/81572
16064         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
16065         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
16066         LRA_UNKNOWN_ALT.
16067         * lra-constraints.c (curr_insn_transform): Set up
16068         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
16069         LRA_UNKNOWN_ALT.
16070         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
16071         * lra-eliminations.c (spill_pseudos): Ditto.
16072         (process_insn_for_elimination): Ditto.
16073         * lra-lives.c (reg_early_clobber_p): Use the new macros.
16074         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
16075         LRA_NON_CLOBBERED_ALT.
16077 2018-02-22  Martin Sebor  <msebor@redhat.com>
16079         PR tree-optimization/84480
16080         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
16081         to maybe_diag_stxncpy_trunc.  Call it.
16082         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
16083         from gimple_fold_builtin_strcpy.  Print inlining stack.
16084         (handle_builtin_stxncpy): Print inlining stack.
16085         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
16087 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
16089         PR target/84176
16090         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
16091         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
16092         and -fcheck-pointer-bounds are used together.
16093         (indirect_thunk_prefix): New enum.
16094         (indirect_thunk_need_prefix): New function.
16095         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
16096         "_nt" instead of "_bnd" for NOTRACK prefix.
16097         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
16098         (output_indirect_thunk_function): Likewise.
16099         (): Likewise.
16100         (ix86_code_end): Update output_indirect_thunk_function calls.
16101         (ix86_output_indirect_branch_via_reg): Replace
16102         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
16103         (ix86_output_indirect_branch_via_push): Likewise.
16104         (ix86_output_function_return): Likewise.
16105         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
16106         incompatible with -fcf-protection=branch and
16107         -fcheck-pointer-bounds.
16109 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16111         PR target/83335
16112         * config/aarch64/aarch64.c (aarch64_print_address_internal):
16113         Change gcc_assert call to output_operand_lossage.
16115 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
16117         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
16119 2018-02-22  DJ Delorie  <dj@redhat.com>
16120             Sebastian Perta  <sebastian.perta@renesas.com>
16121             Oleg Endo  <olegendo@gcc.gnu.org>
16123         * config/rx/rx.c (rx_rtx_costs): New function.
16124         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
16126 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
16128         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
16130 2018-02-22  Martin Liska  <mliska@suse.cz>
16132         PR driver/83193
16133         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
16134         Add "native" as a possible value.
16136 2018-02-22  Martin Liska  <mliska@suse.cz>
16138         PR driver/83193
16139         * config/i386/i386.c (ix86_option_override_internal):
16140         Add "native" as a possible value for -march and -mtune.
16142 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
16144         PR target/84502
16145         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
16146         to all type variants.
16148         PR tree-optimization/84503
16149         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16150         width as info->bitpos + info->bitsize - start.
16151         (merged_store_group::merge_overlapping): Simplify width computation.
16152         (check_no_overlap): New function.
16153         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16154         start + width and last_order of the group, fail if check_no_overlap
16155         fails.
16156         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16157         to group if check_no_overlap fails.
16159 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16161         * config/rs6000/altivec.md: Delete contraint arguments to
16162         define_expand, define_split, and define_peephole2, and in
16163         define_insn_and_split if always unused.
16164         * config/rs6000/darwin.md: Ditto.
16165         * config/rs6000/dfp.md: Ditto.
16166         * config/rs6000/rs6000.md: Ditto.
16167         * config/rs6000/sync.md: Ditto.
16168         * config/rs6000/vector.md: Ditto.
16169         * config/rs6000/vsx.md: Ditto.
16171 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16173         * config/rs6000/altivec.md: Write output control strings as braced
16174         blocks instead of double-quoted strings.
16175         * config/rs6000/darwin.md: Ditto.
16176         * config/rs6000/rs6000.md: Ditto.
16177         * config/rs6000/vector.md: Ditto.
16178         * config/rs6000/vsx.md: Ditto.
16180 2018-02-21  Jason Merrill  <jason@redhat.com>
16182         PR c++/84314 - ICE with templates and fastcall attribute.
16183         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16185 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16187         * ipa-cp.c (determine_versionability): Fix comment typos.
16189 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16191         PR c/84229
16192         * ipa-cp.c (determine_versionability): Do not version functions caling
16193         va_arg_pack.
16195 2018-02-21  Martin Liska  <mliska@suse.cz>
16197         PR driver/83193
16198         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16199         Add "native" as a possible value.
16200         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16201         the macro when native cpu detection is available.
16203 2018-02-21  Martin Liska  <mliska@suse.cz>
16205         PR driver/83193
16206         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16207         Add "native" as a possible value.
16208         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16209         when native cpu detection is available.
16211 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16212             Martin Sebor  <msebor@redhat.com>
16214         PR tree-optimization/84478
16215         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16216         false.
16217         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16218         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16219         support which is conservatively correct, for 2 only stay conservative
16220         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16221         argument to the 2 argument get_range_strlen, adjust 6 arg
16222         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16223         false.
16224         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16225         (gimple_fold_builtin_strlen): Pass true as last argument to
16226         get_range_strlen.
16228 2018-02-20  Martin Sebor  <msebor@redhat.com>
16230         PR middle-end/84095
16231         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16232         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16233         (builtin_memref::builtin_memref): Factor out parts into
16234         set_base_and_offset and call it.
16236 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16238         PR middle-end/84406
16239         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16240         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16241         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16242         search at the associated MODE_INT.
16244 2018-02-20  Jeff Law  <law@redhat.com>
16246         PR middle-end/82123
16247         PR tree-optimization/81592
16248         PR middle-end/79257
16249         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16250         for range data rather than using global data.
16251         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16252         range data rather than using global data.
16253         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16254         pass it to children as needed.
16255         (struct directive::fmtresult): Similarly.
16256         (struct directive::set_width): Similarly.
16257         (struct directive::set_precision): Similarly.
16258         (format_integer, format_directive, parse_directive): Similarly.
16259         (format_none): Accept unnamed vr_values parameter.
16260         (format_percent, format_floating, format_character): Similarly.
16261         (format_string, format_plain): Similarly.
16262         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16263         the EVRP range analyzer for range data rather than using global data.
16264         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16265         gimple-ssa-evrp-analyze.h
16266         (class sprintf_dom_walker): Add after_dom_children member function.
16267         Add evrp_range_analyzer member.
16268         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16269         range analyzer as needed.
16270         (sprintf_dom_walker::after_dom_children): New member function.
16271         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16272         if not optimizing.
16273         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16274         (evrp_range_analyzer::pop_to_marker): Likewise.
16276 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16278         PR tree-optimization/84419
16279         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16280         with the required type if its current type is compatible but
16281         different.
16283 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16285         PR middle-end/82004
16286         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16287         after vectorization.
16289 2018-02-20  Martin Liska  <mliska@suse.cz>
16291         PR driver/83193
16292         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16293         possible values if we don't have a hint.
16295 2018-02-20  Martin Liska  <mliska@suse.cz>
16297         PR c/84310
16298         PR target/79747
16299         * final.c (shorten_branches): Build align_tab array with one
16300         more element.
16301         * opts.c (finish_options): Add alignment option limit check.
16302         (MAX_CODE_ALIGN): Likewise.
16303         (MAX_CODE_ALIGN_VALUE): Likewise.
16304         * doc/invoke.texi: Document maximum allowed option value for
16305         all -falign-* options.
16307 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16309         PR target/84146
16310         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16311         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16312         * var-tracking.c (emit_note_insn_var_location): Remove all references
16313         to NOTE_INSN_CALL_ARG_LOCATION.
16314         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16315         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16316         Use copy_rtx_if_shared.
16317         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16318         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16319         (dwarf2out_var_location): Remove handling of
16320         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16321         on call_insn.
16322         * final.c (final_scan_insn): Remove all references to
16323         NOTE_INSN_CALL_ARG_LOCATION.
16324         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16325         before dumping final insns.
16326         * except.c (emit_note_eh_region_end): Remove all references to
16327         NOTE_INSN_CALL_ARG_LOCATION.
16328         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16329         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16330         * config/arc/arc.c (hwloop_optimize): Likewise.
16331         * config/arm/arm.c (create_fix_barrier): Likewise.
16332         * config/s390/s390.c (s390_chunkify_start): Likewise.
16333         * config/sh/sh.c (find_barrier): Likewise.
16334         * config/i386/i386.c (rest_of_insert_endbranch,
16335         ix86_seh_fixup_eh_fallthru): Likewise.
16336         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16337         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16338         * config/frv/frv.c (frv_function_prologue): Likewise.
16339         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16340         reg note.
16341         (note_outside_basic_block_p): Remove all references to
16342         NOTE_INSN_CALL_ARG_LOCATION.
16343         * gengtype.c (adjust_field_rtx_def): Likewise.
16344         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16345         Likewise.
16346         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16347         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16349         PR c++/84444
16350         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16351         is ADDR_EXPR.
16353         PR tree-optimization/84452
16354         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16355         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16356         is NULL.
16358 2018-02-19  Martin Liska  <mliska@suse.cz>
16360         PR sanitizer/82183
16361         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16363 2018-02-19  Martin Liska  <mliska@suse.cz>
16364             Richard Sandiford  <richard.sandiford@linaro.org>
16366         PR tree-optimization/82491
16367         * gimple-fold.c (get_base_constructor): Make earlier bail out
16368         to prevent ubsan.
16370 2018-02-19  Carl Love  <cel@us.ibm.com>
16372         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16373         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16374         BU_P8V_OVERLOAD_1.
16375         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16376         P8V_BUILTIN_VEC_NEG.
16378 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16380         * config/rl78/rl78.md (movdf): New define expand.
16382 2018-02-19  Martin Liska  <mliska@suse.cz>
16384         PR other/80589
16385         * doc/invoke.texi: Fix typo.
16386         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16388 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16390         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16391         handle rs6000_single_float and rs6000_double_float specially for
16392         e500 family CPUs.
16394 2018-02-16  Jeff Law  <law@redhat.com>
16396         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16397         (pop_regs): Use it.
16399 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16401         PR ipa/84425
16402         * ipa-inline.c (inline_small_functions): Fix a typo.
16404 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16406         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16408 2018-02-16  Carl Love  <cel@us.ibm.com>
16410         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16411         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16412         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16413         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16414         expansion to P8V_BUILTIN_VEC_FLOAT2.
16416 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16418         PR rtl-optimization/70023
16419         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16420         src_regno into account.
16422 2018-02-16  Carl Love  <cel@us.ibm.com>
16424         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16425         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16426         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16427         * config/rs6000/rs6000.c: Remove case statements for
16428         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16429         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16430         and P9V_BUILTIN_VEC_VINSERT4B.
16431         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16432         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16433         * config/rs6000/vsx.md:
16434         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16435         vec_insert4b.
16437 2018-02-16  Carl Love  <cel@us.ibm.com>
16439         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16440         vec_insert4b.
16441         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16442         definitions.
16443         * config/rs6000/rs6000-c.c: Add the definitions for
16444         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16445         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16446         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16447         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16448         definition for insert4b and define insn *insert3b_internal.
16449         * doc/extend.texi: Add documentation for vec_extract4b.
16451 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16453         * doc/extend.texi (Backwards Compatibility): Mention friend
16454         injection.  Note for-scope is deprecated.
16455         * doc/invoke.texi (-ffriend-injection): Deprecate.
16457 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16459         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16460         that moved to I2, also allow destinations that are a paradoxical
16461         subreg (instead of a normal reg).
16463 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16465         PR target/83831
16466         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16467         to QImode.
16469 2018-02-16  Richard Biener  <rguenther@suse.de>
16471         PR tree-optimization/84037
16472         PR tree-optimization/84016
16473         PR target/82862
16474         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16475         Adjust vec_construct for the fact we need additional higher latency
16476         128bit inserts for AVX256 and AVX512 vector builds.
16477         (ix86_add_stmt_cost): Scale vector construction cost for
16478         elementwise loads.
16480 2018-02-16  Richard Biener  <rguenther@suse.de>
16482         PR tree-optimization/84417
16483         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16484         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16485         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16487 2018-02-16  Martin Liska  <mliska@suse.cz>
16489         PR sanitizer/84307
16490         * internal-fn.def (ASAN_CHECK): Set proper flags.
16491         (ASAN_MARK): Likewise.
16493 2018-02-16  Julia Koval  <julia.koval@intel.com>
16495         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16496         from PTA_CANNONLAKE.
16498 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16500         PR target/84272
16501         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16502         Use ++iter rather than iter++ for std::list iterators.
16503         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16504         defer deleting them until all nodes in the forest are processed.  Do
16505         free even leaf nodes.  Change to_process into auto_vec.
16507         PR bootstrap/84405
16508         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16509         * vec.h (vec_default_construct): Use memset instead of placement new
16510         if BROKEN_VALUE_INITIALIZATION is defined.
16511         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16512         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16513         is defined.
16515         PR rtl-optimization/83723
16516         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16517         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16518         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16519         recursive calls.
16520         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16521         callers.
16522         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16524 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16526         PR rtl-optimization/81443
16527         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16528         from inner REGs to paradoxical SUBREGs.
16530 2018-02-16  Richard Biener  <rguenther@suse.de>
16532         PR tree-optimization/84399
16533         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16534         For operands we can analyze at their definition make sure we can
16535         analyze them at each use as well.
16537 2018-02-16  Richard Biener  <rguenther@suse.de>
16539         PR tree-optimization/84190
16540         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16541         volatile accesses if the decl isn't volatile.
16543 2018-02-15  Jason Merrill  <jason@redhat.com>
16545         PR c++/84314 - ICE with templates and fastcall attribute.
16546         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16547         TYPE_CANONICAL on an existing type.
16549 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16551         PR tree-optimization/84383
16552         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16553         dstoff nor call operand_equal_p if dstbase is NULL.
16555         PR tree-optimization/84334
16556         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16557         also a CONSTANT_CLASS_P, punt.
16559 2018-02-14  Jim Wilson  <jimw@sifive.com>
16561         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16562         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16563         to where locals are set.  Add TARGET_RVC support.
16564         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16566 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16568         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16570 2018-02-14  Martin Sebor  <msebor@redhat.com>
16572         PR tree-optimization/83698
16573         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16574         arrays constrain the offset range to their bounds.
16575         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16576         (builtin_access::overlap): Avoid setting the size of overlap if it's
16577         already been set.
16578         (maybe_diag_overlap): Also consider arrays when deciding what values
16579         of offsets to include in diagnostics.
16581 2018-02-14  Martin Sebor  <msebor@redhat.com>
16583         PR c/84108
16584         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16585         that correspond to the kind of a declaration.
16587 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16589         PR target/83984
16590         * config/pa/pa.md: Load address of PIC label using the linkage table
16591         if the label is nonlocal.
16593 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16595         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16596         warning message if user requests -maltivec=be.
16597         * doc/invoke.texi: Document deprecation of -maltivec=be.
16599 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16601         PR target/84220
16602         * config/rs6000/rs6000-c.c: Update definitions for
16603         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16604         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16606 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16608         PR target/84239
16609         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16610         add _get_ssp intrinsics. Remove argument from
16611         __builtin_ia32_rdssp[d|q].
16612         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16613         * config/i386/i386-builtin.def: Remove argument from
16614         __builtin_ia32_rdssp[d|q].
16615         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16616         ix86_expand_special_args_builtin for _rdssp[d|q].
16617         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16618         Clear register before usage.
16619         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16620         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16622 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16624         PR tree-optimization/84357
16625         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16626         operand 1 of an ARRAY_REF too.
16628 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16630         PR target/83831
16631         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16632         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16633         declarations.
16634         (set_of_reg): New struct.
16635         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16636         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16637         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16638         functions.
16639         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16640         Split into bitclr, bitset, bitinvert patterns if appropriate.
16641         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16642         use rx_fuse_in_memory_bitop.
16643         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16644         to named insn, correct maximum insn length.
16646 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16648         PR target/79242
16649         * machmode.def: Define a complex mode for PARTIAL_INT.
16650         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16651         MODE_PARTIAL_INT.
16652         * doc/rtl.texi: Document CSPImode.
16653         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16654         handling.
16655         (msp430_hard_regno_nregs_with_padding): Likewise.
16657 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16659         PR target/84279
16660         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16662 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16664         PR rtl-optimization/84169
16665         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16666         we generated a parallel as new i3 and we split that to new i2 and i3
16667         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16668         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16669         those to i2, not i1.  Partially rewrite this scan code.
16671 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16673         PR c/82210
16674         * stor-layout.c (place_field): For variable length fields, adjust
16675         offset_align afterwards not just based on the field's alignment,
16676         but also on the size.
16678         PR middle-end/84309
16679         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16680         of exps and logs in the use_exp2 case.
16682 2018-02-13  Jeff Law  <law@redhat.com>
16684         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16685         entry for "vector".
16687         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16688         ARGS as unused.
16690 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16692         PR debug/84342
16693         PR debug/84319
16694         * common.opt (gas-loc-support, gas-locview-support): New.
16695         (ginline-points, ginternal-reset-location-views): New.
16696         * doc/invoke.texi: Document them.  Use @itemx where intended.
16697         (gvariable-location-views): Adjust.
16698         * target.def (reset_location_view): New.
16699         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16700         (TARGET_RESET_LOCATION_VIEW): New.
16701         * doc/tm.texi: Rebuilt.
16702         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16703         (dwarf2out_default_as_locview_support): New.
16704         (output_asm_line_debug_info): Use option variables.
16705         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16706         (output_loc_list): Likewise.
16707         (add_high_low_attributes): Check option variables.
16708         Don't output entry view attribute in strict mode.
16709         (gen_inlined_subroutine_die): Check option variables.
16710         (dwarf2out_inline_entry): Likewise.
16711         (init_sections_and_labels): Likewise.
16712         (dwarf2out_early_finish): Likewise.
16713         (maybe_reset_location_view): New, from...
16714         (dwarf2out_var_location): ... here.  Call it.
16715         * debug.h (dwarf2out_default_as_loc_support): Declare.
16716         (dwarf2out_default_as_locview_support): Declare.
16717         * hooks.c (hook_int_rtx_insn_0): New.
16718         * hooks.h (hook_int_rtx_insn_0): Declare.
16719         * toplev.c (process_options): Take -gas-loc-support and
16720         -gas-locview-support from dwarf2out.  Enable
16721         -gvariable-location-views by default only with locview
16722         assembler support.  Enable -ginternal-reset-location-views by
16723         default only if the target defines the corresponding hook.
16724         Enable -ginline-points by default if location views are
16725         enabled; force it disabled if statement frontiers are
16726         disabled.
16727         * tree-inline.c (expand_call_inline): Check option variables.
16728         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16730 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16732         PR tree-optimization/84321
16733         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16734         handling.  Also check whether the anti-range contains any values
16735         that satisfy the mask; switch to a VR_RANGE if not.
16737 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16739         PR sanitizer/84340
16740         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16742 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16744         PR c++/83990
16745         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16746         of call statements, also set location of a load to a temporary.
16748 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16750         * config/rl78/rl78.c (add_vector_labels): New function.
16751         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16752         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16753         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16754         which checks that no arguments are passed.
16755         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16756         * doc/extend.texi: Documentation for the new attribute.
16758 2018-02-13  Andreas Schwab  <schwab@suse.de>
16760         * config/riscv/linux.h (CPP_SPEC): Define.
16762 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16764         PR target/84335
16765         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16766         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16767         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16768         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16769         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16770         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16771         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16772         temporarily for AES and PCLMUL builtins.
16774         PR tree-optimization/84339
16775         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16776         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16777         Formatting fixes.
16779         PR middle-end/84309
16780         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16781         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16782         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16783         inline function.
16784         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16785         inline function.
16786         * omp-simd-clone.h: New file.
16787         * omp-simd-clone.c: Include omp-simd-clone.h.
16788         (expand_simd_clones): No longer static.
16789         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16790         cgraph.h and omp-simd-clone.h.
16791         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16792         (vect_recog_widen_shift_pattern): Formatting fix.
16793         (vect_pattern_recog_1): Don't check optab for calls.
16795         PR target/84336
16796         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16797         operands[2] into a REG before using gen_lowpart on it.
16799 2018-02-12  Jeff Law  <law@redhat.com>
16801         PR target/83760
16802         * config/sh/sh.c (find_barrier): Consider a sibling call
16803         a barrier as well.
16805         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16806         successfully back substituting a reg.
16808 2018-02-12  Richard Biener  <rguenther@suse.de>
16810         PR tree-optimization/84037
16811         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16812         parameter, move visited init to caller.
16813         (vect_slp_analyze_operations): Separate cost from validity
16814         check, initialize visited once for all instances.
16815         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16816         for all instances.
16817         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16818         out an assert.
16819         (vect_model_promotion_demotion_cost): Likewise.
16820         (vectorizable_bswap): Guard cost modeling with !slp_node
16821         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16822         SLP stmts.
16823         (vectorizable_call): Likewise.
16824         (vectorizable_conversion): Likewise.
16825         (vectorizable_assignment): Likewise.
16826         (vectorizable_shift): Likewise.
16827         (vectorizable_operation): Likewise.
16828         (vectorizable_store): Likewise.
16829         (vectorizable_load): Likewise.
16830         (vectorizable_condition): Likewise.
16831         (vectorizable_comparison): Likewise.
16833 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16835         PR sanitizer/84307
16836         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16837         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16838         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16840 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16842         PR middle-end/83665
16843         * params.def (inline-min-speedup): Increase from 8 to 15.
16844         (max-inline-insns-auto): Decrease from 40 to 30.
16845         * ipa-split.c (consider_split): Add some buffer for function to
16846         be considered inlining candidate.
16847         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16848         default values.
16850 2018-02-12  Richard Biener  <rguenther@suse.de>
16852         PR tree-optimization/84037
16853         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16854         matched stmts if we cannot swap the non-matched ones.
16856 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16858         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16859         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16860         _mm_maskz_scalef_round_ss): New intrinsics.
16861         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16862         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16863         __builtin_ia32_scalefss_round): Remove.
16864         (__builtin_ia32_scalefsd_mask_round,
16865         __builtin_ia32_scalefss_mask_round): New intrinsics.
16866         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16867         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16868         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16869         "<round_constraint>")): Changed to ...
16870         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16871         "<round_scalar_constraint>")): ... this.
16872         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16873         %0, %1, %2<round_op3>}"): Changed to ...
16874         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16875         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16876         %2<round_scalar_mask_op3>}"): ... this.
16877         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16879 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16881         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16882         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16883         (_mm_maskz_sqrt_round_ss): New intrinsics.
16884         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16885         (__builtin_ia32_sqrtsd_mask_round)
16886         (__builtin_ia32_sqrtss_mask_round): New builtins.
16887         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16888         (__builtin_ia32_sqrtss_round): Remove.
16889         (__builtin_ia32_sqrtsd_mask_round)
16890         (__builtin_ia32_sqrtss_mask_round): New builtins.
16891         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16892         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16893         ((match_operand:VF_128 1 "vector_operand"
16894         "xBm,<round_constraint>")): Changed to ...
16895         ((match_operand:VF_128 1 "vector_operand"
16896         "xBm,<round_scalar_constraint>")): ... this.
16897         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16898         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16899         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16900         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16901         %<iptr>1<round_scalar_mask_op3>}): ... this.
16902         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16903         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16905 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16907         PR target/84266
16908         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16909         Cast vec_cmpeq result to correct type.
16910         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16911         Cast vec_cmpgt result to correct type.
16913 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16915         * final.c (final_scan_insn_1): Renamed from...
16916         (final_scan_insn): ... this.  New wrapper, to recover
16917         seen from the outermost call in recursive ones.
16918         * config/sparc/sparc.c (output_return): Drop seen from call.
16919         (output_sibcall): Likewise.
16920         * config/visium/visium.c (output_branch): Likewise.
16922 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16924         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16925         function label.
16927 2018-02-10  Alan Modra  <amodra@gmail.com>
16929         PR target/84300
16930         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16931         Specify LR as an input.
16933 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16935         PR sanitizer/83987
16936         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16937         remove_member_access_dummy_vars): New functions.
16938         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16939         lower_omp_1, execute_lower_omp): Use them.
16941         PR rtl-optimization/84308
16942         * shrink-wrap.c (spread_components): Release todo vector.
16944 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16946         PR rtl-optimization/57193
16947         * ira-color.c (struct allocno_color_data): Add member
16948         conflict_allocno_hard_prefs.
16949         (update_conflict_allocno_hard_prefs): New.
16950         (bucket_allocno_compare_func): Add a preference based on
16951         conflict_allocno_hard_prefs.
16952         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16953         (color_allocnos): Remove a dead code.  Initiate
16954         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16956 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16958         PR target/84226
16959         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16960         constraint from =wa to wa.  Avoid a subreg on the output operand,
16961         instead use a pseudo and subreg it in a move.
16962         (p9_xxbrd_<mode>): Changed to ...
16963         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16964         (p9_xxbrd_v2df): New expander.
16965         (p9_xxbrw_<mode>): Changed to ...
16966         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16967         (p9_xxbrw_v4sf): New expander.
16969 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16971         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16973 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16975         PR target/83926
16976         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16977         multiply in 32-bit mode.
16978         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16979         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16980         mode.
16982 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16984         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16985         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16986         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16987         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16989 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16991         PR lto/84213
16992         * dwarf2out.c (is_trivial_indirect_ref): New function.
16993         (dwarf2out_late_global_decl): Do not generate a location
16994         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16995         and that are not defined in the current unit.
16997 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16999         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
17000         instead of a libcall for UNORDERED.
17002 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
17004         PR target/82641
17005         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
17006         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
17008 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17010         PR target/PR84295
17011         * config/s390/s390.c (s390_set_current_function): Invoke
17012         s390_indirect_branch_settings also if fndecl didn't change.
17014 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17016         * config/rs6000/rs6000.md (blockage): Set length to zero.
17018 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
17020         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
17022 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
17024         PR sanitizer/84285
17025         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
17026         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
17027         -static-lib*san.
17029         PR debug/84252
17030         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
17031         PARALLEL incoming that failed vt_get_decl_and_offset check.
17033         PR middle-end/84237
17034         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
17035         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
17036         TREE_READONLY bit.
17037         (get_variable_section): For decls in named .bss* sections pass true as
17038         second argument to bss_initializer_p.
17040 2018-02-09  Marek Polacek  <polacek@redhat.com>
17041             Jakub Jelinek  <jakub@redhat.com>
17043         PR c++/83659
17044         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
17045         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
17046         Sync some changes from cxx_fold_indirect_ref.
17048 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
17050         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
17051         markers.
17052         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
17053         (BLOCK_INLINE_ENTRY_LABEL): New.
17054         (dwarf2out_var_location): Disregard inline entry markers.
17055         (inline_entry_data): New struct.
17056         (inline_entry_data_hasher): New hashtable type.
17057         (inline_entry_data_hasher::hash): New.
17058         (inline_entry_data_hasher::equal): New.
17059         (inline_entry_data_table): New variable.
17060         (add_high_low_attributes): Add DW_AT_entry_pc and
17061         DW_AT_GNU_entry_view attributes if a pending entry is found
17062         in inline_entry_data_table.  Add old entry_pc attribute only
17063         if debug nonbinding markers are disabled.
17064         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
17065         markers are enabled.
17066         (block_within_block_p, dwarf2out_inline_entry): New.
17067         (dwarf2out_finish): Check that no entries remained in
17068         inline_entry_data_table.
17069         * final.c (reemit_insn_block_notes): Handle inline entry notes.
17070         (final_scan_insn, notice_source_line): Likewise.
17071         (rest_of_clean_state): Skip inline entry markers.
17072         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
17073         markers.
17074         * gimple.c (gimple_build_debug_inline_entry): New.
17075         * gimple.h (enum gimple_debug_subcode): Add
17076         GIMPLE_DEBUG_INLINE_ENTRY.
17077         (gimple_build_debug_inline_entry): Declare.
17078         (gimple_debug_inline_entry_p): New.
17079         (gimple_debug_nonbind_marker_p): Adjust.
17080         * insn-notes.def (INLINE_ENTRY): New.
17081         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
17082         inline entry marker notes.
17083         (print_insn): Likewise.
17084         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
17085         (INSN_DEBUG_MARKER_KIND): Likewise.
17086         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
17087         * tree-inline.c (expand_call_inline): Build and insert
17088         debug_inline_entry stmt.
17089         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
17090         inline entry blocks early, if nonbind markers are enabled.
17091         (dump_scope_block): Dump fragment info.
17092         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
17093         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
17094         (gimple_build_debug_inline_entry): New.
17095         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
17096         Enable/disable inline entry points too.
17097         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
17098         (DEBUG_INSN): Describe inline entry markers.
17100         * common.opt (gvariable-location-views): New.
17101         (gvariable-location-views=incompat5): New.
17102         * config.in: Rebuilt.
17103         * configure: Rebuilt.
17104         * configure.ac: Test assembler for view support.
17105         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
17106         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
17107         * dwarf2out.c (var_loc_view): New typedef.
17108         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
17109         (dwarf2out_locviews_in_attribute): New.
17110         (dwarf2out_locviews_in_loclist): New.
17111         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
17112         (enum dw_line_info_opcode): Add LI_adv_address.
17113         (struct dw_line_info_table): Add view.
17114         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
17115         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
17116         (zero_view_p): New variable.
17117         (ZERO_VIEW_P): New macro.
17118         (output_asm_line_debug_info): New.
17119         (struct var_loc_node): Add view.
17120         (add_AT_view_list, AT_loc_list): New.
17121         (add_var_loc_to_decl): Add view param.  Test it against last.
17122         (new_loc_list): Add view params.  Record them.
17123         (AT_loc_list_ptr): Handle loc and view lists.
17124         (view_list_to_loc_list_val_node): New.
17125         (print_dw_val): Handle dw_val_class_view_list.
17126         (size_of_die): Likewise.
17127         (value_format): Likewise.
17128         (loc_list_has_views): New.
17129         (gen_llsym): Set vl_symbol too.
17130         (maybe_gen_llsym, skip_loc_list_entry): New.
17131         (dwarf2out_maybe_output_loclist_view_pair): New.
17132         (output_loc_list): Output view list or entries too.
17133         (output_view_list_offset): New.
17134         (output_die): Handle dw_val_class_view_list.
17135         (output_dwarf_version): New.
17136         (output_compilation_unit_header): Use it.
17137         (output_skeleton_debug_sections): Likewise.
17138         (output_rnglists, output_line_info): Likewise.
17139         (output_pubnames, output_aranges): Update version comments.
17140         (output_one_line_info_table): Output view numbers in asm comments.
17141         (dw_loc_list): Determine current endview, pass it to new_loc_list.
17142         Call maybe_gen_llsym.
17143         (loc_list_from_tree_1): Adjust.
17144         (add_AT_location_description): Create view list attribute if
17145         needed, check it's absent otherwise.
17146         (convert_cfa_to_fb_loc_list): Adjust.
17147         (maybe_emit_file): Call output_asm_line_debug_info for test.
17148         (dwarf2out_var_location): Reset views as needed.  Precompute
17149         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17150         attribute.  Set view.
17151         (new_line_info_table): Reset next view.
17152         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17153         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17154         the assembler, or select appropriate line info opcodes.
17155         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17156         (optimize_string_length): Catch it.  Adjust.
17157         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17158         dw_val_class_view_list, and remove it if no longer needed.
17159         (hash_loc_list): Hash view numbers.
17160         (loc_list_hasher::equal): Compare them.
17161         (optimize_location_lists): Check whether a view list symbol is
17162         needed, and whether the locview attribute is present, and
17163         whether they match.  Remove the locview attribute if no longer
17164         needed.
17165         (index_location_lists): Call skip_loc_list_entry for test.
17166         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17167         Use output_dwarf_version.
17168         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17169         (struct dw_val_node): Add val_view_list.
17170         * final.c (SEEN_NEXT_VIEW): New.
17171         (set_next_view_needed): New.
17172         (clear_next_view_needed): New.
17173         (maybe_output_next_view): New.
17174         (final_start_function): Rename to...
17175         (final_start_function_1): ... this.  Take pointer to FIRST,
17176         add SEEN parameter.  Emit param bindings in the initial view.
17177         (final_start_function): Reintroduce SEEN-less interface.
17178         (final): Rename to...
17179         (final_1): ... this.  Take SEEN parameter.  Output final pending
17180         next view at the end.
17181         (final): Reintroduce seen-less interface.
17182         (final_scan_insn): Output pending next view before switching
17183         sections or ending a block.  Mark the next view as needed when
17184         outputting variable locations.  Notify debug backend of section
17185         changes, and of location view changes.
17186         (rest_of_handle_final): Adjust.
17187         * toplev.c (process_options): Autodetect value for debug variable
17188         location views option.  Warn on incompat5 without -gdwarf-5.
17189         * doc/invoke.texi (gvariable-location-views): New.
17190         (gvariable-location-views=incompat5): New.
17191         (gno-variable-location-views): New.
17193 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17195         PR tree-optimization/84136
17196         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17197         that the result of find_edge is non-NULL.
17199 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17201         PR target/83008
17202         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17203         storing integer register in SImode.  Fix cost of 256 and 512
17204         byte aligned SSE register store.
17206 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17208         * config/i386/i386.c (ix86_multiplication_cost): Fix
17209         multiplication cost for TARGET_AVX512DQ.
17211 2018-02-08  Marek Polacek  <polacek@redhat.com>
17213         PR tree-optimization/84238
17214         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17215         get_range_strlen.
17217 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17219         PR tree-optimization/84265
17220         * tree-vect-stmts.c (vectorizable_store): Don't treat
17221         VMAT_CONTIGUOUS accesses as grouped.
17222         (vectorizable_load): Likewise.
17224 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17226         PR tree-optimization/81635
17227         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17228         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17229         (test_round_for_mask): New functions.
17230         (wide_int_cc_tests): Call test_round_for_mask.
17231         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17232         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17233         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17234         range returned by get_range_info.
17236 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17238         PR ipa/81360
17239         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17240         * symtab.c: Include builtins.h
17241         (symtab_node::output_to_lto_symbol_table_p): Move here
17242         from lto-streamer-out.c:output_symbol_p.
17243         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17244         (output_symbol_p): Move all logic to symtab.c
17245         (produce_symtab): Update.
17247 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17249         * config/s390/s390-opts.h (enum indirect_branch): Define.
17250         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17251         (s390_indirect_branch_via_thunk)
17252         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17253         (enum s390_indirect_branch_type): Define.
17254         * config/s390/s390.c (struct s390_frame_layout, struct
17255         machine_function): Remove.
17256         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17257         (indirect_branch_table_label_no, indirect_branch_table_name):
17258         Define variables.
17259         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17260         (enum s390_indirect_branch_option): Define.
17261         (s390_return_addr_from_memory): New function.
17262         (s390_handle_string_attribute): New function.
17263         (s390_attribute_table): Add new attribute handler.
17264         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17265         (s390_indirect_branch_via_thunk): New function.
17266         (s390_indirect_branch_via_inline_thunk): New function.
17267         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17268         sibling call optimization for non z10 compiles.
17269         (s390_emit_call): Force indirect branch target to be a single
17270         register.  Add r1 clobber for non-z10 compiles.
17271         (s390_emit_epilogue): Emit return jump via return_use expander.
17272         (s390_reorg): Handle JUMP_INSNs as execute targets.
17273         (s390_option_override_internal): Perform validity checks for the
17274         new command line options.
17275         (s390_indirect_branch_attrvalue): New function.
17276         (s390_indirect_branch_settings): New function.
17277         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17278         (s390_output_indirect_thunk_function):  New function.
17279         (s390_code_end): Implement target hook.
17280         (s390_case_values_threshold): Implement target hook.
17281         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17282         macros.
17283         * config/s390/s390.h (struct s390_frame_layout)
17284         (struct machine_function): Move here from s390.c.
17285         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17286         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17287         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17288         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17289         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17290         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17291         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17292         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17293         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17294         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17295         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17296         (mnemonic attribute): Add values which aren't recognized
17297         automatically.
17298         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17299         pattern for branch conversion.  Fix mnemonic attribute.
17300         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17301         indirect branch via thunk if requested.
17302         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17303         ("*indirect_jump"): Disable for branch conversion using out of
17304         line thunks.
17305         ("indirect_jump_via_thunk<mode>_z10")
17306         ("indirect_jump_via_thunk<mode>")
17307         ("indirect_jump_via_inlinethunk<mode>_z10")
17308         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17309         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17310         ("casesi_jump_via_inlinethunk<mode>_z10")
17311         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17312         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17313         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17314         ("*indirect2_jump"): Disable for branch conversion.
17315         ("casesi_jump"): Turn into expander and expand patterns for branch
17316         conversion.
17317         ("return_use"): New expander.
17318         ("*return"): Emit return via thunk and rename it to ...
17319         ("*return<mode>"): ... this one.
17320         * config/s390/s390.opt: Add new options and and enum for the
17321         option values.
17323 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17325         * lra-constraints.c (match_reload): Unconditionally use
17326         gen_lowpart_SUBREG, rather than selecting between that
17327         and equivalent gen_rtx_SUBREG code.
17329 2018-02-08  Richard Biener  <rguenther@suse.de>
17331         PR tree-optimization/84233
17332         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17333         changed flag instead of boguously re-using phi_inserted.
17335 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17337         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17338         static local variables.
17340 2018-02-08  Richard Biener  <rguenther@suse.de>
17342         PR tree-optimization/84278
17343         * tree-vect-stmts.c (vectorizable_store): When looking for
17344         smaller vector types to perform grouped strided loads/stores
17345         make sure the mode is supported by the target.
17346         (vectorizable_load): Likewise.
17348 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17350         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17351         Increase LDP/STP opportunities by adding adjacent callee-saves.
17353 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17355         PR rtl-optimization/84068
17356         PR rtl-optimization/83459
17357         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17359 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17361         PR tree-optimization/84224
17362         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17363         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17364         non-zero arguments.
17366 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17368         PR target/84113
17369         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17370         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17371         count, remove one USE.
17373 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17375         * doc/install.texi (Configuration): Document the
17376         --with-long-double-format={ibm,ieee} PowerPC configuration
17377         options.
17379         PR target/84154
17380         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17381         Convert from define_expand to be define_insn_and_split.  Rework
17382         float/double/_Float128 conversions to QI/HI/SImode to work with
17383         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17384         conversions to QI/HImode types did a store and then a load to
17385         truncate the value.  For conversions to VSX registers, don't split
17386         the insn, instead emit the code directly.  Use the code iterator
17387         any_fix to combine signed and unsigned conversions.
17388         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17389         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17390         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17391         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17392         (fix_<mode>di2_hw): Likewise.
17393         (fixuns_<mode>di2_hw): Likewise.
17394         (fix_<mode>si2_hw): Likewise.
17395         (fixuns_<mode>si2_hw): Likewise.
17396         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17397         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17398         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17399         fix<uns>_trunc<SFDF:mode>si2_p8.
17400         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17401         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17402         (fix<uns>_<mode>_mem): Likewise.
17403         (fctiw<u>z_<mode>_mem): Likewise.
17404         (fix<uns>_<mode>_mem): Likewise.
17405         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17406         the register allocator from doing a direct move to the GPRs to do
17407         a store, and instead use the ISA 3.0 store byte/half-word from
17408         vector register instruction.  For IEEE 128-bit floating point,
17409         also optimize stores of 32-bit ints.
17410         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17412 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17414         * genextract.c (push_pathstr_operand): New function to support
17415         [a-zA-Z].
17416         (walk_rtx): Call push_pathstr_operand.
17417         (print_path): Support [a-zA-Z].
17419 2018-02-07  Richard Biener  <rguenther@suse.de>
17421         PR tree-optimization/84037
17422         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17423         (cse_and_gimplify_to_preheader): Declare.
17424         (vect_get_place_in_interleaving_chain): Likewise.
17425         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17426         ivexpr_map.
17427         (_loop_vec_info::~_loop_vec_info): Delete it.
17428         (cse_and_gimplify_to_preheader): New function.
17429         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17430         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17431         (vectorizable_load): Likewise.  For grouped stores always base
17432         the IV on the first element.
17433         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17434         condition before gimplifying.
17436 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17438         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17439         *DIV_EXPR and *MOD_EXPR.
17441 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17443         PR target/84248
17444         * config/i386/i386.c (ix86_option_override_internal): Mask out
17445         the CF_SET bit when checking -fcf-protection.
17447 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17449         PR libgomp/84217
17450         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17451         enough.
17453 2018-02-07  Richard Biener  <rguenther@suse.de>
17455         PR tree-optimization/84204
17456         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17457         this place.
17459         PR tree-optimization/84205
17460         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17461         special-case isl_ast_op_zdiv_r.
17463         PR tree-optimization/84223
17464         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17465         Only add conditions from within the region.
17466         (gather_bbs::after_dom_children): Adjust.
17468 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17470         PR target/84209
17471         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17472         * config/avr/avr.md: Only post-reload split REG-REG moves if
17473         either register is GENERAL_REG_P.
17475 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17477         PR tree-optimization/84235
17478         * tree-ssa-scopedtables.c
17479         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17480         if the subtraction is performed in floating point type where NaNs are
17481         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17482         build 1.  Formatting fix.
17484 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17486         PR target/84146
17487         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17488         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17489         and skip it regardless of bb boundaries.  Use CALL_P macro,
17490         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17491         unnecessarily, formatting fix.
17493 2018-02-06  Michael Collison  <michael.collison@arm.com>
17495         * config/arm/thumb2.md:
17496         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17497         (*thumb_mov_notscc): Ditto.
17499 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17501         PR target/84154
17502         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17503         unsigned_fix, not "s".
17505 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17507         * configure.ac (gcc_fn_eh_frame_ro): New function.
17508         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17509         correct .eh_frame permissions.
17510         * configure: Regenerate.
17512 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17514         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17515         irrelevant options.
17517 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17519         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17520         Display warning message for -mno-speculate-indirect-jumps.
17522 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17524         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17525         Undocumented.
17526         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17528 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17530         PR tree-optimization/84225
17531         * tree-eh.c (find_trapping_overflow): Only call
17532         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17534 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17536         PR target/84145
17537         * config/i386/i386.c: Reimplement the check of possible options
17538         -mibt/-mshstk conbination. Change error messages.
17539         * doc/invoke.texi: Fix a typo: remove extra '='.
17541 2018-02-06  Marek Polacek  <polacek@redhat.com>
17543         PR tree-optimization/84228
17544         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17546 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17548         PR target/82641
17549         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17550         emitted arch directives.
17551         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17552         __ARM_FEATURE_COPROC before changing architectures.
17554 2018-02-06  Richard Biener  <rguenther@suse.de>
17556         * config/i386/i386.c (print_reg): Fix typo.
17557         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17559 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17561         * configure: Regenerate.
17563 2018-02-05  Martin Sebor  <msebor@redhat.com>
17565         PR tree-optimization/83369
17566         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17567         inlining context.
17569 2018-02-05  Martin Liska  <mliska@suse.cz>
17571         * doc/invoke.texi: Cherry-pick upstream r323995.
17573 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17575         * ira.c (ira_init_register_move_cost): Adjust comment.
17577 2018-02-05  Martin Liska  <mliska@suse.cz>
17579         PR gcov-profile/84137
17580         * doc/gcov.texi: Fix typo in documentation.
17582 2018-02-05  Martin Liska  <mliska@suse.cz>
17584         PR gcov-profile/83879
17585         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17586         using dlopen functionality.
17588 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17590         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17591         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17592         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17593         _mm_maskz_range_round_ss): New intrinsics.
17594         (__builtin_ia32_rangesd128_round)
17595         (__builtin_ia32_rangess128_round): Remove.
17596         (__builtin_ia32_rangesd128_mask_round,
17597         __builtin_ia32_rangess128_mask_round): New builtins.
17598         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17599         __builtin_ia32_rangess128_round): Remove.
17600         (__builtin_ia32_rangesd128_mask_round,
17601         __builtin_ia32_rangess128_mask_round): New builtins.
17602         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17603         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17604         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17605         "<round_saeonly_constraint>")): Changed to ...
17606         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17607         "<round_saeonly_scalar_constraint>")): ... this.
17608         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17609         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17610         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17611         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17612         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17614 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17616         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17617         options.
17618         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17619         Remove all values except native, 8540 and 8548.
17621 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17623         * config/i386/i386.c (ix86_output_function_return): Pass
17624         INVALID_REGNUM, instead of -1, as invalid register number to
17625         indirect_thunk_name and output_indirect_thunk.
17627 2018-02-02  Julia Koval  <julia.koval@intel.com>
17629         * config.gcc: Add -march=icelake.
17630         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17631         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17632         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17633         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17634         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17635         (processor_target_table): Add icelake.
17636         (ix86_option_override_internal): Handle new PTAs.
17637         (get_builtin_code_for_version): Handle icelake.
17638         (M_INTEL_COREI7_ICELAKE): New.
17639         (fold_builtin_cpu): Handle icelake.
17640         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17641         * doc/invoke.texi: Add -march=icelake.
17643 2018-02-02  Julia Koval  <julia.koval@intel.com>
17645         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17646         to wide_int_bitmask.
17647         * wide-int-bitmask.h: New.
17649 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17651         PR target/84066
17652         * config/i386/i386.md: Replace Pmode with word_mode in
17653         builtin_setjmp_setup and builtin_longjmp to support x32.
17655 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17657         PR target/56010
17658         PR target/83743
17659         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17660         #include "opts.h".
17661         (rs6000_supported_cpu_names): New static variable.
17662         (linux_cpu_translation_table): Likewise.
17663         (elf_platform) <cpu>: Define new static variable and use it.
17664         Translate kernel AT_PLATFORM name to canonical name if needed.
17665         Error if platform name is unknown.
17667 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17669         PR target/84089
17670         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17672 2018-02-01  Jeff Law  <law@redhat.com>
17674         PR target/84128
17675         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17676         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17677         the scratch if RELEASE_VIA_POP is false.
17678         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17679         If we have to save a temporary register, decrement SIZE appropriately.
17680         Pass new arguments to release_scratch_register_on_entry.
17681         (ix86_adjust_stack_and_probe): Likewise.
17682         (ix86_emit_probe_stack_range): Pass new arguments to
17683         release_scratch_register_on_entry.
17685 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17687         PR rtl-optimization/84157
17688         * combine.c (change_zero_ext): Use REG_P predicate in
17689         front of HARD_REGISTER_P predicate.
17691 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17693         * config/avr/avr.c (avr_option_override): Move disabling of
17694         -fdelete-null-pointer-checks to...
17695         * common/config/avr/avr-common.c (avr_option_optimization_table):
17696         ...here.
17698 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17700         PR tree-optimization/81635
17701         * tree-data-ref.c (split_constant_offset_1): For types that
17702         wrap on overflow, try to use range info to prove that wrapping
17703         cannot occur.
17705 2018-02-01  Renlin Li  <renlin.li@arm.com>
17707         PR target/83370
17708         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17709         TAILCALL_ADDR_REGS.
17710         (aarch64_register_move_cost): Likewise.
17711         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17712         TAILCALL_ADDR_REGS.
17713         (REG_CLASS_NAMES): Likewise.
17714         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17715         TAILCALL_ADDR_REGS. Remove IP registers.
17716         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17718 2018-02-01  Richard Biener  <rguenther@suse.de>
17720         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17721         for specifying RPO order and allow NULL for that.
17722         * domwalk.c (dom_walker::dom_walker): Likewise.
17723         (dom_walker::walk): Handle NULL RPO order.
17724         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17725         in RPO order.
17726         (rewrite_update_dom_walker): Likewise.
17727         (mark_def_dom_walker): Likewise.
17729 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17731         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17732         (aarch64_maybe_expand_sve_subreg_move): Declare.
17733         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17734         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17735         predicate.
17736         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17737         that are semantically a reverse operation.
17738         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17739         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17740         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17741         functions.
17742         (aarch64_can_change_mode_class): For big-endian, forbid changes
17743         between two SVE modes if they have different element sizes.
17745 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17747         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17748         the TImode handling for big-endian targets.
17750 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17752         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17753         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17754         not just bytes.
17755         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17756         Remove BSWAP handing for big-endian targets and use the form of
17757         LD1RQ appropariate for the mode.
17759 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17761         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17762         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17763         duplicated element.
17765 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17767         PR tearget/83845
17768         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17769         check for operands that need to go through aarch64_sve_reload_be.
17771 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17773         PR tree-optimization/81661
17774         PR tree-optimization/84117
17775         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17776         * tree-eh.c: Include gimplify.h.
17777         (find_trapping_overflow, replace_trapping_overflow,
17778         rewrite_to_non_trapping_overflow): New functions.
17779         * tree-vect-loop.c: Include tree-eh.h.
17780         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17781         * tree-data-ref.c: Include tree-eh.h.
17782         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17784 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17786         PR rtl-optimization/84123
17787         * combine.c (change_zero_ext): Check if hard register satisfies
17788         can_change_dest_mode before calling gen_lowpart_SUBREG.
17790 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17792         PR target/82444
17793         * ira.c (ira_init_register_move_cost): Remove assert.
17795 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17797         PR rtl-optimization/84071
17798         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17799         * doc/tm.texi: Regenerate.
17801 2018-01-31  Richard Biener  <rguenther@suse.de>
17803         PR tree-optimization/84132
17804         * tree-data-ref.c (analyze_miv_subscript): Properly
17805         check whether evolution_function_is_affine_multivariate_p
17806         before calling gcd_of_steps_may_divide_p.
17808 2018-01-31  Julia Koval  <julia.koval@intel.com>
17810         PR target/83618
17811         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17812         * config/i386/i386.md (rdpid_rex64) New.
17813         (rdpid): Make 32bit only.
17815 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17817         PR lto/84105
17818         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17819         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17821 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17823         Revert
17824         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17826         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17828 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17830         PR rtl-optimization/84071
17831         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17832         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17834 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17836         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17837         (arc_attribute_table): Add 'aux' attribute.
17838         (arc_in_small_data_p): Consider aux like variables.
17839         (arc_is_aux_reg_p): New function.
17840         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17841         (arc_get_aux_arg): New function.
17842         (prepare_move_operands): Handle aux-register access.
17843         (arc_handle_aux_attribute): New function.
17844         * doc/extend.texi (ARC Variable attributes): Add subsection.
17846 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17848         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17849         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17850         (arc_attribute_table): Add 'uncached' attribute.
17851         (arc_print_operand): Print '.di' flag for uncached memory
17852         accesses.
17853         (arc_in_small_data_p): Do not consider for small data the uncached
17854         types.
17855         (arc_is_uncached_mem_p): New function.
17856         * config/arc/predicates.md (compact_store_memory_operand): Check
17857         for uncached memory accesses.
17858         (nonvol_nonimm_operand): Likewise.
17859         * doc/extend.texi (ARC Type Attribute): New subsection.
17861 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17863         PR c/84100
17864         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17865         falign-loops=): Add Optimization flag.
17867 2018-01-30  Jeff Law  <law@redhat.com>
17869         PR target/84064
17870         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17871         INT_REGISTERS_SAVED.  Check it prior to calling
17872         get_scratch_register_on_entry.
17873         (ix86_adjust_stack_and_probe): Similarly.
17874         (ix86_emit_probe_stack_range): Similarly.
17875         (ix86_expand_prologue): Corresponding changes.
17877 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17879         PR target/40411
17880         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17881         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17883 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17885         PR target/84112
17886         * lra-constraints.c (curr_insn_transform): Process AND in the
17887         address.
17889 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17891         PR rtl-optimization/83986
17892         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17893         dependence against last_pending_memory_flush in addition to
17894         pending_jump_insns.
17896 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17898         PR tree-optimization/81611
17899         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17900         copies.
17902 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17904         PR target/83758
17905         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17906         a reg rtx.
17908 2018-01-30  Richard Biener  <rguenther@suse.de>
17909             Jakub Jelinek  <jakub@redhat.com>
17911         PR tree-optimization/84111
17912         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17913         inner loops added during recursion, as they don't have up-to-date
17914         SSA form.
17916 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17918         PR ipa/81360
17919         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17920         (can_inline_edge_by_limits_p): ... here.
17921         (can_early_inline_edge_p, check_callers,
17922         update_caller_keys, update_callee_keys, recursive_inlining,
17923         add_new_edges_to_heap, speculation_useful_p,
17924         inline_small_functions,
17925         inline_small_functions, flatten_function,
17926         inline_to_all_callers_1): Update.
17928 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17930         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17931         zeros correctly.
17933 2018-01-30  Richard Biener  <rguenther@suse.de>
17935         PR tree-optimization/83008
17936         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17937         invariant and constant vector uses in stmts when they need
17938         more than one stmt.
17940 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17942         PR bootstrap/84017
17943         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17944         * configure: Regenerate.
17946 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17948         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17949         pattern.
17950         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17951         Use gen_rtx_REG rather than gen_lowpart.
17953 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17955         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17956         rather than 0 when creating partial subregs.
17958 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17960         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17961         of usage.
17963 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17965         PR target/81550
17966         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17967         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17968         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17969         flags.  This restores the settings used before the 2017-07-24.
17970         Turning off pre increment/decrement/modify allows IVOPTS to
17971         optimize DF/SF loops where the index is an int.
17973 2018-01-29  Richard Biener  <rguenther@suse.de>
17974             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17976         PR bootstrap/80867
17977         * tree-vect-stmts.c (vectorizable_call): Don't call
17978         targetm.vectorize_builtin_md_vectorized_function if callee is
17979         NULL.
17981 2018-01-22  Carl Love  <cel@us.ibm.com>
17983         * doc/extend.tex: Fix typo in second arg in
17984         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17986 2018-01-29  Richard Biener  <rguenther@suse.de>
17988         PR tree-optimization/84086
17989         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17990         (flush_ssaname_freelist): When SSA names were released reset
17991         the SCEV hash table.
17993 2018-01-29  Richard Biener  <rguenther@suse.de>
17995         PR tree-optimization/84057
17996         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17997         removed paths when removing edges.
17999 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
18001         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
18002         -mfunction-return=@var{choice}.
18004 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18006         PR diagnostic/84034
18007         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
18008         Handle CR like TAB.
18009         (layout::print_source_line): Likewise.
18010         (test_get_line_width_without_trailing_whitespace): Add test cases.
18012 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
18014         PR middle-end/84040
18015         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
18016         debug insns.
18018 2018-01-26  Jim Wilson  <jimw@sifive.com>
18020         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
18022         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
18023         specified.
18025 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18027         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
18028         and CMP + SUB-immediate -> SUBS.
18030 2018-01-26  Martin Sebor  <msebor@redhat.com>
18032         PR tree-optimization/83896
18033         * tree-ssa-strlen.c (get_string_len): Rename...
18034         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
18035         Avoid assuming length is constant.
18036         (handle_char_store): Use HOST_WIDE_INT for string length.
18038 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
18040         PR target/81763
18041         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
18042         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
18044 2018-01-26  Richard Biener  <rguenther@suse.de>
18046         PR rtl-optimization/84003
18047         * dse.c (record_store): Only record redundant stores when
18048         the earlier store aliases at least all accesses the later one does.
18050 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
18052         PR rtl-optimization/83985
18053         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
18054         REG_CFA_RESTORE insns.
18055         (delete_unmarked_insns): Don't ignore separate shrink wrapping
18056         REG_CFA_RESTORE insns here.
18058         PR c/83989
18059         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
18060         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
18062 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18064         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
18065         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
18066         (arc_init): Likewise.
18067         (arc_override_options): Likewise.
18068         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
18069         value.
18070         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
18071         support.
18072         * config/arc/arc.h (TARGET_DBNZ): Define.
18073         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
18074         properly set the tune attribute.
18075         (dbnz): Use TARGET_DBNZ guard.
18076         * config/arc/arc.opt (mtune): Add core3 option.
18078 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18080         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
18081         recognize new pic like addresses.
18082         (arc_delegitimize_address): Clean up.
18084 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18086         * config/arc/arc-arches.def: Option mrf16 valid for all
18087         architectures.
18088         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
18089         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
18090         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
18091         * config/arc/arc-tables.opt: Regenerate.
18092         * config/arc/arc.c (arc_conditional_register_usage): Handle
18093         reduced register file case.
18094         (arc_file_start): Set must have build attributes.
18095         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
18096         mrf16 option value.
18097         * config/arc/arc.opt (mrf16): Add new option.
18098         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
18099         * config/arc/genmultilib.awk: Handle new mrf16 option.
18100         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
18101         * config/arc/t-multilib: Regenerate.
18102         * doc/invoke.texi (ARC Options): Document mrf16 option.
18104 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18106         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
18107         * config/arc/arc.c (arc_handle_secure_attribute): New function.
18108         (arc_attribute_table): Add 'secure_call' attribute.
18109         (arc_print_operand): Print secure call operand.
18110         (arc_function_ok_for_sibcall): Don't optimize tail calls when
18111         secure.
18112         (arc_is_secure_call_p): New function.  * config/arc/arc.md
18113         (call_i): Add support for sjli instruction.
18114         (call_value_i): Likewise.
18115         * config/arc/constraints.md (Csc): New constraint.
18117 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
18118             John Eric Martin  <John.Martin@emmicro-us.com>
18120         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
18121         * config/arc/arc.c (_arc_jli_section): New struct.
18122         (arc_jli_section): New type.
18123         (rc_jli_sections): New static variable.
18124         (arc_handle_jli_attribute): New function.
18125         (arc_attribute_table): Add jli_always and jli_fixed attribute.
18126         (arc_file_end): New function.
18127         (TARGET_ASM_FILE_END): Define.
18128         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
18129         (arc_add_jli_section): New function.
18130         (jli_call_scan): Likewise.
18131         (arc_reorg): Call jli_call_scan.
18132         (arc_output_addsi): Remove 'S' from printing asm operand.
18133         (arc_is_jli_call_p): New function.
18134         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
18135         operand.
18136         (movhi_insn): Likewise.
18137         (movsi_insn): Likewise.
18138         (movsi_set_cc_insn): Likewise.
18139         (loadqi_update): Likewise.
18140         (load_zeroextendqisi_update): Likewise.
18141         (load_signextendqisi_update): Likewise.
18142         (loadhi_update): Likewise.
18143         (load_zeroextendhisi_update): Likewise.
18144         (load_signextendhisi_update): Likewise.
18145         (loadsi_update): Likewise.
18146         (loadsf_update): Likewise.
18147         (movsicc_insn): Likewise.
18148         (bset_insn): Likewise.
18149         (bxor_insn): Likewise.
18150         (bclr_insn): Likewise.
18151         (bmsk_insn): Likewise.
18152         (bicsi3_insn): Likewise.
18153         (cmpsi_cc_c_insn): Likewise.
18154         (movsi_ne): Likewise.
18155         (movsi_cond_exec): Likewise.
18156         (clrsbsi2): Likewise.
18157         (norm_f): Likewise.
18158         (normw): Likewise.
18159         (swap): Likewise.
18160         (divaw): Likewise.
18161         (flag): Likewise.
18162         (sr): Likewise.
18163         (kflag): Likewise.
18164         (ffs): Likewise.
18165         (ffs_f): Likewise.
18166         (fls): Likewise.
18167         (call_i): Remove 'S' asm letter, add jli instruction.
18168         (call_value_i): Likewise.
18169         * config/arc/arc.op (mjli-always): New option.
18170         * config/arc/constraints.md (Cji): New constraint.
18171         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18172         operand.
18173         (subsf3_fpx): Likewise.
18174         (mulsf3_fpx): Likewise.
18175         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18176         asm operand.
18177         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18178         function attrbutes.
18179         * doc/invoke.texi (ARC): Document mjli-always option.
18181 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18183         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18184         avoid addition with 0 and use incw and decw where possible.
18186 2018-01-26  Richard Biener  <rguenther@suse.de>
18188         PR tree-optimization/81082
18189         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18190         association if it requires casting to unsigned.
18191         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18192         from fold_plusminus_mult_expr to catch important cases late when
18193         range info is available.
18195 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18197         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18198         * configure.ac (hidden_linkonce): New test.
18199         * configure: Regenerate.
18200         * config.in: Regenerate.
18202 2018-01-26  Julia Koval  <julia.koval@intel.com>
18204         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18205         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18206         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18207         _mm_mask_bitshuffle_epi64_mask): Fix type.
18208         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18209         USI_FTYPE_V4DI_V4DI_USI): Remove.
18210         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18211         __builtin_ia32_vpshufbitqmb256_mask,
18212         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18213         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18214         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18216 2018-01-26  Alan Modra  <amodra@gmail.com>
18218         PR target/84033
18219         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18220         UNSPEC_VBPERMQ.  Sort other unspecs.
18222 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18224         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18226 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18228         PR middle-end/83055
18229         * predict.c (drop_profile): Do not push/pop cfun; update also
18230         node->count.
18231         (handle_missing_profiles): Fix logic looking for zero profiles.
18233 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18235         PR middle-end/83977
18236         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18237         on functions with #pragma omp declare simd or functions with simd
18238         attribute.
18239         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18240         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18241         Remove trailing \n from warning_at calls.
18243 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18245         PR target/84028
18246         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18247         for neutered workers.
18249 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18251         PR target/68467
18252         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18253         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18255 2018-01-24  Jeff Law  <law@redhat.com>
18257         PR target/83994
18258         * i386.c (get_probe_interval): Move to earlier point.
18259         (ix86_compute_frame_layout): If -fstack-clash-protection and
18260         the frame is larger than the probe interval, then use pushes
18261         to save registers rather than reg->mem moves.
18262         (ix86_expand_prologue): Remove conditional for int_registers_saved
18263         assertion.
18265 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18267         PR target/84014
18268         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18269         min/max for never referenced object.
18271 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18273         PR middle-end/83977
18274         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18275         here.
18276         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18277         attributes from DECL_ATTRIBUTES (decl) without affecting
18278         DECL_ATTRIBUTES (current_function_decl).
18279         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18280         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18282 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18284         PR tree-optimization/83979
18285         * fold-const.c (fold_comparison): Use constant_boolean_node
18286         instead of boolean_{true,false}_node.
18288 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18290         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18291         with zero counts.
18293 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18295         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18296         Simplify the clause that sets the length attribute.
18297         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18298         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18299         clause that sets the length attribute.
18300         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18302 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18304         PR target/83589
18305         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18306         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18307         Add strict parameter.
18308         (prevent_branch_around_nothing): Insert dummy insn between branch to
18309         label and label with no ptx insn inbetween.
18310         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18312 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18314         PR target/81352
18315         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18316         for neutered threads in warp.
18317         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18319 2018-01-24  Richard Biener  <rguenther@suse.de>
18321         PR tree-optimization/83176
18322         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18323         operands.
18325 2018-01-24  Richard Biener  <rguenther@suse.de>
18327         PR tree-optimization/82819
18328         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18329         code generating pluses that are no-ops in the target precision.
18331 2018-01-24  Richard Biener  <rguenther@suse.de>
18333         PR middle-end/84000
18334         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18336 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18338         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18339         to merge probabilities.
18340         * predict.c (probably_never_executed): Also mark as cold functions
18341         with global 0 profile and guessed local profile.
18342         * profile-count.c (profile_probability::combine_with_count): New
18343         member function.
18344         * profile-count.h (profile_probability::operator*,
18345         profile_probability::operator*=, profile_probability::operator/,
18346         profile_probability::operator/=): Reduce precision to adjusted
18347         and set value to guessed on contradictory divisions.
18348         (profile_probability::combine_with_freq): Remove.
18349         (profile_probability::combine_wiht_count): Declare.
18350         (profile_count::force_nonzero):: Set to adjusted.
18351         (profile_count::probability_in):: Set quality to adjusted.
18352         * tree-ssa-tail-merge.c (replace_block_by): Use
18353         combine_with_count.
18355 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18356             Jim Wilson  <jimw@sifive.com>
18358         * config/riscv/riscv.c (riscv_stack_boundary): New.
18359         (riscv_option_override): Set riscv_stack_boundary.  Handle
18360         riscv_preferred_stack_boundary_arg.
18361         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18362         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18363         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18364         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18365         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18366         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18368 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18370         PR target/83905
18371         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18372         of struct ix86_frame.
18373         (ix86_expand_epilogue): Likewise.  Add a local variable for
18374         the reg_save_offset field in struct ix86_frame.
18376 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18378         PR tree-optimization/82604
18379         * tree-loop-distribution.c (enum partition_kind): New enum item
18380         PKIND_PARTIAL_MEMSET.
18381         (partition_builtin_p): Support above new enum item.
18382         (generate_code_for_partition): Ditto.
18383         (compute_access_range): Differentiate cases that equality can be
18384         proven at all loops, the innermost loops or no loops.
18385         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18386         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18387         (finalize_partitions, distribute_loop): Don't fuse partition of
18388         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18389         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18390         parloop is enabled.
18392 2018-01-23  Martin Liska  <mliska@suse.cz>
18394         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18395         order to ignore the predictor.
18396         (PRED_POLYMORPHIC_CALL): Likewise.
18397         (PRED_RECURSIVE_CALL): Likewise.
18399 2018-01-23  Martin Liska  <mliska@suse.cz>
18401         * tree-profile.c (tree_profiling): Print function header to
18402         aware reader which function we are working on.
18403         * value-prof.c (gimple_find_values_to_profile): Do not print
18404         not interesting value histograms.
18406 2018-01-23  Martin Liska  <mliska@suse.cz>
18408         * profile-count.h (enum profile_quality): Add
18409         profile_uninitialized as the first value. Do not number values
18410         as they are zero based.
18411         (profile_count::verify): Update sanity check.
18412         (profile_probability::verify): Likewise.
18414 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18416         * doc/invoke.texi (ffor-scope): Deprecate.
18418 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18420         PR tree-optimization/83510
18421         * domwalk.c (set_all_edges_as_executable): New function.
18422         (dom_walker::dom_walker): Convert bool param
18423         "skip_unreachable_blocks" to enum reachability.  Move setup of
18424         edge flags to set_all_edges_as_executable and only do it when
18425         reachability is REACHABLE_BLOCKS.
18426         * domwalk.h (enum dom_walker::reachability): New enum.
18427         (dom_walker::dom_walker): Convert bool param
18428         "skip_unreachable_blocks" to enum reachability.
18429         (set_all_edges_as_executable): New decl.
18430         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18431         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18432         "reachability".
18433         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18434         but converting true to REACHABLE_BLOCKS.
18435         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18436         * tree-vrp.c
18437         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18438         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18439         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18440         REACHABLE_BLOCKS.
18441         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18442         if check_all_array_refs will be called.
18444 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18446         * tree.c (selftest::test_location_wrappers): Add more test
18447         coverage.
18449 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18451         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18452         (selftest::test_bit_in_range): Likewise.
18454 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18456         PR testsuite/83888
18457         * doc/sourcebuild.texi (vect_float): Say that the selector
18458         only describes the situation when -funsafe-math-optimizations is on.
18459         (vect_float_strict): Document.
18461 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18463         PR tree-optimization/83965
18464         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18465         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18466         instead of checking only for a reduction.
18467         (vect_recog_widen_sum_pattern): Likewise.
18469 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18471         * predict.c (probably_never_executed): Only use precise profile info.
18472         (compute_function_frequency): Skip after inlining hack since we now
18473         have quality checking.
18475 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18477         * profile-count.h (profile_probability::very_unlikely,
18478         profile_probability::unlikely, profile_probability::even): Set
18479         precision to guessed.
18481 2018-01-23  Richard Biener  <rguenther@suse.de>
18483         PR tree-optimization/83963
18484         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18485         Properly terminate dominator walk when crossing the exit edge not
18486         when visiting its source block.
18488 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18490         PR c++/83918
18491         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18492         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18494 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18496         PR tree-optimization/83957
18497         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18498         semicolon after for body surrounded by braces.
18500         PR tree-optimization/83081
18501         * profile-count.h (profile_probability::split): New method.
18502         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18503         Use profile_probability::split.
18504         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18505         when splitting a single conditional jump into 2.
18507 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18509         PR tree-optimization/69452
18510         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18511         decl.
18513 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18515         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18516         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18517         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18519 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18521         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18522         declaration.
18523         * config/rl78/rl78.md (movdi): New define_expand.
18524         * config/rl78/rl78.c (rl78_split_movdi): New function.
18526 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18528         PR target/83862
18529         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18530         no longer used.
18531         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18532         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18533         128-bit to produce an UNSPEC move to get the double word with the
18534         signbit and then a shift directly to do signbit.
18535         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18536         implementation with a new version that just does either a direct
18537         move or a regular move.  Move memory interface to separate insns.
18538         Move insns so they are next to the expander.
18539         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18540         with signbit move.  Split big and little endian case.
18541         (signbit<mode>2_dm_mem_le): Likewise.
18542         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18543         (signbit<mode>2_dm2): Likewise.
18545 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18547         * config/rl78/rl78.md (anddi3): New define_expand.
18549 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18551         * config/rl78/rl78.md (umindi3): New define_expand.
18553 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18555         * config/rl78/rl78.md (smindi3): New define_expand.
18557 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18559         * config/rl78/rl78.md (smaxdi3): New define_expand.
18561 2018-01-22  Carl Love  <cel@us.ibm.com>
18563         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18564         LVX_V1TI): Add macro expansion.
18565         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18566         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18567         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18568         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18569         Change check to determine if the instruction is a byte reversing
18570         entry.  Fix typo in comment.
18571         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18572         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18573         Add def_builtin calls for new builtins.
18574         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18575         Add define_insn expansion.
18577 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18579         * config/rl78/rl78.md (umaxdi3): New define_expand.
18581 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18583         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18584         for non-QImode registers.
18586 2018-01-22  Richard Biener  <rguenther@suse.de>
18588         PR tree-optimization/83963
18589         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18590         including the loop exit block.
18591         (scop_detection::merge_sese): Likewise.
18592         (scop_detection::add_scop): Do it here instead.
18594 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18596         * doc/sourcebuild.texi (arm_softfloat): Document.
18598 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18600         PR gcc/77734
18601         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18602         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18603         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18605 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18606             David Edelsohn  <dje.gcc@gmail.com>
18608         PR target/83946
18609         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18610         Change "crset eq" to "crset 2".
18611         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18612         (*call_indirect_aix<mode>_nospec): Likewise.
18613         (*call_value_indirect_aix<mode>_nospec): Likewise.
18614         (*call_indirect_elfv2<mode>_nospec): Likewise.
18615         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18616         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18617         change assembly output from . to $.
18618         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18619         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18620         (*tablejump<mode>_internal1_nospec): Likewise.
18622 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18624         PR target/80870
18625         * config/sh/sh_optimize_sett_clrt.cc:
18626         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18628 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18630         PR tree-optimization/83940
18631         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18632         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18633         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18634         use it to pass back the definition type.
18635         (vect_check_store_rhs): Likewise rhs_dt_out.
18636         (vect_build_gather_load_calls): Add a mask_dt argument and use
18637         it instead of a call to vect_is_simple_use.
18638         (vectorizable_store): Update calls to vect_check_load_store_mask
18639         and vect_check_store_rhs.  Use the dt returned by the latter instead
18640         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18641         instead of calls to vect_is_simple_use.  Pass the scalar rather
18642         than the vector operand to vect_is_simple_use when handling
18643         second and subsequent copies of an rhs value.
18644         (vectorizable_load): Update calls to vect_check_load_store_mask
18645         and vect_build_gather_load_calls.  Use the cached mask_dt and
18646         gs_info.offset_dt instead of calls to vect_is_simple_use.
18648 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18650         PR middle-end/83945
18651         * tree-emutls.c: Include gimplify.h.
18652         (lower_emutls_2): New function.
18653         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18654         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18655         it before further processing.
18657         PR target/83930
18658         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18659         UINTVAL (trueop1) instead of INTVAL (op1).
18661 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18663         PR debug/81570
18664         PR debug/83728
18665         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18666         INCOMING_FRAME_SP_OFFSET if not defined.
18667         (scan_trace): Add ENTRY argument.  If true and
18668         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18669         emit a note to adjust the CFA offset.
18670         (create_cfi_notes): Adjust scan_trace callers.
18671         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18672         INCOMING_FRAME_SP_OFFSET in the CIE.
18673         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18674         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18675         Likewise.
18676         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18677         * doc/tm.texi: Regenerated.
18679 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18681         PR rtl-optimization/83147
18682         * lra-constraints.c (remove_inheritance_pseudos): Use
18683         lra_substitute_pseudo_within_insn.
18685 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18686             Cesar Philippidis  <cesar@codesourcery.com>
18688         PR target/83920
18689         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18691 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18693         PR target/83790
18694         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18695         spaces for function labels.
18697 2018-01-19  Martin Liska  <mliska@suse.cz>
18699         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18700         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18701         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18702         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18703         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18704         (PRED_CONST_RETURN): Change from 69 to 65.
18705         (PRED_NULL_RETURN): Change from 91 to 71.
18706         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18707         (PRED_LOOP_GUARD): Change from 66 to 73.
18709 2018-01-19  Martin Liska  <mliska@suse.cz>
18711         * predict.c (predict_insn_def): Add new assert.
18712         (struct branch_predictor): Change type to signed integer.
18713         (test_prediction_value_range): Amend test to cover
18714         PROB_UNINITIALIZED.
18715         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18716         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18717         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18718         (PRED_LOOP_IV_COMPARE): Likewise.
18719         * predict.h (PROB_UNINITIALIZED): Define new constant.
18721 2018-01-19  Martin Liska  <mliska@suse.cz>
18723         * predict.c (dump_prediction): Add new format for
18724         analyze_brprob.py script which is enabled with -details
18725         suboption.
18726         * profile-count.h (precise_p): New function.
18728 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18730         PR tree-optimization/83922
18731         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18732         there are no statements that need masking.
18733         (vect_active_double_reduction_p): New function.
18734         (vect_analyze_loop_operations): Use it when handling phis that
18735         are not in the loop header.
18737 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18739         PR tree-optimization/83914
18740         * tree-vect-loop.c (vectorizable_induction): Don't convert
18741         init_expr or apply the peeling adjustment for inductions
18742         that are nested within the vectorized loop.
18744 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18746         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18747         instead of NEG.
18749 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18751         PR sanitizer/81715
18752         PR testsuite/83882
18753         * function.h (gimplify_parameters): Add gimple_seq * argument.
18754         * function.c: Include gimple.h and options.h.
18755         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18756         for the added local temporaries if needed.
18757         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18758         if there are any parameter cleanups, wrap whole body into a
18759         try/finally with the cleanups.
18761 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18763         PR target/82964
18764         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18765         Use GET_MODE_CLASS for scalar floating point.
18767 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18769         PR ipa/82256
18770         patch by PaX Team
18771         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18772         Fix call of call_cgraph_insertion_hooks.
18774 2018-01-18  Martin Sebor  <msebor@redhat.com>
18776         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18778 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18780         PR ipa/83619
18781         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18782         frequencies.
18784 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18786         PR other/70268
18787         * common.opt: (-ffile-prefix-map): New option.
18788         * opts.c (common_handle_option): Defer it.
18789         * opts-global.c (handle_common_deferred_options): Handle it.
18790         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18791         * file-prefix-map.h: New file.
18792         (remap_debug_filename, add_debug_prefix_map): ...here.
18793         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18794         * final.c (debug_prefix_map, add_debug_prefix_map
18795         remap_debug_filename): Move to...
18796         * file-prefix-map.c: New file.
18797         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18798         generalize, get rid of alloca(), use strrchr() instead of strchr().
18799         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18800         Implement in terms of add_prefix_map().
18801         (remap_macro_filename, remap_debug_filename): Implement in term of
18802         remap_filename().
18803         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18804         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18805         * dbxout.c: Include file-prefix-map.h.
18806         * varasm.c: Likewise.
18807         * vmsdbgout.c: Likewise.
18808         * xcoffout.c: Likewise.
18809         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18810         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18811         * doc/invoke.texi (-ffile-prefix-map): Document.
18812         (-fdebug-prefix-map): Update description.
18814 2018-01-18  Martin Liska  <mliska@suse.cz>
18816         * config/i386/i386.c (indirect_thunk_name): Document that also
18817         lfence is emitted.
18818         (output_indirect_thunk): Document why both instructions
18819         (pause and lfence) are generated.
18821 2018-01-18  Richard Biener  <rguenther@suse.de>
18823         PR tree-optimization/83887
18824         * graphite-scop-detection.c
18825         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18826         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18827         (scop_detection::merge_sese): Re-implement with a flood-fill
18828         algorithm that properly finds a SESE region if it exists.
18830 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18832         PR c/61240
18833         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18834         pointer_diff optimizations use view_convert instead of convert.
18836 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18838         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18839         Generate different code for -mno-speculate-indirect-jumps.
18840         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18841         (*call_indirect_aix<mode>): Disable for
18842         -mno-speculate-indirect-jumps.
18843         (*call_indirect_aix<mode>_nospec): New define_insn.
18844         (*call_value_indirect_aix<mode>): Disable for
18845         -mno-speculate-indirect-jumps.
18846         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18847         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18848         -mno-speculate-indirect-jumps.
18849         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18851 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18853         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18854         long double type, set the flags for noting the default long double
18855         type, even if we don't pass or return a long double type.
18857 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18859         PR ipa/83051
18860         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18861         failure.
18863 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18865         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18866         support for merge[hl].
18867         (fold_mergehl_helper): New helper function.
18868         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18869         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18870         (altivec_vmrglw_direct): Add xxmrglw insn.
18872 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18874         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18875         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18877 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18879         PR lto/83121
18880         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18881         call the lto_location_cache before reading the
18882         DECL_SOURCE_LOCATION of the types.
18884 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18885             Richard Sandiford  <richard.sandiford@linaro.org>
18887         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18888         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18889         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18890         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18891         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18892         Add declaration.
18893         * config/aarch64/constraints.md (aarch64_movti_operand):
18894         Limit immediates.
18895         * config/aarch64/predicates.md (Uti): Add new constraint.
18897 2018-01-17  Carl Love  <cel@us.ibm.com>
18899         * config/rs6000/vsx.md (define_expand xl_len_r,
18900         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18901         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18902         lxvll.
18903         (define_expand, define_insn): Move the shift left from  the
18904         define_insn to the define_expand for lxvl and stxvl instructions.
18905         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18906         and XL_LEN_R definitions to PURE.
18908 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18910         * config/i386/i386.c (indirect_thunk_name): Declare regno
18911         as unsigned int.  Compare regno with INVALID_REGNUM.
18912         (output_indirect_thunk): Ditto.
18913         (output_indirect_thunk_function): Ditto.
18914         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18915         in the call to output_indirect_thunk_function.
18917 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18919         PR middle-end/83884
18920         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18921         rather than the size of inner_type to determine the stack slot size
18922         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18924 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18926         PR target/83546
18927         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18928         to PTA_SILVERMONT.
18930 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18932         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18933         endian Linux systems to optionally enable multilibs for selecting
18934         the long double type if the user configured an explicit type.
18935         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18936         have no long double multilibs if not defined.
18937         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18938         warn if the user used -mabi={ieee,ibm}longdouble and we built
18939         multilibs for long double.
18940         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18941         appropriate multilib option.
18942         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18943         multilib options.
18944         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18945         for building long double multilibs.
18946         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18948 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18950         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18951         copies.
18953         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18954         64 bits.
18955         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18956         128 bits.
18958         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18959         variables.
18961         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18962         return value.
18964 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18966         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18967         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18969 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18971         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18972         different rtl trees depending on TARGET_64BIT.
18973         (rs6000_gen_lvx): Likewise.
18975 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18977         * config/visium/visium.md (nop): Tweak comment.
18978         (hazard_nop): Likewise.
18980 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18982         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18983         -mspeculate-indirect-jumps.
18984         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18985         for -mno-speculate-indirect-jumps.
18986         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18987         (*call_value_indirect_elfv2<mode>): Disable for
18988         -mno-speculate-indirect-jumps.
18989         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18990         (indirect_jump): Emit different RTL for
18991         -mno-speculate-indirect-jumps.
18992         (*indirect_jump<mode>): Disable for
18993         -mno-speculate-indirect-jumps.
18994         (*indirect_jump<mode>_nospec): New define_insn.
18995         (tablejump): Emit different RTL for
18996         -mno-speculate-indirect-jumps.
18997         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18998         (tablejumpsi_nospec): New define_expand.
18999         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
19000         (tablejumpdi_nospec): New define_expand.
19001         (*tablejump<mode>_internal1): Disable for
19002         -mno-speculate-indirect-jumps.
19003         (*tablejump<mode>_internal1_nospec): New define_insn.
19004         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
19005         option.
19007 2018-01-16  Artyom Skrobov tyomitch@gmail.com
19009         * caller-save.c (insert_save): Drop unnecessary parameter.  All
19010         callers updated.
19012 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19013             Richard Biener  <rguenth@suse.de>
19015         PR libgomp/83590
19016         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
19017         return early, inline manually is_gimple_sizepos.  Make sure if we
19018         call gimplify_expr we don't end up with a gimple constant.
19019         * tree.c (variably_modified_type_p): Don't return true for
19020         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
19021         * gimplify.h (is_gimple_sizepos): Remove.
19023 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19025         PR tree-optimization/83857
19026         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
19027         vectorizable_live_operation for pure SLP statements.
19028         (vectorizable_live_operation): Handle PHIs.
19030 2018-01-16  Richard Biener  <rguenther@suse.de>
19032         PR tree-optimization/83867
19033         * tree-vect-stmts.c (vect_transform_stmt): Precompute
19034         nested_in_vect_loop_p since the scalar stmt may get invalidated.
19036 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19038         PR c/83844
19039         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
19040         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
19041         If off is not INTEGER_CST, issue a may not be aligned warning
19042         rather than isn't aligned.  Use isn%'t rather than isn't.
19043         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
19044         into MULT_EXPR.
19045         <case MULT_EXPR>: Improve the case when bottom and one of the
19046         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
19047         operand, in that case check if the other operand is multiple of
19048         bottom divided by the INTEGER_CST operand.
19050 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19052         PR target/83858
19053         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
19054         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
19055         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
19056         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
19057         * config/pa/pa.c (pa_function_arg_advance): Likewise.
19058         (pa_function_arg, pa_arg_partial_bytes): Likewise.
19059         (pa_function_arg_size): New function.
19061 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19063         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
19064         in a separate statement.
19066 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
19068         PR tree-optimization/83847
19069         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
19070         group gathers and scatters.
19072 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
19074         PR rtl-optimization/86620
19075         * params.def (max-sched-ready-insns): Bump minimum value to 1.
19077         PR rtl-optimization/83213
19078         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
19079         to last if both are JUMP_INSNs.
19081         PR tree-optimization/83843
19082         * gimple-ssa-store-merging.c
19083         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
19084         store_immediate_info for bswap/nop orig_stores.
19086 2018-01-15  Andrew Waterman  <andrew@sifive.com>
19088         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
19089         !TARGET_MUL.
19090         <UDIV>: Increase cost if !TARGET_DIV.
19092 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
19094         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
19095         (define_attr "cr_logical_3op"): New.
19096         (cceq_ior_compare): Adjust.
19097         (cceq_ior_compare_complement): Adjust.
19098         (*cceq_rev_compare): Adjust.
19099         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
19100         (is_cracked_insn): Adjust.
19101         (insn_must_be_first_in_group): Adjust.
19102         * config/rs6000/40x.md: Adjust.
19103         * config/rs6000/440.md: Adjust.
19104         * config/rs6000/476.md: Adjust.
19105         * config/rs6000/601.md: Adjust.
19106         * config/rs6000/603.md: Adjust.
19107         * config/rs6000/6xx.md: Adjust.
19108         * config/rs6000/7450.md: Adjust.
19109         * config/rs6000/7xx.md: Adjust.
19110         * config/rs6000/8540.md: Adjust.
19111         * config/rs6000/cell.md: Adjust.
19112         * config/rs6000/e300c2c3.md: Adjust.
19113         * config/rs6000/e500mc.md: Adjust.
19114         * config/rs6000/e500mc64.md: Adjust.
19115         * config/rs6000/e5500.md: Adjust.
19116         * config/rs6000/e6500.md: Adjust.
19117         * config/rs6000/mpc.md: Adjust.
19118         * config/rs6000/power4.md: Adjust.
19119         * config/rs6000/power5.md: Adjust.
19120         * config/rs6000/power6.md: Adjust.
19121         * config/rs6000/power7.md: Adjust.
19122         * config/rs6000/power8.md: Adjust.
19123         * config/rs6000/power9.md: Adjust.
19124         * config/rs6000/rs64.md: Adjust.
19125         * config/rs6000/titan.md: Adjust.
19127 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19129         * config/i386/predicates.md (indirect_branch_operand): Rewrite
19130         ix86_indirect_branch_register logic.
19132 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19134         * config/i386/constraints.md (Bs): Update
19135         ix86_indirect_branch_register check.  Don't check
19136         ix86_indirect_branch_register with GOT_memory_operand.
19137         (Bw): Likewise.
19138         * config/i386/predicates.md (GOT_memory_operand): Don't check
19139         ix86_indirect_branch_register here.
19140         (GOT32_symbol_operand): Likewise.
19142 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19144         * config/i386/predicates.md (constant_call_address_operand):
19145         Rewrite ix86_indirect_branch_register logic.
19146         (sibcall_insn_operand): Likewise.
19148 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19150         * config/i386/constraints.md (Bs): Replace
19151         ix86_indirect_branch_thunk_register with
19152         ix86_indirect_branch_register.
19153         (Bw): Likewise.
19154         * config/i386/i386.md (indirect_jump): Likewise.
19155         (tablejump): Likewise.
19156         (*sibcall_memory): Likewise.
19157         (*sibcall_value_memory): Likewise.
19158         Peepholes of indirect call and jump via memory: Likewise.
19159         * config/i386/i386.opt: Likewise.
19160         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19161         (GOT_memory_operand): Likewise.
19162         (call_insn_operand): Likewise.
19163         (sibcall_insn_operand): Likewise.
19164         (GOT32_symbol_operand): Likewise.
19166 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19168         PR middle-end/83837
19169         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19170         type rather than type addr's type points to.
19171         (expand_omp_atomic_mutex): Likewise.
19172         (expand_omp_atomic): Likewise.
19174 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19176         PR target/83839
19177         * config/i386/i386.c (output_indirect_thunk_function): Use
19178         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19179         for  __x86_return_thunk.
19181 2018-01-15  Richard Biener  <rguenther@suse.de>
19183         PR middle-end/83850
19184         * expmed.c (extract_bit_field_1): Fix typo.
19186 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19188         PR target/83687
19189         * config/arm/iterators.md (VF): New mode iterator.
19190         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19191         Remove integer-related logic from pattern.
19192         (neon_vabd<mode>_3): Likewise.
19194 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19196         PR middle-end/82694
19197         * common.opt (fstrict-overflow): No longer an alias.
19198         (fwrapv-pointer): New option.
19199         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19200         also for pointer types based on flag_wrapv_pointer.
19201         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19202         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19203         opts->x_flag_wrapv got set.
19204         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19205         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19206         POINTER_TYPE_OVERFLOW_UNDEFINED.
19207         * match.pd: Likewise in address comparison pattern.
19208         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19210 2018-01-15  Richard Biener  <rguenther@suse.de>
19212         PR lto/83804
19213         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19214         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19215         Reset type names to their identifier if their TYPE_DECL doesn't
19216         have linkage (and thus is used for ODR and devirt).
19217         (save_debug_info_for_decl): Remove.
19218         (save_debug_info_for_type): Likewise.
19219         (add_tree_to_fld_list): Adjust.
19220         * tree-pretty-print.c (dump_generic_node): Make dumping of
19221         type names more robust.
19223 2018-01-15  Richard Biener  <rguenther@suse.de>
19225         * BASE-VER: Bump to 8.0.1.
19227 2018-01-14  Martin Sebor  <msebor@redhat.com>
19229         PR other/83508
19230         * builtins.c (check_access): Avoid warning when the no-warning bit
19231         is set.
19233 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19235         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19236         * ira-color (allocno_hard_regs_compare): Likewise.
19238 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19240         PR target/83013
19241         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19242         Use .pushsection/.popsection.
19244 2018-01-14  Martin Sebor  <msebor@redhat.com>
19246         PR c++/81327
19247         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19249 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19251         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19252         entry from extra_headers.
19253         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19254         extra_headers, make the list bitwise identical to the i?86-*-* one.
19256 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19258         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19259         -mcmodel=large with -mindirect-branch=thunk,
19260         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19261         -mfunction-return=thunk-extern.
19262         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19263         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19264         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19266 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19268         * config/i386/i386.c (print_reg): Print the name of the full
19269         integer register without '%'.
19270         (ix86_print_operand): Handle 'V'.
19271         * doc/extend.texi: Document 'V' modifier.
19273 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19275         * config/i386/constraints.md (Bs): Disallow memory operand for
19276         -mindirect-branch-register.
19277         (Bw): Likewise.
19278         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19279         (GOT_memory_operand): Likewise.
19280         (call_insn_operand): Likewise.
19281         (sibcall_insn_operand): Likewise.
19282         (GOT32_symbol_operand): Likewise.
19283         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19284         for -mindirect-branch-register.
19285         (tablejump): Likewise.
19286         (*sibcall_memory): Likewise.
19287         (*sibcall_value_memory): Likewise.
19288         Disallow peepholes of indirect call and jump via memory for
19289         -mindirect-branch-register.
19290         (*call_pop): Replace m with Bw.
19291         (*call_value_pop): Likewise.
19292         (*sibcall_pop_memory): Replace m with Bs.
19293         * config/i386/i386.opt (mindirect-branch-register): New option.
19294         * doc/invoke.texi: Document -mindirect-branch-register option.
19296 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19298         * config/i386/i386-protos.h (ix86_output_function_return): New.
19299         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19300         set function_return_type.
19301         (indirect_thunk_name): Add ret_p to indicate thunk for function
19302         return.
19303         (output_indirect_thunk_function): Pass false to
19304         indirect_thunk_name.
19305         (ix86_output_indirect_branch_via_reg): Likewise.
19306         (ix86_output_indirect_branch_via_push): Likewise.
19307         (output_indirect_thunk_function): Create alias for function
19308         return thunk if regno < 0.
19309         (ix86_output_function_return): New function.
19310         (ix86_handle_fndecl_attribute): Handle function_return.
19311         (ix86_attribute_table): Add function_return.
19312         * config/i386/i386.h (machine_function): Add
19313         function_return_type.
19314         * config/i386/i386.md (simple_return_internal): Use
19315         ix86_output_function_return.
19316         (simple_return_internal_long): Likewise.
19317         * config/i386/i386.opt (mfunction-return=): New option.
19318         (indirect_branch): Mention -mfunction-return=.
19319         * doc/extend.texi: Document function_return function attribute.
19320         * doc/invoke.texi: Document -mfunction-return= option.
19322 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19324         * config/i386/i386-opts.h (indirect_branch): New.
19325         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19326         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19327         with local indirect jump when converting indirect call and jump.
19328         (ix86_set_indirect_branch_type): New.
19329         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19330         (indirectlabelno): New.
19331         (indirect_thunk_needed): Likewise.
19332         (indirect_thunk_bnd_needed): Likewise.
19333         (indirect_thunks_used): Likewise.
19334         (indirect_thunks_bnd_used): Likewise.
19335         (INDIRECT_LABEL): Likewise.
19336         (indirect_thunk_name): Likewise.
19337         (output_indirect_thunk): Likewise.
19338         (output_indirect_thunk_function): Likewise.
19339         (ix86_output_indirect_branch_via_reg): Likewise.
19340         (ix86_output_indirect_branch_via_push): Likewise.
19341         (ix86_output_indirect_branch): Likewise.
19342         (ix86_output_indirect_jmp): Likewise.
19343         (ix86_code_end): Call output_indirect_thunk_function if needed.
19344         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19345         needed.
19346         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19347         (ix86_attribute_table): Add indirect_branch.
19348         * config/i386/i386.h (machine_function): Add indirect_branch_type
19349         and has_local_indirect_jump.
19350         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19351         to true.
19352         (tablejump): Likewise.
19353         (*indirect_jump): Use ix86_output_indirect_jmp.
19354         (*tablejump_1): Likewise.
19355         (simple_return_indirect_internal): Likewise.
19356         * config/i386/i386.opt (mindirect-branch=): New option.
19357         (indirect_branch): New.
19358         (keep): Likewise.
19359         (thunk): Likewise.
19360         (thunk-inline): Likewise.
19361         (thunk-extern): Likewise.
19362         * doc/extend.texi: Document indirect_branch function attribute.
19363         * doc/invoke.texi: Document -mindirect-branch= option.
19365 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19367         PR ipa/83051
19368         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19370 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19372         * ipa-inline.c (want_inline_small_function_p): Return false if
19373         inlining has already failed with CIF_FINAL_ERROR.
19374         (update_caller_keys): Call want_inline_small_function_p before
19375         can_inline_edge_p.
19376         (update_callee_keys): Likewise.
19378 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19380         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19381         New function.
19382         (rs6000_quadword_masked_address_p): Likewise.
19383         (quad_aligned_load_p): Likewise.
19384         (quad_aligned_store_p): Likewise.
19385         (const_load_sequence_p): Add comment to describe the outer-most loop.
19386         (mimic_memory_attributes_and_flags): New function.
19387         (rs6000_gen_stvx): Likewise.
19388         (replace_swapped_aligned_store): Likewise.
19389         (rs6000_gen_lvx): Likewise.
19390         (replace_swapped_aligned_load): Likewise.
19391         (replace_swapped_load_constant): Capitalize argument name in
19392         comment describing this function.
19393         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19394         and stores that access quad-word aligned addresses and replace
19395         with stvx or lvx instructions when appropriate.
19396         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19397         New function prototype.
19398         (rs6000_quadword_masked_address_p): Likewise.
19399         (rs6000_gen_lvx): Likewise.
19400         (rs6000_gen_stvx): Likewise.
19401         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19402         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19403         when memory address is aligned.
19404         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19405         this split to select lvx instruction when memory address is aligned.
19406         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19407         instruction when memory address is aligned.
19408         (*vsx_le_perm_load_v16qi): Likewise.
19409         (four unnamed splitters): Modify to select the stvx instruction
19410         when memory is aligned.
19412 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19414         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19415         which appears in the queue multiple times.
19417 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19418             Alan Hayward  <alan.hayward@arm.com>
19419             David Sherwood  <david.sherwood@arm.com>
19421         * tree-vectorizer.h (vec_lower_bound): New structure.
19422         (_loop_vec_info): Add check_nonzero and lower_bounds.
19423         (LOOP_VINFO_CHECK_NONZERO): New macro.
19424         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19425         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19426         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19427         fields.  Make seg_len the distance travelled, not including the
19428         access size.
19429         (dr_direction_indicator): Declare.
19430         (dr_zero_step_indicator): Likewise.
19431         (dr_known_forward_stride_p): Likewise.
19432         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19433         tree-ssanames.h.
19434         (runtime_alias_check_p): Allow runtime alias checks with
19435         variable strides.
19436         (operator ==): Compare access_size and align.
19437         (prune_runtime_alias_test_list): Rework for new distinction between
19438         the access_size and seg_len.
19439         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19440         segment lengths.
19441         (get_segment_min_max): New function.
19442         (create_intersect_range_checks): Use it.
19443         (dr_step_indicator): New function.
19444         (dr_direction_indicator): Likewise.
19445         (dr_zero_step_indicator): Likewise.
19446         (dr_known_forward_stride_p): Likewise.
19447         * tree-loop-distribution.c (data_ref_segment_size): Return
19448         DR_STEP * (niters - 1).
19449         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19450         constructor.
19451         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19452         (vect_preserves_scalar_order_p): New function, split out from...
19453         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19454         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19455         (vect_vfa_access_size): New function.
19456         (vect_vfa_align): Likewise.
19457         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19458         (dump_lower_bound): New function.
19459         (vect_check_lower_bound): Likewise.
19460         (vect_small_gap_p): Likewise.
19461         (vectorizable_with_step_bound_p): Likewise.
19462         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19463         depencies if the vectorization factor is 1.  Convert the checks
19464         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19465         a bunds check for variable steps if the minimum required step is
19466         relatively small. Update calls to the dr_with_seg_len
19467         constructor and to vect_compile_time_alias.
19468         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19469         function.
19470         (vect_loop_versioning): Call it.
19471         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19472         when retrying.
19473         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19475 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19476             Alan Hayward  <alan.hayward@arm.com>
19477             David Sherwood  <david.sherwood@arm.com>
19479         * doc/sourcebuild.texi (vect_scatter_store): Document.
19480         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19481         optabs.
19482         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19483         Document.
19484         * genopinit.c (main): Add supports_vec_scatter_store and
19485         supports_vec_scatter_store_cached to target_optabs.
19486         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19487         IFN_MASK_SCATTER_STORE.
19488         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19489         functions.
19490         * internal-fn.h (internal_store_fn_p): Declare.
19491         (internal_fn_stored_value_index): Likewise.
19492         * internal-fn.c (scatter_store_direct): New macro.
19493         (expand_scatter_store_optab_fn): New function.
19494         (direct_scatter_store_optab_supported_p): New macro.
19495         (internal_store_fn_p): New function.
19496         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19497         IFN_MASK_SCATTER_STORE.
19498         (internal_fn_mask_index): Likewise.
19499         (internal_fn_stored_value_index): New function.
19500         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19501         for scatter stores.
19502         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19503         * optabs-query.c (supports_vec_scatter_store_p): New function.
19504         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19505         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19506         true for scatter stores.
19507         (vect_gather_scatter_fn_p): Handle scatter stores too.
19508         (vect_check_gather_scatter): Consider using scatter stores if
19509         supports_vec_scatter_store_p.
19510         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19511         scatter stores too.
19512         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19513         internal_fn_stored_value_index.
19514         (check_load_store_masking): Handle scatter stores too.
19515         (vect_get_store_rhs): Make public.
19516         (vectorizable_call): Use internal_store_fn_p.
19517         (vectorizable_store): Handle scatter store internal functions.
19518         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19519         when deciding whether the end of the group has been reached.
19520         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19521         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19522         (mask_scatter_store<mode>): New insns.
19524 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19525             Alan Hayward  <alan.hayward@arm.com>
19526             David Sherwood  <david.sherwood@arm.com>
19528         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19529         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19530         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19531         function.
19532         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19533         Use vect_truncate_gather_scatter_offset if we can't treat the
19534         operation as a normal gather load or scatter store.
19535         (get_group_load_store_type): Take the gather_scatter_info
19536         as argument.  Try using a gather load or scatter store for
19537         single-element groups.
19538         (get_load_store_type): Update calls to get_group_load_store_type
19539         and vect_use_strided_gather_scatters_p.
19541 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19542             Alan Hayward  <alan.hayward@arm.com>
19543             David Sherwood  <david.sherwood@arm.com>
19545         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19546         optional tree argument.
19547         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19548         null target hooks.
19549         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19550         but continue to use the current value as a fallback.
19551         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19552         to compare the updates.
19553         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19554         (get_load_store_type): Use it when handling a strided access.
19555         (vect_get_strided_load_store_ops): New function.
19556         (vect_get_data_ptr_increment): Likewise.
19557         (vectorizable_load): Handle strided gather loads.  Always pass
19558         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19560 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19561             Alan Hayward  <alan.hayward@arm.com>
19562             David Sherwood  <david.sherwood@arm.com>
19564         * doc/md.texi (gather_load@var{m}): Document.
19565         (mask_gather_load@var{m}): Likewise.
19566         * genopinit.c (main): Add supports_vec_gather_load and
19567         supports_vec_gather_load_cached to target_optabs.
19568         * optabs-tree.c (init_tree_optimization_optabs): Use
19569         ggc_cleared_alloc to allocate target_optabs.
19570         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19571         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19572         functions.
19573         * internal-fn.h (internal_load_fn_p): Declare.
19574         (internal_gather_scatter_fn_p): Likewise.
19575         (internal_fn_mask_index): Likewise.
19576         (internal_gather_scatter_fn_supported_p): Likewise.
19577         * internal-fn.c (gather_load_direct): New macro.
19578         (expand_gather_load_optab_fn): New function.
19579         (direct_gather_load_optab_supported_p): New macro.
19580         (direct_internal_fn_optab): New function.
19581         (internal_load_fn_p): Likewise.
19582         (internal_gather_scatter_fn_p): Likewise.
19583         (internal_fn_mask_index): Likewise.
19584         (internal_gather_scatter_fn_supported_p): Likewise.
19585         * optabs-query.c (supports_at_least_one_mode_p): New function.
19586         (supports_vec_gather_load_p): Likewise.
19587         * optabs-query.h (supports_vec_gather_load_p): Declare.
19588         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19589         and memory_type field.
19590         (NUM_PATTERNS): Bump to 15.
19591         * tree-vect-data-refs.c: Include internal-fn.h.
19592         (vect_gather_scatter_fn_p): New function.
19593         (vect_describe_gather_scatter_call): Likewise.
19594         (vect_check_gather_scatter): Try using internal functions for
19595         gather loads.  Recognize existing calls to a gather load function.
19596         (vect_analyze_data_refs): Consider using gather loads if
19597         supports_vec_gather_load_p.
19598         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19599         (vect_get_gather_scatter_offset_type): Likewise.
19600         (vect_convert_mask_for_vectype): Likewise.
19601         (vect_add_conversion_to_patterm): Likewise.
19602         (vect_try_gather_scatter_pattern): Likewise.
19603         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19604         (vect_vect_recog_func_ptrs): Add it.
19605         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19606         internal_fn_mask_index and internal_gather_scatter_fn_p.
19607         (check_load_store_masking): Take the gather_scatter_info as an
19608         argument and handle gather loads.
19609         (vect_get_gather_scatter_ops): New function.
19610         (vectorizable_call): Check internal_load_fn_p.
19611         (vectorizable_load): Likewise.  Handle gather load internal
19612         functions.
19613         (vectorizable_store): Update call to check_load_store_masking.
19614         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19615         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19616         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19617         (aarch64_gather_scale_operand_d): New predicates.
19618         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19619         (mask_gather_load<mode>): New insns.
19621 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19622             Alan Hayward  <alan.hayward@arm.com>
19623             David Sherwood  <david.sherwood@arm.com>
19625         * optabs.def (fold_left_plus_optab): New optab.
19626         * doc/md.texi (fold_left_plus_@var{m}): Document.
19627         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19628         * internal-fn.c (fold_left_direct): Define.
19629         (expand_fold_left_optab_fn): Likewise.
19630         (direct_fold_left_optab_supported_p): Likewise.
19631         * fold-const-call.c (fold_const_fold_left): New function.
19632         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19633         * tree-parloops.c (valid_reduction_p): New function.
19634         (gather_scalar_reductions): Use it.
19635         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19636         (vect_finish_replace_stmt): Declare.
19637         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19638         (needs_fold_left_reduction_p): New function, split out from...
19639         (vect_is_simple_reduction): ...here.  Accept reductions that
19640         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19641         (vect_force_simple_reduction): Also store the reduction type in
19642         the assignment's STMT_VINFO_REDUC_TYPE.
19643         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19644         (merge_with_identity): New function.
19645         (vect_expand_fold_left): Likewise.
19646         (vectorize_fold_left_reduction): Likewise.
19647         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19648         scalar phi in place for it.  Check for target support and reject
19649         cases that would reassociate the operation.  Defer the transform
19650         phase to vectorize_fold_left_reduction.
19651         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19652         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19653         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19655 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19657         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19658         call to ifc_temp_var.
19660 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19661             Alan Hayward  <alan.hayward@arm.com>
19662             David Sherwood  <david.sherwood@arm.com>
19664         * target.def (legitimize_address_displacement): Take the original
19665         offset as a poly_int.
19666         * targhooks.h (default_legitimize_address_displacement): Update
19667         accordingly.
19668         * targhooks.c (default_legitimize_address_displacement): Likewise.
19669         * doc/tm.texi: Regenerate.
19670         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19671         as an argument, moving assert of ad->disp == ad->disp_term to...
19672         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19673         Try calling targetm.legitimize_address_displacement before expanding
19674         the address rather than afterwards, and adjust for the new interface.
19675         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19676         Match the new hook interface.  Handle SVE addresses.
19677         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19678         new hook interface.
19680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19682         * Makefile.in (OBJS): Add early-remat.o.
19683         * target.def (select_early_remat_modes): New hook.
19684         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19685         * doc/tm.texi: Regenerate.
19686         * targhooks.h (default_select_early_remat_modes): Declare.
19687         * targhooks.c (default_select_early_remat_modes): New function.
19688         * timevar.def (TV_EARLY_REMAT): New timevar.
19689         * passes.def (pass_early_remat): New pass.
19690         * tree-pass.h (make_pass_early_remat): Declare.
19691         * early-remat.c: New file.
19692         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19693         function.
19694         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19696 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19697             Alan Hayward  <alan.hayward@arm.com>
19698             David Sherwood  <david.sherwood@arm.com>
19700         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19701         vfm1 with a bound_epilog parameter.
19702         (vect_do_peeling): Update calls accordingly, and move the prologue
19703         call earlier in the function.  Treat the base bound_epilog as 0 for
19704         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19705         this base when peeling for gaps.
19706         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19707         with fully-masked loops.
19708         (vect_estimate_min_profitable_iters): Handle the single peeled
19709         iteration in that case.
19711 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19712             Alan Hayward  <alan.hayward@arm.com>
19713             David Sherwood  <david.sherwood@arm.com>
19715         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19716         single-element interleaving even if the size is not a power of 2.
19717         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19718         accesses for single-element interleaving if the group size is
19719         not a power of 2.
19721 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19722             Alan Hayward  <alan.hayward@arm.com>
19723             David Sherwood  <david.sherwood@arm.com>
19725         * doc/md.texi (fold_extract_last_@var{m}): Document.
19726         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19727         * optabs.def (fold_extract_last_optab): New optab.
19728         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19729         * internal-fn.c (fold_extract_direct): New macro.
19730         (expand_fold_extract_optab_fn): Likewise.
19731         (direct_fold_extract_optab_supported_p): Likewise.
19732         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19733         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19734         EXTRACT_LAST_REDUCTION.
19735         (get_initial_def_for_reduction): Do not create an initial vector
19736         for EXTRACT_LAST_REDUCTION reductions.
19737         (vectorizable_reduction): Leave the scalar phi in place for
19738         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19739         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19740         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19741         transform phase to vectorizable_condition.
19742         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19743         split out from...
19744         (vect_finish_stmt_generation): ...here.
19745         (vect_finish_replace_stmt): New function.
19746         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19747         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19748         pattern.
19749         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19751 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19752             Alan Hayward  <alan.hayward@arm.com>
19753             David Sherwood  <david.sherwood@arm.com>
19755         * doc/md.texi (extract_last_@var{m}): Document.
19756         * optabs.def (extract_last_optab): New optab.
19757         * internal-fn.def (EXTRACT_LAST): New internal function.
19758         * internal-fn.c (cond_unary_direct): New macro.
19759         (expand_cond_unary_optab_fn): Likewise.
19760         (direct_cond_unary_optab_supported_p): Likewise.
19761         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19762         loops using EXTRACT_LAST.
19763         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19764         (extract_last_<mode>): ...this optab.
19765         (vec_extract<mode><Vel>): Update accordingly.
19767 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19768             Alan Hayward  <alan.hayward@arm.com>
19769             David Sherwood  <david.sherwood@arm.com>
19771         * target.def (empty_mask_is_expensive): New hook.
19772         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19773         * doc/tm.texi: Regenerate.
19774         * targhooks.h (default_empty_mask_is_expensive): Declare.
19775         * targhooks.c (default_empty_mask_is_expensive): New function.
19776         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19777         if the target says that empty masks are expensive.
19778         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19779         New function.
19780         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19782 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19783             Alan Hayward  <alan.hayward@arm.com>
19784             David Sherwood  <david.sherwood@arm.com>
19786         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19787         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19788         (vect_use_loop_mask_for_alignment_p): New function.
19789         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19790         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19791         niters_skip argument.  Make sure that the first niters_skip elements
19792         of the first iteration are inactive.
19793         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19794         Update call to vect_set_loop_masks_directly.
19795         (get_misalign_in_elems): New function, split out from...
19796         (vect_gen_prolog_loop_niters): ...here.
19797         (vect_update_init_of_dr): Take a code argument that specifies whether
19798         the adjustment should be added or subtracted.
19799         (vect_update_init_of_drs): Likewise.
19800         (vect_prepare_for_masked_peels): New function.
19801         (vect_do_peeling): Skip prologue peeling if we're using a mask
19802         instead.  Update call to vect_update_inits_of_drs.
19803         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19804         mask_skip_niters.
19805         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19806         alignment.  Do not include the number of peeled iterations in
19807         the minimum threshold in that case.
19808         (vectorizable_induction): Adjust the start value down by
19809         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19810         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19811         Take the number of skipped iterations into account when calculating
19812         the loop bounds.
19813         * tree-vect-stmts.c (vect_gen_while_not): New function.
19815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19816             Alan Hayward  <alan.hayward@arm.com>
19817             David Sherwood  <david.sherwood@arm.com>
19819         * doc/sourcebuild.texi (vect_fully_masked): Document.
19820         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19821         default value to 0.
19822         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19823         split out from...
19824         (vect_analyze_loop_2): ...here. Don't check the vectorization
19825         factor against the number of loop iterations if the loop is
19826         fully-masked.
19828 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19829             Alan Hayward  <alan.hayward@arm.com>
19830             David Sherwood  <david.sherwood@arm.com>
19832         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19833         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19834         (dump_groups): Update accordingly.
19835         (iv_use::mem_type): New member variable.
19836         (address_p): New function.
19837         (record_use): Add a mem_type argument and initialize the new
19838         mem_type field.
19839         (record_group_use): Add a mem_type argument.  Use address_p.
19840         Remove obsolete null checks of base_object.  Update call to record_use.
19841         (find_interesting_uses_op): Update call to record_group_use.
19842         (find_interesting_uses_cond): Likewise.
19843         (find_interesting_uses_address): Likewise.
19844         (get_mem_type_for_internal_fn): New function.
19845         (find_address_like_use): Likewise.
19846         (find_interesting_uses_stmt): Try find_address_like_use before
19847         calling find_interesting_uses_op.
19848         (addr_offset_valid_p): Use the iv mem_type field as the type
19849         of the addressed memory.
19850         (add_autoinc_candidates): Likewise.
19851         (get_address_cost): Likewise.
19852         (split_small_address_groups_p): Use address_p.
19853         (split_address_groups): Likewise.
19854         (add_iv_candidate_for_use): Likewise.
19855         (autoinc_possible_for_pair): Likewise.
19856         (rewrite_groups): Likewise.
19857         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19858         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19859         (get_alias_ptr_type_for_ptr_address): New function.
19860         (rewrite_use_address): Rewrite address uses in calls that were
19861         identified by find_address_like_use.
19863 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19864             Alan Hayward  <alan.hayward@arm.com>
19865             David Sherwood  <david.sherwood@arm.com>
19867         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19868         TARGET_MEM_REFs.
19869         * gimple-expr.h (is_gimple_addressable: Likewise.
19870         * gimple-expr.c (is_gimple_address): Likewise.
19871         * internal-fn.c (expand_call_mem_ref): New function.
19872         (expand_mask_load_optab_fn): Use it.
19873         (expand_mask_store_optab_fn): Likewise.
19875 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19876             Alan Hayward  <alan.hayward@arm.com>
19877             David Sherwood  <david.sherwood@arm.com>
19879         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19880         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19881         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19882         (cond_umax@var{mode}): Document.
19883         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19884         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19885         (cond_umin_optab, cond_umax_optab): New optabs.
19886         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19887         (COND_IOR, COND_XOR): New internal functions.
19888         * internal-fn.h (get_conditional_internal_fn): Declare.
19889         * internal-fn.c (cond_binary_direct): New macro.
19890         (expand_cond_binary_optab_fn): Likewise.
19891         (direct_cond_binary_optab_supported_p): Likewise.
19892         (get_conditional_internal_fn): New function.
19893         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19894         Cope with reduction statements that are vectorized as calls rather
19895         than assignments.
19896         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19897         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19898         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19899         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19900         (UNSPEC_COND_EOR): New unspecs.
19901         (optab): Add mappings for them.
19902         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19903         (sve_int_op, sve_fp_op): New int attributes.
19905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19906             Alan Hayward  <alan.hayward@arm.com>
19907             David Sherwood  <david.sherwood@arm.com>
19909         * optabs.def (while_ult_optab): New optab.
19910         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19911         * internal-fn.def (WHILE_ULT): New internal function.
19912         * internal-fn.h (direct_internal_fn_supported_p): New override
19913         that takes two types as argument.
19914         * internal-fn.c (while_direct): New macro.
19915         (expand_while_optab_fn): New function.
19916         (convert_optab_supported_p): Likewise.
19917         (direct_while_optab_supported_p): New macro.
19918         * wide-int.h (wi::udiv_ceil): New function.
19919         * tree-vectorizer.h (rgroup_masks): New structure.
19920         (vec_loop_masks): New typedef.
19921         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19922         and fully_masked_p.
19923         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19924         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19925         (vect_max_vf): New function.
19926         (slpeel_make_loop_iterate_ntimes): Delete.
19927         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19928         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19929         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19930         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19931         internal-fn.h, stor-layout.h and optabs-query.h.
19932         (vect_set_loop_mask): New function.
19933         (add_preheader_seq): Likewise.
19934         (add_header_seq): Likewise.
19935         (interleave_supported_p): Likewise.
19936         (vect_maybe_permute_loop_masks): Likewise.
19937         (vect_set_loop_masks_directly): Likewise.
19938         (vect_set_loop_condition_masked): Likewise.
19939         (vect_set_loop_condition_unmasked): New function, split out from
19940         slpeel_make_loop_iterate_ntimes.
19941         (slpeel_make_loop_iterate_ntimes): Rename to..
19942         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19943         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19944         (vect_do_peeling): Update call accordingly.
19945         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19946         loops.
19947         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19948         mask_compare_type, can_fully_mask_p and fully_masked_p.
19949         (release_vec_loop_masks): New function.
19950         (_loop_vec_info): Use it to free the loop masks.
19951         (can_produce_all_loop_masks_p): New function.
19952         (vect_get_max_nscalars_per_iter): Likewise.
19953         (vect_verify_full_masking): Likewise.
19954         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19955         retries, and free the mask rgroups before retrying.  Check loop-wide
19956         reasons for disallowing fully-masked loops.  Make the final decision
19957         about whether use a fully-masked loop or not.
19958         (vect_estimate_min_profitable_iters): Do not assume that peeling
19959         for the number of iterations will be needed for fully-masked loops.
19960         (vectorizable_reduction): Disable fully-masked loops.
19961         (vectorizable_live_operation): Likewise.
19962         (vect_halve_mask_nunits): New function.
19963         (vect_double_mask_nunits): Likewise.
19964         (vect_record_loop_mask): Likewise.
19965         (vect_get_loop_mask): Likewise.
19966         (vect_transform_loop): Handle the case in which the final loop
19967         iteration might handle a partial vector.  Call vect_set_loop_condition
19968         instead of slpeel_make_loop_iterate_ntimes.
19969         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19970         (check_load_store_masking): New function.
19971         (prepare_load_store_mask): Likewise.
19972         (vectorizable_store): Handle fully-masked loops.
19973         (vectorizable_load): Likewise.
19974         (supportable_widening_operation): Use vect_halve_mask_nunits for
19975         booleans.
19976         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19977         (vect_gen_while): New function.
19978         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19979         (aarch64_uqdec<mode>): New insn.
19981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19982             Alan Hayward  <alan.hayward@arm.com>
19983             David Sherwood  <david.sherwood@arm.com>
19985         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19986         (reduc_xor_scal_optab): New optabs.
19987         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19988         (reduc_xor_scal_@var{m}): Document.
19989         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19990         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19991         internal functions.
19992         * fold-const-call.c (fold_const_call): Handle them.
19993         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19994         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19995         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19996         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19997         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19998         (UNSPEC_XORV): New unspecs.
19999         (optab): Add entries for them.
20000         (BITWISEV): New int iterator.
20001         (bit_reduc_op): New int attributes.
20003 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20004             Alan Hayward  <alan.hayward@arm.com>
20005             David Sherwood  <david.sherwood@arm.com>
20007         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
20008         * internal-fn.def (VEC_SHL_INSERT): New internal function.
20009         * optabs.def (vec_shl_insert_optab): New optab.
20010         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
20011         (duplicate_and_interleave): Likewise.
20012         * tree-vect-loop.c: Include internal-fn.h.
20013         (neutral_op_for_slp_reduction): New function, split out from
20014         get_initial_defs_for_reduction.
20015         (get_initial_def_for_reduction): Handle option 2 for variable-length
20016         vectors by loading the neutral value into a vector and then shifting
20017         the initial value into element 0.
20018         (get_initial_defs_for_reduction): Replace the code argument with
20019         the neutral value calculated by neutral_op_for_slp_reduction.
20020         Use gimple_build_vector for constant-length vectors.
20021         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
20022         but the first group_size elements have a neutral value.
20023         Use duplicate_and_interleave otherwise.
20024         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
20025         Update call to get_initial_defs_for_reduction.  Handle SLP
20026         reductions for variable-length vectors by creating one vector
20027         result for each scalar result, with the elements associated
20028         with other scalar results stubbed out with the neutral value.
20029         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
20030         Require IFN_VEC_SHL_INSERT for double reductions on
20031         variable-length vectors, or SLP reductions that have
20032         a neutral value.  Require can_duplicate_and_interleave_p
20033         support for variable-length unchained SLP reductions if there
20034         is no neutral value, such as for MIN/MAX reductions.  Also require
20035         the number of vector elements to be a multiple of the number of
20036         SLP statements when doing variable-length unchained SLP reductions.
20037         Update call to vect_create_epilog_for_reduction.
20038         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
20039         and remove initial values.
20040         (duplicate_and_interleave): Make public.
20041         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
20042         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
20044 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20045             Alan Hayward  <alan.hayward@arm.com>
20046             David Sherwood  <david.sherwood@arm.com>
20048         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
20049         (can_duplicate_and_interleave_p): New function.
20050         (vect_get_and_check_slp_defs): Take the vector of statements
20051         rather than just the current one.  Remove excess parentheses.
20052         Restriction rejectinon of vect_constant_def and vect_external_def
20053         for variable-length vectors to boolean types, or types for which
20054         can_duplicate_and_interleave_p is false.
20055         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
20056         (duplicate_and_interleave): New function.
20057         (vect_get_constant_vectors): Use gimple_build_vector for
20058         constant-length vectors and suitable variable-length constant
20059         vectors.  Use duplicate_and_interleave for other variable-length
20060         vectors.  Don't defer the update when inserting new statements.
20062 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20063             Alan Hayward  <alan.hayward@arm.com>
20064             David Sherwood  <david.sherwood@arm.com>
20066         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
20067         min_profitable_iters doesn't go negative.
20069 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20070             Alan Hayward  <alan.hayward@arm.com>
20071             David Sherwood  <david.sherwood@arm.com>
20073         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
20074         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
20075         * optabs.def (vec_mask_load_lanes_optab): New optab.
20076         (vec_mask_store_lanes_optab): Likewise.
20077         * internal-fn.def (MASK_LOAD_LANES): New internal function.
20078         (MASK_STORE_LANES): Likewise.
20079         * internal-fn.c (mask_load_lanes_direct): New macro.
20080         (mask_store_lanes_direct): Likewise.
20081         (expand_mask_load_optab_fn): Handle masked operations.
20082         (expand_mask_load_lanes_optab_fn): New macro.
20083         (expand_mask_store_optab_fn): Handle masked operations.
20084         (expand_mask_store_lanes_optab_fn): New macro.
20085         (direct_mask_load_lanes_optab_supported_p): Likewise.
20086         (direct_mask_store_lanes_optab_supported_p): Likewise.
20087         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
20088         parameter.
20089         (vect_load_lanes_supported): Likewise.
20090         * tree-vect-data-refs.c (strip_conversion): New function.
20091         (can_group_stmts_p): Likewise.
20092         (vect_analyze_data_ref_accesses): Use it instead of checking
20093         for a pair of assignments.
20094         (vect_store_lanes_supported): Take a masked_p parameter.
20095         (vect_load_lanes_supported): Likewise.
20096         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
20097         vect_store_lanes_supported and vect_load_lanes_supported.
20098         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
20099         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
20100         parameter.  Don't allow gaps for masked accesses.
20101         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
20102         and vect_load_lanes_supported.
20103         (get_load_store_type): Take a masked_p parameter and update
20104         call to get_group_load_store_type.
20105         (vectorizable_store): Update call to get_load_store_type.
20106         Handle IFN_MASK_STORE_LANES.
20107         (vectorizable_load): Update call to get_load_store_type.
20108         Handle IFN_MASK_LOAD_LANES.
20110 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20111             Alan Hayward  <alan.hayward@arm.com>
20112             David Sherwood  <david.sherwood@arm.com>
20114         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
20115         modes for SVE.
20116         * config/aarch64/aarch64-protos.h
20117         (aarch64_sve_struct_memory_operand_p): Declare.
20118         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
20119         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
20120         (VPRED, vpred): Handle SVE structure modes.
20121         * config/aarch64/constraints.md (Utx): New constraint.
20122         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
20123         (aarch64_sve_struct_nonimmediate_operand): New predicates.
20124         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
20125         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
20126         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
20127         structure modes.  Split into pieces after RA.
20128         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
20129         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
20130         New patterns.
20131         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
20132         SVE structure modes.
20133         (aarch64_classify_address): Likewise.
20134         (sizetochar): Move earlier in file.
20135         (aarch64_print_operand): Handle SVE register lists.
20136         (aarch64_array_mode): New function.
20137         (aarch64_sve_struct_memory_operand_p): Likewise.
20138         (TARGET_ARRAY_MODE): Redefine.
20140 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20141             Alan Hayward  <alan.hayward@arm.com>
20142             David Sherwood  <david.sherwood@arm.com>
20144         * target.def (array_mode): New target hook.
20145         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
20146         * doc/tm.texi: Regenerate.
20147         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20148         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20149         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20150         targetm.array_mode.
20151         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20152         type sizes.
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         * fold-const.c (fold_binary_loc): Check the argument types
20159         rather than the result type when testing for a vector operation.
20161 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20163         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20164         * doc/tm.texi: Regenerate.
20166 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20167             Alan Hayward  <alan.hayward@arm.com>
20168             David Sherwood  <david.sherwood@arm.com>
20170         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20171         (sve): Document new AArch64 extension.
20172         * doc/md.texi (w): Extend the description of the AArch64
20173         constraint to include SVE vectors.
20174         (Upl, Upa): Document new AArch64 predicate constraints.
20175         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20176         enum.
20177         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20178         (msve-vector-bits=): New option.
20179         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20180         SVE when these are disabled.
20181         (sve): New extension.
20182         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20183         modes.  Adjust their number of units based on aarch64_sve_vg.
20184         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20185         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20186         aarch64_addr_query_type.
20187         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20188         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20189         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20190         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20191         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20192         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20193         (aarch64_simd_imm_zero_p): Delete.
20194         (aarch64_check_zero_based_sve_index_immediate): Declare.
20195         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20196         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20197         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20198         (aarch64_sve_float_mul_immediate_p): Likewise.
20199         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20200         rather than an rtx.
20201         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20202         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20203         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20204         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20205         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20206         (aarch64_regmode_natural_size): Likewise.
20207         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20208         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20209         left one place.
20210         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20211         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20212         for VG and the SVE predicate registers.
20213         (V_ALIASES): Add a "z"-prefixed alias.
20214         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20215         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20216         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20217         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20218         (REG_CLASS_NAMES): Add entries for them.
20219         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20220         and the predicate registers.
20221         (aarch64_sve_vg): Declare.
20222         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20223         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20224         (REGMODE_NATURAL_SIZE): Define.
20225         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20226         SVE macros.
20227         * config/aarch64/aarch64.c: Include cfgrtl.h.
20228         (simd_immediate_info): Add a constructor for series vectors,
20229         and an associated step field.
20230         (aarch64_sve_vg): New variable.
20231         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20232         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20233         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20234         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20235         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20236         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20237         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20238         (aarch64_get_mask_mode): New functions.
20239         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20240         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20241         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20242         predicate modes and predicate registers.  Explicitly restrict
20243         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20244         to store a vector mode if it is recognized by
20245         aarch64_classify_vector_mode.
20246         (aarch64_regmode_natural_size): New function.
20247         (aarch64_hard_regno_caller_save_mode): Return the original mode
20248         for predicates.
20249         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20250         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20251         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20252         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20253         functions.
20254         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20255         does not overlap dest if the function is frame-related.  Handle
20256         SVE constants.
20257         (aarch64_split_add_offset): New function.
20258         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20259         them aarch64_add_offset.
20260         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20261         and update call to aarch64_sub_sp.
20262         (aarch64_add_cfa_expression): New function.
20263         (aarch64_expand_prologue): Pass extra temporary registers to the
20264         functions above.  Handle the case in which we need to emit new
20265         DW_CFA_expressions for registers that were originally saved
20266         relative to the stack pointer, but now have to be expressed
20267         relative to the frame pointer.
20268         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20269         functions above.
20270         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20271         IP0 and IP1 values for SVE frames.
20272         (aarch64_expand_vec_series): New function.
20273         (aarch64_expand_sve_widened_duplicate): Likewise.
20274         (aarch64_expand_sve_const_vector): Likewise.
20275         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20276         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20277         into the register, rather than emitting a SET directly.
20278         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20279         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20280         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20281         (offset_9bit_signed_scaled_p): New functions.
20282         (aarch64_replicate_bitmask_imm): New function.
20283         (aarch64_bitmask_imm): Use it.
20284         (aarch64_cannot_force_const_mem): Reject expressions involving
20285         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20286         (aarch64_classify_index): Handle SVE indices, by requiring
20287         a plain register index with a scale that matches the element size.
20288         (aarch64_classify_address): Handle SVE addresses.  Assert that
20289         the mode of the address is VOIDmode or an integer mode.
20290         Update call to aarch64_classify_symbol.
20291         (aarch64_classify_symbolic_expression): Update call to
20292         aarch64_classify_symbol.
20293         (aarch64_const_vec_all_in_range_p): New function.
20294         (aarch64_print_vector_float_operand): Likewise.
20295         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20296         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20297         and the FP immediates 1.0 and 0.5.
20298         (aarch64_print_address_internal): Handle SVE addresses.
20299         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20300         (aarch64_regno_regclass): Handle predicate registers.
20301         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20302         data modes.
20303         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20304         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20305         (aarch64_convert_sve_vector_bits): New function.
20306         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20307         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20308         rather than an rtx.
20309         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20310         Handle SVE vector and predicate modes.  Accept VL-based constants
20311         that need only one temporary register, and VL offsets that require
20312         no temporary registers.
20313         (aarch64_conditional_register_usage): Mark the predicate registers
20314         as fixed if SVE isn't available.
20315         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20316         Return true for SVE vector and predicate modes.
20317         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20318         rather than an unsigned int.  Handle SVE modes.
20319         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20320         SVE modes.
20321         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20322         if SVE is enabled.
20323         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20324         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20325         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20326         (aarch64_sve_float_mul_immediate_p): New functions.
20327         (aarch64_sve_valid_immediate): New function.
20328         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20329         Explicitly reject structure modes.  Check for INDEX constants.
20330         Handle PTRUE and PFALSE constants.
20331         (aarch64_check_zero_based_sve_index_immediate): New function.
20332         (aarch64_simd_imm_zero_p): Delete.
20333         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20334         vector modes.  Accept constants in the range of CNT[BHWD].
20335         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20336         ask for an Advanced SIMD mode.
20337         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20338         (aarch64_simd_vector_alignment): Handle SVE predicates.
20339         (aarch64_vectorize_preferred_vector_alignment): New function.
20340         (aarch64_simd_vector_alignment_reachable): Use it instead of
20341         the vector size.
20342         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20343         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20344         functions.
20345         (MAX_VECT_LEN): Delete.
20346         (expand_vec_perm_d): Add a vec_flags field.
20347         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20348         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20349         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20350         for SVE modes.
20351         (aarch64_evpc_rev): Rename to...
20352         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20353         (aarch64_evpc_rev_global): New function.
20354         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20355         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20356         MAX_VECT_LEN.
20357         (aarch64_evpc_sve_tbl): New function.
20358         (aarch64_expand_vec_perm_const_1): Update after rename of
20359         aarch64_evpc_rev.  Handle SVE permutes too, trying
20360         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20361         than aarch64_evpc_tbl.
20362         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20363         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20364         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20365         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20366         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20367         (aarch64_expand_sve_vcond): New functions.
20368         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20369         of aarch64_vector_mode_p.
20370         (aarch64_dwarf_poly_indeterminate_value): New function.
20371         (aarch64_compute_pressure_classes): Likewise.
20372         (aarch64_can_change_mode_class): Likewise.
20373         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20374         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20375         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20376         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20377         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20378         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20379         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20380         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20381         constraints.
20382         (Dn, Dl, Dr): Accept const as well as const_vector.
20383         (Dz): Likewise.  Compare against CONST0_RTX.
20384         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20385         of "vector" where appropriate.
20386         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20387         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20388         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20389         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20390         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20391         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20392         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20393         (v_int_equiv): Extend to SVE modes.
20394         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20395         mode attributes.
20396         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20397         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20398         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20399         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20400         (SVE_COND_FP_CMP): New int iterators.
20401         (perm_hilo): Handle the new unpack unspecs.
20402         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20403         attributes.
20404         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20405         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20406         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20407         (aarch64_equality_operator, aarch64_constant_vector_operand)
20408         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20409         (aarch64_sve_nonimmediate_operand): Likewise.
20410         (aarch64_sve_general_operand): Likewise.
20411         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20412         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20413         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20414         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20415         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20416         (aarch64_sve_float_arith_immediate): Likewise.
20417         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20418         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20419         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20420         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20421         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20422         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20423         (aarch64_sve_float_arith_operand): Likewise.
20424         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20425         (aarch64_sve_float_mul_operand): Likewise.
20426         (aarch64_sve_vec_perm_operand): Likewise.
20427         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20428         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20429         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20430         as well as const_vector.
20431         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20432         in file.  Use CONST0_RTX and CONSTM1_RTX.
20433         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20434         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20435         Use aarch64_simd_imm_zero.
20436         * config/aarch64/aarch64-sve.md: New file.
20437         * config/aarch64/aarch64.md: Include it.
20438         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20439         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20440         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20441         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20442         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20443         (sve): New attribute.
20444         (enabled): Disable instructions with the sve attribute unless
20445         TARGET_SVE.
20446         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20447         aarch64_expand_mov_immediate.
20448         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20449         CNT[BHSD] immediates.
20450         (movti): Split CONST_POLY_INT moves into two halves.
20451         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20452         Split additions that need a temporary here if the destination
20453         is the stack pointer.
20454         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20455         (*add<mode>3_poly_1): New instruction.
20456         (set_clobber_cc): New expander.
20458 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20460         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20461         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20462         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20463         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20464         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20465         Change innermode from fixed_mode_size to machine_mode.
20466         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20467         subreg of a variable-length CONST_VECTOR.
20469 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20470             Alan Hayward  <alan.hayward@arm.com>
20471             David Sherwood  <david.sherwood@arm.com>
20473         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20474         (add_offset_to_base): New function, split out from...
20475         (create_mem_ref): ...here.  When handling a scale other than 1,
20476         check first whether the address is valid without the offset.
20477         Add it into the base if so, leaving the index and scale as-is.
20479 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20481         PR c++/83778
20482         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20483         fold_for_warn before checking if arg2 is INTEGER_CST.
20485 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20487         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20488         (store_multiple_operation): Delete.
20489         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20490         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20491         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20492         guarded by TARGET_STRING.
20493         (rs6000_output_load_multiple): Delete.
20494         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20495         OPTION_MASK_STRING / TARGET_STRING handling.
20496         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20497         (const rs6000_opt_masks) <"string">: Change mask to 0.
20498         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20499         (MASK_STRING): Delete.
20500         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20501         parts.  Simplify.
20502         (load_multiple): Delete.
20503         (*ldmsi8): Delete.
20504         (*ldmsi7): Delete.
20505         (*ldmsi6): Delete.
20506         (*ldmsi5): Delete.
20507         (*ldmsi4): Delete.
20508         (*ldmsi3): Delete.
20509         (store_multiple): Delete.
20510         (*stmsi8): Delete.
20511         (*stmsi7): Delete.
20512         (*stmsi6): Delete.
20513         (*stmsi5): Delete.
20514         (*stmsi4): Delete.
20515         (*stmsi3): Delete.
20516         (movmemsi_8reg): Delete.
20517         (corresponding unnamed define_insn): Delete.
20518         (movmemsi_6reg): Delete.
20519         (corresponding unnamed define_insn): Delete.
20520         (movmemsi_4reg): Delete.
20521         (corresponding unnamed define_insn): Delete.
20522         (movmemsi_2reg): Delete.
20523         (corresponding unnamed define_insn): Delete.
20524         (movmemsi_1reg): Delete.
20525         (corresponding unnamed define_insn): Delete.
20526         * config/rs6000/rs6000.opt (mno-string): New.
20527         (mstring): Replace by deprecation warning stub.
20528         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20530 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20532         * regrename.c (regrename_do_replace): If replacing the same
20533         reg multiple times, try to reuse last created gen_raw_REG.
20535         PR debug/81155
20536         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20537         main to workaround a bug in GDB.
20539 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20541         PR target/83737
20542         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20544 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20546         PR rtl-optimization/80481
20547         * ira-color.c (get_cap_member): New function.
20548         (allocnos_conflict_by_live_ranges_p): Use it.
20549         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20550         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20552 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20554         PR target/83628
20555         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20556         (*saddl_se_1): Ditto.
20557         (*ssubsi_1): Ditto.
20558         (*ssubl_se_1): Ditto.
20560 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20562         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20563         rather than wi::to_widest for DR_INITs.
20564         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20565         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20566         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20567         INTEGER_CSTs.
20568         (vect_analyze_group_access_1): Note that here.
20570 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20572         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20573         polynomial type sizes.
20575 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20577         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20578         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20579         (gimple_add_tmp_var): Likewise.
20581 2018-01-12  Martin Liska  <mliska@suse.cz>
20583         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20584         (gimple_alloc_sizes): Likewise.
20585         (dump_gimple_statistics): Use PRIu64 in printf format.
20586         * gimple.h: Change uint64_t to int.
20588 2018-01-12  Martin Liska  <mliska@suse.cz>
20590         * tree-core.h: Use uint64_t instead of int.
20591         * tree.c (tree_node_counts): Likewise.
20592         (tree_node_sizes): Likewise.
20593         (dump_tree_statistics): Use PRIu64 in printf format.
20595 2018-01-12  Martin Liska  <mliska@suse.cz>
20597         * Makefile.in: As qsort_chk is implemented in vec.c, add
20598         vec.o to linkage of gencfn-macros.
20599         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20600         passing the info to record_node_allocation_statistics.
20601         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20602         and pass the info.
20603         * ggc-common.c (struct ggc_usage): Add operator== and use
20604         it in operator< and compare function.
20605         * mem-stats.h (struct mem_usage): Likewise.
20606         * vec.c (struct vec_usage): Remove operator< and compare
20607         function. Can be simply inherited.
20609 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20611         PR target/81616
20612         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20613         * tree-ssa-math-opts.c: Include domwalk.h.
20614         (convert_mult_to_fma_1): New function.
20615         (fma_transformation_info): New type.
20616         (fma_deferring_state): Likewise.
20617         (cancel_fma_deferring): New function.
20618         (result_of_phi): Likewise.
20619         (last_fma_candidate_feeds_initial_phi): Likewise.
20620         (convert_mult_to_fma): Added deferring logic, split actual
20621         transformation to convert_mult_to_fma_1.
20622         (math_opts_dom_walker): New type.
20623         (math_opts_dom_walker::after_dom_children): New method, body moved
20624         here from pass_optimize_widening_mul::execute, added deferring logic
20625         bits.
20626         (pass_optimize_widening_mul::execute): Moved most of code to
20627         math_opts_dom_walker::after_dom_children.
20628         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20629         * config/i386/i386.c (ix86_option_override_internal): Added
20630         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20632 2018-01-12  Richard Biener  <rguenther@suse.de>
20634         PR debug/83157
20635         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20636         inline instance vars.
20638 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20640         PR target/81819
20641         * config/rx/rx.c (rx_is_restricted_memory_address):
20642         Handle SUBREG case.
20644 2018-01-12  Richard Biener  <rguenther@suse.de>
20646         PR tree-optimization/80846
20647         * target.def (split_reduction): New target hook.
20648         * targhooks.c (default_split_reduction): New function.
20649         * targhooks.h (default_split_reduction): Declare.
20650         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20651         target requests first reduce vectors by combining low and high
20652         parts.
20653         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20654         (get_vectype_for_scalar_type_and_size): Export.
20655         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20656         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20657         * doc/tm.texi: Regenerate.
20658         * config/i386/i386.c (ix86_split_reduction): Implement
20659         TARGET_VECTORIZE_SPLIT_REDUCTION.
20661 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20663         PR target/83368
20664         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20665         in PIC mode except for TARGET_VXWORKS_RTP.
20666         * config/sparc/sparc.c: Include cfgrtl.h.
20667         (TARGET_INIT_PIC_REG): Define.
20668         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20669         (sparc_pic_register_p): New predicate.
20670         (sparc_legitimate_address_p): Use it.
20671         (sparc_legitimize_pic_address): Likewise.
20672         (sparc_delegitimize_address): Likewise.
20673         (sparc_mode_dependent_address_p): Likewise.
20674         (gen_load_pcrel_sym): Remove 4th parameter.
20675         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20676         (sparc_expand_prologue): Do not call load_got_register here.
20677         (sparc_flat_expand_prologue): Likewise.
20678         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20679         (sparc_use_pseudo_pic_reg): New function.
20680         (sparc_init_pic_reg): Likewise.
20681         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20682         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20684 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20686         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20687         Add item for branch_cost.
20689 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20691         PR rtl-optimization/83565
20692         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20693         not extend the result to a larger mode for rotate operations.
20694         (num_sign_bit_copies1): Likewise.
20696 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20698         PR target/40411
20699         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20700         -symbolic.
20701         Use values-Xc.o for -pedantic.
20702         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20704 2018-01-12  Martin Liska  <mliska@suse.cz>
20706         PR ipa/83054
20707         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20708         New function.
20709         (possible_polymorphic_call_targets): Use it.
20710         (ipa_devirt): Likewise.
20712 2018-01-12  Martin Liska  <mliska@suse.cz>
20714         * profile-count.h (enum profile_quality): Use 0 as invalid
20715         enum value of profile_quality.
20717 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20719         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20720         -mext-string options.
20722 2018-01-12  Richard Biener  <rguenther@suse.de>
20724         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20725         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20726         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20727         Likewise.
20728         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20730 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20732         * configure.ac (--with-long-double-format): Add support for the
20733         configuration option to change the default long double format on
20734         PowerPC systems.
20735         * config.gcc (powerpc*-linux*-*): Likewise.
20736         * configure: Regenerate.
20737         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20738         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20739         used without modification.
20741 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20743         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20744         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20745         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20746         MISC_BUILTIN_SPEC_BARRIER.
20747         (rs6000_init_builtins): Likewise.
20748         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20749         enum value.
20750         (speculation_barrier): New define_insn.
20751         * doc/extend.texi: Document __builtin_speculation_barrier.
20753 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20755         PR target/83203
20756         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20757         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20758         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20759         iterators.
20760         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20761         integral modes instead of "ss" and "sd".
20762         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20763         vectors with 32-bit and 64-bit elements.
20764         (vecdupssescalarmodesuffix): New mode attribute.
20765         (vec_dup<mode>): Use it.
20767 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20769         PR target/83330
20770         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20771         frame if argument is passed on stack.
20773 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20775         PR target/82682
20776         * ree.c (combine_reaching_defs): Optimize also
20777         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20778         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20780 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20782         PR middle-end/83189
20783         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20785 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20787         PR middle-end/83718
20788         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20789         after they are computed.
20791 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20793         PR tree-optimization/83695
20794         * gimple-loop-linterchange.cc
20795         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20796         reset cached scev information after interchange.
20797         (pass_linterchange::execute): Remove call to scev_reset_htab.
20799 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20801         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20802         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20803         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20804         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20805         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20806         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20807         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20808         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20809         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20810         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20811         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20812         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20813         (V_lane_reg): Likewise.
20814         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20815         New define_expand.
20816         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20817         (vfmal_lane_low<mode>_intrinsic,
20818         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20819         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20820         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20821         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20822         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20823         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20825 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20827         * config/arm/arm-cpus.in (fp16fml): New feature.
20828         (ALL_SIMD): Add fp16fml.
20829         (armv8.2-a): Add fp16fml as an option.
20830         (armv8.3-a): Likewise.
20831         (armv8.4-a): Add fp16fml as part of fp16.
20832         * config/arm/arm.h (TARGET_FP16FML): Define.
20833         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20834         when appropriate.
20835         * config/arm/arm-modes.def (V2HF): Define.
20836         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20837         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20838         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20839         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20840         vfmsl_low, vfmsl_high): New set of builtins.
20841         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20842         (vfml_op): New code attribute.
20843         (VFMLHALVES): New int iterator.
20844         (VFML, VFMLSEL): New mode attributes.
20845         (V_reg): Define mapping for V2HF.
20846         (V_hi, V_lo): New mode attributes.
20847         (VF_constraint): Likewise.
20848         (vfml_half, vfml_half_selector): New int attributes.
20849         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20850         define_expand.
20851         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20852         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20853         New define_insn.
20854         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20855         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20856         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20857         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20858         documentation.
20859         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20860         Document new effective target and option set.
20862 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20864         * config/arm/arm-cpus.in (armv8_4): New feature.
20865         (ARMv8_4a): New fgroup.
20866         (armv8.4-a): New arch.
20867         * config/arm/arm-tables.opt: Regenerate.
20868         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20869         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20870         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20871         Add matching rules for -march=armv8.4-a and extensions.
20872         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20874 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20876         PR target/81821
20877         * config/rx/rx.md (BW): New mode attribute.
20878         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20880 2018-01-11  Richard Biener  <rguenther@suse.de>
20882         PR tree-optimization/83435
20883         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20884         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20885         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20887 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20888             Alan Hayward  <alan.hayward@arm.com>
20889             David Sherwood  <david.sherwood@arm.com>
20891         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20892         field.
20893         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20894         (aarch64_print_address_internal): Use it to check for a zero offset.
20896 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20897             Alan Hayward  <alan.hayward@arm.com>
20898             David Sherwood  <david.sherwood@arm.com>
20900         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20901         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20902         Return a poly_int64 rather than a HOST_WIDE_INT.
20903         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20904         rather than a HOST_WIDE_INT.
20905         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20906         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20907         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20908         final_offset from HOST_WIDE_INT to poly_int64.
20909         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20910         to_constant when getting the number of units in an Advanced SIMD
20911         mode.
20912         (aarch64_builtin_vectorized_function): Check for a constant number
20913         of units.
20914         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20915         GET_MODE_SIZE.
20916         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20917         attribute instead of GET_MODE_NUNITS.
20918         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20919         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20920         GET_MODE_SIZE for fixed-size registers.
20921         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20922         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20923         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20924         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20925         (aarch64_print_operand, aarch64_print_address_internal)
20926         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20927         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20928         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20929         Handle polynomial GET_MODE_SIZE.
20930         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20931         wider than SImode without modification.
20932         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20933         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20934         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20935         passing and returning SVE modes.
20936         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20937         rather than GEN_INT.
20938         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20939         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20940         (aarch64_allocate_and_probe_stack_space): Likewise.
20941         (aarch64_layout_frame): Cope with polynomial offsets.
20942         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20943         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20944         polynomial offsets.
20945         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20946         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20947         poly_int64 rather than a HOST_WIDE_INT.
20948         (aarch64_get_separate_components, aarch64_process_components)
20949         (aarch64_expand_prologue, aarch64_expand_epilogue)
20950         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20951         (aarch64_anchor_offset): New function, split out from...
20952         (aarch64_legitimize_address): ...here.
20953         (aarch64_builtin_vectorization_cost): Handle polynomial
20954         TYPE_VECTOR_SUBPARTS.
20955         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20956         GET_MODE_NUNITS.
20957         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20958         number of elements from the PARALLEL rather than the mode.
20959         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20960         rather than GET_MODE_BITSIZE.
20961         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20962         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20963         (aarch64_expand_vec_perm_const_1): Handle polynomial
20964         d->perm.length () and d->perm elements.
20965         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20966         Apply to_constant to d->perm elements.
20967         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20968         polynomial CONST_VECTOR_NUNITS.
20969         (aarch64_move_pointer): Take amount as a poly_int64 rather
20970         than an int.
20971         (aarch64_progress_pointer): Avoid temporary variable.
20972         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20973         the mode attribute instead of GET_MODE.
20975 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20976             Alan Hayward  <alan.hayward@arm.com>
20977             David Sherwood  <david.sherwood@arm.com>
20979         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20980         x exists before using it.
20981         (aarch64_add_constant_internal): Rename to...
20982         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20983         src and dest rtxes.  Handle the case in which they're different,
20984         including when the offset is zero.  Replace scratchreg with an rtx.
20985         Use 2 additions if there is no spare register into which we can
20986         move a 16-bit constant.
20987         (aarch64_add_constant): Delete.
20988         (aarch64_add_offset): Replace reg with separate src and dest
20989         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20990         Use aarch64_add_offset_1.
20991         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20992         an rtx rather than an int.  Take the delta as a poly_int64
20993         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20994         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20995         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20996         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20997         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20998         and aarch64_add_sp.
20999         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
21000         aarch64_add_constant.
21002 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21004         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21005         Use scalar_float_mode.
21007 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21009         * config/aarch64/aarch64-simd.md
21010         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
21011         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
21012         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
21013         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
21014         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
21015         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
21016         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
21017         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
21018         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
21019         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
21021 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21023         PR target/83514
21024         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
21025         targ_options->x_arm_arch_string is non NULL.
21027 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
21029         * config/aarch64/aarch64.h
21030         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
21032 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
21034         PR target/82096
21035         * expmed.c (emit_store_flag_force): Swap if const op0
21036         and change VOIDmode to mode of op0.
21038 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
21040         PR rtl-optimization/83761
21041         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
21042         than bytes to mode_for_size.
21044 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21046         PR middle-end/83189
21047         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
21048         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
21049         profile.
21051 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21053         PR middle-end/83575
21054         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
21055         when in layout mode.
21056         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
21057         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
21058         partition fixup.
21060 2018-01-10  Michael Collison  <michael.collison@arm.com>
21062         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
21063         * config/aarch64/aarch64-option-extension.def: Add
21064         AARCH64_OPT_EXTENSION of 'fp16fml'.
21065         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21066         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
21067         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
21068         * config/aarch64/constraints.md (Ui7): New constraint.
21069         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
21070         (VFMLA_SEL_W): Ditto.
21071         (f16quad): Ditto.
21072         (f16mac1): Ditto.
21073         (VFMLA16_LOW): New int iterator.
21074         (VFMLA16_HIGH): Ditto.
21075         (UNSPEC_FMLAL): New unspec.
21076         (UNSPEC_FMLSL): Ditto.
21077         (UNSPEC_FMLAL2): Ditto.
21078         (UNSPEC_FMLSL2): Ditto.
21079         (f16mac): New code attribute.
21080         * config/aarch64/aarch64-simd-builtins.def
21081         (aarch64_fmlal_lowv2sf): Ditto.
21082         (aarch64_fmlsl_lowv2sf): Ditto.
21083         (aarch64_fmlalq_lowv4sf): Ditto.
21084         (aarch64_fmlslq_lowv4sf): Ditto.
21085         (aarch64_fmlal_highv2sf): Ditto.
21086         (aarch64_fmlsl_highv2sf): Ditto.
21087         (aarch64_fmlalq_highv4sf): Ditto.
21088         (aarch64_fmlslq_highv4sf): Ditto.
21089         (aarch64_fmlal_lane_lowv2sf): Ditto.
21090         (aarch64_fmlsl_lane_lowv2sf): Ditto.
21091         (aarch64_fmlal_laneq_lowv2sf): Ditto.
21092         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
21093         (aarch64_fmlalq_lane_lowv4sf): Ditto.
21094         (aarch64_fmlsl_lane_lowv4sf): Ditto.
21095         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
21096         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
21097         (aarch64_fmlal_lane_highv2sf): Ditto.
21098         (aarch64_fmlsl_lane_highv2sf): Ditto.
21099         (aarch64_fmlal_laneq_highv2sf): Ditto.
21100         (aarch64_fmlsl_laneq_highv2sf): Ditto.
21101         (aarch64_fmlalq_lane_highv4sf): Ditto.
21102         (aarch64_fmlsl_lane_highv4sf): Ditto.
21103         (aarch64_fmlalq_laneq_highv4sf): Ditto.
21104         (aarch64_fmlsl_laneq_highv4sf): Ditto.
21105         * config/aarch64/aarch64-simd.md:
21106         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
21107         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21108         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
21109         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
21110         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
21111         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
21112         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
21113         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
21114         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
21115         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
21116         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
21117         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
21118         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
21119         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
21120         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
21121         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
21122         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
21123         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
21124         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
21125         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
21126         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
21127         (vfmlsl_low_u32): Ditto.
21128         (vfmlalq_low_u32): Ditto.
21129         (vfmlslq_low_u32): Ditto.
21130         (vfmlal_high_u32): Ditto.
21131         (vfmlsl_high_u32): Ditto.
21132         (vfmlalq_high_u32): Ditto.
21133         (vfmlslq_high_u32): Ditto.
21134         (vfmlal_lane_low_u32): Ditto.
21135         (vfmlsl_lane_low_u32): Ditto.
21136         (vfmlal_laneq_low_u32): Ditto.
21137         (vfmlsl_laneq_low_u32): Ditto.
21138         (vfmlalq_lane_low_u32): Ditto.
21139         (vfmlslq_lane_low_u32): Ditto.
21140         (vfmlalq_laneq_low_u32): Ditto.
21141         (vfmlslq_laneq_low_u32): Ditto.
21142         (vfmlal_lane_high_u32): Ditto.
21143         (vfmlsl_lane_high_u32): Ditto.
21144         (vfmlal_laneq_high_u32): Ditto.
21145         (vfmlsl_laneq_high_u32): Ditto.
21146         (vfmlalq_lane_high_u32): Ditto.
21147         (vfmlslq_lane_high_u32): Ditto.
21148         (vfmlalq_laneq_high_u32): Ditto.
21149         (vfmlslq_laneq_high_u32): Ditto.
21150         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21151         (AARCH64_FL_FOR_ARCH8_4): New.
21152         (AARCH64_ISA_F16FML): New ISA flag.
21153         (TARGET_F16FML): New feature flag for fp16fml.
21154         (doc/invoke.texi): Document new fp16fml option.
21156 2018-01-10  Michael Collison  <michael.collison@arm.com>
21158         * config/aarch64/aarch64-builtins.c:
21159         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21160         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21161         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21162         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21163         (AARCH64_ISA_SHA3): New ISA flag.
21164         (TARGET_SHA3): New feature flag for sha3.
21165         * config/aarch64/iterators.md (sha512_op): New int attribute.
21166         (CRYPTO_SHA512): New int iterator.
21167         (UNSPEC_SHA512H): New unspec.
21168         (UNSPEC_SHA512H2): Ditto.
21169         (UNSPEC_SHA512SU0): Ditto.
21170         (UNSPEC_SHA512SU1): Ditto.
21171         * config/aarch64/aarch64-simd-builtins.def
21172         (aarch64_crypto_sha512hqv2di): New builtin.
21173         (aarch64_crypto_sha512h2qv2di): Ditto.
21174         (aarch64_crypto_sha512su0qv2di): Ditto.
21175         (aarch64_crypto_sha512su1qv2di): Ditto.
21176         (aarch64_eor3qv8hi): Ditto.
21177         (aarch64_rax1qv2di): Ditto.
21178         (aarch64_xarqv2di): Ditto.
21179         (aarch64_bcaxqv8hi): Ditto.
21180         * config/aarch64/aarch64-simd.md:
21181         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21182         (aarch64_crypto_sha512su0qv2di): Ditto.
21183         (aarch64_crypto_sha512su1qv2di): Ditto.
21184         (aarch64_eor3qv8hi): Ditto.
21185         (aarch64_rax1qv2di): Ditto.
21186         (aarch64_xarqv2di): Ditto.
21187         (aarch64_bcaxqv8hi): Ditto.
21188         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21189         (vsha512h2q_u64): Ditto.
21190         (vsha512su0q_u64): Ditto.
21191         (vsha512su1q_u64): Ditto.
21192         (veor3q_u16): Ditto.
21193         (vrax1q_u64): Ditto.
21194         (vxarq_u64): Ditto.
21195         (vbcaxq_u16): Ditto.
21196         * config/arm/types.md (crypto_sha512): New type attribute.
21197         (crypto_sha3): Ditto.
21198         (doc/invoke.texi): Document new sha3 option.
21200 2018-01-10  Michael Collison  <michael.collison@arm.com>
21202         * config/aarch64/aarch64-builtins.c:
21203         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21204         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21205         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21206         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21207         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21208         (AARCH64_ISA_SM4): New ISA flag.
21209         (TARGET_SM4): New feature flag for sm4.
21210         * config/aarch64/aarch64-simd-builtins.def
21211         (aarch64_sm3ss1qv4si): Ditto.
21212         (aarch64_sm3tt1aq4si): Ditto.
21213         (aarch64_sm3tt1bq4si): Ditto.
21214         (aarch64_sm3tt2aq4si): Ditto.
21215         (aarch64_sm3tt2bq4si): Ditto.
21216         (aarch64_sm3partw1qv4si): Ditto.
21217         (aarch64_sm3partw2qv4si): Ditto.
21218         (aarch64_sm4eqv4si): Ditto.
21219         (aarch64_sm4ekeyqv4si): Ditto.
21220         * config/aarch64/aarch64-simd.md:
21221         (aarch64_sm3ss1qv4si): Ditto.
21222         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21223         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21224         (aarch64_sm4eqv4si): Ditto.
21225         (aarch64_sm4ekeyqv4si): Ditto.
21226         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21227         (sm3part_op): Ditto.
21228         (CRYPTO_SM3TT): Ditto.
21229         (CRYPTO_SM3PART): Ditto.
21230         (UNSPEC_SM3SS1): New unspec.
21231         (UNSPEC_SM3TT1A): Ditto.
21232         (UNSPEC_SM3TT1B): Ditto.
21233         (UNSPEC_SM3TT2A): Ditto.
21234         (UNSPEC_SM3TT2B): Ditto.
21235         (UNSPEC_SM3PARTW1): Ditto.
21236         (UNSPEC_SM3PARTW2): Ditto.
21237         (UNSPEC_SM4E): Ditto.
21238         (UNSPEC_SM4EKEY): Ditto.
21239         * config/aarch64/constraints.md (Ui2): New constraint.
21240         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21241         * config/arm/types.md (crypto_sm3): New type attribute.
21242         (crypto_sm4): Ditto.
21243         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21244         (vsm3tt1aq_u32): Ditto.
21245         (vsm3tt1bq_u32): Ditto.
21246         (vsm3tt2aq_u32): Ditto.
21247         (vsm3tt2bq_u32): Ditto.
21248         (vsm3partw1q_u32): Ditto.
21249         (vsm3partw2q_u32): Ditto.
21250         (vsm4eq_u32): Ditto.
21251         (vsm4ekeyq_u32): Ditto.
21252         (doc/invoke.texi): Document new sm4 option.
21254 2018-01-10  Michael Collison  <michael.collison@arm.com>
21256         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21257         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21258         (AARCH64_FL_FOR_ARCH8_4): New.
21259         (AARCH64_FL_V8_4): New flag.
21260         (doc/invoke.texi): Document new armv8.4-a option.
21262 2018-01-10  Michael Collison  <michael.collison@arm.com>
21264         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21265         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21266         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21267         * config/aarch64/aarch64-option-extension.def: Add
21268         AARCH64_OPT_EXTENSION of 'sha2'.
21269         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21270         (crypto): Disable sha2 and aes if crypto disabled.
21271         (crypto): Enable aes and sha2 if enabled.
21272         (simd): Disable sha2 and aes if simd disabled.
21273         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21274         New flags.
21275         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21276         (TARGET_SHA2): New feature flag for sha2.
21277         (TARGET_AES): New feature flag for aes.
21278         * config/aarch64/aarch64-simd.md:
21279         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21280         conditional on TARGET_AES.
21281         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21282         (aarch64_crypto_sha1hsi): Make pattern conditional
21283         on TARGET_SHA2.
21284         (aarch64_crypto_sha1hv4si): Ditto.
21285         (aarch64_be_crypto_sha1hv4si): Ditto.
21286         (aarch64_crypto_sha1su1v4si): Ditto.
21287         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21288         (aarch64_crypto_sha1su0v4si): Ditto.
21289         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21290         (aarch64_crypto_sha256su0v4si): Ditto.
21291         (aarch64_crypto_sha256su1v4si): Ditto.
21292         (doc/invoke.texi): Document new aes and sha2 options.
21294 2018-01-10  Martin Sebor  <msebor@redhat.com>
21296         PR tree-optimization/83781
21297         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21298         as string arrays.
21300 2018-01-11  Martin Sebor  <msebor@gmail.com>
21301             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21303         PR tree-optimization/83501
21304         PR tree-optimization/81703
21306         * tree-ssa-strlen.c (get_string_cst): Rename...
21307         (get_string_len): ...to this.  Handle global constants.
21308         (handle_char_store): Adjust.
21310 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21311             Jim Wilson  <jimw@sifive.com>
21313         * config/riscv/riscv-protos.h (riscv_output_return): New.
21314         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21315         (riscv_attribute_table, riscv_output_return),
21316         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21317         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21318         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21319         function.
21320         (riscv_expand_prologue): Add early return for naked function.
21321         (riscv_expand_epilogue): Likewise.
21322         (riscv_function_ok_for_sibcall): Return false for naked function.
21323         (riscv_set_current_function): New.
21324         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21325         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21326         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21327         * doc/extend.texi (RISC-V Function Attributes): New.
21329 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21331         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21332         check for 128-bit long double before checking TCmode.
21333         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21334         128-bit long doubles before checking TFmode or TCmode.
21335         (FLOAT128_IBM_P): Likewise.
21337 2018-01-10  Martin Sebor  <msebor@redhat.com>
21339         PR tree-optimization/83671
21340         * builtins.c (c_strlen): Unconditionally return zero for the empty
21341         string.
21342         Use -Warray-bounds for warnings.
21343         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21344         for non-constant array indices with COMPONENT_REF, arrays of
21345         arrays, and pointers to arrays.
21346         (gimple_fold_builtin_strlen): Determine and set length range for
21347         non-constant character arrays.
21349 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21351         PR middle-end/81897
21352         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21353         empty blocks.
21355 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21357         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21359 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21361         PR target/83399
21362         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21363         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21364         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21365         indexed_or_indirect_operand predicate.
21366         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21367         (*vsx_le_perm_load_v8hi): Likewise.
21368         (*vsx_le_perm_load_v16qi): Likewise.
21369         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21370         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21371         (*vsx_le_perm_store_v8hi): Likewise.
21372         (*vsx_le_perm_store_v16qi): Likewise.
21373         (eight unnamed splitters): Likewise.
21375 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21377         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21378         * config/rs6000/emmintrin.h: Likewise.
21379         * config/rs6000/mmintrin.h: Likewise.
21380         * config/rs6000/xmmintrin.h: Likewise.
21382 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21384         PR c++/43486
21385         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21386         "public_flag".
21387         * tree.c (tree_nop_conversion): Return true for location wrapper
21388         nodes.
21389         (maybe_wrap_with_location): New function.
21390         (selftest::check_strip_nops): New function.
21391         (selftest::test_location_wrappers): New function.
21392         (selftest::tree_c_tests): Call it.
21393         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21394         (maybe_wrap_with_location): New decl.
21395         (EXPR_LOCATION_WRAPPER_P): New macro.
21396         (location_wrapper_p): New inline function.
21397         (tree_strip_any_location_wrapper): New inline function.
21399 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21401         PR target/83735
21402         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21403         stack_realign_offset for the largest alignment of stack slot
21404         actually used.
21405         (ix86_find_max_used_stack_alignment): New function.
21406         (ix86_finalize_stack_frame_flags): Use it.  Set
21407         max_used_stack_alignment if we don't realign stack.
21408         * config/i386/i386.h (machine_function): Add
21409         max_used_stack_alignment.
21411 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21413         * config/arm/arm.opt (-mbranch-cost): New option.
21414         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21415         account.
21417 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21419         PR target/83629
21420         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21421         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21423 2018-01-10  Richard Biener  <rguenther@suse.de>
21425         PR debug/83765
21426         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21427         early out so it also covers the case where we have a non-NULL
21428         origin.
21430 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21432         PR tree-optimization/83753
21433         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21434         for non-strided grouped accesses if the number of elements is 1.
21436 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21438         PR target/81616
21439         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21440         * i386.h (TARGET_USE_GATHER): Define.
21441         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21443 2018-01-10  Martin Liska  <mliska@suse.cz>
21445         PR bootstrap/82831
21446         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21447         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21448         partitioning.
21449         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21450         CLEANUP_NO_PARTITIONING is not set.
21452 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21454         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21455         for vectors, as a partial revert of r254296.
21456         * rtl.h (const_vec_p): Delete.
21457         (const_vec_duplicate_p): Don't test for vector CONSTs.
21458         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21459         * expmed.c (make_tree): Likewise.
21461         Revert:
21462         * common.md (E, F): Use CONSTANT_P instead of checking for
21463         CONST_VECTOR.
21464         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21465         checking for CONST_VECTOR.
21467 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21469         PR middle-end/83575
21470         * predict.c (force_edge_cold): Handle in more sane way edges
21471         with no prediction.
21473 2018-01-09  Carl Love  <cel@us.ibm.com>
21475         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21476         V4SI, V4SF types.
21477         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21478         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21479         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21480         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21481         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21482         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21483         * config/rs6000/rs6000-protos.h: Add extern defition for
21484         rs6000_generate_float2_double_code.
21485         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21486         function.
21487         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21488         (float2_v2df): Add define_expand.
21490 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21492         PR target/83628
21493         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21494         op_mode in the force_to_mode call.
21496 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21498         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21499         instead of checking each element individually.
21500         (aarch64_evpc_uzp): Likewise.
21501         (aarch64_evpc_zip): Likewise.
21502         (aarch64_evpc_ext): Likewise.
21503         (aarch64_evpc_rev): Likewise.
21504         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21505         instead of checking each element individually.  Return true without
21506         generating rtl if
21507         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21508         whether all selected elements come from the same input, instead of
21509         checking each element individually.  Remove calls to gen_rtx_REG,
21510         start_sequence and end_sequence and instead assert that no rtl is
21511         generated.
21513 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21515         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21516         order of HIGH and CONST checks.
21518 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21520         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21521         if the destination isn't an SSA_NAME.
21523 2018-01-09  Richard Biener  <rguenther@suse.de>
21525         PR tree-optimization/83668
21526         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21527         move prologue...
21528         (canonicalize_loop_form): ... here, renamed from ...
21529         (canonicalize_loop_closed_ssa_form): ... this and amended to
21530         swap successor edges for loop exit blocks to make us use
21531         the RPO order we need for initial schedule generation.
21533 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21535         PR tree-optimization/64811
21536         * match.pd: When optimizing comparisons with Inf, avoid
21537         introducing or losing exceptions from comparisons with NaN.
21539 2018-01-09  Martin Liska  <mliska@suse.cz>
21541         PR sanitizer/82517
21542         * asan.c (shadow_mem_size): Add gcc_assert.
21544 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21546         Don't save registers in main().
21548         PR target/83738
21549         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21550         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21551         * config/avr/avr.c (avr_set_current_function): Don't error if
21552         naked, OS_task or OS_main are specified at the same time.
21553         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21554         OS_main.
21555         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21556         attribute.
21557         * common/config/avr/avr-common.c (avr_option_optimization_table):
21558         Switch on -mmain-is-OS_task for optimizing compilations.
21560 2018-01-09  Richard Biener  <rguenther@suse.de>
21562         PR tree-optimization/83572
21563         * graphite.c: Include cfganal.h.
21564         (graphite_transform_loops): Connect infinite loops to exit
21565         and remove fake edges at the end.
21567 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21569         * ipa-inline.c (edge_badness): Revert accidental checkin.
21571 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21573         PR ipa/80763
21574         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21575         symbols; not inline clones.
21577 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21579         PR target/83507
21580         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21581         hard registers.  Formatting fixes.
21583         PR preprocessor/83722
21584         * gcc.c (try_generate_repro): Pass
21585         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21586         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21587         do_report_bug.
21589 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21590             Kito Cheng  <kito.cheng@gmail.com>
21592         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21593         (riscv_leaf_function_p): Delete.
21594         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21596 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21598         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21599         function.
21600         (do_ifelse): New function.
21601         (do_isel): New function.
21602         (do_sub3): New function.
21603         (do_add3): New function.
21604         (do_load_mask_compare): New function.
21605         (do_overlap_load_compare): New function.
21606         (expand_compare_loop): New function.
21607         (expand_block_compare): Call expand_compare_loop() when appropriate.
21608         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21609         option description.
21610         (-mblock-compare-inline-loop-limit): New option.
21612 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21614         PR target/83677
21615         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21616         Reverse order of second and third operands in first alternative.
21617         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21618         of first and second elements in UNSPEC_VPERMR vector.
21619         (altivec_expand_vec_perm_le): Likewise.
21621 2018-01-08  Jeff Law  <law@redhat.com>
21623         PR rtl-optimizatin/81308
21624         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21625         (process_switch): If group_case_labels makes a change, then set
21626         cfg_altered.
21627         (pass_convert_switch::execute): If a switch is converted, then
21628         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21630         PR rtl-optimization/81308
21631         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21632         splitting insns.
21634 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21636         PR target/83663 - Revert r255946
21637         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21638         generation for cases where splatting a value is not useful.
21639         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21640         across a vec_duplicate and a paradoxical subreg forming a vector
21641         mode to a vec_concat.
21643 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21645         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21646         -march=armv8.3-a variants.
21647         * config/arm/t-multilib: Likewise.
21648         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21650 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21652         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21653         to generate rtl.
21654         (cceq_ior_compare_complement): Give it a name so I can use it, and
21655         change boolean_or_operator predicate to boolean_operator so it can
21656         be used to generate a crand.
21657         (eqne): New code iterator.
21658         (bd/bd_neg): New code_attrs.
21659         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21660         a single define_insn.
21661         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21662         decrement (bdnzt/bdnzf/bdzt/bdzf).
21663         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21664         with the new names of the branch decrement patterns, and added the
21665         names of the branch decrement conditional patterns.
21667 2018-01-08  Richard Biener  <rguenther@suse.de>
21669         PR tree-optimization/83563
21670         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21671         cache.
21673 2018-01-08  Richard Biener  <rguenther@suse.de>
21675         PR middle-end/83713
21676         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21678 2018-01-08  Richard Biener  <rguenther@suse.de>
21680         PR tree-optimization/83685
21681         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21682         references to abnormals.
21684 2018-01-08  Richard Biener  <rguenther@suse.de>
21686         PR lto/83719
21687         * dwarf2out.c (output_indirect_strings): Handle empty
21688         skeleton_debug_str_hash.
21689         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21691 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21693         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21694         (emit_store_direct): Likewise.
21695         (arc_trampoline_adjust_address): Likewise.
21696         (arc_asm_trampoline_template): New function.
21697         (arc_initialize_trampoline): Use asm_trampoline_template.
21698         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21699         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21700         * config/arc/arc.md (flush_icache): Delete pattern.
21702 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21704         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21705         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21706         munaligned-access.
21708 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21710         PR target/83681
21711         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21712         by not USED_FOR_TARGET.
21713         (make_pass_resolve_sw_modes): Likewise.
21715 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21717         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21718         USED_FOR_TARGET.
21720 2018-01-08  Richard Biener  <rguenther@suse.de>
21722         PR middle-end/83580
21723         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21725 2018-01-08  Richard Biener  <rguenther@suse.de>
21727         PR middle-end/83517
21728         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21730 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21732         PR middle-end/81897
21733         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21734         basic blocks with a small number of successors.
21735         (convert_control_dep_chain_into_preds): Improve handling of
21736         forwarder blocks.
21737         (dump_predicates): Split apart into...
21738         (dump_pred_chain): ...here...
21739         (dump_pred_info): ...and here.
21740         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21741         (can_chain_union_be_invalidated_p): Improve check for invalidation
21742         of paths.
21743         (uninit_uses_cannot_happen): Avoid unnecessary if
21744         convert_control_dep_chain_into_preds yielded nothing.
21746 2018-01-06  Martin Sebor  <msebor@redhat.com>
21748         PR tree-optimization/83640
21749         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21750         subtracting negative offset from size.
21751         (builtin_access::overlap): Adjust offset bounds of the access to fall
21752         within the size of the object if possible.
21754 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21756         PR rtl-optimization/83699
21757         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21758         extract_bit_field_as_subreg to cases in which the extracted
21759         value is also a vector.
21761         * lra-constraints.c (process_alt_operands): Test for the equivalence
21762         substitutions when detecting a possible reload cycle.
21764 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21766         PR debug/83480
21767         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21768         by default if flag_selective_schedling{,2}.  Formatting fixes.
21770         PR rtl-optimization/83682
21771         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21772         if it has non-VECTOR_MODE element mode.
21773         (vec_duplicate_p): Likewise.
21775         PR middle-end/83694
21776         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21777         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21779 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21781         PR target/83604
21782         * config/i386/i386-builtin.def
21783         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21784         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21785         Require also OPTION_MASK_ISA_AVX512F in addition to
21786         OPTION_MASK_ISA_GFNI.
21787         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21788         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21789         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21790         to OPTION_MASK_ISA_GFNI.
21791         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21792         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21793         OPTION_MASK_ISA_AVX512BW.
21794         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21795         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21796         addition to OPTION_MASK_ISA_GFNI.
21797         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21798         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21799         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21800         to OPTION_MASK_ISA_GFNI.
21801         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21802         a requirement for all ISAs rather than any of them with a few
21803         exceptions.
21804         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21805         processing.
21806         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21807         bitmasks to be enabled with 3 exceptions, instead of requiring any
21808         enabled ISA with lots of exceptions.
21809         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21810         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21811         Change avx512bw in isa attribute to avx512f.
21812         * config/i386/sgxintrin.h: Add license boilerplate.
21813         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21814         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21815         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21816         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21817         defined.
21818         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21819         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21820         temporarily sse2 rather than sse if not enabled already.
21822         PR target/83604
21823         * config/i386/sse.md (VI248_VLBW): Rename to ...
21824         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21825         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21826         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21827         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21828         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21829         mode iterator instead of VI248_VLBW.
21831 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21833         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21834         (record_modified): Skip clobbers; add debug output.
21835         (param_change_prob): Use sreal frequencies.
21837 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21839         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21840         punt for user-aligned variables.
21842 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21844         * tree-chrec.c (chrec_contains_symbols): Return true for
21845         POLY_INT_CST.
21847 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21849         PR target/82439
21850         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21851         of (x|y) == x for BICS pattern.
21853 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21855         PR tree-optimization/83605
21856         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21857         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21858         can throw.
21860 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21862         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21863         * config/epiphany/rtems.h: New file.
21865 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21866             Uros Bizjak  <ubizjak@gmail.com>
21868         PR target/83554
21869         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21870         QIreg_operand instead of register_operand predicate.
21871         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21872         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21873         comments instead of -fmitigate[-_]rop.
21875 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21877         PR bootstrap/81926
21878         * cgraphunit.c (symbol_table::compile): Switch to text_section
21879         before calling assembly_start debug hook.
21880         * run-rtl-passes.c (run_rtl_passes): Likewise.
21881         Include output.h.
21883 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21885         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21886         range_int_cst_p rather than !symbolic_range_p before calling
21887         extract_range_from_multiplicative_op_1.
21889 2018-01-04  Jeff Law  <law@redhat.com>
21891         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21892         redundant test in assertion.
21894 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21896         * doc/rtl.texi: Document machine_mode wrapper classes.
21898 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21900         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21901         using tree_to_uhwi.
21903 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21905         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21906         the VEC_PERM_EXPR fold to fail.
21908 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21910         PR debug/83585
21911         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21912         to switched_sections.
21914 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21916         PR target/83680
21917         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21918         test for d.testing.
21920 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21922         PR target/83387
21923         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21924         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21926 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21928         PR debug/83666
21929         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21930         is BLKmode and bitpos not zero or mode change is needed.
21932 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21934         PR target/83675
21935         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21936         TARGET_VIS2.
21938 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21940         PR target/83628
21941         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21942         instead of MULT rtx.  Update all corresponding splitters.
21943         (*saddl_se): Ditto.
21944         (*ssub<modesuffix>): Ditto.
21945         (*ssubl_se): Ditto.
21946         (*cmp_sadd_di): Update split patterns.
21947         (*cmp_sadd_si): Ditto.
21948         (*cmp_sadd_sidi): Ditto.
21949         (*cmp_ssub_di): Ditto.
21950         (*cmp_ssub_si): Ditto.
21951         (*cmp_ssub_sidi): Ditto.
21952         * config/alpha/predicates.md (const23_operand): New predicate.
21953         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21954         Look for ASHIFT, not MULT inner operand.
21955         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21957 2018-01-04  Martin Liska  <mliska@suse.cz>
21959         PR gcov-profile/83669
21960         * gcov.c (output_intermediate_file): Add version to intermediate
21961         gcov file.
21962         * doc/gcov.texi: Document new field 'version' in intermediate
21963         file format. Fix location of '-k' option of gcov command.
21965 2018-01-04  Martin Liska  <mliska@suse.cz>
21967         PR ipa/82352
21968         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21970 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21972         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21974 2018-01-03  Martin Sebor  <msebor@redhat.com>
21976         PR tree-optimization/83655
21977         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21978         checking calls with invalid arguments.
21980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21982         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21983         (vectorizable_mask_load_store): Delete.
21984         (vectorizable_call): Return false for masked loads and stores.
21985         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21986         instead of gimple_assign_rhs1.
21987         (vectorizable_load): Handle IFN_MASK_LOAD.
21988         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21992         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21993         split out from..,
21994         (vectorizable_mask_load_store): ...here.
21995         (vectorizable_load): ...and here.
21997 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21999         * tree-vect-stmts.c (vect_build_all_ones_mask)
22000         (vect_build_zero_merge_argument): New functions, split out from...
22001         (vectorizable_load): ...here.
22003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22005         * tree-vect-stmts.c (vect_check_store_rhs): New function,
22006         split out from...
22007         (vectorizable_mask_load_store): ...here.
22008         (vectorizable_store): ...and here.
22010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22012         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
22013         split out from...
22014         (vectorizable_mask_load_store): ...here.
22016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22018         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
22019         (vect_model_store_cost): Take a vec_load_store_type instead of a
22020         vect_def_type.
22021         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
22022         (vect_model_store_cost): Take a vec_load_store_type instead of a
22023         vect_def_type.
22024         (vectorizable_mask_load_store): Update accordingly.
22025         (vectorizable_store): Likewise.
22026         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
22028 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22030         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
22031         IFN_MASK_LOAD calls here rather than...
22032         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
22034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22035             Alan Hayward  <alan.hayward@arm.com>
22036             David Sherwood  <david.sherwood@arm.com>
22038         * expmed.c (extract_bit_field_1): For vector extracts,
22039         fall back to extract_bit_field_as_subreg if vec_extract
22040         isn't available.
22042 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22043             Alan Hayward  <alan.hayward@arm.com>
22044             David Sherwood  <david.sherwood@arm.com>
22046         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
22047         they are variable or constant sized.
22048         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
22049         slots for constant-sized data.
22051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22052             Alan Hayward  <alan.hayward@arm.com>
22053             David Sherwood  <david.sherwood@arm.com>
22055         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
22056         handling COND_EXPRs with boolean comparisons, try to find a better
22057         basis for the mask type than the boolean itself.
22059 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22061         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
22062         is calculated and how it can be overridden.
22063         * genmodes.c (max_bitsize_mode_any_mode): New variable.
22064         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
22065         if defined.
22066         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
22067         if nonzero.
22069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22070             Alan Hayward  <alan.hayward@arm.com>
22071             David Sherwood  <david.sherwood@arm.com>
22073         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
22074         Remove the mode argument.
22075         (aarch64_simd_valid_immediate): Remove the mode and inverse
22076         arguments.
22077         * config/aarch64/iterators.md (bitsize): New iterator.
22078         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
22079         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
22080         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
22081         aarch64_simd_valid_immediate.
22082         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
22083         (aarch64_reg_or_bic_imm): Likewise.
22084         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
22085         with an insn_type enum and msl with a modifier_type enum.
22086         Replace element_width with a scalar_mode.  Change the shift
22087         to unsigned int.  Add constructors for scalar_float_mode and
22088         scalar_int_mode elements.
22089         (aarch64_vect_float_const_representable_p): Delete.
22090         (aarch64_can_const_movi_rtx_p)
22091         (aarch64_simd_scalar_immediate_valid_for_move)
22092         (aarch64_simd_make_constant): Update call to
22093         aarch64_simd_valid_immediate.
22094         (aarch64_advsimd_valid_immediate_hs): New function.
22095         (aarch64_advsimd_valid_immediate): Likewise.
22096         (aarch64_simd_valid_immediate): Remove mode and inverse
22097         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
22098         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
22099         and aarch64_float_const_representable_p on the result.
22100         (aarch64_output_simd_mov_immediate): Remove mode argument.
22101         Update call to aarch64_simd_valid_immediate and use of
22102         simd_immediate_info.
22103         (aarch64_output_scalar_simd_mov_immediate): Update call
22104         accordingly.
22106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22107             Alan Hayward  <alan.hayward@arm.com>
22108             David Sherwood  <david.sherwood@arm.com>
22110         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
22111         (mode_nunits): Likewise CONST_MODE_NUNITS.
22112         * machmode.def (ADJUST_NUNITS): Document.
22113         * genmodes.c (mode_data::need_nunits_adj): New field.
22114         (blank_mode): Update accordingly.
22115         (adj_nunits): New variable.
22116         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
22117         parameter.
22118         (emit_mode_size_inline): Set need_bytesize_adj for all modes
22119         listed in adj_nunits.
22120         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
22121         listed in adj_nunits.  Don't emit case statements for such modes.
22122         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
22123         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
22124         nothing if adj_nunits is nonnull.
22125         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
22126         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
22127         (emit_mode_fbit): Update use of print_maybe_const_decl.
22128         (emit_move_size): Likewise.  Treat the array as non-const
22129         if adj_nunits.
22130         (emit_mode_adjustments): Handle adj_nunits.
22132 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22134         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
22135         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
22136         (VECTOR_MODES): Use it.
22137         (make_vector_modes): Take the prefix as an argument.
22139 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22140             Alan Hayward  <alan.hayward@arm.com>
22141             David Sherwood  <david.sherwood@arm.com>
22143         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
22144         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
22145         for MODE_VECTOR_BOOL.
22146         * machmode.def (VECTOR_BOOL_MODE): Document.
22147         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22148         (make_vector_bool_mode): New function.
22149         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22150         MODE_VECTOR_BOOL.
22151         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22152         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22153         Likewise.
22154         * stor-layout.c (int_mode_for_mode): Likewise.
22155         * tree.c (build_vector_type_for_mode): Likewise.
22156         * varasm.c (output_constant_pool_2): Likewise.
22157         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22158         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22159         for MODE_VECTOR_BOOL.
22160         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22161         of mode class checks.
22162         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22163         instead of a list of mode class checks.
22164         (expand_vector_scalar_condition): Likewise.
22165         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22167 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22168             Alan Hayward  <alan.hayward@arm.com>
22169             David Sherwood  <david.sherwood@arm.com>
22171         * machmode.h (mode_size): Change from unsigned short to
22172         poly_uint16_pod.
22173         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22174         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22175         or if measurement_type is not polynomial.
22176         (fixed_size_mode::includes_p): Check for constant-sized modes.
22177         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22178         return a poly_uint16 rather than an unsigned short.
22179         (emit_mode_size): Change the type of mode_size from unsigned short
22180         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22181         (emit_mode_adjustments): Cope with polynomial vector sizes.
22182         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22183         for GET_MODE_SIZE.
22184         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22185         for GET_MODE_SIZE.
22186         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22187         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22188         * caller-save.c (setup_save_areas): Likewise.
22189         (replace_reg_with_saved_mem): Likewise.
22190         * calls.c (emit_library_call_value_1): Likewise.
22191         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22192         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22193         (gen_lowpart_for_combine): Likewise.
22194         * convert.c (convert_to_integer_1): Likewise.
22195         * cse.c (equiv_constant, cse_insn): Likewise.
22196         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22197         (cselib_subst_to_values): Likewise.
22198         * dce.c (word_dce_process_block): Likewise.
22199         * df-problems.c (df_word_lr_mark_ref): Likewise.
22200         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22201         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22202         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22203         (rtl_for_decl_location): Likewise.
22204         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22205         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22206         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22207         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22208         (expand_expr_real_1): Likewise.
22209         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22210         (pad_below): Likewise.
22211         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22212         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22213         * ira.c (get_subreg_tracking_sizes): Likewise.
22214         * ira-build.c (ira_create_allocno_objects): Likewise.
22215         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22216         (ira_sort_regnos_for_alter_reg): Likewise.
22217         * ira-costs.c (record_operand_costs): Likewise.
22218         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22219         (resolve_simple_move): Likewise.
22220         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22221         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22222         (lra_constraints): Likewise.
22223         (CONST_POOL_OK_P): Reject variable-sized modes.
22224         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22225         (add_pseudo_to_slot, lra_spill): Likewise.
22226         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22227         * optabs-query.c (get_best_extraction_insn): Likewise.
22228         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22229         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22230         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22231         * recog.c (offsettable_address_addr_space_p): Likewise.
22232         * regcprop.c (maybe_mode_change): Likewise.
22233         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22234         * regrename.c (build_def_use): Likewise.
22235         * regstat.c (dump_reg_info): Likewise.
22236         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22237         (find_reloads, find_reloads_subreg_address): Likewise.
22238         * reload1.c (eliminate_regs_1): Likewise.
22239         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22240         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22241         (simplify_binary_operation_1, simplify_subreg): Likewise.
22242         * targhooks.c (default_function_arg_padding): Likewise.
22243         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22244         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22245         (verify_gimple_assign_ternary): Likewise.
22246         * tree-inline.c (estimate_move_cost): Likewise.
22247         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22248         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22249         (get_address_cost_ainc): Likewise.
22250         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22251         (vect_supportable_dr_alignment): Likewise.
22252         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22253         (vectorizable_reduction): Likewise.
22254         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22255         (vectorizable_operation, vectorizable_load): Likewise.
22256         * tree.c (build_same_sized_truth_vector_type): Likewise.
22257         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22258         * var-tracking.c (emit_note_insn_var_location): Likewise.
22259         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22260         (ADDR_VEC_ALIGN): Likewise.
22262 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22263             Alan Hayward  <alan.hayward@arm.com>
22264             David Sherwood  <david.sherwood@arm.com>
22266         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22267         unsigned short.
22268         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22269         or if measurement_type is polynomial.
22270         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22271         * combine.c (make_extraction): Likewise.
22272         * dse.c (find_shift_sequence): Likewise.
22273         * dwarf2out.c (mem_loc_descriptor): Likewise.
22274         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22275         (extract_bit_field, extract_low_bits): Likewise.
22276         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22277         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22278         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22279         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22280         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22281         * reload.c (find_reloads): Likewise.
22282         * reload1.c (alter_reg): Likewise.
22283         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22284         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22285         * tree-if-conv.c (predicate_mem_writes): Likewise.
22286         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22287         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22288         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22289         * valtrack.c (dead_debug_insert_temp): Likewise.
22290         * varasm.c (mergeable_constant_section): Likewise.
22291         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22293 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22294             Alan Hayward  <alan.hayward@arm.com>
22295             David Sherwood  <david.sherwood@arm.com>
22297         * expr.c (expand_assignment): Cope with polynomial mode sizes
22298         when assigning to a CONCAT.
22300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22301             Alan Hayward  <alan.hayward@arm.com>
22302             David Sherwood  <david.sherwood@arm.com>
22304         * machmode.h (mode_precision): Change from unsigned short to
22305         poly_uint16_pod.
22306         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22307         short.
22308         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22309         or if measurement_type is not polynomial.
22310         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22311         in which the mode is already known to be a scalar_int_mode.
22312         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22313         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22314         initializer.
22315         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22316         for GET_MODE_PRECISION.
22317         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22318         for GET_MODE_PRECISION.
22319         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22320         as polynomial.
22321         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22322         (expand_field_assignment, make_extraction): Likewise.
22323         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22324         (get_last_value): Likewise.
22325         * convert.c (convert_to_integer_1): Likewise.
22326         * cse.c (cse_insn): Likewise.
22327         * expr.c (expand_expr_real_1): Likewise.
22328         * lra-constraints.c (simplify_operand_subreg): Likewise.
22329         * optabs-query.c (can_atomic_load_p): Likewise.
22330         * optabs.c (expand_atomic_load): Likewise.
22331         (expand_atomic_store): Likewise.
22332         * ree.c (combine_reaching_defs): Likewise.
22333         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22334         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22335         * tree.h (type_has_mode_precision_p): Likewise.
22336         * ubsan.c (instrument_si_overflow): Likewise.
22338 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22339             Alan Hayward  <alan.hayward@arm.com>
22340             David Sherwood  <david.sherwood@arm.com>
22342         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22343         polynomial numbers of units.
22344         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22345         (valid_vector_subparts_p): New function.
22346         (build_vector_type): Remove temporary shim and take the number
22347         of units as a poly_uint64 rather than an int.
22348         (build_opaque_vector_type): Take the number of units as a
22349         poly_uint64 rather than an int.
22350         * tree.c (build_vector_from_ctor): Handle polynomial
22351         TYPE_VECTOR_SUBPARTS.
22352         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22353         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22354         (build_vector_from_val): If the number of units is variable,
22355         use build_vec_duplicate_cst for constant operands and
22356         VEC_DUPLICATE_EXPR otherwise.
22357         (make_vector_type): Remove temporary is_constant ().
22358         (build_vector_type, build_opaque_vector_type): Take the number of
22359         units as a poly_uint64 rather than an int.
22360         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22361         VECTOR_CST_NELTS.
22362         * cfgexpand.c (expand_debug_expr): Likewise.
22363         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22364         (store_constructor, expand_expr_real_1): Likewise.
22365         (const_scalar_mask_from_tree): Likewise.
22366         * fold-const-call.c (fold_const_reduction): Likewise.
22367         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22368         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22369         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22370         (fold_relational_const): Likewise.
22371         (native_interpret_vector): Likewise.  Change the size from an
22372         int to an unsigned int.
22373         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22374         TYPE_VECTOR_SUBPARTS.
22375         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22376         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22377         duplicating a non-constant operand into a variable-length vector.
22378         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22379         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22380         * ipa-icf.c (sem_variable::equals): Likewise.
22381         * match.pd: Likewise.
22382         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22383         * print-tree.c (print_node): Likewise.
22384         * stor-layout.c (layout_type): Likewise.
22385         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22386         * tree-cfg.c (verify_gimple_comparison): Likewise.
22387         (verify_gimple_assign_binary): Likewise.
22388         (verify_gimple_assign_ternary): Likewise.
22389         (verify_gimple_assign_single): Likewise.
22390         * tree-pretty-print.c (dump_generic_node): Likewise.
22391         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22392         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22393         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22394         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22395         (vect_shift_permute_load_chain): Likewise.
22396         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22397         (expand_vector_condition, optimize_vector_constructor): Likewise.
22398         (lower_vec_perm, get_compute_type): Likewise.
22399         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22400         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22401         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22402         (vect_recog_mask_conversion_pattern): Likewise.
22403         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22404         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22405         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22406         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22407         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22408         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22409         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22410         (supportable_widening_operation): Likewise.
22411         (supportable_narrowing_operation): Likewise.
22412         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22413         Likewise.
22414         * varasm.c (output_constant): Likewise.
22416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22417             Alan Hayward  <alan.hayward@arm.com>
22418             David Sherwood  <david.sherwood@arm.com>
22420         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22421         so that both the length == 3 and length != 3 cases set up their
22422         own permute vectors.  Add comments explaining why we know the
22423         number of elements is constant.
22424         (vect_permute_load_chain): Likewise.
22426 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22427             Alan Hayward  <alan.hayward@arm.com>
22428             David Sherwood  <david.sherwood@arm.com>
22430         * machmode.h (mode_nunits): Change from unsigned char to
22431         poly_uint16_pod.
22432         (ONLY_FIXED_SIZE_MODES): New macro.
22433         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22434         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22435         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22436         New typedefs.
22437         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22438         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22439         or if measurement_type is not polynomial.
22440         * genmodes.c (ZERO_COEFFS): New macro.
22441         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22442         poly_uint16.
22443         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22444         Use ZERO_COEFFS when emitting initializers.
22445         * data-streamer.h (bp_pack_poly_value): New function.
22446         (bp_unpack_poly_value): Likewise.
22447         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22448         for GET_MODE_NUNITS.
22449         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22450         for GET_MODE_NUNITS.
22451         * tree.c (make_vector_type): Remove temporary shim and make
22452         the real function take the number of units as a poly_uint64
22453         rather than an int.
22454         (build_vector_type_for_mode): Handle polynomial nunits.
22455         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22456         * emit-rtl.c (const_vec_series_p_1): Likewise.
22457         (gen_rtx_CONST_VECTOR): Likewise.
22458         * fold-const.c (test_vec_duplicate_folding): Likewise.
22459         * genrecog.c (validate_pattern): Likewise.
22460         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22461         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22462         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22463         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22464         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22465         * rtlanal.c (subreg_get_info): Likewise.
22466         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22467         (vect_grouped_load_supported): Likewise.
22468         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22469         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22470         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22471         (simplify_const_unary_operation, simplify_binary_operation_1)
22472         (simplify_const_binary_operation, simplify_ternary_operation)
22473         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22474         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22475         instead of CONST_VECTOR_NUNITS.
22476         * varasm.c (output_constant_pool_2): Likewise.
22477         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22478         explicit-encoded elements in the XVEC for variable-length vectors.
22480 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22482         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22485             Alan Hayward  <alan.hayward@arm.com>
22486             David Sherwood  <david.sherwood@arm.com>
22488         * coretypes.h (fixed_size_mode): Declare.
22489         (fixed_size_mode_pod): New typedef.
22490         * builtins.h (target_builtins::x_apply_args_mode)
22491         (target_builtins::x_apply_result_mode): Change type to
22492         fixed_size_mode_pod.
22493         * builtins.c (apply_args_size, apply_result_size, result_vector)
22494         (expand_builtin_apply_args_1, expand_builtin_apply)
22495         (expand_builtin_return): Update accordingly.
22497 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22499         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22500         * cselib.c (cselib_hash_rtx): Likewise.
22501         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22502         CONST_VECTOR encoding.
22504 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22505             Jeff Law  <law@redhat.com>
22507         PR target/83641
22508         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22509         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22510         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22511         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22513         PR target/83641
22514         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22515         explicitly probe *sp in a noreturn function if there were any callee
22516         register saves or frame pointer is needed.
22518 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22520         PR debug/83621
22521         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22522         BLKmode for ternary, binary or unary expressions.
22524         PR debug/83645
22525         * var-tracking.c (delete_vta_debug_insn): New inline function.
22526         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22527         insns from get_insns () to NULL instead of each bb separately.
22528         Use delete_vta_debug_insn.  No longer static.
22529         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22530         delete_vta_debug_insns callers.
22531         * rtl.h (delete_vta_debug_insns): Declare.
22532         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22533         instead of variable_tracking_main.
22535 2018-01-03  Martin Sebor  <msebor@redhat.com>
22537         PR tree-optimization/83603
22538         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22539         arguments past the endof the argument list in functions declared
22540         without a prototype.
22541         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22542         Avoid checking when arguments are null.
22544 2018-01-03  Martin Sebor  <msebor@redhat.com>
22546         PR c/83559
22547         * doc/extend.texi (attribute const): Fix a typo.
22548         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22549         issuing -Wsuggest-attribute for void functions.
22551 2018-01-03  Martin Sebor  <msebor@redhat.com>
22553         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22554         offset_int::from instead of wide_int::to_shwi.
22555         (maybe_diag_overlap): Remove assertion.
22556         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22557         * gimple-ssa-sprintf.c (format_directive): Same.
22558         (parse_directive): Same.
22559         (sprintf_dom_walker::compute_format_length): Same.
22560         (try_substitute_return_value): Same.
22562 2018-01-03  Jeff Law  <law@redhat.com>
22564         PR middle-end/83654
22565         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22566         non-constant residual for zero at runtime and avoid probing in
22567         that case.  Reorganize code for trailing problem to mirror handling
22568         of the residual.
22570 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22572         PR tree-optimization/83501
22573         * tree-ssa-strlen.c (get_string_cst): New.
22574         (handle_char_store): Call get_string_cst.
22576 2018-01-03  Martin Liska  <mliska@suse.cz>
22578         PR tree-optimization/83593
22579         * tree-ssa-strlen.c: Include tree-cfg.h.
22580         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22581         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22582         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22583         to false.
22584         (strlen_dom_walker::before_dom_children): Call
22585         gimple_purge_dead_eh_edges. Dump tranformation with details
22586         dump flags.
22587         (strlen_dom_walker::before_dom_children): Update call by adding
22588         new argument cleanup_eh.
22589         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22591 2018-01-03  Martin Liska  <mliska@suse.cz>
22593         PR ipa/83549
22594         * cif-code.def (VARIADIC_THUNK): New enum value.
22595         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22596         thunks.
22598 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22600         * sse.md (mov<mode>_internal): Tighten condition for when to use
22601         vmovdqu<ssescalarsize> for TI and OI modes.
22603 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22605         Update copyright years.
22607 2018-01-03  Martin Liska  <mliska@suse.cz>
22609         PR ipa/83594
22610         * ipa-visibility.c (function_and_variable_visibility): Skip
22611         functions with noipa attribure.
22613 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22615         * gcc.c (process_command): Update copyright notice dates.
22616         * gcov-dump.c (print_version): Ditto.
22617         * gcov.c (print_version): Ditto.
22618         * gcov-tool.c (print_version): Ditto.
22619         * gengtype.c (create_file): Ditto.
22620         * doc/cpp.texi: Bump @copying's copyright year.
22621         * doc/cppinternals.texi: Ditto.
22622         * doc/gcc.texi: Ditto.
22623         * doc/gccint.texi: Ditto.
22624         * doc/gcov.texi: Ditto.
22625         * doc/install.texi: Ditto.
22626         * doc/invoke.texi: Ditto.
22628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22630         * vector-builder.h (vector_builder::m_full_nelts): Change from
22631         unsigned int to poly_uint64.
22632         (vector_builder::full_nelts): Update prototype accordingly.
22633         (vector_builder::new_vector): Likewise.
22634         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22635         (vector_builder::operator ==): Likewise.
22636         (vector_builder::finalize): Likewise.
22637         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22638         Take the number of elements as a poly_uint64 rather than an
22639         unsigned int.
22640         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22641         from unsigned int to poly_uint64.
22642         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22643         (vec_perm_indices::new_vector): Likewise.
22644         (vec_perm_indices::length): Likewise.
22645         (vec_perm_indices::nelts_per_input): Likewise.
22646         (vec_perm_indices::input_nelts): Likewise.
22647         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22648         number of elements per input as a poly_uint64 rather than an
22649         unsigned int.  Use the original encoding for variable-length
22650         vectors, rather than clamping each individual element.
22651         For the second and subsequent elements in each pattern,
22652         clamp the step and base before clamping their sum.
22653         (vec_perm_indices::series_p): Handle polynomial element counts.
22654         (vec_perm_indices::all_in_range_p): Likewise.
22655         (vec_perm_indices_to_tree): Likewise.
22656         (vec_perm_indices_to_rtx): Likewise.
22657         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22658         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22659         (tree_vector_builder::new_binary_operation): Handle polynomial
22660         element counts.  Return false if we need to know the number
22661         of elements at compile time.
22662         * fold-const.c (fold_vec_perm): Punt if the number of elements
22663         isn't known at compile time.
22665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22667         * vec-perm-indices.h (vec_perm_builder): Change element type
22668         from HOST_WIDE_INT to poly_int64.
22669         (vec_perm_indices::element_type): Update accordingly.
22670         (vec_perm_indices::clamp): Handle polynomial element_types.
22671         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22672         (vec_perm_indices::all_in_range_p): Likewise.
22673         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22674         than shwi trees.
22675         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22676         polynomial vec_perm_indices element types.
22677         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22678         * fold-const.c (fold_vec_perm): Likewise.
22679         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22680         * tree-vect-generic.c (lower_vec_perm): Likewise.
22681         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22682         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22683         element type to HOST_WIDE_INT.
22685 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22686             Alan Hayward  <alan.hayward@arm.com>
22687             David Sherwood  <david.sherwood@arm.com>
22689         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22690         rather than an int.  Use plus_constant.
22691         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22692         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22694 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22695             Alan Hayward  <alan.hayward@arm.com>
22696             David Sherwood  <david.sherwood@arm.com>
22698         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22699         a HOST_WIDE_INT to a poly_int64.
22701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22702             Alan Hayward  <alan.hayward@arm.com>
22703             David Sherwood  <david.sherwood@arm.com>
22705         * calls.c (load_register_parameters): Cope with polynomial
22706         mode sizes.  Require a constant size for BLKmode parameters
22707         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22708         forces a parameter to be padded at the lsb end in order to
22709         fill a complete number of words, require the parameter size
22710         to be ordered wrt UNITS_PER_WORD.
22712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22713             Alan Hayward  <alan.hayward@arm.com>
22714             David Sherwood  <david.sherwood@arm.com>
22716         * reload1.c (spill_stack_slot_width): Change element type
22717         from unsigned int to poly_uint64_pod.
22718         (alter_reg): Treat mode sizes as polynomial.
22720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22721             Alan Hayward  <alan.hayward@arm.com>
22722             David Sherwood  <david.sherwood@arm.com>
22724         * reload.c (complex_word_subreg_p): New function.
22725         (reload_inner_reg_of_subreg, push_reload): Use it.
22727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22728             Alan Hayward  <alan.hayward@arm.com>
22729             David Sherwood  <david.sherwood@arm.com>
22731         * lra-constraints.c (process_alt_operands): Reject matched
22732         operands whose sizes aren't ordered.
22733         (match_reload): Refer to this check here.
22735 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22736             Alan Hayward  <alan.hayward@arm.com>
22737             David Sherwood  <david.sherwood@arm.com>
22739         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22740         that the mode size is in the set {1, 2, 4, 8, 16}.
22742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22743             Alan Hayward  <alan.hayward@arm.com>
22744             David Sherwood  <david.sherwood@arm.com>
22746         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22747         Use plus_constant instead of gen_rtx_PLUS.
22749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22750             Alan Hayward  <alan.hayward@arm.com>
22751             David Sherwood  <david.sherwood@arm.com>
22753         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22754         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22755         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22756         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22757         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22758         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22759         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22760         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22761         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22762         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22763         a poly_int64.
22764         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22765         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22766         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22767         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22768         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22769         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22770         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22771         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22772         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22773         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22774         function.
22775         * expr.c (emit_move_resolve_push): Treat the input and result
22776         of PUSH_ROUNDING as a poly_int64.
22777         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22778         (emit_push_insn): Likewise.
22779         * lra-eliminations.c (mark_not_eliminable): Likewise.
22780         * recog.c (push_operand): Likewise.
22781         * reload1.c (elimination_effects): Likewise.
22782         * rtlanal.c (nonzero_bits1): Likewise.
22783         * calls.c (store_one_arg): Likewise.  Require the padding to be
22784         known at compile time.
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         * expr.c (emit_single_push_insn_1): 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         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22798         rather than an int.
22800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22801             Alan Hayward  <alan.hayward@arm.com>
22802             David Sherwood  <david.sherwood@arm.com>
22804         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22805         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22806         via stack temporaries.  Treat the mode size as polynomial too.
22808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22809             Alan Hayward  <alan.hayward@arm.com>
22810             David Sherwood  <david.sherwood@arm.com>
22812         * expr.c (expand_expr_real_2): When handling conversions involving
22813         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22814         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22815         as a poly_uint64 too.
22817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22818             Alan Hayward  <alan.hayward@arm.com>
22819             David Sherwood  <david.sherwood@arm.com>
22821         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22824             Alan Hayward  <alan.hayward@arm.com>
22825             David Sherwood  <david.sherwood@arm.com>
22827         * combine.c (can_change_dest_mode): Handle polynomial
22828         REGMODE_NATURAL_SIZE.
22829         * expmed.c (store_bit_field_1): Likewise.
22830         * expr.c (store_constructor): Likewise.
22831         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22832         and polynomial REGMODE_NATURAL_SIZE.
22833         (gen_lowpart_common): Likewise.
22834         * reginfo.c (record_subregs_of_mode): Likewise.
22835         * rtlanal.c (read_modify_subreg_p): Likewise.
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         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22842         numbers of elements.
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         * match.pd: Cope with polynomial numbers of vector elements.
22850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22851             Alan Hayward  <alan.hayward@arm.com>
22852             David Sherwood  <david.sherwood@arm.com>
22854         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22855         in a POINTER_PLUS_EXPR.
22857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22858             Alan Hayward  <alan.hayward@arm.com>
22859             David Sherwood  <david.sherwood@arm.com>
22861         * omp-simd-clone.c (simd_clone_subparts): New function.
22862         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22863         (ipa_simd_modify_function_body): Likewise.
22865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22866             Alan Hayward  <alan.hayward@arm.com>
22867             David Sherwood  <david.sherwood@arm.com>
22869         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22870         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22871         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22872         (expand_vector_condition, vector_element): Likewise.
22873         (subparts_gt): New function.
22874         (get_compute_type): Use subparts_gt.
22875         (count_type_subparts): Delete.
22876         (expand_vector_operations_1): Use subparts_gt instead of
22877         count_type_subparts.
22879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22880             Alan Hayward  <alan.hayward@arm.com>
22881             David Sherwood  <david.sherwood@arm.com>
22883         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22884         (vect_compile_time_alias): ...this new function.  Do the calculation
22885         on poly_ints rather than trees.
22886         (vect_prune_runtime_alias_test_list): Update call accordingly.
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         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22893         numbers of units.
22894         (vect_schedule_slp_instance): Likewise.
22896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22897             Alan Hayward  <alan.hayward@arm.com>
22898             David Sherwood  <david.sherwood@arm.com>
22900         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22901         constant and extern definitions for variable-length vectors.
22902         (vect_get_constant_vectors): Note that the number of units
22903         is known to be constant.
22905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22906             Alan Hayward  <alan.hayward@arm.com>
22907             David Sherwood  <david.sherwood@arm.com>
22909         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22910         of units as polynomial.  Choose between WIDE and NARROW based
22911         on multiple_p.
22913 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22914             Alan Hayward  <alan.hayward@arm.com>
22915             David Sherwood  <david.sherwood@arm.com>
22917         * tree-vect-stmts.c (simd_clone_subparts): New function.
22918         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22920 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22921             Alan Hayward  <alan.hayward@arm.com>
22922             David Sherwood  <david.sherwood@arm.com>
22924         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22925         vectors as polynomial.  Use build_index_vector for
22926         IFN_GOMP_SIMD_LANE.
22928 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22929             Alan Hayward  <alan.hayward@arm.com>
22930             David Sherwood  <david.sherwood@arm.com>
22932         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22933         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22934         for variable-length vectors.
22935         (vectorizable_mask_load_store): Treat the number of units as
22936         polynomial, asserting that it is constant if the condition has
22937         already been enforced.
22938         (vectorizable_store, vectorizable_load): 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-loop.c (vectorizable_live_operation): Treat the number
22945         of units as polynomial.  Punt if we can't tell at compile time
22946         which vector contains the final result.
22948 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22949             Alan Hayward  <alan.hayward@arm.com>
22950             David Sherwood  <david.sherwood@arm.com>
22952         * tree-vect-loop.c (vectorizable_induction): Treat the number
22953         of units as polynomial.  Punt on SLP inductions.  Use an integer
22954         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22955         cast of such a series for variable-length floating-point
22956         reductions.
22958 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22959             Alan Hayward  <alan.hayward@arm.com>
22960             David Sherwood  <david.sherwood@arm.com>
22962         * tree.h (build_index_vector): Declare.
22963         * tree.c (build_index_vector): New function.
22964         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22965         of units as polynomial, forcibly converting it to a constant if
22966         vectorizable_reduction has already enforced the condition.
22967         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22968         to create a {1,2,3,...} vector.
22969         (vectorizable_reduction): Treat the number of units as polynomial.
22970         Choose vectype_in based on the largest scalar element size rather
22971         than the smallest number of units.  Enforce the restrictions
22972         relied on above.
22974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22975             Alan Hayward  <alan.hayward@arm.com>
22976             David Sherwood  <david.sherwood@arm.com>
22978         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22979         number of units as polynomial.
22981 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22982             Alan Hayward  <alan.hayward@arm.com>
22983             David Sherwood  <david.sherwood@arm.com>
22985         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22986         * target.def (autovectorize_vector_sizes): Return the vector sizes
22987         by pointer, using vector_sizes rather than a bitmask.
22988         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22989         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22990         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22991         Likewise.
22992         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22993         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22994         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22995         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22996         * omp-general.c (omp_max_vf): Likewise.
22997         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22998         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22999         * tree-vect-loop.c (vect_analyze_loop): Likewise.
23000         * tree-vect-slp.c (vect_slp_bb): Likewise.
23001         * doc/tm.texi: Regenerate.
23002         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
23003         to a poly_uint64.
23004         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
23005         the vector size as a poly_uint64 rather than an unsigned int.
23006         (current_vector_size): Change from an unsigned int to a poly_uint64.
23007         (get_vectype_for_scalar_type): Update accordingly.
23008         * tree.h (build_truth_vector_type): Take the size and number of
23009         units as a poly_uint64 rather than an unsigned int.
23010         (build_vector_type): Add a temporary overload that takes
23011         the number of units as a poly_uint64 rather than an unsigned int.
23012         * tree.c (make_vector_type): Likewise.
23013         (build_truth_vector_type): Take the number of units as a poly_uint64
23014         rather than an unsigned int.
23016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23017             Alan Hayward  <alan.hayward@arm.com>
23018             David Sherwood  <david.sherwood@arm.com>
23020         * target.def (get_mask_mode): Take the number of units and length
23021         as poly_uint64s rather than unsigned ints.
23022         * targhooks.h (default_get_mask_mode): Update accordingly.
23023         * targhooks.c (default_get_mask_mode): Likewise.
23024         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
23025         * doc/tm.texi: Regenerate.
23027 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23028             Alan Hayward  <alan.hayward@arm.com>
23029             David Sherwood  <david.sherwood@arm.com>
23031         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
23032         * omp-general.c (omp_max_vf): Likewise.
23033         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
23034         (expand_omp_simd): Handle polynomial safelen.
23035         * omp-low.c (omplow_simd_context): Add a default constructor.
23036         (omplow_simd_context::max_vf): Change from int to poly_uint64.
23037         (lower_rec_simd_input_clauses): Update accordingly.
23038         (lower_rec_input_clauses): Likewise.
23040 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23041             Alan Hayward  <alan.hayward@arm.com>
23042             David Sherwood  <david.sherwood@arm.com>
23044         * tree-vectorizer.h (vect_nunits_for_cost): New function.
23045         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
23046         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
23047         (vect_analyze_slp_cost): Likewise.
23048         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
23049         (vect_model_load_cost): Likewise.
23051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23052             Alan Hayward  <alan.hayward@arm.com>
23053             David Sherwood  <david.sherwood@arm.com>
23055         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
23056         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
23057         from an unsigned int * to a poly_uint64_pod *.
23058         (calculate_unrolling_factor): New function.
23059         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
23061 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23062             Alan Hayward  <alan.hayward@arm.com>
23063             David Sherwood  <david.sherwood@arm.com>
23065         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
23066         from an unsigned int to a poly_uint64.
23067         (_loop_vec_info::slp_unrolling_factor): Likewise.
23068         (_loop_vec_info::vectorization_factor): Change from an int
23069         to a poly_uint64.
23070         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
23071         (vect_get_num_vectors): New function.
23072         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
23073         (vect_get_num_copies): Use vect_get_num_vectors.
23074         (vect_analyze_data_ref_dependences): Change max_vf from an int *
23075         to an unsigned int *.
23076         (vect_analyze_data_refs): Change min_vf from an int * to a
23077         poly_uint64 *.
23078         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23079         than an unsigned HOST_WIDE_INT.
23080         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
23081         (vect_analyze_data_ref_dependence): Change max_vf from an int *
23082         to an unsigned int *.
23083         (vect_analyze_data_ref_dependences): Likewise.
23084         (vect_compute_data_ref_alignment): Handle polynomial vf.
23085         (vect_enhance_data_refs_alignment): Likewise.
23086         (vect_prune_runtime_alias_test_list): Likewise.
23087         (vect_shift_permute_load_chain): Likewise.
23088         (vect_supportable_dr_alignment): Likewise.
23089         (dependence_distance_ge_vf): Take the vectorization factor as a
23090         poly_uint64 rather than an unsigned HOST_WIDE_INT.
23091         (vect_analyze_data_refs): Change min_vf from an int * to a
23092         poly_uint64 *.
23093         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
23094         vfm1 as a poly_uint64 rather than an int.  Make the same change
23095         for the returned bound_scalar.
23096         (vect_gen_vector_loop_niters): Handle polynomial vf.
23097         (vect_do_peeling): Likewise.  Update call to
23098         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
23099         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
23100         be constant.
23101         * tree-vect-loop.c (vect_determine_vectorization_factor)
23102         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
23103         (vect_get_known_peeling_cost): Likewise.
23104         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
23105         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
23106         (vect_transform_loop): Likewise.  Use the lowest possible VF when
23107         updating the upper bounds of the loop.
23108         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
23109         rather than an int.
23110         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
23111         polynomial unroll factors.
23112         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
23113         (vect_make_slp_decision): Likewise.
23114         (vect_supported_load_permutation_p): Likewise, and polynomial
23115         vf too.
23116         (vect_analyze_slp_cost): Handle polynomial vf.
23117         (vect_slp_analyze_node_operations): Likewise.
23118         (vect_slp_analyze_bb_1): Likewise.
23119         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
23120         than an unsigned HOST_WIDE_INT.
23121         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
23122         (vectorizable_load): Handle polynomial vf.
23123         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
23124         a poly_uint64.
23125         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
23127 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23128             Alan Hayward  <alan.hayward@arm.com>
23129             David Sherwood  <david.sherwood@arm.com>
23131         * match.pd: Handle bit operations involving three constants
23132         and try to fold one pair.
23134 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23136         * tree-vect-loop-manip.c: Include gimple-fold.h.
23137         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
23138         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
23139         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
23140         Add a path that uses a step of VF instead of 1, but disable it
23141         for now.
23142         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
23143         and niters_no_overflow parameters.  Update calls to
23144         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
23145         Create a new SSA name if the latter choses to use a ste other
23146         than zero, and return it via niters_vector_mult_vf_var.
23147         * tree-vect-loop.c (vect_transform_loop): Update calls to
23148         vect_do_peeling, vect_gen_vector_loop_niters and
23149         slpeel_make_loop_iterate_ntimes.
23150         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23151         (vect_gen_vector_loop_niters): Update declarations after above changes.
23153 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23155         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23156         128-bit round to integer instructions.
23157         (ceil<mode>2): Likewise.
23158         (btrunc<mode>2): Likewise.
23159         (round<mode>2): Likewise.
23161 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23163         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23164         unaligned VSX load/store on P8/P9.
23165         (expand_block_clear): Allow the use of unaligned VSX
23166         load/store on P8/P9.
23168 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23170         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23171         New function.
23172         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23173         swap associated with both a load and a store.
23175 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23177         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23178         * config/riscv/riscv.md (clear_cache): Use it.
23180 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23182         * web.c: Remove out-of-date comment.
23184 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23186         * expr.c (fixup_args_size_notes): Check that any existing
23187         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23188         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23189         (emit_single_push_insn): ...here.
23191 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23193         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23194         (const_vector_encoded_nelts): New function.
23195         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23196         (const_vector_int_elt, const_vector_elt): Declare.
23197         * emit-rtl.c (const_vector_int_elt_1): New function.
23198         (const_vector_elt): Likewise.
23199         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23200         of CONST_VECTOR_ELT.
23202 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23204         * expr.c: Include rtx-vector-builder.h.
23205         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23206         directly on the tree encoding.
23207         (const_vector_from_tree): Likewise.
23208         * optabs.c: Include rtx-vector-builder.h.
23209         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23210         sequence of "u" values.
23211         * vec-perm-indices.c: Include rtx-vector-builder.h.
23212         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23213         directly on the vec_perm_indices encoding.
23215 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23217         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23218         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23219         * rtx-vector-builder.h: New file.
23220         * rtx-vector-builder.c: Likewise.
23221         * rtl.h (rtx_def::u2): Add a const_vector field.
23222         (CONST_VECTOR_NPATTERNS): New macro.
23223         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23224         (CONST_VECTOR_DUPLICATE_P): Likewise.
23225         (CONST_VECTOR_STEPPED_P): Likewise.
23226         (CONST_VECTOR_ENCODED_ELT): Likewise.
23227         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23228         (unwrap_const_vec_duplicate): Likewise.
23229         (const_vec_series_p): Check for a non-duplicated vector encoding.
23230         Say that the function only returns true for integer vectors.
23231         * emit-rtl.c: Include rtx-vector-builder.h.
23232         (gen_const_vec_duplicate_1): Delete.
23233         (gen_const_vector): Call gen_const_vec_duplicate instead of
23234         gen_const_vec_duplicate_1.
23235         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23236         (gen_const_vec_duplicate): Use rtx_vector_builder.
23237         (gen_const_vec_series): Likewise.
23238         (gen_rtx_CONST_VECTOR): Likewise.
23239         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23240         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23241         Build a new vector rather than modifying a CONST_VECTOR in-place.
23242         (handle_special_swappables): Update call accordingly.
23243         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23244         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23245         Build a new vector rather than modifying a CONST_VECTOR in-place.
23246         (handle_special_swappables): Update call accordingly.
23248 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23250         * simplify-rtx.c (simplify_const_binary_operation): Use
23251         CONST_VECTOR_ELT instead of XVECEXP.
23253 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23255         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23256         the selector elements to be different from the data elements
23257         if the selector is a VECTOR_CST.
23258         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23259         ssizetype for the selector.
23261 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23263         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23264         before testing each element individually.
23265         * tree-vect-generic.c (lower_vec_perm): Likewise.
23267 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23269         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23270         * selftest-run-tests.c (selftest::run_tests): Call it.
23271         * vector-builder.h (vector_builder::operator ==): New function.
23272         (vector_builder::operator !=): Likewise.
23273         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23274         (vec_perm_indices::all_from_input_p): New function.
23275         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23276         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23277         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23278         instead of reading the VECTOR_CST directly.  Detect whether both
23279         vector inputs are the same before constructing the vec_perm_indices,
23280         and update the number of inputs argument accordingly.  Use the
23281         utility functions added above.  Only construct sel2 if we need to.
23283 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23285         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23286         the broadcast of the low byte.
23287         (expand_mult_highpart): Use an explicit encoding for the permutes.
23288         * optabs-query.c (can_mult_highpart_p): Likewise.
23289         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23290         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23291         (vectorizable_bswap): Likewise.
23292         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23293         explicit encoding for the power-of-2 permutes.
23294         (vect_permute_store_chain): Likewise.
23295         (vect_grouped_load_supported): Likewise.
23296         (vect_permute_load_chain): Likewise.
23298 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23300         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23301         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23302         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23303         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23304         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23305         (vect_gen_perm_mask_any): Likewise.
23307 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23309         * int-vector-builder.h: New file.
23310         * vec-perm-indices.h: Include int-vector-builder.h.
23311         (vec_perm_indices): Redefine as an int_vector_builder.
23312         (auto_vec_perm_indices): Delete.
23313         (vec_perm_builder): Redefine as a stand-alone class.
23314         (vec_perm_indices::vec_perm_indices): New function.
23315         (vec_perm_indices::clamp): Likewise.
23316         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23317         (vec_perm_indices::new_vector): New function.
23318         (vec_perm_indices::new_expanded_vector): Update for new
23319         vec_perm_indices class.
23320         (vec_perm_indices::rotate_inputs): New function.
23321         (vec_perm_indices::all_in_range_p): Operate directly on the
23322         encoded form, without computing elided elements.
23323         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23324         encoding.  Update for new vec_perm_indices class.
23325         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23326         the given vec_perm_builder.
23327         (expand_vec_perm_var): Update vec_perm_builder constructor.
23328         (expand_mult_highpart): Use vec_perm_builder instead of
23329         auto_vec_perm_indices.
23330         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23331         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23332         or double series encoding as appropriate.
23333         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23334         vec_perm_indices instead of auto_vec_perm_indices.
23335         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23336         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23337         (vect_permute_store_chain): Likewise.
23338         (vect_grouped_load_supported): Likewise.
23339         (vect_permute_load_chain): Likewise.
23340         (vect_shift_permute_load_chain): Likewise.
23341         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23342         (vect_transform_slp_perm_load): Likewise.
23343         (vect_schedule_slp_instance): Likewise.
23344         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23345         (vectorizable_mask_load_store): Likewise.
23346         (vectorizable_bswap): Likewise.
23347         (vectorizable_store): Likewise.
23348         (vectorizable_load): Likewise.
23349         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23350         vec_perm_indices instead of auto_vec_perm_indices.  Use
23351         tree_to_vec_perm_builder to read the vector from a tree.
23352         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23353         vec_perm_builder instead of a vec_perm_indices.
23354         (have_whole_vector_shift): Use vec_perm_builder and
23355         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23356         truncation to calc_vec_perm_mask_for_shift.
23357         (vect_create_epilog_for_reduction): Likewise.
23358         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23359         from auto_vec_perm_indices to vec_perm_indices.
23360         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23361         instead of changing individual elements.
23362         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23363         the vector in d.perm.
23364         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23365         from auto_vec_perm_indices to vec_perm_indices.
23366         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23367         instead of changing individual elements.
23368         (arm_vectorize_vec_perm_const): Use new_vector to install
23369         the vector in d.perm.
23370         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23371         Update vec_perm_builder constructor.
23372         (rs6000_expand_interleave): Likewise.
23373         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23374         (rs6000_expand_interleave): Likewise.
23376 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23378         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23379         to qimode could truncate the indices.
23380         * optabs.c (expand_vec_perm_var): Likewise.
23382 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23384         * Makefile.in (OBJS): Add vec-perm-indices.o.
23385         * vec-perm-indices.h: New file.
23386         * vec-perm-indices.c: Likewise.
23387         * target.h (vec_perm_indices): Replace with a forward class
23388         declaration.
23389         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23390         * optabs.h: Include vec-perm-indices.h.
23391         (expand_vec_perm): Delete.
23392         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23393         (expand_vec_perm_const): Declare.
23394         * target.def (vec_perm_const_ok): Replace with...
23395         (vec_perm_const): ...this new hook.
23396         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23397         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23398         * doc/tm.texi: Regenerate.
23399         * optabs.def (vec_perm_const): Delete.
23400         * doc/md.texi (vec_perm_const): Likewise.
23401         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23402         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23403         expand_vec_perm for constant permutation vectors.  Assert that
23404         the mode of variable permutation vectors is the integer equivalent
23405         of the mode that is being permuted.
23406         * optabs-query.h (selector_fits_mode_p): Declare.
23407         * optabs-query.c: Include vec-perm-indices.h.
23408         (selector_fits_mode_p): New function.
23409         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23410         is defined, instead of checking whether the vec_perm_const_optab
23411         exists.  Use targetm.vectorize.vec_perm_const instead of
23412         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23413         fit in the vector mode before using a variable permute.
23414         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23415         vec_perm_indices instead of an rtx.
23416         (expand_vec_perm): Replace with...
23417         (expand_vec_perm_const): ...this new function.  Take the selector
23418         as a vec_perm_indices rather than an rtx.  Also take the mode of
23419         the selector.  Update call to shift_amt_for_vec_perm_mask.
23420         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23421         Use vec_perm_indices::new_expanded_vector to expand the original
23422         selector into bytes.  Check whether the indices fit in the vector
23423         mode before using a variable permute.
23424         (expand_vec_perm_var): Make global.
23425         (expand_mult_highpart): Use expand_vec_perm_const.
23426         * fold-const.c: Includes vec-perm-indices.h.
23427         * tree-ssa-forwprop.c: Likewise.
23428         * tree-vect-data-refs.c: Likewise.
23429         * tree-vect-generic.c: Likewise.
23430         * tree-vect-loop.c: Likewise.
23431         * tree-vect-slp.c: Likewise.
23432         * tree-vect-stmts.c: Likewise.
23433         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23434         Delete.
23435         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23436         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23437         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23438         (aarch64_vectorize_vec_perm_const): ...this new function.
23439         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23440         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23441         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23442         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23443         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23444         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23445         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23446         into...
23447         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23448         check for NEON modes.
23449         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23450         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23451         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23452         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23453         into...
23454         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23455         the old VEC_PERM_CONST conditions.
23456         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23457         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23458         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23459         (ia64_vectorize_vec_perm_const_ok): Merge into...
23460         (ia64_vectorize_vec_perm_const): ...this new function.
23461         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23462         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23463         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23464         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23465         * config/mips/mips.c (mips_expand_vec_perm_const)
23466         (mips_vectorize_vec_perm_const_ok): Merge into...
23467         (mips_vectorize_vec_perm_const): ...this new function.
23468         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23469         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23470         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23471         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23472         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23473         (rs6000_expand_vec_perm_const): Delete.
23474         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23475         Delete.
23476         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23477         (altivec_expand_vec_perm_const_le): Take each operand individually.
23478         Operate on constant selectors rather than rtxes.
23479         (altivec_expand_vec_perm_const): Likewise.  Update call to
23480         altivec_expand_vec_perm_const_le.
23481         (rs6000_expand_vec_perm_const): Delete.
23482         (rs6000_vectorize_vec_perm_const_ok): Delete.
23483         (rs6000_vectorize_vec_perm_const): New function.
23484         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23485         an element count and rtx array.
23486         (rs6000_expand_extract_even): Update call accordingly.
23487         (rs6000_expand_interleave): Likewise.
23488         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23489         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23490         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23491         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23492         (rs6000_expand_vec_perm_const): Delete.
23493         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23494         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23495         (altivec_expand_vec_perm_const_le): Take each operand individually.
23496         Operate on constant selectors rather than rtxes.
23497         (altivec_expand_vec_perm_const): Likewise.  Update call to
23498         altivec_expand_vec_perm_const_le.
23499         (rs6000_expand_vec_perm_const): Delete.
23500         (rs6000_vectorize_vec_perm_const_ok): Delete.
23501         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23502         reference to the SPE evmerge intructions.
23503         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23504         an element count and rtx array.
23505         (rs6000_expand_extract_even): Update call accordingly.
23506         (rs6000_expand_interleave): Likewise.
23507         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23508         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23509         new function.
23510         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23512 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23514         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23515         vector mode and that that mode matches the mode of the data
23516         being permuted.
23517         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23518         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23519         directly using expand_vec_perm_1 when forcing selectors into
23520         registers.
23521         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23523 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23525         * optabs-query.h (can_vec_perm_p): Delete.
23526         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23527         * optabs-query.c (can_vec_perm_p): Split into...
23528         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23529         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23530         particular selector is valid.
23531         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23532         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23533         (vect_grouped_load_supported): Likewise.
23534         (vect_shift_permute_load_chain): Likewise.
23535         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23536         (vect_transform_slp_perm_load): Likewise.
23537         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23538         (vectorizable_bswap): Likewise.
23539         (vect_gen_perm_mask_checked): Likewise.
23540         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23541         implementations of variable permutation vectors into account
23542         when deciding which selector to use.
23543         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23544         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23545         with a false third argument.
23546         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23547         to test whether the constant selector is valid and can_vec_perm_var_p
23548         to test whether a variable selector is valid.
23550 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23552         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23553         * optabs-query.c (can_vec_perm_p): Likewise.
23554         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23555         instead of vec_perm_indices.
23556         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23557         (vect_gen_perm_mask_checked): Likewise,
23558         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23559         (vect_gen_perm_mask_checked): Likewise,
23561 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23563         * optabs-query.h (qimode_for_vec_perm): Declare.
23564         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23565         (qimode_for_vec_perm): ...this new function.
23566         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23568 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23570         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23571         does not have a conditional at the top.
23573 2018-01-02  Richard Biener  <rguenther@suse.de>
23575         * ipa-inline.c (big_speedup_p): Fix expression.
23577 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23579         PR target/81616
23580         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23581         for generic 4->6.
23583 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23585         PR target/81616
23586         Generic tuning.
23587         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23588         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23589         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23590         cond_taken_branch_cost 3->4.
23592 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23594         PR tree-optimization/83581
23595         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23596         TODO_cleanup_cfg if any changes have been made.
23598         PR middle-end/83608
23599         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23600         convert_modes if target mode has the right side, but different mode
23601         class.
23603         PR middle-end/83609
23604         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23605         last argument when extracting from CONCAT.  If either from_real or
23606         from_imag is NULL, use expansion through memory.  If result is not
23607         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23608         the parts directly to inner mode, if even that fails, use expansion
23609         through memory.
23611         PR middle-end/83623
23612         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23613         check for bswap in mode rather than HImode and use that in expand_unop
23614         too.
23616 Copyright (C) 2018 Free Software Foundation, Inc.
23618 Copying and distribution of this file, with or without modification,
23619 are permitted in any medium without royalty provided the copyright
23620 notice and this notice are preserved.