Refactor std::optional SFINAE constraints
[official-gcc.git] / gcc / ChangeLog
blobec1fb242c23901488b60c32582c56649c947c8a3
1 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
3         PR target/86994
4         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
5         register_operand when calling ix86_set_reg_reg_cost.
6         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
7         Set *total to 0 for operands that satisfy x86_64_immediate_operand
8         predicate and to 1 otherwise.
10 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
12         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
13         emit a diagnostic that it is not supported and reset the option.
14         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
15         supported and consume the option.  (ASM_FINAL_SPEC): New.
17 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
19         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
20         a sentence.
22 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
24         C-SKY port: Documentation
26         * doc/extend.texi (C-SKY Function Attributes): New section.
27         * doc/invoke.texi (Option Summary): Add C-SKY options.
28         (C-SKY Options): New section.
29         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
31 2018-08-17  Jojo  <jijie_rong@c-sky.com>
32             Huibin Wang  <huibin_wang@c-sky.com>
33             Sandra Loosemore  <sandra@codesourcery.com>
34             Chung-Lin Tang  <cltang@codesourcery.com>
36         C-SKY port: Backend implementation
38         * config/csky/*: New.
39         * common/config/csky/*: New.
41 2018-08-17  Jojo  <jijie_rong@c-sky.com>
42             Huibin Wang  <huibin_wang@c-sky.com>
43             Sandra Loosemore  <sandra@codesourcery.com>
44             Chung-Lin Tang  <cltang@codesourcery.com>
45             Andrew Jenner  <andrew@codesourcery.com>
47         C-SKY port: Configury
49         * config.gcc (csky-*-*): New.
50         * configure.ac: Add csky to targets for dwarf2 debug_line support.
51         * configure: Regenerated.
53 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
55         * dump-context.h: Include "dumpfile.h".
56         (dump_context::dump_printf_va): Convert final param from va_list
57         to va_list *.  Convert from ATTRIBUTE_PRINTF to
58         ATTRIBUTE_GCC_DUMP_PRINTF.
59         (dump_context::dump_printf_loc_va): Likewise.
60         * dumpfile.c: Include "stringpool.h".
61         (make_item_for_dump_printf_va): Delete.
62         (make_item_for_dump_printf): Delete.
63         (class dump_pretty_printer): New class.
64         (dump_pretty_printer::dump_pretty_printer): New ctor.
65         (dump_pretty_printer::emit_items): New member function.
66         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
67         function.
68         (dump_pretty_printer::emit_item): New member function.
69         (dump_pretty_printer::stash_item): New member function.
70         (dump_pretty_printer::format_decoder_cb): New member function.
71         (dump_pretty_printer::decode_format): New member function.
72         (dump_context::dump_printf_va): Reimplement in terms of
73         dump_pretty_printer.
74         (dump_context::dump_printf_loc_va): Convert final param from va_list
75         to va_list *.
76         (dump_context::begin_scope): Reimplement call to
77         make_item_for_dump_printf.
78         (dump_printf): Update for change to dump_printf_va.
79         (dump_printf_loc): Likewise.
80         (selftest::test_capture_of_dump_calls): Convert "stmt" from
81         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
82         with %T, %E, and %G.
83         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
84         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
85         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
86         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
87         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
88         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
89         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
90         within a dump_printf_loc call to "%wu".
91         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
92         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
93         missing space after "=".
94         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
95         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
96         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
97         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
98         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
99         duplicate "vectorized" from message.
101 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
103         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
104         polyNxK_t element's TYPE_STRING_FLAG.
106 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
108         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
109         (they were unnamed before).  Fix comments.
111 2018-08-17  Nathan Sidwell  <nathan@acm.org>
113         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
115 2018-08-17  Richard Biener  <rguenther@suse.de>
117         PR tree-optimization/86841
118         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
120 2018-08-17  Martin Liska  <mliska@suse.cz>
122         * common.opt: Remove Warn, Init and Report for options with
123         Ignore/Deprecated flag. Warning is done automatically for
124         Deprecated flags.
125         * config/i386/i386.opt: Likewise.
126         * config/ia64/ia64.opt: Likewise.
127         * config/rs6000/rs6000.opt: Likewise.
128         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
129         Remove usage of flag_check_pointer_bounds.
130         * lto-wrapper.c (merge_and_complain): Do not handle
131         OPT_fcheck_pointer_bounds.
132         (append_compiler_options): Likewise.
133         * opt-functions.awk: Do not handle Deprecated.
134         * optc-gen.awk: Check that Var, Report and Init are not
135         used for an option with Ignore/Deprecated flag.
136         * opts-common.c (decode_cmdline_option): Do not report
137         CL_ERR_DEPRECATED.
138         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
139         options.
140         * opts.h (struct cl_option): Remove cl_deprecated flag.
141         (CL_ERR_DEPRECATED): Remove error enum value.
143 2018-08-17  Richard Biener  <rguenther@suse.de>
145         PR middle-end/86505
146         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
147         across a va-arg-pack using call adjust its return value accordingly.
149 2018-08-16  Martin Sebor  <msebor@redhat.com>
151         PR tree-optimization/86853
152         * gimple-ssa-sprintf.c (struct format_result): Rename member.
153         (struct fmtresult): Add member and initialize it in ctors.
154         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
155         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
156         (format_directive): Set POSUNDER4K when MAYFAIL is set.
157         (parse_directive): Handle %C same as %c.
158         (sprintf_dom_walker::compute_format_length): Adjust.
159         (is_call_safe): Adjust.
161 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
163         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
164         for determining how to count the elements.
165         * builtins.h (c_strlen): Adjust prototype.
166         * expr.c (string_constant): Add new parameter mem_size.
167         Set *mem_size appropriately.
168         * expr.h (string_constant): Adjust protoype.
169         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
170         * gimple-fold.h (get_range_strlen): Adjust prototype.
171         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
172         (format_string): Call get_string_length with eltsize.
174 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
176         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
177         to emit the span, rather than setting it as the prefix.
179 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
181         * diagnostic-show-locus.c (layout::start_annotation_line): Add
182         "margin_char" parameter, defaulting to space.  Use it in place
183         of pp_space for the initial part of the margin.
184         (layout::print_leading_fixits): Use '+' when filling the margin
185         of line-insertion fix-it hints.
187 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
189         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
190         Delete.
192 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
194         * config/rs6000/altivec.md: Don't set length attribute to the default
195         value.
196         * config/rs6000/darwin.md: Ditto.
197         * config/rs6000/dfp.md: Ditto.
198         * config/rs6000/htm.md: Ditto.
199         * config/rs6000/rs6000.md: Ditto.
200         * config/rs6000/sync.md: Ditto.
201         * config/rs6000/vsx.md: Ditto.
203 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
205         * config/rs6000/altivec.md: Don't set length attribute to the default
206         value, for branch instructions.
207         * config/rs6000/darwin.md: Ditto.
208         * config/rs6000/rs6000.md: Ditto.
210 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
212         * config/rs6000/rs6000.md (length): Always define as const_int 4.
213         (unnamed conditional branch define_insn): Set length to 4 or 8
214         depending on offset.
215         (<bd>_<mode>): Similar, for alternative 0.
216         (<bd>tf_<mode>): Ditto.
218 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
220         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
222 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
224         * doc/rtl.texi: Replace old RTX class names with new names.
227 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
229         * expmed.h (canonicalize_comparison): New declaration.
230         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
231         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
232         * optabs.c (prepare_cmp_insn): Likewise.
233         * rtl.h (unsigned_condition_p): New function which checks if a
234         comparison operator is unsigned.
236 2018-08-16  Nathan Sidwell  <nathan@acm.org>
238         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
239         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
241 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
243         PR target/84711
244         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
245         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
246         (mov<mov>): ..this and enable unconditionally.
248 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
250         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
252 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
254         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
255         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
256         "Common" with "Target".
258 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
260         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
261         * doc/invoke.texi (mmitigate-rop): Remove.
262         * config/i386/i386.c: Do not include "regrename.h".
263         (ix86_rop_should_change_byte_p, reg_encoded_number)
264         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
265         Remove.
266         (ix86_reorg): Remove call to ix86_mitigate_rop.
267         * config/i386/i386.md (attr "modrm_class"): Remove.
268         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
269         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
270         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
272 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
274         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
275         allow folding of mergeh() and mergel() for the float and double types.
276         (fold_mergehl_helper): Rework to handle building a permute tree
277         for float vectors.
279 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
281         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
282         for TARGET_SSE.
284 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
286         * common.opt (fdiagnostics-show-labels): New option.
287         * diagnostic-show-locus.c (class layout_range): Add field
288         "m_label".
289         (class layout): Add field "m_show_labels_p".
290         (layout_range::layout_range): Add param "label" and use it to
291         initialize m_label.
292         (make_range): Pass in NULL for new "label" param of layout_range's
293         ctor.
294         (layout::layout): Initialize m_show_labels_p.
295         (layout::maybe_add_location_range): Pass in loc_range->m_label
296         when constructing layout_range instances.
297         (struct line_label): New struct.
298         (layout::print_any_labels): New member function.
299         (layout::print_line): Call it if label-printing is enabled.
300         (selftest::test_one_liner_labels): New test.
301         (selftest::test_diagnostic_show_locus_one_liner): Call it.
302         * diagnostic.c (diagnostic_initialize): Initialize
303         context->show_labels_p.
304         * diagnostic.h (struct diagnostic_context): Add field
305         "show_labels_p".
306         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
307         -fno-diagnostics-show-labels.
308         * dwarf2out.c (gen_producer_string): Add
309         OPT_fdiagnostics_show_labels to the ignored options.
310         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
311         param.
312         (gcc_rich_location::maybe_add_expr): Likewise.
313         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
314         label" param, defaulting to NULL.
315         (gcc_rich_location::add_expr): Add "label" param.
316         (gcc_rich_location::maybe_add_expr): Likewise.
317         (class text_range_label): New class.
318         (class range_label_for_type_mismatch): New class.
319         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
320         of format_warning_va.
321         (fmtwarn_n): Likewise for new params of format_warning_n_va.
322         * lto-wrapper.c (merge_and_complain): Add
323         OPT_fdiagnostics_show_labels to the "pick one setting" options.
324         (append_compiler_options): Likewise to the dropped options.
325         (append_diag_options): Likewise to the passed-on options.
326         * opts.c (common_handle_option): Handle the new option.
327         * selftest-diagnostic.c
328         (test_diagnostic_context::test_diagnostic_context): Enable
329         show_labels_p.
330         * substring-locations.c: Include "gcc-rich-location.h".
331         (format_warning_n_va): Add "fmt_label" and "param_label" params
332         and use them as appropriate.
333         (format_warning_va): Add "fmt_label" and "param_label" params,
334         passing them on to format_warning_n_va.
335         (format_warning_at_substring): Likewise.
336         (format_warning_at_substring_n): Likewise.
337         * substring-locations.h (format_warning_va): Add "fmt_label" and
338         "param_label" params.
339         (format_warning_n_va): Likewise.
340         (format_warning_at_substring): Likewise.
341         (format_warning_at_substring_n): Likewise.
342         * toplev.c (general_init): Initialize global_dc->show_labels_p.
344 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
346         PR testsuite/86519
347         * builtins.c (expand_builtin_memcmp): Do not expand the call
348         when overflow is detected.
350 2018-08-15  Martin Sebor  <msebor@redhat.com>
352         PR tree-optimization/71625
353         * config/aarch64/aarch64-builtins.c
354         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
356 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
358         * config/s390/s390.c (s390_reorg): Remove loop.
360 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
362         * config/darwin.c
363          (darwin_function_switched_text_sections): Delete.
364         * gcc/config/darwin.h
365          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
367 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
369         PR target/81685
370         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
371         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
372         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
374 2018-08-15  Martin Liska  <mliska@suse.cz>
376         PR tree-optimization/86925
377         * predict.c (expr_expected_value_1): When taking
378         later predictor, assign also probability.
379         Use fold_build2_initializer_loc in order to fold
380         the expression in -frounding-math.
382 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
384         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
385         patterns.
386         (expand_vec_perm_1): Try the new method.
388 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
390         PR target/86547
391         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
392         Check whether lra_live_max_point is 0 before dividing.
394 2018-08-14  Martin Sebor  <msebor@redhat.com>
396         PR tree-optimization/86650
397         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
398         (vrp_prop::check_mem_ref): Same.
400 2018-08-13  Liu Hao <lh_mouse@126.com>
402         * pretty-print.c (eat_esc_sequence): Swap the foreground and
403         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
404         and clear it thereafter, as it only works for DBCS.
406 2018-08-13  Liu Hao <lh_mouse@126.com>
408         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
409         handle returned by _get_osf_handle().
411 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
413         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
414         for folding vec_perm.
416 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
418         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
419         Add support for gimple-folding of vec_pack() and vec_unpack()
420         intrinsics.
422 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
424         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
425         vec_xst variants to the list.
426         (rs6000_gimple_fold_builtin): Add support for folding unaligned
427         vector loads and stores.
429 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
431         * config.gcc (rs6000-ibm-aix4.x): Delete.
432         (rs6000-ibm-aix5.1): Delete.
433         (rs6000-ibm-aix5.2): Delete.
434         (rs6000-ibm-aix5.3): Delete.
435         * config/rs6000/aix43.h: Delete.
436         * config/rs6000/aix51.h: Delete.
437         * config/rs6000/aix52.h: Delete.
438         * config/rs6000/t-aix43: Delete.
440 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
442         * config/s390/s390.c (s390_decompose_constant_pool_ref):
443         New function.
444         (s390_decompose_address): Factor out constant pool ref
445         decomposition.
447 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
449         * config/nds32/nds32-predicates.c
450         (nds32_can_use_bclr_p): Change return type as bool.
451         (nds32_can_use_bset_p): Ditto.
452         (nds32_can_use_btgl_p): Ditto.
453         (nds32_can_use_bitci_p): Ditto.
454         * config/nds32/nds32-protos.h
455         (nds32_can_use_bclr_p): Change declaration.
456         (nds32_can_use_bset_p): Ditto.
457         (nds32_can_use_btgl_p): Ditto.
458         (nds32_can_use_bitci_p): Ditto.
460 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
462         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
463         Support -msched-prolog-epilog option.
464         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
466 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
468         * common/config/nds32/nds32-common.c
469         (nds32_option_optimization_table): Enalbe -malways-align.
471 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
473         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
474         extra_headers.
475         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
476         OPT_misr_secure_ case.
477         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
478         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
479         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
480         secure attribute.
481         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
482         (nds32_isr_info): New field security_level.
483         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
484         * config/nds32/nds32.md (return_internal): Consider critical attribute.
485         * config/nds32/nds32.opt (misr-secure): New option.
486         * config/nds32/nds32_init.inc: New file.
487         * config/nds32/nds32_isr.h: New file.
489 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
491         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
492         Update comment for atomic instructions.
493         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
494         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
495         Remove.
496         (atomic_loaddi): Revise fence expansion to only emit fence prior to
497         load for __ATOMIC_SEQ_CST model.
498         (atomic_loaddi_1): Remove float register target.
499         (atomic_storedi): Handle CONST_INT values.
500         (atomic_storedi_1): Remove float register source.  Add special case
501         for zero value.
502         (memory_barrier): New expander and insn.
504 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
506         PR tree-optimization/86835
507         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
508         new_stmt after def_gsi, make sure to insert new_square_stmt after
509         that stmt, not 2 stmts before it.
511 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
513         PR target/82418
514         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
515         instead of SWI48.
517 2018-08-10  Martin Liska  <mliska@suse.cz>
519         PR target/83610
520         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
521         function type.
522         * builtins.c (expand_builtin_expect_with_probability):
523         New function.
524         (expand_builtin_expect_with_probability): New function.
525         (build_builtin_expect_predicate): Add new argumnet probability
526         for BUILT_IN_EXPECT_WITH_PROBABILITY.
527         (fold_builtin_expect):
528         (fold_builtin_2):
529         (fold_builtin_3):
530         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
531         * builtins.h (fold_builtin_expect): Set new argument.
532         * doc/extend.texi: Document __builtin_expect_with_probability.
533         * doc/invoke.texi: Likewise.
534         * gimple-fold.c (gimple_fold_call): Pass new argument.
535         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
536         also BUILT_IN_EXPECT_WITH_PROBABILITY.
537         * predict.c (get_predictor_value): New function.
538         (expr_expected_value): Add new argument probability. Assume
539         that predictor and probability are always non-null.
540         (expr_expected_value_1): Likewise.  For __builtin_expect and
541         __builtin_expect_with_probability set probability.  Handle
542         combination in binary expressions.
543         (tree_predict_by_opcode): Simplify code by simply calling
544         get_predictor_value.
545         (pass_strip_predict_hints::execute): Add handling of
546         BUILT_IN_EXPECT_WITH_PROBABILITY.
547         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
548         new predictor.
549         * tree.h (DECL_BUILT_IN_P): New function.
551 2018-08-10  Martin Liska  <mliska@suse.cz>
553         PR tree-optimization/85799
554         * passes.def: Add argument for pass_strip_predict_hints.
555         * predict.c (class pass_strip_predict_hints): Add new argument
556         early_p.
557         (strip_predictor_early): New function.
558         (pass_strip_predict_hints::execute): Call the function to
559         strip predictors.
560         (strip_predict_hints): New function.
561         * predict.def: Fix comment.
563 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
565         * Makefile.in: Clarify which tm.texi to copy over to assert the
566         right to grant a GFDL license for all.
568 2018-08-09  Jeff Law  <law@redhat.com>
570         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
571         unused variable.
573 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
575         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
576         prototype.
578 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
580         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
581         reductions for variable-length vectors.
583 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
585         PR other/84889
586         * common.opt (fdiagnostics-show-line-numbers): New option.
587         * diagnostic-show-locus.c (class layout): Add fields
588         "m_show_line_numbers_p" and "m_linenum_width";
589         (num_digits): New function.
590         (test_num_digits): New function.
591         (layout::layout): Initialize new fields.  Update m_x_offset
592         logic to handle any left margin.
593         (layout::print_source_line): Print line number when requested.
594         (layout::start_annotation_line): New member function.
595         (layout::print_annotation_line): Call it.
596         (layout::print_leading_fixits): Likewise.
597         (layout::print_trailing_fixits): Likewise.  Update calls to
598         move_to_column for new parameter.
599         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
600         it to potentially call start_annotation_line.
601         (layout::show_ruler): Call start_annotation_line.
602         (selftest::test_line_numbers_multiline_range): New selftest.
603         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
604         and selftest::test_line_numbers_multiline_range.
605         * diagnostic.c (diagnostic_initialize): Initialize
606         show_line_numbers_p.
607         * diagnostic.h (struct diagnostic_context): Add field
608         "show_line_numbers_p".
609         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
610         -fno-diagnostics-show-line-numbers.
611         * dwarf2out.c (gen_producer_string): Add
612         OPT_fdiagnostics_show_line_numbers to the ignored options.
613         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
614         one setting" options.
615         (append_compiler_options): Likewise to the dropped options.
616         (append_diag_options): Likewise to the passed-on options.
617         * opts.c (common_handle_option): Handle the new option.
618         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
620 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
622         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
623         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
624         third argument of type "const signed char" to descriptions of
625         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
626         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
627         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
628         __builtin_bcdsub_ov functions.
630 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
632         PR tree-optimization/86858
633         * tree-vect-loop.c (vect_is_simple_reduction): Restore
634         flow_bb_inside_loop_p calls.
636 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
638         PR tree-optimization/86871
639         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
640         instead of gimple_assign_lhs.
642 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
644         PR target/86887
645         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
646         register constraint to operand 0.
647         (add<mode>3_carryinC): Likewise.
648         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
650 2018-08-09  Martin Liska  <mliska@suse.cz>
652         PR c/86895
653         * common.opt: Remove extra line.
655 2018-08-09  Martin Liska  <mliska@suse.cz>
657         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
658         at the end of a line, make first letter capital and end up
659         a sentence with a dot.
660         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
661         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
662         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
663         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
664         (PARAM_MAX_ISL_OPERATIONS): Likewise.
665         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
666         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
667         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
668         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
669         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
670         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
671         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
672         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
673         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
674         (PARAM_TREE_REASSOC_WIDTH): Likewise.
675         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
676         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
677         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
679 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
681         PR target/84332
682         * config/s390/s390.c (s390_option_override_internal): Reduce the
683         stack-clash-protection-probe-interval param if it would be too big
684         for z900.
686 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
688         PR target/46179
689         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
690         * config/m68k/m68k.c (handle_move_double): Don't call
691         m68k_final_prescan_insn.
692         (m68k_adjust_decorated_operand): Renamed from
693         m68k_final_prescan_insn, remove first and third operand and
694         simplify.
695         (print_operand): Call it.
696         (print_operand_address): Call it.
698 2018-08-08  Nathan Sidwell  <nathan@acm.org>
700         * diagnostic.c (diagnostic_report_current_module): Use
701         linemap_included_from & linemap_included_from_linemap.
703 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
705         * config/aarch64/aarch64-cores.def: Add phecda core.
706         * config/aarch64/aarch64-tune.md: Regenerate.
707         * doc/invoke.texi: Add phecda core.
709 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
711         PR target/85295
712         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
713         definitions.
714         * config/s390/s390.md ("movti"): Add more alternatives for
715         constant to GPR copies.
717 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
719         * config/s390/s390.c: Fix whitespace damage throughout the file.
720         * config/s390/s390.h: Likewise.
721         * config/s390/tpf.h: Likewise.
723 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
725         * config/s390/s390.c (s390_loadrelative_operand_p):
726         Remove TARGET_CPU_ZARCH usages.
727         (s390_rtx_costs): Likewise.
728         (s390_legitimate_constant_p): Likewise.
729         (s390_cannot_force_const_mem): Likewise.
730         (legitimate_reload_constant_p): Likewise.
731         (s390_preferred_reload_class): Likewise.
732         (legitimize_pic_address): Likewise.
733         (legitimize_tls_address): Likewise.
734         (s390_split_branches): Removed.
735         (s390_add_execute): Removed.
736         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
737         (s390_mainpool_start): Likewise.
738         (s390_mainpool_finish): Likewise.
739         (s390_mainpool_cancel): Removed.
740         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
741         (s390_chunkify_cancel): Likewise.
742         (s390_return_addr_rtx): Likewise.
743         (s390_register_info): Remove split_branches_pending_p uages.
744         (s390_optimize_register_info): Likewise.
745         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
746         split_branches_pending_p usages.
747         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
748         (s390_load_got): Likewise.
749         (s390_expand_split_stack_prologue): Likewise.
750         (output_asm_nops): Likewise.
751         (s390_function_profiler): Likewise.
752         (s390_emit_call): Likewise.
753         (s390_conditional_register_usage): Likewise.
754         (s390_optimize_prologue): Likewise.
755         (s390_reorg): Remove TARGET_CPU_ZARCH and
756         split_branches_pending_p usages.
757         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
758         usages.
759         (s390_output_indirect_thunk_function): Likewise.
760         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
761         (TARGET_CPU_ZARCH_P): Removed.
762         (struct machine_function): Remove split_branches_pending_p.
763         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
765 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
767         * common/config/s390/s390-common.c (processor_flags_table):
768         Remove flags.
769         * config.gcc: Remove with_arch/with_tune support.
770         * config/s390/2064.md: Remove cpu attribute comparisons.
771         * config/s390/driver-native.c (s390_host_detect_local_cpu):
772         Remove MTN.
773         * config/s390/linux.h (ASM_SPEC):
774         Remove -march support.
775         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
776         Use a table to get an arch level.
777         * config/s390/s390-opts.h (enum processor_type):
778         Remove enum values.
779         * config/s390/s390.c
780         (processor_table): Remove entries, add arch_level values.
781         (s390_issue_rate): Remove cases.
782         (s390_option_override): Adjust
783         s390_option_override_internal() call.
784         (s390_option_override_internal): Remove deprecation warning.
785         (s390_valid_target_attribute_tree): Adjust
786         s390_option_override_internal() call.
787         * config/s390/s390.h (struct s390_processor):
788         Share with s390-c.c, add arch_level field.
789         * config/s390/s390.md:
790         Remove occurrences in cpu attribute.
791         * config/s390/s390.opt: Remove -march/-mtune support.
792         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
793         * doc/invoke.texi: Remove deprecation warning.
795 2018-08-08  Luis Machado  <luis.machado@linaro.org>
797         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
798         global.
799         (qdf24xx_tunings): Set vector cost structure to
800         qdf24xx_vector_cost.
802         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
803         <register_sextend>: Set to 3.
805 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
807         PR target/86838
808         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
809         * config/aarch64/aarch64-simd.md
810         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
811         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
812         (aarch64_frecpx<mode>): ...this new pattern.
813         * config/aarch64/aarch64-simd-builtins.def: Remove comment
814         about aarch64_frecp<FRECP:frecp_suffix><mode>.
816 2018-08-07  Martin Liska  <mliska@suse.cz>
818         PR middle-end/83023
819         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
820         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
821         * predict.def (PRED_MALLOC_NONNULL): New predictor.
822         * doc/extend.texi: Document that malloc attribute adds
823         hit to compiler.
825 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
827         PR target/86785
828         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
829         Define to speculation_safe_value_not_needed.
831 2018-08-06  Jeff Law  <law@redhat.com>
833         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
834         the vr_values instance to cprop_into_stmt.
835         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
836         (cprop_operand): Also query EVRP to determine if OP is a constant.
838 2018-08-06  Nathan Sidwell  <nathan@acm.org>
840         * diagnostic.c (diagnostic_report_current_module): Reroll
841         included-at loop.  Translate text.
843 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
845         * function-tests.c (selftest::test_expansion_to_rtl): Call
846         free_after_compilation.
848 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
850         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
852 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
854         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
855         loops with memory block operations from getting unrolled.
857 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
859         PR target/86807
860         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
861         Define to speculation_safe_value_not_needed.
863 2018-08-06  Jeff Law  <law@redhat.com>
865         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
866         assert.
868 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
870         PR target/86662
871         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
872         with all enabled __intN types.
874         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
876 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
878         * alias.c (record_set): Check for clobber high.
879         * cfgexpand.c (expand_gimple_stmt): Likewise.
880         * combine-stack-adj.c (single_set_for_csa): Likewise.
881         * combine.c (find_single_use_1): Likewise.
882         (set_nonzero_bits_and_sign_copies): Likewise.
883         (get_combine_src_dest): Likewise.
884         (is_parallel_of_n_reg_sets): Likewise.
885         (try_combine): Likewise.
886         (record_dead_and_set_regs_1): Likewise.
887         (reg_dead_at_p_1): Likewise.
888         (reg_dead_at_p): Likewise.
889         * dce.c (deletable_insn_p): Likewise.
890         (mark_nonreg_stores_1): Likewise.
891         (mark_nonreg_stores_2): Likewise.
892         * df-scan.c (df_find_hard_reg_defs): Likewise.
893         (df_uses_record): Likewise.
894         (df_get_call_refs): Likewise.
895         * dwarf2out.c (mem_loc_descriptor): Likewise.
896         * haifa-sched.c (haifa_classify_rtx): Likewise.
897         * ira-build.c (create_insn_allocnos): Likewise.
898         * ira-costs.c (scan_one_insn): Likewise.
899         * ira.c (equiv_init_movable_p): Likewise.
900         (rtx_moveable_p): Likewise.
901         (interesting_dest_for_shprep): Likewise.
902         * jump.c (mark_jump_label_1): Likewise.
903         * postreload-gcse.c (record_opr_changes): Likewise.
904         * postreload.c (reload_cse_simplify): Likewise.
905         (struct reg_use): Add source expr.
906         (reload_combine): Check for clobber high.
907         (reload_combine_note_use): Likewise.
908         (reload_cse_move2add): Likewise.
909         (move2add_note_store): Likewise.
910         * print-rtl.c (print_pattern): Likewise.
911         * recog.c (decode_asm_operands): Likewise.
912         (store_data_bypass_p): Likewise.
913         (if_test_bypass_p): Likewise.
914         * regcprop.c (kill_clobbered_value): Likewise.
915         (kill_set_value): Likewise.
916         * reginfo.c (reg_scan_mark_refs): Likewise.
917         * reload1.c (maybe_fix_stack_asms): Likewise.
918         (eliminate_regs_1): Likewise.
919         (elimination_effects): Likewise.
920         (mark_not_eliminable): Likewise.
921         (scan_paradoxical_subregs): Likewise.
922         (forget_old_reloads_1): Likewise.
923         * reorg.c (find_end_label): Likewise.
924         (try_merge_delay_insns): Likewise.
925         (redundant_insn): Likewise.
926         (own_thread_p): Likewise.
927         (fill_simple_delay_slots): Likewise.
928         (fill_slots_from_thread): Likewise.
929         (dbr_schedule): Likewise.
930         * resource.c (update_live_status): Likewise.
931         (mark_referenced_resources): Likewise.
932         (mark_set_resources): Likewise.
933         * rtl.c (copy_rtx): Likewise.
934         * rtlanal.c (reg_referenced_p): Likewise.
935         (single_set_2): Likewise.
936         (noop_move_p): Likewise.
937         (note_stores): Likewise.
938         * sched-deps.c (sched_analyze_reg): Likewise.
939         (sched_analyze_insn): Likewise.
941 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
943         * cse.c (invalidate_reg): New function extracted from...
944         (invalidate): ...here.
945         (canonicalize_insn): Check for clobber high.
946         (invalidate_from_clobbers): invalidate clobber highs.
947         (invalidate_from_sets_and_clobbers): Likewise.
948         (count_reg_usage): Check for clobber high.
949         (insn_live_p): Likewise.
950         * cselib.c (cselib_expand_value_rtx_1):Likewise.
951         (cselib_invalidate_regno): Check for clobber in setter.
952         (cselib_invalidate_rtx): Pass through setter.
953         (cselib_invalidate_rtx_note_stores):
954         (cselib_process_insn): Check for clobber high.
955         * cselib.h (cselib_invalidate_rtx): Add operand.
957 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
959         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
960         (mark_not_eliminable): Likewise.
961         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
962         * lra-lives.c (process_bb_lives): Check for clobber high.
963         * lra.c (new_insn_reg): Remember clobber highs.
964         (collect_non_operand_hard_regs): Check for clobber high.
965         (lra_set_insn_recog_data): Likewise.
966         (add_regs_to_insn_regno_info): Likewise.
967         (lra_update_insn_regno_info): Likewise.
969 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
971         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
972         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
974 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
976         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
977         (copy_insn_1): Likewise.
978         (gen_hard_reg_clobber_high): New gen function.
979         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
980         * genemit.c (gen_exp): Likewise.
981         (gen_emit_seq): Pass through info.
982         (gen_insn): Check for CLOBBER_HIGH.
983         (gen_expand): Pass through info.
984         (gen_split): Likewise.
985         (output_add_clobbers): Likewise.
986         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
987         (remove_clobbers): Likewise.
988         * rtl.h (gen_hard_reg_clobber_high): New declaration.
990 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
992         * doc/rtl.texi (clobber_high): Add.
993         (parallel): Add in clobber high
994         * rtl.c (rtl_check_failed_code3): Add function.
995         * rtl.def (CLOBBER_HIGH): Add expression.
996         * rtl.h (RTL_CHECKC3): Add macro.
997         (rtl_check_failed_code3): Add declaration.
998         (XC3EXP): Add macro.
1000 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
1002         PR target/86386
1003         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
1004         cfun->machine->max_used_stack_alignment if needed.
1006 2018-08-04  Martin Sebor  <msebor@redhat.com>
1008         PR tree-optimization/86571
1009         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
1010         NaN output to 4.
1012 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1014         PR target/86799
1015         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1016         Define.
1018 2018-08-03  Jeff Law  <law@redhat.com>
1020         PR target/86795
1021         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1022         Define to speculation_safe_value_not_needed.
1024 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
1026         * doc/gcov.texi (-x): Remove duplicate "to".
1027         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
1028         (-Wif-not-aligned): Remove duplicate "is".
1029         (-flto): Remove duplicate "the".
1030         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
1031         duplicate "v5.00.b".
1032         (MSP430 Options): Remove duplicate "and" from the description
1033         of "-mgprel-sec=regexp".
1034         (x86 Options): Remove duplicate copies of "vmldLog102" and
1035         vmlsLog104 from description of "-mveclibabi=type".
1037 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
1039         * internal-fn.h (first_commutative_argument): Declare.
1040         * internal-fn.c (first_commutative_argument): New function.
1041         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
1042         restrictions for pattern statements.  Use first_commutative_argument
1043         to look for commutative operands in calls to internal functions.
1045 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
1047         * Makefile.in (wide-int-range.o): New.
1048         * tree-vrp.c: Move all the wide_int_* functions to...
1049         * wide-int-range.cc: ...here.
1050         * tree-vrp.h: Move all the wide_int_* prototypes to...
1051         * wide-int-range.h: ...here.
1053 2018-08-03  Tom de Vries  <tdevries@suse.de>
1055         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
1056         UI_NONE.
1057         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
1058         * except.c (output_function_exception_table): Do early exit if
1059         targetm_common.except_unwind_info (&global_options) == UI_NONE.
1061 2018-08-03  Martin Liska  <mliska@suse.cz>
1063         * predict.c (dump_prediction): Change to 2 digits
1064         in fraction part.
1066 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
1068         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
1069         neon_dup_q to...
1070         (falkor_am_1_gtov_gtov): ... a new insn reservation.
1072 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
1074         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
1075         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
1076         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
1077         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
1078         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
1080 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1082         * diagnostic-show-locus.c (diagnostic_show_locus): Use
1083         pp_take_prefix when saving the existing prefix.
1084         * diagnostic.c (diagnostic_append_note): Likewise.
1085         * langhooks.c (lhd_print_error_function): Likewise.
1086         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
1087         param's type.  Free the existing prefix.
1088         (pp_take_prefix): New function.
1089         (pretty_printer::pretty_printer): Drop the prefix parameter.
1090         Rename the length parameter to match the comment.
1091         (pretty_printer::~pretty_printer): Free the prefix.
1092         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
1093         parameter.
1094         (struct pretty_printer): Drop the "const" from "prefix" field's
1095         type and clarify memory management.
1096         (pp_set_prefix): Drop the "const" from the 2nd param.
1097         (pp_take_prefix): New decl.
1099 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1101         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
1102         for word_mode_ok here instead of passing as argument.
1103         (expand_block_compare): Change select_block_compare_mode() call.
1104         (expand_strncmp_gpr_sequence): New function.
1105         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
1107 2018-08-02  Jeff Law  <law@redhat.com>
1109         PR target/86790
1110         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1111         Define to speculation_safe_value_not_needed.
1113         PR target/86784
1114         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1115         Define to speculation_safe_value_not_needed.
1117 2018-08-02  Tom de Vries  <tdevries@suse.de>
1119         PR target/86660
1120         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1121         function.  Return UI_TARGET unconditionally.
1122         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1123         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1125 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1127         * genemit.c (print_overload_test): Fix typo.
1129 2018-08-02  Richard Biener  <rguenther@suse.de>
1131         PR tree-optimization/86816
1132         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1133         which checks for value availability before querying it.
1134         (gvn_uses_equal): Use it.
1135         (same_succ_hash): Likewise.
1136         (gimple_equal_p): Likewise.
1138 2018-08-02  Nick Clifton  <nickc@redhat.com>
1140         PR target/86813
1141         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1142         Define to speculation_safe_value_not_needed.
1144         PR target/86810
1145         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1146         Define to speculation_safe_value_not_needed.
1148         PR target/86810
1149         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1150         Define to speculation_safe_value_not_needed.
1152         PR target/86803
1153         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1154         Define to speculation_safe_value_not_needed.
1156         PR target/86797
1157         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1158         Define to speculation_safe_value_not_needed.
1160         PR target/86791
1161         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1162         Define to speculation_safe_value_not_needed.
1164         PR target/86789
1165         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1166         Define to speculation_safe_value_not_needed.
1168         PR target/86787
1169         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1170         Define to speculation_safe_value_not_needed.
1172         PR target/86782
1173         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1174         speculation_safe_value_not_needed.
1176         PR target/86781
1177         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1178         to speculation_safe_value_not_needed.
1180 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1182         * doc/md.texi: Expand the documentation of instruction names
1183         to mention port-local uses.  Document '@' in pattern names.
1184         * read-md.h (overloaded_instance, overloaded_name): New structs.
1185         (mapping): Declare.
1186         (md_reader::handle_overloaded_name): New member function.
1187         (md_reader::get_overloads): Likewise.
1188         (md_reader::m_first_overload): New member variable.
1189         (md_reader::m_next_overload_ptr): Likewise.
1190         (md_reader::m_overloads_htab): Likewise.
1191         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1192         m_next_overload_ptr and m_overloads_htab.
1193         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1194         (get_mode_token, get_code_token, get_int_token): New functions.
1195         (map_attr_string): Add an optional argument that passes back
1196         the associated iterator.
1197         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1198         (md_reader::handle_overloaded_name, add_overload_instance): New
1199         functions.
1200         (apply_iterators): Handle '@' names.  Report an error if '@'
1201         is used without iterators.
1202         (initialize_iterators): Initialize the new iterator_group fields.
1203         * genopinit.c (handle_overloaded_code_for)
1204         (handle_overloaded_gen): New functions.
1205         (main): Use them to print declarations of maybe_code_for_* and
1206         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1207         * genemit.c (print_overload_arguments, print_overload_test)
1208         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1209         (main): Use it to print definitions of maybe_code_for_* and
1210         maybe_gen_* functions.
1211         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1212         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1213         instead of explicit mode checks.
1214         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1215         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1216         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1217         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1218         (aarch64_expand_compare_and_swap): Likewise
1219         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1220         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1221         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1222         (aarch64_constant_pool_reload_icode): Delete.
1223         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1224         instead of aarch64_constant_pool_reload_icode.  Use
1225         code_for_aarch64_reload_mov instead of explicit mode checks.
1226         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1227         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1228         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1229         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1230         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1231         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1232         (aarch64_atomic_load_op_code): Delete.
1233         (aarch64_emit_atomic_load_op): Likewise.
1234         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1235         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1236         instead of aarch64_emit_atomic_load_op.
1237         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1238         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1239         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1240         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1241         character before the pattern name.
1242         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1243         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1244         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1245         (aarch64_frecps<mode>): Likewise.
1246         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1247         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1248         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1249         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1250         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1252 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1254         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1255         Allow HFmode constants if TARGET_FP_F16INST.
1257 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1259         PR target/86014
1260         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1261         No longer check last store for clobber of address register.
1263 2018-08-02  Martin Liska  <mliska@suse.cz>
1265         PR gcov-profile/86817
1266         * gcov.c (process_all_functions): New function.
1267         (main): Call it.
1268         (process_file): Move functions processing to
1269         process_all_functions.
1271 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1273         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1274         "const" to the "gimple *" and "rtx_insn *" parameters.
1275         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1276         Likewise.
1277         (dump_location_t::dump_location_t): Likewise.
1279 2018-08-01  Martin Sebor  <msebor@redhat.com>
1281         PR tree-optimization/86650
1282         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1283         rather than a "gcall *".  Directly pass the data of interest
1284         to percent_K_format, rather than building a temporary CALL_EXPR
1285         to hold it.
1286         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1287         (gimple_fold_builtin_strncat): Adjust.
1288         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1289         gcall* argument with gimple*.
1290         * gimple-ssa-warn-restrict.c (check_call): Same.
1291         (wrestrict_dom_walker::before_dom_children): Same.
1292         (builtin_access::builtin_access): Same.
1293         (check_bounds_or_overlap): Same
1294         (maybe_diag_overlap): Same.
1295         (maybe_diag_offset_bounds): Same.
1296         * tree-diagnostic.c (default_tree_printer): Move usage of
1297         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1298         to this callsite.
1299         * tree-pretty-print.c (percent_K_format): Add argument.
1300         * tree-pretty-print.h: Add argument.
1301         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1302         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1303         (maybe_diag_stxncpy_trunc): Same.
1304         (handle_builtin_stxncpy): Same.
1305         (handle_builtin_strcat): Same.
1307 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1309         * match.pd: Optimise pointer range checks.
1311 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1313         PR tree-optimization/86758
1314         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1315         to remove pattern statements.
1317 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1319         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1320         result of dfs_enumerate_from when constructing stmt_vec_infos,
1321         instead of additionally calling get_loop_body.
1323 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1325         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1326         parameter.
1327         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1328         When creating an iv, assert that the step is not known to be zero.
1329         (vect_setup_realignment): Update call accordingly.
1330         * tree-vect-stmts.c (vectorizable_store): Likewise.
1331         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1333 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1335         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1336         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1337         (vectorizable_reduction): Likewise.
1338         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1339         (vect_detect_hybrid_slp_stmts): Likewise.
1340         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1342 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1344         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1345         (wide_int_set_zero_nonzero_bits): ...this.
1346         (zero_nonzero_bits_from_vr): Rename to...
1347         (vrp_set_zero_nonzero_bits): ...this.
1348         (extract_range_from_multiplicative_op_1): Abstract wide int
1349         code...
1350         (wide_int_range_multiplicative_op): ...here.
1351         (extract_range_from_binary_expr_1): Extract wide int binary
1352         operations into their own functions.
1353         (wide_int_range_lshift): New.
1354         (wide_int_range_can_optimize_bit_op): New.
1355         (wide_int_range_shift_undefined_p): New.
1356         (wide_int_range_bit_xor): New.
1357         (wide_int_range_bit_ior): New.
1358         (wide_int_range_bit_and): New.
1359         (wide_int_range_trunc_mod): New.
1360         (extract_range_into_wide_ints): New.
1361         (vrp_shift_undefined_p): New.
1362         (extract_range_from_multiplicative_op): New.
1363         (vrp_can_optimize_bit_op): New.
1364         * tree-vrp.h (value_range::dump): New.
1365         (wide_int_range_multiplicative_op): New.
1366         (wide_int_range_lshift):New.
1367         (wide_int_range_shift_undefined_p): New.
1368         (wide_int_range_bit_xor): New.
1369         (wide_int_range_bit_ior): New.
1370         (wide_int_range_bit_and): New.
1371         (wide_int_range_trunc_mod): New.
1372         (zero_nonzero_bits_from_bounds): Rename to...
1373         (wide_int_set_zero_nonzero_bits): ...this.
1374         (zero_nonzero_bits_from_vr): Rename to...
1375         (vrp_set_zero_nonzero_bits): ...this.
1376         (range_easy_mask_min_max): Rename to...
1377         (wide_int_range_can_optimize_bit_op): this.
1378         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1379         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1381 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1383         * tree-vectorizer.h (vect_orig_stmt): New function.
1384         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1385         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1386         (vect_create_epilog_for_reduction): Likewise.
1387         (vectorizable_live_operation): Likewise.
1388         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1389         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1390         * tree-vect-stmts.c (vectorizable_call): Likewise.
1391         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1393 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1395         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1396         argument.
1397         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1398         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1399         (vect_transform_loop): Likewise.
1400         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1402 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1404         * tree-vectorizer.h (vect_schedule_slp): Return void.
1405         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1406         (vect_schedule_slp): Likewise.
1408 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1410         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1411         argument.
1412         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1413         instances before the main loop, if any exist.
1415 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1417         PR tree-optimization/86749
1418         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1419         If the lhs is used in a COND_EXPR, check that it is being used
1420         as the "then" or "else" value.
1422 2018-08-01  Tom de Vries  <tdevries@suse.de>
1424         PR target/86800
1425         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1426         speculation_safe_value_not_needed.
1428 2018-08-01  Richard Biener  <rguenther@suse.de>
1430         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1431         as base and offset.
1433 2018-08-01  Martin Liska  <mliska@suse.cz>
1435         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1436         format how successful transformation is dumped.
1437         (gimple_mod_pow2_value_transform): Likewise.
1438         (gimple_mod_subtract_transform): Likewise.
1439         (gimple_stringops_transform): Likewise.
1441 2018-08-01  Martin Liska  <mliska@suse.cz>
1443         PR value-prof/35543
1444         * value-prof.c (interesting_stringop_to_profile_p):
1445         Simplify the code and add BUILT_IN_MEMMOVE.
1446         (gimple_stringops_transform): Likewise.
1448 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1450         * config/aarch64/aarch64-simd.md
1451         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1452         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1453         use GPI iterator instead of SI mode.
1455 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1457         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1458         rs6000_speculation_barrier.
1459         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1460         new barrier pattern name.
1462 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1464         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1465         (speculation_barrier): New insn.
1467 2018-08-01  Richard Biener  <rguenther@suse.de>
1469         PR bootstrap/86724
1470         * graphite.h: Include isl/id.h and isl/space.h to allow build
1471         with ISL 0.20.
1473 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1475         PR target/86651
1476         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1477         mode for COFF targets.
1478         * defaults.h (TARGET_COFF): Define.
1479         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1480         TARGET_COFF): Define.
1481         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1482         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1483         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1485 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1487         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1488         * gimple-streamer-out.c (output_bb): Save it.
1489         * lto-streamer-in.c (input_struct_function_base): Restore
1490         instance discriminator if available.  Create map on demand.
1491         * lto-streamer-out.c (output_struct_function_base): Save it if
1492         available.
1493         * final.c (decl_to_instance_map): Document LTO strategy.
1495 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1496             Olivier Hainque  <hainque@adacore.com>
1498         * debug.h (decl_to_instance_map_t): New type.
1499         (decl_to_instance_map): Declare.
1500         (maybe_create_decl_to_instance_map): New inline function.
1501         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1502         to track basic block discriminators.
1503         (final_start_function_1): Initialize them.
1504         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1505         bb_discriminator.
1506         (decl_to_instance_map): New variable.
1507         (map_decl_to_instance, maybe_set_discriminator): New functions.
1508         (notice_source_line): Set discriminator.
1510 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1512         * targhooks.c (default_have_speculation_safe_value): Add
1513         ATTRIBUTE_UNUSED.
1515 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1517         * dump-context.h: Include "pretty-print.h".
1518         (dump_context::refresh_dumps_are_enabled): New decl.
1519         (dump_context::emit_item): New decl.
1520         (class dump_context): Add fields "m_test_pp" and
1521         "m_test_pp_flags".
1522         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1523         (temp_dump_context::get_dumped_text): New decl.
1524         (class temp_dump_context): Add field "m_pp".
1525         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1526         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1527         m_test_pp.
1528         (set_dump_file): Update for above change.
1529         (set_alt_dump_file): Likewise.
1530         (dump_loc): New overload, taking a pretty_printer *.
1531         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1532         to any test pretty-printer.
1533         (make_item_for_dump_gimple_stmt): New function, adapted from
1534         optinfo::add_gimple_stmt.
1535         (dump_context::dump_gimple_stmt): Call it, and use the result,
1536         eliminating the direct usage of dump_file and alt_dump_file in
1537         favor of indirectly using them via emit_item.
1538         (make_item_for_dump_gimple_expr): New function, adapted from
1539         optinfo::add_gimple_expr.
1540         (dump_context::dump_gimple_expr): Call it, and use the result,
1541         eliminating the direct usage of dump_file and alt_dump_file in
1542         favor of indirectly using them via emit_item.
1543         (make_item_for_dump_generic_expr): New function, adapted from
1544         optinfo::add_tree.
1545         (dump_context::dump_generic_expr): Call it, and use the result,
1546         eliminating the direct usage of dump_file and alt_dump_file in
1547         favor of indirectly using them via emit_item.
1548         (make_item_for_dump_printf_va): New function, adapted from
1549         optinfo::add_printf_va.
1550         (make_item_for_dump_printf): New function.
1551         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1552         and use the result, eliminating the direct usage of dump_file and
1553         alt_dump_file in favor of indirectly using them via emit_item.
1554         (make_item_for_dump_dec): New function.
1555         (dump_context::dump_dec): Call it, and use the result,
1556         eliminating the direct usage of dump_file and alt_dump_file in
1557         favor of indirectly using them via emit_item.
1558         (make_item_for_dump_symtab_node): New function, adapted from
1559         optinfo::add_symtab_node.
1560         (dump_context::dump_symtab_node): Call it, and use the result,
1561         eliminating the direct usage of dump_file and alt_dump_file in
1562         favor of indirectly using them via emit_item.
1563         (dump_context::begin_scope): Reimplement, avoiding direct usage
1564         of dump_file and alt_dump_file in favor of indirectly using them
1565         via emit_item.
1566         (dump_context::emit_item): New member function.
1567         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1568         Set up test pretty-printer on the underlying context.  Call
1569         refresh_dumps_are_enabled.
1570         (temp_dump_context::~temp_dump_context): Call
1571         refresh_dumps_are_enabled.
1572         (temp_dump_context::get_dumped_text): New member function.
1573         (selftest::verify_dumped_text): New function.
1574         (ASSERT_DUMPED_TEXT_EQ): New macro.
1575         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1576         and then without optinfo enabled.  Add uses of
1577         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1578         * dumpfile.h: Update comment for the dump_* API.
1579         * optinfo-emit-json.cc
1580         (selftest::test_building_json_from_dump_calls): Update for new
1581         param for temp_dump_context ctor.
1582         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1583         and "m_owned" field.
1584         (optinfo_item::~optinfo_item): Likewise.
1585         (optinfo::add_item): New member function.
1586         (optinfo::emit): Update comment.
1587         (optinfo::add_string): Delete.
1588         (optinfo::add_printf): Delete.
1589         (optinfo::add_printf_va): Delete.
1590         (optinfo::add_gimple_stmt): Delete.
1591         (optinfo::add_gimple_expr): Delete.
1592         (optinfo::add_tree): Delete.
1593         (optinfo::add_symtab_node): Delete.
1594         (optinfo::add_dec): Delete.
1595         * optinfo.h (class dump_context): New forward decl.
1596         (optinfo::add_item): New decl.
1597         (optinfo::add_string): Delete.
1598         (optinfo::add_printf): Delete.
1599         (optinfo::add_printf_va): Delete.
1600         (optinfo::add_gimple_stmt): Delete.
1601         (optinfo::add_gimple_expr): Delete.
1602         (optinfo::add_tree): Delete.
1603         (optinfo::add_symtab_node): Delete.
1604         (optinfo::add_dec): Delete.
1605         (optinfo::add_poly_int): Delete.
1606         (optinfo_item::optinfo_item): Remove "owned" param.
1607         (class optinfo_item): Remove field "m_owned".
1609 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1611         PR middle-end/86705
1612         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1613         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1614         requested variable alignment.
1615         (expand_one_ssa_partition): Likewise.
1616         (expand_one_var): Likewise.
1618 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1620         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1621         to speculation_safe_value_not_needed.
1623 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1625         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1626         * targhooks.c (speculation_safe_value_not_needed): New function.
1627         * target.def (have_speculation_safe_value): Update documentation.
1628         * doc/tm.texi: Regenerated.
1630 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1632         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1633         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1634         expand.
1635         (despeculate_copy<ALLI:mode>_insn): New insn.
1636         (despeculate_copyti_insn): New insn.
1637         (despeculate_simple<ALLI:mode>): New insn
1638         (despeculate_simpleti): New insn.
1639         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1640         function.
1641         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1642         aarch64_speculation_safe_value.
1643         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1645 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1647         * config/aarch64/aarch64-speculation.cc: New file.
1648         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1649         before pass_reorder_blocks.
1650         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1651         prototype.
1652         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1653         X14 and X15 when tracking speculation.
1654         * config/aarch64/aarch64.md (register name constants): Add
1655         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1656         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1657         (speculation_barrier): New insn attribute.
1658         (cmp<mode>): Allow SP in comparisons.
1659         (speculation_tracker): New insn.
1660         (speculation_barrier): Add speculation_barrier attribute.
1661         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1662         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1663         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1665 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1667         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1668         aarch64_track_speculation is true.
1669         (tb<optab><mode>1): Likewise.
1670         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1671         generate CB[N]Z when tracking speculation.
1672         (aarch64_split_compare_and_swap): Likewise.
1673         (aarch64_split_atomic_op): Likewise.
1675 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1677         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1679 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1681         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1682         (speculation_barrier): New insn.
1684 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1686         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1687         * config/arm/arm.md (speculation_barrier): New expand.
1688         (speculation_barrier_insn): New pattern.
1690 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1692         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1693         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1694         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1695         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1696         list.
1697         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1698         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1699         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1700         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1701         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1702         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1703         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1704         * builtins.c (expand_speculation_safe_value): New function.
1705         (expand_builtin): Call it.
1706         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1707         * doc/extend.texi: Document __builtin_speculation_safe_value.
1708         * doc/md.texi: Document "speculation_barrier" pattern.
1709         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1710         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1711         * doc/tm.texi: Regenerated.
1712         * target.def (have_speculation_safe_value, speculation_safe_value): New
1713         hooks.
1714         * targhooks.c (default_have_speculation_safe_value): New function.
1715         (default_speculation_safe_value): New function.
1716         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1717         (default_speculation_safe_value): Add prototype.
1719 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1721         * dump-context.h (dump_context::dump_loc): New decl.
1722         * dumpfile.c (dump_context::dump_loc): New member function.
1723         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1724         and dump_gimple_stmt.
1725         (dump_context::dump_gimple_expr_loc): Likewise, using
1726         dump_gimple_expr.
1727         (dump_context::dump_generic_expr_loc): Likewise, using
1728         dump_generic_expr.
1729         (dump_context::dump_printf_loc_va): Likewise, using
1730         dump_printf_va.
1731         (dump_context::begin_scope): Explicitly using the global function
1732         "dump_loc", rather than the member function.
1734 2018-07-31  Martin Sebor  <msebor@redhat.com>
1736         PR tree-optimization/86741
1737         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1739 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1741         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1742         depend on whether prefetch instructions will be emitted or not.
1743         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1744         will be emitted or not.
1745         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1746         (TARGET_SETMEM_PFD): New macros.
1748 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1750         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1751         (NULL_STMT_VEC_INFO): Delete.
1752         (stmt_vec_info::operator*): Likewise.
1753         (stmt_vec_info::operator gimple *): Likewise.
1754         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1755         of NULL_STMT_VEC_INFO.
1756         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1757         (vect_reassociating_reduction_p): Likewise.
1758         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1759         (vectorizable_store): Likewise.
1760         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1761         (vec_info::free_stmt_vec_infos): Likewise.
1763 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1765         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1766         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1768 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1770         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1771         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1772         (vec_info::free_stmt_vec_info): New private member functions.
1773         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1774         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1775         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1776         set_stmt_vec_info_vec and free_stmt_vec_infos.
1777         * tree-vect-loop.c (_loop_vec_info): Remove call to
1778         set_stmt_vec_info_vec.
1779         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1780         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1781         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1782         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1783         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1784         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1785         with the clearing in the xcalloc.
1786         (stmt_vec_info_vec): Delete.
1787         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1788         (vectorize_loops): Likewise.
1789         (vec_info::~vec_info): Remove argument from call to
1790         free_stmt_vec_infos.
1791         (vec_info::add_stmt): Remove vinfo argument from call to
1792         new_stmt_vec_info.
1794 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1796         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1797         rather than a gimple stmt.
1798         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1799         information for pattern statements when passed the original
1800         statement; instead wait to be passed the pattern statement itself.
1801         Don't call set_vinfo_for_stmt here.
1802         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1803         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1804         stmt_vec_infos here.
1805         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1806         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1807         stmt_vec_infos entry.
1809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1811         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1812         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1813         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1814         * tree-vect-stmts.c (vectorizable_call): Likewise.
1815         (vectorizable_simd_clone_call): Likewise.
1817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1819         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1820         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1821         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1822         * tree-vect-loop.c (vect_transform_loop): Likewise.
1823         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1824         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1826 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1828         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1829         (vect_dr_stmt): Delete.
1830         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1831         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1832         of DR_VECT_AUX.
1833         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1834         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1835         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1836         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1837         (vect_analyze_data_refs): Likewise.
1838         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1839         argument.
1840         (vect_find_same_alignment_drs): Likewise.
1841         (vect_slp_analyze_node_dependences): Update calls accordingly.
1842         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1843         instead of DR_VECT_AUX.
1844         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1845         of a vector data references.  Use vec_info::lookup_dr instead of
1846         DR_VECT_AUX.
1847         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1848         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1849         instead of DR_VECT_AUX.
1851 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1853         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1854         dr_vec_info.
1855         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1856         accordingly.
1857         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1858         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1859         (vect_gen_prolog_loop_niters): Likewise.
1861 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1863         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1864         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1865         (vect_known_alignment_in_bytes, vect_dr_behavior)
1866         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1867         instead of data_references.  Update calls to other routines for
1868         which the same change has been made.
1869         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1870         dr_vec_infos instead of stmt_vec_infos.
1871         (vect_analyze_data_ref_dependence): Update call accordingly.
1872         (vect_slp_analyze_data_ref_dependence)
1873         (vect_record_base_alignments): Use DR_VECT_AUX.
1874         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1875         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1876         (vector_alignment_reachable_p, vect_get_data_access_cost)
1877         (vect_peeling_supportable, vect_analyze_group_access_1)
1878         (vect_analyze_group_access, vect_analyze_data_ref_access)
1879         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1880         (vect_compile_time_alias, vect_small_gap_p)
1881         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1882         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1883         instead of data_references.  Update calls to other routines for
1884         which the same change has been made.
1885         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1886         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1887         (vect_slp_analyze_and_verify_node_alignment)
1888         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1889         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1890         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1891         above changes.
1892         (_vect_peel_info::dr): Replace with...
1893         (_vect_peel_info::dr_info): ...this new field.
1894         (vect_peeling_hash_get_most_frequent)
1895         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1896         (vect_peeling_hash_get_lowest_cost):
1897         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1898         routines for which the same change has been made.
1899         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1900         data_reference.
1901         * tree-vect-loop-manip.c (get_misalign_in_elems)
1902         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1903         above changes.
1904         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1905         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1906         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1907         (get_group_load_store_type, get_negative_load_store_type)
1908         (vect_get_data_ptr_increment, vectorizable_store)
1909         (vectorizable_load): Likewise.
1910         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1911         Update calls to other routines for which the same change has been made.
1913 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1915         * tree-vectorizer.h (vec_info::move_dr): New member function.
1916         (dataref_aux): Rename to...
1917         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1918         (_stmt_vec_info::dr_aux): Update accordingly.
1919         (_stmt_vec_info::data_ref_info): Delete.
1920         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1921         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1922         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1923         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1924         of data_ref.
1925         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1926         (STMT_VINFO_DR_INFO): New macro.
1927         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1928         (set_dr_misalignment): Update after rename of dataref_aux.
1929         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1930         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1931         initialization of STMT_VINFO_DATA_REF.
1932         * tree-vectorizer.c (vec_info::move_dr): New function.
1933         * tree-vect-patterns.c (vect_recog_bool_pattern)
1934         (vect_recog_mask_conversion_pattern)
1935         (vect_recog_gather_scatter_pattern): Use it.
1936         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1937         the "dr" and "stmt" fields of dr_vec_info instead of
1938         STMT_VINFO_DATA_REF.
1940 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1942         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1943         (is_pattern_stmt_p): Use it.
1944         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1945         on pattern statements.
1947 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1949         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1950         original stmt as a stmt_vec_info rather than a gimple stmt.
1951         (vect_pattern_recog_1): Take the statement directly as a
1952         stmt_vec_info, rather than via a gimple_stmt_iterator.
1953         Update call to vect_mark_pattern_stmts.
1954         (vect_pattern_recog): Update calls accordingly.
1956 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1958         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1959         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1960         a vect_def_type for the first argument.
1961         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1962         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1963         operand if it isn't defined by a vectorized statement.
1964         (vect_build_gather_load_calls): Remove the mask_dt argument and
1965         update calls to vect_get_vec_def_for_stmt_copy.
1966         (vectorizable_bswap): Likewise the dt argument.
1967         (vectorizable_call): Update calls to vectorizable_bswap and
1968         vect_get_vec_def_for_stmt_copy.
1969         (vectorizable_simd_clone_call, vectorizable_assignment)
1970         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1971         (vectorizable_comparison): Update calls to
1972         vect_get_vec_def_for_stmt_copy.
1973         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1974         vect_is_simple_use.
1975         (vect_get_loop_based_defs): Remove dt argument and update call
1976         to vect_get_vec_def_for_stmt_copy.
1977         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1978         and vect_get_vec_def_for_stmt_copy.
1979         (vectorizable_load): Update calls to vect_build_gather_load_calls
1980         and vect_get_vec_def_for_stmt_copy.
1981         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1982         (vectorizable_reduction, vectorizable_live_operation): Update calls
1983         to vect_get_vec_def_for_stmt_copy.
1985 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1987         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1988         and gimple stmt arguments with a stmt_vec_info.
1989         (vect_record_base_alignments): Update calls accordingly.
1990         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1991         and gimple stmt arguments with a stmt_vec_info.
1992         (vect_build_slp_tree_1): Remove vinfo argument and update call
1993         to vect_record_max_nunits.
1994         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1995         and vect_record_max_nunits.
1997 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1999         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
2000         file and take a stmt_vec_info instead of a gimple stmt.
2001         (supportable_widening_operation, vect_finish_replace_stmt)
2002         (vect_finish_stmt_generation, vect_get_store_rhs)
2003         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
2004         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
2005         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
2006         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
2007         (vect_create_data_ref_ptr, bump_vector_ptr)
2008         (vect_permute_store_chain, vect_setup_realignment)
2009         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
2010         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
2011         (vectorizable_reduction, vectorizable_induction)
2012         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
2013         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
2014         than gimple stmts as arguments.
2015         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
2016         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
2017         (can_group_stmts_p, vect_check_gather_scatter)
2018         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
2019         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
2020         (vect_permute_load_chain, vect_shift_permute_load_chain)
2021         (vect_transform_grouped_load)
2022         (vect_record_grouped_load_vectors): Likewise.
2023         * tree-vect-loop.c (vect_fixup_reduc_chain)
2024         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
2025         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
2026         (vectorizable_reduction, vectorizable_induction)
2027         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
2028         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
2029         (vect_get_load_store_mask): Likewise.
2030         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
2031         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
2032         * tree-vect-stmts.c (vect_mark_relevant)
2033         (is_simple_and_all_uses_invariant)
2034         (exist_non_indexing_operands_for_use_p, process_use)
2035         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
2036         (vect_get_vec_def_for_operand, vect_get_vec_defs)
2037         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
2038         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
2039         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
2040         (get_negative_load_store_type, get_load_store_type)
2041         (vect_check_load_store_mask, vect_check_store_rhs)
2042         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
2043         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2044         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2045         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2046         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
2047         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
2048         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
2049         (supportable_widening_operation): Likewise.
2051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2053         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
2054         a stmt_vec_info instead of a gcall.
2055         (vect_check_gather_scatter): Update call accordingly.
2056         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
2057         of a gphi.
2058         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
2059         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
2060         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
2061         instead of a gimple stmt.
2062         (vect_transform_loop): Update calls accordingly.
2063         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
2064         stmt_vec_infos instead of gimple stmts.
2065         (vect_analyze_slp_instance): Update use accordingly.
2066         * tree-vect-stmts.c (read_vector_array, write_vector_array)
2067         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
2068         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
2069         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
2070         (vect_gen_widened_results_half, vect_get_loop_based_defs)
2071         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
2072         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
2073         down to subroutines.
2075 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2077         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
2078         of the worklist from a vector of gimple stmts to a vector of
2079         stmt_vec_infos.
2080         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2081         (vect_mark_stmts_to_be_vectorized): Likewise
2083 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2085         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
2086         statement before passing it to vect_analyze_stmt.
2087         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
2088         the chain of phi vector definitions.  Track the exit phi via its
2089         stmt_vec_info.
2090         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
2091         STMT_VINFO_REDUC_DEF.
2092         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
2093         stmt_vec_infos to handle the statement chains.
2094         (vect_get_slp_defs): Record the first statement in the node
2095         using a stmt_vec_info.
2096         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
2097         statements here and pass their stmt_vec_info down to subroutines.
2098         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
2099         down to vect_finish_stmt_generation.
2100         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
2101         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
2102         stmt_vec_infos to subroutines.
2103         (vect_remove_stores): Use stmt_vec_infos to handle the statement
2104         chains.
2106 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2108         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
2109         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
2110         (vect_permute_store_chain, vect_setup_realignment)
2111         (vect_permute_load_chain, vect_shift_permute_load_chain)
2112         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
2113         stmts internally, and when passing values to other vectorizer routines.
2114         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2115         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2116         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2117         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2118         (vectorizable_reduction, vectorizable_induction)
2119         (vectorizable_live_operation, vect_transform_loop_stmt)
2120         (vect_transform_loop): Likewise.
2121         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2122         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2123         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2124         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2125         (vect_slp_analyze_node_operations_1): Likewise.
2126         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2127         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2128         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2129         (vect_finish_stmt_generation_1, get_group_load_store_type)
2130         (get_load_store_type, vect_build_gather_load_calls)
2131         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2132         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2133         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2134         (vectorizable_store, vectorizable_load, vectorizable_condition)
2135         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2136         (supportable_widening_operation): Likewise.
2137         (vect_get_vector_types_for_stmt): Likewise.
2138         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2140 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2142         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2143         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2144         (vect_permute_store_chain, vect_permute_load_chain)
2145         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2146         repeated stmt_vec_info lookups.
2147         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2148         (vect_update_ivs_after_vectorizer): Likewise.
2149         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2150         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2151         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2152         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2153         (vect_bb_slp_scalar_cost): Likewise.
2154         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2156 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2158         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2159         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2160         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2161         to get gassigns and gcalls, rather than operating on generc gimple
2162         stmts.
2163         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2164         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2165         (vectorizable_load, vect_analyze_stmt): Likewise.
2166         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2168 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2170         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2171         return stmt_vec_infos rather than gimple stmts.  Do not accept
2172         null arguments.
2173         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2174         of a gimple stmt.
2175         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2176         Update use of get_later_stmt.
2177         (vect_get_constant_vectors): Update call accordingly.
2178         (vect_schedule_slp_instance): Likewise
2179         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2180         (vect_slp_analyze_instance_dependence): Likewise.
2181         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2183 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2185         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2186         (stmt_info_for_cost::stmt_info): ...this new field.
2187         (add_stmt_costs): Update accordingly.
2188         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2189         (vect_get_known_peeling_cost): Likewise.
2190         (vect_estimate_min_profitable_iters): Likewise.
2191         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2193 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2195         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2196         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2197         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2198         accordingly.
2199         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2201 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2203         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2204         a gimple stmt to a stmt_vec_info.
2205         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2207 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2209         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2210         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2211         (_loop_vec_info::reduction_chains): Likewise.
2212         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2213         accordingly.
2214         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2216 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2218         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2219         a gimple stmt to a stmt_vec_info.
2220         (_stmt_vec_info::next_element): Likewise.
2221         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2222         (vect_slp_analyze_and_verify_node_alignment)
2223         (vect_analyze_group_access_1, vect_analyze_group_access)
2224         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2225         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2226         (vect_supportable_dr_alignment): Update accordingly.
2227         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2228         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2229         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2230         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2231         * tree-vect-slp.c (vect_build_slp_tree_1)
2232         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2233         (vect_split_slp_store_group, vect_analyze_slp_instance)
2234         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2235         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2236         (get_group_load_store_type, get_load_store_type)
2237         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2238         (vect_transform_stmt, vect_remove_stores): Likewise.
2240 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2242         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2243         than a gimple stmt.
2244         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2245         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2246         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2247         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2248         (vector_alignment_reachable_p, vect_get_data_access_cost)
2249         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2250         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2251         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2252         (vect_analyze_group_access_1, vect_analyze_group_access)
2253         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2254         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2255         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2256         result of vect_dr_stmt and use the stmt_vec_info instead of
2257         the associated gimple stmt.
2258         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2259         (vect_gen_prolog_loop_niters): Likewise.
2260         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2264         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2265         to a vec<stmt_vec_info>.
2266         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2267         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2268         vec<stmt_vec_info>.
2269         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2270         to a vec<stmt_vec_info>.
2271         (bst_traits::value_type, bst_traits::value_type): Likewise.
2272         (bst_traits::hash): Update accordingly.
2273         (vect_get_and_check_slp_defs): Change the stmts parameter from
2274         a vec<gimple *> to a vec<stmt_vec_info>.
2275         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2276         (vect_build_slp_tree): Likewise.
2277         (vect_build_slp_tree_2): Likewise.  Update uses of
2278         SLP_TREE_SCALAR_STMTS.
2279         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2280         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2281         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2282         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2283         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2284         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2285         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2286         (vect_get_constant_vectors, vect_get_slp_defs)
2287         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2288         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2289         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2290         instead of gimple stmts.
2291         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2292         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2293         (vect_slp_analyze_instance_dependence): Update uses of
2294         SLP_TREE_SCALAR_STMTS.
2295         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2296         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2297         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2298         (get_initial_defs_for_reduction): Likewise.
2299         (vect_create_epilog_for_reduction): Likewise.
2300         (vectorize_fold_left_reduction): Likewise.
2301         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2302         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2303         (can_vectorize_live_stmts): Likewise.
2305 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2307         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2308         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2309         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2310         than gimple stmts.
2311         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2312         of a gimple stmt.
2313         (gather_scalar_reductions): Update after above interface changes.
2314         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2315         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2316         than gimple stmts.
2317         (vect_force_simple_reduction): Likewise.
2318         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2319         LOOP_VINFO_REDUCTIONS.
2320         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2322 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2324         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2325         a gimple stmt to a stmt_vec_info.
2326         * tree-vect-loop.c (vect_active_double_reduction_p)
2327         (vect_force_simple_reduction, vectorizable_reduction): Update
2328         accordingly.
2330 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2332         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2333         vec<gimple *> to a vec<stmt_vec_info>.
2334         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2335         the reduction_phis argument from a vec<gimple *> to a
2336         vec<stmt_vec_info>.
2337         (vectorizable_reduction): Likewise the phis local variable that
2338         is passed to vect_create_epilog_for_reduction.  Update for new type
2339         of SLP_TREE_VEC_STMTS.
2340         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2341         (vectorizable_live_operation): Likewise.
2342         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2343         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2345 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2347         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2348         a gimple stmt to a stmt_vec_info.
2349         (vectorizable_condition, vectorizable_live_operation)
2350         (vectorizable_reduction, vectorizable_induction): Pass back the
2351         vectorized statement as a stmt_vec_info.
2352         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2353         use of STMT_VINFO_VEC_STMT.
2354         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2355         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2356         as stmt_vec_infos rather than gimple stmts.
2357         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2358         to a stmt_vec_info.
2359         (vectorizable_live_operation): Likewise.
2360         (vectorizable_reduction, vectorizable_induction): Likewise,
2361         updating use of STMT_VINFO_VEC_STMT.
2362         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2363         of STMT_VINFO_VEC_STMT.
2364         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2365         (vectorizable_simd_clone_call, vectorizable_conversion)
2366         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2367         (vectorizable_store, vectorizable_load, vectorizable_condition)
2368         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2369         from a gimple stmt to a stmt_vec_info.
2370         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2371         pointer to a stmt_vec_info to the vectorizable_* routines.
2373 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2375         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2376         a gimple stmt to a stmt_vec_info.
2377         (is_pattern_stmt_p): Update accordingly.
2378         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2379         (vect_record_grouped_load_vectors): Likewise.
2380         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2381         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2382         (vect_model_reduction_cost): Likewise.
2383         (vect_create_epilog_for_reduction): Likewise.
2384         (vectorizable_reduction, vectorizable_induction): Likewise.
2385         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2386         Return the stmt_vec_info for the pattern statement.
2387         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2388         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2389         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2390         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2391         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2392         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2393         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2394         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2398         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2399         (vect_finish_stmt_generation): Likewise.
2400         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2401         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2402         (vect_build_gather_load_calls): Use the return value of the above
2403         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2404         scopes for the input gimple stmt and wider scopes for the associated
2405         stmt_vec_info.  Use vec_info::lookup_def when setting these
2406         stmt_vec_infos from an SSA_NAME definition.
2407         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2408         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2409         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2410         (vectorizable_store, vectorizable_load, vectorizable_condition)
2411         (vectorizable_comparison): Likewise.
2412         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2413         (vectorizable_reduction): Likewise.
2415 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2417         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2418         stmt_vec_info * parameter before the optional gimple **.
2419         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2420         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2421         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2422         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2423         (vectorizable_live_operation): Likewise.
2424         * tree-vect-patterns.c (type_conversion_p): Likewise.
2425         (vect_look_through_possible_promotion): Likewise.
2426         (vect_recog_rotate_pattern): Likewise.
2427         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2429 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2431         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2432         a typedef to a wrapper class.
2433         (NULL_STMT_VEC_INFO): New macro.
2434         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2435         (stmt_vec_info::operator*): New function.
2436         (stmt_vec_info::operator gimple *): Likewise.
2437         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2438         (add_stmt_costs): Likewise.
2439         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2440         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2441         (vect_get_known_peeling_cost): Likewise.
2442         (vect_estimate_min_profitable_iters): Likewise.
2443         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2444         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2445         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2446         (vectorizable_store, free_stmt_vec_infos): Likewise.
2447         (new_stmt_vec_info): Change return type of xcalloc to
2448         _stmt_vec_info *.
2450 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2452         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2453         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2454         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2455         a single_imm_use-based sequence.
2456         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2458 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2460         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2461         * tree-vectorizer.c (vec_info::lookup_def): New function.
2462         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2463         (vect_widened_op_tree): Likewise.
2464         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2465         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2466         (vectorizable_reduction): Likewise.
2467         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2468         of a gimple *.
2469         (vect_is_slp_reduction): Update calls accordingly.  Use
2470         vec_info::lookup_def.
2471         (vect_is_simple_reduction): Likewise
2472         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2474 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2476         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2477         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2478         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2479         of vinfo_for_stmt.
2480         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2481         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2482         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2483         (vect_is_slp_reduction, vectorizable_induction)
2484         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2485         * tree-vect-patterns.c (vect_init_pattern_stmt):
2486         (vect_determine_min_output_precision_1, vect_determine_precisions)
2487         (vect_pattern_recog): Likewise.
2488         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2489         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2490         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2491         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2492         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2493         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2494         info field from a loop to a loop_vec_info.
2496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2498         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2499         (vec_info::add_stmt): Declare.
2500         * tree-vectorizer.c (vec_info::add_stmt): New function.
2501         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2502         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2503         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2504         (vectorizable_induction): Likewise.
2505         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2506         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2507         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2508         (vectorizable_load): Likewise.
2509         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2510         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2511         (vect_recog_gather_scatter_pattern): Likewise.
2512         (append_pattern_def_seq): Likewise.  Remove a check that is
2513         performed by add_stmt itself.
2515 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2517         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2518         which make_ssa_name was called with new_stmt before new_stmt
2519         had been created.
2521 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2523         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2524         split out from...
2525         (vect_is_slp_reduction): ...here...
2526         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2527         that are already known to be false.
2529 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2531         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2532         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2533         STMT_VINFO_NUM_SLP_USES when it's true.
2534         (vect_free_slp_instance): Add a final_p parameter and pass it to
2535         vect_free_slp_tree.
2536         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2537         (vect_analyze_slp_instance): Likewise.
2538         (vect_slp_analyze_operations): Likewise.
2539         (vect_slp_analyze_bb_1): Likewise.
2540         * tree-vectorizer.c (vec_info): Likewise.
2541         * tree-vect-loop.c (vect_transform_loop): Likewise.
2543 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2545         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2546         function is not called for second and subsequent members of
2547         a reduction group.
2549 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2551         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2552         cases for nested loops from here to ...
2553         (vect_create_epilog_for_reduction): ...here.  Only call
2554         vect_is_simple_use for inner-loop reductions.
2556 2018-07-31  Martin Liska  <mliska@suse.cz>
2558         PR gcov-profile/85338
2559         PR gcov-profile/85350
2560         PR gcov-profile/85372
2561         * profile.c (struct location_triplet): New.
2562         (struct location_triplet_hash): Likewise.
2563         (output_location): Do not output a BB that
2564         is already recorded for a line.
2565         (branch_prob): Use streamed_locations.
2567 2018-07-31  Martin Liska  <mliska@suse.cz>
2569         PR gcov-profile/85370
2570         * coverage.c (coverage_begin_function): Do not mark target
2571         clones as artificial functions.
2573 2018-07-31  Martin Liska  <mliska@suse.cz>
2575         PR gcov-profile/83813
2576         PR gcov-profile/84758
2577         PR gcov-profile/85217
2578         PR gcov-profile/85332
2579         * profile.c (branch_prob): Do not record GOTO expressions
2580         for GIMPLE statements which locations are already streamed.
2582 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2584         * gcc.c (handle_spec_function): Accept a soft_matched_part
2585         argument, as do_spec_1.  Pass it down to ...
2586         (eval_spec_function): Accept a soft_matched_part argument,
2587         and pass it down to ...
2588         (do_spec_2): Accept a soft_matched_part argument, and pass
2589         it down to do_spec_1.
2590         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2591         (handle_braces): Update call to handle_spec_function.
2592         (driver::set_up_specs): Update calls to do_spec_2.
2593         (compare_debug_dump_opt_spec_function): Likewise.
2594         (compare_debug_self_opt_spec_function): Likewise.
2596 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2598         * common.opt (nolibc): New option.
2599         * doc/invoke.texi (Link Options): Document it.
2600         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2601         * config/alpha/linux.h: Likewise.
2602         * config/arc/elf.h: Likewise.
2603         * config/arm/uclinux-elf.h: Likewise.
2604         * config/arm/unknown-elf.h: Likewise.
2605         * config/avr/avrlibc.h: Likewise.
2606         * config/bfin/bfin.h: Likewise.
2607         * config/bfin/linux.h: Likewise.
2608         * config/bfin/uclinux.h: Likewise.
2609         * config/darwin.h: Likewise.
2610         * config/darwin10.h: Likewise.
2611         * config/darwin12.h: Likewise.
2612         * config/gnu-user.h: Likewise.
2613         * config/lm32/uclinux-elf.h: Likewise.
2614         * config/pa/pa-hpux11.h: Likewise.
2615         * config/pa/pa64-hpux.h: Likewise.
2616         * config/sparc/sparc.h: Likewise.
2618 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2620         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2621         undefined variables.
2623 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2625         PR target/86640
2626         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2627         instead of GEN_INT.
2629 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2631         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2632         terminated string literal.
2634 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2636         PR rtl-optimization/85160
2637         * combine.c (is_just_move): New function.
2638         (try_combine): Allow combining two instructions into two if neither of
2639         the original instructions was a move.
2641 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2643         PR target/86673
2644         * doc/extend.texi (Global Register Variables): Discourage use of type
2645         qualifiers.
2646         (Local Register Variables): Likewise.
2648 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2650         PR tree-optimization/86506
2651         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2653 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2655         PR target/86547
2656         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2657         hard_regno, make sure no insn between `from` and `to` clobbers it.
2659 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2660             Tom de Vries  <tdevries@suse.de>
2662         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2663         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2664         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2665         PTX_DEFAULT_RUNTIME_DIM.
2666         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2668 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2670         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2671         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2672         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2674 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2676         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2677         used.
2678         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2679         predicate to reflect toc fusion has been deleted.
2680         (toc_fusion_mem_raw): Delete, no longer used.
2681         (toc_fusion_mem_wrapped): Likewise.
2682         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2683         fusion mask bit.
2684         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2685         Delete, no longer used.
2686         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2687         meant to be used for toc fusion.
2688         (rs6000_debug_print_mode): Delete toc fusion debugging.
2689         (rs6000_debug_reg_global): Likewise.
2690         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2691         fusion and secondary reload support that were never used.
2692         (rs6000_option_override_internal): Delete TOC fusion, that was only
2693         partially defined, and it did not work unless you also used the
2694         -mcmodel= switch.
2695         (rs6000_legitimate_address_p): Delete TOC fusion support.
2696         (rs6000_opt_masks): Likewise.
2697         (fusion_wrap_memory_address): Delete function, no longer used.
2698         (fusion_split_address); Delete TOC fusion support.
2699         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2700         longer used with toc fusion being deleted.
2701         (TARGET_TOC_FUSION_FP): Likewise.
2702         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2703         UNSPEC.
2704         (toc fusion spliter): Delete TOC fusion support.
2705         (toc_fusionload_<mode>): Likewise.
2706         (toc_fusionload_di): Likewise.
2707         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2708         longer needs to be named.  Rename predicate to delete TOC fusion.
2709         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2710         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2711         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2712         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2713         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2715 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2717         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2718         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2719         __int128 in built-in function prototypes.
2720         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2721         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2723 2018-07-27  Martin Sebor  <msebor@redhat.com>
2725         PR tree-optimization/86696
2726         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2727         types, including enums.
2728         (handle_char_store): Be prepared for the above function to fail.
2730 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2732         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2733         when optimization level is lower than 2 or optimize for size.
2735 2018-07-26  Martin Sebor  <msebor@redhat.com>
2737         PR tree-optimization/86043
2738         PR tree-optimization/86042
2739         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2740         (get_string_cst_length): Rename...
2741         (get_min_string_length): ...to this.  Add argument.
2742         (handle_char_store): Extend to handle multi-character stores by
2743         MEM_REF.
2744         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2745         * tree.h (initializer_zerop): Add argument.
2747 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2749         PR middle-end/86660
2750         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2751         declare target to variables if they have always,{to,from,tofrom} map
2752         kinds.
2754 2018-07-26  Martin Liska  <mliska@suse.cz>
2756         PR lto/86548
2757         * lto-wrapper.c: Add linker_output as prefix
2758         for ltrans_output_file.
2760 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2762         PR rtl-optimization/85805
2763         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2764         value for hard registers if that was written in the same mode.
2766 2018-07-26  Martin Liska  <mliska@suse.cz>
2768         PR gcov-profile/86536
2769         * gcov.c (format_gcov): Use printf format %.*f directly
2770         and do not handle special values.
2772 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2774         * common/config/arc/arc-common.c (arc_option_optimization_table):
2775         Update default optimizations for size.
2777 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2779         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2780         * config/arc/constraints.md (CfZ): New constraint.
2781         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2782         (subsf3_fpu): Likewise.
2783         (cmpsf_fpu): Likewise.
2784         (cmpsf_fpu_uneq): Likewise.
2786 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2788         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2789         accesses as well.
2790         (arc_is_uncached_mem_p): uncached applies to both the variable and
2791         the pointer.
2793 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2795         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2796         register names.
2798 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2800         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2801         field "m_scopes" from vec to auto_vec.
2803 2018-07-25  Martin Liska  <mliska@suse.cz>
2805         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2806         return type.
2808 2018-07-25  Richard Biener  <rguenther@suse.de>
2810         PR debug/86654
2811         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2812         special wrt context_die late.
2813         (gen_subprogram_die): Re-use DIEs in local scope.
2815 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2817         PR tree-optimization/86644
2818         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2820 2018-07-25  Martin Liska  <mliska@suse.cz>
2822         PR middle-end/86645
2823         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2824         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2826 2018-07-25  Martin Liska  <mliska@suse.cz>
2828         PR sanitizer/79635
2829         * params.def: Explain ASan abbreviation and provide
2830         a documentation link.
2832 2018-07-24  Martin Sebor  <msebor@redhat.com>
2834         PR tree-optimization/86622
2835         PR tree-optimization/86532
2836         * builtins.h (string_length): Declare.
2837         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2838         (check_access): Be prepared for non-constant length ranges.
2839         (string_length): Make extern.
2840         * expr.c (string_constant): Only handle the minor non-constant
2841         array index.  Use string_constant to compute the length of
2842         a generic string constant.
2844 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2846         PR tree-optimization/86618
2847         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2848         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2850 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2852         PR tree-optimization/86636
2853         * json.cc (json::object::set): Fix comment.  Add assertions.
2854         (json::array::append): Move here from json.h.  Add comment and an
2855         assertion.
2856         (json::string::string): Likewise.
2857         * json.h (json::array::append): Move to json.cc.
2858         (json::string::string): Likewise.
2859         * optinfo-emit-json.cc
2860         (optrecord_json_writer::impl_location_to_json): Assert that we
2861         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2862         wrapper around it.  Expand the location once, rather than three
2863         times.
2864         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2865         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2866         wrappers.
2867         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2868         places.  Fix some overlong lines.
2870 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2872         * config/aarch64/aarch64-simd.md
2873         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2874         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2875         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2876         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2877         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2878         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2879         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2880         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2881         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2883 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2885         PR middle-end/86627
2886         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2887         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2888         and abs_d == d, do the power of two handling if profitable.
2890 2018-07-24  Richard Biener  <rguenther@suse.de>
2892         * match.pd: Add BIT_FIELD_REF canonicalizations.
2894 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2896         PR c/86617
2897         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2899 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2901         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2902         terminated STRING_CST object.
2904 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2906         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2908 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2910         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2911         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2912         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2913         the elements into a register.
2914         (rs6000_split_v4si_init_di_reg): Delete.
2915         (rs6000_split_v4si_init): Delete.
2916         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2917         (vsx_init_v4si): Rewrite as a define_expand.
2919 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2921         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2922         zero_extend argument from memory): New.
2924 2018-07-22  Martin Sebor  <msebor@redhat.com>
2926         PR bootstrap/86621
2927         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2928         diagnosing calls with unknown arguments unless -Walloca-larger-than
2929         is restricted to less than PTRDIFF_MAX bytes.
2931 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2933         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2935 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2937         * pretty-print.c (text_info::set_location): Remove redundant
2938         "line_table" parameter from call to rich_location::set_range.
2940 2018-07-20  Martin Sebor  <msebor@redhat.com>
2942         PR middle-end/82063
2943         * builtins.c (expand_builtin_alloca): Adjust.
2944         * calls.c (alloc_max_size): Simplify.
2945         * cgraphunit.c (cgraph_node::expand): Adjust.
2946         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2947         variables.
2948         (frame_larger_than_size): Same.
2949         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2950         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2951         Initialize.
2952         * doc/invoke.texi (GCC Command Options): Document option arguments.
2953         Explain byte-size arguments and suffixes.
2954         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2955         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2956         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2957         * doc/options.texi (UInteger): Expand.
2958         (Host_Wide_Int, ByteSize): Document new properties.
2959         * final.c (final_start_function_1): Include sizes in an error message.
2960         * function.c (frame_offset_overflow): Same.
2961         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2962         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2963         Diagnose unbounded alloca calls only for limits of less than
2964         PTRDIFF_MAX.
2965         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2966         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2967         for alloca(0).
2968         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2969         only for limits of less than PTRDIFF_MAX.
2970         * langhooks-def.h (lhd_handle_option): Change function argument
2971         to HOST_WIDE_INT.
2972         * langhooks.c (lhd_handle_option): Same.
2973         * langhooks.h (handle_option): Same.
2974         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2975         ByteSize flags.
2976         (var_type, var_type_struct): Same.
2977         (var_set): Handle ByteSize flag.
2978         * optc-gen.awk: Add comments to output to ease debugging.  Make
2979         use of HOST_WIDE_INT where appropriate.
2980         * opts-gen-save.awk:  Use %lx to format unsigned long.
2981         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2982         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2983         arguments.  Parse bytes-size suffixes.
2984         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2985         (enum_value_to_arg): Same.
2986         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2987         (handle_option): Adjust.
2988         (generate_option): Change function argument to HOST_WIDE_INT.
2989         (cmdline_handle_error): Adjust.
2990         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2991         (set_option): Change function argument to HOST_WIDE_INT.
2992         (option_enabled): Handle cl_host_wide_int.
2993         (get_option_state): Handle CLVC_SIZE.
2994         (control_warning_option): Same.
2995         * opts.c (common_handle_option): Change function argument to
2996         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2997         OPT_Wvla_larger_than_.
2998         * opts.h (enum cl_var_type): Add an enumerator.
2999         * stor-layout.c (layout_decl): Print a more meaningful warning.
3000         * toplev.c (output_stack_usage): Adjust.
3002 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
3004         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
3005         call to inline_expand_builtin_string_cmp.
3006         (expand_builtin_strcmp): Likewise.
3007         (expand_builtin_strncmp): Likewise.
3008         (inline_string_cmp): Delete the last parameter, change char_type_node
3009         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
3010         two operands.
3011         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
3012         the inlining expansion on target where the type of the call has same or
3013         narrower precision than unsigned char.
3015 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3017         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
3018         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
3019         * common.opt (fsave-optimization-record): New option.
3020         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
3021         * doc/invoke.texi (-fsave-optimization-record): New option.
3022         * dumpfile.c: Include "optinfo-emit-json.h".
3023         (struct kv_pair): Move to coretypes.h.
3024         (optgroup_options): Make non-static.
3025         (dump_context::end_scope): Call
3026         optimization_records_maybe_pop_dump_scope.
3027         * dumpfile.h (optgroup_options): New decl.
3028         * json.cc: New file.
3029         * json.h: New file.
3030         * optinfo-emit-json.cc: New file.
3031         * optinfo-emit-json.h: New file.
3032         * optinfo.cc: Include "optinfo-emit-json.h".
3033         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
3034         (optinfo_enabled_p): Check optimization_records_enabled_p.
3035         (optinfo_wants_inlining_info_p): Likewise.
3036         * optinfo.h: Update comment.
3037         * profile-count.c (profile_quality_as_string): New function.
3038         * profile-count.h (profile_quality_as_string): New decl.
3039         (profile_count::quality): New accessor.
3040         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
3041         and optinfo_emit_json_cc_tests.
3042         * selftest.h (selftest::json_cc_tests): New decl.
3043         (selftest::optinfo_emit_json_cc_tests): New decl.
3044         * toplev.c: Include "optinfo-emit-json.h".
3045         (compile_file): Call optimization_records_finish.
3046         (do_compile): Call optimization_records_start.
3047         * tree-ssa-live.c: Include optinfo.h.
3048         (remove_unused_scope_block_p): Retain inlining information if
3049         optinfo_wants_inlining_info_p returns true.
3051 2018-07-20  Richard Biener  <rguenther@suse.de>
3053         PR debug/86585
3054         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
3055         to cover -flto-partition=none.
3057 2018-07-20  Martin Liska  <mliska@suse.cz>
3059         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
3060         (get_decl_source_range): Remove unused function.
3062 2018-07-20  Richard Biener  <rguenther@suse.de>
3064         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
3065         (struct vn_phi_s): Likewise.
3066         (struct vn_reference_s): Likewise.
3067         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
3068         for searching the slot of an entry known to be in the hash itself.
3069         (vn_phi_hasher::equal): Likewise.
3070         (vn_reference_hasher::equal): Likewise.
3071         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
3072         globals.
3073         (optimistic_info, current_info): Remove, keeping only valid_info.
3074         (vn_reference_lookup_1): Remove fallback lookup.
3075         (vn_reference_lookup_2): Likewise.
3076         (vn_nary_op_lookup_1): Likewise.
3077         (vn_phi_lookup): Likewise.
3078         (vn_nary_build_or_lookup_1): Make sure to not chain the built
3079         hash element.
3080         (vn_reference_insert): Adjust, chain the inserted hash element
3081         at last_inserted_ref.
3082         (vn_reference_insert_pieces): Likewise.
3083         (visit_reference_op_call): Likewise.
3084         (vn_nary_op_insert_into): Chain the inserted hash element at
3085         last_inserted_nary.
3086         (vn_nary_op_insert_pieces): Adjust.
3087         (vn_nary_op_insert): Likewise.
3088         (vn_nary_op_insert_stmt): Likewise.
3089         (vn_phi_insert): Adjust, chain the inserted hash element at
3090         last_inserted_phi.
3091         (process_scc): Remove clearing and copying the optimistic
3092         table.  Instead remove elements inserted during an optimistic
3093         iteration from the single table we maintain.
3094         (init_scc_vn): Adjust.
3095         (free_scc_vn): Likewise.
3096         (sccvn_dom_walker::record_cond): Likewise.
3097         (sccvn_dom_walker::after_dom_children): Likewise.
3099 2018-07-19  Martin Sebor  <msebor@redhat.com>
3101         PR tree-optimization/84047
3102         PR tree-optimization/83776
3103         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
3104         (check_array_bounds): Call it.
3106 2018-07-19  Martin Sebor  <msebor@redhat.com>
3108         * align.h (align_flags): Use member initialization.
3110 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
3112         * Makefile.in (OBJS): Add optinfo.o.
3113         * coretypes.h (class symtab_node): New forward decl.
3114         (struct cgraph_node): New forward decl.
3115         (class varpool_node): New forward decl.
3116         * dump-context.h: New file.
3117         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3118         "tree-pass.h".
3119         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3120         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3121         (set_alt_dump_file): Likewise.
3122         (dump_context::~dump_context): New dtor.
3123         (dump_gimple_stmt): Move implementation to...
3124         (dump_context::dump_gimple_stmt): ...this new member function.
3125         Add the stmt to any pending optinfo, creating one if need be.
3126         (dump_gimple_stmt_loc): Move implementation to...
3127         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3128         Start a new optinfo and add the stmt to it.
3129         (dump_gimple_expr): Move implementation to...
3130         (dump_context::dump_gimple_expr): ...this new member function.
3131         Add the stmt to any pending optinfo, creating one if need be.
3132         (dump_gimple_expr_loc): Move implementation to...
3133         (dump_context::dump_gimple_expr_loc): ...this new member function.
3134         Start a new optinfo and add the stmt to it.
3135         (dump_generic_expr): Move implementation to...
3136         (dump_context::dump_generic_expr): ...this new member function.
3137         Add the tree to any pending optinfo, creating one if need be.
3138         (dump_generic_expr_loc): Move implementation to...
3139         (dump_context::dump_generic_expr_loc): ...this new member
3140         function.  Add the tree to any pending optinfo, creating one if
3141         need be.
3142         (dump_printf): Move implementation to...
3143         (dump_context::dump_printf_va): ...this new member function.  Add
3144         the text to any pending optinfo, creating one if need be.
3145         (dump_printf_loc): Move implementation to...
3146         (dump_context::dump_printf_loc_va): ...this new member function.
3147         Start a new optinfo and add the stmt to it.
3148         (dump_dec): Move implementation to...
3149         (dump_context::dump_dec): ...this new member function.  Add the
3150         value to any pending optinfo, creating one if need be.
3151         (dump_context::dump_symtab_node): New member function.
3152         (dump_context::get_scope_depth): New member function.
3153         (dump_context::begin_scope): New member function.
3154         (dump_context::end_scope): New member function.
3155         (dump_context::ensure_pending_optinfo): New member function.
3156         (dump_context::begin_next_optinfo): New member function.
3157         (dump_context::end_any_optinfo): New member function.
3158         (dump_context::s_current): New global.
3159         (dump_context::s_default): New global.
3160         (dump_scope_depth): Delete global.
3161         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3162         (dump_symtab_node): New function.
3163         (get_dump_scope_depth): Reimplement in terms of dump_context.
3164         (dump_begin_scope): Likewise.
3165         (dump_end_scope): Likewise.
3166         (selftest::temp_dump_context::temp_dump_context): New ctor.
3167         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3168         (selftest::verify_item): New function.
3169         (ASSERT_IS_TEXT): New macro.
3170         (ASSERT_IS_TREE): New macro.
3171         (ASSERT_IS_GIMPLE): New macro.
3172         (selftest::test_capture_of_dump_calls): New test.
3173         (selftest::dumpfile_c_tests): Call it.
3174         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3175         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3176         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3177         descriptive comment.
3178         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3179         (dump_node, dump_bb): Move these unrelated decls.
3180         (class dump_manager): Add leading comment.
3181         * optinfo.cc: New file.
3182         * optinfo.h: New file.
3184 2018-07-19  Michael Collison  <michael.collison@arm.com>
3185             Richard Henderson <rth@redhat.com>
3187         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3188         (subti): Handle op1 zero.
3189         (subvti4, usub4ti4): New.
3190         (*sub<GPI>3_compare1_imm): New.
3191         (sub<GPI>3_carryinCV): New.
3192         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3193         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3195 2018-07-19  Michael Collison  <michael.collison@arm.com>
3196             Richard Henderson <rth@redhat.com>
3198         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3199         (addti3): Create simpler code if low part is already known to be 0.
3200         (addvti4, uaddvti4): New.
3201         (*add<GPI>3_compareC_cconly_imm): New.
3202         (*add<GPI>3_compareC_cconly): New.
3203         (*add<GPI>3_compareC_imm): New.
3204         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3205         handle constants within this pattern..
3206         (*add<GPI>3_compareV_cconly_imm): New.
3207         (*add<GPI>3_compareV_cconly): New.
3208         (*add<GPI>3_compareV_imm): New.
3209         (add<GPI>3_compareV): New.
3210         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3211         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3212         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3213         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3214         with 'comparison' operator.
3215         (*add<GPI>3_compareV_cconly_imm): Ditto.
3216         (*add<GPI>3_compareV_cconly): Ditto.
3217         (*add<GPI>3_compareV_imm): Ditto.
3218         (add<GPI>3_compareV): Ditto.
3219         (add<mode>3_carryinC): Ditto.
3220         (*add<mode>3_carryinC_zero): Ditto.
3221         (*add<mode>3_carryinC): Ditto.
3222         (add<mode>3_carryinV): Ditto.
3223         (*add<mode>3_carryinV_zero): Ditto.
3224         (*add<mode>3_carryinV): Ditto.
3226 2018-07-19  Michael Collison  <michael.collison@arm.com>
3227             Richard Henderson <rth@redhat.com>
3229         * config/aarch64/aarch64-modes.def (CC_V): New.
3230         * config/aarch64/aarch64-protos.h
3231         (aarch64_addti_scratch_regs): Declare
3232         (aarch64_subvti_scratch_regs): Declare.
3233         (aarch64_expand_subvti): Declare.
3234         (aarch64_gen_unlikely_cbranch): Declare
3235         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3236         for signed overflow using CC_Vmode.
3237         (aarch64_get_condition_code_1): Handle CC_Vmode.
3238         (aarch64_gen_unlikely_cbranch): New function.
3239         (aarch64_addti_scratch_regs): New function.
3240         (aarch64_subvti_scratch_regs): New function.
3241         (aarch64_expand_subvti): New function.
3243 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3245         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3246         extension.
3247         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3248         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3249         extension.
3251 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3253         PR target/83009
3254         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3255         address check not strict.
3257 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3259         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3260         Umq with Umn.
3261         (store_pair_lanes<mode>): Likewise.
3262         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3263         enum value 'ADDR_QUERY_LDP_STP_N'.
3264         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3265         (aarch64_print_address_internal): Add declaration.
3266         (aarch64_print_ldpstp_address): Remove.
3267         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3268         (aarch64_print_operand): Change printing of 'y'.
3269         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3270         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3271         'true' rather than '1'.
3272         * config/aarch64/constraints.md (Uml): Likewise.
3273         (Uml): Rename to Umn.
3274         (Umq): Remove.
3276 2018-07-19  Richard Biener  <rguenther@suse.de>
3278         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3279         a trailing array.
3280         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3281         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3282         (vn_reference_hasher): Likewise.
3283         (struct vn_tables_s): Remove obstack and alloc-pool members.
3284         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3285         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3286         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3287         (vn_reference_insert_pieces): Likewise.
3288         (alloc_vn_nary_op_noinit): Adjust.
3289         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3290         (vn_phi_eq): Adjust.
3291         (shared_lookup_phiargs): Remove.
3292         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3293         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3294         (visit_reference_op_call): Likewise.
3295         (copy_nary, copy_phi, copy_reference): Remove.
3296         (process_scc): Rewind the obstack when iterating.  Do not
3297         copy the elements to valid_info but just move them from one
3298         hashtable to the other.
3299         (allocate_vn_table): Adjust.
3300         (free_vn_table): Likewise.
3301         (init_scc_vn): Likewise.
3302         (free_scc_vn): Likewise.
3304 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3306         PR target/86560
3307         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3308         indirect_return as function type attribute.
3309         (ix86_attribute_table): Change indirect_return to function
3310         type attribute.
3311         * doc/extend.texi: Update indirect_return attribute.
3313 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3315         * wide-int.h (widest2_int): New.
3316         * gimple-fold.c (arith_overflowed_p): Use it.
3317         * tree.h (widest2_int_cst): New.
3318         * tree-vrp.c (wide_int_binop_overflow): Rename from
3319         vrp_int_const_binop.
3320         Rewrite to work on trees.
3321         (extract_range_from_multiplicative_op_1): Abstract code to...
3322         (wide_int_range_min_max): ...here.
3323         (wide_int_range_cross_product): ...and here.
3324         (extract_range_from_binary_expr_1): Abstract overflow code to...
3325         (wide_int_range_mult_wrapping): ...here.
3326         * tree-vrp.h (wide_int_range_cross_product): New.
3327         (wide_int_range_mult_wrapping): New.
3329 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3330             Julia Koval  <julia.koval@intel.com>
3332         * config/i386/x86-tune-costs.h (skylake_memcpy,
3333         skylake_memset): Replace rep_prefix with unrolling for size 512.
3335 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3337         PR middle-end/86544
3338         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3339         comparision with EQ_EXPR in last stmt.
3341 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3343         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3344         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3345         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3346         previously known as "PowerPC AltiVec Built-in Functions".  Move
3347         some material to new subsubsections "PowerPC AltiVec Built-in
3348         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3349         ISA 2.07".
3350         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3351         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3352         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3353         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3355 2018-07-18  Richard Biener  <rguenther@suse.de>
3357         PR tree-optimization/86557
3358         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3359         EXACT_DIV_EXPR.
3361 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3363         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3365 2018-07-17  Jeff Law  <law@redhat.com>
3367         * config/arm/arm.c (get_label_padding): Update for recent
3368         changes to label_to_alignment.
3370         PR tree-optimization/86010
3371         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3373         * config/mips/mips.c (vr4130_align_insns): Update for recent
3374         changes to label_to_alignment.
3376         * config/frv/frv.c (frv_label_align): Update for recent changes
3377         to label_to_alignment.
3379         * config/nios2/nios2.c (nios2_label_align): Update for recent
3380         changes which dropped ALIGN_LABELS_LOG.
3382 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3384         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3385         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3387 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3389         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3390         deprecated align_labels_log.
3392 2018-07-17  Richard Biener  <rguenther@suse.de>
3394         PR lto/86456
3395         * dwarf2out.c (init_sections_and_labels): Always generate
3396         a debug_line_str_section for early LTO debug.
3397         (dwarf2out_finish): Reset debug_line_str_hash output early.
3398         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3399         with fat LTO part.
3400         (dwarf2out_early_finish): Output debug_line_str.
3402 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3404         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3405         index register on z196 or later.
3407 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3409         * config/s390/s390.c (s390_default_align): Set default function
3410         alignment to 16.
3411         (s390_override_options_after_change): Call s390_default align.
3412         (s390_option_override_internal): Call s390_default_align.
3413         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3415 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3417         PR middle-end/86542
3418         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3419         to _looptemp_ clauses, other than the first two.
3421 2018-07-17  Martin Liska  <mliska@suse.cz>
3423         * opts.c: Do not enable OPT_falign_* for -Os.
3425 2018-07-17  Martin Liska  <mliska@suse.cz>
3427         * align.h (MAX_CODE_ALIGN): New.
3428         (MAX_CODE_ALIGN_VALUE): New.
3429         * common/config/i386/i386-common.c (ix86_handle_option):
3430         (MAX_CODE_ALIGN): Moved to align.h.
3431         * final.c (MAX_CODE_ALIGN): Likewise.
3432         * opts.c (parse_and_check_align_values):
3433         (MAX_CODE_ALIGN): Likewise.
3434         (MAX_CODE_ALIGN_VALUE): Likewise.
3436 2018-07-17  Martin Liska  <mliska@suse.cz>
3438         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3439         in order to fulfil coding style.
3440         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3441         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3442         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3443         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3444         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3445         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3446         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3447         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3448         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3450 2018-07-17  Martin Liska  <mliska@suse.cz>
3452         * align.h: New file.
3453         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3454         directly.
3455         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3456         align_flags of label_to_alignment.
3457         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3458         align_flags class.
3459         * config/m68k/m68k.c: Do not use removed align_labels_value and
3460         align_loops_value.
3461         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3462         (LOOP_ALIGN): Likewise.
3463         (LABEL_ALIGN): Likewise.
3464         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3465         Remove not used macro.
3466         (rs6000_loop_align): Change return type to align_flags.
3467         (rs6000_loop_align_max_skip): Remove.
3468         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3469         Change return type to align_flags.
3470         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3471         Remove not used macro.
3472         (rs6000_loop_align):  Change return type to align_flags.
3473         (rs6000_loop_align_max_skip): Remove.
3474         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3475         * config/rx/rx-protos.h (rx_align_for_label): Make it
3476         static function.
3477         * config/rx/rx.c (rx_align_for_label): Change return type
3478         to align_flags.
3479         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3480         macro definitions.
3481         into align_flags class.
3482         (LABEL_ALIGN): Likewise.
3483         (LOOP_ALIGN): Likewise.
3484         * config/s390/s390.c (s390_label_align): Use align_flags
3485         class member.
3486         (s390_asm_output_function_label): Likewise.
3487         * config/sh/sh.c (sh_override_options_after_change):
3488         Use align_flags class directly without macros.
3489         (find_barrier): Likewise.
3490         (barrier_align): Likewise.
3491         (sh_loop_align): Likewise.
3492         * config/spu/spu.c (spu_option_override):
3493         Use align_flags_tuple::get_value instead of removed macros.
3494         (spu_sched_init): Likewise.
3495         * config/spu/spu.h (GTY): Likewise.
3496         * config/visium/visium.c (visium_option_override):
3497         Set "8" as default secondary alignment.
3498         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3499         in order to guarantee secondary alignment of 8.
3500         * coretypes.h: Include align.h header file.
3501         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3502         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3503         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3504         * doc/tm.texi.in: Likewise.
3505         * final.c (struct label_alignment): Remove not used structure.
3506         (LABEL_ALIGN): Change type to align_flags.
3507         (LOOP_ALIGN): Likewise.
3508         (JUMP_ALIGN): Likewise.
3509         (default_loop_align_max_skip): Remove.
3510         (default_label_align_max_skip): Likewise.
3511         (default_jump_align_max_skip): Likewise.
3512         (default_label_align_after_barrier_max_skip):
3513         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3514         (LABEL_TO_MAX_SKIP): Remove.
3515         (label_to_alignment): Return align_flags type instead of integer.
3516         (label_to_max_skip): Remove.
3517         (align_fuzz): Use align_flags type.
3518         (compute_alignments): Use align_flags type and use align_flags::max
3519         to combine multiple alignments.
3520         (grow_label_align): Grow vec instead of C array.
3521         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3522         (shorten_branches):  Use align_flags type and use align_flags::max
3523         to combine multiple alignments.
3524         (final_scan_insn_1): Remove usage of secondary alignment that comes
3525         from label alignment, but instead use proper secondary alignment
3526         which is computed in grow_label_align.
3527         * flags.h (struct align_flags_tuple): Move to align.h.
3528         (struct align_flags): Likewise.
3529         (state_align_loops): Rename to align_loops.
3530         (state_align_jumps): Rename to align_jumps.
3531         (state_align_labels): Rename to align_labels.
3532         (state_align_functions): Rename to align_functions.
3533         (align_loops_log): Remove.
3534         (align_jumps_log): Remove.
3535         (align_labels_log): Remove.
3536         (align_functions_log): Remove.
3537         (align_loops_max_skip): Remove.
3538         (align_jumps_max_skip): Remove.
3539         (align_labels_max_skip): Remove.
3540         (align_functions_max_skip): Remove.
3541         (align_loops_value): Remove.
3542         (align_jumps_value): Remove.
3543         (align_labels_value): Remove.
3544         (align_functions_value): Remove.
3545         * output.h (label_to_alignment): Change return type to align_flags.
3546         (label_to_max_skip): Remove.
3547         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3548         jump_align_max_skip macros.
3549         * targhooks.h (default_loop_align_max_skip): Remove.
3550         (default_label_align_max_skip): Likewise.
3551         (default_jump_align_max_skip): Likewise.
3552         (default_label_align_after_barrier_max_skip): Remove.
3553         * toplev.c (read_log_maxskip): Use ::normalize function.
3554         (parse_N_M): Remove not used argument and also call ::normalize.
3555         (parse_alignment_opts): Do not pass unused arguments.
3556         * varasm.c (assemble_start_function): Use directly align_functions
3557         instead of removed macros.
3558         * system.h: Do not poison removed macros.
3560 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3562         PR middle-end/86539
3563         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3564         and cond temporaries don't have reference type if iterator has
3565         pointer type.  For init use &for_pre_body instead of pre_p if
3566         for_pre_body is non-empty.
3568 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3570         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3571         double-double modes to SFmode directly directly.
3572         (trunc<mode>sf2_fprs): Delete.
3574 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3576         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3577         for conversions between IFmode and the decimal floating point modes.
3578         (init_float128_ieee): Use the correct names for conversions between
3579         KFmode and the decimal floating point modes.
3581 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3583         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3584         for the conversions between TDmode and IFmode.
3585         (init_float128_ieee): Use more correct names for the conversions
3586         between TDmode and KFmode.
3588 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3590         PR tree-optimization/86526
3591         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3592         (inline_expand_builtin_string_cmp): Likewise.
3593         (inline_string_cmp): Likewise.  Use c_readstr instead of
3594         builtin_memcpy_read_str.  Add unit_mode temporary.
3596 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3598         PR middle-end/86528
3599         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3600         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3602 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3604         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3605         Alphabetize prototypes of built-in functions, separating out
3606         built-in functions that are listed in this section but should be
3607         described elsewhere.
3609 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3611         PR target/86511
3612         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3613         conditional move when trapping comparison was split to a
3614         non-trapping one (and vice versa).
3616 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3618         * config/s390/s390.c (s390_function_profiler): Generate nops
3619         instead of profiler call sequences.
3620         * config/s390/s390.opt: Add the new option.
3622 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3624         * config/s390/s390.c (s390_function_profiler): Generate
3625         __mcount_loc section.
3626         * config/s390/s390.opt: Add the new option.
3628 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3630         * common.opt: Add the new warning.
3631         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3632         %r0,__fentry__" when -mfentry is specified.
3633         (s390_option_override_internal): Disallow -mfentry for 31-bit
3634         CPUs.
3635         * config/s390/s390.opt: Add the new option.
3637 2018-07-16  Richard Biener  <rguenther@suse.de>
3639         PR lto/86523
3640         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3641         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3643 2018-07-16  Martin Liska  <mliska@suse.cz>
3645         PR ipa/86529
3646         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3647         to ::get_create.
3649 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3651         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3653 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3655         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3656         for ARCHS4x.
3657         * config/arc/arc-cpus.def (hs4x): New cpu.
3658         (hs4xd): Likewise.
3659         * config/arc/arc-tables.opt: Regenerate.
3660         * config/arc/arc.c (arc_sched_issue_rate): New function.
3661         (TARGET_SCHED_ISSUE_RATE): Define.
3662         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3663         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3664         fpu_cvt.
3665         (attr tune): Add ARCHS4x tune values.
3666         (attr tune_dspmpy): Define.
3667         (*tst): Correct instruction type.
3668         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3669         * config/arc/arcHS4x.md: New file.
3670         * config/arc/fpu.md: Update instruction type attributes.
3671         * config/arc/t-multilib: Regenerate.
3673 2018-07-16  Tom de Vries  <tdevries@suse.de>
3675         PR debug/86455
3676         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3678 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3680         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3681         early clobber.
3683 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3685         PR tree-optimization/86514
3686         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3687         conversion to a boolean type from a type with greater precision.
3689 2018-07-16  Tom de Vries  <tdevries@suse.de>
3691         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3692         dump_flags request TDF_SLIM.
3694 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3696         * fold-const.c (int_const_binop_1): Abstract...
3697         (wide_int_binop): ...wide int code here.
3698         (poly_int_binop): ...poly int code here.
3699         Abstract the rest of int_const_binop_1 into int_const_binop.
3700         * fold-const.h (wide_int_binop): New.
3701         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3702         Remove useless PLUS/MINUS_EXPR case.
3703         (zero_nonzero_bits_from_vr): Move wide int code...
3704         (zero_nonzero_bits_from_bounds): ...here.
3705         (extract_range_from_binary_expr_1): Move mask optimization code...
3706         (range_easy_mask_min_max): ...here.
3707         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3708         (range_easy_mask_min_max): New.
3710 2018-07-15  Jeff Law  <law@redhat.com>
3712         PR target/85993
3713         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3714         block.
3716 2018-07-14  Jim Wilson  <jimw@sifive.com>
3718         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3720 2018-07-14  Paul Koning  <ni1d@arrl.net>
3722         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3724 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3726         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3727         copying section.
3729 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3730             Steve Munroe  <munroesj52@gmail.com>
3732         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3733         (_mm_andnot_si128): Likewise.
3734         (_mm_or_si128): Likewise.
3735         (_mm_xor_si128): Likewise.
3737 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3739         PR middle-end/78809
3740         * builtins.c (expand_builtin_memcmp): Inline the calls first
3741         when result_eq is false.
3742         (expand_builtin_strcmp): Inline the calls first.
3743         (expand_builtin_strncmp): Likewise.
3744         (inline_string_cmp): New routine. Expand a string compare
3745         call by using a sequence of char comparison.
3746         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3747         a call to str(n)cmp/memcmp.
3748         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3749         New option.
3750         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3752 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3754         * config/arm/driver-arm.c: Include arm-native.h.
3755         (host_detect_local_cpu): Use auto-generated data tables.
3756         (vendors, arm_cpu_table): Delete.  Move part information to ...
3757         * config/arm/arm-cpus.in: ... here.
3758         * config/arm/parsecpu.awk (gen_native): New function.
3759         (vendor, part): New CPU fields.
3760         (END): Add support for building the native CPU detection tables.
3761         * config/arm/t-arm (arm-native.h): Add build rule.
3762         (driver-arm.o): Add dependency on arm-native.h.
3764 2018-07-13  Richard Biener  <rguenther@suse.de>
3766         PR middle-end/85974
3767         * match.pd (addr1 - addr2): Allow either of the operand to
3768         have a conversion.
3770 2018-07-13  Tom de Vries  <tdevries@suse.de>
3772         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3773         in remap_ssa_name.
3775 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3777         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3778         arrays instead of numbered variables.
3780 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3782         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3783         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3785 2018-07-13  Richard Biener  <rguenther@suse.de>
3787         PR debug/86452
3788         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3789         instead of get_context_die.
3791 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3792             Richard Biener  <rguenther@suse.de>
3794         PR middle-end/86489
3795         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3796         that the loop latch destination where phi is defined.
3798 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3800         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3801         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3802         (riscv_set_current_function): Extract getting interrupt type to new
3803         function.
3804         (riscv_get_interrupt_type): New function.
3805         (riscv_merge_decl_attributes): New function, checking interrupt type is
3806         same.
3807         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3809 2018-07-12  Paul Koning  <ni1d@arrl.net>
3811         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3812         directive.
3814 2018-07-12  Paul Koning  <ni1d@arrl.net>
3816         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3817         zero reference, add doloop_end instead.
3818         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3819         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3820         detail for doloop_end.
3822 2018-07-12  Martin Sebor  <msebor@redhat.com>
3824         PR c/86453
3825         * attribs.c (decl_attributes): Reject conflicting attributes before
3826         calling attribute handlers.
3828 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3830         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3831          parameter.
3832         (gcc::dump_manager::get_dump_file_name): likewise.
3833         (dump_begin): Likewise.
3834         * dumpfile.h (dump_begin): Update prototype.
3835         (gcc::dump_manager::get_dump_file_name,
3836         gcc::dump_manager::get_dump_file_name): Update prototype.
3838 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3840         * internal-fn.h (vectorizable_internal_fn_p): New function.
3841         * tree-vect-slp.c (compatible_calls_p): Likewise.
3842         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3843         to internal functions.
3844         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3846 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3848         * fold-const.h (inverse_conditions_p): Declare.
3849         * fold-const.c (inverse_conditions_p): New function.
3850         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3851         that test the inverse condition of a conditional internal function.
3852         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3853         * internal-fn.c (internal_fn_mask_index): Handle conditional
3854         internal functions.
3855         (vectorized_internal_fn_supported_p): New function.
3856         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3857         (any_pred_load_store): Replace with...
3858         (need_to_predicate): ...this new variable.
3859         (redundant_ssa_names): New variable.
3860         (ifcvt_can_use_mask_load_store): Move initial checks to...
3861         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3862         for which a conditional internal function exists.
3863         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3864         instead of ifcvt_can_use_mask_load_store.  Update after variable
3865         name change.
3866         (predicate_load_or_store): New function, split out from
3867         predicate_mem_writes.
3868         (check_redundant_cond_expr): New function.
3869         (value_available_p): Likewise.
3870         (predicate_rhs_code): Likewise.
3871         (predicate_mem_writes): Rename to...
3872         (predicate_statements): ...this.  Use predicate_load_or_store
3873         and predicate_rhs_code.
3874         (combine_blocks, tree_if_conversion): Update after above name changes.
3875         (ifcvt_local_dce): Handle redundant_ssa_names.
3876         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3877         general conditional functions.
3878         * tree-vect-stmts.c (vectorizable_call): Likewise.
3880 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3881             Alan Hayward  <alan.hayward@arm.com>
3882             David Sherwood  <david.sherwood@arm.com>
3884         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3885         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3886         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3887         plus and minus and convert them into IFN_COND_FMA-based sequences.
3888         (convert_mult_to_fma): Handle conditional plus and minus.
3890 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3892         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3893         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3894         (cond_fnms_optab): New optabs.
3895         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3896         internal functions.
3897         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3898         * internal-fn.h (get_conditional_internal_fn): Declare.
3899         (get_unconditional_internal_fn): Likewise.
3900         * internal-fn.c (cond_ternary_direct): New macro.
3901         (expand_cond_ternary_optab_fn): Likewise.
3902         (direct_cond_ternary_optab_supported_p): Likewise.
3903         (FOR_EACH_COND_FN_PAIR): Likewise.
3904         (get_conditional_internal_fn): New function.
3905         (get_unconditional_internal_fn): Likewise.
3906         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3907         (gimple_match_op::gimple_match_op): Add a new overload for 5
3908         operands.
3909         (gimple_match_op::set_op): Likewise.
3910         (gimple_resimplify5): Declare.
3911         * genmatch.c (decision_tree::gen): Generate simplifications for
3912         5 operands.
3913         * gimple-match-head.c (gimple_simplify): Define an overload for
3914         5 operands.  Handle calls with 5 arguments in the top-level overload.
3915         (convert_conditional_op): Handle conversions from unconditional
3916         internal functions to conditional ones.
3917         (gimple_resimplify5): New function.
3918         (build_call_internal): Pass a fifth operand.
3919         (maybe_push_res_to_seq): Likewise.
3920         (try_conditional_simplification): Try converting conditional
3921         internal functions to unconditional internal functions.
3922         Handle 3-operand unconditional forms.
3923         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3924         Define ternary equivalents of the current rules for binary conditional
3925         internal functions.
3926         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3927         ternary operations.
3928         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3929         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3930         (optab): Handle them.
3931         (SVE_COND_FP_TERNARY): New int iterator.
3932         (sve_fmla_op, sve_fmad_op): New int attributes.
3933         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3934         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3935         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3937 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3939         * target.def (preferred_else_value): New target hook.
3940         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3941         * doc/tm.texi: Regenerate.
3942         * targhooks.h (default_preferred_else_value): Declare.
3943         * targhooks.c (default_preferred_else_value): New function.
3944         * internal-fn.h (conditional_internal_fn_code): Declare.
3945         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3946         (get_conditional_internal_fn): Use it.
3947         (conditional_internal_fn_code): New function.
3948         * gimple-match.h (gimple_match_cond): New struct.
3949         (gimple_match_op): Add a cond member function.
3950         (gimple_match_op::gimple_match_op): Update all forms to take a
3951         gimple_match_cond.
3952         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3953         for the suboperation, but don't specify a particular else_value.
3954         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3955         (visit_nary_op, visit_reference_op_load): Pass
3956         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3957         * gimple-match-head.c: Include tree-eh.h
3958         (convert_conditional_op): New function.
3959         (maybe_resimplify_conditional_op): Likewise.
3960         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3961         (gimple_resimplify2): Likewise.
3962         (gimple_resimplify3): Likewise.
3963         (gimple_resimplify4): Likewise.
3964         (maybe_push_res_to_seq): Return null for conditional operations.
3965         (try_conditional_simplification): New function.
3966         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3967         constructor.
3968         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3969         IFN_COND_* call.
3970         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3971         function.
3972         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3974 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3976         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3977         DECL_FCONTEXT
3978         (hash_tree): Do not hash DECL_FCONTEXT
3979         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3980         Do not stream DECL_FCONTEXT.
3981         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3982         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3984 2018-07-12  Richard Biener  <rguenther@suse.de>
3986         PR debug/86462
3987         * dwarf2out.c (gen_block_die): Only output blocks when they have
3988         at least one !DECL_IGNORED_P variable.
3990 2018-07-12  Richard Biener  <rguenther@suse.de>
3992         PR target/84829
3993         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3994         Remove -mieee-fp handling.
3996 2018-07-12  Richard Biener  <rguenther@suse.de>
3998         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3999         left-over from last patch.
4001 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
4003         PR tree-optimization/86492
4004         * gimple-ssa-store-merging.c
4005         (imm_store_chain_info::coalesce_immediate_stores): Call
4006         check_no_overlap even for the merge_overlapping case.  Formatting fix.
4008 2018-07-12  Richard Biener  <rguenther@suse.de>
4010         PR middle-end/86479
4011         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
4012         move possibly trapping operations into the conditional.
4014 2018-07-12  Richard Biener  <rguenther@suse.de>
4016         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
4017         (vn_lookup_simplify_result): Remove recursion limit applied
4018         here.
4019         (vn_nary_build_or_lookup_1): Adjust.
4020         (try_to_simplify): Likewise.
4021         * gimple-match-head.c (gimple_resimplify1): Instead apply one
4022         here.
4023         (gimple_resimplify2): Likewise.
4024         (gimple_resimplify3): Likewise.
4025         (gimple_resimplify4): Likewise.
4027 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
4029         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
4030         Use __mmask64 type instead of __mmask8 for __M argument.
4031         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
4032         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
4033         __U argument.
4034         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
4035         __mmask16 for __M argument.
4036         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
4037         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
4038         to __mmask16 instead of __mmask8.
4039         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
4040         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
4041         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
4042         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
4043         instead of __mmask16 for __U argument.
4044         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
4045         __mmask16 instead of __mmask8 for __U argument.
4046         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
4047         __U argument.
4048         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
4049         __mmask16.
4050         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
4051         argument.
4052         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
4053         __U argument.
4054         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
4055         __mmask16.
4056         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
4057         of __mmask16.
4058         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
4059         __U argument.
4060         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
4061         __U argument.
4062         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
4063         __U argument.
4064         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
4065         __U argument.
4066         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
4067         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
4068         return type as well as __M argument type and all casts from __mmask8
4069         to __mmask32.
4070         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
4071         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
4072         return type as well as __M argument type and all casts from __mmask8
4073         to __mmask16.
4074         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
4075         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
4076         return type as well as __M argument type and all casts from __mmask8
4077         to __mmask32.
4078         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
4079         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
4080         return type as well as __M argument type and all casts from __mmask8
4081         to __mmask16.
4082         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
4083         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
4084         __mmask16.
4086 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
4088         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
4089         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
4090         for __U argument.
4092 2018-07-11  Paul Koning  <ni1d@arrl.net>
4094         * doc/md.texi (define_subst): Document how multiple occurrences of
4095         the same argument in the replacement pattern are handled.
4097 2018-07-11  Paul Koning  <ni1d@arrl.net>
4099         * doc/extend.texi (Common Variable Attributes): Move "mode" into
4100         alphabetical order.
4101         (Common Type Attributes): Add "mode" attribute.
4103 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
4105         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
4106         stream DECL_ORIGINAL_TYPE.
4107         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
4108         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
4109         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
4110         Do not walk original type.
4111         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
4112         external decls.
4113         (write_ts_decl_non_common_tree_pointers): Do not stream
4114         DECL_ORIGINAL_TYPE
4115         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4116         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4118 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4120         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4121         thread twice from the same starting edge.
4123 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4125         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4126         * gimple.c (gimple_call_nonnull_result_p): ...here...
4127         (gimple_call_nonnull_arg): ...and here.
4128         * gimple.h (gimple_call_nonnull_result_p): New.
4129         (gimple_call_nonnull_arg): New.
4131 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4133         * config/arm/arm-cpus.in: Move information from fpu field of each
4134         cpu definition to the isa field.
4135         * config/arm/parsecpu.awk (fpu): Delete match rule.
4136         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4138 2018-07-11  Richard Biener  <rguenther@suse.de>
4140         PR debug/86457
4141         * dwarf2out.c (init_sections_and_labels): Use
4142         output_asm_line_debug_info consistently.
4143         (dwarf2out_early_finish): Likewise.
4144         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4145         type units.
4147 2018-07-11  Richard Biener  <rguenther@suse.de>
4149         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4150         Rework father_bb setting in a way to avoid propagating constants
4151         multiple times on a loop body.
4153 2018-07-10  Mark Wielaard  <mark@klomp.org>
4155         PR debug/86459
4156         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4158 2018-07-10  Richard Biener  <rguenther@suse.de>
4160         * hash-map.h (hash_map::iterator::operator*): Return
4161         references to key and value.
4163 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4165         PR c++/86443
4166         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4167         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4168         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4169         (gimplify_omp_for): For composite loops, move outer
4170         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4171         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4172         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4173         TREE_LIST for both the original class iterator and the "last" helper
4174         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4175         loop, remember has_decl_expr from outer composite loops for the
4176         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4178 2018-07-09  Martin Sebor  <msebor@redhat.com>
4180         PR middle-end/77357
4181         PR middle-end/86428
4182         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4183         accessing implicitly initialized array elements.
4184         * expr.c (string_constant): Handle string initializers of
4185         character arrays within aggregates.
4186         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4187         Store element offset.  As a special case, handle zero size.
4188         (fold_nonarray_ctor_reference): Same.
4189         (fold_ctor_reference): Add argument.  Store subobject offset.
4190         * gimple-fold.h (fold_ctor_reference): Add argument.
4192 2018-07-09  Paul Koning  <ni1d@arrl.net>
4194         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4195         (pdp11_insn_cost): New function.
4196         (pdp11_md_asm_adjust): New function.
4197         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4198         (pdp11_rtx_costs): Update to match machine better.
4199         (output_addr_const_pdp11): Correct format mismatch warnings.
4200         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4201         * config/pdp11/pdp11.md: General change to add base_cost and/or
4202         length attributes for use by new pdp11_insn_cost function.
4203         (MIN_BRANCH): Correct definition.
4204         (MIN_SOB): Ditto.
4205         (doloop_end): Use standard pattern name for looping pattern.
4206         (doloop_end_nocc): New.
4207         (movsf): Add another constraint alternative.
4208         (zero_extendqihi2): Add constraint alternatives for not in place
4209         extend.
4210         (zero_extendhisi2): Remove.
4211         (shift patterns): Add CC handling variants.
4212         (bswaphi2): New.
4213         (bswapsi2): New.
4214         (rothi3): New.
4215         (define_peephole2): New peephole to recognize mov that sets CC for
4216         subsequent test.
4218 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4220         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4221         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4222         wi::add.
4224 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4226         PR c/86420
4227         * real.c (real_nextafter): Return true if result is denormal.
4229 2018-07-09  Martin Liska  <mliska@suse.cz>
4231         * common.opt: Add back wrongly removed attribute.
4233 2018-07-09  Richard Biener  <rguenther@suse.de>
4235         PR debug/86413
4236         * dwarf2out.c (gen_block_die): For an early generated DIE
4237         always output high/low PC attributes.
4239 2018-07-09  Tom de Vries  <tdevries@suse.de>
4241         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4242         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4243         onto VAR_DECL with abstract origin.
4245 2018-07-07  Jim Wilson  <jimw@sifive.com>
4247         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4249 2018-07-07  Tom de Vries  <tdevries@suse.de>
4251         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4253 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4255         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4256         overflow_type.
4257         (combine_bound): Use wide-int overflow calculation instead of
4258         rolling our own.
4259         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4260         overflow_type.
4261         * fold-const.c (int_const_binop_2): Same.
4262         (extract_muldiv_1): Same.
4263         (fold_div_compare): Same.
4264         (fold_abs_const): Same.
4265         * match.pd: Same.
4266         * poly-int.h (add): Same.
4267         (sub): Same.
4268         (neg): Same.
4269         (mul): Same.
4270         * predict.c (predict_iv_comparison): Same.
4271         * profile-count.c (slow_safe_scale_64bit): Same.
4272         * simplify-rtx.c (simplify_const_binary_operation): Same.
4273         * tree-chrec.c (tree_fold_binomial): Same.
4274         * tree-data-ref.c (split_constant_offset_1): Same.
4275         * tree-if-conv.c (idx_within_array_bound): Same.
4276         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4277         * tree-ssa-phiopt.c (minmax_replacement): Same.
4278         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4279         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4280         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4281         * wide-int.cc (wi::add_large): Same.
4282         (wi::mul_internal): Same.
4283         (wi::sub_large): Same.
4284         (wi::divmod_internal): Same.
4285         * wide-int.h: Change overflow type to overflow_type for neg, add,
4286         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4287         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4288         mul_internal, divmod_internal.
4289         (overflow_type): New enum.
4290         (accumulate_overflow): New.
4292 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4294         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4295         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4297 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4299         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4300         argument is checked for zero before entering loop, avoid checking again.
4302 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4304         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4305         * gimplify.h (generic_expr_could_trap_p): Likwise.
4306         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4308 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4310         PR tree-optimization/86401
4311         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4312         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4313         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4314         * fold-const.h (fold_bit_and_mask): Declare.
4315         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4317 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4319         PR target/86324
4320         * target.def (translate_mode_attribute): New hook.
4321         * targhooks.h (default_translate_mode_attribute): Declare.
4322         * targhooks.c (default_translate_mode_attribute): New function.
4323         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4324         * doc/tm.texi: Regenerate.
4325         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4326         (rs6000_translate_mode_attribute): New function.
4328 2018-07-06  Paul Koning  <ni1d@arrl.net>
4330         * doc/md.texi (define_split): Document DONE and FAIL.
4331         (define_peephole2): Ditto.
4333 2018-07-05  Jeff Law  <law@redhat.com>
4335         PR tree-optimization/86010
4336         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4337         both the head and tail of mem* and str* calls.
4339 2018-07-05  Jim Wilson  <jimw@sifive.com>
4341         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4343 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4345         * config/aarch64/aarch64-simd.md: correct flags text for
4346         MIN_EXPR replacement.
4348 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4350         * configure: Regenerated.
4352 2018-07-05  Carl Love  <cel@us.ibm.com>
4354         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4355         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4356         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4357         VSX_BUILTIN_DOUBLEL_V4SF.
4359 2018-07-05  Martin Sebor  <msebor@redhat.com>
4361         PR c++/86400
4362         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4363         than its domain to compute its the upper bound of a char array.
4365 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4367         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4368         * doc/cpp.texi: Update comment.
4369         * doc/tm.texi: Rebuilt.
4370         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4371         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4372         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4373         headers affected by extern "C".
4374         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4375         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4376         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4377         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4378         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4379         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4380         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4381         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4382         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4383         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4384         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4385         config/sparc/sp64-elf.h, config/spu/spu.h,
4386         config/stormy16/stormy16.h, config/v850/v850.h,
4387         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4388         define NO_IMPLICIT_EXTERN_C.
4389         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4391 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4393         PR target/84711
4394         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4395         instead of GET_MODE_SIZE when comparing Units.
4397 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4399         PR target/84711
4400         * rtlanal.c (set_noop_p): Constrain on mode change,
4401         include hard-reg-set.h
4403 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4405         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4407 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4409         Revert
4410         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4412         PR sanitizer/84250
4413         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4414         libasan.
4415         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4417 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4419         PR sanitizer/84250
4420         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4421         libasan.
4422         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4424 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4426         PR middle-end/86380
4427         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4429 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4431         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4432         neg_*_op* variables.
4434 2018-07-04  Martin Liska  <mliska@suse.cz>
4436         * tree-switch-conversion.c: Define
4437         max_ratio_for_speed and max_ratio_for_size constants.
4439 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4440             Martin Liska  <mliska@suse.cz>
4442         PR middle-end/66240
4443         PR target/45996
4444         PR c/84100
4445         * common.opt: Rename align options with 'str_' prefix.
4446         * common/config/i386/i386-common.c (set_malign_value): New
4447         function.
4448         (ix86_handle_option): Use it to set -falign-* options/
4449         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4450         type from int to string.
4451         * config/aarch64/aarch64.c: Update default values from int
4452         to string.
4453         * config/alpha/alpha.c (alpha_override_options_after_change):
4454         Likewise.
4455         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4456         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4457         max skip conditionally.
4458         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4459         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4460         max skip conditionally.
4461         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4462         max skip conditionally.
4463         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4464         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4465         max skip conditionally.
4466         * config/i386/i386.c (struct ptt): Change type from int to
4467         string.
4468         (ix86_default_align): Set default values.
4469         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4470         max skip conditionally.
4471         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4472         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4473         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4474         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4475         max skip conditionally.
4476         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4477         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4478         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4479         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4480         max skip conditionally.
4481         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4482         * config/ia64/ia64.c (ia64_option_override): Set default values
4483         for alignment options.
4484         * config/m68k/m68k.c: Handle new str_align_* options.
4485         * config/mips/mips.c (mips_set_compression_mode): Change
4486         type of constants.
4487         (mips_option_override): Set default values for options.
4488         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4489         Likewise.
4490         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4491         Likewise.
4492         * config/rx/rx.c (rx_option_override): Likewise.
4493         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4494         (LABEL_ALIGN): Use align_labels_log.
4495         (LOOP_ALIGN): Use align_loops_align.
4496         * config/s390/s390.c (s390_asm_output_function_label): Use new
4497         macros.
4498         * config/sh/sh.c (sh_override_options_after_change):
4499         Change type of constants.
4500         * config/spu/spu.c (spu_sched_init): Likewise.
4501         * config/sparc/sparc.c (sparc_option_override): Set default
4502         values for options.
4503         * config/visium/visium.c (visium_option_override): Likewise.
4504         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4505         emit p2align format with last argument if it's not needed.
4506         * doc/invoke.texi: Document extended format of -falign-*.
4507         * final.c: Use align_labels alignment.
4508         * flags.h (struct target_flag_state): Change type to use
4509         align_flags.
4510         (struct align_flags_tuple): New.
4511         (struct align_flags): Likewise.
4512         (align_loops_log): Redefine macro to use new types.
4513         (align_loops_max_skip): Redefine macro to use new types.
4514         (align_jumps_log): Redefine macro to use new types.
4515         (align_jumps_max_skip): Redefine macro to use new types.
4516         (align_labels_log): Redefine macro to use new types.
4517         (align_labels_max_skip): Redefine macro to use new types.
4518         (align_functions_log): Redefine macro to use new types.
4519         (align_loops): Redefine macro to use new types.
4520         (align_jumps): Redefine macro to use new types.
4521         (align_labels): Redefine macro to use new types.
4522         (align_functions): Redefine macro to use new types.
4523         (align_functions_max_skip): Redefine macro to use new types.
4524         (align_loops_value): New macro.
4525         (align_jumps_value): New macro.
4526         (align_labels_value): New macro.
4527         (align_functions_value): New macro.
4528         * function.c (invoke_set_current_function_hook): Propagate
4529         alignment values from flags to global variables default in
4530         topleev.h.
4531         * ipa-icf.c (sem_function::equals_wpa): Use
4532         cl_optimization_option_eq instead of memcmp.
4533         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4534         of string types.
4535         (cl_optimization_stream_in): Likewise.
4536         * optc-save-gen.awk: Support strings in cl_optimization.
4537         * opth-gen.awk: Likewise.
4538         * opts.c (finish_options): Remove error checking of invalid
4539         value ranges.
4540         (MAX_CODE_ALIGN): Remove.
4541         (MAX_CODE_ALIGN_VALUE): Likewise.
4542         (parse_and_check_align_values): New function.
4543         (check_alignment_argument): Likewise.
4544         (common_handle_option): Use check_alignment_argument.
4545         * opts.h (parse_and_check_align_values): Declare.
4546         * toplev.c (init_alignments): Remove.
4547         (read_log_maxskip): New.
4548         (parse_N_M): Likewise.
4549         (parse_alignment_opts): Likewise.
4550         (backend_init_target): Remove usage of init_alignments.
4551         * toplev.h (parse_alignment_opts): Declare.
4552         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4553         argument.
4554         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4555         * tree.c (cl_option_hasher::equal): New.
4556         * varasm.c: Use new global macros.
4558 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4560         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4561         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4562         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4563         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4564         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4565         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4566         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4567         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4568         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4569         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4570         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4571         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4572         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4574 2018-07-04  Martin Liska  <mliska@suse.cz>
4575             Jonathan Wakely  <jwakely@redhat.com>
4577         * coverage.c: Use correct type.
4578         * doc/invoke.texi: Language correction.
4580 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4582         PR target/85620
4583         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4584         ENDBRANCH for non-tail call which may return via indirect branch.
4585         * doc/extend.texi: Document indirect_return attribute.
4587 2018-07-03  Martin Sebor  <msebor@redhat.com>
4589         PR tree-optimization/86274
4590         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4591         precondition.
4592         (format_floating): Correct handling of infinities and NaNs.
4594 2018-07-03  Martin Sebor  <msebor@redhat.com>
4596         * print-tree.c (print_real_cst): New function.
4597         (print_node_brief): Call it.
4598         (print_node): Ditto.
4600 2018-07-03  Jeff Law  <law@redhat.com>
4602         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4603         into a single pattern.
4605         * config/h8300/h8300.md (ors code_iterator): New.
4606         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4607         a single pattern and single splitter.
4608         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4609         (iorqi3_1, xorqi3_1): Likewise.
4610         (iorqi3, xorqi3 expanders): Similarly.
4612         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4613         (movmd_internal) into a single pattern using the P mode iterator.
4614         (movmd splitters): Similarly.
4615         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4616         (movsd splitters): Similarly.
4618         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4619         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4620         right table based on the size of the operand.
4621         * config/h8300/h8300.md (length_table): Corresponding changes. All
4622         references to "addb", "addw" and "addl" changed to "add".
4623         (btst patterns): Merge two variants into a single pattern.
4624         (tstqi, tsthi): Likewise.
4625         (addhi3_incdec, addsi3_incdec): Likewise.
4626         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4627         (mulhi3, mulsi3): Likewise.
4628         (udivhi3, udivsi3): Likewise.
4629         (divhi3, divsi3): Likewise.
4630         (andorqi3, andorhi3, andorsi3): Likewise.
4632 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4634         PR target/85694
4635         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4636         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4638 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4640         PR tree-optimization/85694
4641         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4642         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4643         UNSPEC_URHADD.
4644         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4645         (<u>avg<mode>3_ceil): New patterns.
4647 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4649         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4650         scan-tree-dump directive.
4651         * gcc.dg/vect/slp-perm-2.c: Likewise.
4652         * gcc.dg/vect/slp-perm-3.c: Likewise.
4653         * gcc.dg/vect/slp-perm-5.c: Likewise.
4654         * gcc.dg/vect/slp-perm-6.c: Likewise.
4655         * gcc.dg/vect/slp-perm-7.c: Likewise.
4656         * gcc.dg/vect/slp-perm-8.c: Likewise.
4658 2018-07-03  Marek Polacek  <polacek@redhat.com>
4660         PR middle-end/86202
4661         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4663 2018-07-03  Richard Biener  <rguenther@suse.de>
4665         PR ipa/86389
4666         * tree-ssa-structalias.c (find_func_clobbers): Properly
4667         handle indirect calls.
4669 2018-07-03  Jeff Law  <law@redhat.com>
4671         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4672         (shifts): New code iterator.
4673         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4674         expander.  Fix HImode handling on H8/SX.
4675         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4676         (subqi3, subhi3, subsi3 expanders): Likewise.
4677         (andqi3, andhi3, andsi3 expanders): Likewise.
4678         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4679         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4680         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4681         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4682         (zero_extendqihi2, zero_extendqisi2): Likewise.
4683         (extendqihi2, extendqisi2): Likewise.
4684         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4685         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4686         (rotlqi3_1, rotlhi3_1): Likewise.
4687         (logicalhi3_sn, logicalsi3_sn): Likewise.
4688         (logicalhi3, logicalsi3): Likewise.
4690 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4692         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4693         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4694         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4695         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4696         type to append_pattern_def_seq instead of creating a stmt_vec_info
4697         directly.
4698         (build_mask_conversion): Likewise.  Remove vinfo argument.
4699         (vect_add_conversion_to_patterm): Likewise, renaming to...
4700         (vect_add_conversion_to_pattern): ...this.
4701         (vect_recog_mask_conversion_pattern): Update call to
4702         build_mask_conversion.  Pass the vector type to
4703         append_pattern_def_seq here too.
4704         (vect_recog_gather_scatter_pattern): Update call to
4705         vect_add_conversion_to_pattern.
4707 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4709         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4710         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4711         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4712         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4713         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4714         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4715         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4716         append_pattern_def_seq instead of new_pattern_def_seq.
4717         (vect_recog_divmod_pattern): Do both of the above.
4718         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4719         is null.
4721 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4723         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4724         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4725         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4726         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4727         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4728         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4729         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4730         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4731         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4732         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4733         parameter with a single stmt_vec_info.
4734         (vect_recog_func_ptr): Likewise.
4735         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4736         (vect_try_gather_scatter_pattern): ...this.
4737         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4738         the stmt_vec_info of the statement to be matched.  Don't clear
4739         STMT_VINFO_RELATED_STMT.
4740         (vect_pattern_recog): Update call accordingly.
4742 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4744         PR tree-optimization/85694
4745         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4746         (uavgM3_ceil): Document new optabs.
4747         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4748         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4749         functions.
4750         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4751         (savg_ceil_optab): New optabs.
4752         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4753         (vect_vect_recog_func_ptrs): Add it.
4754         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4755         constant directly from the associated lhs.
4757 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4759         * tree-vect-patterns.c (vect_split_statement): New function.
4760         (vect_convert_input): Use it to try to split an existing cast.
4762 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4764         * poly-int.h (print_hex): New function.
4765         * dumpfile.h (dump_dec, dump_hex): Declare.
4766         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4767         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4768         min_input_precision, operation_precision and operation_sign.
4769         * tree-vect-patterns.c (vect_get_range_info): New function.
4770         (vect_same_loop_or_bb_p, vect_single_imm_use)
4771         (vect_operation_fits_smaller_type): Delete.
4772         (vect_look_through_possible_promotion): Add an optional
4773         single_use_p parameter.
4774         (vect_recog_over_widening_pattern): Rewrite to use new
4775         stmt_vec_info infomration.  Handle one operation at a time.
4776         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4777         (vect_truncatable_operation_p, vect_set_operation_type)
4778         (vect_set_min_input_precision): New functions.
4779         (vect_determine_min_output_precision_1): Likewise.
4780         (vect_determine_min_output_precision): Likewise.
4781         (vect_determine_precisions_from_range): Likewise.
4782         (vect_determine_precisions_from_users): Likewise.
4783         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4784         (vect_vect_recog_func_ptrs): Put over_widening first.
4785         Add cast_forwprop.
4786         (vect_pattern_recog): Call vect_determine_precisions.
4788 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4790         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4791         statements that have been replaced by further pattern statements.
4792         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4794 2018-07-03  Richard Biener  <rguenther@suse.de>
4796         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4797         always set *dt.  Dump vectype in vectype overload.
4798         * dumpfile.h (dump_gimple_expr): New function.
4799         (dump_gimple_expr_loc): Likewise.
4800         * dumpfile.c (dump_gimple_expr): New function.
4801         (dump_gimple_expr_loc): Likewise.
4803 2018-07-02  Jeff Law  <law@redhat.com>
4805         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4806         the H8/300, H8/300H and H8/S variants into a single pattern.
4807         (movhi_h8300, movqi_h8300hs): Similarly.
4808         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4809         (QHI mode iterator): New.
4811         * config/h8300/h8300.md: Remove trailing whitespace.
4813 2018-07-02  Jim Wilson  <jimw@sifive.com>
4815         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4816         instead of emit_insn for interrupt returns.
4817         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4818         (riscv_sret, riscv_uret): Likewise.
4820 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4822         * pretty-print.c (selftest::test_pp_format): Move save and restore
4823         of quotes to class auto_fix_quotes, and add an instance.
4824         * selftest.c: Include "intl.h".
4825         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4826         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4827         * selftest.h (selftest::auto_fix_quotes): New class.
4829 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4831         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4832         (aarch64_sve_prepare_conditional_op): Remove.
4833         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4834         Allow aarch64_simd_reg_or_zero as select operand; remove
4835         the aarch64_sve_prepare_conditional_op call.
4836         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4837         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4838         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4839         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4840         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4841         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4842         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4843         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4844         and a splitters to match all of the *_any patterns.
4845         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4847         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4848         (SVE_COND_FP_BINARY_REV): Remove.
4849         (sve_int_op_rev, sve_fp_op_rev): New.
4850         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4851         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4852         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4853         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4854         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4855         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4856         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4857         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4858         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4860         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4861         Remove match_dup 1 from the inner unspec.
4862         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4864         * config/aarch64/aarch64.md (movprfx): New attr.
4865         (length): Default movprfx to 8.
4866         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4867         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4868         (*<su>mul<SVE_I>3_highpart): Likewise.
4869         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4870         (*v<ASHIFT><SVE_I>3): Likewise.
4871         (*<su><MAXMIN><SVE_I>3): Likewise.
4872         (*<su><MAXMIN><SVE_F>3): Likewise.
4873         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4874         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4875         (*div<SVE_F>4): Likewise.
4877 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4879         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4880         in dump string.
4882 2018-07-02  Richard Biener  <rguenther@suse.de>
4884         PR tree-optimization/86363
4885         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4886         memset argument refers to a non-variable address.
4888 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4890         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4891         {PLUS,MINUS}_EXPR code to...
4892         (adjust_symbolic_bound): ...here,
4893         (combine_bound): ...here,
4894         (set_value_range_with_overflow): ...and here.
4896 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4898         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4899         code...
4900         (extract_range_from_abs_expr): ...here.
4902 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4904         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4905         -fno-omit-frame-pointer when not optimizing.
4907 2018-07-02  Martin Liska  <mliska@suse.cz>
4909         PR ipa/86279
4910         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4911         (propagate_nothrow): Likewise.
4913 2018-07-02  Martin Liska  <mliska@suse.cz>
4915         PR ipa/86323
4916         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4918 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4920         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4921         function in r262149, changing "loc" param from source_location to
4922         const dump_location_t &.
4923         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4924         declaration, as above.
4926 2018-07-01  Paul Koning  <ni1d@arrl.net>
4928         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4929         -munit-asm, -mgnu-asm, -mdec-asm.
4930         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4931         (pdp11_output_labelref): New.
4932         (pdp11_output_def): New.
4933         (pdp11_output_addr_vec_elt): New.
4934         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4935         %# and %@ format codes.
4936         (pdp11_option_override): New.
4937         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4938         (pdp11_output_ident): New.
4939         (pdp11_asm_named_section): New.
4940         (pdp11_asm_init_sections): New.
4941         (pdp11_file_start): New.
4942         (pdp11_file_end): New.
4943         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4944         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4945         %o, like %c but octal.
4946         (pdp11_option_override): New.
4947         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4948         -mdec-asm.
4949         (DATA_SECTION_ASM_OP): Ditto.
4950         (READONLY_DATA_SECTION_ASM_OP): New.
4951         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4952         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4953         (ASM_OUTPUT_LABELREF): Ditto.
4954         (ASM_OUTPUT_DEF): Ditto.
4955         (ASM_OUTPUT_EXTERNAL): New.
4956         (ASM_OUTPUT_SOURCE_FILENAME): New.
4957         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4958         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4959         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4960         %# and %@ format codes.
4961         * config/pdp11/pdp11.opt (mgnu-asm): New.
4962         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4963         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4964         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4966 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4968         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4969         dereferencing path[] beyond its length.
4970         (debug_path): New.
4971         (debug_all_paths): New.
4972         (rewire_first_differing_edge): New.
4973         (adjust_paths_after_duplication): New.
4974         (duplicate_thread_path): Call adjust_paths_after_duplication.
4975         Add new argument.
4976         (thread_through_all_blocks): Add new argument to
4977         duplicate_thread_path.
4979 2018-06-30  Jim Wilson  <jimw@sifive.com>
4981         * config/riscv/predicates.md (p2m1_shift_operand): New.
4982         (high_mask_shift_operand): New.
4983         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4984         pattern using p2m1_shift_operand.
4985         (lshsi3_zero_extend_3+2): New combiner pattern using
4986         high_mask_shift_operand.
4988 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4990         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4991         split out from...
4992         (vect_recog_rotate_pattern): ...here.
4993         (vect_convert_input): Try to insert casts of invariants in the
4994         preheader.
4995         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4996         preheader to be empty.
4998 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5000         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
5001         vector type.  If given, install it in the new statement's
5002         STMT_VINFO_VECTYPE.
5003         (vect_element_precision): New function.
5004         (vect_unpromoted_value): New struct.
5005         (vect_unpromoted_value::vect_unpromoted_value): New function.
5006         (vect_unpromoted_value::set_op): Likewise.
5007         (vect_look_through_possible_promotion): Likewise.
5008         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
5009         (vect_widened_op_tree, vect_convert_input): Likewise.
5010         (vect_convert_inputs, vect_convert_output): Likewise.
5011         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
5012         to handle the optional cast of the multiplication result and
5013         vect_widened_op_tree to detect the widened multiplication itself.
5014         Do not require the input and output of promotion casts to have
5015         the same sign, but base the signedness of the operation on the
5016         input rather than the result.  If the pattern includes two
5017         promotions, check that those promotions have the same sign.
5018         Do not restrict the MULT_EXPR handling to a double-width result;
5019         handle quadruple-width results and wider.  Use vect_convert_inputs
5020         to convert the inputs to the common type.
5021         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
5022         to handle the optional cast of the ABS result.  Also allow a sign
5023         change or a sign extension between the ABS and MINUS.
5024         Use vect_widened_op_tree to detect the widened subtraction and use
5025         vect_convert_inputs to convert the inputs to the common type.
5026         (vect_handle_widen_op_by_const): Delete.
5027         (vect_recog_widen_op_pattern): New function.
5028         (vect_recog_widen_mult_pattern): Use it.
5029         (vect_recog_widen_shift_pattern): Likewise.
5030         (vect_recog_widen_sum_pattern): Use
5031         vect_look_through_possible_promotion to handle the promoted
5032         PLUS_EXPR operand.
5034 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5036         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
5037         the containing gimple_seq *.
5038         * gimple-iterator.h (gsi_for_stmt): Declare it.
5039         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
5040         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
5041         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
5042         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
5043         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
5044         checks.
5045         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
5046         split out from...
5047         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
5048         statement being replaced is part of an existing pattern
5049         definition sequence, inserting the new pattern statements before
5050         the original one.
5051         (vect_pattern_recog_1): Don't return a bool.  If the statement
5052         is already part of a pattern, instead apply pattern matching
5053         to the pattern definition statements.  Don't clear the
5054         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
5055         (vect_pattern_recog): Don't break after the first match;
5056         continue processing the pattern definition statements instead.
5057         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
5059 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5061         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
5062         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
5063         (vect_recog_widen_sum_pattern): Use it.
5065 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5067         * tree-vect-loop.c (vectorizable_reduction): Assert that the
5068         phi is not a pattern statement and has not been replaced by
5069         a pattern statement.
5070         * tree-vect-patterns.c (type_conversion_p): Don't check
5071         STMT_VINFO_IN_PATTERN_P.
5072         (vect_recog_vector_vector_shift_pattern): Likewise.
5073         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
5074         the pattern statement rather than the original statement; check
5075         directly for a WIDEN_MULT_EXPR here.
5076         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
5077         vect_is_simple_use to return the pattern statement rather
5078         than the original statement; use is_pattern_stmt_p to check
5079         for such a pattern statement.
5080         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
5081         to return the pattern statement rather than the original statement;
5082         don't do the same transformation here.
5083         (vect_is_simple_use): If the defining statement has been replaced
5084         by a pattern statement, return the pattern statement instead.
5085         Remove the corresponding (local) transformation from the vectype
5086         overload.
5088 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
5090         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
5091         end and default to null.
5092         * tree-vect-loop.c (vect_create_epilog_for_reduction)
5093         (vectorizable_reduction): Update calls accordingly, dropping the
5094         gimple ** argument if the passed-back statement isn't needed.
5095         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
5096         (vect_recog_rotate_pattern): Likewise.
5097         (vect_recog_mask_conversion_pattern): Likewise.
5098         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5099         (vect_mask_constant_operand_p): Likewise.
5100         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
5101         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
5102         (get_group_load_store_type, get_load_store_type): Likewise.
5103         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
5104         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
5105         (vectorizable_conversion, vectorizable_assignment): Likewise.
5106         (vectorizable_shift, vectorizable_operation): Likewise.
5107         (vectorizable_store, vect_is_simple_cond): Likewise.
5108         (vectorizable_condition, vectorizable_comparison): Likewise.
5109         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
5110         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
5111         and move it to the end.  Cope with null def_stmt_outs.
5113 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5115         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5117 2018-06-29  Jeff Law  <law@redhat.com>
5119         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5120         displacements for TARGET_V850E2V3 and newer.
5121         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5122         * config/v850/v850.md (sign23byte_load): Remove.
5123         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5124         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5126 2018-06-29  Martin Liska  <mliska@suse.cz>
5128         PR lto/85759
5129         * coverage.c (coverage_init): Mangle full path name.
5130         * doc/invoke.texi: Document the change.
5131         * gcov-io.c (mangle_path): New.
5132         * gcov-io.h (mangle_path): Likewise.
5133         * gcov.c (mangle_name): Use mangle_path for path mangling.
5135 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5137         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5138         if starting source register is not even.
5140 2018-06-29  Martin Liska  <mliska@suse.cz>
5142         PR tree-optimization/86263
5143         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5144         Make edge redirection.
5146 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5148         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5149         (dump_scope_depth): New variable.
5150         (get_dump_scope_depth): New function.
5151         (dump_begin_scope): New function.
5152         (dump_end_scope): New function.
5153         * dumpfile.h (get_dump_scope_depth): New declaration.
5154         (dump_begin_scope): New declaration.
5155         (dump_end_scope): New declaration.
5156         (class auto_dump_scope): New class.
5157         (AUTO_DUMP_SCOPE): New macro.
5158         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5159         AUTO_DUMP_SCOPE.
5161 2018-06-29  Richard Biener  <rguenther@suse.de>
5163         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5164         compute_all_dependences succeeds.
5165         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5166         exceed --param loop-max-datarefs-for-datadeps.
5168 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5170         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5172 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5174         PR target/86348
5175         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5176         alternative 0 in preferred_for_speed attribute.
5178 2018-06-28  Paul Koning  <ni1d@arrl.net>
5180         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5181         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5182         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5183         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5184         for shift insn patterns.
5186 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5188         * cgraph.c (cgraph_node::get_body): Replace assignments to
5189         "dump_file" with calls to set_dump_file.
5190         * dumpfile.c (alt_dump_file): Make static, and group with...
5191         (alt_flags): ...this definition.
5192         (dumps_are_enabled): New variable.
5193         (refresh_dumps_are_enabled): New function.
5194         (set_dump_file): New function.
5195         (set_alt_dump_file): New function.
5196         (gcc::dump_manager::dump_start): Replace assignments to
5197         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5198         set_alt_dump_file.
5199         (gcc::dump_manager::dump_finish): Likewise.
5200         * dumpfile.h (alt_dump_file): Delete decl.
5201         (dumps_are_enabled): New variable decl.
5202         (set_dump_file): New function decl.
5203         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5204         global.
5205         * tree-nested.c (lower_nested_functions): Replace assignments to
5206         "dump_file" with calls to set_dump_file.
5208 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5210         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5211         goto_locus of each outgoing edge of each basic block.
5213 2018-06-28  Richard Biener  <rguenther@suse.de>
5215         * dwarf2out.c (decl_scope_table): Remove.
5216         (push_decl_scope): Likewise.
5217         (pop_decl_scope): Likewise.
5218         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5219         (gen_struct_or_union_type_die): Likewise.
5220         (gen_tagged_type_die): Likewise.
5221         (dwarf2out_init): Do not initialize decl_scope_table.
5222         (dwarf2out_c_finalize): Do not free it.
5224 2018-06-28  Richard Biener  <rguenther@suse.de>
5226         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5227         deciding whether to not re-use a DIE.
5229 2018-06-28  Richard Biener  <rguenther@suse.de>
5231         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5232         DW_AT_abstract_origin attribute.
5234 2018-06-28  Martin Liska  <mliska@suse.cz>
5236         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5237         Use newly introduced constants.
5238         * tree-switch-conversion.h (struct jump_table_cluster):
5239         Define max_ratio_for_size and max_ratio_for_speed.
5241 2018-06-28  Martin Liska  <mliska@suse.cz>
5243         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5244         Add new checking assert to catch invalid state.
5245         (jump_table_cluster::can_be_handled): Handle single case
5246         clusters.
5247         (jump_table_cluster::is_beneficial): Bail out for such case.
5248         (bit_test_cluster::find_bit_tests):
5249         Add new checking assert to catch invalid state.
5250         (bit_test_cluster::can_be_handled): Handle single case
5251         clusters.
5252         (bit_test_cluster::is_beneficial): Bail out for such case.
5253         (switch_decision_tree::analyze_switch_statement):
5254         Fix comment.
5256 2018-06-28  Martin Liska  <mliska@suse.cz>
5258         * common.opt: Introduce -completion option.
5259         * gcc.c (driver_handle_option): Handle it.
5260         (driver::main): Print completions if completion
5261         is set.
5262         * opt-suggestions.c (option_proposer::get_completions):
5263         New function.
5264         (option_proposer::suggest_completion): Likewise.
5265         (option_proposer::find_param_completions): Likewise.
5266         (verify_autocompletions): Likewise.
5267         (test_completion_valid_options): Likewise.
5268         (test_completion_valid_params): Likewise.
5269         (in_completion_p): Likewise.
5270         (empty_completion_p): Likewise.
5271         (test_completion_partial_match): Likewise.
5272         (test_completion_garbage): Likewise.
5273         (opt_proposer_c_tests): Likewise.
5274         * opt-suggestions.h: Declare new functions.
5275         * opts.c (common_handle_option): Handle OPT__completion_.
5276         * selftest-run-tests.c (selftest::run_tests): Add
5277         opt_proposer_c_tests.
5278         * selftest.c (assert_str_startswith): New.
5279         * selftest.h (assert_str_startswith): Likewise.
5280         (opt_proposer_c_tests): New.
5281         (ASSERT_STR_STARTSWITH): Likewise.
5283 2018-06-28  Martin Liska  <mliska@suse.cz>
5285         * Makefile.in: Add opt-suggestions.o.
5286         * gcc-main.c: Include opt-suggestions.h.
5287         * gcc.c (driver::driver): Likewise.
5288         (driver::~driver): Remove m_option_suggestions.
5289         (driver::build_option_suggestions): Moved to option_proposer.
5290         (driver::suggest_option): Likewise.
5291         (driver::handle_unrecognized_options): Use option_proposer.
5292         * gcc.h (class driver): Add new memver m_option_proposer.
5293         * opt-suggestions.c: New file.
5294         * opt-suggestions.h: New file.
5296 2018-06-28  Martin Liska  <mliska@suse.cz>
5298         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5299         (auto_string_vec::~auto_string_vec): Likewise.
5301 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5303         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5304         prevent_decl_creation_for_types fields up and add reset_location field.
5305         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5306         statement if id->reset_location is true.
5307         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5308         id->reset_location is true.
5309         (copy_phis_for_bb): Force input_location on the arguments if
5310         id->reset_location is true.
5311         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5312         is set on the function to be inlined.
5314 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5316         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5318 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5320         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5321         registers for Pmode.
5322         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5323         hard registers for the clobbered pseudo.
5325 2018-06-27  Paul Koning  <ni1d@arrl.net>
5327         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5328         mutually exclusive options.
5329         * config/pdp11/constraints.md (h): New constraint.
5330         (O): Update definition to match shift code generation.
5331         (D): New constraint.
5332         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5333         (CCFP): Remove.
5334         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5335         function.
5336         (output_jump): Change arguments.
5337         (pdp11_fixed_cc_regs): New function.
5338         (pdp11_cc_mode): Ditto.
5339         (pdp11_expand_shift): Ditto.
5340         (pdp11_assemble_shift): Ditto.
5341         (pdp11_small_shift): Ditto.
5342         (pdp11_branch_cost): Remove.
5343         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5344         from output.
5345         (pdp11_register_move_cost): Update for CC registers.
5346         (pdp11_rtx_costs): Add case for LSHIFTRT.
5347         (pdp11_output_jump): Add CCNZ mode conditional branches.
5348         (notice_update_cc_on_set): Remove.
5349         (pdp11_cc_mode): New function.
5350         (simple_memory_operand): Correct pre/post decrement case.
5351         (no_side_effect_operand): New function.
5352         (pdp11_regno_reg_class): Add CC_REGS class.
5353         (pdp11_fixed_cc_regs): New function.
5354         (pdp11_small_shift): New function.
5355         (pdp11_expand_shift): New function to expand shift insns.
5356         (pdp11_assemble_shift): New function to output shifts.
5357         (pdp11_branch_cost): Remove.
5358         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5359         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5360         (WCHAR_TYPE): Ditto.
5361         (PTRDIFF_TYPE): Ditto.
5362         (ADJUST_INSN_LENGTH): New macro.
5363         (FIXED_REGISTERS): Add CC registers.
5364         (CALL_USED_REGISTERS): Ditto.
5365         (reg_class): Ditto.
5366         (REG_CLASS_NAMES): Ditto.
5367         (REG_CLASS_CONTENTS): Ditto.
5368         (SELECT_CC_MODE): Use new function.
5369         (TARGET_FLAGS_REGNUM): New macro.
5370         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5371         (cc0_reg_rtx): Remove.
5372         (CC_STATUS_MDEP): Remove.
5373         (CC_STATUS_MDEFP_INIT): Remove.
5374         (CC_IN_FPU): Remove.
5375         (NOTICE_UPDATE_CC): Remove.
5376         (REGISTER_NAMES): Add CC registers.
5377         (BRANCH_COST): Change to constant 1.
5378         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5379         handling.
5380         * config/pdp11/pdp11.opt (mbcopy): Remove.
5381         (mbcopy-builtin): Remove.
5382         (mbranch-cheap): Remove.
5383         (mbranch-expensive): Remove.
5384         * config/pdp11/predicates.md (expand_shift_operand): Update to
5385         match shift code generation.
5386         (ccnz_operator): New predicate.
5387         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5388         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5389         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5390         exclusive options.
5391         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5392         description of O constraint.
5394 2018-06-27  Jeff Law  <law@redhat.com>
5395             Austin Law  <austinklaw@gmail.com>
5397         * config/v850/v850.md (addsi3_set_flags): New pattern.
5398         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5399         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5400         (zero_extendhisi2_v850_set_flags): Likewise.
5401         (zero_extendqisi2_v850_set_flags): Likewise.
5402         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5403         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5404         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5406         * config/v850/v850-protos.h (notice_update_cc): Remove.
5407         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5408         (v850_print_operand): Handle 'D' and "d".
5409         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5410         Add handling of arithmetic/logical operations compared against zero.
5411         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5412         Do not look at v850_compare_op, instead get mode from last argument.
5413         (v850_gen_compare): Remove
5414         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5415         after reload for prologue insns.
5416         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5417         patterns.
5418         (construct_save_jarl): Likewise.
5419         (TARGET_FLAGS_REGNUM): Define.
5420         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5421         (NOTICE_UPDATE_CC): Remove.
5422         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5423         than cc0.  Conditionalize on reload_completed.
5424         (cmpsi_insn, setfcc_insn): Likewise.
5425         (tst1 splitter): Turn into define_and_split which sets the flags
5426         after reload.
5427         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5428         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5429         (cstoresf4, cstoredf4): Clobber the flags.
5430         (cmpsi, cmpsf, cmpdf): Remove expanders.
5431         (setf_insn): Remove pattern.
5432         (addsi3): Turn into define_and_split which clobbers the flags after
5433         reload and a suitable pattern (addsi3_clobber_flags) for use after
5434         reload.
5435         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5436         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5437         (ashrsi3, ashrsi3_v850e2): Likewise.
5438         (bins): Clobber the flags.
5439         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5440         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5441         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5442         (call_value_internal_short, call_value_internal_long): Likewise.
5443         (callt_save_interrupt, callt_return_interrupt): Likewise.
5444         (save_interrupt, return_interrupt): Likewise.
5445         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5446         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5447         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5448         (All FP comparisons): Only allow after reload has completed.
5449         (trfsr): Likewise.
5450         (divh, divhu): Tweak output template.
5451         (branch_z_normal, branch_z_invert): Remove
5452         (branch_nz_normal, branch_nz_invert): Likewise.
5453         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5455         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5456         * config/v850/v850.c (notice_update_cc): Remove.
5457         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5458         (CC_NO_CARRY): Likewise.
5459         (NOTICE_UPDATE_CC): Define to nothing.
5460         * config/v850/v850.md: Remove block comment on cc0 handling
5461         Remove "cc" attribute from all patterns.  Remove cc_status handling
5462         from all patterns.  Minor formatting fixes.
5464 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5466         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5467         (cortex-a76.cortex-a55): Likewise.
5468         * config/aarch64/aarch64-tune.md: Regenerate.
5469         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5470         cortex-a76.cortex-a55.
5472 2018-06-27  Jeff Law  <law@redhat.com>
5474         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5475         (MULTILIB_DIRNAMES): Similarly.
5477 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5479         * gimple.h (gimple_return_retbnd): Delete.
5480         (gimple_return_set_retbnd): Likewise.
5481         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5482         gimple_return_set_retbnd.
5483         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5484         gimple_return_retbnd and adjust.
5485         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5486         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5487         Explicitly return NULL in a couple more cases.  Move assertion
5488         on debug statements and remove unreachable code.
5489         (reset_debug_binding): Do not test id->retbnd.
5490         (expand_call_inline): Do not set it.
5492 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5494         * configure.ac: Add --disable-gcov option.
5495         * configure: Regenerate.
5496         * Makefile.in: Honour @enable_gcov@.
5497         * doc/install.texi: Document --disable-gcov.
5499 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5501         * config/arm/arm-cpus.in (cortex-a76): New entry.
5502         (cortex-a76.cortex-a55): Likewise.
5503         * config/arm/arm-tables.opt: Regenerate.
5504         * config/arm/arm-tune.md: Likewise.
5505         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5506         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5507         cortex-a76.cortex-a55.
5509 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5511         PR target/85769
5512         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5514 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5516         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5517         comment.
5518         (EPILOGUE_USES): Likewise.
5520 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5522         * tree-inline.c (remap_location): New function extracted from...
5523         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5524         (copy_phis_for_bb): ...here.  Call remap_location.
5525         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5527 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5529         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5530         unaligned vsx for 16B memset.
5532 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5534         PR target/86285
5535         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5536         ieee128_float_type_node to long_double_type_node unless
5537         TARGET_LONG_DOUBLE_128 is set.
5539 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5541         * cfgloop.c (get_loop_location): Convert return type from
5542         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5543         by implicit construction from rtx_insn *, and using
5544         dump_user_location_t::from_function_decl for the fallback case.
5545         * cfgloop.h (get_loop_location): Convert return type from
5546         location_t to dump_user_location_t.
5547         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5548         dump_printf_loc to pass in a dump_location_t rather than a
5549         location_t, via the gimple stmt.
5550         * coverage.c (get_coverage_counts): Update calls to
5551         dump_printf_loc to pass in dump_location_t rather than a
5552         location_t.
5553         * doc/optinfo.texi (Dump types): Convert example of
5554         dump_printf_loc from taking "locus" to taking "insn".  Update
5555         description of the "_loc" calls to cover dump_location_t.
5556         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5557         "selftest.h".
5558         (dump_user_location_t::dump_user_location_t): New constructors,
5559         from gimple *stmt and rtx_insn *.
5560         (dump_user_location_t::from_function_decl): New function.
5561         (dump_loc): Make static.
5562         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5563         const dump_location_t &.
5564         (dump_generic_expr_loc): Delete.
5565         (dump_printf_loc): Convert param "loc" from location_t to
5566         const dump_location_t &.
5567         (selftest::test_impl_location): New function.
5568         (selftest::dumpfile_c_tests): New function.
5569         * dumpfile.h: Include "profile-count.h".
5570         (class dump_user_location_t): New class.
5571         (struct dump_impl_location_t): New struct.
5572         (class dump_location_t): New class.
5573         (dump_printf_loc): Convert 2nd param from source_location to
5574         const dump_location_t &.
5575         (dump_generic_expr_loc): Delete.
5576         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5577         const dump_location_t &.
5578         * gimple-fold.c (fold_gimple_assign): Update call to
5579         dump_printf_loc to pass in a dump_location_t rather than a
5580         location_t, via the gimple stmt.
5581         (gimple_fold_call): Likewise.
5582         * gimple-loop-interchange.cc
5583         (loop_cand::analyze_iloop_reduction_var): Update for change to
5584         check_reduction_path.
5585         (tree_loop_interchange::interchange): Update for change to
5586         find_loop_location.
5587         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5588         change in return-type of find_loop_location.
5589         (graphite_regenerate_ast_isl): Likewise.
5590         * graphite-optimize-isl.c (optimize_isl): Likewise.
5591         * graphite.c (graphite_transform_loops): Likewise.
5592         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5593         pass in a dump_location_t rather than a location_t, via the
5594         gimple stmt.
5595         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5596         * ipa.c (walk_polymorphic_call_targets): Likewise.
5597         * loop-unroll.c (report_unroll): Convert "locus" param from
5598         location_t to dump_location_t.
5599         (decide_unrolling): Update for change to get_loop_location's
5600         return type.
5601         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5602         location_t to dump_user_location_t.
5603         (grid_find_single_omp_among_assignments_1): Updates calls to
5604         dump_printf_loc to pass in a dump_location_t rather than a
5605         location_t, via the gimple stmt.
5606         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5607         location_t to dump_location_t.  Updates calls to dump_printf_loc
5608         to pass in a dump_location_t rather than a location_t, via the
5609         gimple stmt.
5610         (grid_inner_loop_gridifiable_p): Likewise.
5611         (grid_dist_follows_simple_pattern): Likewise.
5612         (grid_gfor_follows_tiling_pattern): Likewise.
5613         (grid_target_follows_gridifiable_pattern): Likewise.
5614         (grid_attempt_target_gridification): Convert initialization
5615         of local "grid" from memset to zero-initialization; FIXME: does
5616         this require C++11?  Update call to dump_printf_loc to pass in a
5617         optinfo_location rather than a location_t, via the gimple stmt.
5618         * profile.c (read_profile_edge_counts): Updates call to
5619         dump_printf_loc to pass in a dump_location_t rather than a
5620         location_t
5621         (compute_branch_probabilities): Likewise.
5622         * selftest-run-tests.c (selftest::run_tests): Call
5623         dumpfile_c_tests.
5624         * selftest.h (dumpfile_c_tests): New decl.
5625         * tree-loop-distribution.c (pass_loop_distribution::execute):
5626         Update for change in return type of find_loop_location.
5627         * tree-parloops.c (parallelize_loops): Likewise.
5628         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5629         "locus" from location_t to dump_user_location_t.
5630         (canonicalize_loop_induction_variables): Likewise.
5631         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5632         for change in return type of find_loop_location.
5633         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5634         to dump_printf_loc to pass in a dump_location_t rather than a
5635         location_t, via the stmt.
5636         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5637         Likewise.
5638         * tree-vect-loop-manip.c (find_loop_location): Convert return
5639         type from source_location to dump_user_location_t.
5640         (vect_do_peeling): Update for above change.
5641         (vect_loop_versioning): Update for change in type of
5642         vect_location.
5643         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5644         from location_t to dump_user_location_t.
5645         (vect_estimate_min_profitable_iters): Update for change in type
5646         of vect_location.
5647         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5648         location_t to dump_location_t.
5649         (vect_slp_bb): Update for change in type of vect_location.
5650         * tree-vectorizer.c (vect_location): Convert from source_location
5651         to dump_user_location_t.
5652         (try_vectorize_loop_1): Update for change in vect_location's type.
5653         (vectorize_loops): Likewise.
5654         (increase_alignment): Likewise.
5655         * tree-vectorizer.h (vect_location): Convert from source_location
5656         to dump_user_location_t.
5657         (find_loop_location): Convert return type from source_location to
5658         dump_user_location_t.
5659         (check_reduction_path): Convert 1st param from location_t to
5660         dump_user_location_t.
5661         * value-prof.c (check_counter): Update call to dump_printf_loc to
5662         pass in a dump_user_location_t rather than a location_t; update
5663         call to error_at for change in type of "locus".
5664         (check_ic_target): Update call to dump_printf_loc to
5665         pass in a dump_user_location_t rather than a location_t, via the
5666         call_stmt.
5668 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5670         * config/s390/s390.h (enum processor_flags): Do not use
5671         default tune parameter when -march was specified.
5673 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5675         PR target/86314
5676         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5677         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5678         operands.
5680 2018-06-26  Richard Biener  <rguenther@suse.de>
5682         PR tree-optimization/86287
5683         PR bootstrap/86316
5684         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5685         (vect_analyze_loop): Initialize n_stmts.
5687 2018-06-26  Richard Biener  <rguenther@suse.de>
5689         PR middle-end/86271
5690         * fold-const.c (fold_convertible_p): Pointer extension
5691         isn't valid.
5693 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5695         PR debug/86064
5696         * dwarf2out.c (loc_list_has_views): Adjust comments.
5697         (dw_loc_list): Split single cross-partition range with
5698         nonzero locview.
5700 2018-06-25  Jeff Law  <law@redhat.com>
5702         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5703         on -mbig-switch by default.
5705         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5706         test.
5707         (const_float_0_operand): Remove unused predicate.
5708         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5709         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5710         (recipsf2): New expander.  Original pattern now called
5711         (recipsf2_insn).
5712         (recipdf2, recipdf2_insn): Similarly.
5713         (rsqrtsf2, rsqrtsf2_insn): Similarly
5714         (rsqrtdf2, rsqrtdf2_insn): Similarly
5716 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5718         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5719         Simplify logic for FreeBSD (twice).
5721 2018-06-25  Martin Sebor  <msebor@redhat.com>
5723         PR tree-optimization/86204
5724         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5725         a strnlen result if it's less than the length of the string.
5727 2018-06-25  Martin Sebor  <msebor@redhat.com>
5729         PR tree-optimization/85700
5730         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5731         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5732         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5734 2018-06-25  Martin Sebor  <msebor@redhat.com>
5736         * doc/extend.texi (Zero-length arrays): Update and clarify.
5738 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5740         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5741         added IEEE/IBM long double multilib support on PowerPC little
5742         endian Linux systems.
5743         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5744         (MULTILIB_DEFAULTS): Likewise.
5745         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5746         Likewise.
5747         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5748         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5749         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5751 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5753         PR middle-end/86311
5754         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5755         (REORDER_45): Likewise.
5757 2018-06-25  Jeff Law  <law@redhat.com>
5759         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5760         dividend to 32 bits.  Adjust length.
5761         (udivmodhi4): Cleanup output template.  Fix length.
5763 2018-06-25  Carl Love  <cel@us.ibm.com>
5765         * config/rs6000/vsx.md: Change word selector to prefered location.
5767 2018-06-25  Richard Biener  <rguenther@suse.de>
5769         PR tree-optimization/86304
5770         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5771         epilogue-if-converted loops as well.
5773 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5775         * lto-section-out.c (lto_begin_section): Do not print section
5776         name for noaddr and unnumbered dumps.
5778 2018-06-25  Richard Biener  <rguenther@suse.de>
5780         * tree-vectorizer.h (struct vec_info_shared): New structure
5781         with parts split out from struct vec_info and loop_nest from
5782         struct _loop_vec_info.
5783         (struct vec_info): Adjust accordingly.
5784         (struct _loop_vec_info): Likewise.
5785         (LOOP_VINFO_LOOP_NEST): Adjust.
5786         (LOOP_VINFO_DATAREFS): Likewise.
5787         (LOOP_VINFO_DDRS): Likewise.
5788         (struct _bb_vec_info): Likewise.
5789         (BB_VINFO_DATAREFS): Likewise.
5790         (BB_VINFO_DDRS): Likewise.
5791         (struct _stmt_vec_info): Add dr_aux member.
5792         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5793         (DR_MISALIGNMENT_UNINITIALIZED): New.
5794         (set_dr_misalignment): Adjust.
5795         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5796         (vect_analyze_loop): Adjust prototype.
5797         (vect_analyze_loop_form): Likewise.
5798         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5799         Compute dependences lazily.
5800         (vect_record_base_alignments): Use shared datarefs/ddrs.
5801         (vect_verify_datarefs_alignment): Likewise.
5802         (vect_analyze_data_refs_alignment): Likewise.
5803         (vect_analyze_data_ref_accesses): Likewise.
5804         (vect_analyze_data_refs): Likewise.
5805         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5806         constructor parameter for shared part.
5807         (vect_analyze_loop_form): Pass in shared part and adjust.
5808         (vect_analyze_loop_2): Pass in storage for the number of
5809         stmts.  Move loop nest finding to the caller.  Compute
5810         datarefs lazily.
5811         (vect_analyze_loop): Pass in shared part.
5812         (vect_transform_loop): Verify shared datarefs are unchanged.
5813         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5814         constructor parameter for shared part.
5815         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5816         (vect_slp_bb): Verify shared datarefs are unchanged before
5817         transform.
5818         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5819         change.
5820         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5821         DR_MISALIGNMENT_UNINITIALIZED.
5822         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5823         parameter for shared part.
5824         (vec_info::~vec_info): Adjust.
5825         (vec_info_shared::vec_info_shared): New.
5826         (vec_info_shared::~vec_info_shared): Likewise.
5827         (vec_info_shared::save_datarefs): Likewise.
5828         (vec_info_shared::check_datarefs): Likewise.
5829         (try_vectorize_loop_1): Construct shared part live for analyses
5830         of a single loop for multiple vector sizes.
5831         * tree-parloops.c (gather_scalar_reductions): Adjust.
5833 2018-06-25  Richard Biener  <rguenther@suse.de>
5835         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5836         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5837         (vect_analyze_data_refs): Remove similar code from here and
5838         simplify accordingly.
5840 2018-06-25  Richard Biener  <rguenther@suse.de>
5842         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5843         for reverse storage order accesses rather than asserting
5844         they cannot happen here.
5846 2018-06-25  Tom de Vries  <tdevries@suse.de>
5848         PR debug/86257
5849         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5850         Use data16 instead of .byte for insn prefix.
5852 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5854         PR C++/86082
5855         * parser.c (make_char_string_pack): Pass this literal chars
5856         through cpp_interpret_string.
5857         (cp_parser_userdef_numeric_literal): Check the result of
5858         make_char_string_pack.
5860 2018-06-24  Maya Rashish  <coypu@sdf.org>
5862         * ginclude/stddef.h: Simplify conditions around avoiding
5863         re-definition of __size_t.
5865 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5867         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5868         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5870 2018-06-22  Maya Rashish  <coypu@sdf.org>
5872         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5873         made to OpenBSD and NetBSD through the years.
5875 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5877         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5878         behavior of vec_pack (vector double, vector double) to match
5879         behavior of vec_float2 (vector double, vector double).
5881 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5883         * gimplify.c (gimplify_function_tree): Prevent creation
5884         of a trampoline for the address of the current function
5885         passed to entry/exit instrumentation hooks.
5887 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5889         PR target/86222
5890         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5891         correctly.
5893 2018-06-22  Martin Liska  <mliska@suse.cz>
5895         PR tree-optimization/86263
5896         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5897         Bail out if is_enabled is false.
5898         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5899         New declaration.
5900         (jump_table_cluster::is_enabled): New function.
5902 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5904         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5905         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5906         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5907         (lto_input_ts_binfo_tree_pointers): Likewise.
5908         * tree-streamer-out.c (streamer_write_tree_bitfields,
5909         write_ts_binfo_tree_pointers): Likewise.
5910         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5912 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5914         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5916 2018-06-22  Martin Liska  <mliska@suse.cz>
5918         * symbol-summary.h (get): Make it pure and inline move
5919         functionality from ::get function.
5920         (get): Remove and inline into ::get and ::get_create.
5921         (get_create): Move code from ::get function.
5923 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5925         PR target/85994
5926         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5927         -x assembler-with-cpp.
5929 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5931         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5932         _FILE_OFFSET_BITS=64 for C++.
5934 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5936         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5937         conversion insn that shows up when pr85657-3.c is compiled using
5938         IEEE 128-bit long double.
5939         (neg<mode>2_internal): Use the correct mode to check whether the
5940         mode is IBM extended.
5941         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5942         multiply and divide external functions from being created more
5943         than once.
5945 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5947         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5948         functions.
5949         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5950         the edge can be forwarded.
5951         (cfg_layout_merge_blocks): Likewise.
5953 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5955         * except.c (finish_eh_generation): Commit edge insertions only after
5956         the EH edges have been redirected from post-landing to landing pads.
5958 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5960         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5961         create_tmp_var_for to create the FRAME decl.
5962         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5964 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5966         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5967         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5968         debug statement when resetting its value.
5969         (expand_call_inline): Copy the locus of the call onto the assignment
5970         of the return value, if any.  Use local variable in more cases.
5972 2018-06-21  Martin Liska  <mliska@suse.cz>
5974         * ipa-pure-const.c (propagate_nothrow): Use
5975         funct_state_summaries->get.
5976         (dump_malloc_lattice): Likewise.
5977         (propagate_malloc): Likewise.
5979 2018-06-21  Richard Biener  <rguenther@suse.de>
5981         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5982         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5983         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5984         comment.
5985         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5986         BLOCK_ABSTRACT_ORIGIN unconditionally.
5988 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5990         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5991         deleting it.
5992         * ipa-reference.c (ipa_reference_c_finalize): Delete
5993         ipa_ref_opt_sum_summaries and set it to NULL.
5995 2018-06-21  Tom de Vries  <tdevries@suse.de>
5997         PR tree-optimization/85859
5998         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5999         test with comment from bb_no_side_effects_p.
6001 2018-06-21  Richard Biener  <rguenther@suse.de>
6003         PR tree-optimization/86232
6004         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
6005         max for constant niter.
6007 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6009         * config/aarch64/aarch64-simd.md
6010         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
6012 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
6014         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
6015         Make opernads of the unspec commutative.
6017 2018-06-21  Richard Biener  <rguenther@suse.de>
6019         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
6020         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
6021         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
6022         (vect_analyze_data_ref_dependence): Re-order checks to deal with
6023         NULL DR_STEP.
6024         (vect_record_base_alignments): Do not record base alignment
6025         for gathers or scatters.
6026         (vect_compute_data_ref_alignment): Drop return value that is always
6027         true.  Bail out early for gathers or scatters.
6028         (vect_enhance_data_refs_alignment): Bail out early for gathers
6029         or scatters.
6030         (vect_find_same_alignment_drs): Likewise.
6031         (vect_analyze_data_refs_alignment): Remove dead code.
6032         (vect_slp_analyze_and_verify_node_alignment): Likewise.
6033         (vect_analyze_data_refs): For possible gathers or scatters do
6034         not create an alternate DR, just check their possible validity
6035         and mark them.  Adjust DECL_NONALIASED handling to not rely
6036         on DR_BASE_ADDRESS.
6037         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
6038         update inits of gathers or scatters.
6039         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
6040         Also copy gather/scatter flag to pattern vinfo.
6042 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
6044         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
6045         behavior of vec_packsu (vector unsigned long long, vector unsigned
6046         long long) to match behavior of vec_packs with same signature.
6048 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
6049             Thomas Schwinge <thomas@codesourcery.com>
6050             Cesar Philippidis  <cesar@codesourcery.com>
6052         * gimplify.c (gimplify_scan_omp_clauses): Add support for
6053         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6054         (gimplify_adjust_omp_clauses): Likewise.
6055         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
6056         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
6057         (gimplify_omp_target_update): Update handling of acc update and
6058         enter/exit data.
6059         * omp-low.c (install_var_field): Remove unused parameter
6060         base_pointers_restrict.
6061         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
6062         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
6063         FINALIZE}
6064         (omp_target_base_pointers_restrict_p): Delete.
6065         (scan_omp_target): Update call to scan_sharing_clauses.
6066         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
6067         FINALIZE}.
6068         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
6069         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
6070         (convert_local_omp_clauses): Likewise.
6071         * tree-pretty-print.c (dump_omp_clause): Likewise.
6072         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
6073         FINALIZE}.
6074         (omp_clause_code_name): Likewise.
6076 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6078         PR debug/86194
6079         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
6080         be narrowed.
6082         PR tree-optimization/86231
6083         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
6084         anti-range don't overwrite *vr0min before using it to compute *vr0max.
6086 2018-06-20  Tom de Vries  <tdevries@suse.de>
6088         PR tree-optimization/86097
6089         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
6090         iv type if signedness of iv type is not the same as that of *nit.
6092 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
6094         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
6095         EDGE_EH edges, verify they are all EDGE_EH.
6097 2018-06-20  Maya Rashish  <coypu@sdf.org>
6099         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
6101 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6103         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
6104         * config/aarch64/aarch64.c (xgene1_tunings): Add
6105         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
6106         (aarch64_mode_valid_for_sched_fusion_p):
6107         Allow 16-byte modes.
6108         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
6109         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
6110         128-bit modes.
6111         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
6112         New pattern.
6113         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6114         * config/aarch64/iterators.md (VQ2): New mode iterator.
6116 2018-06-20  Martin Liska  <mliska@suse.cz>
6118         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6119         Change default ratio from 10 to 8.
6121 2018-06-20  Martin Liska  <mliska@suse.cz>
6123         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6124         New.
6125         (bit_test_cluster::find_bit_tests): Likewise.
6126         (switch_decision_tree::analyze_switch_statement): Find clusters.
6127         * tree-switch-conversion.h (struct jump_table_cluster): Document
6128         hierarchy.
6130 2018-06-20  Martin Liska  <mliska@suse.cz>
6132         * tree-switch-conversion.c (switch_conversion::collect):
6133         Record m_uniq property.
6134         (switch_conversion::expand): Bail out for special conditions.
6135         (group_cluster::~group_cluster): New.
6136         (group_cluster::group_cluster): Likewise.
6137         (group_cluster::dump): Likewise.
6138         (jump_table_cluster::emit): New.
6139         (switch_decision_tree::fix_phi_operands_for_edges): New.
6140         (struct case_node): Remove struct.
6141         (jump_table_cluster::can_be_handled): New.
6142         (case_values_threshold): Moved to header.
6143         (reset_out_edges_aux): Likewise.
6144         (jump_table_cluster::is_beneficial): New.
6145         (bit_test_cluster::can_be_handled): Likewise.
6146         (add_case_node): Remove.
6147         (bit_test_cluster::is_beneficial): New.
6148         (case_bit_test::cmp): New.
6149         (bit_test_cluster::emit): New.
6150         (expand_switch_as_decision_tree_p): Remove.
6151         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6152         (fix_phi_operands_for_edge): Likewise.
6153         (switch_decision_tree::analyze_switch_statement): New.
6154         (compute_cases_per_edge): Move ...
6155         (switch_decision_tree::compute_cases_per_edge): ... here.
6156         (try_switch_expansion): Likewise.
6157         (switch_decision_tree::try_switch_expansion): Likewise.
6158         (record_phi_operand_mapping): Likewise.
6159         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6160         (emit_case_decision_tree): Likewise.
6161         (switch_decision_tree::emit): Likewise.
6162         (balance_case_nodes): Likewise.
6163         (switch_decision_tree::balance_case_nodes): Likewise.
6164         (dump_case_nodes): Likewise.
6165         (switch_decision_tree::dump_case_nodes): Likewise.
6166         (emit_jump): Likewise.
6167         (switch_decision_tree::emit_jump): Likewise.
6168         (emit_cmp_and_jump_insns): Likewise.
6169         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6170         (emit_case_nodes): Likewise.
6171         (switch_decision_tree::emit_case_nodes): Likewise.
6172         (conditional_probability): Remove.
6173         * tree-switch-conversion.h (enum cluster_type): New.
6174         (PRINT_CASE): New.
6175         (struct cluster): Likewise.
6176         (cluster::cluster): Likewise.
6177         (struct simple_cluster): Likewise.
6178         (simple_cluster::simple_cluster): Likewise.
6179         (struct group_cluster): Likewise.
6180         (struct jump_table_cluster): Likewise.
6181         (struct bit_test_cluster): Likewise.
6182         (struct min_cluster_item): Likewise.
6183         (struct case_tree_node): Likewise.
6184         (case_tree_node::case_tree_node): Likewise.
6185         (jump_table_cluster::case_values_threshold): Likewise.
6186         (struct case_bit_test): Likewise.
6187         (struct switch_decision_tree): Likewise.
6188         (struct switch_conversion): Likewise.
6189         (switch_decision_tree::reset_out_edges_aux): Likewise.
6191 2018-06-20  Martin Liska  <mliska@suse.cz>
6193         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6194         (hoist_edge_and_branch_if_true): Likewise.
6195         (expand_switch_using_bit_tests_p): Likewise.
6196         (struct case_bit_test): Likewise.
6197         (case_bit_test_cmp): Likewise.
6198         (emit_case_bit_tests): Likewise.
6199         (switch_conversion::switch_conversion): New class.
6200         (struct switch_conv_info): Remove old struct.
6201         (collect_switch_conv_info): More to ...
6202         (switch_conversion::collect): ... this.
6203         (check_range): Likewise.
6204         (switch_conversion::check_range): Likewise.
6205         (check_all_empty_except_final): Likewise.
6206         (switch_conversion::check_all_empty_except_final): Likewise.
6207         (check_final_bb): Likewise.
6208         (switch_conversion::check_final_bb): Likewise.
6209         (create_temp_arrays): Likewise.
6210         (switch_conversion::create_temp_arrays): Likewise.
6211         (free_temp_arrays): Likewise.
6212         (gather_default_values): Likewise.
6213         (switch_conversion::gather_default_values): Likewise.
6214         (build_constructors): Likewise.
6215         (switch_conversion::build_constructors): Likewise.
6216         (constructor_contains_same_values_p): Likewise.
6217         (switch_conversion::contains_same_values_p): Likewise.
6218         (array_value_type): Likewise.
6219         (switch_conversion::array_value_type): Likewise.
6220         (build_one_array): Likewise.
6221         (switch_conversion::build_one_array): Likewise.
6222         (build_arrays): Likewise.
6223         (switch_conversion::build_arrays): Likewise.
6224         (gen_def_assigns): Likewise.
6225         (switch_conversion::gen_def_assigns): Likewise.
6226         (prune_bbs): Likewise.
6227         (switch_conversion::prune_bbs): Likewise.
6228         (fix_phi_nodes): Likewise.
6229         (switch_conversion::fix_phi_nodes): Likewise.
6230         (gen_inbound_check): Likewise.
6231         (switch_conversion::gen_inbound_check): Likewise.
6232         (process_switch): Use the newly created class.
6233         (switch_conversion::expand): New.
6234         (switch_conversion::~switch_conversion): New.
6235         * tree-switch-conversion.h: New file.
6237 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6239         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6240         tree-vect-patterns.c.
6241         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6242         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6243         (vect_recog_sad_pattern): Likewise.
6244         (vect_recog_widen_sum_pattern): Likewise.
6245         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6246         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6247         (vect_recog_rotate_pattern): Likewise.
6248         (vect_recog_mult_pattern): Likewise.
6249         (vect_recog_vector_vector_shift_pattern): Likewise.
6250         (vect_recog_divmod_pattern): Likewise.
6251         (vect_recog_mixed_size_cond_pattern): Likewise.
6252         (vect_recog_bool_pattern): Likewise.
6253         (vect_recog_mask_conversion_pattern): Likewise.
6254         (vect_try_gather_scatter_pattern): Likewise.
6255         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6256         (vect_recog_over_widening_pattern): Likewise.
6257         (vect_recog_gather_scatter_pattern): Likewise.
6258         (vect_recog_func_ptr): Move from tree-vectorizer.h
6259         (vect_vect_recog_func_ptrs): Move further down the file.
6260         (vect_recog_func): Likewise.  Remove the third argument.
6261         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6262         (vect_pattern_recog_1): Expect the pattern function to do any
6263         necessary target tests.  Also expect it to provide a vector type.
6264         Remove the type_in handling.
6266 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6268         * tree-vect-patterns.c (vect_pattern_detected): New function.
6269         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6270         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6271         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6272         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6273         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6274         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6275         (vect_recog_mask_conversion_pattern)
6276         (vect_try_gather_scatter_pattern): Likewise.
6278 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6280         * tree-vect-patterns.c (vect_get_internal_def): New function.
6281         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6282         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6283         (search_type_for_mask_1): Use it.
6285 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6287         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6288         redundant WIDEN_SUM_EXPR handling.
6289         (vect_recog_sad_pattern): Likewise.
6291 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6293         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6294         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6295         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6296         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6297         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6299 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6301         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6302         use the stmt_vec_info of the original bb statement for the
6303         new zero assignment, even if the call is part of a pattern.
6305 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6307         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6308         that the sequence is attached to the original statement rather
6309         than the pattern statement.
6310         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6311         PATTERN_DEF_SEQ from the original statement rather than
6312         the main pattern statement.
6313         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6314         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6315         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6317 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6319         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6320         definition statements before the early exit for statements that aren't
6321         live or relevant.
6322         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6323         split out from...
6324         (vect_transform_loop): ...here.  Process pattern definition
6325         statements without first checking whether the main pattern
6326         statement is live or relevant.
6328 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6330         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6331         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6333 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6335         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6336         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6337         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6338         (expand_block_compare): Change select_block_compare_mode call.
6339         (expand_strncmp_align_check): Use new functions, fix comment.
6340         (emit_final_str_compare_gpr): New function.
6341         (expand_strn_compare): Refactor and clean up code.
6342         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6344 2018-06-19  Tony Reix  <tony.reix@atos.com>
6345             Damien Bergamini  <damien.bergamini@atos.com>
6346             David Edelsohn  <dje.gcc@gmail.com>
6348         * collect2.c (static_obj): New variable.
6349         (static_libs): New variable.
6350         (is_in_list): Uncomment declaration.
6351         (main): Track AIX libraries linked statically.
6352         (is_in_list): Uncomment definition.
6353         (scan_prog_file): Don't add AIX shared libraries initializer
6354         to constructor list if linking statically.
6356 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6358         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6359         constant.
6360         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6362 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6364         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6365         blocks.
6367 2018-06-19  Martin Liska  <mliska@suse.cz>
6369         * config/i386/i386.c (ix86_can_inline_p): Do not use
6370         ipa_fn_summaries::get_create.
6371         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6372         get.
6373         (devirtualization_time_bonus): Likewise.
6374         (ipcp_propagate_stage): Likewise.
6375         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6376         (edge_set_predicate): Likewise.
6377         (evaluate_conditions_for_known_args): Likewise.
6378         (evaluate_properties_for_edge): Likewise.
6379         (ipa_call_summary::reset): Tranform to ...
6380         (ipa_call_summary::~ipa_call_summary): ... this.
6381         (ipa_fn_summary::reset): Transform to ...
6382         (ipa_fn_summary::~ipa_fn_summary): ... this.
6383         (ipa_fn_summary_t::remove): Rename to ...
6384         (ipa_fn_summary_t::remove_callees): ... this.
6385         (ipa_fn_summary_t::duplicate): Use placement new
6386         instead of memory copy.
6387         (ipa_call_summary_t::duplicate): Likewise.
6388         (ipa_call_summary_t::remove): Remove.
6389         (dump_ipa_call_summary): Change get_create to get.
6390         (ipa_dump_fn_summary): Dump only when summary exists.
6391         (analyze_function_body): Use symbol_summary::get instead
6392         of get_create.
6393         (compute_fn_summary): Likewise.
6394         (estimate_edge_devirt_benefit): Likewise.
6395         (estimate_edge_size_and_time): Likewise.
6396         (inline_update_callee_summaries): Likewise.
6397         (remap_edge_change_prob): Likewise.
6398         (remap_edge_summaries): Likewise.
6399         (ipa_merge_fn_summary_after_inlining): Likewise.
6400         (write_ipa_call_summary): Likewise.
6401         (ipa_fn_summary_write): Likewise.
6402         (ipa_free_fn_summary): Likewise.
6403         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6404         (struct ipa_call_summary): Likewise.
6405         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6406         of get_create.
6407         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6408         (estimate_size_after_inlining): Likewise.
6409         (estimate_growth): Likewise.
6410         (growth_likely_positive): Likewise.
6411         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6412         (inline_call): Likewise.
6413         * ipa-inline.c (caller_growth_limits): Likewise.
6414         (can_inline_edge_p): Likewise.
6415         (can_inline_edge_by_limits_p): Likewise.
6416         (compute_uninlined_call_time): Likewise.
6417         (compute_inlined_call_time): Likewise.
6418         (want_inline_small_function_p): Likewise.
6419         (edge_badness): Likewise.
6420         (update_caller_keys): Likewise.
6421         (update_callee_keys): Likewise.
6422         (inline_small_functions): Likewise.
6423         (inline_to_all_callers_1): Likewise.
6424         (dump_overall_stats): Likewise.
6425         (early_inline_small_functions): Likewise.
6426         (early_inliner): Likewise.
6427         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6428         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6429         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6430         * ipa-split.c (execute_split_functions): Likewise.
6431         * symbol-summary.h: Likewise.
6432         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6434 2018-06-19  Richard Biener  <rguenther@suse.de>
6436         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6437         (vectorize_loops): ... here.  Fix dbgcnt handling.
6438         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6440 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6442         PR target/86197
6443         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6444         ieee128 argument takes up only one (vector) register, not two (floating
6445         point) registers.
6447 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6449         * gimplify.c (gimplify_init_constructor): Really never clear for an
6450         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6452 2018-06-19  Richard Biener  <rguenther@suse.de>
6454         PR tree-optimization/86179
6455         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6456         after failed recognition.
6458 2018-06-18  Martin Sebor  <msebor@redhat.com>
6460         PR middle-end/85602
6461         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6462         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6463         Handle integer subtraction.
6464         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6465         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6467 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6469         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6470         param from rtx to rtx_insn *.
6471         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6472         param.
6473         (frv_ifcvt_modify_insn): Likwise.
6474         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6475         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6476         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6477         as_a <rtx_insn *> cast to local "unprotected_region" once
6478         it's been established that it's not NULL or pc_rtx.
6479         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6480         param "sethi" from rtx to rtx_insn *.
6481         (nds32_group_float_insns): Likewise for param "insn".
6482         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6483         param.
6484         (vax_output_int_subtract): Likewise.
6485         * config/vax/vax.c (vax_output_int_add): Likewise for param
6486         "insn".
6487         (vax_output_int_subtract): Likewise.
6488         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6489         (emit_pattern_after): Likewise for param "after".
6490         (emit_insn_after): Likewise.
6491         (emit_jump_insn_after): Likewise.
6492         (emit_call_insn_after): Likewise.
6493         (emit_debug_insn_after): Likewise.
6494         (emit_pattern_before): Likewise for param "before".
6495         (emit_insn_before): Likewise.
6496         (emit_jump_insn_before): Likewise.
6497         * final.c (get_insn_template): Likewise for param "insn", removing
6498         a cast.
6499         * output.h (get_insn_template): Likewise for 2nd param.
6500         * rtl.h (emit_insn_before): Likewise.
6501         (emit_jump_insn_before): Likewise.
6502         (emit_debug_insn_before_noloc): Likewise.
6503         (emit_insn_after): Likewise.
6504         (emit_jump_insn_after): Likewise.
6505         (emit_call_insn_after): Likewise.
6506         (emit_debug_insn_after): Likewise.
6507         (set_insn_deleted): Likewise for param.
6509 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6511         PR target/85358
6512         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6513         floating point modes, so that IFmode is numerically greater than
6514         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6515         to declare the ordering.  This prevents IFmode from being
6516         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6517         machine.  Include rs6000-modes.h to share the fractional values
6518         between genmodes* and the rest of the compiler.
6519         (IFmode): Likewise.
6520         (KFmode): Likewise.
6521         (TFmode): Likewise.
6522         * config/rs6000/rs6000-modes.h: New file.
6523         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6524         meaning of rs6000_long_double_size so that 126..128 selects an
6525         appropriate 128-bit floating point type.
6526         (rs6000_option_override_internal): Likewise.
6527         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6528         (TARGET_LONG_DOUBLE_128): Change the meaning of
6529         rs6000_long_double_size so that 126..128 selects an appropriate
6530         128-bit floating point type.
6531         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6532         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6533         source and destination to match the standard usage.
6534         (truncifkf2): Likewise.
6535         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6536         ISA 2.07 to use an explicit clobber, instead of passing in a
6537         temporary.
6538         (copysign<mode>3_soft): Likewise.
6540 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6542         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6543         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6544         (vect_slp_analyze_instance_dependence): Likewise.
6545         (vect_enhance_data_refs_alignment): Likewise.
6546         (vect_analyze_data_refs_alignment): Likewise.
6547         (vect_slp_analyze_and_verify_instance_alignment
6548         (vect_analyze_data_ref_accesses): Likewise.
6549         (vect_prune_runtime_alias_test_list): Likewise.
6550         (vect_analyze_data_refs): Likewise.
6551         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6552         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6553         (vect_analyze_scalar_cycles_1): Likewise.
6554         (vect_get_loop_niters): Likewise.
6555         (vect_analyze_loop_form_1): Likewise.
6556         (vect_update_vf_for_slp): Likewise.
6557         (vect_analyze_loop_operations): Likewise.
6558         (vect_analyze_loop): Likewise.
6559         (vectorizable_induction): Likewise.
6560         (vect_transform_loop): Likewise.
6561         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6562         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6563         (vect_make_slp_decision): Likewise.
6564         (vect_detect_hybrid_slp): Likewise.
6565         (vect_slp_analyze_operations): Likewise.
6566         (vect_slp_bb): Likewise.
6567         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6568         (vectorizable_bswap): Likewise.
6569         (vectorizable_call): Likewise.
6570         (vectorizable_simd_clone_call): Likewise.
6571         (vectorizable_conversion): Likewise.
6572         (vectorizable_assignment): Likewise.
6573         (vectorizable_shift): Likewise.
6574         (vectorizable_operation): Likewise.
6575         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6577 2018-06-18  Martin Sebor  <msebor@redhat.com>
6579         PR tree-optimization/81384
6580         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6581         * builtins.c (expand_builtin_strnlen): New function.
6582         (expand_builtin): Call it.
6583         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6584         * builtins.def (BUILT_IN_STRNLEN): New.
6585         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6586         Warn for bounds in excess of maximum object size.
6587         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6588         single-value ranges.  Handle strnlen.
6589         (handle_builtin_strlen): Handle strnlen.
6590         (strlen_check_and_optimize_stmt): Same.
6591         * doc/extend.texi (Other Builtins): Document strnlen.
6593 2018-06-18  Maya Rashish  <coypu@sdf.org>
6595         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6596         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6597         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6599         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6600         here to ...
6601         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6603 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6605         * tree.c (escaped_string::escape): Replace cast to char * by
6606         const_cast<char *> (unescaped).
6608 2018-06-18  Nick Clifton  <nickc@redhat.com>
6610         PR 84195
6611         * tree.c (escaped_string): New class.  Converts an unescaped
6612         string into its escaped equivalent.
6613         (warn_deprecated_use): Use the new class to convert the
6614         deprecation message, if present.
6615         (test_escaped_strings): New self test.
6616         (test_c_tests): Add test_escaped_strings.
6617         * doc/extend.texi (deprecated): Add a note that the
6618         deprecation message is affected by the -fmessage-length
6619         option, and that control characters will be escaped.
6620         (#pragma GCC error): Document this pragma.
6621         (#pragma GCC warning): Likewise.
6622         * doc/invoke.texi (-fmessage-length): Document this option's
6623         effect on the #warning and #error preprocessor directives and
6624         the deprecated attribute.
6626 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6628         * tree.c (decl_value_expr_lookup): Revert latest change.
6629         (decl_value_expr_insert): Likewise.
6631 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6633         * gimplify.c (nonlocal_vlas): Delete.
6634         (nonlocal_vla_vars): Likewise.
6635         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6636         referenced VLAs.
6637         (gimplify_body): Do not create and destroy nonlocal_vlas.
6638         * tree-nested.c: Include diagnostic.h.
6639         (use_pointer_in_frame): Tweak.
6640         (lookup_field_for_decl): Add assertion and declare the transformation.
6641         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6642         internal error when the reference is in a wrong context.  Do not
6643         create a debug decl by default.
6644         (note_nonlocal_block_vlas): Delete.
6645         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6646         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6647         create a debug decl by default.
6648         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6649         call is in a wrong context.
6650         (fixup_vla_decls): New function.
6651         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6652         debug variables were created.
6653         * tree.c (decl_value_expr_lookup): Add checking assertion.
6654         (decl_value_expr_insert): Likewise.
6656 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6658         PR middle-end/82479
6659         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6660         * tree-scalar-evolution.c (interpret_expr): Likewise.
6661         (expression_expensive_p): Likewise.
6662         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6663         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6664         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6665         (ssa_defined_by_minus_one_stmt_p): New.
6667 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6669         PR middle-end/64946
6670         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6671         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6672         * dojump.c (do_jump): Likewise.
6673         * expr.c (expand_expr_real_2): Check operand type's sign.
6674         * fold-const.c (const_unop): Handle ABSU_EXPR.
6675         (fold_abs_const): Likewise.
6676         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6677         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6678         (strip_sign_op_1): Likesise.
6679         * match.pd: Add new pattern to generate ABSU_EXPR.
6680         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6681         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6682         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6683         * tree-inline.c (estimate_operator_cost): Likewise.
6684         * tree-pretty-print.c (dump_generic_node): Likewise.
6685         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6686         * tree.def (ABSU_EXPR): New.
6688 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6690         PR middle-end/86095
6691         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6692         documented as preserved for backward compatibility only.
6693         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6695         PR rtl-optimization/86108
6696         * bb-reorder.c (create_forwarder_block): Renamed to ...
6697         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6698         jump from new landing pad to the second part.
6699         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6700         Adjust callers.
6702 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6704         PR middle-end/85878
6705         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6706         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6707         Only call store_expr for halves if the mode is the same.
6709         PR middle-end/86123
6710         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6711         Fix up comment formatting.
6713 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6715         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6716         (typed_splay_tree::closure,
6717         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6718         (typed_splay_tree::typed_splay_tree,
6719         typed_splay_tree::operator =): Declared private.
6720         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6721         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6722         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6723         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6724         typed_splay_tree::splay_tree_splay,
6725         typed_splay_tree::splay_tree_foreach_helper,
6726         typed_splay_tree::splay_tree_insert,
6727         typed_splay_tree::splay_tree_remove,
6728         typed_splay_tree::splay_tree_lookup,
6729         typed_splay_tree::splay_tree_predecessor,
6730         typed_splay_tree::splay_tree_successor,
6731         typed_splay_tree::splay_tree_min,
6732         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6733         (typed_splay_tree::root, typed_splay_tree::comp,
6734         typed_splay_tree::delete_key,
6735         typed_splay_tree::delete_value): New data members.
6736         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6737         typed_splay_tree::remove.
6739 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6741         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6742         -mginv and -mno-ginv to the assembler.
6743         * config/mips/mips.opt (-mcrc): New option.
6744         (-mginv): Likewise.
6745         * doc/invoke.text (-mcrc): Document.
6746         (-mginv): Likewise.
6748 2018-06-15  Nick Clifton  <nickc@redhat.com>
6750         PR 84195
6751         * tree.c (escaped_string): New class.  Converts an unescaped
6752         string into its escaped equivalent.
6753         (warn_deprecated_use): Use the new class to convert the
6754         deprecation message, if present.
6755         (test_escaped_strings): New self test.
6756         (test_c_tests): Add test_escaped_strings.
6757         * doc/extend.texi (deprecated): Add a note that the
6758         deprecation message is affected by the -fmessage-length
6759         option, and that control characters will be escaped.
6760         (#pragma GCC error): Document this pragma.
6761         (#pragma GCC warning): Likewise.
6762         * doc/invoke.texi (-fmessage-length): Document this option's
6763         effect on the #warning and #error preprocessor directives and
6764         the deprecated attribute.
6766 2018-06-15  Richard Biener  <rguenther@suse.de>
6768         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6769         here, also noting vector size used.
6770         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6771         size used in MSG_OPTIMIZED_LOCATIONS dump.
6772         (pass_slp_vectorize::execute): Adjust.
6774 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6776         PR target/85968
6777         * config/arc/arc.c (arc_return_address_register): Fix
6778         if-condition.
6780 2018-06-15  Richard Biener  <rguenther@suse.de>
6782         PR middle-end/86159
6783         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6784         leave useless conversion stripping to force_gimple_operand_gsi.
6785         (gimplify_build2): Likewise.
6786         (gimplify_build1): Likewise.
6788 2018-06-15  Richard Biener  <rguenther@suse.de>
6790         PR middle-end/86076
6791         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6792         before adjusting their block.
6794 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6796         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6797         multilibs for *-*-rtems*.
6798         * config/riscv/t-rtems: New file.
6800 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6802         PR middle-end/86122
6803         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6804         unsigned_type_for returns NULL.
6806         PR target/85945
6807         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6808         subregs of multi-word pseudos unless the float mode has word size.
6810 2018-06-14  Richard Biener  <rguenther@suse.de>
6812         PR middle-end/86139
6813         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6814         duplicate and harmful type_hash_canon.
6815         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6817 2018-06-14  Richard Biener  <rguenther@suse.de>
6819         PR ipa/86124
6820         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6821         NULL cgraph_node.
6823 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6825         * config/rtems.h (STDINT_LONG32): Define.
6827 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6828             Prachi Godbole  <prachi.godbole@imgtec.com>
6830         * config/mips/mips-cpus.def: Define P6600.
6831         * config/mips/mips-tables.opt: Regenerate.
6832         * config/mips/mips.c (mips_ucbranch_type): New enum.
6833         (mips_rtx_cost_data): Add support for P6600.
6834         (mips_issue_rate): Likewise.
6835         (mips_multipass_dfa_lookahead): Likewise.
6836         (mips_avoid_hazard): Likewise.
6837         (mips_reorg_process_insns): Likewise.
6838         (mips_classify_branch_p6600): New function.
6839         * config/mips/mips.h (TUNE_P6600): New define.
6840         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6841         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6842         * config/mips/mips.md: Include p6600.md.
6843         (processor): Add p6600.
6844         * config/mips/p6600.md: New file.
6845         * doc/invoke.texi: Add p6600 to supported architectures.
6847 2018-06-13  Martin Sebor  <msebor@redhat.com>
6849         PR tree-optimization/86114
6850         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6851         of integer types.
6852         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6854 2018-06-13  Richard Biener  <rguenther@suse.de>
6856         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6857         Properly set vector type of the intermediate stmt.
6858         * tree-vect-stmts.c (vectorizable_operation): The destination
6859         var always has vectype_out type.
6861 2018-06-13  Jeff Law  <law@redhat.com>
6863         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6864         integer 0 for argument to print_rtl_with_bb.
6865         (rl78_reorg): Likewise.
6867 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6869         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6870         from rtx to rtx_insn *.
6871         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6872         "label".
6873         (add_sched_insns_for_speculation): Likewise for local "target",
6874         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6875         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6876         from rtx_insn ** to rtx_code_label **.
6877         (reorg_emit_nops): Likewise.
6878         (c6x_reorg): Likewise for local "call_labels".
6879         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6880         rtx to rtx_insn *.
6881         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6882         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6883         the loops over LABEL_REFS.
6884         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6885         braf_label.
6886         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6887         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6888         (split_branches): Strengthen local "olabel" from rtx to
6889         rtx_insn *, adding a safe_as_a cast.
6890         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6891         to "rtx_insn *".
6892         (add_insn_after): Likewise for first two params.
6893         (add_insn_before): Likewise.
6894         (remove_insn): Likewise for param.
6895         (emit_pattern_before_noloc): Likewise for second and third params.
6896         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6897         (emit_call_insn_before_noloc): Likewise.
6898         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6899         to "rtx_insn *".
6900         (emit_barrier_before): Likewise.
6901         (emit_label_before): Strengthen "label" param from "rtx" to
6902         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6903         "rtx_insn *".
6904         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6905         "rtx_insn *".
6906         (emit_pattern_after_noloc): Likewise.
6907         (emit_insn_after_noloc): Likewise.
6908         (emit_jump_insn_after_noloc): Likewise.
6909         (emit_call_insn_after_noloc): Likewise.
6910         (emit_debug_insn_after_noloc): Likewise.
6911         (emit_barrier_after): Likewise.
6912         (emit_label_after): Likewise for both params.
6913         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6914         "loc" param from "int" to "location_t".
6915         (emit_insn_after_setloc): Likewise.
6916         (emit_jump_insn_after_setloc): Likewise.
6917         (emit_call_insn_after_setloc): Likewise.
6918         (emit_debug_insn_after_setloc): Likewise.
6919         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6920         "loc" param from "int" to "location_t".
6921         (emit_pattern_before): Convert NULL_RTX to NULL.
6922         (emit_insn_before_setloc): Convert "loc" param from "int" to
6923         "location_t".
6924         (emit_jump_insn_before_setloc): Likewise.
6925         (emit_call_insn_before_setloc): Likewise.
6926         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6927         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6928         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6929         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6930         Convert 3rd param from "int" to "location_t".
6931         (emit_barrier_before, emit_barrier_after, next_real_insn):
6932         Strengthen param from rtx to rtx_insn *.
6933         (emit_label_before): Strengthen 1st param from "rtx" to
6934         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6935         "rtx_insn *".
6936         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6937         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6938         Strengthen 2nd param from "rtx" to "rtx_insn *".
6939         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6940         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6941         Likewise. Convert 3rd param from "int" to "location_t".
6942         (emit_label_after): Strengthen 1st param from "rtx" to
6943         "rtx_code_label *".
6944         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6945         "rtx_insn *".
6946         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6947         from "rtx" to "rtx_insn *".
6949 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6951         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6952         bodies streamed in with -Q.
6953         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6954         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6955         * gimple-streamer-out.c: Include gimple-pretty-print.h
6956         (output_bb): Dump stmts streamed.
6957         * lto-section-out.c: Include print-tree.h
6958         (lto_begin_section): Dump sections created.
6959         (lto_output_decl_index): Dump decl encoded.
6960         * lto-streamer-out.c: Include print-tree.h
6961         (create_output_block): Dump output block created.
6962         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6963         (output_function): Dump function output.
6964         (output_constructor): Dump constructor streamed.
6965         (write_global_stream): Output indexes encoded.
6966         (produce_asm_for_decls): Dump streams encoded.
6967         * lto-streamer.c (streamer_dump_file): New global var.
6968         * lto-streamer.h (streamer_dump_file): Declare.
6969         * passes.c (ipa_write_summaries): Initialize streamer dump.
6970         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6971         in.
6973 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6975         PR target/86048
6976         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6977         offsets for register save directives.  Emit a second batch of save
6978         directives, if need be, when the function accesses prior frames.
6980 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6982         * config/arc/fpu.md (fmasf4): Force operand to register.
6983         (fnmasf4): Likewise.
6985 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6987         * config/arc/arc-protos.h (arc_pad_return): Remove.
6988         * config/arc/arc.c (machine_function): Remove force_short_suffix
6989         and size_reason.
6990         (arc_print_operand): Adjust printing of '&'.
6991         (arc_verify_short): Remove conditional printing of short suffix.
6992         (arc_final_prescan_insn): Remove reference to size_reason.
6993         (pad_return): New function.
6994         (arc_reorg): Call pad_return.
6995         (arc_pad_return): Remove.
6996         (arc_init_machine_status): Remove reference to force_short_suffix.
6997         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6998         (attr length): When attribute iscompact is true force to 2
6999         regardless; in the case of maybe check if we want to force the
7000         instruction to have 4 bytes length.
7001         (nopv): Change it to generate 4 byte long nop as well.
7002         (blockage): New pattern.
7003         (simple_return): Remove call to arc_pad_return.
7004         (p_return_i): Likewise.
7006 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7008         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
7010 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7012         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
7013         ARC cores.
7015 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7017         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
7018         for ARC700 and ARCv2.
7020 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
7022         PR target/86076
7023         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
7024         operands[2] instead of operands[1].
7027 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7029         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
7030         case, check whether the outer register overlaps an unallocatable
7031         register, not just whether it fits the required class.
7033 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
7035         * poly-int.h (can_div_trunc_p): Add new overload in which all values
7036         are poly_ints.
7037         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
7038         (memrefs_conflict_p): Likewise.
7039         (init_alias_analysis): Likewise.
7040         * cfgexpand.c (expand_debug_expr): Likewise.
7041         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
7042         * cse.c (fold_rtx): Likewise.
7043         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
7044         * expr.c (emit_block_move_hints): Likewise.
7045         (clear_storage_hints, push_block, emit_push_insn): Likewise.
7046         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
7047         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
7048         (emit_group_store): Likewise.
7049         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
7050         to read the PRE/POST_MODIFY increment.
7051         * calls.c (store_one_arg): Use strip_offset.
7052         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
7053         poly_int_rtx_p.
7054         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
7055         by a VEC_SELECT.
7056         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
7057         (simplify_binary_operation_1): Extend CONST_INT handling to
7058         poly_int_rtx_p.
7059         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
7060         than a HOST_WIDE_INT.
7061         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
7062         poly_int64.
7063         (adjust_mems, add_stores): Update accodingly.
7064         (vt_canonicalize_addr): Track polynomial offsets.
7065         (emit_note_insn_var_location): Likewise.
7066         (vt_add_function_parameter): Likewise.
7067         (vt_initialize): Likewise.
7069 2018-06-12  Jeff Law  <law@redhat.com>
7071         * config.gcc (alpha*-*-freebsd*): Remove.
7072         * config/alpha/freebsd.h: Remove.
7074 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
7076         PR other/69968
7077         * spellcheck-tree.c (levenshtein_distance): Rename to...
7078         (get_edit_distance): ...this, and update for underlying renaming.
7079         * spellcheck-tree.h (levenshtein_distance): Rename to...
7080         (get_edit_distance): ...this.
7081         * spellcheck.c (levenshtein_distance): Rename to...
7082         (get_edit_distance): ...this.  Convert from Levenshtein distance
7083         to Damerau-Levenshtein distance by supporting transpositions of
7084         adjacent characters.  Rename "v1" to "v_next" and "v0" to
7085         "v_one_ago".
7086         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
7087         (selftest::test_edit_distance_unit_test_oneway): ...this, and
7088         update for underlying renaming.
7089         (selftest::levenshtein_distance_unit_test): Rename to...
7090         (selftest::test_get_edit_distance_unit): ...this, and update for
7091         underlying renaming.
7092         (selftest::test_find_closest_string): Add example from PR 69968
7093         where transposition helps
7094         (selftest::test_metric_conditions): Update for renaming.
7095         (selftest::test_metric_conditions): Likewise.
7096         (selftest::spellcheck_c_tests): Likewise.
7097         * spellcheck.h (levenshtein_distance): Rename both overloads to...
7098         (get_edit_distance): ...this.
7099         (best_match::consider): Update for renaming.
7101 2018-06-12  Martin Sebor  <msebor@redhat.com>
7103         PR tree-optimization/85259
7104         * builtins.c (compute_objsize): Handle constant offsets.
7105         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
7106         true iff a warning has been issued.
7107         * gimple.h (gimple_nonartificial_location): New function.
7108         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
7109         gimple_nonartificial_location and handle -Wno-system-headers.
7110         (handle_builtin_stxncpy): Same.
7112 2018-06-12  Martin Sebor  <msebor@redhat.com>
7114         PR c/85931
7115         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7117 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7119         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7120         BUILTIN_VEC_XST entries for pointer to double and long long.
7122 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7124         PR target/85990
7125         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7126         Update comments.
7127         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7128         Likewise.
7130 2018-06-12  Martin Liska  <mliska@suse.cz>
7132         * doc/options.texi: Document IntegerRange.
7134 2018-06-12  Martin Liska  <mliska@suse.cz>
7136         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7137         * opt-functions.awk: Handle Deprecated flag.
7138         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7139         and report error.
7140         (read_cmdline_option): Report warning for a deprecated option.
7141         * opts.h (struct cl_option): Add new field cl_deprecated.
7142         (CL_ERR_DEPRECATED): New.
7144 2018-06-12  Martin Liska  <mliska@suse.cz>
7146         * doc/options.texi: Document Deprecated option flag.
7148 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7150         * config/arc/arc-arch.h (arc_extras): New enum.
7151         (arc_cpu_t):Add field extra.
7152         (arc_cpu_types): Consider the extras.
7153         * config/arc/arc-cpus.def: Add extras info.
7154         * config/arc/arc-opts.h (processor_type): Consider extra field.
7155         * config/arc/arc.c (arc_override_options): Handle extra field.
7157 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7159         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7160         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7161         field.
7162         * config/arc/arc.c (arc_init): Update pic warning.
7163         (irq_range): Update irq range parsing warnings.
7164         (arc_override_options): Update various warning messages.
7165         (arc_handle_aux_attribute): Likewise.
7167 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7169         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7171 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7173         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7174         compiler messages directives.
7176 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7178         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7179         * config/mips/mips-tables.opt: Regenerate.
7180         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7181         mips64r6.
7182         * doc/invoke.texi: Document -march=i6500.
7184 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7186         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7187         (i6400_gpmul): Add cpu_unit.
7188         (i6400_gpdiv): Likewise.
7189         (i6400_msa_add_d): Update reservations.
7190         (i6400_msa_int_add) Likewise.
7191         (i6400_msa_short_logic3) Likewise.
7192         (i6400_msa_short_logic2) Likewise.
7193         (i6400_msa_short_logic) Likewise.
7194         (i6400_msa_move) Likewise.
7195         (i6400_msa_cmp) Likewise.
7196         (i6400_msa_short_float2) Likewise.
7197         (i6400_msa_div_d) Likewise.
7198         (i6400_msa_long_logic1) Likewise.
7199         (i6400_msa_long_logic2) Likewise.
7200         (i6400_msa_mult) Likewise.
7201         (i6400_msa_long_float2) Likewise.
7202         (i6400_msa_long_float4) Likewise.
7203         (i6400_msa_long_float5) Likewise.
7204         (i6400_msa_long_float8) Likewise.
7205         (i6400_fpu_fadd): Include frint type.
7206         (i6400_fpu_store): New define_insn_reservation.
7207         (i6400_fpu_load): Likewise.
7208         (i6400_fpu_move): Likewise.
7209         (i6400_fpu_fcmp): Likewise.
7210         (i6400_fpu_fmadd): Likewise.
7211         (i6400_int_mult): Include imul3nc type and update reservation.
7212         (i6400_int_div): Include idiv3 type and update reservation.
7213         (i6400_int_load): Update to check type not move_type.
7214         (i6400_int_store): Likewise.
7215         (i6400_int_prefetch): Set zero latency.
7217 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7219         * gcc.c: Document new %@{...} sequence.
7220         (LINK_COMMAND_SPEC): Use it for the -L switches.
7221         (cpp_unique_options): Use it for the -I switches.
7222         (at_file_argbuf): New global variable.
7223         (in_at_file): Likewise.
7224         (alloc_args): Create at_file_argbuf.
7225         (clear_args): Truncate at_file_argbuf.
7226         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7227         (open_at_file): New function.
7228         (close_at_file): Likewise.
7229         (create_at_file): Delete.
7230         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7231         <'o'>: Likewise.
7232         <'@'>: New case.
7233         (validate_switches_from_spec): Deal with %@{...} sequence.
7234         (validate_switches): Likewise.
7235         (driver::finalize): Call clear_args.
7237 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7239         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7241 2018-06-11  Martin Sebor  <msebor@redhat.com>
7243         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7244         (Wno-class-memaccess): Add @opindex.
7245         (Wno-templates, Wno-multiple-inheritance): Same.
7246         (Wno-virtual-inheritance, Wno-namespaces): Same.
7247         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7248         (Wno-format-overflow, Wno-format-truncation): Same.
7249         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7250         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7251         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7252         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7253         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7254         (Wno-misspelled-isr): Same.
7256 2018-06-11  Martin Sebor  <msebor@redhat.com>
7258         * PR tree-optimization/86083
7259         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7261 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7263         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7265 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7267         PR target/85755
7268         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7269         on the correct operand.
7270         (*movdi_internal64): Ditto.
7272 2018-06-11  Martin Liska  <mliska@suse.cz>
7274         PR tree-optimization/86089
7275         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7277 2018-06-11  Julia Koval  <julia.koval@intel.com>
7279         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7280         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7281         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7283 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7285         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7286         for Ada with strict dwarf2.
7288 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7290         PR target/85755
7291         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7292         addresses.
7294 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7296         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7298 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7300         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7301         TARGET_ELF.
7303 2018-06-08  Martin Liska  <mliska@suse.cz>
7305         * tree-cfg.h (debug_function): Fix argument type to match
7306         implementation.
7308 2018-06-08  Martin Liska  <mliska@suse.cz>
7310         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7311         Remove usage of MPX-related (and removed) fields.
7312         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7314 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7316         * cfg.c (debug): Use TDF_NONE rather than 0.
7317         * cfghooks.c (debug): Likewise.
7318         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7319         (struct dump_option_value_info): Convert to...
7320         (struct kv_pair): ...this template type.
7321         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7322         rather than 0.
7323         (optinfo_verbosity_options): Likewise.
7324         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7325         OPTGROUP_NONE.
7326         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7327         than int for "optgroup_flags" param.
7328         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7329         "dump_kind" param.
7330         (dump_dec): Likewise.
7331         (dump_finish): Use TDF_NONE rather than 0.
7332         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7333         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7334         than 0.  Update for change to option_ptr.
7335         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7336         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7337         0.  Update for changes to optinfo_verbosity_options and
7338         optgroup_options.
7339         (opt_info_switch_p): Convert optgroup_flags from int to
7340         optgroup_flags_t.
7341         (dump_basic_block): Use dump_flags_t rather than int
7342         for "dump_kind" param.
7343         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7344         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7345         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7346         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7347         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7348         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7349         TDF_NONE): Convert from macros to...
7350         (enum dump_flag): ...this new enum.
7351         (dump_flags_t): Update to use enum.
7352         (operator|, operator&, operator~, operator|=, operator&=):
7353         Implement for dump_flags_t.
7354         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7355         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7356         Convert from macros to...
7357         (enum optgroup_flag): ...this new enum.
7358         (optgroup_flags_t): New typedef.
7359         (operator|, operator|=): Implement for optgroup_flags_t.
7360         (struct dump_file_info): Convert field "alt_flags" to
7361         dump_flags_t.  Convert field "optgroup_flags" to
7362         optgroup_flags_t.
7363         (dump_basic_block): Use dump_flags_t rather than int for param.
7364         (dump_generic_expr_loc): Likewise.
7365         (dump_dec): Likewise.
7366         (dump_register): Convert param "optgroup_flags" to
7367         optgroup_flags_t.
7368         (opt_info_enable_passes): Likewise.
7369         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7370         than 0.
7371         * gimple-pretty-print.c (debug): Likewise.
7372         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7373         (merged_store_group::apply_stores): Likewise.
7374         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7375         * gimple.c (verify_gimple_pp): Likewise.
7376         * graphite-poly.c (print_pbb_body): Likewise.
7377         * passes.c (pass_manager::register_one_dump_file): Convert
7378         local "optgroup_flags" to optgroup_flags_t.
7379         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7380         (debug): Likewise.
7381         (debug_body): Likewise.
7382         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7383         to optgroup_flags_t.
7384         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7385         than 0.
7386         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7387         (convert_mult_to_fma): Likewise.
7388         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7389         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7390         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7391         "dump_kind" to dump_flags_t.
7393 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7395         * config/rs6000/rs6000.c (min, max): Delete.
7397 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7399         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7400         -mabi=spe and -mabi=no-spe.
7402 2018-06-08  Martin Liska  <mliska@suse.cz>
7404         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7405         where we expect an existing summary.
7407 2018-06-08  Martin Liska  <mliska@suse.cz>
7409         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7410         * ipa-inline.h (estimate_edge_growth): Likewise.
7412 2018-06-08  Martin Liska  <mliska@suse.cz>
7414         * cgraph.c (function_version_hasher::hash): Use
7415         cgraph_node::get_uid ().
7416         (function_version_hasher::equal):
7417         * cgraph.h (cgraph_node::get_uid): New method.
7418         * ipa-inline.c (update_caller_keys): Use
7419         cgraph_node::get_uid ().
7420         (update_callee_keys): Likewise.
7421         * ipa-utils.c (searchc): Likewise.
7422         (ipa_reduced_postorder): Likewise.
7423         * lto-cgraph.c (input_node): Likewise.
7424         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7425         * symbol-summary.h (symtab_insertion): Likewise.
7426         (symtab_removal): Likewise.
7427         (symtab_duplication): Likewise.
7428         * tree-pretty-print.c (dump_function_header): Likewise.
7429         * tree-sra.c (convert_callers_for_node): Likewise.
7431 2018-06-08  Martin Liska  <mliska@suse.cz>
7433         * cgraph.c (symbol_table::create_edge): Always assign a new
7434         unique number.
7435         (symbol_table::free_edge): Do not recycle numbers.
7436         * cgraph.h (cgraph_edge::get): New method.
7437         * symbol-summary.h (symtab_removal): Use it.
7438         (symtab_duplication): Likewise.
7439         (call_summary::hashable_uid): Remove.
7441 2018-06-08  Martin Liska  <mliska@suse.cz>
7443         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7444         (initialize_growth_caches): Remove.
7445         (free_growth_caches): Likewise.
7446         (do_estimate_edge_time): Use edge_growth_cache.
7447         (do_estimate_edge_size): Likewise.
7448         (do_estimate_edge_hints): Likewise.
7449         * ipa-inline.c (reset_edge_caches): Likewise.
7450         (recursive_inlining): Likewise.
7451         (inline_small_functions): Likewise.
7452         * ipa-inline.h (initialize_growth_caches): Remove.
7453         (estimate_edge_size): Likewise.
7454         (estimate_edge_time): Likewise.
7455         (estimate_edge_hints): Likewise.
7456         (reset_edge_growth_cache): Likewise.
7457         * symbol-summary.h (call_summary::remove): New method.
7459 2018-06-08  Martin Liska  <mliska@suse.cz>
7461         * ipa-cp.c (class edge_clone_summary): New summary.
7462         (grow_edge_clone_vectors): Remove.
7463         (ipcp_edge_duplication_hook): Remove.
7464         (class edge_clone_summary_t): New call_summary class.
7465         (ipcp_edge_removal_hook): Remove.
7466         (edge_clone_summary_t::duplicate): New function.
7467         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7468         (create_specialized_node): Likewise.
7469         (ipcp_driver): Initialize edge_clone_summaries and do not
7470         register hooks.
7472 2018-06-08  Martin Liska  <mliska@suse.cz>
7474         * symbol-summary.h (get): New function.
7475         (call_summary::m_initialize_when_cloning): New class member.
7477 2018-06-08  Martin Liska  <mliska@suse.cz>
7479         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7480         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7481         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7482         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7483         (remove_cgraph_node_from_order): Use the removed_nodes set.
7484         (do_per_function_toporder): Likwise.
7485         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7486         instead of summary_uid.
7487         (symtab_removal): Likewise.
7488         (symtab_duplication): Likewise.
7490 2018-06-08  Martin Liska  <mliska@suse.cz>
7492         * ipa-cp.c (ipcp_store_bits_results): Use
7493         ipcp_transformation_sum.
7494         (ipcp_store_vr_results): Likewise.
7495         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7496         to ...
7497         (ipcp_transformation_initialize): ... this.
7498         (ipa_set_node_agg_value_chain):
7499         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7500         (write_ipcp_transformation_info): Likewise.
7501         (read_ipcp_transformation_info): Likewise.
7502         (ipcp_update_bits): Likewise.
7503         (ipcp_update_vr): Likewise.
7504         (ipcp_transform_function): Likewise.
7505         * ipa-prop.h: Rename ipcp_transformation_summary to
7506         ipcp_transformation.
7507         (class ipcp_transformation_t): New function summary.
7508         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7509         (ipa_get_agg_replacements_for_node): Likewise.
7511 2018-06-08  Martin Liska  <mliska@suse.cz>
7513         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7514         of struct.
7515         (class funct_state_summary_t): New function_summary class.
7516         (has_function_state): Remove.
7517         (get_function_state): Likewise.
7518         (set_function_state): Likewise.
7519         (add_new_function): Likewise.
7520         (funct_state_summary_t::insert): New function.
7521         (duplicate_node_data): Remove.
7522         (remove_node_data): Remove.
7523         (funct_state_summary_t::duplicate): New function.
7524         (register_hooks): Create new funct_state_summaries.
7525         (pure_const_generate_summary): Use it.
7526         (pure_const_write_summary): Likewise.
7527         (pure_const_read_summary): Likewise.
7528         (propagate_pure_const): Likewise.
7529         (propagate_nothrow): Likewise.
7530         (dump_malloc_lattice): Likewise.
7531         (propagate_malloc): Likewise.
7532         (execute): Do not register hooks, just remove summary
7533         instead.
7534         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7535         constructor.
7537 2018-06-08  Martin Liska  <mliska@suse.cz>
7539         * ipa-reference.c (remove_node_data): Remove.
7540         (duplicate_node_data): Likewise.
7541         (class ipa_ref_var_info_summary_t): New class.
7542         (class ipa_ref_opt_summary_t): Likewise.
7543         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7544         (get_reference_optimization_summary): Use
7545         ipa_ref_opt_sum_summaries.
7546         (set_reference_vars_info): Remove.
7547         (set_reference_optimization_summary): Likewise.
7548         (ipa_init): Create summaries.
7549         (init_function_info): Use function summary.
7550         (ipa_ref_opt_summary_t::duplicate): New function.
7551         (ipa_ref_opt_summary_t::remove): New function.
7552         (get_read_write_all_from_node): Fix GNU coding style.
7553         (propagate): Use function summary.
7554         (write_node_summary_p): Fix GNU coding style.
7555         (stream_out_bitmap): Likewise.
7556         (ipa_reference_read_optimization_summary): Use function summary.
7557         (ipa_reference_c_finalize): Do not release hooks.
7559 2018-06-08  Martin Liska  <mliska@suse.cz>
7561         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7562         (analyze_function_body): Extract multiple calls of get_create.
7563         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7564         * ipa-inline.c (recursive_inlining): Use ::get method.
7565         * ipa-inline.h (estimate_edge_growth): Likewise.
7567 2018-06-08  Martin Liska  <mliska@suse.cz>
7569         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7570         HSA_INVALID.
7571         (hsa_function_summary::hsa_function_summary): Use the new enum
7572         value.
7573         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7574         * hsa-gen.c (hsa_get_host_function): Likewise.
7575         (get_brig_function_name): Likewise.
7576         * ipa-hsa.c (process_hsa_functions): Likewise.
7577         (ipa_hsa_write_summary): Likewise.
7578         * symbol-summary.h (symtab_duplication): Use ::get function/
7579         (get): New function.
7581 2018-06-08  Martin Liska  <mliska@suse.cz>
7583         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7584         of get.
7585         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7586         (hsa_register_kernel): Likewise.
7587         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7588         * hsa-gen.c (hsa_get_host_function): Likewise.
7589         (get_brig_function_name): Likewise.
7590         (generate_hsa): Likewise.
7591         (pass_gen_hsail::execute): Likewise.
7592         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7593         (devirtualization_time_bonus): Likewise.
7594         (ipcp_propagate_stage): Likewise.
7595         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7596         (edge_set_predicate): Likewise.
7597         (evaluate_conditions_for_known_args): Likewise.
7598         (evaluate_properties_for_edge): Likewise.
7599         (ipa_fn_summary::reset): Likewise.
7600         (ipa_fn_summary_t::duplicate): Likewise.
7601         (dump_ipa_call_summary): Likewise.
7602         (ipa_dump_fn_summary): Likewise.
7603         (analyze_function_body): Likewise.
7604         (compute_fn_summary): Likewise.
7605         (estimate_edge_devirt_benefit): Likewise.
7606         (estimate_edge_size_and_time): Likewise.
7607         (estimate_calls_size_and_time): Likewise.
7608         (estimate_node_size_and_time): Likewise.
7609         (inline_update_callee_summaries): Likewise.
7610         (remap_edge_change_prob): Likewise.
7611         (remap_edge_summaries): Likewise.
7612         (ipa_merge_fn_summary_after_inlining): Likewise.
7613         (ipa_update_overall_fn_summary): Likewise.
7614         (read_ipa_call_summary): Likewise.
7615         (inline_read_section): Likewise.
7616         (write_ipa_call_summary): Likewise.
7617         (ipa_fn_summary_write): Likewise.
7618         (ipa_free_fn_summary): Likewise.
7619         * ipa-hsa.c (process_hsa_functions): Likewise.
7620         (ipa_hsa_write_summary): Likewise.
7621         (ipa_hsa_read_section): Likewise.
7622         * ipa-icf.c (sem_function::merge): Likewise.
7623         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7624         (do_estimate_edge_time): Likewise.
7625         (estimate_size_after_inlining): Likewise.
7626         (estimate_growth): Likewise.
7627         (growth_likely_positive): Likewise.
7628         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7629         (inline_call): Likewise.
7630         * ipa-inline.c (caller_growth_limits): Likewise.
7631         (can_inline_edge_p): Likewise.
7632         (can_inline_edge_by_limits_p): Likewise.
7633         (compute_uninlined_call_time): Likewise.
7634         (compute_inlined_call_time): Likewise.
7635         (want_inline_small_function_p): Likewise.
7636         (edge_badness): Likewise.
7637         (update_caller_keys): Likewise.
7638         (update_callee_keys): Likewise.
7639         (recursive_inlining): Likewise.
7640         (inline_small_functions): Likewise.
7641         (inline_to_all_callers_1): Likewise.
7642         (dump_overall_stats): Likewise.
7643         (early_inline_small_functions): Likewise.
7644         (early_inliner): Likewise.
7645         * ipa-inline.h (estimate_edge_growth): Likewise.
7646         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7647         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7648         * ipa-prop.h (IPA_NODE_REF): Likewise.
7649         (IPA_EDGE_REF): Likewise.
7650         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7651         (propagate_malloc): Likewise.
7652         * ipa-split.c (execute_split_functions): Likewise.
7653         * symbol-summary.h: Rename get to get_create.
7654         (get): Likewise.
7655         (get_create): Likewise.
7656         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7658 2018-06-08  Martin Liska  <mliska@suse.cz>
7660         * symbol-summary.h (release): Move definition out of class
7661         declaration.
7662         (symtab_removal): Likewise.
7663         (symtab_duplication): Likewise.
7665 2018-06-08  Martin Liska  <mliska@suse.cz>
7667         * symbol-summary.h (function_summary): Move constructor
7668         implementation out of class declaration.
7669         (release): Likewise.
7670         (symtab_insertion): Likewise.
7671         (symtab_removal): Likewise.
7672         (symtab_duplication): Likewise.
7673         (get): Likewise.
7675 2018-06-08  Martin Liska  <mliska@suse.cz>
7677         * Makefile.in: Remove support for MPX (macros, related functions,
7678         fields in cgraph_node, ...).
7679         * builtin-types.def (BT_BND): Likewise.
7680         (BT_FN_BND_CONST_PTR): Likewise.
7681         (BT_FN_CONST_PTR_BND): Likewise.
7682         (BT_FN_VOID_PTR_BND): Likewise.
7683         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7684         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7685         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7686         (expand_builtin_mempcpy_with_bounds): Likewise.
7687         (expand_builtin_memset_with_bounds): Likewise.
7688         (expand_builtin_memset_args): Likewise.
7689         (std_expand_builtin_va_start): Likewise.
7690         (expand_builtin): Likewise.
7691         (expand_builtin_with_bounds): Likewise.
7692         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7693         (DEF_LIB_BUILTIN_CHKP): Likewise.
7694         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7695         (DEF_CHKP_BUILTIN): Likewise.
7696         (BUILT_IN_MEMCPY): Likewise.
7697         (BUILT_IN_MEMMOVE): Likewise.
7698         (BUILT_IN_MEMPCPY): Likewise.
7699         (BUILT_IN_MEMSET): Likewise.
7700         (BUILT_IN_STPCPY): Likewise.
7701         (BUILT_IN_STRCAT): Likewise.
7702         (BUILT_IN_STRCHR): Likewise.
7703         (BUILT_IN_STRCPY): Likewise.
7704         (BUILT_IN_STRLEN): Likewise.
7705         (BUILT_IN_MEMCPY_CHK): Likewise.
7706         (BUILT_IN_MEMMOVE_CHK): Likewise.
7707         (BUILT_IN_MEMPCPY_CHK): Likewise.
7708         (BUILT_IN_MEMSET_CHK): Likewise.
7709         (BUILT_IN_STPCPY_CHK): Likewise.
7710         (BUILT_IN_STRCAT_CHK): Likewise.
7711         (BUILT_IN_STRCPY_CHK): Likewise.
7712         * calls.c (store_bounds): Likewise.
7713         (emit_call_1): Likewise.
7714         (special_function_p): Likewise.
7715         (maybe_warn_nonstring_arg): Likewise.
7716         (initialize_argument_information): Likewise.
7717         (finalize_must_preallocate): Likewise.
7718         (compute_argument_addresses): Likewise.
7719         (expand_call): Likewise.
7720         * cfgexpand.c (expand_call_stmt): Likewise.
7721         (expand_return): Likewise.
7722         (expand_gimple_stmt_1): Likewise.
7723         (pass_expand::execute): Likewise.
7724         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7725         (cgraph_node::remove): Likewise.
7726         (cgraph_node::dump): Likewise.
7727         (cgraph_node::verify_node): Likewise.
7728         * cgraph.h (chkp_function_instrumented_p): Likewise.
7729         (symtab_node::get_alias_target): Likewise.
7730         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7731         (cgraph_local_p): Likewise.
7732         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7733         (cgraph_edge::rebuild_references): Likewise.
7734         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7735         (walk_polymorphic_call_targets): Likewise.
7736         (cgraph_node::expand_thunk): Likewise.
7737         (symbol_table::output_weakrefs): Likewise.
7738         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7739         (ix86_handle_option): Likewise.
7740         * config/i386/constraints.md: Likewise.
7741         * config/i386/i386-builtin-types.def (BND): Likewise.
7742         (VOID): Likewise.
7743         (PVOID): Likewise.
7744         (ULONG): Likewise.
7745         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7746         (BDESC_FIRST): Likewise.
7747         (BDESC): Likewise.
7748         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7749         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7750         * config/i386/i386.c (enum reg_class): Likewise.
7751         (ix86_target_string): Likewise.
7752         (ix86_option_override_internal): Likewise.
7753         (ix86_conditional_register_usage): Likewise.
7754         (ix86_valid_target_attribute_inner_p): Likewise.
7755         (ix86_set_indirect_branch_type): Likewise.
7756         (ix86_set_current_function): Likewise.
7757         (ix86_function_arg_regno_p): Likewise.
7758         (init_cumulative_args): Likewise.
7759         (ix86_function_arg_advance): Likewise.
7760         (ix86_function_arg): Likewise.
7761         (ix86_pass_by_reference): Likewise.
7762         (ix86_function_value_regno_p): Likewise.
7763         (ix86_function_value_1): Likewise.
7764         (ix86_function_value_bounds): Likewise.
7765         (ix86_return_in_memory): Likewise.
7766         (ix86_setup_incoming_vararg_bounds): Likewise.
7767         (ix86_va_start): Likewise.
7768         (indirect_thunk_need_prefix): Likewise.
7769         (print_reg): Likewise.
7770         (ix86_print_operand): Likewise.
7771         (ix86_expand_call): Likewise.
7772         (ix86_output_function_return): Likewise.
7773         (reg_encoded_number): Likewise.
7774         (BDESC_VERIFYS): Likewise.
7775         (ix86_init_mpx_builtins): Likewise.
7776         (ix86_init_builtins): Likewise.
7777         (ix86_emit_cmove): Likewise.
7778         (ix86_emit_move_max): Likewise.
7779         (ix86_expand_builtin): Likewise.
7780         (ix86_builtin_mpx_function): Likewise.
7781         (ix86_get_arg_address_for_bt): Likewise.
7782         (ix86_load_bounds): Likewise.
7783         (ix86_store_bounds): Likewise.
7784         (ix86_load_returned_bounds): Likewise.
7785         (ix86_store_returned_bounds): Likewise.
7786         (ix86_class_likely_spilled_p): Likewise.
7787         (ix86_hard_regno_mode_ok): Likewise.
7788         (x86_order_regs_for_local_alloc): Likewise.
7789         (ix86_mitigate_rop): Likewise.
7790         (ix86_bnd_prefixed_insn_p): Likewise.
7791         (ix86_mpx_bound_mode): Likewise.
7792         (ix86_make_bounds_constant): Likewise.
7793         (ix86_initialize_bounds): Likewise.
7794         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7795         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7796         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7797         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7798         (TARGET_CHKP_BOUND_MODE): Likewise.
7799         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7800         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7801         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7802         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7803         * config/i386/i386.h (TARGET_MPX): Likewise.
7804         (TARGET_MPX_P): Likewise.
7805         (VALID_BND_REG_MODE): Likewise.
7806         (FIRST_BND_REG): Likewise.
7807         (LAST_BND_REG): Likewise.
7808         (enum reg_class): Likewise.
7809         (BND_REG_P): Likewise.
7810         (BND_REGNO_P): Likewise.
7811         (BNDmode): Likewise.
7812         (ADJUST_INSN_LENGTH): Likewise.
7813         * config/i386/i386.md: Likewise.
7814         * config/i386/i386.opt: Likewise.
7815         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7816         (defined): Likewise.
7817         (LINK_MPX): Likewise.
7818         (MPX_SPEC): Likewise.
7819         (LIBMPX_SPEC): Likewise.
7820         (LIBMPXWRAPPERS_SPEC): Likewise.
7821         (CHKP_SPEC): Likewise.
7822         * config/i386/predicates.md: Likewise.
7823         * dbxout.c (dbxout_type): Likewise.
7824         * doc/extend.texi: Likewise.
7825         * doc/invoke.texi: Likewise.
7826         * doc/md.texi: Likewise.
7827         * doc/tm.texi: Likewise.
7828         * doc/tm.texi.in: Likewise.
7829         * dwarf2out.c (is_base_type): Likewise.
7830         (gen_formal_types_die): Likewise.
7831         (gen_subprogram_die): Likewise.
7832         (gen_type_die_with_usage): Likewise.
7833         (gen_decl_die): Likewise.
7834         (dwarf2out_late_global_decl): Likewise.
7835         * expr.c (expand_assignment): Likewise.
7836         (emit_storent_insn): Likewise.
7837         (store_expr_with_bounds): Likewise.
7838         (store_expr): Likewise.
7839         (expand_expr_real_1): Likewise.
7840         * expr.h (store_expr_with_bounds): Likewise.
7841         * function.c (use_register_for_decl): Likewise.
7842         (struct bounds_parm_data): Likewise.
7843         (assign_parms_augmented_arg_list): Likewise.
7844         (assign_parm_find_entry_rtl): Likewise.
7845         (assign_parm_is_stack_parm): Likewise.
7846         (assign_parm_load_bounds): Likewise.
7847         (assign_bounds): Likewise.
7848         (assign_parms): Likewise.
7849         (expand_function_start): Likewise.
7850         * gcc.c (CHKP_SPEC): Likewise.
7851         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7852         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7853         (wrestrict_dom_walker::check_call): Likewise.
7854         * gimple.c (gimple_build_call_from_tree): Likewise.
7855         * gimple.h (enum gf_mask): Likewise.
7856         (gimple_call_with_bounds_p): Likewise.
7857         (gimple_call_set_with_bounds): Likewise.
7858         * gimplify.c (gimplify_init_constructor): Likewise.
7859         * ipa-cp.c (initialize_node_lattices): Likewise.
7860         (propagate_constants_across_call): Likewise.
7861         (find_more_scalar_values_for_callers_subset): Likewise.
7862         * ipa-hsa.c (process_hsa_functions): Likewise.
7863         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7864         * ipa-icf.c (sem_function::merge): Likewise.
7865         * ipa-inline.c (early_inliner): Likewise.
7866         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7867         (warn_function_cold): Likewise.
7868         (propagate_pure_const): Likewise.
7869         * ipa-ref.h (enum GTY): Likewise.
7870         * ipa-split.c (find_retbnd): Likewise.
7871         (consider_split): Likewise.
7872         (split_function): Likewise.
7873         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7874         * ipa.c (walk_polymorphic_call_targets): Likewise.
7875         (symbol_table::remove_unreachable_nodes): Likewise.
7876         (process_references): Likewise.
7877         (cgraph_build_static_cdtor_1): Likewise.
7878         * lto-cgraph.c (lto_output_node): Likewise.
7879         (output_refs): Likewise.
7880         (compute_ltrans_boundary): Likewise.
7881         (input_overwrite_node): Likewise.
7882         (input_node): Likewise.
7883         (input_cgraph_1): Likewise.
7884         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7885         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7886         (class pass_chkp_instrumentation_passes): Likewise.
7887         (make_pass_chkp_instrumentation_passes): Likewise.
7888         * passes.def: Likewise.
7889         * rtl.h (struct GTY): Likewise.
7890         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7891         * stor-layout.c (layout_type): Likewise.
7892         * symtab.c: Likewise.
7893         * target.def: Likewise.
7894         * targhooks.c (default_chkp_bound_type): Likewise.
7895         (default_chkp_bound_mode): Likewise.
7896         (default_builtin_chkp_function): Likewise.
7897         (default_chkp_function_value_bounds): Likewise.
7898         (default_chkp_make_bounds_constant): Likewise.
7899         (default_chkp_initialize_bounds): Likewise.
7900         * targhooks.h (default_chkp_bound_type): Likewise.
7901         (default_chkp_bound_mode): Likewise.
7902         (default_builtin_chkp_function): Likewise.
7903         (default_chkp_function_value_bounds): Likewise.
7904         (default_chkp_make_bounds_constant): Likewise.
7905         (default_chkp_initialize_bounds): Likewise.
7906         * toplev.c (compile_file): Likewise.
7907         (process_options): Likewise.
7908         * tree-core.h (DEF_BUILTIN): Likewise.
7909         (DEF_BUILTIN_CHKP): Likewise.
7910         * tree-inline.c (declare_return_variable): Likewise.
7911         (remap_gimple_stmt): Likewise.
7912         (copy_bb): Likewise.
7913         (initialize_inlined_parameters): Likewise.
7914         (expand_call_inline): Likewise.
7915         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7916         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7917         (make_pass_ipa_chkp_produce_thunks): Likewise.
7918         (make_pass_chkp): Likewise.
7919         (make_pass_chkp_opt): Likewise.
7920         (make_pass_chkp_instrumentation_passes): Likewise.
7921         * tree-pretty-print.c (dump_generic_node): Likewise.
7922         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7923         * tree-ssa-dce.c (propagate_necessity): Likewise.
7924         (eliminate_unnecessary_stmts): Likewise.
7925         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7926         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7927         * tree-ssa-sccvn.h: Likewise.
7928         * tree-ssa-strlen.c (get_string_length): Likewise.
7929         (valid_builtin_call): Likewise.
7930         (adjust_last_stmt): Likewise.
7931         (handle_builtin_strchr): Likewise.
7932         (handle_builtin_strcpy): Likewise.
7933         (handle_builtin_stxncpy): Likewise.
7934         (handle_builtin_memcpy): Likewise.
7935         (handle_builtin_strcat): Likewise.
7936         (strlen_check_and_optimize_stmt): Likewise.
7937         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7938         * tree-streamer-in.c: Likewise.
7939         * tree-streamer.c (record_common_node): Likewise.
7940         * tree.c (tree_code_size): Likewise.
7941         (wide_int_to_tree_1): Likewise.
7942         (type_contains_placeholder_1): Likewise.
7943         (build_common_tree_nodes): Likewise.
7944         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7945         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7946         (POINTER_BOUNDS_P): Likewise.
7947         (BOUNDED_TYPE_P): Likewise.
7948         (BOUNDED_P): Likewise.
7949         (CALL_WITH_BOUNDS_P): Likewise.
7950         (pointer_bounds_type_node): Likewise.
7951         * value-prof.c (gimple_ic): Likewise.
7952         * var-tracking.c (vt_add_function_parameters): Likewise.
7953         * varasm.c (make_decl_rtl): Likewise.
7954         (assemble_start_function): Likewise.
7955         (output_constant): Likewise.
7956         (maybe_assemble_visibility): Likewise.
7957         * varpool.c (ctor_for_folding): Likewise.
7958         * chkp-builtins.def: Remove.
7959         * ipa-chkp.c: Remove.
7960         * ipa-chkp.h: Remove.
7961         * rtl-chkp.c: Remove.
7962         * rtl-chkp.h: Remove.
7963         * tree-chkp-opt.c: Remove.
7964         * tree-chkp.c: Remove.
7965         * tree-chkp.h: Remove.
7967 2018-06-07  Carl Love  <cel@us.ibm.com>
7969         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7970         vextract_fp_from_shortl): Add BE support.
7972 2018-06-07  Paul Koning  <ni1d@arrl.net>
7974         * compare-elim.c (try_merge_compare): Don't merge compare if
7975         address contains a side effect.
7976         (try_eliminate_compare): Likewise.
7978 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7980         * config.gcc: Support "tremont".
7981         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7982         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7983         PROCESSOR_TREMONT.
7984         * config/i386/i386.c (m_TREMONT): Define.
7985         (processor_target_table): Add "tremont".
7986         (PTA_TREMONT): Define.
7987         (ix86_lea_outperforms): Add TARGET_TREMONT.
7988         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7989         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7990         and M_INTEL_GOLDMONT_PLUS.
7991         (fold_builtin_cpu): Add "tremont".
7992         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7993         (ix86_option_override_internal): Add "tremont".
7994         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7995         (processor_type): Add PROCESSOR_TREMONT.
7996         * config/i386/x86-tune.def: Add m_TREMONT.
7997         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7999 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8001         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
8002         symbol defined for msp430i* devices to be lower case.
8004 2018-06-07  Richard Biener  <rguenther@suse.de>
8006         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
8007         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
8008         Properly wrap signed arithmetic if overflow wraps.
8010 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
8012         PR tree-optimization/69615
8013         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
8014         of a cast from a same precision integral SSA_NAME in a bb dominated
8015         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
8016         cast to utype if rhs2 has already a compatible type.
8018 2018-06-07  Richard Biener  <rguenther@suse.de>
8020         PR tree-optimization/85935
8021         * graphite-scop-detection.c (find_params_in_bb): Analyze
8022         condition operands with respect to the correct loop.  Assert
8023         the analysis doesn't fail.
8025 2018-06-04  Carl Love  <cel@us.ibm.com>
8027         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
8028         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
8029         as it is slightly cheaper.
8030         (first_match_or_eos_index_<mode>):
8031         Calculate index using natural element order.
8032         (first_match_index_<mode>):
8033         Calculate index using natural element order.
8034         (first_match_or_eos_index_<mode>):
8035         Calculate index using natural order.
8036         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
8037         for BE and LE modes.
8038         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
8039         P9V_BUILTIN_VCLZLSBB_V16QI.
8040         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
8041         specific.
8043 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8045         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
8046         indentation and line wrap for many prototypes.  Add missing
8047         @smallexample directives around block of prototypes for vec_xl and
8048         vec_xst.
8050 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
8052         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
8053         track if we pass or return IEEE 128-bit floating point.
8054         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
8055         C++ mangling that is compatible with GCC 8.1.
8056         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
8057         (init_cumulative_args): Note if we pass or return IEEE 128-bit
8058         floating point types.
8059         (rs6000_function_arg_advance_1): Likewise.
8060         (rs6000_mangle_type): Optionally generate mangled names that match
8061         what GCC 8.1 generated for IEEE 128-bit floating point types.
8062         (rs6000_globalize_decl_name): If we have an external function that
8063         passes or returns IEEE 128-bit types, generate a weak reference
8064         from the mangled name used in GCC 8.1 to the current mangled
8065         name.
8066         (rs6000_init_builtins): Make __ibm128 use the long double type if
8067         long double is IBM extended double.  Make __float128 use the long
8068         double type if long double is IEEE 128-bit.
8070         PR target/85657
8071         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
8072         macro for __ibm128 built-in functions.
8073         (PACK_IF): Add __ibm128 pack/unpack functions.
8074         (UNPACK_IF): Likewise.
8075         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
8076         enable long double built-in functions if long double is IEEE
8077         128-bit floating point.
8078         (rs6000_invalid_builtin): Update long double built-in function
8079         error message.
8080         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
8081         functions, adjust the built-in function to use the long double
8082         built-in function if __ibm128 and long double are the same type.
8083         * doc/extend.texi (PowerPC builtins): Update documention for
8084         __builtin_{,un}pack_longdouble.  Add documentation for
8085         __builtin_{,un}pack_ibm128.
8087 2018-06-06  Jim Wilson  <jimw@sifive.com>
8089         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
8090         (struct machine_function): New field interrupt_mode.
8091         (riscv_handle_type_attribute): New function.  Add forward declaration.
8092         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
8093         (riscv_expand_epilogue): Check interrupt_mode field.
8094         (riscv_set_current_function): Check interrupt attribute args and
8095         set interrupt_mode field.
8096         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
8097         (riscv_sret, riscv_uret): New.
8098         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
8099         new arguments to interrupt attribute.
8101 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
8103         PR target/63177
8104         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
8105         Don't handle -mcpu=power8 if -mpower9-vector is also used.
8107 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8109         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
8110         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
8111         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8112         several redundant entries.
8114 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8116         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8117         type from "rtx" to "rtx_insn *".
8118         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8119         for local "call_insn", removing cast.
8120         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8122 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8124         PR tree-optimization/86066
8125         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8126         for BIT_INSERT_EXPR stores.
8128 2018-06-06  Richard Biener  <rguenther@suse.de>
8130         PR tree-optimization/86062
8131         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8132         component refs ontop
8133         of to be offsetted base.
8135 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8137         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8138         to be static and remove check on interrupt attribute name.
8140 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8142         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8143         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8145 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8147         PR target/79924
8148         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8149         second argument.
8150         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8151         Remove second argument, change how error is called.
8152         (aarch64_layout_arg): Remove second argument from
8153         aarch64_err_no_fpadvsimd call.
8154         (aarch64_init_cumulative_args): Ditto.
8155         (aarch64_gimplify_va_arg_expr): Ditto.
8156         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8158 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8160         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8161         (*simple_return_indirect_internal<mode>): Rename from
8162         simple_return_indirect_internal.  Use W mode iterator.
8163         (rstorssp): New expander.
8164         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8165         (clrssbsy): New expander.
8166         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8168 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8170         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8171         __typeof__.
8172         (cmse_check_pointed_object): Likewise.
8174 2018-06-05  Martin Liska  <mliska@suse.cz>
8176         PR gcov-profile/47618
8177         * doc/invoke.texi: Document how -fprofile-dir format
8178         is extended.
8180 2018-06-05  Richard Biener  <rguenther@suse.de>
8182         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8183         removal pretend DOM info isn't available so we do not update
8184         it and only remove edges, not dominated blocks.  Actually free
8185         DOM info in case we removed something.  Remove unreachable blocks.
8186         (mfb_keep_latches): Work with either DOM info or marked backedges.
8187         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8188         first.  Mark backedges if DOM info isn't available.
8189         (Re-)compute DOM info after cleanup_control_flow_pre.
8191 2018-06-05  Richard Biener  <rguenther@suse.de>
8193         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8194         (locus_discrim_hasher::hash): Adjust.
8195         (locus_discrim_hasher::equal): Likewise.
8196         (next_discriminator_for_locus): Work on line directly.
8197         (same_line_p): Pass in expanded locus1 as well.
8198         (assign_discriminators): Avoid redundant location expansions.
8200 2018-06-05  Richard Biener  <rguenther@suse.de>
8202         PR tree-optimization/86046
8203         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8204         if required after clearing TREE_ADDRESSABLE.
8206 2018-06-05  Richard Biener  <rguenther@suse.de>
8208         PR tree-optimization/86047
8209         * tree-ssa-loop.c (for_each_index): Glob handling of all
8210         decls and constants and really handle all of them.
8212 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8214         PR target/81497
8215         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8216         qualifier_void_pointer and qualifier_const_void_pointer.
8217         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8218         (arm_init_builtins): Handle the above.
8219         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8220         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8221         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8222         void intrinsics.
8224 2018-06-05  Martin Liska  <mliska@suse.cz>
8226         * auto-profile.c (read_autofdo_file): Do not use
8227         gcov_ctr_summary struct.
8228         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8229         * coverage.c (struct counts_entry): Likewise.
8230         (read_counts_file): Read just single summary entry.
8231         (get_coverage_counts): Use gcov_summary struct.
8232         * coverage.h (get_coverage_counts): Likewise.
8233         * gcov-dump.c (dump_working_sets): Likewise.
8234         (tag_summary): Dump just single summary.
8235         * gcov-io.c (gcov_write_summary): Write just histogram
8236         summary.
8237         (gcov_read_summary): Read just single summary.
8238         (compute_working_sets): Use gcov_summary struct.
8239         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8240         of GCOV_COUNTERS_SUMMABLE.
8241         (GCOV_COUNTERS_SUMMABLE): Remove.
8242         (GCOV_FIRST_VALUE_COUNTER): Replace with
8243         GCOV_COUNTER_V_INTERVAL.
8244         (struct gcov_ctr_summary): Remove.
8245         (struct gcov_summary): Directly use fields of former
8246         gcov_ctr_summary.
8247         (compute_working_sets): Use gcov_summary struct.
8248         * gcov.c (read_count_file): Do not use ctrs fields.
8249         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8250         struct.
8251         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8252         struct.
8253         * profile.c: Likewise.
8254         * profile.h: Likewise.
8256 2018-06-05  Martin Liska  <mliska@suse.cz>
8258         PR gcov-profile/84846
8259         * gcov.c (output_lines): Print working directory only
8260         in intermediate format.
8262 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8264         * config/s390/s390-builtin-types.def: Add void function type.
8265         * config/s390/s390-builtins.def: Use the function type for the
8266         tbeginc builtin.
8268 2018-06-04  Jim Wilson  <jimw@sifive.com>
8270         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8271         to int.
8272         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8273         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8274         handle EH_RETURN_DATA_REGNO registers properly.
8275         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8276         (riscv_expand_epilogue): Update comment.  Change argument name and
8277         type.  Update code to use new name and type.  Pass new args to
8278         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8279         EXCEPTION_RETURN.
8280         * config/riscv/riscv.md (NORMAL_RETURN): New.
8281         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8282         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8283         (eh_return): Call gen_eh_return_internal and emit barrier.
8284         (eh_return_internal): Call riscv_expand_epilogue.
8286 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8288         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8289         bit_insertion field and declare can_be_merged_into method.
8290         (merged_store_group::can_be_merged_into): New method.
8291         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8292         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8293         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8295 2018-06-04  Richard Biener  <rguenther@suse.de>
8297         PR tree-optimization/85955
8298         * builtins.c (fold_builtin_sincos): Convert pointers to
8299         destination to appropriate type before dereferencing.
8301 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8303         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8305 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8307         * expr.c (expand_expr_real_1): Force the operand into memory if
8308         its TYPE_MODE is BLKmode and if there is no integer mode for
8309         the number of bits being extracted.
8311 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8313         PR target/85832
8314         PR target/86036
8315         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8316         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8318 2018-06-04  Richard Biener  <rguenther@suse.de>
8320         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8321         (cleanup_tree_cfg_noloop): ... single caller.  Do
8322         start_recording_case_labels later.
8324 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8326         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8327         to _IMMINTRIN_H_INCLUDED.
8328         * config/i386/pconfigintrin.h: Ditto.
8329         * config/i386/waitpkgintrin.h: Ditto.
8330         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8331         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8332         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8333         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8334         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8335         waitpkgintrin.h and cldemoteintrin.h.
8337 2018-06-04  Richard Biener  <rguenther@suse.de>
8339         PR tree-optimization/86038
8340         * tracer.c (find_best_successor): Check probability for
8341         being initialized, bail out if not.
8343 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8345         PR target/86003
8346         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8347         of bits to ignore when comparing architectures.
8349 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8351         PR tree-optimization/69615
8352         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8353         maximum or minimum of the type, try to merge it also as if
8354         range1 is + [-, x - 1] or + [x + 1, -].
8356         PR c++/86025
8357         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8359 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8361         PR tree-optimization/86034
8362         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8363         the unsigned bitfield type in a bit insertion sequence if it does not
8364         have a larger precision than the bitfield size.
8365         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8367 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8369         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8371 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8373         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8374         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8375         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8376         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8378 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8380         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8381         Disable -fdelete-null-pointer-checks for ELF toolchain.
8383 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8384             Kito Cheng  <kito.cheng@gmail.com>
8386         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8387         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8388         (nds32*-*-*): Add glibc and uclibc conditions.
8389         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8390         (TARGET_EXCEPT_UNWIND_INFO): Define.
8391         * config/nds32/elf.h: New file.
8392         * config/nds32/linux.h: New file.
8393         * config/nds32/nds32-elf.opt: New file.
8394         * config/nds32/nds32-linux.opt: New file.
8395         * config/nds32/nds32-fp-as-gp.c
8396         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8397         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8398         TARGET_LINUX_ABI.
8399         (nds32_asm_file_end): Ditto.
8400         (nds32_print_operand): Ditto.
8401         (nds32_insert_attributes): Ditto.
8402         (nds32_init_libfuncs): New function.
8403         (TARGET_HAVE_TLS): Define.
8404         (TARGET_INIT_LIBFUNCS): Define.
8405         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8406         spec content.
8407         (TARGET_ELF): Apply different mcmodel setting.
8408         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8409         been migrated into elf.h and linux.h files.
8410         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8411         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8412         (mcmodel): The content has been migrated into nds32-elf.opt and
8413         nds32-linux.opt files.
8414         * config/nds32/t-elf: New file.
8415         * config/nds32/t-linux: New file.
8417 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8418             Shiva Chen  <shiva0217@gmail.com>
8420         * config/nds32/constants.md (unspec_volatile_element): Add
8421         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8422         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8423         optimization.
8424         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8425         (make_pass_nds32_fp_as_gp): Declare.
8426         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8427         optmization pass.
8428         (nds32_asm_function_end_prologue): Remove unused asm output.
8429         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8430         (nds32_asm_file_start): Output necessary fp_as_gp information.
8431         (nds32_option_override): Adjust register usage.
8432         (nds32_expand_prologue): Consider fp_as_gp situation.
8433         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8434         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8435         (epilogue): Ditto.
8436         (return): Ditto.
8437         (simple_return): Ditto.
8438         (omit_fp_begin): Output special directive for fp_as_gp.
8439         (omit_fp_end): Output special directive for fp_as_gp.
8440         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8441         mforbid-fp-as-gp): New options.
8443 2018-06-01  Mark Wielaard  <mark@klomp.org>
8445         * dwarf2out.c (dwarf2out_finish): Remove generation of
8446         DW_AT_loclists_base.
8448 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8450         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8451         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8452         (struct merged_store_group): Add bit_insertion field.
8453         (dump_char_array): Use standard hexadecimal format.
8454         (merged_store_group::merged_store_group): Set bit_insertion to false.
8455         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8456         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8457         also print the mask in the dump file.
8458         (pass_store_merging::gate): Minor tweak.
8459         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8460         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8461         stores with INTEGER_CST stores.
8462         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8463         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8464         and use it throughout.  Generate bit insertion sequences if need be.
8465         (pass_store_merging::process_store): Remove redundant condition.
8466         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8468 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8470         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8471         the 128-bit floating point types.  Fix function comment.
8473 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8475         * config/aarch64/aarch64-simd.md
8476         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8477         mnemonics.
8478         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8479         mnemonics.
8481 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8483         PR tree-optimization/85989
8484         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8485         variable.
8486         (backprop::intersect_uses): Check it when deciding whether this
8487         is a backedge reference.
8488         (backprop::process_block): Add each phi to m_visited_phis
8489         after visiting it, then clear it at the end.
8491 2018-06-01  Richard Biener  <rguenther@suse.de>
8493         * tree-vectorizer.h (vect_dr_stmt): New function.
8494         (vect_get_load_cost): Adjust.
8495         (vect_get_store_cost): Likewise.
8496         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8497         Use vect_dr_stmt instead of DR_SMTT.
8498         (vect_record_base_alignments): Likewise.
8499         (vect_calculate_target_alignment): Likewise.
8500         (vect_compute_data_ref_alignment): Likewise and make static.
8501         (vect_update_misalignment_for_peel): Likewise.
8502         (vect_verify_datarefs_alignment): Likewise.
8503         (vector_alignment_reachable_p): Likewise.
8504         (vect_get_data_access_cost): Likewise.  Pass down
8505         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8506         (vect_get_peeling_costs_all_drs): Likewise.
8507         (vect_peeling_hash_get_lowest_cost): Likewise.
8508         (vect_enhance_data_refs_alignment): Likewise.
8509         (vect_find_same_alignment_drs): Likewise.
8510         (vect_analyze_data_refs_alignment): Likewise.
8511         (vect_analyze_group_access_1): Likewise.
8512         (vect_analyze_group_access): Likewise.
8513         (vect_analyze_data_ref_access): Likewise.
8514         (vect_analyze_data_ref_accesses): Likewise.
8515         (vect_vfa_segment_size): Likewise.
8516         (vect_small_gap_p): Likewise.
8517         (vectorizable_with_step_bound_p): Likewise.
8518         (vect_prune_runtime_alias_test_list): Likewise.
8519         (vect_analyze_data_refs): Likewise.
8520         (vect_supportable_dr_alignment): Likewise.
8521         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8522         (vect_gen_prolog_loop_niters): Likewise.
8523         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8524         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8525         modify DR_STMT.
8526         (vect_recog_mask_conversion_pattern): Likewise.
8527         (vect_try_gather_scatter_pattern): Likewise.
8528         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8529         to vect_get_store_cost.
8530         (vect_get_store_cost): Get stmt_info instead of DR.
8531         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8532         (vect_get_load_cost): Get stmt_info instead of DR.
8534 2018-06-01  Richard Biener  <rguenther@suse.de>
8536         PR middle-end/86017
8537         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8538         vars wrapped in MEM_REFs.
8540 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8542         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8543         Fix subreg tests so that we only return a choice between
8544         GENERAL_REGS and FP_REGS if the original classes included both.
8546 2018-06-01  Richard Biener  <rguenther@suse.de>
8548         PR ipa/85960
8549         * tree-ssa-structalias.c (get_function_part_constraint):
8550         Handle NULL fi->decl.
8551         (find_func_aliases_for_call): Properly handle indirect
8552         fi from direct call.
8553         (find_func_clobbers): Likewise.
8554         (ipa_pta_execute): Likewise.
8555         (create_variable_info_for): For functions that are ifunc_resolver
8556         resolve to a varinfo that contains the result of the resolver call.
8557         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8558         aliases.
8560 2018-05-31  Michael Collison  <michael.collison@arm.com>
8562         * config/aarch64/aarch64.md:
8563         (*fix_to_zero_extenddfdi2): New pattern.
8564         * gcc.target/aarch64/fix_extend1.c: New testcase.
8566 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8568         PR middle-end/78809
8569         PR middle-end/83026
8570         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8571         and BUILT_IN_STRNCMP_EQ.
8572         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8573         BUILT_IN_STRNCMP_EQ.
8574         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8575         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8576         (gimple_fold_builtin): Likewise.
8577         * tree-ssa-strlen.c (compute_string_length): New function.
8578         (determine_min_obsize): New function.
8579         (handle_builtin_string_cmp): New function to handle calls to
8580         string compare functions.
8581         (strlen_optimize_stmt): Add handling to builtin string compare
8582         calls.
8583         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8584         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8585         * tree.c (build_common_builtin_nodes): Add new defines of
8586         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8588 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8590         PR target/85984
8591         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8592         functions with naked attribute.
8594 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8596         * config/i386/sse.md (avx_vec_concat<mode>):
8597         Substitute concat_tg_mode mode attribute with xtg_mode.
8598         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8599         (concat_tg_mode): Remove mode attribute.
8601 2018-05-31  Martin Sebor  <msebor@redhat.com>
8603         PR c/82063
8604         * calls.c (alloc_max_size): Correct a logic error/typo.
8605         Treat excessive arguments as infinite.  Warn for invalid arguments.
8606         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8608 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8610         PR target/85829
8611         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8612         and movx for Haswell.
8614 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8615             Cesar Philippidis  <cesar@codesourcery.com>
8617         PR middle-end/85879
8618         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8619         when emitting error on private/firstprivate reductions.
8620         * omp-low.c (lower_omp_target): Avoid reference-type processing
8621         on pointers for firstprivate clause.
8623 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8625         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8626         (st1x2): Likewise.
8627         (st1x3): Likewise.
8628         * config/aarch64/aarch64-simd.md
8629         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8630         (aarch64_ld1_x3_<mode>): Likewise
8631         (aarch64_st1x2<VALLDIF:mode>): Likewise
8632         (aarch64_st1_x2_<mode>): Likewise
8633         (aarch64_st1x3<VALLDIF:mode>): Likewise
8634         (aarch64_st1_x3_<mode>): Likewise
8635         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8636         (vld1_s8_x3): Likewise.
8637         (vld1_u16_x3): Likewise.
8638         (vld1_s16_x3): Likewise.
8639         (vld1_u32_x3): Likewise.
8640         (vld1_s32_x3): Likewise.
8641         (vld1_u64_x3): Likewise.
8642         (vld1_s64_x3): Likewise.
8643         (vld1_f16_x3): Likewise.
8644         (vld1_f32_x3): Likewise.
8645         (vld1_f64_x3): Likewise.
8646         (vld1_p8_x3): Likewise.
8647         (vld1_p16_x3): Likewise.
8648         (vld1_p64_x3): Likewise.
8649         (vld1q_u8_x3): Likewise.
8650         (vld1q_s8_x3): Likewise.
8651         (vld1q_u16_x3): Likewise.
8652         (vld1q_s16_x3): Likewise.
8653         (vld1q_u32_x3): Likewise.
8654         (vld1q_s32_x3): Likewise.
8655         (vld1q_u64_x3): Likewise.
8656         (vld1q_s64_x3): Likewise.
8657         (vld1q_f16_x3): Likewise.
8658         (vld1q_f32_x3): Likewise.
8659         (vld1q_f64_x3): Likewise.
8660         (vld1q_p8_x3): Likewise.
8661         (vld1q_p16_x3): Likewise.
8662         (vld1q_p64_x3): Likewise.
8663         (vst1_s64_x2): Likewise.
8664         (vst1_u64_x2): Likewise.
8665         (vst1_f64_x2): Likewise.
8666         (vst1_s8_x2): Likewise.
8667         (vst1_p8_x2): Likewise.
8668         (vst1_s16_x2): Likewise.
8669         (vst1_p16_x2): Likewise.
8670         (vst1_s32_x2): Likewise.
8671         (vst1_u8_x2): Likewise.
8672         (vst1_u16_x2): Likewise.
8673         (vst1_u32_x2): Likewise.
8674         (vst1_f16_x2): Likewise.
8675         (vst1_f32_x2): Likewise.
8676         (vst1_p64_x2): Likewise.
8677         (vst1q_s8_x2): Likewise.
8678         (vst1q_p8_x2): Likewise.
8679         (vst1q_s16_x2): Likewise.
8680         (vst1q_p16_x2): Likewise.
8681         (vst1q_s32_x2): Likewise.
8682         (vst1q_s64_x2): Likewise.
8683         (vst1q_u8_x2): Likewise.
8684         (vst1q_u16_x2): Likewise.
8685         (vst1q_u32_x2): Likewise.
8686         (vst1q_u64_x2): Likewise.
8687         (vst1q_f16_x2): Likewise.
8688         (vst1q_f32_x2): Likewise.
8689         (vst1q_f64_x2): Likewise.
8690         (vst1q_p64_x2): Likewise.
8691         (vst1_s64_x3): Likewise.
8692         (vst1_u64_x3): Likewise.
8693         (vst1_f64_x3): Likewise.
8694         (vst1_s8_x3): Likewise.
8695         (vst1_p8_x3): Likewise.
8696         (vst1_s16_x3): Likewise.
8697         (vst1_p16_x3): Likewise.
8698         (vst1_s32_x3): Likewise.
8699         (vst1_u8_x3): Likewise.
8700         (vst1_u16_x3): Likewise.
8701         (vst1_u32_x3): Likewise.
8702         (vst1_f16_x3): Likewise.
8703         (vst1_f32_x3): Likewise.
8704         (vst1_p64_x3): Likewise.
8705         (vst1q_s8_x3): Likewise.
8706         (vst1q_p8_x3): Likewise.
8707         (vst1q_s16_x3): Likewise.
8708         (vst1q_p16_x3): Likewise.
8709         (vst1q_s32_x3): Likewise.
8710         (vst1q_s64_x3): Likewise.
8711         (vst1q_u8_x3): Likewise.
8712         (vst1q_u16_x3): Likewise.
8713         (vst1q_u32_x3): Likewise.
8714         (vst1q_u64_x3): Likewise.
8715         (vst1q_f16_x3): Likewise.
8716         (vst1q_f32_x3): Likewise.
8717         (vst1q_f64_x3): Likewise.
8718         (vst1q_p64_x3): Likewise.
8720 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8722         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8723         user_label_prefix to name.
8725         * tree-core.h: Update comment about the format of NAME string
8726         passed to handler in attribute_spec.
8728         * config/msp430/msp430.md: Remove erroneous subreg expression from
8729         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8730         zero_extend{q,h}isi2.
8732 2018-05-30  Borislav Petkov  <bp@suse.de>
8734         * doc/extend.texi: Document some architecture specific
8735         constraints and sort entries.
8737 2018-05-30  Martin Sebor  <msebor@redhat.com>
8739         PR middle-end/85369
8740         * builtins.c (expand_builtin_stpcpy_1): New function.
8741         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8742         only if the former succeeds.
8744 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8746         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8747         in saphira.
8749 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8751         * doc/invoke.texi (-flinker-output): Document
8753 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8755         * passes.c (ipa_write_summaries): Only modify statements if body
8756         is in memory.
8757         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8758         incrementally linking.
8759         (ipa_passes): Likewise.
8760         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8761         pass down resolution info.
8762         * common.opt (flag_incremental_link): Update info.
8763         * gcc.c (plugin specs): Turn flinker-output=* to
8764         -plugin-opt=-linker-output-known
8765         * toplev.c (compile_file): Also cut compilation when doing incremental
8766         link.
8767         * flag-types. (enum lto_partition_model): Add
8768         LTO_LINKER_OUTPUT_NOLTOREL.
8769         (invoke.texi): Add -flinker-output docs.
8770         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8771         link same way as WPA; do not stream in dead initializers.
8773         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8774         darf2out_register_external_decl): Support incremental link.
8776 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8778         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8780 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8782         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8783         it down to simple_object_copy_lto_debug_sections.
8784         (run_gcc): Determine incremental LTO link time and configure
8785         lto1 into non-wpa mode, disable renaming of debug sections.
8787 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8789         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8790         descriptions of various incorrectly documented functions.
8792 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8794         Revert:
8795         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8796         address check not strict.
8798 2018-05-30  Richard Biener  <rguenther@suse.de>
8800         PR tree-optimization/85964
8801         * tracer.c (better_p): Drop initialized count check, we only
8802         call the function with initialized counts now.
8803         (find_best_successor): Do find a best edge if one
8804         has uninitialized count.
8805         (find_best_predecessor): Likewise.  Do BB frequency check only
8806         if count is initialized.
8808 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8810         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8811         (aarch64_ldrstr_offset_compare): New.
8812         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8813         load/store orderings.
8814         (aarch64_gen_adjusted_ldpstp): Likewise.
8816 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8818         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8819         Check for subset of GENERAL_REGS and FP_REGS.
8820         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8821         r=w alternative.
8823 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8825         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8826         and wi::to_poly_offset.  Add the current offset and then check
8827         whether the sum fits, rather than using an unchecked addition of
8828         a checked term.  Check for a shwi rather than a uhwi.
8829         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8830         (store_constructor): Use poly_int_tree_p.
8831         (expand_expr_real_1): Likewise.
8832         * function.c (assign_temp): Likewise.
8833         * fold-const.c (const_binop): Use poly_int_tree_p and
8834         wi::to_poly_offset.
8835         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8836         division.
8837         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8838         to_poly_offset for MEM offsets.
8839         * ipa-icf.c (sem_variable::equals): Likewise.
8840         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8841         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8842         wi::to_poly_offset for BIT_FIELD_REF offsets.
8843         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8844         wi::to_poly_offset.
8845         * var-tracking.c (emit_note_insn_var_location): Use
8846         tree_to_poly_uint64.
8848 2018-05-29  Jim Wilson  <jimw@sifive.com>
8850         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8852 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8854         PR target/85950
8855         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8856         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8857         sequence.
8858         (sse4_1_round<mode>2): Use nonimmediate_operand
8859         for operand 1 predicate.
8861 2018-05-29  Martin Sebor  <msebor@redhat.com>
8862             Richard Biener  <rguenther@suse.de>
8864         PR testsuite/85888
8865         * calls.c (get_size_range): Call determine_value_range instead
8866         of get_value_range..
8867         * tree-vrp.h (determine_value_range): Declared new function.
8868         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8870 2018-05-29  Richard Biener  <rguenther@suse.de>
8872         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8873         sure to use non-pattern stmts for get_earlier_stmt arguments.
8874         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8875         called on pattern stmts.
8876         (get_later_stmt): Likewise.
8878 2018-05-29  Martin Liska  <mliska@suse.cz>
8880         PR gcov-profile/85759
8881         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8882         env variables.
8884 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8886         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8887         VEC_UNPACK_*_EXPR.
8888         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8889         VEC_PACK_*_EXPR.
8891         PR target/85918
8892         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8893         VEC_PACK_FLOAT_EXPR): New tree codes.
8894         * tree-pretty-print.c (op_code_prio): Handle
8895         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8896         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8897         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8898         * tree-inline.c (estimate_operator_cost): Likewise.
8899         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8900         * fold-const.c (const_binop): Likewise.
8901         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8902         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8903         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8904         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8905         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8906         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8907         * expr.c (expand_expr_real_2): Likewise.
8908         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8909         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8910         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8911         optabs.
8912         * optabs.c (expand_widen_pattern_expr): For
8913         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8914         sign from result type rather than operand's type.
8915         (expand_binop_directly): For vec_packu_float_optab and
8916         vec_packs_float_optab allow result type to be different from operand's
8917         type.
8918         * optabs-tree.c (optab_for_tree_code): Handle
8919         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8920         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8921         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8922         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8923         VEC_PACK_FLOAT_EXPR.
8924         * tree-vect-stmts.c (supportable_widening_operation): Handle
8925         FIX_TRUNC_EXPR.
8926         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8927         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8928         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8929         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8930         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8931         mode attributes.
8932         (vec_pack<floatprefix>_float_<mode>): New expander.
8933         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8934         attributes.
8935         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8936         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8937         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8938         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8939         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8940         Document.
8941         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8942         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8943         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8944         VEC_PACK_FLOAT_EXPR): Document.
8946 2018-05-29  Richard Biener  <rguenther@suse.de>
8948         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8949         member.
8950         (stmt_vec_info_vec): Make pointer.
8951         (init_stmt_vec_info_vec): Remove.
8952         (free_stmt_vec_info_vec): Likewise.
8953         (set_stmt_vec_info_vec): New function.
8954         (free_stmt_vec_infos): Likewise.
8955         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8956         (set_vinfo_for_stmt): Likewise.
8957         (get_earlier_stmt): Likewise.
8958         (get_later_stmt): Likewise.
8959         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8960         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8961         (vec_info::~vec_info): Free stmt_vec_infos.
8962         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8963         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8964         (pass_slp_vectorize::execute): Likewise.
8965         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8966         (free_stmt_vec_info_vec): Likewise.
8967         (set_stmt_vec_info_vec): New function.
8968         (free_stmt_vec_infos): Likewise.
8969         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8970         the global stmt_vec_info_vec.
8971         * tree-parloops.c (gather_scalar_reductions): Use
8972         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8973         vector.
8975 2018-05-29  Richard Biener  <rguenther@suse.de>
8977         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8979 2018-05-29  Martin Liska  <mliska@suse.cz>
8980             David Malcolm  <dmalcolm@redhat.com>
8982         * vec.c (test_reverse): New.
8983         (vec_c_tests): Add new test.
8984         * vec.h (vl_ptr>::reverse): New function.
8986 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8988         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8990         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8991         and later.
8993 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8995         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8997 2018-05-28  Richard Biener  <rguenther@suse.de>
8999         PR tree-optimization/85933
9000         * tree-vect-data-refs.c (vect_record_base_alignments): Only
9001         look at stmts marked as vectorizable.
9003 2018-05-28  Richard Biener  <rguenther@suse.de>
9005         PR tree-optimization/85934
9006         * tree-vect-generic.c (expand_vector_operations_1): Hoist
9007         vector boolean check before scalar optimization.
9009 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
9011         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
9012         for armv5te.
9014 2018-05-28  Mark Wielaard  <mark@klomp.org>
9016         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
9017         if it is an expression containing a minus sign.
9019 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
9021         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
9023 2018-05-27  Paul Koning  <ni1d@arrl.net>
9025         * config/pdp11/pdp11.md (truncsihi2): Remove.
9027 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
9028             Chung-Ju Wu  <jasonwucj@gmail.com>
9030         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
9031         implementation.
9032         (unaligned_store_dw): Ditto.
9033         * config/nds32/nds32-memory-manipulation.c
9034         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
9035         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
9036         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
9037         (emit_setmem_word_loop): Rename to ...
9038         (emit_setmem_doubleword_loop): ... this.
9039         (nds32_gen_dup_4_byte_to_word_value): New function.
9040         (nds32_gen_dup_8_byte_to_double_word_value): New function.
9041         (nds32_expand_setmem_loop): Refine implementation.
9042         (nds32_expand_setmem_loop_v3m): Ditto.
9043         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
9044         pattern.
9046 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9048         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
9050 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
9052         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
9053         (nds32_init_machine_status): Initialize machine->attr_naked_p and
9054         machine->attr_no_prologue_p.
9055         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
9056         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
9057         (nds32_expand_epilogue): Consider attr_naked_p.
9058         (nds32_expand_epilogue_v3pop): Likewise.
9059         (nds32_can_use_return_insn): Likewise.
9060         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
9061         attr_no_prologue_p fields.
9062         * config/nds32/nds32.opt (mret-in-naked-func): New option.
9064 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
9066         PR target/85918
9067         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
9068         attributes.
9069         * config/i386/sse.md
9070         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
9071         Rename to ...
9072         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
9073         ... this.
9074         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
9075         Rename to ...
9076         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
9077         ... this.
9078         (*<floatsuffix>floatv2div2sf2): Rename to ...
9079         (*float<floatunssuffix>v2div2sf2): ... this.
9080         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
9081         (float<floatunssuffix>v2div2sf2_mask): ... this.
9082         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
9083         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
9084         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
9085         to ...
9086         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
9087         ... this.
9088         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9089         Rename to ...
9090         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
9091         ... this.
9092         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9093         Rename to ...
9094         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
9095         ... this.
9096         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
9097         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
9098         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
9099         gen_ufix_truncv8dfv8si2.
9100         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
9101         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
9102         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
9103         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
9104         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
9105         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
9106         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
9107         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
9109 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9111         PR target/85900
9112         PR target/85345
9113         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9115 2018-05-25  Jim Wilson  <jimw@sifive.com>
9117         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9118         * config/riscv/riscv.c (struct machine_function): Add
9119         interrupt_handler_p and attribute_checked_p fields.
9120         (riscv_attribute_table): Add interrupt.
9121         (riscv_interrupt_type_p): New.
9122         (riscv_save_reg_p): Save extra regs for interrupt handler.
9123         (riscv_use_save_libcall): Return false  for interrupt handler.
9124         (riscv_first_stack_step): Add forward declaration.
9125         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9126         for interrupt handler with large frame.  Use it for saved reg list.
9127         (riscv_expand_prologue): Move flag_stack_usage_info support to
9128         eliminate duplication.
9129         (riscv_expand_epilogue): Generate mret for interrupt handler.
9130         (riscv_epilogue_uses): New.
9131         (riscv_can_use_return_insn): Return false for interrupt handler.
9132         (riscv_function_ok_for_sibcall): Likewise.
9133         (riscv_set_current_function): Add interrupt handler support.
9134         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9135         * config/riscv/riscv.md (UNSPECV_MRET): New.
9136         (GP_REGNUM): New.
9137         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9138         (riscv_mret): New.
9139         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9141 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9143         PR tree-optimization/85712
9144         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9145         this candidate has already been replaced in-situ by a copy.
9147 2018-05-25  Jason Merrill  <jason@redhat.com>
9149         PR c++/80485 - inline function non-zero address.
9150         * symtab.c (nonzero_address): Check DECL_COMDAT.
9152 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9154         PR target/83628
9155         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9156         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9157         extension of SImode operation.  Use const123_operand predicate.
9158         (*saddsi_1): Remove.
9159         (*saddl_se_1): Ditto.
9160         (*ssubsi_1): Ditto.
9161         (*ssubl_se_1): Ditto.
9162         * config/alpha/predicates.md (const123_operand): New predicate.
9163         * config/alpha/constraints.md (P): Use IN_RANGE.
9165 2018-05-25  Richard Biener  <rguenther@suse.de>
9167         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9168         defaulted to true.
9169         (ref_maybe_used_by_stmt_p): Likewise.
9170         (stmt_may_clobber_ref_p): Likewise.
9171         (stmt_may_clobber_ref_p_1): Likewise.
9172         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9173         and pass it along.
9174         (ref_maybe_used_by_stmt_p): Likewise.
9175         (stmt_may_clobber_ref_p): Likewise.
9176         (stmt_may_clobber_ref_p_1): Likewise.
9177         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9178         the alias oracle to disambiguate DRs with stmts DR analysis
9179         couldn't handle.
9180         (vect_analyze_data_refs): Do not give up on not analyzable
9181         DRs for BB vectorization.  Remove code truncating the dataref
9182         vector.
9184 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9186         PR target/85832
9187         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9188         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9189         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9191 2018-05-25  Richard Biener  <rguenther@suse.de>
9193         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9194         function, combining stmt data ref gathering and fatal analysis
9195         parts.
9196         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9197         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9198         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9199         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9200         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9202 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9204         PR tree-optimization/85720
9205         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9206         SCC if all partitions are builtins.
9207         (version_loop_by_alias_check): New parameter.  Generate cancelable
9208         runtime alias check if all partitions are builtins.
9209         (distribute_loop): Update call to above function.
9211 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9213         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9214         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9215         (parm_default_def_partition_arg): Ditto.
9216         (set_parm_default_def_partition): Ditto.
9217         (get_parm_default_def_partitions): Ditto and make it static.
9218         (get_undefined_value_partitions): Ditto and make it static.
9219         (remove_ssa_form): Refactor call to init_var_map here.
9220         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9221         computation for loop region.
9222         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9223         (register_default_def): Delete.
9224         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9225         (parm_default_def_partition_arg): Ditto.
9226         (set_parm_default_def_partition): Ditto.
9227         (get_parm_default_def_partitions): Ditto and make it static.
9228         (get_undefined_value_partitions): Ditto and make it static.
9229         (coalesce_with_default, coalesce_with_default): Update comment.
9230         (create_coalesce_list_for_region): New func factored out from
9231         create_outofssa_var_map.
9232         (populate_coalesce_list_for_outofssa): New func factored out from
9233         create_outofssa_var_map and coalesce_ssa_name.
9234         (create_outofssa_var_map): Delete.
9235         (coalesce_ssa_name): Refactor to support live range computation.
9236         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9237         (get_parm_default_def_partitions): Delete.
9238         (get_undefined_value_partitions): Ditto.
9239         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9240         computation for loop region.
9241         (new_tree_live_info, loe_visit_block): Ditto.
9242         (live_worklist, set_var_live_on_entry): Ditto.
9243         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9244         * tree-ssa-live.h (struct _var_map): New fields.
9245         (init_var_map): Change decl.
9246         (region_contains_p): New.
9248 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9250         * tree-ssa-live.h (live_merge_and_clear): Delete.
9252 2018-05-25  Richard Biener  <rguenther@suse.de>
9254         PR c++/85912
9255         * tree-dump.c (dequeue_and_dump): Remove access to removed
9256         operand 2 of a SWITCH_EXPR.
9258 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9260         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9261         multiplication and division.
9262         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9263         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9264         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9265         (cond_udiv_optab, cond_umod_optab): New optabs.
9266         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9267         (IFN_COND_RDIV): New internal functions.
9268         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9269         TRUNC_MOD_EXPR and RDIV_EXPR.
9270         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9271         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9272         New unspecs.
9273         (SVE_INT_BINARY): Include mult.
9274         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9275         (optab, sve_int_op): Handle mult.
9276         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9277         UNSPEC_COND_DIV.
9278         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9279         for SVE_INT_BINARY_SD.
9281 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9283         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9284         (optab, sve_int_op): Handle div and udiv.
9285         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9286         for SVE_INT_BINARY_SD.
9287         (*<optab><mode>3): New insn for the same.
9289 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9291         * tree-vect-patterns.c: Include predict.h.
9292         (vect_recog_divmod_pattern): Restrict check for division support
9293         to when optimizing for size.
9295 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9297         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9298         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9299         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9300         (gimple_match_op::set_op): Likewise.
9301         (gimple_resimplify4): Declare.
9302         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9303         (expr::gen_transform): Likewise.
9304         (decision_tree::gen): Generate a simplification routine for 4 operands.
9305         * gimple-match-head.c (gimple_simplify): Add an overload for
9306         4 operands.  In the top-level function, handle up to 4 call
9307         arguments and call gimple_resimplify4.
9308         (gimple_resimplify4): New function.
9309         (build_call_internal): Pass a fourth operand.
9310         (maybe_push_to_seq): Likewise.
9311         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9312         Fold VEC_COND_EXPRs of an operation and a default value into
9313         an IFN_COND_* function if possible.
9314         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9315         New unspecs.
9316         (SVE_COND_FP_BINARY): Include them.
9317         (optab, sve_fp_op): Handle them.
9318         (SVE_INT_BINARY_REV): New code iterator.
9319         (SVE_COND_FP_BINARY_REV): New int iterator.
9320         (commutative): New int attribute.
9321         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9322         Declare.
9323         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9324         function.
9325         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9326         (*cond_<optab><mode>): New patterns for reversed operands.
9328 2018-05-25  Richard Biener  <rguenther@suse.de>
9330         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9331         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9332         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9333         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9334         * tree-vect-data-refs.c (everywhere): Adjust users.
9335         * tree-vect-loop.c (everywhere): Likewise.
9336         * tree-vect-slp.c (everywhere): Likewise.
9337         * tree-vect-stmts.c (everywhere): Likewise.
9338         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9340 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9342         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9343         Rename to...
9344         (gcc_cv_as_section_exclude): ... this.
9345         Try Solaris as #exclude syntax.
9346         * configure: Regenerate.
9347         * config.in: Regenerate.
9348         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9349         SECTION_EXCLUDE.
9350         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9351         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9353         * varasm.c (default_elf_asm_named_section): Don't check if
9354         HAVE_GAS_SECTION_EXCLUDE is defined.
9356 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9358         * doc/md.texi: Update the documentation of the cond_* optabs
9359         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9360         Describe the scalar case too.
9361         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9362         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9363         instead of 2.
9364         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9365         (get_conditional_internal_fn): Update comment.
9366         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9367         accumulator value as a final argument to conditional functions.
9368         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9369         a define_expand and add an "else" operand.  Assert for now that
9370         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9371         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9372         (*cond_<optab><mode>): New patterns.
9373         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9374         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9375         (UNSPEC_COND_EOR): Delete.
9376         (optab): Remove associated mappings.
9377         (SVE_INT_BINARY): New code iterator.
9378         (sve_int_op): Remove int attribute and add "minus" to the code
9379         attribute.
9380         (SVE_COND_INT_OP): Delete.
9381         (SVE_COND_FP_OP): Rename to...
9382         (SVE_COND_FP_BINARY): ...this.
9384 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9386         * optabs.c (can_reuse_operands_p): New function.
9387         (maybe_legitimize_operands): Try to reuse the results for
9388         earlier operands.
9390 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9392         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9393         Add {q} suffix to insn mnemonic.
9395 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9397         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9398         (msp430_warn_func_return): New.
9400 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9402         * fold-const.c (tree_nonzero_bits): New function.
9403         * fold-const.h (tree_nonzero_bits): Likewise.
9404         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9405         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9407 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9409         PR target/85900
9410         PR target/85345
9411         * varasm.c (assemble_alias): Check ifunc_resolver only on
9412         FUNCTION_DECL.
9414 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9416         PR target/85903
9417         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9418         when memory input operand is handled.
9420 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9422         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9423         global.
9424         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9426 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9428         * match.pd: Delay FMA folds until after vectorization.
9430 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9432         PR target/83009
9433         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9434         address check not strict.
9436 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9438         * gimple-match.h (gimple_match_op): New class.
9439         (mprts_hook): Replace parameters with a gimple_match_op *.
9440         (maybe_build_generic_op): Likewise.
9441         (gimple_simplified_result_is_gimple_val): Replace parameters with
9442         a const gimple_match_op *.
9443         (gimple_simplify): Replace code_helper * and tree * parameters with
9444         a gimple_match_op * parameter.
9445         (gimple_resimplify1): Replace code_helper *, tree and tree *
9446         parameters with a gimple_match_op * parameter.
9447         (gimple_resimplify2): Likewise.
9448         (gimple_resimplify3): Likewise.
9449         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9450         parameters with a gimple_match_op * parameter.
9451         * gimple-match-head.c (gimple_simplify): Change prototypes of
9452         auto-generated functions to take a gimple_match_op * instead of
9453         separate code_helper * and tree * parameters.  Make the same
9454         change in the top-level overload and update calls to the
9455         gimple_resimplify routines.  Update calls to the auto-generated
9456         functions and to maybe_push_res_to_seq in the publicly-facing
9457         operation-specific gimple_simplify overloads.
9458         (gimple_match_op::MAX_NUM_OPS): Define.
9459         (gimple_resimplify1): Replace rcode and ops with a single res_op
9460         parameter.  Update call to gimple_simplify.
9461         (gimple_resimplify2): Likewise.
9462         (gimple_resimplify3): Likewise.
9463         (mprts_hook): Replace parameters with a gimple_match_op *.
9464         (maybe_build_generic_op): Likewise.
9465         (build_call_internal): Replace type, nargs and ops with
9466         a gimple_match_op *.
9467         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9468         with a single gimple_match_op *.  Update calls to mprts_hook,
9469         build_call_internal and gimple_simplified_result_is_gimple_val.
9470         Factor out code that is common to the tree_code and combined_fn cases.
9471         * genmatch.c (expr::gen_transform): Replace tem_code and
9472         tem_ops with a gimple_match_op called tem_op.  Update calls
9473         to the gimple_resimplify functions and maybe_push_res_to_seq.
9474         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9475         res_ops.  Update call to the gimple_resimplify functions.
9476         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9477         (decision_tree::gen): Make the functions take a gimple_match_op *
9478         called res_op instead of separate res_code and res_ops parameters.
9479         Update call accordingly.
9480         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9481         and ops with a single res_op parameter.  Update calls to
9482         maybe_build_generic_op and maybe_push_res_to_seq.
9483         (fold_stmt_1): Update calls to gimple_simplify and
9484         replace_stmt_with_simplification.
9485         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9486         and gimple_simplified_result_is_gimple_val.
9487         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9488         gimple_simplify.
9489         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9490         with a gimple_match_op *.
9491         (vn_nary_build_or_lookup): Likewise.  Update call to
9492         vn_nary_build_or_lookup_1.
9493         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9494         gimple_match_op *.  Update calls to the gimple_resimplify routines
9495         and to gimple_simplified_result_is_gimple_val.
9496         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9497         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9498         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9499         (visit_nary_op): Likewise.
9500         (visit_reference_op_load): Likewise.
9502 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9504         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9505         modifier for printing the step amount.
9507 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9509         PR target/78849
9510         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9511         types.
9513 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9515         * doc/sourcebuild.texi (Endianness): New subsubsection.
9517 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9519         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9520         <prefetch_dynamic_strides>: New const bool field.
9521         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9522         prefetch_dynamic_strides.
9523         (exynosm1_prefetch_tune): Likewise.
9524         (thunderxt88_prefetch_tune): Likewise.
9525         (thunderx_prefetch_tune): Likewise.
9526         (thunderx2t99_prefetch_tune): Likewise.
9527         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9528         false.
9529         (aarch64_override_options_internal): Update to set
9530         PARAM_PREFETCH_DYNAMIC_STRIDES.
9531         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9532         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9533         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9534         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9535         prefetch-dynamic-strides setting.
9537 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9539         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9540         <minimum_stride>: New const int field.
9541         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9542         minimum_stride field defaulting to -1.
9543         (exynosm1_prefetch_tune): Likewise.
9544         (thunderxt88_prefetch_tune): Likewise.
9545         (thunderx_prefetch_tune): Likewise.
9546         (thunderx2t99_prefetch_tune): Likewise.
9547         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9548         <default_opt_level>: Set to 3.
9549         (aarch64_override_options_internal): Update to set
9550         PARAM_PREFETCH_MINIMUM_STRIDE.
9551         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9552         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9553         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9554         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9555         stride is constant and is below the minimum stride threshold.
9557 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9559         * config/arm/arm-cpus.in (mode26): Delete.
9560         (armv4): Delete mode26 reference.
9561         * config/arm/arm.c (arm_configure_build_target): Delete use of
9562         isa_bit_mode26.
9564 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9566         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9567         New insn pattern.
9568         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9569         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9570         for non-SSE modes.
9571         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9572         (floatunsdidf2): Ditto.
9574 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9576         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9577         (fixuns_trunc<mode>si2_avx512f): Ditto.
9578         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9579         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9580         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9582 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9584         PR rtl-optimization/79985
9585         * df-scan.c (df_insn_refs_collect): Remove special case for
9586         global registers and asm statements.
9588 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9590         * extend.texi (Global Register Variables): Rewrite the bullet list.
9591         Note that the register is available for allocation. Note that access
9592         via inline asm must use constraints. Add note about async-signal
9593         handlers. Remove paragraph about automagic register selection.
9595 2018-05-23  Richard Biener  <rguenther@suse.de>
9597         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9598         of fixed offset from memset VN.
9600 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9602         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9603         first_interp field.
9604         (alloc_cand_and_find_basis): Initialize first_interp field.
9605         (slsr_process_mul): Modify first_interp field.
9606         (slsr_process_add): Likewise.
9607         (slsr_process_cast): Modify first_interp field for each new
9608         interpretation.
9609         (slsr_process_copy): Likewise.
9610         (dump_candidate): Dump first_interp field.
9611         (replace_mult_candidate): Process all interpretations, not just
9612         subsequent ones.
9613         (replace_rhs_if_not_dup): Likewise.
9614         (replace_one_candidate): Likewise.
9616 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9618         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9619         Add new boolean.
9620         (aarch64_needs_frame_chain): New function.
9621         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9623 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9625         PR target/84882
9626         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9627         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9628         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9629         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9630         as true for strict-align.
9631         (aarch64_can_inline_p): Perform checks even when callee has no
9632         attributes to check for strict alignment.
9633         * doc/extend.texi (AArch64 Function Attributes): Document
9634         no-strict-align.
9635         * doc/invoke.texi: (AArch64 Options): Likewise.
9637 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9639         PR tree-optimization/85853
9640         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9641         the handling of the root of the node to...
9642         (vect_slp_analyze_node_operations_1): ...this new function,
9643         and run the whole thing with the child nodes' def types
9644         set according to their SLP node's def type.
9646 2018-05-23  Richard Biener  <rguenther@suse.de>
9648         PR middle-end/85874
9649         * tree-data-ref.c (create_runtime_alias_checks): Defer
9650         and ignore overflow warnings.
9652 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9654         PR tree-optimization/85822
9655         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9656         constants.
9658 2018-05-23  Richard Biener  <rguenther@suse.de>
9660         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9661         memset constants via native_interpret_expr.
9663 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9665         PR target/85345
9666         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9667         attribute.
9668         (cgraph_node::create_alias): Likewise.
9669         (cgraph_node::get_availability): Check ifunc_resolver instead
9670         of looking up ifunc attribute.
9671         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9672         * varasm.c (do_assemble_alias): Likewise.
9673         (assemble_alias): Likewise.
9674         (default_binds_local_p_3): Likewise.
9675         * cgraph.h (cgraph_node): Add ifunc_resolver.
9676         (cgraph_node::only_called_directly_or_aliased_p): Return false
9677         for IFUNC resolver.
9678         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9679         attribute.
9680         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9681         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9682         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9683         instead of looking up ifunc attribute.
9685 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9687         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9689 2018-05-22  Martin Sebor  <msebor@redhat.com>
9691         PR middle-end/85359
9692         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9693         only when expasion succeeds.
9694         (expand_builtin_strcmp): Same.
9695         (expand_builtin_strncmp): Same.
9697 2018-05-22  Martin Sebor  <msebor@redhat.com>
9699         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9701 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9702             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9704         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9705         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9706         code.
9707         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9708         Add check for legitimate_address.
9709         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9710         (aarch64_swap_ldrstr_operands): New.
9711         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9712         Define prototype.
9714 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9715             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9717         * config/aarch64/aarch64.md: New patterns to generate stp
9718         and ldp.
9719         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9720         single words and double words.
9721         (load_pair_sw, load_pair_dw): Likewise.
9722         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9723         Delete.
9724         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9725         Delete.
9726         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9727         for different mode ldpstp and add peephole for merged zero stores.
9728         Likewise for loads.
9729         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9730         Add size check.
9731         (aarch64_gen_store_pair): Rename calls to match new patterns.
9732         (aarch64_gen_load_pair): Rename calls to match new patterns.
9733         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9734         (load_pair<DREG:mode><DREG2:mode>): ... This.
9735         (store_pair<mode>): Rename to...
9736         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9737         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9738         New mode iterators.
9739         (V_INT_EQUIV): Handle SImode.
9740         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9741         New predicate.
9743 2018-05-22  Martin Sebor  <msebor@redhat.com>
9745         PR c/85623
9746         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9747         or ajust the presumed bound on an operation to avoid unnecessary
9748         warnings.
9750 2018-05-22  Martin Sebor  <msebor@redhat.com>
9752         PR tree-optimization/85826
9753         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9754         assuming that a DECL necesarily has a constant size.
9756 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9758         PR middle-end/85862
9759         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9761 2018-05-22  Richard Biener  <rguenther@suse.de>
9763         PR tree-optimization/85834
9764         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9765         non-constant and non-zero memset arguments.
9767 2018-05-22  Martin Liska  <mliska@suse.cz>
9769         PR ipa/85607
9770         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9772 2018-05-22  Richard Biener  <rguenther@suse.de>
9774         PR tree-optimization/85863
9775         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9776         comparisons when vectype is specified.
9777         (vectorizable_condition): Do not specify vectype for
9778         vect_is_simple_cond when SLP vectorizing.
9780 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9782         PR target/85657
9783         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9784         define __ibm128 as long double.
9785         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9786         as a distinct type when IEEE 128-bit support is enabled.
9787         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9788         128-bit types to use the correct functions.
9789         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9790         convert between 128-bit floating point types that have different
9791         modes but the same representation, instead of using gen_lowpart to
9792         makean alias.
9793         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9794         KFmode.
9795         (IFKF_reg): New attributes to give the register constraints for
9796         IFmode and KFmode.
9797         (extend<mode>tf2_internal): New insns to mark an explicit
9798         conversion between 128-bit floating point types that have a
9799         different mode but share the same representation.
9801 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9803         PR tree-optimization/85814
9804         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9805         a null return from get_strinfo when unsharing the next
9806         strinfo in the chain.
9808 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9810         PR gcc/84923
9811         * varasm.c (weak_finish): Clean up weak_decls.
9813 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9815         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9816         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9817         UNSPEC_UADALP values.
9818         * config/aarch64/iterators.md (ABAL): New int iterator.
9819         (ABDL2): Likewise.
9820         (ADALP): Likewise.
9821         (sur): Add mappings for the above.
9822         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9823         New define_insn.
9824         (aarch64_<sur>abal<mode>_4): Likewise.
9825         (aarch64_<sur>adalp<mode>_3): Likewise.
9826         (<sur>sadv16qi): New define_expand.
9828 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9830         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9831         (*movdf_internal): Ditto.
9832         (*rcpsf2_sse): Ditto.
9833         (*rsqrtsf2_sse): Ditto.
9834         (*sqrt<mode>2_sse): Ditto.
9836 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9838         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9839         eor3q<mode>4.
9840         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9841         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9842         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9843         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9844         vbcaxq_s64): New.
9845         * config/aarch64/arm_neon.h: Likewise.
9846         * config/aarch64/iterators.md (VQ_I): New.
9848 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9850         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9851         arc*-*-linux*.
9852         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9853         MULTILIB_DIRNAMES
9855 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9857         * config/nds32/constraints.md (S): New constraint.
9858         * config/nds32/nds32.md (call_internal): Use constraint S.
9859         (call_value_internal): Likewise.
9860         (sibcall_internal): Likewise.
9861         (sibcall_value_internal): Likewise.
9863 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9864             Chung-Ju Wu  <jasonwucj@gmail.com>
9866         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9867         into consideration.
9869 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9870             Chung-Ju Wu  <jasonwucj@gmail.com>
9872         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9873         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9874         (nds32_rtx_costs_impl): Simplify.
9875         (nds32_address_cost_impl): Simplify.
9876         (nds32_init_rtx_costs): New function.
9877         (nds32_rtx_costs_speed_prefer): Likewise.
9878         (nds32_rtx_costs_size_prefer): Likewise.
9879         (nds32_address_cost_speed_prefer): Likewise.
9880         (nds32_address_cost_speed_fwprop): Likewise.
9881         (nds32_address_cost_size_prefer): Likewise.
9882         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9883         * config/nds32/nds32.c (nds32_option_override): Use
9884         nds32_init_rtx_costs function.
9886 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9888         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9889         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9890         (TARGET_PIPELINE_N8): Likewise.
9891         (TARGET_PIPELINE_N10): Likewise.
9892         (TARGET_PIPELINE_N13): Likewise.
9893         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9895 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9897         * config/nds32/nds32-fpu.md: Update copyright year.
9899 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9901         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9903 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9905         * config/nds32/nds32.c
9906         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9907         * config/nds32/nds32.opt (minline-asm-r15): New option.
9909 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9911         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9912         MASK_HW_ABS.
9913         * config/nds32/nds32.md (abssi2): New pattern.
9915 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9917         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9918         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9919         Merge insn pattern from sse_cvtsi2ss<round_name> and
9920         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9921         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9922         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9923         using SWI48 mode iterator.
9924         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9925         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9926         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9927         pattern from sse_cvttss2si<round_saeonly_name>
9928         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9929         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9930         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9931         using SWI48 mode iterator.
9932         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9933         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9934         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9935         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9936         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9937         using SWI48 mode iterator.
9938         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9939         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9940         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9941         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9942         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9943         SWI48 mode iterator.
9944         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9945         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9946         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9947         pattern from sse_cvttsd2si<round_saeonly_name>
9948         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9950 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9952         * config/nds32/nds32-md-auxiliary.c
9953         (nds32_valid_smw_lwm_base_p): Refine.
9954         (nds32_output_smw_single_word): Refine.
9955         (nds32_output_smw_double_word): New.
9956         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9958 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9960         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9961         (nds32_output_stack_pop): Refine.
9962         (nds32_expand_unaligned_load): Refine.
9963         (nds32_expand_unaligned_store): Refine.
9965 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9966             Chung-Ju Wu  <jasonwucj@gmail.com>
9968         * config/nds32/constants.md: Add TP_REGNUM constant.
9969         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9970         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9971         UNSPEC_ADD32.
9972         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9973         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9974         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9975         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9976         and PIC code generation.
9977         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9978         code generation.
9979         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9980         optimization.
9981         * config/nds32/nds32.md: Support TLS and PIC.
9982         * config/nds32/nds32.c: Support TLS and PIC.
9983         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9984         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9985         predicate.
9987 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9989         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9990         mode with E_ prefix.
9992 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9993             Chung-Ju Wu  <jasonwucj@gmail.com>
9995         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9996         * config/nds32/nds32-md-auxiliary.c
9997         (symbolic_reference_mentioned_p): New.
9998         (nds32_legitimize_ict_address): New.
9999         (nds32_expand_ict_move): New.
10000         (nds32_indirect_call_referenced_p): New.
10001         (nds32_symbol_binds_local_p): Delete.
10002         (nds32_long_call_p): Modify.
10003         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
10004         * config/nds32/nds32-protos.h
10005         (symbolic_reference_mentioned_p): Declare.
10006         (nds32_legitimize_ict_address): Declare.
10007         (nds32_expand_ict_move): Declare.
10008         (nds32_indirect_call_referenced_p): Declare.
10009         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
10010         (nds32_relax_group): Use nds32_ict_const_p as condition.
10011         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
10012         (nds32_asm_file_start): Output ict_model directive in asm code.
10013         (nds32_legitimate_address_p): Consider indirect call.
10014         (nds32_print_operand): Consider indirect call.
10015         (nds32_print_operand_address): Consider indirect call.
10016         (nds32_insert_attributes): Handle "indirect_call" attribute.
10017         (TARGET_LEGITIMATE_ADDRESS_P): Define.
10018         (TARGET_LEGITIMATE_CONSTANT_P): Define.
10019         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
10020         (TARGET_DELEGITIMIZE_ADDRESS): Define.
10021         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
10022         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
10023         (TARGET_ICT_MODEL_SMALL): Define.
10024         (TARGET_ICT_MODEL_LARGE): Define.
10025         * config/nds32/nds32.md (movsi): Consider ict model.
10026         (call, call_value): Consider ict model.
10027         (sibcall, sibcall_value): Consider ict model.
10028         * config/nds32/nds32.opt (mict-model): New option.
10029         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
10030         model.
10032 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
10033             Monk Chiang  <sh.chiang04@gmail.com>
10034             Jim Wilson <jimw@sifive.com>
10036         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
10037         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
10038         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
10039         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
10040         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
10041         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
10042         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
10043         compute save_libcall_adjustment properly.
10044         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
10045         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
10046         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
10047         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
10048         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
10049         (ABI_SPEC): Handle mabi=ilp32e.
10050         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
10051         (RVE): Add RVE mask.
10052         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
10053         <-march>: Add rv32e as an example.
10055 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
10057         PR c++/82899
10058         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
10059         (intra_create_variable_infos): Handle C++ constructors.
10061 2018-05-18  Martin Liska  <mliska@suse.cz>
10063         * passes.def: Remove a redundant pass.
10065 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
10067         PR bootstrap/85838
10068         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
10070 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10072         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
10073         (ARMv4): Update.
10074         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
10075         (ARMv6m): Update.
10076         (armv2, armv2a, armv3, armv3m): Delete architectures.
10077         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
10078         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
10079         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
10080         Delete cpus.
10081         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
10082         (*mulsidi3adddi): Likewise.
10083         (mulsidi3): Likewise.
10084         (*mulsidi3_nov6): Likewise.
10085         (umulsidi3): Likewise.
10086         (umulsidi3_nov6): Likewise.
10087         (umaddsidi4): Likewise.
10088         (*umulsidi3adddi): Likewise.
10089         (smulsi3_highpart): Likewise.
10090         (*smulsi3_highpart_nov6): Likewise.
10091         (umulsi3_highpart): Likewise.
10092         (*umulsi3_highpart_nov6): Likewise.
10093         * config/arm/arm.h (arm_arch3m): Delete.
10094         * config/arm/arm.c (arm_arch3m): Delete.
10095         (arm_option_override_internal): Update armv3-related comment.
10096         (arm_configure_build_target): Delete use of isa_bit_mode32.
10097         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
10098         (arm_rtx_costs_internal): Delete check of arm_arch3m.
10099         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
10100         (mulsa3): Likewise.
10101         (mulusa3): Likewise.
10102         * config/arm/arm-protos.h (arm_arch3m): Delete.
10103         * config/arm/arm-tables.opt: Regenerate.
10104         * config/arm/arm-tune.md: Likewise.
10105         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
10106         deleted architectures.
10108 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10110         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
10111         (armv5t, armv5te): New features.
10112         (ARMv5, ARMv5e): Delete fgroups.
10113         (ARMv5t, ARMv5te): Adjust for above changes.
10114         (ARMv6m): Likewise.
10115         (armv5, armv5e): Delete arches.
10116         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10117         arm_arch5.
10118         (*call_reg_arm): Likewise.
10119         (*call_value_reg_armv5): Likewise.
10120         (*call_value_reg_arm): Likewise.
10121         (*call_symbol): Likewise.
10122         (*call_value_symbol): Likewise.
10123         (*sibcall_insn): Likewise.
10124         (*sibcall_value_insn): Likewise.
10125         (clzsi2): Likewise.
10126         (prefetch): Likewise.
10127         (define_split and define_peephole2 dependent on arm_arch5):
10128         Likewise.
10129         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10130         arm_arch5e.
10131         (TARGET_ARM_QBIT): Likewise.
10132         (TARGET_DSP_MULTIPLY): Likewise.
10133         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10134         (arm_arch5, arm_arch5e): Delete.
10135         (arm_arch5t, arm_arch5te): Declare.
10136         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10137         (arm_arch5t): Declare.
10138         (arm_option_reconfigure_globals): Update for the above.
10139         (arm_options_perform_arch_sanity_checks): Update comment, replace
10140         use of arm_arch5 with arm_arch5t.
10141         (use_return_insn): Likewise.
10142         (arm_emit_call_insn): Likewise.
10143         (output_return_instruction): Likewise.
10144         (arm_final_prescan_insn): Likewise.
10145         (arm_coproc_builtin_available): Likewise.
10146         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10147         arm_arch5e with arm_arch5t and arm_arch5te.
10148         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10149         (arm_arch5t, arm_arch5te): Declare.
10150         * config/arm/arm-tables.opt: Regenerate.
10151         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10152         * config/arm/t-multilib: Likewise.
10153         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10154         instead of arm_arch5.
10155         (*call_reg_thumb1): Likewise.
10156         (*call_value_reg_thumb1_v5): Likewise.
10157         (*call_value_reg_thumb1): Likewise.
10158         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10159         unreachable path.
10160         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10162 2018-05-18  Martin Liska  <mliska@suse.cz>
10164         PR gcov-profile/84846
10165         * doc/gcov.texi: Document -t option of gcov tool.
10167 2018-05-18  Martin Liska  <mliska@suse.cz>
10169         PR gcov-profile/84846
10170         * gcov.c (print_usage): Add new -t option.
10171         (process_args): Handle the option.
10172         (generate_results): Use stdout as output when requested by
10173         the option.
10175 2018-05-18  Martin Liska  <mliska@suse.cz>
10177         PR gcov-profile/84846
10178         * coverage.c (coverage_init): Write PWD to .gcno file.
10179         * doc/gcov.texi: Document how working directory is printed.
10180         * gcov-dump.c (dump_gcov_file): Print PWD.
10181         * gcov.c (output_intermediate_file): Likewise.
10182         (read_graph_file): Read PWD string.
10183         (output_lines): Print PWD.
10185 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10187         PR middle-end/85817
10188         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10189         for retval and return false if all args to phi are zero.
10191 2018-05-18  Richard Biener  <rguenther@suse.de>
10193         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10194         method.
10195         (evrp_dom_walker::before_dom_children): Call it.
10197 2018-05-18  Richard Biener  <rguenther@suse.de>
10199         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10200         results when processing array refs with variable index.
10202 2018-05-18  Toon Moene  <toon@moene.org>
10204         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10205         directly after that of -floop-interchange. Indicate that both
10206         options are enabled by default when specifying -O3.
10208 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10210         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10211         iterator.  Delete separate integer-mode vec_set<mode> expander.
10212         (aarch64_simd_vec_setv2di): Delete.
10213         (vec_setv2di): Delete.
10214         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10215         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10216         the "w, r" alternative.
10218 2018-05-18  Martin Liska  <mliska@suse.cz>
10220         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10221         * tree-pass.h (make_pass_lower_switch_O0): New function.
10222         * tree-switch-conversion.c (node_has_low_bound): Remove.
10223         (node_has_high_bound): Likewise.
10224         (node_is_bounded): Likewise.
10225         (class pass_lower_switch): Make it a template type and create
10226         two instances.
10227         (pass_lower_switch::execute): Add template argument.
10228         (make_pass_lower_switch): New function.
10229         (make_pass_lower_switch_O0): New function.
10230         (do_jump_if_equal): Remove.
10231         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10232         all the hard work to tree optimization passes.
10234 2018-05-18  Martin Liska  <mliska@suse.cz>
10236         * dbgcnt.c (limit_low): Renamed from limit.
10237         (limit_high): New variable.
10238         (dbg_cnt_is_enabled): Check for upper limit.
10239         (dbg_cnt): Adjust dumping.
10240         (dbg_cnt_set_limit_by_index): Add new argument for high
10241         value.
10242         (dbg_cnt_set_limit_by_name): Likewise.
10243         (dbg_cnt_process_single_pair): Parse new format.
10244         (dbg_cnt_process_opt): Use strtok.
10245         (dbg_cnt_list_all_counters): Remove 'value' and add
10246         'limit_high'.
10247         * doc/invoke.texi: Document changes.
10249 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10251         * doc/sourcebuild.texi (scalar_all_fma): Document.
10252         * tree.def (FMA_EXPR): Delete.
10253         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10254         * internal-fn.c (ternary_direct): New macro.
10255         (expand_ternary_optab_fn): Likewise.
10256         (direct_ternary_optab_supported_p): Likewise.
10257         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10258         * builtins.c (fold_builtin_fma): Delete.
10259         (fold_builtin_3): Don't call it.
10260         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10261         * expr.c (expand_expr_real_2): Likewise.
10262         * fold-const.c (operand_equal_p): Likewise.
10263         (fold_ternary_loc): Likewise.
10264         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10265         * gimple.c (DEFTREECODE): Likewise.
10266         * gimplify.c (gimplify_expr): Likewise.
10267         * optabs-tree.c (optab_for_tree_code): Likewise.
10268         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10269         * tree-eh.c (operation_could_trap_p): Likewise.
10270         (stmt_could_throw_1_p): Likewise.
10271         * tree-inline.c (estimate_operator_cost): Likewise.
10272         * tree-pretty-print.c (dump_generic_node): Likewise.
10273         (op_code_prio): Likewise.
10274         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10275         * tree-ssa-operands.c (get_expr_operands): Likewise.
10276         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10277         * fold-const-call.h (fold_fma): Delete.
10278         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10279         CFN_FNMA and CFN_FNMS.
10280         (fold_fma): Delete.
10281         * genmatch.c (combined_fn): New enum.
10282         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10283         (commutative_op): New function.
10284         (commutate): Use it.  Handle more than 2 operands.
10285         (dt_operand::gen_gimple_expr): Use commutative_op.
10286         (parser::parse_expr): Allow :c to be used with non-binary
10287         operators if the commutative operand is known.
10288         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10289         CFN_FMS, CFN_FNMA and CFN_FNMS.
10290         (backprop::process_assign_use): Remove FMA_EXPR handling.
10291         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10292         (gen_hsa_fma): New function.
10293         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10294         IFN_FNMA and IFN_FNMS.
10295         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10296         * gimple-fold.h (follow_all_ssa_edges): Declare.
10297         * gimple-fold.c (follow_all_ssa_edges): New function.
10298         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10299         gimple_build interface and use follow_all_ssa_edges to fold the result.
10300         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10301         instead of checking for optabs directly.
10302         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10303         rather than FMA_EXPRs.
10304         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10305         call to IFN_FMA instead of an FMA_EXPR.
10307 2018-05-17  Jim Wilson  <jimw@sifive.com>
10309         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10310         sign extended promoted subreg, and the range does not have the sign bit
10311         set, then do a sign extend.
10313         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10314         test, check for sign extended subreg and/or constant operands, and
10315         do a sign extend in that case.
10317 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10319         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10320         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10321         Add untyped.
10322         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10323         Change logics_shift_reg to logics_shift_imm.
10324         (thunderx2t99_fp_loadpair_basic): Delete.
10325         (thunderx2t99_fp_storepair_basic): Delete.
10326         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10327         (thunderx2t99_asimd_polynomial): Delete.
10328         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10329         and neon_fp_mul_d_scalar_q.
10330         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10331         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10332         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10333         (thunderx2t99_asimd_lut): Add missing tbl types.
10334         (thunderx2t99_asimd_ext): Delete.
10335         (thunderx2t99_asimd_load1_1_mult): Delete.
10336         (thunderx2t99_asimd_load1_2_mult): Delete.
10337         (thunderx2t99_asimd_load1_ldp): New.
10338         (thunderx2t99_asimd_load1): New.
10339         (thunderx2t99_asimd_load2): Add missing *load2* types.
10340         (thunderx2t99_asimd_load3): New.
10341         (thunderx2t99_asimd_load4): New.
10342         (thunderx2t99_asimd_store1_1_mult): Delete.
10343         (thunderx2t99_asimd_store1_2_mult): Delete.
10344         (thunderx2t99_asimd_store2_mult): Delete.
10345         (thunderx2t99_asimd_store2_onelane): Delete.
10346         (thunderx2t99_asimd_store_stp): New.
10347         (thunderx2t99_asimd_store1): New.
10348         (thunderx2t99_asimd_store2): New.
10349         (thunderx2t99_asimd_store3): New.
10350         (thunderx2t99_asimd_store4): New.
10352 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10354         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10355         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10357 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10358             Segher Boessenkool  <segher@kernel.crashing.org>
10360         PR target/85698
10361         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10362         operand.
10364 2018-05-17  Richard Biener  <rguenther@suse.de>
10366         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10367         for pruning loop and prune defs feeding only already visited PHIs.
10369 2018-05-17  Richard Biener  <rguenther@suse.de>
10371         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10373 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10374             Richard Biener  <rguenther@suse.de>
10376         PR tree-optimization/85793
10377         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10378         for VMAT_ELEMENTWISE.
10380 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10382         * internal-fn.h (lookup_internal_fn): Declare
10383         * internal-fn.c (lookup_internal_fn): New function.
10384         * gimple.c (gimple_build_call_from_tree): Handle calls to
10385         internal functions.
10386         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10387         internal function names.
10388         * tree-pretty-print.c (dump_generic_node): Likewise.
10389         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10391 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10393         * gimple-fold.h (gimple_build): Make the function forms take
10394         combined_fn rather than built_in_function.
10395         (gimple_simplify): Likewise.
10396         * gimple-match-head.c (gimple_simplify): Likewise.
10397         * gimple-fold.c (gimple_build): Likewise.
10398         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10399         rather than gimple_build_call_internal.
10400         (get_initial_defs_for_reduction): Likewise.
10401         (vect_create_epilog_for_reduction): Likewise.
10402         (vectorizable_live_operation): Likewise.
10404 2018-05-17  Martin Liska  <mliska@suse.cz>
10406         * gimple-ssa-sprintf.c (format_directive): Do not use
10407         space in between 'G_' and '('.
10409 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10411         PR target/85323
10412         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10413         even if the mask is not all ones.
10415         PR target/85323
10416         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10417         vector.
10418         (ix86_gimple_fold_builtin): Likewise.
10420         PR target/85323
10421         * config/i386/i386.c: Include tree-vector-builder.h.
10422         (ix86_vector_shift_count): New function.
10423         (ix86_fold_builtin): Fold shift builtins by scalar count.
10424         (ix86_gimple_fold_builtin): Likewise.
10426         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10427         _mm512_setzero): New intrinsics.
10429 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10430             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10432         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10433         code generation for cases where splatting a value is not useful.
10434         * simplify-rtx.c (simplify_ternary_operation): Simplify
10435         vec_merge across a vec_duplicate and a paradoxical subreg forming
10436         a vector mode to a vec_concat.
10438 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10440         * config.gcc: Support "goldmont-plus".
10441         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10442         "goldmont-plus".
10443         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10444         PROCESSOR_GOLDMONT_PLUS.
10445         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10446         (processor_target_table): Add "goldmont-plus".
10447         (PTA_GOLDMONT_PLUS): Define.
10448         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10449         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10450         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10451         (fold_builtin_cpu): Add "goldmont-plus".
10452         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10453         (ix86_option_override_internal): Add "goldmont-plus".
10454         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10455         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10456         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10457         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10459 2018-05-17  Richard Biener  <rguenther@suse.de>
10461         PR tree-optimization/85757
10462         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10463         remove defs that only feed that PHI from further processing.
10465 2018-05-16  Jim Wilson  <jimw@sifive.com>
10467         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10468         asterisk to name.
10469         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10471 2018-05-16  Mark Wielaard  <mark@klomp.org>
10473         * dwarf2out.c (count_index_strings): New function.
10474         (output_indirect_strings): Call count_index_strings and generate
10475         header for dwarf_version >= 5.
10477 2018-05-16  Mark Wielaard  <mark@klomp.org>
10479         * dwarf2out.c (dwarf_FORM): New function.
10480         (set_indirect_string): Use dwarf_FORM.
10481         (reset_indirect_string): Likewise.
10482         (size_of_die): Likewise.
10483         (value_format): Likewise.
10484         (output_die): Likewise.
10485         (add_skeleton_AT_string): Likewise.
10486         (output_macinfo_op): Likewise.
10487         (index_string): Likewise.
10488         (output_index_string_offset): Likewise.
10489         (output_index_string): Likewise.
10490         (count_index_strings): Likewise.
10492 2018-05-16  Carl Love  <cel@us.ibm.com>
10494         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10495         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10497 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10499         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10500         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10502 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10504         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10505         (fnma<mode>4): Likewise.
10506         (fms<mode>4): Likewise.
10507         (fnms<mode>4): Likewise.
10508         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10509         (aarch64_fnma<mode>4): Likewise.
10510         (aarch64_fms<mode>4): Likewise.
10511         (aarch64_fnms<mode>4): Likewise.
10512         (aarch64_fnmadd<mode>4): Likewise.
10514 2018-05-16  Jason Merrill  <jason@redhat.com>
10516         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10518 2018-05-16  Richard Biener  <rguenther@suse.de>
10520         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10521         (dump_stmt_cost): Declare.
10522         (add_stmt_cost): Dump cost we add.
10523         (add_stmt_costs): New function.
10524         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10525         No longer exported.
10526         (vect_analyze_stmt): Adjust prototype.
10527         (vectorizable_condition): Likewise.
10528         (vectorizable_live_operation): Likewise.
10529         (vectorizable_reduction): Likewise.
10530         (vectorizable_induction): Likewise.
10531         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10532         cost vector to pass to vectorizable_ and record afterwards.
10533         (vect_model_reduction_cost): Take cost vector argument and adjust.
10534         (vect_model_induction_cost): Likewise.
10535         (vectorizable_reduction): Likewise.
10536         (vectorizable_induction): Likewise.
10537         (vectorizable_live_operation): Likewise.
10538         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10539         SLP_TREE_NUMBER_OF_VEC_STMTS.
10540         (vect_analyze_slp_cost_1): Remove.
10541         (vect_analyze_slp_cost): Likewise.
10542         (vect_slp_analyze_node_operations): Take visited args and
10543         a target cost vector.  Avoid processing already visited stmt sets.
10544         (vect_slp_analyze_operations): Use a local cost vector to gather
10545         costs and register those of non-discarded instances.
10546         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10547         (vect_schedule_slp_instance): Remove copying of
10548         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10549         zero.
10550         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10551         adding cost.  Record cost entry location.
10552         (vect_prologue_cost_for_slp_op): Function to compute cost of
10553         a constant or invariant generated for SLP vect in the prologue,
10554         split out from vect_analyze_slp_cost_1.
10555         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10556         (vect_model_promotion_demotion_cost): Likewise.
10557         (vect_model_store_cost): Likewise, make static.
10558         (vect_model_load_cost): Likewise.
10559         (vectorizable_bswap): Add cost vector arg and adjust.
10560         (vectorizable_call): Likewise.
10561         (vectorizable_simd_clone_call): Likewise.
10562         (vectorizable_conversion): Likewise.
10563         (vectorizable_assignment): Likewise.
10564         (vectorizable_shift): Likewise.
10565         (vectorizable_operation): Likewise.
10566         (vectorizable_store): Likewise.
10567         (vectorizable_load): Likewise.
10568         (vectorizable_condition): Likewise.
10569         (vectorizable_comparison): Likewise.
10570         (can_vectorize_live_stmts): Likewise.
10571         (vect_analyze_stmt): Likewise.
10572         (vect_transform_stmt): Adjust calls to vectorizable_*.
10573         * tree-vectorizer.c: Include gimple-pretty-print.h.
10574         (dump_stmt_cost): New function.
10576 2018-05-16  Richard Biener  <rguenther@suse.de>
10578         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10579         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10580         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10581         (check_name): New callback.
10582         (dse_classify_store): Track cycles via a visited bitmap of PHI
10583         defs and simplify handling of in-loop and across loop dead stores
10584         and properly fail for loop-variant refs.  Handle byte-tracking with
10585         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10586         limiting the walk.
10588 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10590         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10591         (vect_get_mask_type_for_stmt): Likewise.
10592         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10593         split out from...
10594         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10595         to determine the statement's vector type and the vector type that
10596         should be used for calculating nunits.  Deal with cases in which
10597         the type has to be deferred.
10598         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10599         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10600         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10601         (vect_determine_vf_for_stmt): New functions, split out from...
10602         (vect_determine_vectorization_factor): ...here.
10603         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10604         (vect_get_mask_type_for_stmt): New functions, split out from
10605         vect_determine_vectorization_factor.
10607 2018-05-16  Richard Biener  <rguenther@suse.de>
10609         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10610         verify the [VEC_]COND_EXPR embedded comparison.
10612 2018-05-15  Martin Sebor  <msebor@redhat.com>
10614         PR tree-optimization/85753
10615         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10616         RECORD_TYPE in addition to ARRAY_TYPE.
10618 2018-05-15  Martin Sebor  <msebor@redhat.com>
10620         PR middle-end/85643
10621         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10623 2018-05-15  Richard Biener  <rguenther@suse.de>
10625         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10626         add by_clobber_p one.  Change algorithm to collect all defs
10627         representing uses we need to walk and try reducing them to
10628         a single one before failing.
10629         (dse_dom_walker::dse_optimize_stmt): Adjust.
10631 2018-05-13  Mark Wielaard  <mark@klomp.org>
10633         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10634         (size_of_loc_descr): Likewise.
10635         (output_loc_operands): Likewise.
10636         (output_loc_operands_raw): Likewise.
10637         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10638         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10639         (hash_loc_operands): Likewise.
10640         (compare_loc_operands): Likewise.
10642 2018-05-14  Mark Wielaard  <mark@klomp.org>
10644         * dwarf2out.c (count_index_addrs): New function.
10645         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10647 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10649         PR tree-optimization/83648
10650         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10651         return value as malloc candidate.
10653 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10655         PR ipa/85734
10656         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10657         param as true in call to suggest_attribute.
10659 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10661         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10662         -mreadonly-in-sdata.
10664 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10666         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10667         New pattern.
10668         (aarch64_crypto_aesd_fused): Likewise.
10670 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10672         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10673         (movsi_aarch64): Likewise.
10674         (load_pairsi): Likewise.
10675         (load_pairdi): Likewise.
10676         (store_pairsi): Likewise.
10677         (store_pairdi): Likewise.
10678         (load_pairsf): Likewise.
10679         (load_pairdf): Likewise.
10680         (store_pairsf): Likewise.
10681         (store_pairdf): Likewise.
10682         (zero_extend): Likewise.
10683         (trunc): Swap alternatives.
10684         (fcvt_target): Add '?' to prefer w over r.
10686 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10688         PR target/85756
10689         * config/i386/i386.md: Disallow non-commutative arithmetics in
10690         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10691         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10692         in the peephole2 before it.
10694 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10696         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10697         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10698         (ix86_handle_option): Handle -mcldemote.
10699         * config.gcc: New header.
10700         * config/i386/cldemoteintrin.h: New file.
10701         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10702         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10703         -mcldemote.
10704         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10705         OPTION_MASK_ISA_CLDEMOTE.
10706         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10707         (ix86_valid_target_attribute_inner_p): Ditto.
10708         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10709         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10710         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10711         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10712         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10713         (cldemote): New.
10714         * config/i386/i386.opt: Add -mcldemote.
10715         * config/i386/x86intrin.h: New header.
10716         * doc/invoke.texi: Add -mcldemote.
10718 2018-05-14  Richard Biener  <rguenther@suse.de>
10720         * doc/match-and-simplify.texi: Adjust :s documentation.
10722 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10724         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10725         intended memcpy size.
10726         (REORDER_45): Likewise.
10728 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10730         * sort.cc: New file.
10731         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10732         * vec.c (qsort_chk): Use gcc_qsort.
10733         * Makefile.in (OBJS-libcommon): Add sort.o.
10734         (build/sort.o): New target.  Use it...
10735         (BUILD_RTL): ... here, and...
10736         (build/gencfn-macros): ... here, and...
10737         (build/genmatch): ... here.
10739 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10740             Chung-Ju Wu  <jasonwucj@gmail.com>
10742         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10743         * config/nds32/nds32-graywolf.md: New file.
10744         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10745         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10746         pipeline.
10747         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10748         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10749         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10750         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10751         * config/nds32/pipelines.md: Include n15 settings.
10753 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10754             Chung-Ju Wu  <jasonwucj@gmail.com>
10756         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10757         * config/nds32/nds32-n13.md: New file.
10758         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10759         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10760         pipeline.
10761         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10762         * config/nds32/nds32.md (pipeline_model): Add n13.
10763         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10764         * config/nds32/pipelines.md: Include n13 settings.
10766 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10767             Chung-Ju Wu  <jasonwucj@gmail.com>
10769         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10770         * config/nds32/nds32-n10.md: New file.
10771         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10772         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10773         pipeline.
10774         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10775         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10776         * config/nds32/nds32.md (pipeline_model): Add n10.
10777         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10778         * config/nds32/pipelines.md: Include n10 settings.
10780 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10781             Kito Cheng  <kito.cheng@gmail.com>
10782             Chung-Ju Wu  <jasonwucj@gmail.com>
10784         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10785         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10786         Add enum values for DSP extension instructions.
10787         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10788         New constraints.
10789         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10790         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10791         New code iterators.
10792         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10793         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10794         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10795         * config/nds32/nds32-intrinsic.md: Likewise.
10796         * config/nds32/nds32_intrinsic.h: Likewise.
10797         * config/nds32/nds32-md-auxiliary.c: Likewise.
10798         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10799         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10800         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10801         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10802         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10803         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10804         TYPE_DMAC in switch statement.
10805         * config/nds32/nds32.c: New checking and implementation for DSP
10806         extension instructions.
10807         * config/nds32/nds32.h: Likewise.
10808         * config/nds32/nds32.md: Likewise.
10809         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10810         * config/nds32/predicates.md: Implement new predicates for DSP
10811         extension.
10813 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10815         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10816         Reformat alternatives and attributes so it is easier to identify
10817         which constraints/attributes go with which instruction.
10818         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10819         (mov<mode>_softfloat32, FMOVE64): Likewise.
10820         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10821         (mov<mode>_softfloat64, FMOVE64): Likewise.
10823 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10825         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10826         subsection.
10827         (Basic PowerPC Built-in Functions): The new name of the
10828         subsection previously known as "PowerPC Built-in Functions".
10829         (Basic PowerPC Built-in Functions Available on all Configurations):
10830         New subsubsection.
10831         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10832         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10833         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10834         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10836 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10838         PR ipa/85655
10839         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10840         single const.
10842 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10844         PR target/85733
10845         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10847 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10849         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10850         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10851         (ix86_handle_option): Handle -mwaitpkg.
10852         * config.gcc: New header.
10853         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10854         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10855         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10856         function type.
10857         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10858         OPTION_MASK_ISA_WAITPKG.
10859         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10860         (ix86_option_override_internal): Add PTA_WAITPKG.
10861         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10862         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10863         IX86_BUILTIN_TPAUSE.
10864         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10865         __builtin_ia32_umwait and __builtin_ia32_tpause.
10866         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10867         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10868         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10869         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10870         UNSPECV_TPAUSE): New.
10871         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10872         * config/i386/i386.opt: Add -mwaitpkg.
10873         * config/i386/waitpkgintrin.h: New file.
10874         * config/i386/x86intrin.h: New header.
10875         * doc/invoke.texi: Add -mwaitpkg.
10877 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10879         PR target/85606
10880         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10881         equivalent.
10882         (cortex-m0): Use armv6s-m isa.
10883         (cortex-m0plus): Likewise.
10884         (cortex-m1): Likewise.
10885         (cortex-m0.small-multiply): Likewise.
10886         (cortex-m0plus.small-multiply): Likewise.
10887         (cortex-m1.small-multiply): Likewise.
10889 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10890             Jakub Jelinek  <jakub@redhat.com>
10892         PR tree-optimization/85692
10893         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10894         source permute as well.
10896 2018-05-11  Martin Liska  <mliska@suse.cz>
10898         PR sanitizer/85556
10899         * doc/extend.texi: Document LLVM style format for no_sanitize
10900         attribute.
10902 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10904         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10905         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10906         (mode_supports_vsx_dform_quad): Likewise.
10907         (mode_supports_vmx_dform): Move these functions to be next to the
10908         other mode_supports functions.
10909         (mode_supports_dq_form): Likewise.
10910         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10911         mode_supports_dq_form.
10912         (reg_offset_addressing_ok_p): Likewise.
10913         (offsettable_ok_by_alignment): Likewise.
10914         (rs6000_legitimate_offset_address_p): Likewise.
10915         (legitimate_lo_sum_address_p): Likewise.
10916         (rs6000_legitimize_address): Likewise.
10917         (rs6000_legitimize_reload_address): Likewise.
10918         (rs6000_secondary_reload_inner): Likewise.
10919         (rs6000_preferred_reload_class): Likewise.
10920         (rs6000_output_move_128bit): Likewise.
10922 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10924         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10925         Generate SImode target register for null target.
10926         <case IX86_BUILTIN_XGETBV>: Ditto.
10927         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10928         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10930 2018-05-10  Carl Love  <cel@us.ibm.com>
10932         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10933         dcbtt and dcbtstt if operands[2] is 0.
10935 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10937         PR target/85693
10938         * config/i386/sse.md (usadv64qi): New expander.
10940 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10942         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10943         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10944         -maltivec=be support.
10945         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10946         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10947         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10948         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10949         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10950         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10951         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10952         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10953         altivec_vsumsws): Adjust.
10954         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10955         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10956         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10957         support.
10958         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10959         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10960         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10961         (altivec_lve<VI_char>x): Delete expand.
10962         (*altivec_lve<VI_char>x_internal): Rename to...
10963         (altivec_lve<VI_char>x): ... this.
10964         (altivec_lvxl_<mode>): Delete expand.
10965         (*altivec_lvxl_<mode>_internal): Rename to ...
10966         (altivec_lvxl_<mode>): ... this.
10967         (altivec_stvxl_<mode>): Delete expand.
10968         (*altivec_stvxl_<mode>_internal): Rename to ...
10969         (altivec_stvxl_<mode>): ... this.
10970         (altivec_stve<VI_char>x): Delete expand.
10971         (*altivec_stve<VI_char>x_internal): Rename to ...
10972         (altivec_stve<VI_char>x): ... this.
10973         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10974         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10975         reduc_plus_scal_<mode>): Adjust.
10976         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10977         comment.
10978         (rs6000_cpu_cpp_builtins): Adjust.
10979         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10980         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10981         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10982         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10983         -maltivec=be support.
10984         (rs6000_split_vec_extract_var): Adjust.
10985         (rs6000_split_v4si_init): Adjust.
10986         (swap_selector_for_mode): Delete.
10987         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10988         altivec_expand_stvex_be): Delete.
10989         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10990         -maltivec=be support.
10991         (rs6000_gimple_fold_builtin): Ditto.
10992         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10993         Adjust.
10994         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10995         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10996         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10997         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10998         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10999         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
11000         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
11001         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
11002         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
11003         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
11004         anonymous split): Adjust.
11005         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
11006         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
11008 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
11010         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
11011         when --with-gxx-include-dir is also specified.
11012         * configure: Regenerate.
11014 2018-05-09  Jim Wilson  <jimw@sifive.com>
11016         PR target/84797
11017         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11018         * config/riscv/t-withmultilib: New.
11019         * config/riscv/withmultilib.h: New.
11020         * doc/install.texi: Document RISC-V --with-multilib-list support.
11022 2018-05-09  Richard Biener  <rguenther@suse.de>
11024         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
11025         vector.
11026         (vect_bb_vectorization_profitable_p): Adjust.  Compute
11027         actual scalar cost using the cost vector and the add_stmt_cost
11028         machinery.
11030 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11032         PR rtl-optimization/85645
11033         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
11034         in the REG_CFA_REGISTER note for LR, don't leave it empty.
11036 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11038         PR rtl-optimization/85645
11039         * shrink-wrap.c (spread_components): Return a boolean saying if
11040         anything was changed.
11041         (try_shrink_wrapping_separate): Iterate spread_components until
11042         nothing changes anymore.
11044 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11046         PR rtl-optimization/85645
11047         * regrename.c (build_def_use): Also kill the chains that include the
11048         destination of a REG_CFA_REGISTER note.
11050 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
11052         PR rtl-optimization/85645
11053         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
11054         insn that has a REG_CFA_REGISTER note.
11056 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
11058         * cfgexpand.c (expand_clobber): New function.
11059         (expand_gimple_stmt_1): Use it.
11060         * tree-vect-stmts.c (vect_clobber_variable): New function,
11061         split out from...
11062         (vectorizable_simd_clone_call): ...here.
11063         (vectorizable_store): Emit a clobber either side of an
11064         IFN_STORE_LANES sequence.
11065         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
11067 2018-05-09  Tom de Vries  <tom@codesourcery.com>
11069         PR target/85626
11070         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
11071         (define_insn "trap_if_false"): Add exit after trap.
11073 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
11075         PR rtl-optimization/85638
11076         * bb-reorder.c: Include common/common-target.h.
11077         (create_forwarder_block): New function extracted from...
11078         (fix_up_crossing_landing_pad): ...here.  Rename into...
11079         (dw2_fix_up_crossing_landing_pad): ...this.
11080         (sjlj_fix_up_crossing_landing_pad): New function.
11081         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
11082         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
11083         from both partitions and exit the loop after one iteration.
11085 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11087         Revert:
11088         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11089         subsection.
11090         (Basic PowerPC Built-in Functions): The new name of the
11091         subsection previously known as "PowerPC Built-in Functions".
11092         (Basic PowerPC Built-in Functions Available on all Configurations):
11093         New subsubsection.
11094         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11095         subsubsection.
11096         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11097         subsubsection.
11098         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11099         subsubsection.
11100         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11101         subsubsection.
11103 2018-05-08  Jim Wilson  <jimw@sifive.com>
11105         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
11106         (LD_EMUL_SUFFIX): New.
11107         (LINK_SPEC): Use it.
11109 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11111         * doc/extend.texi (PowerPC Built-in Functions): Rename this
11112         subsection.
11113         (Basic PowerPC Built-in Functions): The new name of the
11114         subsection previously known as "PowerPC Built-in Functions".
11115         (Basic PowerPC Built-in Functions Available on all Configurations):
11116         New subsubsection.
11117         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11118         subsubsection.
11119         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11120         subsubsection.
11121         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11122         subsubsection.
11123         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11124         subsubsection.
11126 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11128         PR target/85683
11129         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11130         after cmpelim optimization.
11132 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11134         * config.gcc: Support "goldmont".
11135         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11136         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11137         PROCESSOR_GOLDMONT.
11138         * config/i386/i386.c (m_GOLDMONT): Define.
11139         (processor_target_table): Add "goldmont".
11140         (PTA_GOLDMONT): Define.
11141         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11142         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11143         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11144         (fold_builtin_cpu): Add "goldmont".
11145         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11146         (ix86_option_override_internal): Add "goldmont".
11147         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11148         (processor_type): Add PROCESSOR_GOLDMONT.
11149         * config/i386/i386.md: Add CPU "glm".
11150         * config/i386/glm.md: New file.
11151         * config/i386/x86-tune.def: Add m_GOLDMONT.
11152         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11154 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11156         PR target/85572
11157         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11158         E_V4DImode.
11159         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11160         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11161         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11163         PR target/85317
11164         * config/i386/i386.c (ix86_fold_builtin): Handle
11165         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11167         PR target/85480
11168         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11169         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11171 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11173         PR target/85658
11174         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11175         (check_arch): Likewise.
11176         (check_fpu): Return the result rather than printing it.
11177         (end arch): Fix operator precedence.
11178         (end cpu): Likewise.
11179         (END): Print the result from check_fpu.
11181 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11182             Alan Hayward  <alan.hayward@arm.com>
11183             David Sherwood  <david.sherwood@arm.com>
11185         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11186         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11187         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11188         (*fcmuo<mode>_and): New patterns.
11190 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11192         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11193         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11194         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11195         (cmp_op, sve_imm_con): New code attributes.
11196         (SVE_COND_INT_CMP, imm_con): Delete.
11197         (cmp_op): Remove above unspecs from int attribute.
11198         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11199         to...
11200         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11201         comparison-specific unspecs.
11202         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11203         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11204         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11205         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11206         (*vec_fcm<cmp_op><mode>): Rename to...
11207         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11208         (*vec_fcmuo<mode>): Rename to...
11209         (*fcmuo<mode>): ...this and adjust likewise.
11210         (*pred_fcm<cmp_op><mode>): New pattern.
11211         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11212         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11213         functions.
11214         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11215         and UNORDERED.
11216         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11217         (aarch64_emit_sve_predicated_cond): New function.
11218         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11219         (aarch64_emit_unspec_cond_or): Replace with...
11220         (aarch64_emit_sve_or_conds): ...this new function.  Use
11221         aarch64_emit_sve_ptrue_op for the individual comparisons and
11222         aarch64_emit_binop to OR them together.
11223         (aarch64_emit_inverted_unspec_cond): Replace with...
11224         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11225         aarch64_emit_sve_ptrue_op for the comparison and
11226         aarch64_emit_unop to invert the result.
11227         (aarch64_expand_sve_vec_cmp_float): Update after the above
11228         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11230 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11232         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11233         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11234         (Backwards Compatibility): Likewise.
11236 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11238         PR bootstrap/85681
11239         Revert:
11240         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11242         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11243         <prefetch_dynamic_strides>: New const bool field.
11244         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11245         prefetch_dynamic_strides.
11246         (exynosm1_prefetch_tune): Likewise.
11247         (thunderxt88_prefetch_tune): Likewise.
11248         (thunderx_prefetch_tune): Likewise.
11249         (thunderx2t99_prefetch_tune): Likewise.
11250         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11251         to false.
11252         (aarch64_override_options_internal): Update to set
11253         PARAM_PREFETCH_DYNAMIC_STRIDES.
11254         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11255         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11256         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11257         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11258         prefetch-dynamic-strides setting.
11260         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11262         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11263         <minimum_stride>: New const int field.
11264         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11265         minimum_stride field.
11266         (exynosm1_prefetch_tune): Likewise.
11267         (thunderxt88_prefetch_tune): Likewise.
11268         (thunderx_prefetch_tune): Likewise.
11269         (thunderx2t99_prefetch_tune): Likewise.
11270         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11271         (aarch64_override_options_internal): Update to set
11272         PARAM_PREFETCH_MINIMUM_STRIDE.
11273         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11274         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11275         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11276         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11277         stride is constant and is below the minimum stride threshold.
11279 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11281         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11282         to 512.
11284 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11286         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11287         <prefetch_dynamic_strides>: New const bool field.
11288         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11289         prefetch_dynamic_strides.
11290         (exynosm1_prefetch_tune): Likewise.
11291         (thunderxt88_prefetch_tune): Likewise.
11292         (thunderx_prefetch_tune): Likewise.
11293         (thunderx2t99_prefetch_tune): Likewise.
11294         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11295         to false.
11296         (aarch64_override_options_internal): Update to set
11297         PARAM_PREFETCH_DYNAMIC_STRIDES.
11298         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11299         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11300         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11301         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11302         prefetch-dynamic-strides setting.
11304 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11306         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11307         <minimum_stride>: New const int field.
11308         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11309         minimum_stride field.
11310         (exynosm1_prefetch_tune): Likewise.
11311         (thunderxt88_prefetch_tune): Likewise.
11312         (thunderx_prefetch_tune): Likewise.
11313         (thunderx2t99_prefetch_tune): Likewise.
11314         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11315         (aarch64_override_options_internal): Update to set
11316         PARAM_PREFETCH_MINIMUM_STRIDE.
11317         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11318         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11319         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11320         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11321         stride is constant and is below the minimum stride threshold.
11323 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11325         PR c++/85659
11326         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11327         the type is addressable.  Don't force op into register if it has
11328         BLKmode.
11330 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11332         PR other/77609
11333         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11334         any section for which we don't know a specific type it should have,
11335         regardless of name.  Previously this was done only for the exact
11336         names ".init_array", ".fini_array", and ".preinit_array".
11337         (default_elf_asm_named_section): Add comment about
11338         relationship with default_section_type_flags and SECTION_NOTYPE.
11339         (get_section): Don't consider it a type conflict if one side has
11340         SECTION_NOTYPE and the other doesn't, as long as neither has the
11341         SECTION_BSS et al used in the default_section_type_flags logic.
11343 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11345         PR target/85653
11346         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11347         (workaround_barsyncs): New function.
11348         (nvptx_reorg): Use workaround_barsyncs.
11349         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11350         (define_expand "nvptx_membar_cta"): New define_expand.
11351         (define_insn "*nvptx_membar_cta"): New insn.
11353 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11355         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11356         To improve optimization opportunities.
11357         * builtin-types.def: The new needed builtin types for the above.
11359 2018-05-04  Richard Biener  <rguenther@suse.de>
11361         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11362         * gimple-ssa-store-merging.c
11363         (imm_store_chain_info::output_merged_store): Remove redundant create,
11364         release split_store vector contents on failure.
11365         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11366         scalar stmt vector on cache hit.
11368 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11370         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11371         Xilinx FP support.
11372         * config.gcc (powerpc-xilinx-eabi*): Remove.
11373         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11374         support.
11375         (fusion_addis_mem_combo_load): Ditto.
11376         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11377         FP support.
11378         (rs6000_cpu_cpp_builtins): Ditto.
11379         * config/rs6000/rs6000-linux.c
11380         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11381         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11382         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11383         support.
11384         (rs6000_setup_reg_addr_masks): Ditto.
11385         (rs6000_init_hard_regno_mode_ok): Ditto.
11386         (rs6000_option_override_internal): Ditto.
11387         (legitimate_lo_sum_address_p): Ditto.
11388         (rs6000_legitimize_address): Ditto.
11389         (rs6000_legitimize_reload_address): Ditto.
11390         (rs6000_legitimate_address_p): Ditto.
11391         (abi_v4_pass_in_fpr): Ditto.
11392         (setup_incoming_varargs): Ditto.
11393         (rs6000_gimplify_va_arg): Ditto.
11394         (rs6000_split_multireg_move): Ditto.
11395         (rs6000_savres_strategy): Ditto.
11396         (rs6000_emit_prologue_components): Ditto.
11397         (rs6000_emit_epilogue_components): Ditto.
11398         (rs6000_emit_prologue): Ditto.
11399         (rs6000_emit_epilogue): Ditto.
11400         (rs6000_elf_file_end): Ditto.
11401         (rs6000_function_value): Ditto.
11402         (rs6000_libcall_value): Ditto.
11403         * config/rs6000/rs6000.h: Ditto.
11404         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11405         (TARGET_MINMAX): ... this.  New.
11406         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11407         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11408         (*movsi_internal1_single): Delete.
11409         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11410         mfpu=, mxilinx-fpu): Delete.
11411         * config/rs6000/singlefp.h: Delete.
11412         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11413         * config/rs6000/t-rs6000: Ditto.
11414         * config/rs6000/t-xilinx: Delete.
11415         * config/rs6000/titan.md: Adjust for fp_type removal.
11416         * config/rs6000/vsx.md: Remove Xilinx FP support.
11417         (VStype_simple): Delete.
11418         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11419         * config/rs6000/xfpu.h: Delete.
11420         * config/rs6000/xfpu.md: Delete.
11421         * config/rs6000/xilinx.h: Delete.
11422         * config/rs6000/xilinx.opt: Delete.
11423         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11424         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11426 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11428         PR libgomp/85639
11429         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11430         if ignore == 0.
11432 2018-05-04  Richard Biener  <rguenther@suse.de>
11434         PR middle-end/85627
11435         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11436         (expand_complex_div_wide): Likewise.
11437         (expand_complex_operations_1): Likewise.
11438         (expand_complex_libcall): Preserve EH info of the original stmt.
11439         (tree_lower_complex): Handle removed blocks.
11440         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11441         on complex multiplication and division libcall builtins.
11443 2018-05-04  Richard Biener  <rguenther@suse.de>
11445         PR middle-end/85574
11446         * fold-const.c (negate_expr_p): Restrict negation of operand
11447         zero of a division to when we know that can happen without
11448         overflow.
11449         (fold_negate_expr_1): Likewise.
11451 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11453         PR libstdc++/85466
11454         * real.h (real_nextafter): Declare.
11455         * real.c (real_nextafter): New function.
11456         * fold-const-call.c (fold_const_nextafter): New function.
11457         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11458         CASE_CFN_NEXTTOWARD.
11459         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11460         even when arg1_mode is different from arg0_mode.
11462 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11464         * doc/extend.texi (Deprecated Features): Remove
11465         -ffriend-injection.
11466         (Backwards Compatibility): Likewise.
11467         * doc/invoke.texi (C++ Language Options): Likewise.
11468         (C++ Dialect Options): Likewise.
11470 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11472         PR target/85530
11473         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11474         _mm512_mask_mullox_epi64): New intrinsics.
11476 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11478         PR testsuite/85106
11479         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11480         dump files): Add offload-tree.
11482 2018-05-03  Richard Biener  <rguenther@suse.de>
11484         PR tree-optimization/85615
11485         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11486         to loops not nested in BBs loop father to avoid creating multi-entry
11487         loops.
11489 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11491         PR tree-optimization/70291
11492         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11493         arguments.  Change return type to tree.  Emit libcall as a new
11494         statement rather than replacing existing one when inplace_p is true.
11495         (expand_complex_multiplication_components): New function.
11496         (expand_complex_multiplication): Expand floating-point complex
11497         multiplication using the above.
11498         (expand_complex_division): Rename inner_type parameter to type.
11499         Update expand_complex_libcall call-site.
11500         (expand_complex_operations_1): Update expand_complex_multiplication
11501         and expand_complex_division call-sites.
11503 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11505         PR target/85582
11506         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11507         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11508         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11509         the highest significant bit of the shift count mask is clear.  In
11510         check whether and[sq]i3 is needed verify that all significant bits
11511         of the shift count other than the highest are set.
11513 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11515         PR libgomp/82428
11516         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11517         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11518         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11519         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11520         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11521         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11522         __builtin_goacc_parlevel_size.
11524 2018-05-02  Richard Biener  <rguenther@suse.de>
11526         PR tree-optimization/85597
11527         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11528         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11529         directly.
11531 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11533         PR testsuite/85106
11534         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11535         dump files): Add ltrans-tree.
11537 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11539         PR testsuite/85106
11540         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11541         dump files): Add wpa-ipa.
11543 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11545         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11546         powerpc*-*-linux*paired* target.
11547         * config/rs6000/750cl.h: Delete.
11548         * config/rs6000/paired.h: Delete.
11549         * config/rs6000/paired.md: Delete.
11550         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11551         float support.
11552         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11553         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11554         comment.  Remove paired float support.
11555         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11556         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11557         VECTOR_PAIRED.
11558         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11559         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11560         declarations.
11561         * config/rs6000/rs6000.c: Remove paired float support.
11562         (paired_expand_vector_init, paired_expand_vector_move,
11563         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11564         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11565         paired_expand_builtin, paired_expand_predicate_builtin,
11566         paired_init_builtins): Delete.
11567         * config/rs6000/rs6000.h: Remove paired float support.
11568         * config/rs6000/rs6000.md: Remove paired float support.
11569         (move_from_CR_ov_bit): Delete.
11570         * config/rs6000/rs6000.opt (mpaired): Delete.
11571         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11572         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11574 2018-05-02  Richard Biener  <rguenther@suse.de>
11576         PR middle-end/85567
11577         * gimplify.c (gimplify_save_expr): When in SSA form allow
11578         SAVE_EXPRs to compute to SSA vars.
11580 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11582         PR target/85582
11583         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11584         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11585         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11586         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11588 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11590         PR tree-optimization/85586
11591         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11592         exit early for statements in the same group if the accesses are
11593         not strided.
11595 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11597         PR lto/85451
11598         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11599         error message.
11601 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11603         PR tree-optimization/85143
11604         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11606 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11608         PR lto/85451
11609         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11610         not found" error message.
11612 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11614         PR other/83786
11615         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11616         * vec.c (test_ordered_remove_if): New function.
11617         (vec_c_tests): Call test_ordered_remove_if.
11618         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11619         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11620         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11621         VEC_ORDERED_REMOVE_IF.
11623 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11625         PR tree-optimization/82665
11626         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11627         pointer subtraction where arguments come from a memchr call.
11629 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11631         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11632         --push-state --as-needed and --pop-state instead of --as-needed and
11633         --no-as-needed if ld supports it.
11634         * configure: Regenerated.
11636         PR web/85578
11637         * doc/install.texi2html: Replace _002d with - and _002a with * in
11638         generated html files using sed.
11640 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11642         PR c++/85523
11643         * gcc-rich-location.c (blank_line_before_p): New function.
11644         (use_new_line): New function.
11645         (gcc_rich_location::add_fixit_insert_formatted): New function.
11646         * gcc-rich-location.h
11647         (gcc_rich_location::add_fixit_insert_formatted): New function.
11649 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11651         * selftest.c (assert_streq): Rename "expected" and "actual" to
11652         "val1" and "val2".  Extend NULL-handling to cover both inputs
11653         symmetrically, while still requiring both to be non-NULL for a pass.
11654         * selftest.h (assert_streq): Rename "expected" and "actual" to
11655         "val1" and "val2".
11656         (ASSERT_EQ): Likewise.
11657         (ASSERT_EQ_AT): Likewise.
11658         (ASSERT_KNOWN_EQ): Likewise.
11659         (ASSERT_KNOWN_EQ_AT): Likewise.
11660         (ASSERT_NE): Likewise.
11661         (ASSERT_MAYBE_NE): Likewise.
11662         (ASSERT_MAYBE_NE_AT): Likewise.
11663         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11664         the assertion to pass.
11665         (ASSERT_STREQ_AT): Likewise.
11667 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11669         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11670         interaction with -pie.
11672 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11674         * selftest.h: Fix alphabetization of per-source-file selftest
11675         declarations.
11677 2018-04-30  Jason Merrill  <jason@redhat.com>
11679         PR c++/61982 - dead stores to destroyed objects.
11680         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11681         of clobber.
11683 2018-04-30  Jason Merrill  <jason@redhat.com>
11685         * tree.c (build_clobber): New.
11686         * tree.h: Declare it.
11687         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11689 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11691         * diagnostic-show-locus.c (layout::layout): Update for
11692         location_get_source_line returning a char_span.
11693         (struct char_span): Move to input.h.
11694         (struct correction): Update for fields in char_span becoming
11695         private.
11696         (struct source_line): Update for location_get_source_line
11697         returning a char_span.
11698         (layout::print_line): Likewise.
11699         * edit-context.c (edited_file::print_content): Likewise.
11700         (edited_file::print_diff_hunk): Likewise.
11701         (edited_file::print_run_of_changed_lines): Likewise.
11702         (edited_file::get_num_lines): Likewise.
11703         (edited_line::edited_line): Likewise.
11704         * final.c (asm_show_source): Likewise.
11705         * input.c (location_get_source_line): Convert return type
11706         from const char * to char_span, losing the final "line_len"
11707         param.
11708         (dump_location_info): Update for the above.
11709         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11710         when handling the literal within the line.
11711         (test_reading_source_line): Update for location_get_source_line
11712         returning a char_span.
11713         * input.h (class char_span): Move here from
11714         diagnostic-show-locus.c, converting from a struct to a class.
11715         Make data members private.
11716         (char_span::operator bool): New.
11717         (char_span::length): New.
11718         (char_span::get_buffer): New.
11719         (char_span::operator[]): New.
11720         (char_span::subspan): Make const.
11721         (char_span::xstrdup): New.
11722         (location_get_source_line): Convert return type from const char *
11723         to char_span, losing the final "line_size" param.
11725 2018-04-30  Jan Hubicka  <jh@suse.cz>
11727         * lto-wrapper.c (ltrans_priorities): New static var.
11728         (cmp_priority): New.
11729         (run_gcc): Read priorities and if doing parallel build order
11730         the Makefile by them.
11732 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11734         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11736 2018-04-30  Richard Biener  <rguenther@suse.de>
11738         * tree-cfg.c (verify_address): Remove base argument, add
11739         flag whether to check TREE_ADDRESSABLE and do that.
11740         (verify_expr): Remove.
11741         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11742         (verify_gimple_assign_single): Likewise.
11743         (verify_gimple_switch): Likewise.
11744         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11745         piece from verify_expr.
11746         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11748 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11750         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11752 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11754         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11755         (small_data_pattern): Likewise.
11756         (arc_rewrite_small_data): Likewise.
11757         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11758         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11759         (get_symbol_alignment): New function.
11760         (legitimate_small_data_address_p): Likewise.
11761         (legitimate_scaled_address): Update, call
11762         legitimate_small_data_address_p.
11763         (output_sdata): New static variable.
11764         (arc_print_operand): Update how we handle small data operands.
11765         (arc_print_operand_address): Likewise.
11766         (arc_legitimate_address_p): Update, use
11767         legitimate_small_data_address_p.
11768         (arc_rewrite_small_data_p): Remove.
11769         (arc_rewrite_small_data_1): Likewise.
11770         (arc_rewrite_small_data): Likewise.
11771         (small_data_pattern): Likewise.
11772         (compact_sda_memory_operand): Update to use
11773         legitimate_small_data_address_p and get_symbol_alignment.
11774         (prepare_move_operands): Don't rewite sdata pattern.
11775         (prepare_extend_operands): Remove.
11776         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11777         pattern.
11778         (zero_extendqisi2): Likewise.
11779         (zero_extendhisi2): Likewise.
11780         (extendqihi2): Likewise.
11781         (extendqisi2): Likewise.
11782         (extendhisi2): Likewise.
11783         (addsi3): Likewise.
11784         (subsi3): Likewise.
11785         (andsi3): Likewise.
11786         * config/arc/constraints.md (Usd): Change it to memory constraint.
11788 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11790         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11791         as source of std instructions.
11792         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11793         allow 6-bit constants as source for store instructions.
11794         (movdi_insn): Update instruction pattern to allow 6-bit constants
11795         as source for store instructions.
11797 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11799         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11801 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11802             Sandra Loosemore <sandra@codesourcery.com>
11804         * dumpfile.c (dump_open): Allow '-' for stdout.
11805         * doc/invoke.texi (Developer Options): Document dump filename
11806         determination early.  Document stdin/stdout selection.
11808 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11810         Microblaze Target: PIC data text relative
11812         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11813         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11814         Add declaration.
11815         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11816         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11817         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11818         New addressing mode for data-text relative position indepenedent code.
11819         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11820         'ADDRESS_SYMBOLIC_TXT_REL'.
11821         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11822         (microblaze_legitimate_pic_operand): Exclude function calls from
11823         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11824         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11825         addresses cases.
11826         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11827         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11828         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11829         for 'address + offset'.
11830         (microblaze_expand_prologue): Add new function prologue call for
11831         'r20' assignation.
11832         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11833         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11834         table in case of TARGET_PIC_DATA_TEXT_REL.
11835         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11836         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11837         Add new macros 'UNSPEC_TEXT',
11838         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11839         + exclude function calls from 'UNSPEC_PLT' in case of data text
11840         relative mode.
11841         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11842         new target hook for generating address diff vector tables in case of
11843         flag_pic.
11844         * doc/tm.texi : Regenerate.
11845         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11846         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11847         of addr diff vector generation.
11848         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11849         target hook definition.
11850         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11851         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11852         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11853         option for data text relative.
11855 2018-04-30  Richard Biener  <rguenther@suse.de>
11857         * tree-chrec.h (evolution_function_is_constant_p): Remove
11858         redundant check.
11859         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11861 2018-04-30  Richard Biener  <rguenther@suse.de>
11863         PR bootstrap/85571
11864         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11866 2018-04-30  Richard Biener  <rguenther@suse.de>
11868         PR tree-optimization/28364
11869         PR tree-optimization/85275
11870         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11871         copying first exit test.
11873 2018-04-28  Mark Wielaard  <mark@klomp.org>
11875         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11876         dwarf_version >= 5.
11877         (dwarf_AT): Handle DW_AT_addr_base.
11878         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11880 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11882         PR target/84431
11883         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11884         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11885         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11886         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11888 2018-04-28  Richard Biener  <rguenther@suse.de>
11890         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11891         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11892         to reflect use.  Only add interesting stmts.
11894 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11896         PR ipa/85549
11897         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11898         the jump function allows for passing through aggregate values.
11900 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11902         * input.h (in_system_header_at): Convert from macro to inline
11903         function.
11904         (from_macro_expansion_at): Likewise.
11905         (from_macro_definition_at): Likewise.
11907 2018-04-27  Jeff Law  <law@redhat.com>
11909         * config.gcc: Mark tile* targets as deprecated/obsolete.
11911 2018-04-27  Richard Biener  <rguenther@suse.de>
11913         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11914         fix for ILP32.
11916 2018-04-27  Richard Biener  <rguenther@suse.de>
11918         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11920 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11922         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11923         with Yd constraint. Set "preferred_for_speed" attribute from
11924         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11925         with Yd constraint.
11926         (*movdi_internal): Ditto.
11927         (movti_interunit splitters): Remove
11928         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11929         (movdi_interunit splitters): Ditto.
11930         * config/i386/constraints.md (Ye): Remove.
11931         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11933 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11935         PR target/85512
11936         * config/aarch64/constraints.md (Usg): Limit to 31.
11937         (Usj): Limit to 63.
11939 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11941         PR tree-optimization/85529
11942         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11943         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11944         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11945         zero extension or masking of the MSB bit.
11946         (optimize_range_tests): Add FIRST_BB argument, pass it through
11947         to optimize_range_tests_var_bound.
11948         (maybe_optimize_range_tests, reassociate_bb): Adjust
11949         optimize_range_tests callers.
11951 2018-04-26  Richard Biener  <rguenther@suse.de>
11952             Jakub Jelinek  <jakub@redhat.com>
11954         * cgraph.h (symbol_table): Just declare debug method here.
11955         * symtab.c (symbol_table::debug): Define.
11957 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11959         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11961 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11963         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11964         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11965         (*movdi_internal): Substitute Yi and Yj constraint with x
11966         and Ym and Yn constraint with y constraint.  Update "isa"
11967         attribute and set "preferred_for_speed" attribute from
11968         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11969         (*movsi_internal): Ditto.
11970         (*movdf_internal): Ditto.
11971         (*movsf_internal): Ditto.
11972         (*zero_extendsidi2): Ditto.
11973         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11974         (sse2_loadld): Ditto.
11975         (*vec_extract<ssevecmodelower>_0): Ditto.
11976         (*vec_extractv4si_0_zext_sse4): Ditto.
11977         (vec_concatv2di): Ditto.
11978         (*vec_dup<mode>): Ditto.
11979         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11980         * config/i386/constraints.md (Yi): Remove.
11981         (Yj): Remove.
11982         (Ym): Remove.
11983         (Yn): Remove.
11985 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11987         * dumpfile.c (dump_open): New.
11988         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11989         (dump_finish): Detect stdio/stderr by value not name.
11991 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11993         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11995 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11997         PR target/84952
11998         * config/nvptx/nvptx.c (verify_neutering_jumps)
11999         (verify_neutering_labels): New function
12000         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
12002 2018-04-26  Tom de Vries  <tom@codesourcery.com>
12004         PR target/84025
12005         * config/nvptx/nvptx.c (needs_neutering_p): New function.
12006         (nvptx_single): Use needs_neutering_p to skip over insns that do not
12007         need neutering.
12009 2018-04-26  Richard Biener <rguenther@suse.de>
12010             Tom de Vries  <tom@codesourcery.com>
12012         PR lto/85422
12013         * lto-streamer-out.c (output_function): Fixup loops if required to match
12014         discovery done in the reader.
12016 2018-04-26  Richard Biener  <rguenther@suse.de>
12018         PR tree-optimization/85116
12019         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
12020         have a loop exit from the single latch predecessor.  Remove
12021         case of header with just condition.
12022         (ch_base::copy_headers): Exclude infinite loops from any
12023         processing.
12024         (pass_ch::execute): Record exits.
12026 2018-04-26  Richard Biener  <rguenther@suse.de>
12028         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
12029         prologue cost vector and pass it to vect_get_load_cost.
12030         (vect_get_peeling_costs_all_drs): Likewise.
12031         (vect_peeling_hash_get_lowest_cost): Likewise.
12032         (vect_enhance_data_refs_alignment): Likewise.
12034 2018-04-26  Richard Biener  <rguenther@suse.de>
12036         PR middle-end/85450
12037         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
12038         checking of integer<->pointer conversions.
12039         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
12040         sign-/zero-extending pointer types.
12041         (expand_omp_for_static_chunk): Likewise.
12043 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
12044             Jean Lee  <xiaoyur347@gmail.com>
12046         * config/mips/mips.c (mips_asan_shadow_offset): New function.
12047         (TARGET_ASAN_SHADOW_OFFSET): Define.
12048         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
12049         true for -fsanitize=address.
12051 2018-04-25  Mark Wielaard  <mark@klomp.org>
12053         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
12054         shorter ones.
12056 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12058         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
12059         than "alu", remove explicit "memory" and "imm_disp" attributes.
12060         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
12062         PR middle-end/85414
12063         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
12064         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
12065         gen_lowpart_no_emit.
12067 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
12069         PR target/85473
12070         * config/i386/i386.c (ix86_expand_builtin): Change memory
12071         operand to XI, extend p0 to Pmode.
12072         * config/i386/i386.md: Change unspec volatile and operand
12073         1 mode to XI, change operand 0 mode to P.
12075 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12077         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
12078         GET_MODE_MASK before any checking.
12079         (nds32_can_use_bset_p): Likewise.
12080         (nds32_can_use_btgl_p): Likewise.
12082 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12084         * config/nds32/nds32-doubleword.md: New define_split pattern for
12085         illegal register number.
12087 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12089         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
12091 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
12093         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
12095 2018-04-25  Richard Biener  <rguenther@suse.de>
12097         * lto-streamer.h (LTO_major_version): Bump to 8.
12099 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
12101         * BASE-VER: Set to 9.0.0.
12103 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
12105         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
12106         in __abskf2 and __powikf2.
12108 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12110         PR target/85512
12111         * config/aarch64/constraints.md (Usg, Usj): New constraints.
12112         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
12113         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12114         Use the above on operand 2.  Reindent.
12115         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12117 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12119         PR target/85485
12120         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12121         handle OPT_mcet.
12122         * config/i386/i386.opt (mcet): Removed.
12123         * doc/install.texi: Remove -mcet documentation.
12124         * doc/invoke.texi: Likewise.
12126 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12128         PR target/85485
12129         * doc/install.texi: Remove -mcet from bootstrap-cet.
12131 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12133         PR target/85511
12134         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12135         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12136         if TARGET_64BIT.
12138         PR target/85503
12139         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12140         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12141         containing a CONST_VECTOR.
12143 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12145         * doc/install.texi: Update newlib dependency for nvptx.
12147 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12149         PR target/85508
12150         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12151         instead of INTVAL when shifting x left.
12153 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12155         PR tree-optimization/85478
12156         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12157         vect_grouped_store_supported for single element vectors.
12159 2018-04-24  Richard Biener  <rguenther@suse.de>
12161         PR target/85491
12162         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12163         load cost increase to the case of non-constant step.
12165 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12167         PR target/84828
12168         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12169         destination if any_malformed_asm.
12171 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12173         PR middle-end/85496
12174         * expr.c (store_field): In the bitfield case, if the value comes from
12175         a function call and is returned in registers by means of a PARALLEL,
12176         do not change the mode of the temporary unless BLKmode and VOIDmode.
12178 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12180         PR rtl-optimization/85423
12181         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12182         dependencies to debug insns when the previous insn is non-debug.
12184 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12186         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12187         enums into a single definition.
12188         (fls): Fix predicates and printing.
12189         (seti): Likewise.
12191 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12193         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12194         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12195         and short u6 immediate.
12196         (check_if_valid_sleep_operand): Remove.
12197         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12199 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12201         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12202         flag_always_save_lp condition.
12203         * config/nds32/nds32.opt (malways-save-lp): New option.
12205 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12207         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12208         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12209         * config/nds32/nds32.h
12210         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12211         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12213 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12215         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12216         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12218 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12219             Chung-Ju Wu  <jasonwucj@gmail.com>
12221         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12222         Declare.
12223         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12224         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12226 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12228         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12230 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12232         * config/nds32/nds32-protos.h (nds32_data_alignment,
12233         nds32_local_alignment): Declare.
12234         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12235         nds32_local_alignment): New functions.
12236         (TARGET_CONSTANT_ALIGNMENT): Define.
12237         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12239 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12241         * config/nds32/nds32.c
12242         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12243         (TARGET_MODES_TIEABLE_P): Likewise.
12245 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12247         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12248         level Ofast and Og.
12250 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12251             Chung-Ju Wu  <jasonwucj@gmail.com>
12253         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12254         for unaligned access.
12255         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12256         unaligned access.
12257         * config/nds32/nds32-intrinsic.md: Likewise.
12258         * config/nds32/nds32_intrinsic.h: Likewise.
12259         * config/nds32/nds32.h (nds32_builtins): Likewise.
12260         * config/nds32/nds32.opt (munaligned-access): New option.
12261         * config/nds32/nds32.c (nds32_asm_file_start): Display
12262         flag_unaligned_access status.
12264 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12266         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12267         -mno-relax is present.
12268         * config/riscv/linux.h (LINK_SPEC): Ditto.
12270 2018-04-20  Martin Sebor  <msebor@redhat.com>
12272         PR c/85365
12273         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12274         for null pointers.
12275         (gimple_fold_builtin_stxcpy_chk): Same.
12276         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12278 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12280         PR target/85456
12281         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12282         __powikf2 when long double is IEEE 128-bit.
12284 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12286         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12287         step to make sure stack always aligned.
12289 2018-04-20  Carl Love  <cel@us.ibm.com>
12291         PR target/83402
12292         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12293         size check for arg0.
12295 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12296             Tom de Vries  <tom@codesourcery.com>
12298         PR target/85445
12299         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12300         Emit insns for calls too.
12301         (nvptx_find_par): Always look for worker-level predecessor insn.
12302         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12303         calls.
12304         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12305         (nvptx_process_pars): Propagate frames for calls.
12307 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12309         PR target/85469
12310         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12311         Removed.
12312         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12313         (ix86_handle_option): Don't handle OPT_mibt.
12314         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12315         __SHSTK__.
12316         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12317         has_ibt and ibt.
12318         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12319         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12320         (ix86_target_macros): Define __CET__ with flag_cf_protection
12321         for -fcf-protection.
12322         * config/i386/i386.c (isa2_opts): Remove -mibt.
12323         * config/i386/i386.h (TARGET_IBT): Removed.
12324         (TARGET_IBT_P): Likewise.
12325         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12326         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12327         * config/i386/i386.opt (mcet): Update help message.
12328         (mshstk): Likewise.
12329         (mibt): Removed.
12330         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12331         -mcet as an alias for -mshstk.
12333 2018-04-20  Richard Biener <rguenther@suse.de>
12335         PR middle-end/85475
12336         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12337         complexity by forcing a single use of the multiply operand.
12339 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12341         ipa/85449
12342         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12343         recursion dependency to only apply to non-clones.
12345 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12347         ipa/85447
12348         * ipa-cp.c (create_specialized_node): Check that clones of
12349         self-recursive edges exist during IPA-CP.
12351 2018-04-19  Toon Moene  <toon@moene.org>
12353         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12354         by -O3.
12356 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12358         PR tree-optimization/85467
12359         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12360         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12361         VECTOR_CST element to type.
12363 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12365         PR target/85397
12366         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12367         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12368         (builtin_longjmp): Likewise.
12369         (save_stack_nonlocal): New pattern.
12370         (restore_stack_nonlocal): Likewise.
12372 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12374         PR target/85404
12375         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12376         Replace ASM_OUTPUT_LABEL with fprintf.
12378 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12380         PR target/85417
12381         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12382         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12383         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12384         define __IBT__ and __SHSTK__ for -fcf-protection.
12385         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12386         TARGET_IBT.
12387         (ix86_trampoline_init): Likewise.
12388         (x86_output_mi_thunk): Likewise.
12389         (ix86_notrack_prefixed_insn_p): Likewise.
12390         (ix86_option_override_internal): Don't disallow -fcf-protection.
12391         * config/i386/i386.md (rdssp<mode>): Also enable for
12392         -fcf-protection.
12393         (incssp<mode>): Likewise.
12394         (nop_endbr): Likewise.
12395         * config/i386/i386.opt (mcet): Change help message to built-in
12396         functions only.
12397         (mibt): Likewise.
12398         (mshstk): Likewise.
12399         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12400         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12401         enable CET built-in functions.
12403 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12405         * common/config/i386/i386-common.c
12406         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12407         OPTION_MASK_ISA_MOVDIRI_UNSET,
12408         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12409         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12410         * config.gcc (movdirintrin.h): New header.
12411         * config/i386/cpuid.h (bit_MOVDIRI,
12412         bit_MOVDIR64B): New bits.
12413         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12414         and -mmvodir64b.
12415         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12416         (VOID, PVOID, PCVOID)): New function types.
12417         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12418         __builtin_ia32_directstoreu_u64,
12419         __builtin_ia32_movdir64b): New builtins.
12420         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12421         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12422         and -mmovdiri.
12423         (ix86_valid_target_attribute_inner_p): Ditto.
12424         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12425         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12426         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12427         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12428         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12429         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12430         (movdiri<mode>, movdir64b_<mode>): New.
12431         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12432         * config/i386/immintrin.h: Include movdirintrin.h.
12433         * config/i386/movdirintrin.h: New file.
12434         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12436 2018-04-19  Richard Biener  <rguenther@suse.de>
12438         PR middle-end/85455
12439         * cfg.c (clear_bb_flags): When loop state says we have
12440         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12442 2018-04-19  Richard Biener  <rguenther@suse.de>
12444         PR tree-optimization/84737
12445         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12446         copying restrict info.
12447         (vect_setup_realignment): Use it.
12448         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12449         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12450         the first DR to all generated stores.
12451         (vectorizable_load): Likewise for loads.
12453 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12455         PR tree-optimization/85446
12456         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12457         the integral and pointer types to have the same precision.
12459         * doc/install.texi: Document --disable-cet being the default and
12460         --enable-cet=auto.
12462 2018-04-18  Martin Liska  <mliska@suse.cz>
12464         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12465         style.
12467 2018-04-18  Martin Liska  <mliska@suse.cz>
12469         Revert
12470         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12472         PR ipa/83983
12473         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12474         arguments if they are comparable.
12476 2018-04-18  Martin Liska  <mliska@suse.cz>
12478         Revert
12479         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12481         PR lto/84805
12482         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12483         incomplete types.
12485 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12487         PR target/85388
12488         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12489         ENDBR after calling __morestack.
12491 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12493         PR jit/85384
12494         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12495         by using gcc_base_ver to generate a gcc_driver_version, and use
12496         it when generating GCC_DRIVER_NAME.
12497         * configure: Regenerate.
12499 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12501         PR target/81084
12502         * config.gcc: Obsolete powerpc*-*-*spe*.
12504 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12506         PR debug/84637
12507         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12508         (stabstr_D): Change type of unum from unsigned int to
12509         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12510         type.
12512 2018-04-17  Jim Wilson  <jimw@sifive.com>
12514         PR 84856
12515         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12516         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12517         Set arg_pointer_offset after using pretend_args_size.
12519 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12521         PR rtl-optimization/85431
12522         * dse.c (record_store): Ignore zero width stores.
12524         PR sanitizer/85230
12525         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12526         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12527         __builtin_stack_restore rather than after it.
12528         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12529         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12530         argument instead of virtual_dynamic_stack_rtx.
12532 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12534         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12535         New prototype.
12536         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12537         Add note to error message to explain internal mapping of overloaded
12538         built-in function name to non-overloaded built-in function name.
12539         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12540         function.
12542 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12544         PR target/85424
12545         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12546         where the inputs overlap with the output.
12548 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12550         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12551         (=v, v) alternative and explicit "memory" attribute.
12552         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12553         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12554         attributes.
12555         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12556         "sselog1" type instead of "sselog".
12557         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12558         "sselog".  Remove explicit "memory" attribute.
12559         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12560         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12561         attributes.
12562         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12563         "sselog1" type instead of "sselog".  Remove explicit "memory"
12564         attribute.
12565         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12566         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12567         attribute.
12568         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12569         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12570         attributes.
12571         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12572         "sselog1" type instead of "sselog".  Remove explicit "memory"
12573         attribute.
12574         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12575         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12576         attribute.
12578         PR target/85430
12579         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12581         PR middle-end/85414
12582         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12583         on a SUBREG.
12585 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12587         PR ipa/85421
12588         * ipa-cp.c (create_specialized_node): Call
12589         expand_all_artificial_thunks if necessary.
12591 2018-04-17  Martin Liska  <mliska@suse.cz>
12593         PR lto/85405
12594         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12595         in message, remote space in between '_G' and '('.
12597 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12599         PR target/85281
12600         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12601         avx512f_vmcmp<mode>3<round_saeonly_name>,
12602         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12603         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12604         avx512f_rndscale<mode><round_saeonly_name>,
12605         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12606         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12607         Use %<iptr>2 instead of %2 for -masm=intel.
12608         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12609         avx512f_vcvttss2usi<round_saeonly_name>,
12610         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12611         -masm=intel.
12612         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12613         avx512f_vcvttsd2usi<round_saeonly_name>,
12614         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12615         Use %q1 instead of %1 for -masm=intel.
12616         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12617         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12618         of %3 for -masm=intel.
12619         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12620         -masm=intel.
12621         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12622         -masm=intel.
12623         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12624         -masm=intel.
12625         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12626         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12627         %g1.
12628         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12629         -masm=intel.
12630         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12631         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12632         %g1 and one with %0 and %1.
12633         (avx512er_vmrcp28<mode><round_saeonly_name>,
12634         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12635         %1 for -masm=intel.
12636         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12637         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12638         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12639         of %0 and %{%4%} for -masm=intel.
12640         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12641         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12642         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12643         order of %0 and %{%5%}%{z%} for -masm=intel.
12645 2018-04-17  Jan Hubicka  <jh@suse.cz>
12647         PR lto/85405
12648         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12650 2018-04-17  Martin Liska  <mliska@suse.cz>
12652         PR ipa/85329
12653         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12654         for target_clone error message.  Make default implementation
12655         clone to be a local declaration.
12656         (separate_attrs): Add new argument and check for an empty
12657         string.
12658         (expand_target_clones): Handle it.
12659         (ipa_target_clone): Make redirection just for target_clones
12660         functions.
12662 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12663             Tom de Vries  <tom@codesourcery.com>
12665         PR middle-end/84955
12666         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12667         tiled basic blocks without omp continue statements.
12669 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12671         PR target/83660
12672         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12673         vec_extract expression as having side effects to make sure it gets
12674         a cleanup point.
12676 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12678         PR target/85403
12679         * config/i386/i386.c (get_builtin_code_for_version): Check
12680         error_mark_node.
12682 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12684         PR target/84331
12685         * config.gcc: Support "skylake".
12686         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12687         PROCESSOR_SKYLAKE.
12688         * config/i386/i386.c (m_SKYLAKE): Define.
12689         (processor_target_table): Add "skylake".
12690         (ix86_option_override_internal): Add "skylake".
12691         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12692         PROCESSOR_CANNONLAKE.
12693         (get_builtin_code_for_version): Fix priority for
12694         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12695         PROCESSOR_SKYLAKE-AVX512.
12696         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12697         (processor_type): Add PROCESSOR_SKYLAKE.
12699 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12700             Jason Merrill  <jason@redhat.com>
12702         PR c++/85112
12703         * convert.c (convert_to_integer_1): Use direct recursion for
12704         enumeral types and types with a precision less than the number
12705         of bits in their mode.
12707 2018-04-16  Julia Koval  <julia.koval@intel.com>
12709         PR target/84413
12710         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12711         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12713 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12715         PR target/85293
12716         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12717         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12718         and -mno-direct-move.
12720 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12722         PR target/83402
12723         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12724         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12725         Ensure negative shifts result in {0}.
12727 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12729         PR rtl-optimization/79916
12730         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12731         regs (if any) to define how to gnerate SD moves when LRA is in
12732         progress.
12734 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12736         PR rtl-optimization/85393
12737         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12738         * except.c (expand_dw2_landing_pad_for_region): Make static.
12739         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12740         a label and unconditional jump to old_bb, rather than
12741         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12742         basic block.
12744         PR rtl-optimization/85376
12745         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12746         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12747         instead of a specific value.
12749 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12750             Bin Cheng  <bin.cheng@arm.com>
12752         PR tree-optimization/82965
12753         PR tree-optimization/83991
12754         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12755         by_profile_only parameter.
12756         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12757         information if the loop was predicted to iterate too many times.
12758         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12760 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12762         PR lto/71991
12763         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12764         always inline.
12766 2018-04-13  Martin Liska  <mliska@suse.cz>
12767             Jakub Jelinek  <jakub@redhat.com>
12769         PR middle-end/81657
12770         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12771         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12772         * builtins.c (expand_builtin_memory_copy_args): Use
12773         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12774         handle dest_addr == pc_rtx.
12776 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12778         PR target/85291
12779         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12780         asked to not generate direct moves.
12781         (fix_trunc<mode>si2_stfiwx): Similar.
12782         (fix_trunc<mode>si2_internal): Similar.
12784 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12786         PR debug/83157
12787         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12788         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12789         lookup if dest in some wider mode is known to be const0_rtx and
12790         if so, record permanent equivalence for it to be ZERO_EXTEND of
12791         the narrower mode destination.
12793 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12795         * lto-streamer-out.c (output_function): Revert 259346.
12796         * omp-expand.c (expand_oacc_for): Likewise.
12798 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12800         PR rtl-optimization/85354
12801         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12802         * sel-sched.c (sel_global_init): ... here.
12804 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12806         PR target/85238
12807         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12808         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12809         mode for PE-COFF targets.
12810         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12811         (i386_pe_asm_lto_end): Likewise.
12812         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12813         (TARGET_ASM_LTO_END): Likewise.
12814         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12815         (i386_pe_asm_lto_start): New function.
12816         (i386_pe_asm_lto_end): Likewise.
12818 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12819             Richard Biener  <rguenther@suse.de>
12821         PR middle-end/84955
12822         * lto-streamer-out.c (output_function): Fix CFG loop state before
12823         streaming out.
12824         * omp-expand.c (expand_oacc_for): Handle calls to internal
12825         functions like regular functions.
12827 2018-04-12  Richard Biener  <rguenther@suse.de>
12829         PR lto/85371
12830         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12831         for the early LTO debug to properly generate references to it
12832         during DIE emission.  Do not re-use that for the skeleton for
12833         split-dwarf.
12834         (dwarf2out_early_finish): Likewise.
12836 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12838         PR target/85328
12839         * config/i386/sse.md
12840         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12841         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12842         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12843         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12844         and output is a reg, avoid creating invalid lowpart subreg, but
12845         instead split into a 512-bit move.  Don't split if not AVX512VL,
12846         input is xmm16+ reg and output is a mem.
12847         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12848         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12849         xmm16+ reg and output is a mem.
12851 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12853         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12854         also for flag_dwarf2_cfi_asm.
12856 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12858         PR rtl-optimization/85342
12859         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12860         a bool scalar var inside of the loop instead.  Don't try to update
12861         recog_data.operand after failed apply_change_group.
12863 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12865         PR target/85296
12866         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12867         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12868         array with flexible array member as array without given dimension.
12869         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12870         argument for undefined param to true.
12872 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12874         PR target/85321
12875         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12876         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12877         from PowerPC section.
12878         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12879         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12880         help text that is too long.
12881         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12882         help text that is too long.
12883         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12884         help text that is too long.
12886 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12888         * config/alpha/alpha.md (stack_probe_internal): Rename
12889         from "probe_stack".  Update all callers.
12891 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12893         PR rtl-optimization/84566
12894         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12895         sched_macro_fuse_insns.
12897 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12899         PR target/84301
12900         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12901         (compute_block_dependences): ... from here.
12903 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12905         PR tree-optimization/85331
12906         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12907         from int to HOST_WIDE_INT.
12909 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12911         PR ipa/84149
12912         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12913         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12914         not the same as the source val.
12915         (cgraph_edge_brings_value_p): New parameter.
12916         (gather_edges_for_value): Pass destination value to
12917         cgraph_edge_brings_value_p.
12918         (perhaps_add_new_callers): Likewise.
12919         (get_info_about_necessary_edges): Likewise and exclude values brought
12920         only by self-recursive edges.
12921         (create_specialized_node): Redirect only clones of self-calling edges.
12922         (+self_recursive_pass_through_p): New function.
12923         (find_more_scalar_values_for_callers_subset): Use it.
12924         (find_aggregate_values_for_callers_subset): Likewise.
12925         (known_aggs_to_agg_replacement_list): Removed.
12926         (decide_whether_version_node): Re-calculate known constants for all
12927         remaining context clones.
12929 2018-04-11  Richard Biener  <rguenther@suse.de>
12931         PR lto/85339
12932         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12933         from early DWARF output.
12934         (dwarf2out_early_finish): Output line info unconditionally into
12935         early DWARF and add reference to it.
12937 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12939         PR target/85281
12940         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12941         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12942         other than V2DFmode using iptr mode attribute.
12943         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12945 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12947         PR rtl-optimization/84659
12948         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12950 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12952         PR debug/85302
12953         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12954         SIZEP is NULL.
12955         (output_loc_list): Pass address of a dummy size variable even in the
12956         locview handling loop.
12957         (index_location_lists): Add comment on why skip_loc_list_entry can't
12958         call size_of_locs.
12960 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12962         PR target/85261
12963         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12964         into register.
12966 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12968         PR target/85321
12969         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12970         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12971         and -mstring-compare-inline-limit.
12973 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12975         PR target/85287
12976         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12977         for stack clash protection in a register whenever we need it to be in
12978         a register.
12980 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12982         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12983         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12985 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12987         PR target/85321
12988         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12989         the help text.
12990         (mlong-double-): Ditto.
12991         * config/rs6000/sysv4.opt (msdata=): Ditto.
12992         (mtls-size=): Ditto.
12994 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12996         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12997         erroneous entries for
12998         "vector int vec_ldl (int, long int *)", and
12999         "vector unsigned int vec_ldl (int, unsigned long int *)".
13000         Add comments and entries for
13001         "vector bool char vec_ldl (int, bool char *)",
13002         "vector bool short vec_ldl (int, bool short *)",
13003         "vector bool int vec_ldl (int, bool int *)",
13004         "vector bool long long vec_ldl (int, bool long long *)",
13005         "vector pixel vec_ldl (int, pixel *)",
13006         "vector long long vec_ldl (int, long long *)",
13007         "vector unsigned long long vec_ldl (int, unsigned long long *)".
13008         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
13009         type tree bool_long_long_type_node and correct definition of
13010         bool_V2DI_type_node to make reference to this new type tree.
13011         (rs6000_mangle_type): Replace erroneous reference to
13012         bool_long_type_node with bool_long_long_type_node.
13013         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
13014         comments to emphasize sign distinctions for char and int types and
13015         replace RS6000_BTI_bool_long constant with
13016         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
13017         use of RS6000_BTI_pixel.
13018         (bool_long_type_node): Remove this macro definition.
13019         (bool_long_long_type_node): New macro definition
13021 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13023         PR rtl-optimization/85300
13024         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
13025         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
13026         simplify_unary_operation fails.
13028 2018-04-10  Martin Liska  <mliska@suse.cz>
13030         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
13031         cgraph_edge and ipa_ref.
13033 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
13035         PR target/85177
13036         PR target/85255
13037         * config/i386/sse.md
13038         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
13039         computation of the VEC_MERGE selector from mask.
13040         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
13041         Fix decoding of the VEC_MERGE selector into mask.
13043 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13045         PR tree-optimization/85286
13046         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
13048 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
13050         * final.c (final_1): Set insn_last_address as well as
13051         insn_current_address.
13053 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13055         PR target/85173
13056         * explow.c (emit_stack_probe): Call validize_mem on memory location
13057         before passing it to gen_probe_stack.  Create address operand and
13058         legitimize it for the probe_stack_address case.
13060 2018-04-09  Jan Hubicka  <jh@suse.cz>
13062         PR lto/85078
13063         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
13064         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
13065         * tree.c (free_lang_data_in_type): Fix handling of binfos;
13066         walk basetypes.
13067         (free_lang_data): Rebuild type inheritance graph.
13069 2018-04-09  Martin Sebor  <msebor@redhat.com>
13071         * invoke.texi (-finline-small-functions): Mention other optimization
13072         options.
13073         (-findirect-inlining, -fpartial-inlining): Same.
13074         (-finline-functions-called-once): Same.
13075         (-freorder-blocks-and-partition): Same.
13077 2018-04-09  Jan Hubicka  <jh@suse.cz>
13079         PR rtl/84058
13080         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
13081         jumps; choose last target that matches the criteria (i.e.
13082         no partition changes for non-crossing jumps).
13083         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
13084         support for redirecting crossing jumps to non-crossing.
13086 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
13088         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
13089         also for naked functions.
13091 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
13093         * config/arc/arc.md (add_shift): New pattern.
13094         (add_shift2): Likewise.
13095         (sub_shift): Likewise.
13096         (sub_shift_cmp0_noout): Likewise.
13097         (compare_si_ashiftsi): Likewise.
13098         (xbfu_cmp0_noout): New combine pattern.
13099         (xbfu_cmp0"): Likewise.
13100         (movsi_set_cc_insn): Place the predicable variant first.
13101         (commutative_binary_cmp0_noout): Remove clobber.
13102         (commutative_binary_cmp0): New pattern.
13103         (noncommutative_binary_cmp0): Likewise.
13104         (noncommutative_binary_cmp0_noout): Likewise.
13105         (noncommutative_binary_comparison_result_used): Removed.
13106         (rsub_cmp0): New pattern.
13107         (rsub_cmp0_noout): Likewise.
13108         (extzvsi): Changed, keep only meaningful variants.
13109         (SQH, SEZ): New iterators.
13110         (SQH_postfix): New mode attribute.
13111         (SEZ_prefix): New code attribute.
13112         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
13113         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13114         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13115         of numerical value.
13116         (noncommutative_operator): Check the availability of barrel
13117         shifter option.
13119 2018-04-09  Richard Biener  <rguenther@suse.de>
13121         PR tree-optimization/85284
13122         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13123         Only use the niter constraining form of simple_iv when the exit
13124         is always executed.
13126 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13128         PR target/84041
13129         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13130         (define_expand "*memory_barrier"): New define_expand.
13131         (define_insn "memory_barrier"): New insn.
13133 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13135         PR rtl-optimization/80463
13136         PR rtl-optimization/83972
13137         PR rtl-optimization/83480
13139         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13140         correct producer for the insn.
13141         (tidy_control_flow): Fixup seqnos in case of debug insns.
13143 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13145         PR rtl-optimization/83913
13147         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13148         different sched-times when merging exprs.
13150 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13152         PR rtl-optimization/83962
13154         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13155         tidy_fallthru_edge and tidy_control_flow.
13157 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13159         PR rtl-optimization/83530
13161         * sel-sched.c (force_next_insn): New global variable.
13162         (remove_insn_for_debug): When force_next_insn is true, also leave only
13163         next insn in the ready list.
13164         (sel_sched_region): When the region wasn't scheduled, make another pass
13165         over it with force_next_insn set to 1.
13167 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13169         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13170         into tm_file.
13171         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13172         for interrupt control.
13173         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13174         functions for interrupt control.
13175         * config/nds32/nds32-intrinsic.md: Likewise.
13176         * config/nds32/nds32_intrinsic.h: Likewise.
13177         * config/nds32/nds32.h (nds32_builtins): Likewise.
13179 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13181         * config/nds32/nds32.c (nds32_init_machine_status,
13182         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13183         strict_aligned_p field.
13184         (nds32_expand_to_rtl_hook): New function.
13185         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13186         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13188 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13189             Chung-Ju Wu  <jasonwucj@gmail.com>
13191         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13192         * config/nds32/nds32-n7.md: New file.
13193         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13194         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13195         pipeline.
13196         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13197         * config/nds32/nds32.md (pipeline_model): Add n7.
13198         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13199         * config/nds32/pipelines.md: Include n7 settings.
13201 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13202             Chung-Ju Wu  <jasonwucj@gmail.com>
13204         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13205         * config/nds32/nds32-e8.md: New file.
13206         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13207         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13208         pipeline.
13209         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13210         * config/nds32/nds32.md (pipeline_model): Add e8.
13211         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13212         * config/nds32/pipelines.md: Include e8 settings.
13214 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13215             Chung-Ju Wu  <jasonwucj@gmail.com>
13217         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13218         * config/nds32/nds32-n8.md: New file.
13219         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13220         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13221         pipeline.
13222         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13223         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13224         * config/nds32/nds32.md (pipeline_model): Add n8.
13225         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13226         * config/nds32/pipelines.md: Include n8 settings.
13228 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13229             Chung-Ju Wu  <jasonwucj@gmail.com>
13231         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13232         * config/nds32/nds32-n9-2r1w.md: New file.
13233         * config/nds32/nds32-n9-3r2w.md: New file.
13234         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13235         nds32_register_ports): New or modify for cpu n9.
13236         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13237         pipeline.
13238         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13239         * config/nds32/nds32-utils.c: New file.
13240         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13241         TARGET_MUL_SLOW): Define.
13242         * config/nds32/nds32.md (pipeline_model): New attribute.
13243         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13244         New options that support cpu n9.
13245         * config/nds32/pipelines.md: Include n9 settings.
13246         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13248 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13250         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13251         information if necessary.
13252         (output_cond_branch_compare_zero): Likewise.
13253         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13254         (nds32_target_alignment): Refine for alignment.
13255         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13256         (FUNCTION_BOUNDARY): Modify.
13257         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13258         align case.
13259         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13261 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13263         * config/nds32/constants.md (unspec_volatile_element): Add values for
13264         TLB operation and data prefetch.
13265         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13266         functions for TLB operation and data prefetch.
13267         * config/nds32/nds32-intrinsic.md: Likewise.
13268         * config/nds32/nds32_intrinsic.h: Likewise.
13269         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13270         (nds32_print_operand): Likewise.
13271         * config/nds32/nds32.h (nds32_builtins): Likewise.
13273 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13274         Andrew Pinski <pinsika@gcc.gnu.org>
13276         PR middle-end/82976
13277         * match.pd: Use constant_boolean_node of correct type instead of
13278         boolean_true_node or boolean_false_node for simplifying
13279         pointer comparisons to zero.
13281 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13283         PR tree-optimization/80021
13284         * tree.c (verify_type_variant): Make error call in verify_variant_match
13285         translatable and remove final full stop.
13287 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13289         * config/nds32/constants.md (unspec_volatile_element): Add
13290         UNSPEC_VOLATILE_EH_RETURN.
13291         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13292         nds32_output_stack_pop): Support dwarf exception handling process.
13293         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13294         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13295         exception handling process.
13296         (nds32_compute_stack_frame): Likewise.
13297         (nds32_return_addr_rtx): Likewise.
13298         (nds32_initial_elimination_offset): Likewise.
13299         (nds32_expand_prologue): Likewise.
13300         (nds32_expand_epilogue): Likewise.
13301         (nds32_dynamic_chain_address): New function.
13302         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13303         exception handling.
13304         (DYNAMIC_CHAIN_ADDRESS): Define.
13305         (EH_RETURN_DATA_REGNO): Define.
13306         (EH_RETURN_STACKADJ_RTX): Define.
13307         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13308         patterns for dwarf exception handling.
13310 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13312         * config/nds32/nds32.h: Clean up obsolete macros.
13314 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13316         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13317         Add enum values for particular instructions.
13318         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13319         particular intrinsic functions.
13320         * config/nds32/nds32-intrinsic.md: Likewise.
13321         * config/nds32/nds32_intrinsic.h: Likewise.
13322         * config/nds32/nds32.h (nds32_builtins): Likewise.
13323         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13324         (btst, ave): New patterns for particular instructions.
13326 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13328         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13329         Add enum values for atomic load/store and memory sync.
13330         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13331         and memory sync.
13332         * config/nds32/nds32-intrinsic.md: Likewise.
13333         * config/nds32/nds32_intrinsic.h: Likewise.
13334         * config/nds32/nds32.h (nds32_builtins): Likewise.
13336 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13338         PR tree-optimization/85257
13339         * fold-const.c (native_encode_vector): If not all elts could fit
13340         and off is -1, return 0 rather than offset.
13341         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13342         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13343         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13344         adjust buffer in native_interpret_expr call.
13346 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13348         * config/nds32/constants.md (unspec_volatile_element): Add cache
13349         control enum values.
13350         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13351         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13352         * config/nds32/nds32.c (nds32_cctl_names): New.
13353         (nds32_print_operand): Handle cache control register names.
13354         * config/nds32/nds32.h (nds32_builtins): New enum values.
13355         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13356         macros.
13357         * config/nds32/nds32.md (type): Add mmu.
13358         * config/nds32/pipelines.md (simple_insn): Add mmu.
13360 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13362         * config/nds32/nds32.md (type): Remove call.
13363         * config/nds32/pipelines.md (simple_insn): Likewise.
13365 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13367         * config/nds32/constants.md (unspec_volatile_element): Add
13368         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13369         UNSPEC_VOLATILE_FMFCFG.
13370         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13371         description for fmfcfg and fmfcsr.
13372         (bdesc_1arg): Add fmtcsr.
13373         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13374         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13375         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13376         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13377         unspec_fmfcfg): New patterns.
13378         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13379         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13380         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13381         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13382         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13383         __nds32__fmfcfg): Define.
13385 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13387         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13388         intrinsic register names.
13389         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13390         intrinsic register enum values and macros.
13392 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13394         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13395         for load/store addressing form.
13396         (nds32_print_operand_address): Likewise.
13398 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13400         PR target/85196
13401         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13402         based on LABEL_REF.  Remove useless assertion.
13403         (pic_address_needs_scratch): Fix formatting.
13404         (sparc_legitimize_pic_address): Minor tweaks.
13405         (sparc_delegitimize_address): Adjust assertion accordingly.
13406         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13407         into symbolic_operand.
13408         (movsi_high_pic_label_ref): Likewise.
13409         (movsi_lo_sum_pic_label_ref): Likewise.
13410         (movdi_pic_label_ref): Likewise.
13411         (movdi_high_pic_label_ref): Likewise.
13412         (movdi_lo_sum_pic_label_ref): Likewise.
13414 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13416         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13417         custom LIB_SPEC setup.
13419 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13420             Kito Cheng  <kito.cheng@gmail.com>
13422         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13423         * config/riscv/freebsd.h: New.
13425 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13427         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13428         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13429         file.
13431 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13432             Kito Cheng  <kito.cheng@gmail.com>
13434         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13435         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13436         * config/nds32/nds32-protos.h (nds32_output_call,
13437         nds32_output_return): Declare.
13438         * config/nds32/nds32.md: Refine all the call and return patterns.
13440 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13442         PR debug/85252
13443         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13444         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13446         PR rtl-optimization/84872
13447         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13448         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13449         EDGE_CROSSING edge.
13451 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13453         * expr.c (copy_blkmode_to_reg): Revert 254862.
13454         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13456 2018-04-06  Richard Biener  <rguenther@suse.de>
13458         PR middle-end/85244
13459         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13460         after seeing a component reference with an adjacent field.  Treat
13461         refs to arrays at struct end of external decls similar to
13462         refs to unconstrained commons.
13464 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13466         PR sanitizer/85213
13467         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13468         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13469         recursive calls.
13470         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13471         save_p here.
13473 2018-04-06  Richard Biener  <rguenther@suse.de>
13475         PR middle-end/85180
13476         * alias.c (find_base_term): New wrapper around find_base_term
13477         unwinding CSELIB_VAL_PTR changes.
13478         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13479         recursion.
13481 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13483         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13484         instructions.
13485         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13486         constant definitions.
13487         ("nop"): lr 0,0 -> nopr r0
13488         ("nop_lr0", "nop_lr1"): New insn definitions.
13490 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13492         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13493         NDS32_V3PUSH_AVAILABLE_P macro.
13495 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13496             Chung-Ju Wu  <jasonwucj@gmail.com>
13498         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13499         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13500         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13501         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13502         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13503         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13504         * config/nds32/constraints.md: New constraints and checking for hard
13505         float configuration.
13506         * config/nds32/iterators.md: New mode iterator and attribute for hard
13507         float configuration.
13508         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13509         patterns.
13510         * config/nds32/nds32-fpu.md: New file.
13511         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13512         deal with hard float code generation.
13513         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13514         ARCH_V3S.
13515         (abi_type, float_reg_number): New enum type.
13516         * config/nds32/nds32-predicates.c: New predicates for hard float.
13517         * config/nds32/nds32-protos.h: Declare functions for hard float.
13518         * config/nds32/nds32.c: Implementation for hard float configuration.
13519         * config/nds32/nds32.h: Definitions for hard float configuration.
13520         * config/nds32/nds32.md: Include hard float machine description and
13521         modify patterns for hard float configuration.
13522         * config/nds32/nds32.opt: New options for hard float configuration.
13523         * config/nds32/predicates.md: New predicates for hard float
13524         configuration.
13526 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13528         * common/config/nds32/nds32-common.c
13529         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13531 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13533         PR middle-end/85195
13534         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13535         CONSTRUCTOR_ELT (ctor, ...)->value.
13537 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13539         PR target/85193
13540         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13542 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13544         PR target/85204
13545         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13546         cond jump.
13548 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13549             Kito Cheng  <kito.cheng@gmail.com>
13551         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13552         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13553         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13554         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13556 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13557             Kito Cheng  <kito.cheng@gmail.com>
13559         * config/nds32/constraints.md (Ufe): New memory constraint.
13560         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13561         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13562         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13563         operands.
13564         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13565         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13567 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13569         * config/nds32/nds32.md: Use optimize_size in the condition for
13570         alu-shift instructions.
13572 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13574         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13576 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13578         * config/nds32/nds32.md (negsi2): Refine pattern.
13580 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13581             Chung-Ju Wu  <jasonwucj@gmail.com>
13583         * config/nds32/iterators.md (shift_rotate): New code iterator.
13584         (shift): New code attribute.
13585         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13586         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13587         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13588         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13589         bit-wise operations.
13590         (andsi3, *andsi3): Ditto.
13591         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13592         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13593         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13594         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13595         nds32_ior_operand, nds32_xor_operand): New predicates.
13597 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13599         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13600         (addsi3, subsi3): ... this.
13602 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13604         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13606 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13608         * config/nds32/nds32.md: Adjust indention.
13610 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13612         * config/nds32/nds32.md (feature): New attribute.
13614 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13616         * config/nds32/nds32.md (subtype): New attribute.
13618 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13620         PR target/85203
13621         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13622         expansion to perform a bitwise AND of the argument followed by a
13623         boolean negation of the result.
13625 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13627         PR rtl-optimization/84878
13628         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13629         the basic block.  Assert the use reference is not artificial and that
13630         it has an associated insn.
13632 2018-04-04  Michael Matz  <matz@suse.de>
13634         * builtins.c (compute_objsize): Pass correct operand
13635         to array_at_struct_end_p.
13637 2018-04-04  Richard Biener  <rguenther@suse.de>
13639         PR lto/85176
13640         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13641         from contexts for DINFO_LEVEL_TERSE and below.
13643 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13645         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13646         resiter_operand condition.
13647         * config/nds32/nds32.md (*move<mode>): Ditto.
13649 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13650             Monk Chiang  <sh.chiang04@gmail.com>
13652         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13654 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13656         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13658 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13659             Kito Cheng  <kito.cheng@gmail.com>
13661         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13662         nds32_cond_code_str, output_cond_branch,
13663         output_cond_branch_compare_zero, nds32_expand_cbranch,
13664         nds32_expand_cstore, nds32_expand_movcc,
13665         nds32_output_cbranchsi4_equality_zero,
13666         nds32_output_cbranchsi4_equality_reg,
13667         nds32_output_cbranchsi4_equality_reg_or_const_int,
13668         nds32_output_cbranchsi4_greater_less_zero: New functions.
13669         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13670         nds32_expand_cstore, nds32_expand_movcc,
13671         nds32_output_cbranchsi4_equality_zero,
13672         nds32_output_cbranchsi4_equality_reg,
13673         nds32_output_cbranchsi4_equality_reg_or_const_int,
13674         nds32_output_cbranchsi4_greater_less_zero): Declare.
13675         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13676         nds32_rimm11s_operand): New predicates.
13677         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13678         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13679         patterns.
13681 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13683         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13684         * config/nds32/nds32.md: Ditto.
13685         * config/nds32/pipelines.md: Ditto.
13687 2018-04-04  Richard Biener  <rguenther@suse.de>
13689         PR tree-optimization/85168
13690         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13691         propagating abnormals.
13693 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13695         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13697 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13698             Kito Cheng  <kito.cheng@gmail.com>
13700         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13701         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13702         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13703         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13704         * config/nds32/nds32.md (sibcall_internal): New.
13705         (sibcall_register): Remove.
13706         (sibcall_immediate): Remove.
13707         (sibcall_value_internal): New.
13708         (sibcall_value_register): Remove.
13709         (sibcall_value_immediate): Remove.
13710         * config/nds32/predicates.md (nds32_general_register_operand): New.
13711         (nds32_call_address_operand): New.
13713 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13715         PR rtl-optimization/85167
13716         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13717         bb_defs if *split_p, instead preinitialize it to NULL.
13719         PR tree-optimization/85156
13720         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13721         evaluating the argument multiple times.
13723 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13725         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13726         than vector.
13727         (_mm_cvtpd_ps): Likewise.
13728         (_mm_cvttpd_epi32): Likewise.
13729         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13730         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13731         vector, pixel, and bool following altivec.h include.
13733 2018-04-03  Martin Sebor  <msebor@redhat.com>
13735         * doc/extend.texi (Common Function Attributes): Clarify.
13736         (const attribute): Likewise.
13737         (pure attribute): Likewise.
13739 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13741         PR target/85169
13742         * config/i386/i386.c (ix86_expand_vector_set): Use
13743         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13745 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13747         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13748         instructions when changing rounding bits to preserve precision bits
13749         in the x87 control word.
13751 2018-04-03  Martin Liska  <mliska@suse.cz>
13753         PR tree-optimization/82491
13754         * rtl.h (strip_offset_and_add): Replace += suboffset with
13755         poly_uint64 () + suboffset.
13757 2018-03-29  Martin Liska  <mliska@suse.cz>
13758             Martin Jambor  <mjambor@suse.cz>
13760         PR ipa/84947
13761         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13762         param_type is not an integral or pointer type.
13764 2018-04-03  Richard Biener  <rguenther@suse.de>
13766         * sese.h (recompute_all_dominators): Remove.
13768 2018-04-02  Martin Sebor  <msebor@redhat.com>
13770         * doc/invoke.texi (-Wrestrict): Fix typos.
13772 2018-04-02  Jim Wilson  <jimw@sifive.com>
13774         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13775         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13776         (<optab>di3, <optab>si3_extend): Likewise.
13777         (<optab>si3_mask, <optab>si3_mask_1): New.
13778         (<optab>di3_mask, <optab>di3_mask_1): New.
13779         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13780         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13781         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13783 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13785         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13786         example.
13788 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13790         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13791         (nds32_canonicalize_comparison): New function.
13793 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13794             Kito Cheng  <kito.cheng@gmail.com>
13795             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13797         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13798         * config/nds32/constants.md (unspec_volatile_element): Add
13799         UNSPEC_VOLATILE_RELAX_GROUP.
13800         * config/nds32/nds32-relax-opt.c: New file.
13801         * config/nds32/nds32-predicates.c
13802         (nds32_symbol_load_store_p): New function.
13803         * config/nds32/nds32-protos.h
13804         (nds32_symbol_load_store_p): Declare function.
13805         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13806         * config/nds32/nds32.c
13807         (nds32_register_pass): New function to register pass.
13808         (nds32_register_passes): New function to register passes.
13809         * config/nds32/nds32.md (relax_group): New pattern.
13810         * config/nds32/nds32.opt (mrelax-hint): New option.
13811         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13813 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13815         * config/nds32/t-nds32: Modify files dependency.
13817 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13819         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13820         (PROFILE_HOOK): Define its implementation.
13822 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13824         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13825         type and 32-bit size.
13827 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13829         PR middle-end/85090
13830         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13831         (V_128_256): New mode iterator.
13832         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13833         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13834         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13835         of V.
13836         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13837         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13839 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13841         PR target/83315
13842         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13843         NaN inputs correctly.
13845 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13847         PR target/80546
13848         * config/rs6000/vsx.md (??r): New mode attribute.
13849         (*vsx_mov<mode>_64bit): Use it.
13850         (*vsx_mov<mode>_32bit): Likewise.
13852 2018-03-30  Martin Sebor  <msebor@redhat.com>
13854         PR tree-optimization/84818
13855         * builtins.c (check_access): Use warning_n.
13857 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13859         PR target/83822
13860         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13861         condition.
13862         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13863         condition.
13865 2018-03-30  Julia Koval  <julia.koval@intel.com>
13867         PR target/84413
13868         * x86-tune.def (movx, partial_reg_dependency): Enable for
13869         m_SKYLAKE_AVX512.
13871 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13873         PR inline-asm/84985
13874         * lra-constraints.c (process_alt_operands): Move setting
13875         this_alternative_matches below.
13877 2018-03-29  Martin Liska  <mliska@suse.cz>
13879         PR lto/84995.
13880         * doc/invoke.texi: Document how LTO works with debug info.
13881         Describe auto-load support of binutils.  Mention 'x86-64'
13882         as valid option value of -march option.
13884 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13886         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13888         PR c/85094
13889         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13890         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13891         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13892         checking.
13894 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13896         PR target/84912
13897         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13898         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13899         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13900         for RS6000_BTM_POWERPC64.
13901         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13902         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13903         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13904         definition.
13905         (DIVDE): Use it.
13906         (DIVDEU): Likewise.
13908 2018-03-28  Carl Love  <cel@us.ibm.com>
13910         Revert
13911         2017-09-27  Carl Love  <cel@us.ibm.com>
13913         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13914         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13915         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13916         fctiw instruction.
13918 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13920         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13921         instead of __vector bool.
13922         (_mm_max_pu8): Likewise.
13923         (_mm_min_pi16): Likewise.
13925 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13927         PR target/84912
13928         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13929         (DIVWEUO): Likewise.
13930         (DIVDEO): Likewise.
13931         (DIVDEUO): Likewise.
13932         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13933         DIVWEUO and DIVDEUO.
13934         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13935         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13936         (div_extend): Likewise.
13937         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13938         builtin function.
13939         (__builtin_divweuo): Likewise.
13940         (__builtin_divdeo): Likewise.
13941         (__builtin_divdeuo): Likewise.
13943 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13945         PR target/85095
13946         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13947         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13949         PR tree-optimization/82004
13950         * gimple-match-head.c (optimize_pow_to_exp): New function.
13951         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13952         Don't fold to exp if optimize_pow_to_exp is false.
13954 2018-03-28  Martin Liska  <mliska@suse.cz>
13956         PR other/84819
13957         * calls.c (initialize_argument_information): Fix trailing space.
13958         * common.opt: Fix typo and provide better explanation for
13959         -fsanitize-coverage option.
13960         * config/i386/i386.opt: Fix typo.
13962 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13963             Martin Liska  <mliska@suse.cz>
13965         PR sanitizer/85081
13966         * gimplify.c (asan_poison_variable): Don't do the check for
13967         gimplify_omp_ctxp here.
13968         (gimplify_decl_expr): Do it here.
13969         (gimplify_target_expr): Likewise.
13971 2018-03-28  Martin Liska  <mliska@suse.cz>
13973         PR target/84988
13974         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13975         chkp_type_bounds_count if MPX is not enabled.
13977 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13979         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13981 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13983         PR target/84914
13984         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13985         function to create the function decl for complex long double
13986         multiply and divide for -mabi=ieeelongdouble.
13987         (init_float128_ieee): Call it.
13989 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13991         PR target/85044
13992         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13993         -fcf-protection=branch -mibt.
13994         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13996 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13998         PR target/81863
13999         * config/arm/arm.c (arm_valid_symbolic_address): Handle
14000         arm_word_relocations.
14002 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
14004         PR target/85056
14005         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
14006         extern array declarations.
14008 2018-03-27  Richard Biener  <rguenther@suse.de>
14010         PR middle-end/84067
14011         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
14012         explicit single_use checks.
14014 2018-03-27  Richard Biener  <rguenther@suse.de>
14016         PR tree-optimization/85082
14017         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
14018         Valueize the VUSE.
14020 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14022         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
14023         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
14024         Turn on fasynchronous-unwind-tables and funwind-tables.
14026 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
14028         PR target/85073
14029         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
14030         (*bmi_blsr_<mode>_ccz): Ditto.
14032 2018-03-26  Tom de Vries  <tom@codesourcery.com>
14034         PR tree-optimization/85063
14035         * omp-general.c (offloading_function_p): New function.  Factor out
14036         of ...
14037         * omp-offload.c (pass_omp_target_link::gate): ... here.
14038         * omp-general.h (offloading_function_p): Declare.
14039         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
14040         with attribute omp declare target for offloading functions.
14042 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
14044         PR tree-optimization/84005
14045         * tree-data-ref.h (get_base_for_alignment): Declare.
14046         * tree-data-ref.c (get_base_for_alignment_1): New function.
14047         (get_base_for_alignment): Likewise.
14048         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14049         get_base_for_alignment to find a suitable base object, instead
14050         of always using drb->base_address.
14052 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14054         PR inline-asm/85022
14055         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
14056         known size by default.
14058 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
14060         PR inline-asm/85030
14061         * lra-constraints.c (process_alt_operands): Don't match BLKmode
14062         and non BLKmode operands.
14064 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14066         PR target/85026
14067         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
14068         Clean up attributes.
14070 2018-03-23  Richard Biener  <rguenther@suse.de>
14072         PR debug/85020
14073         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
14074         we are going to emit early debug for LTO.
14076 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
14078         PR inline-asm/85034
14079         * function.c (match_asm_constraints_1): Don't optimize if input
14080         doesn't satisfy general_operand predicate for output's mode.
14082         PR inline-asm/85022
14083         * alias.c (write_dependence_p): Don't require for x_canonicalized
14084         non-VOIDmode if x has VOIDmode.
14086         PR sanitizer/85029
14087         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
14088         just don't try to optimize it rather than assert it never happens.
14090 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14092         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
14093         macro expansions for definition of ST_INTERNAL_<mode> and
14094         LD_INTERNAL_<mode> builtins.
14095         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
14096         Remove prototype.
14097         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
14098         function.
14099         (altivec_expand_st_builtin): Likewise.
14100         (altivec_expand_builtin): Remove calls to deleted functions.
14101         (rs6000_address_for_altivec): Delete this function.
14102         * config/rs6000/vector.md: Remove expands for
14103         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
14105 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
14107         PR target/84826
14108         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
14109         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
14110         re-computing once computed.
14111         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
14112         (arm_init_machine_status): Initialize
14113         machine->static_chain_stack_bytes.
14115 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14117         PR target/84760
14118         * doc/extend.texi: Add four new prototypes for vec_ld.
14119         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14120         definitions for more logical presentation.
14121         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14122         entries for V1TI variants of __builtin_altivec_ld builtin.
14123         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14124         handling of V1TI variant of LVX icode pattern.
14125         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14126         (rs6000_gimple_fold_builtin): Likewise.
14127         (altivec_init_builtins): Add code to define
14128         __builtin_altivec_lvx_v1ti function.
14130 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14132         PR inline-asm/84941
14133         * function.c (match_asm_constraints_1): Don't do the optimization
14134         if input isn't a REG, SUBREG, MEM or constant.
14136 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14138         PR tree-optimization/84956
14139         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14140         bb_has_abnormal_pred.
14142 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14144         PR sanitizer/85018
14145         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14146         DECL_INITIAL (decl) to decl at the end.
14147         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14148         adjust the comment.
14150 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14152         * doc/extend.texi (__builtin_tgmath): Document when complex
14153         integer types are treated as _Complex _Float64.
14155 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14157         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14159 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14161         PR tree-optimization/84960
14162         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14163         if it is ENTRY block, move them into single succ of ENTRY in that case.
14165 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14167         PR tree-optimization/84811
14168         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14169         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14170         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14171         (known_subrange_p): Update accordingly.  Cast each value involved
14172         in the size comparison, rather than casting the result of the
14173         subtraction.
14175 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14177         PR tree-optimization/84982
14178         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14179         by flipping the least significant bit rather than all bits from
14180         bitpos to bitpos + bitsize - 1.
14182 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14184         * doc/extend.texi (Deprecated Features): Remove mention of
14185         long-deleted deprecations.
14187 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14189         PR jit/84288
14190         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14191         * configure: Regenerate.
14193 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14195         PR tree-optimization/83126
14196         * tree-parloops.c (num_phis): New function.
14197         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14199 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14201         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14202         mention anon-struct/union members and trailing attributes.
14204 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14206         PR tree-optimization/84969
14207         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14208         builtin memset partitions if they set different rhs values.
14210 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14212         PR rtl-optimization/84989
14213         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14214         VEC_DUPLICATE with scalar result mode.
14216 2018-03-21  Martin Liska  <mliska@suse.cz>
14218         PR ipa/84963
14219         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14220         not intended return statement.
14222 2018-03-21  Martin Liska  <mliska@suse.cz>
14224         PR target/84988
14225         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14226         (chkp_find_bound_slots_1): Limit number of iterations.
14228 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14230         PR target/84838
14231         * Minor grammar fixes for x86 options.
14233 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14235         PR debug/84875
14236         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14237         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14239 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14241         PR target/83789
14242         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14243         (altivec_lvx_<mode>_1op): Likewise.
14244         (altivec_stvx_<mode>_2op): Likewise.
14245         (altivec_stvx_<mode>_1op): Likewise.
14246         (altivec_lvx_<VM2:mode>): New define_expand.
14247         (altivec_stvx_<VM2:mode>): Likewise.
14248         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14249         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14250         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14251         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14252         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14253         (rs6000_gen_lvx): Likewise.
14254         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14255         (altivec_expand_stv_builtin): Likewise.
14256         (altivec_expand_builtin): Likewise.
14257         * config/rs6000/vector.md: Likewise.
14259 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14261         PR target/82518
14262         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14263         BYTES_BIG_ENDIAN.
14265 2018-03-20  Richard Biener  <rguenther@suse.de>
14267         PR target/84986
14268         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14269         sign-conversions as zero, fall back to standard scalar_stmt
14270         cost for the rest.
14272 2018-03-20  Martin Liska  <mliska@suse.cz>
14274         PR ipa/84825
14275         * predict.c (rebuild_frequencies): Handle case when we have
14276         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14278 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14280         PR target/84990
14281         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14282         flag_section_anchors.
14283         * varasm.c (use_blocks_for_decl_p): Remove hack for
14284         dw2_force_const_mem.
14286         PR target/84845
14287         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14288         to ...
14289         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14290         be created, use lowpart_subreg of operands[0] rather than operands[0]
14291         itself.
14292         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14293         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14294         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14295         and n constraint instead of aarch64_shift_imm_di and Usd.
14296         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14297         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14299 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14301         PR target/82989
14302         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14303         to favor GPR over NEON registers.
14304         (<shift>di3_neon): Likewise.
14306 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14308         PR target/84952
14309         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14310         (nvptx_process_pars): Emit bar.sync asap and alap.
14312 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14314         PR target/84954
14315         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14316         seen_label if seen_label is already set.
14318 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14320         PR target/84945
14321         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14322         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14323         Use 1U instead of 1.  Formatting fixes.
14325         PR c/84953
14326         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14327         instead of TREE_TYPE (s1) for the return value.
14329 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14331         PR tree-optimization/84946
14332         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14333         bitsize + bitsize in poly_uint64 rather than poly_int64.
14335         PR sanitizer/78651
14336         * dwarf2asm.c: Include fold-const.c.
14337         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14338         of decl rather than decl itself.
14340         PR rtl-optimization/84643
14341         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14343 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14345         PR sanitizer/78651
14346         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14347         calling assemble_variable.
14349 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14351         PR target/81647
14352         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14353         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14355 2018-03-19  Jim Wilson  <jimw@sifive.com>
14357         PR bootstrap/84856
14358         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14359         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14360         (riscv_first_stack_step): Likewise.
14361         (riscv_option_override): Use STACK_BOUNDARY instead of
14362         MIN_STACK_BOUNDARY.
14363         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14364         MIN_STACK_BOUNDARY.
14365         (BIGGEST_ALIGNMENT): Set to 128.
14366         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14367         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14368         STACK_BOUNDARY.
14370 2018-03-19  Richard Biener  <rguenther@suse.de>
14372         PR tree-optimization/84933
14373         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14374         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14376 2018-03-19  Richard Biener  <rguenther@suse.de>
14378         PR tree-optimization/84859
14379         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14380         (cond_if_else_store_replacement): Perform sinking operation on
14381         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14382         Generalize what a BB with a single eligible store is.
14384 2018-03-19  Richard Biener  <rguenther@suse.de>
14386         PR tree-optimization/84929
14387         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14388         chrec_is_positive against non-chrec arg.
14390 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14392         PR target/84711
14393         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14395 2018-03-18  Martin Liska  <mliska@suse.cz>
14397         PR rtl-optimization/84635
14398         * regrename.c (build_def_use): Use matches_mode only when
14399         matches >= 0.
14401 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14403         PR tree-optimization/84913
14404         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14405         vectorize chains of COND_EXPRs.
14407 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14409         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14411 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14413         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14415 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14417         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14419 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14420             Kito Cheng  <kito.cheng@gmail.com>
14422         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14423         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14424         (nds32_adjust_reg_alloc_order): New function.
14425         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14427 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14429         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14430         nds32_print_operand, nds32_print_operand_address): Use
14431         HOST_WIDE_INT_PRINT_DEC instead.
14433 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14435         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14437 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14439         PR target/84902
14440         * config/i386/i386.c (initial_ix86_tune_features,
14441         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14442         unsigned long long.
14443         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14444         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14445         rather than 1u << ix86_tune.  Formatting fix.
14446         (ix86_option_override_internal): Change ix86_arch_mask from
14447         unsigned int to unsigned HOST_WIDE_INT, initialize to
14448         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14449         (ix86_function_specific_restore): Likewise.
14451 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14453         PR target/84899
14454         * postreload.c (reload_combine_recognize_pattern): Perform
14455         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14456         truncate_int_for_mode the result for the destination's mode.
14458         PR c/84909
14459         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14460         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14461         Likewise.
14462         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14463         Likewise.
14465 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14467         PR target/84876
14468         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14469         regno_allocno_class_array and sorted_pseudos.
14470         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14471         insns where regno is used.
14473 2018-03-16  Martin Liska  <mliska@suse.cz>
14475         PR ipa/84833
14476         * multiple_target.c (create_dispatcher_calls): Redirect
14477         reference in the symbol table.
14479 2018-03-16  Martin Liska  <mliska@suse.cz>
14481         PR ipa/84722
14482         * multiple_target.c (create_dispatcher_calls): Redirect also
14483         an alias.
14485 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14487         PR c++/79937
14488         PR c++/82410
14489         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14490         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14491         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14493 2018-03-16  Julia Koval  <julia.koval@intel.com>
14495         * doc/invoke.texi (Skylake Server): Add CLWB.
14496         Cannonlake): Remove CLWB.
14498 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14500         PR tree-optimization/84841
14501         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14502         1 << 3.
14503         (FLOAT_ONE_CONST_TYPE): Define.
14504         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14505         (sort_by_operand_rank): Put entries with higher constant_type last
14506         rather than first to match comments.
14508 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14510         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14511         split predicate.
14513 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14515         PR c++/79085
14516         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14517         check and use address of target always.
14519 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14521         PR target/84574
14522         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14523         (indirect_thunk_bnd_needed): Likewise.
14524         (indirect_thunks_used): Likewise.
14525         (indirect_thunks_bnd_used): Likewise.
14526         (indirect_return_needed): New.
14527         (indirect_return_bnd_needed): Likewise.
14528         (output_indirect_thunk_function): Add a bool argument for
14529         function return.
14530         (output_indirect_thunk_function): Don't generate alias for
14531         function return thunk.
14532         (ix86_code_end): Call output_indirect_thunk_function to generate
14533         function return thunks.
14534         (ix86_output_function_return): Set indirect_return_bnd_needed
14535         and indirect_return_needed instead of indirect_thunk_bnd_needed
14536         and indirect_thunk_needed.
14538 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14540         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14541         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14542         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14544 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14545             Paul Hua <paul.hua.gm@gmail.com>
14547         PR c/84852
14548         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14550 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14552         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14553         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14554         resp. SFmode cases.
14556 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14558         PR target/84711
14559         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14560         instead of GET_MODE_SIZE when comparing Units.
14562 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14564         PR target/68256
14565         * varasm.c (hash_section): Return an unchangeble hash value
14566         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14567         Return !aarch64_can_use_per_function_literal_pools_p ().
14569 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14571         PR target/84860
14572         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14573         rather than address of cmode as last argument to prepare_cmp_insn.
14575 2018-03-15  Julia Koval  <julia.koval@intel.com>
14577         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14578         F_AVX512VNNI, F_AVX512BITALG): New.
14580 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14582         PR target/83451
14583         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14584         insn for floating-point loads and stores.
14586 2018-03-14  Carl Love  <cel@us.ibm.com>
14588         * config/rs6000/rs6000-c.c: Add macro definitions for
14589         ALTIVEC_BUILTIN_VEC_PERMXOR.
14590         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14591         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14592         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14593         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14594         UNSPEC_VPERMXOR.
14595         * config/doc/extend.texi: Add prototypes for vec_permxor.
14597 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14599         PR c/84852
14600         * diagnostic-show-locus.c (class layout_point): Convert m_line
14601         from int to linenum_type.
14602         (line_span::comparator): Use linenum "compare" function when
14603         comparing line numbers.
14604         (test_line_span): New function.
14605         (layout_range::contains_point): Convert param "row" from int to
14606         linenum_type.
14607         (layout_range::intersects_line_p): Likewise.
14608         (layout::will_show_line_p): Likewise.
14609         (layout::print_source_line): Likewise.
14610         (layout::should_print_annotation_line_p): Likewise.
14611         (layout::print_annotation_line): Likewise.
14612         (layout::print_leading_fixits): Likewise.
14613         (layout::annotation_line_showed_range_p): Likewise.
14614         (struct line_corrections): Likewise for field m_row.
14615         (line_corrections::line_corrections): Likewise for param "row".
14616         (layout::print_trailing_fixits): Likewise.
14617         (layout::get_state_at_point): Likewise.
14618         (layout::get_x_bound_for_row): Likewise.
14619         (layout::print_line): Likewise.
14620         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14621         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14622         * input.c (selftest::test_linenum_comparisons): New function.
14623         (selftest::input_c_tests): Call it.
14624         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14625         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14626         * selftest.h (ASSERT_GT): New macro.
14627         (ASSERT_GT_AT): New macro.
14628         (ASSERT_LT): New macro.
14629         (ASSERT_LT_AT): New macro.
14631 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14633         PR rtl-optimization/84780
14634         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14636 2018-03-14  Martin Liska  <mliska@suse.cz>
14638         * tree.c (record_node_allocation_statistics): Use
14639         get_stats_node_kind.
14640         (get_stats_node_kind): New function extracted from
14641         record_node_allocation_statistics.
14642         (free_node): Use get_stats_node_kind.
14644 2018-03-14  Richard Biener  <rguenther@suse.de>
14646         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14647         that the value-set of ANTIC_IN doesn't grow.
14649         Revert
14650         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14651         member.
14652         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14653         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14655 2018-03-14  Julia Koval  <julia.koval@intel.com>
14657         * config.gcc (icelake-client, icelake-server): New.
14658         (icelake): Remove.
14659         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14660         (initial_ix86_arch_features): Ditto.
14661         (PTA_SKYLAKE): Add SGX.
14662         (PTA_ICELAKE): Remove.
14663         (PTA_ICELAKE_CLIENT): New.
14664         (PTA_ICELAKE_SERVER): New.
14665         (ix86_option_override_internal): Split up icelake on icelake client and
14666         icelake server.
14667         (get_builtin_code_for_version): Ditto.
14668         (fold_builtin_cpu): Ditto.
14669         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14670         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14671         * config/i386/i386.h (processor_type): Ditto.
14672         * doc/invoke.texi: Ditto.
14674 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14676         PR sanitizer/83392
14677         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14678         INTEGER_CST offset, add it together with bitpos / 8 and
14679         sign extend based on POINTER_SIZE.
14681         PR target/84844
14682         Revert
14683         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14685         PR target/78090
14686         * config/i386/constraints.md (Yc): New register constraint.
14687         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14688         Use Yc constraint for alternative 2 of operand 0.  Remove
14689         preferred_for_speed attribute.
14691 2018-03-14  Richard Biener  <rguenther@suse.de>
14693         PR tree-optimization/84830
14694         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14695         with the old one to avoid oscillations.
14697 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14699         PR target/83712
14700         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14701         pseudos.
14702         (assign_by_spills): Return a flag of reload assignment failure.
14703         Do not process the reload assignment failures.  Do not spill other
14704         reload pseudos if they has the same reg class.  Update n if
14705         necessary.
14706         (lra_assign): Add a return arg.  Set up from the result of
14707         assign_by_spills call.
14708         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14709         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14710         usage_insns if it is not NULL.
14711         (spill_hard_reg_in_range): New function.
14712         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14713         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14714         function prototypes.
14715         (lra_assign): Change prototype.
14716         * lra.c (lra): Add code to deal with fails by splitting hard reg
14717         live ranges.
14719 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14721         * config/riscv/riscv.opt (mrelax): New option.
14722         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14723         "norelax" when riscv_mrelax is disabled.
14724         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14726 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14728         PR target/84743
14729         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14730         reassociation for int modes.
14732 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14734         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14735         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14736         for big-endian.
14737         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14738         * config/aarch64/aarch64-sve.md
14739         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14740         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14741         (*extend<mode><Vwide>2): Rename to...
14742         (aarch64_sve_extend<mode><Vwide>2): ...this.
14743         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14744         renaming the old pattern to...
14745         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14746         unsigned packs.
14747         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14748         define_expand, renaming the old pattern to...
14749         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14750         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14751         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14752         account when deciding which SVE instruction the optab should use.
14753         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14755 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14757         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14758         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14759         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14760         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14761         (tlsdesc_small_<mode>): Turn a define_expand and use
14762         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14763         (tlsdesc_small_advsimd_<mode>): ...this.
14764         (tlsdesc_small_sve_<mode>): New pattern.
14766 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14768         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14769         (UNSPEC_UMUL_HIGHPART): New constants.
14770         (MUL_HIGHPART): New int iteraor.
14771         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14772         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14773         define_expand.
14774         (*<su>mul<mode>3_highpart): New define_insn.
14776 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14778         PR lto/84805
14779         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14780         incomplete types.
14782 2018-03-13  Martin Liska  <mliska@suse.cz>
14784         PR ipa/84658.
14785         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14786         vector.
14787         (sem_item_optimizer::~sem_item_optimizer): Release it.
14788         (sem_item_optimizer::merge_classes): Register variable aliases.
14789         (sem_item_optimizer::fixup_pt_set): New function.
14790         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14791         * ipa-icf.h: Declare new variables and functions.
14793 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14795         PR middle-end/84834
14796         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14797         integer_pow2p@2 and test integer_pow2p in condition.
14798         (A < 0 ? C : 0): Similarly for @1.
14800         PR middle-end/84831
14801         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14802         characters starting at p contain '\0' character, don't look beyond
14803         that.
14805         PR target/84827
14806         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14807         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14809         PR target/84828
14810         * reg-stack.c (change_stack): Change update_end var from int to
14811         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14812         also call set_block_for_insn on the newly added insns and rescan.
14814         PR target/84786
14815         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14816         on the last operand.
14818         PR c++/84704
14819         * tree.c (stabilize_reference_1): Return save_expr (e) for
14820         STATEMENT_LIST even if it doesn't have side-effects.
14822 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14824         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14826 2018-03-12  Renlin Li  <renlin.li@arm.com>
14828         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14829         aarch64_output_scalar_simd_mov_immediate.
14831 2018-03-12  Martin Sebor  <msebor@redhat.com>
14833         PR tree-optimization/83456
14834         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14835         for perfectly overlapping calls to memcpy.
14836         (gimple_fold_builtin_memory_chk): Same.
14837         (gimple_fold_builtin_strcpy): Handle no-warning.
14838         (gimple_fold_builtin_stxcpy_chk): Same.
14839         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14841 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14843         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14844         parameter.  Use it for SFmode.
14845         (rs6000_function_arg_advance_1): Adjust.
14846         (rs6000_function_arg): Adjust.
14847         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14849 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14851         PR rtl-optimization/84169
14852         PR rtl-optimization/84780
14853         * combine.c (can_combine_p): Check for a 2-insn combination whether
14854         the destination register is used between the two insns, too.
14856 2018-03-12  Richard Biener  <rguenther@suse.de>
14858         PR tree-optimization/84803
14859         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14860         for refs DR analysis didn't process.
14862 2018-03-12  Richard Biener  <rguenther@suse.de>
14864         PR tree-optimization/84777
14865         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14866         force-vectorize loops ignore whether we are optimizing for size.
14868 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14870         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14871         (TARGET_MD_ASM_ADJUST): Define.
14873 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14874             Kito Cheng  <kito.cheng@gmail.com>
14875             Chung-Ju Wu  <jasonwucj@gmail.com>
14877         * config/nds32/nds32.c (nds32_compute_stack_frame,
14878         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14879         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14880         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14881         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14882         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14883         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14884         * config/nds32/nds32.md (prologue, epilogue): Use macro
14885         NDS32_V3PUSH_AVAILABLE_P to do checking.
14887 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14889         PR debug/58150
14890         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14891         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14892         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14893         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14894         addition of most attributes on !orig_type_die or the attribute not
14895         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14897 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14898             Chung-Ju Wu  <jasonwucj@gmail.com>
14900         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14901         __NDS32_VH__ macro.
14902         * config/nds32/nds32.opt (mvh): New option.
14904 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14905             Chung-Ju Wu  <jasonwucj@gmail.com>
14907         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14908         function.
14909         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14910         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14911         definition.
14913 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14914             Chung-Ju Wu  <jasonwucj@gmail.com>
14916         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14917         function.
14918         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14919         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14921 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14922             Kito Cheng  <kito.cheng@gmail.com>
14923             Chung-Ju Wu  <jasonwucj@gmail.com>
14925         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14926         UNSPEC_FFMISM and UNSPEC_FLMISM.
14927         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14928         for ffb, ffmism and flmism.
14929         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14930         (unspec_ffmism): Ditto.
14931         (unspec_flmism): Ditto.
14932         (nds32_expand_builtin_impl): Check if string extension is available.
14933         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14934         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14936 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14938         Reverting patch:
14939         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14941         PR target/83712
14942         * lra-assigns.c (assign_by_spills): Return a flag of reload
14943         assignment failure.  Do not process the reload assignment
14944         failures.  Do not spill other reload pseudos if they has the same
14945         reg class.
14946         (lra_assign): Add a return arg.  Set up from the result of
14947         assign_by_spills call.
14948         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14949         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14950         usage_insns if it is not NULL.
14951         (spill_hard_reg_in_range): New function.
14952         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14953         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14954         function prototypes.
14955         (lra_assign): Change prototype.
14956         * lra.c (lra): Add code to deal with fails by splitting hard reg
14957         live ranges.
14959 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14961         PR target/84807
14962         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14964 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14966         PR debug/84620
14967         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14968         (dw_val_node): Add val_symbolic_view.
14969         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14970         (symview_upper_bound): New.
14971         (new_line_info_table): Initialize symviews_since_reset.
14972         (dwarf2out_source_line): Count symviews_since_reset and set
14973         symview_upper_bound.
14974         (dw_val_equal_p): Handle symview.
14975         (add_AT_symview): New.
14976         (print_dw_val): Handle symview.
14977         (attr_checksum, attr_checksum_ordered): Likewise.
14978         (same_dw_val_p, size_of_die): Likewise.
14979         (value_format, output_die): Likewise.
14980         (add_high_low_attributes): Use add_AT_symview for entry_view.
14981         (dwarf2out_finish): Reset symview_upper_bound, clear
14982         zero_view_p.
14984 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14986         PR target/83969
14987         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14988         Add strict argument and use it.
14989         (rs6000_split_multireg_move): Update for new strict argument.
14990         (mem_operand_gpr): Disallow all non-offsettable addresses.
14991         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14993 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14995         PR target/84772
14996         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14997         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14998         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
15000         PR c++/84767
15001         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
15002         decl, use remap_type if we want to use the type.
15004 2018-03-09  Martin Sebor  <msebor@redhat.com>
15006         PR tree-optimization/84526
15007         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
15008         Remove dead code.
15009         (builtin_access::generic_overlap): Be prepared to handle non-array
15010         base objects.
15012 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
15014         PR rtl-optimization/84682
15015         * lra-constraints.c (process_address_1): Check is_address flag
15016         for address constraints.
15017         (process_alt_operands): Likewise.
15018         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
15019         preprocess_constraints.
15020         * recog.h (preprocess_constraints): Add oploc parameter.
15021         Adjust callers.
15022         * recog.c (preprocess_constraints): Test address_operand for
15023         CT_ADDRESS constraints.
15025 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
15027         PR target/83712
15028         * lra-assigns.c (assign_by_spills): Return a flag of reload
15029         assignment failure.  Do not process the reload assignment
15030         failures.  Do not spill other reload pseudos if they has the same
15031         reg class.
15032         (lra_assign): Add a return arg.  Set up from the result of
15033         assign_by_spills call.
15034         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
15035         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
15036         usage_insns if it is not NULL.
15037         (spill_hard_reg_in_range): New function.
15038         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
15039         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
15040         function prototypes.
15041         (lra_assign): Change prototype.
15042         * lra.c (lra): Add code to deal with fails by splitting hard reg
15043         live ranges.
15045 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15047         PR target/83193
15048         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
15049         Accept complain bool parameter.  Only emit errors if it is true.
15050         (arm_parse_cpu_option_name): Likewise.
15051         (arm_target_thumb_only): Adjust callers of the above.
15052         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
15053         prototype to take a default true bool parameter.
15054         (arm_parse_arch_option_name): Likewise.
15056 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
15057             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15059         PR jit/64089
15060         PR jit/84288
15061         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
15062         * configure: Regenerate.
15063         * configure.ac ("linker --version-script option"): New.
15064         ("linker soname option"): New.
15066 2018-03-09  Richard Biener  <rguenther@suse.de>
15068         PR tree-optimization/84775
15069         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
15070         immediate uses of predicate stmts and mark them modified.
15072         Revert
15073         PR tree-optimization/84178
15074         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15075         to caller.
15076         (version_loop_for_if_conversion): Delay update_ssa call.
15077         (tree_if_conversion): Delay update_ssa until after predicate
15078         insertion.
15080 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
15082         PR target/84763
15083         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
15084         when the function accesses prior frames.
15086 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15088         PR debug/84456
15089         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
15090         gen_llsym, otherwise call maybe_gen_llsym.
15092         PR inline-asm/84742
15093         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
15094         has ',' character inside of it.
15096 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15098         PR target/84748
15099         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
15100         as clobbering CC_REGNUM.
15102 2018-03-08  Richard Biener  <rguenther@suse.de>
15104         PR middle-end/84552
15105         * tree-scalar-evolution.c: Include tree-into-ssa.h.
15106         (follow_copies_to_constant): Do not follow SSA names registered
15107         for update.
15109 2018-03-08  Richard Biener  <rguenther@suse.de>
15111         PR tree-optimization/84178
15112         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
15113         to caller.
15114         (version_loop_for_if_conversion): Delay update_ssa call.
15115         (tree_if_conversion): Delay update_ssa until after predicate
15116         insertion.
15118 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15120         PR tree-optimization/84178
15121         * tree-if-conv.c (release_bb_predicate): Remove the
15122         the assertion that the stmts have NULL use_ops.
15123         Discard the statements, asserting that they haven't
15124         yet been added to a BB.
15126 2018-03-08  Richard Biener  <rguenther@suse.de>
15128         PR tree-optimization/84746
15129         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15130         (phi_translate): Pass in destination ANTIC_OUT set.
15131         (phi_translate_1): Likewise.  For a simplified result lookup
15132         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15133         (phi_translate_set): Adjust.
15134         (do_pre_regular_insertion): Likewise.
15135         (do_pre_partial_partial_insertion): Likewise.
15137 2018-03-08  Martin Liska  <mliska@suse.cz>
15139         PR gcov-profile/84735
15140         * doc/gcov.texi: Document usage of profile files.
15141         * gcov-io.h: Document changes in the format.
15143 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15145         PR debug/84404
15146         PR debug/84408
15147         * dwarf2out.c (struct dw_line_info_table): Update comments for
15148         view == -1.
15149         (FORCE_RESET_NEXT_VIEW): New.
15150         (FORCE_RESETTING_VIEW_P): New.
15151         (RESETTING_VIEW_P): Check for -1 too.
15152         (ZERO_VIEW_P): Likewise.
15153         (new_line_info_table): Force-reset next view.
15154         (dwarf2out_begin_function): Likewise.
15155         (dwarf2out_source_line): Simplify zero_view_p initialization.
15156         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15157         view directly.  Omit view when omitting .loc at line 0.
15159 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15161         PR tree-optimization/84740
15162         * tree-switch-conversion.c (process_switch): Call build_constructors
15163         only if info.phi_count is non-zero.
15165         PR tree-optimization/84739
15166         * tree-tailcall.c (find_tail_calls): Check call arguments against
15167         DECL_ARGUMENTS (current_function_decl) rather than
15168         DECL_ARGUMENTS (func) when checking for tail recursion.
15170 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15172         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15173         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15174         Volker Reichelt's entry and add entries for people that perform
15175         GCC fuzzy testing and report numerous bugs.
15177 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15179         PR target/82411
15180         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15181         readonly data in sdata, if that is disabled.
15182         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15183         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15184         -mreadonly-in-sdata option.
15186 2018-03-07  Martin Sebor  <msebor@redhat.com>
15188         PR tree-optimization/84468
15189         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15190         basic block when looking for nul assignment.
15192 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15194         PR target/84277
15195         * except.h (output_function_exception_table): Adjust prototype.
15196         * except.c (output_function_exception_table): Remove FNNAME parameter
15197         and add SECTION parameter.  Ouput one part of the table at a time.
15198         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15199         the first part of the exception table and emit unwind directives.
15200         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15201         (i386_pe_seh_cold_init): Likewise.
15202         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15203         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15204         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15205         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15206         * config/i386/winnt.c: Include except.h.
15207         (struct seh_frame_state): Add reg_offset, after_prologue and
15208         in_cold_section fields.
15209         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15210         (i386_pe_seh_cold_init): New function.
15211         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15212         to seh->in_cold_section.
15213         (seh_emit_push): Record the offset of the push.
15214         (seh_emit_save): Record the offet of the save.
15215         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15216         Test seh->after_prologue to disregard the epilogue.
15217         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15218         (i386_pe_end_cold_function): New function.
15220 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15222         PR fortran/84565
15223         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15224         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15226         PR c++/84704
15227         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15228         on tmp_var.
15229         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15230         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15232         PR middle-end/84723
15233         * multiple_target.c: Include tree-inline.h and intl.h.
15234         (expand_target_clones): Diagnose and fail if node->definition and
15235         !tree_versionable_function_p (node->decl).
15237 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15239         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15240         sprint_ul.
15241         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15242         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15243         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15245 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15247         PR target/84710
15248         * combine.c (try_combine): Use reg_or_subregno instead of handling
15249         just paradoxical SUBREGs and REGs.
15251 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15253         * config/arc/arc.c (arc_finalize_pic): Remove function.
15254         (arc_must_save_register): We use single base PIC register, remove
15255         checks to save/restore the PIC register.
15256         (arc_expand_prologue): Likewise.
15257         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15258         Remove.
15259         (arc_verify_short): Likewise.
15260         (arc_attr_type): Likewise.
15261         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15262         (walk_stores): Likewise.
15263         (arc_address_cost): Make it static.
15264         (arc_verify_short): Likewise.
15265         (branch_dest): Likewise.
15266         (arc_attr_type): Likewise.
15267         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15268         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15269         (arc_final_prescan_insn): Remove inserting the nops due to
15270         hardware hazards.  It is done in reorg step.
15271         (insn_length_variant_t): Remove.
15272         (insn_length_parameters_t): Likewise.
15273         (arc_insn_length_parameters): Likewise.
15274         (arc_get_insn_variants): Likewise.
15275         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15277 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15279         PR inline-asm/84683
15280         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15281         assertion failure.
15283         PR tree-optimization/84687
15284         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15285         on new_node->decl.
15286         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15288 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15290         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15291         Rename to ppc_speculation_barrier.
15292         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15293         __builtin_ppc_speculation_barrier.
15295 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15297         PR target/84700
15298         * combine.c (combine_simplify_rtx): Don't try to simplify if
15299         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15300         are equal to x.
15302 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15304         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15305         to 32 bytes when compiling for POWER9.
15307 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15309         PR target/84564
15310         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15311         regparm >= 3 with no arg reg available also for calls with
15312         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15314         PR target/84524
15315         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15316         orig,vex.
15317         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15319 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15321         PR target/84264
15322         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15324 2018-03-05  Richard Biener  <rguenther@suse.de>
15326         PR tree-optimization/84486
15327         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15328         When inserting a __builtin_assume_aligned call set the LHS
15329         SSA name alignment info accordingly.
15331 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15333         PR tree-optimization/84114
15334         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15335         Avoid reassociation of FLOAT_MODE addition.
15337 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15339         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15340         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15341         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15342         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15343         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15344         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15345         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15346         and -mwbnoinvd.
15347         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15348         __builtin_ia32_wbinvd): New builtins.
15349         (SPECIAL_ARGS2): New.
15350         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15351         (SPECIAL_ARGS2): New.
15352         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15353         (ix86_valid_target_attribute_inner_p): Ditto.
15354         (ix86_init_mmx_sse_builtins): Add special_args2.
15355         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15356         TARGET_WBNOINVD_P): New.
15357         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15358         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15359         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15360         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15361         * config/i386/pconfigintrin.h: New file.
15362         * config/i386/wbnoinvdintrin.h: Ditto.
15363         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15364         wbnoinvdintrin.h.
15365         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15367 2018-03-05  Richard Biener  <rguenther@suse.de>
15369         PR tree-optimization/84670
15370         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15371         member.
15372         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15373         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15374         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15375         doesn't grow if all successors (recursively) were visited at least
15376         once.
15378 2018-03-05  Richard Biener  <rguenther@suse.de>
15380         PR tree-optimization/84650
15381         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15382         if executed in the loop pipeline.
15384 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15386         * doc/configfiles.texi (Configuration Files): Move info about
15387         conditionalizing $target-protos.h to...
15388         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15389         differs from $target-protos.h.
15391 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15392             Chung-Ju Wu  <jasonwucj@gmail.com>
15394         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15395         * config/nds32/nds32-multiple.md (setmemsi): Define.
15396         * config/nds32/nds32-memory-manipulation.c
15397         (nds32_gen_dup_4_byte_to_word_value): New.
15398         (emit_setmem_word_loop): New.
15399         (emit_setmem_byte_loop): New.
15400         (nds32_expand_setmem_loop): New.
15401         (nds32_expand_setmem_loop_v3m): New.
15402         (nds32_expand_setmem_unroll): New.
15403         (nds32_expand_setmem): New.
15405 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15406             Chung-Ju Wu  <jasonwucj@gmail.com>
15408         * config/nds32/nds32-memory-manipulation.c
15409         (nds32_emit_load_store): New.
15410         (nds32_emit_post_inc_load_store): New.
15411         (nds32_emit_mem_move): New.
15412         (nds32_emit_mem_move_block): New.
15413         (nds32_expand_movmemsi_loop_unknown_size): New.
15414         (nds32_expand_movmemsi_loop_known_size): New.
15415         (nds32_expand_movmemsi_loop): New.
15416         (nds32_expand_movmemsi_unroll): New.
15417         (nds32_expand_movmemqi): Rename ...
15418         (nds32_expand_movmemsi): ... to this.
15419         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15420         (movmemsi): ... to this.
15421         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15422         (nds32_expand_movmemsi): ... to this.
15424 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15425             Monk Chiang  <sh.chiang04@gmail.com>
15426             Chung-Ju Wu  <jasonwucj@gmail.com>
15428         * config/nds32/nds32-protos.h
15429         (nds32_expand_load_multiple): New arguments.
15430         (nds32_expand_store_multiple): Ditto.
15431         (nds32_valid_multiple_load_store): Rename ...
15432         (nds32_valid_multiple_load_store_p): ... to this.
15433         * config/nds32/nds32-memory-manipulation.c
15434         (nds32_expand_load_multiple): Refine implementation.
15435         (nds32_expand_store_multiple): Ditto.
15436         * config/nds32/nds32-multiple.md
15437         (load_multiple): Update nds32_expand_load_multiple interface.
15438         (store_multiple): Update nds32_expand_store_multiple interface.
15439         * config/nds32/nds32-predicates.c
15440         (nds32_valid_multiple_load_store): Rename ...
15441         (nds32_valid_multiple_load_store_p): ... to this and refine
15442         implementation.
15443         * config/nds32/predicates.md
15444         (nds32_load_multiple_and_update_address_operation): New predicate.
15445         (nds32_store_multiple_and_update_address_operation): New predicate.
15447 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15448             Chung-Ju Wu  <jasonwucj@gmail.com>
15450         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15451         (combo): New attribute.
15452         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15454 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15456         * config/nds32/nds32.opt: Change -mcmodel= default value.
15458 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15459             Monk Chiang  <sh.chiang04@gmail.com>
15460             Chung-Ju Wu  <jasonwucj@gmail.com>
15462         * config/nds32/constants.md (unspec_element): New enum.
15463         * config/nds32/constraints.md (Umw): New constraint.
15464         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15465         * config/nds32/nds32-intrinsic.md: Likewise.
15466         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15467         (nds32_valid_smw_lwm_base_p): New.
15468         (nds32_output_smw_single_word): New.
15469         (nds32_output_lmw_single_word): New.
15470         (nds32_expand_unaligned_load): New.
15471         (nds32_expand_unaligned_store): New.
15472         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15473         (nds32_output_smw_single_word): Declare.
15474         (nds32_output_lmw_single_word): Declare.
15475         (nds32_expand_unaligned_load): Declare.
15476         (nds32_expand_unaligned_store): Declare.
15477         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15478         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15479         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15480         NDS32_BUILTIN_UASTORE_DW.
15481         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15482         predicate.
15484 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15485             Kito Cheng  <kito.cheng@gmail.com>
15486             Chung-Ju Wu  <jasonwucj@gmail.com>
15488         * config/nds32/nds32-intrinsic.c
15489         (nds32_expand_builtin_null_ftype_reg): Delete.
15490         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15491         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15492         (nds32_read_argument): New.
15493         (nds32_legitimize_target): Ditto.
15494         (nds32_legitimize_argument): Ditto.
15495         (nds32_check_constant_argument): Ditto.
15496         (nds32_expand_unop_builtin): Ditto.
15497         (nds32_expand_unopimm_builtin): Ditto.
15498         (nds32_expand_binop_builtin): Ditto.
15499         (nds32_builtin_decl_impl): Ditto.
15500         (builtin_description): Ditto.
15501         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15502         (nds32_init_builtins_impl): Ditto.
15503         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15504         (nds32_builtin_decl): New.
15505         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15506         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15508 2018-03-02  Jeff Law  <law@redhat.com>
15510         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15511         (redundant_insn, fill_simple_delay_slots): Likewise.
15512         (fill_slots_from_thread): Likewise.
15513         * resource.c (mark_referenced_resources): Likewise.
15514         (mark_set_resources, find_dead_or_set_registers): Likewise.
15516 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15518         * substring-locations.h (format_warning_va): Formatting fix for
15519         ATTRIBUTE_GCC_DIAG.
15520         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15521         argument.
15522         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15523         * substring-locations.c: Include intl.h.
15524         (format_warning_va): Turned into small wrapper around
15525         format_warning_n_va, renamed to ...
15526         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15527         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15528         use ngettext.
15529         (format_warning_at_substring_n): New function.
15530         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15531         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15532         format_warning_at_substring with just a shorter name instead of
15533         const function pointer.
15534         (fmtwarn_n): New function.
15535         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15536         appropriate, get rid of all the fmtstr temporaries, move conditionals
15537         with G_() wrapped string literals directly into fmtwarn arguments,
15538         cast dir.len to (int), formatting fixes.
15540 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15542         * doc/invoke.texi: Remove "Cilk Plus" references.
15544 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15545             Richard Biener  <rguenther@suse.de>
15547         PR ipa/84628
15548         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15549         for error or warning attributes if CALL_FROM_THUNK_P is set.
15550         Formatting fixes.
15552 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15554         PR target/56540
15555         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15556         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15558         PR target/56540
15559         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15560         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15562         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15563         instead of -1U in last predictors element's probability member.
15565 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15567         PR ipa/83983
15568         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15569         arguments if they are comparable.
15571 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15573         PR tree-optimization/84634
15574         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15575         masks and masked_loop_p with a single loop_masks, making sure it's
15576         null for bb vectorization.
15578 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15580         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15581         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15582         loop->force_vectorize to check whether there is no alias.
15584 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15586         PR target/84614
15587         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15588         prototypes.
15589         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15590         comments.
15591         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15592         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15593         instead of a loop around prev_real_insn.
15594         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15595         prev_real_insn.
15597         PR inline-asm/84625
15598         * config/i386/i386.c (ix86_print_operand): Use conditional
15599         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15600         zero vector.
15602 2018-03-02  Richard Biener  <rguenther@suse.de>
15604         PR tree-optimization/84427
15605         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15606         (bitmap_set_subtract_values): Rewrite to handle multiple
15607         exprs per value.
15608         (clean): Likewise.
15609         (prune_clobbered_mems): Likewise.
15610         (phi_translate): Take edge instead of pred/phiblock.
15611         (phi_translate_1): Likewise.
15612         (phi_translate_set): Likewise.  Insert all translated
15613         exprs for a value into the set, keeping possibly multiple
15614         expressions per value.
15615         (compute_antic_aux): Adjust for phi_translate changes.
15616         When intersecting union the expressions and prune those
15617         not in the final value set, keeping possibly multiple
15618         expressions per value.  Do not use value-insertion
15619         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15620         all expressions.  Add verification that the value-sets
15621         only shrink during iteration.
15622         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15623         (do_pre_regular_insertion): Likewise.
15624         (do_pre_partial_partial_insertion): Likewise.
15626 2018-03-02  Richard Biener  <rguenther@suse.de>
15628         PR target/82005
15629         * config/darwin.c (saved_debug_info_level): New static global.
15630         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15631         (darwin_asm_lto_end): Restore debug info generation settings.
15633 2018-03-01  Martin Liska  <mliska@suse.cz>
15635         PR sanitizer/82484
15636         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15637         volatile arguments.
15639 2018-03-01  Richard Biener  <rguenther@suse.de>
15641         PR debug/84645
15642         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15643         type annotation with LTO when debug was disabled at compile-time.
15645 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15647         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15648         XINT with INTVAL.
15649         (mips_final_postscan_insn): Likewise.
15651 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15653         PR rtl-optimization/84528
15654         * alias.c (init_alias_target): Add commentary.
15655         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15656         a unique base value if the frame pointer is not eliminated
15657         to the stack pointer.
15659 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15661         PR rtl-optimization/83327
15662         * lra-int.h (hard_regs_spilled_into): Declare.
15663         * lra.c (hard_regs_spilled_into): Define.
15664         (init_reg_info): Init hard_regs_spilled_into.
15665         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15666         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15667         (process_bb_lives): Handle hard_regs_spilled_into.
15668         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15669         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15671 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15673         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15674         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15675         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15676         * config/rs6000/aix72.h: New file.
15678 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15680         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15681         instead of warning_at with conditional singular and plural messages
15682         where possible.
15684         PR target/52991
15685         * stor-layout.c (update_alignment_for_field): For
15686         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15687         && !DECL_PACKED (field), do the alignment update, just use
15688         only desired_align instead of MAX (type_align, desired_align)
15689         as the alignment.
15690         (place_field): Don't do known_align < desired_align handling
15691         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15692         is non-NULL, instead do it after rli->prev_field handling and
15693         only if not within a bitfield word.  For DECL_PACKED (field)
15694         use type_align of BITS_PER_UNIT.
15696 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15698         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15699         superfluous parentheses and trailing spaces.
15701 2018-02-28  Richard Biener  <rguenther@suse.de>
15703         PR tree-optimization/84584
15704         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15705         SCoPs with fake exit edge.
15707 2018-02-28  Martin Liska  <mliska@suse.cz>
15709         PR testsuite/84597
15710         * timevar.c (timer::print): Fix format to properly print 100%
15711         values.
15713 2018-02-28  Richard Biener  <rguenther@suse.de>
15715         PR middle-end/84607
15716         * genmatch.c (capture_info::walk_match): Do not mark
15717         captured expressions without operands as expr_p given
15718         they act more like predicates and should be subject to
15719         "lost tail" side-effect preserving.
15721 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15723         PR rtl-optimization/81611
15724         * auto-inc-dec.c (attempt_change): Move dead note from
15725         mem_insn if it's the next use of regno
15726         (find_address): Take address use of reg holding
15727         non-incremented value.  Add parm to limit search to the named
15728         reg only.
15729         (merge_in_block): Attempt to use a mem insn that is the next
15730         use of the original regno.
15732 2018-02-27  Martin Sebor  <msebor@redhat.com>
15734         PR c++/83871
15735         * doc/invoke.texi (-Wmissing-attributes): New option.
15736         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15738 2018-02-27  Martin Sebor  <msebor@redhat.com>
15740         PR translation/84207
15741         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15742         n argument to unsigned HOST_WIDE_INT.
15743         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15744         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15745         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15746         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15748 2018-02-27  Richard Biener  <rguenther@suse.de>
15750         PR tree-optimization/84512
15751         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15752         Do not use the estimate returned from record_stmt_cost for
15753         the scalar iteration cost but sum properly using add_stmt_cost.
15755 2018-02-27  Richard Biener  <rguenther@suse.de>
15757         PR tree-optimization/84466
15758         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15759         Adjust last change to less strictly validate use operands.
15761 2018-02-27  Martin Liska  <mliska@suse.cz>
15763         PR gcov-profile/84548
15764         * gcov.c (process_file): Allow partial overlap and consider it
15765         also as group functions.
15766         (output_lines): Properly calculate range of lines for a group.
15768 2018-02-27  Martin Liska  <mliska@suse.cz>
15770         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15771         'ggc' suffixes.  Change first column width.
15772         (timer::print): Fix formatting of the column.
15774 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15776         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15777         preserve inline entry blocks for the sake of debug inline
15778         entry point markers alone.
15779         (remove_unused_locals): Suggest in comments a better place to
15780         force the preservation of inline entry blocks that are
15781         otherwise unused, but do not preserve them.
15783 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15785         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15787 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15789         PR target/84039
15790         * config/i386/constraints.md (Bs): Replace
15791         ix86_indirect_branch_register with
15792         TARGET_INDIRECT_BRANCH_REGISTER.
15793         (Bw): Likewise.
15794         * config/i386/i386.md (indirect_jump): Likewise.
15795         (tablejump): Likewise.
15796         (*sibcall_memory): Likewise.
15797         (*sibcall_value_memory): Likewise.
15798         Peepholes of indirect call and jump via memory: Likewise.
15799         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15800         (*sibcall_value_GOT_32): Likewise.
15801         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15802         (GOT_memory_operand): Likewise.
15803         (call_insn_operand): Likewise.
15804         (sibcall_insn_operand): Likewise.
15805         (GOT32_symbol_operand): Likewise.
15806         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15808 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15810         PR rtl-optimization/83496
15811         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15812         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15813         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15814         redundant insn, if any.
15815         (relax_delay_slots): Likewise.
15816         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15818 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15820         PR tree-optimization/83965
15821         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15822         that grouped statements are part of a reduction chain.  Return
15823         true if the statement is not marked as a reduction itself but
15824         is part of a group.
15825         (vect_recog_dot_prod_pattern): Don't check whether the statement
15826         is part of a group here.
15827         (vect_recog_sad_pattern): Likewise.
15828         (vect_recog_widen_sum_pattern): Likewise.
15830 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15832         PR debug/84545
15833         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15835 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15837         PR target/84530
15838         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15839         the bool argument.
15840         (ix86_output_indirect_function_return): New prototype.
15841         (ix86_split_simple_return_pop_internal): Likewise.
15842         * config/i386/i386.c (indirect_return_via_cx): New.
15843         (indirect_return_via_cx_bnd): Likewise.
15844         (indirect_thunk_name): Handle return va CX_REG.
15845         (output_indirect_thunk_function): Create alias for
15846         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15847         (ix86_output_indirect_jmp): Remove the bool argument.
15848         (ix86_output_indirect_function_return): New function.
15849         (ix86_split_simple_return_pop_internal): Likewise.
15850         * config/i386/i386.md (*indirect_jump): Don't pass false
15851         to ix86_output_indirect_jmp.
15852         (*tablejump_1): Likewise.
15853         (simple_return_pop_internal): Change it to define_insn_and_split.
15854         Call ix86_split_simple_return_pop_internal to split it for
15855         -mfunction-return=.
15856         (simple_return_indirect_internal): Call
15857         ix86_output_indirect_function_return instead of
15858         ix86_output_indirect_jmp.
15860 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15862         PR bootstrap/84405
15863         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15864         memset and value initialization afterwards.
15866 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15868         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15870 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15872         PR target/84521
15873         * common/config/aarch64/aarch64-common.c
15874         (aarch_option_optimization_table[]): Switch
15875         off fomit-frame-pointer
15877 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15878             Chung-Ju Wu  <jasonwucj@gmail.com>
15880         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15881         volatile memory.
15882         (store_multiple): Ditto.
15884 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15886         * config.gcc: Add --with-cpu support for nds32 target.
15887         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15888         * config/nds32/nds32.opt: Add -mcpu= option.
15890 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15892         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15893         isel=yes): Warn for these deprecated options.
15895 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15897         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15898         ISA_2_5_MASKS_EMBEDDED.
15900 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15902         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15903         p->max as pointers rather than using iterative_hash_expr.
15905 2018-02-23  Carl Love  <cel@us.ibm.com>
15907         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15908         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15909         BU_P8V_OVERLOAD_2.
15910         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15911         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15912         P8V_BUILTIN_VEC_VUNSIGNED2.
15914 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15916         PR target/81572
15917         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15918         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15919         LRA_UNKNOWN_ALT.
15920         * lra-constraints.c (curr_insn_transform): Set up
15921         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15922         LRA_UNKNOWN_ALT.
15923         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15924         * lra-eliminations.c (spill_pseudos): Ditto.
15925         (process_insn_for_elimination): Ditto.
15926         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15927         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15928         LRA_NON_CLOBBERED_ALT.
15930 2018-02-22  Martin Sebor  <msebor@redhat.com>
15932         PR tree-optimization/84480
15933         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15934         to maybe_diag_stxncpy_trunc.  Call it.
15935         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15936         from gimple_fold_builtin_strcpy.  Print inlining stack.
15937         (handle_builtin_stxncpy): Print inlining stack.
15938         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15940 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15942         PR target/84176
15943         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15944         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15945         and -fcheck-pointer-bounds are used together.
15946         (indirect_thunk_prefix): New enum.
15947         (indirect_thunk_need_prefix): New function.
15948         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15949         "_nt" instead of "_bnd" for NOTRACK prefix.
15950         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15951         (output_indirect_thunk_function): Likewise.
15952         (): Likewise.
15953         (ix86_code_end): Update output_indirect_thunk_function calls.
15954         (ix86_output_indirect_branch_via_reg): Replace
15955         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15956         (ix86_output_indirect_branch_via_push): Likewise.
15957         (ix86_output_function_return): Likewise.
15958         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15959         incompatible with -fcf-protection=branch and
15960         -fcheck-pointer-bounds.
15962 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15964         PR target/83335
15965         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15966         Change gcc_assert call to output_operand_lossage.
15968 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15970         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15972 2018-02-22  DJ Delorie  <dj@redhat.com>
15973             Sebastian Perta  <sebastian.perta@renesas.com>
15974             Oleg Endo  <olegendo@gcc.gnu.org>
15976         * config/rx/rx.c (rx_rtx_costs): New function.
15977         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15979 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15981         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15983 2018-02-22  Martin Liska  <mliska@suse.cz>
15985         PR driver/83193
15986         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15987         Add "native" as a possible value.
15989 2018-02-22  Martin Liska  <mliska@suse.cz>
15991         PR driver/83193
15992         * config/i386/i386.c (ix86_option_override_internal):
15993         Add "native" as a possible value for -march and -mtune.
15995 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15997         PR target/84502
15998         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15999         to all type variants.
16001         PR tree-optimization/84503
16002         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
16003         width as info->bitpos + info->bitsize - start.
16004         (merged_store_group::merge_overlapping): Simplify width computation.
16005         (check_no_overlap): New function.
16006         (imm_store_chain_info::try_coalesce_bswap): Compute expected
16007         start + width and last_order of the group, fail if check_no_overlap
16008         fails.
16009         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
16010         to group if check_no_overlap fails.
16012 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16014         * config/rs6000/altivec.md: Delete contraint arguments to
16015         define_expand, define_split, and define_peephole2, and in
16016         define_insn_and_split if always unused.
16017         * config/rs6000/darwin.md: Ditto.
16018         * config/rs6000/dfp.md: Ditto.
16019         * config/rs6000/rs6000.md: Ditto.
16020         * config/rs6000/sync.md: Ditto.
16021         * config/rs6000/vector.md: Ditto.
16022         * config/rs6000/vsx.md: Ditto.
16024 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
16026         * config/rs6000/altivec.md: Write output control strings as braced
16027         blocks instead of double-quoted strings.
16028         * config/rs6000/darwin.md: Ditto.
16029         * config/rs6000/rs6000.md: Ditto.
16030         * config/rs6000/vector.md: Ditto.
16031         * config/rs6000/vsx.md: Ditto.
16033 2018-02-21  Jason Merrill  <jason@redhat.com>
16035         PR c++/84314 - ICE with templates and fastcall attribute.
16036         * attribs.c (build_type_attribute_qual_variant): Remove assert.
16038 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16040         * ipa-cp.c (determine_versionability): Fix comment typos.
16042 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
16044         PR c/84229
16045         * ipa-cp.c (determine_versionability): Do not version functions caling
16046         va_arg_pack.
16048 2018-02-21  Martin Liska  <mliska@suse.cz>
16050         PR driver/83193
16051         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
16052         Add "native" as a possible value.
16053         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
16054         the macro when native cpu detection is available.
16056 2018-02-21  Martin Liska  <mliska@suse.cz>
16058         PR driver/83193
16059         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
16060         Add "native" as a possible value.
16061         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
16062         when native cpu detection is available.
16064 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
16065             Martin Sebor  <msebor@redhat.com>
16067         PR tree-optimization/84478
16068         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
16069         false.
16070         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
16071         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
16072         support which is conservatively correct, for 2 only stay conservative
16073         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
16074         argument to the 2 argument get_range_strlen, adjust 6 arg
16075         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
16076         false.
16077         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
16078         (gimple_fold_builtin_strlen): Pass true as last argument to
16079         get_range_strlen.
16081 2018-02-20  Martin Sebor  <msebor@redhat.com>
16083         PR middle-end/84095
16084         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
16085         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
16086         (builtin_memref::builtin_memref): Factor out parts into
16087         set_base_and_offset and call it.
16089 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16091         PR middle-end/84406
16092         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
16093         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
16094         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
16095         search at the associated MODE_INT.
16097 2018-02-20  Jeff Law  <law@redhat.com>
16099         PR middle-end/82123
16100         PR tree-optimization/81592
16101         PR middle-end/79257
16102         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
16103         for range data rather than using global data.
16104         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
16105         range data rather than using global data.
16106         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
16107         pass it to children as needed.
16108         (struct directive::fmtresult): Similarly.
16109         (struct directive::set_width): Similarly.
16110         (struct directive::set_precision): Similarly.
16111         (format_integer, format_directive, parse_directive): Similarly.
16112         (format_none): Accept unnamed vr_values parameter.
16113         (format_percent, format_floating, format_character): Similarly.
16114         (format_string, format_plain): Similarly.
16115         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16116         the EVRP range analyzer for range data rather than using global data.
16117         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16118         gimple-ssa-evrp-analyze.h
16119         (class sprintf_dom_walker): Add after_dom_children member function.
16120         Add evrp_range_analyzer member.
16121         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16122         range analyzer as needed.
16123         (sprintf_dom_walker::after_dom_children): New member function.
16124         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16125         if not optimizing.
16126         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16127         (evrp_range_analyzer::pop_to_marker): Likewise.
16129 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16131         PR tree-optimization/84419
16132         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16133         with the required type if its current type is compatible but
16134         different.
16136 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16138         PR middle-end/82004
16139         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16140         after vectorization.
16142 2018-02-20  Martin Liska  <mliska@suse.cz>
16144         PR driver/83193
16145         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16146         possible values if we don't have a hint.
16148 2018-02-20  Martin Liska  <mliska@suse.cz>
16150         PR c/84310
16151         PR target/79747
16152         * final.c (shorten_branches): Build align_tab array with one
16153         more element.
16154         * opts.c (finish_options): Add alignment option limit check.
16155         (MAX_CODE_ALIGN): Likewise.
16156         (MAX_CODE_ALIGN_VALUE): Likewise.
16157         * doc/invoke.texi: Document maximum allowed option value for
16158         all -falign-* options.
16160 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16162         PR target/84146
16163         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16164         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16165         * var-tracking.c (emit_note_insn_var_location): Remove all references
16166         to NOTE_INSN_CALL_ARG_LOCATION.
16167         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16168         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16169         Use copy_rtx_if_shared.
16170         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16171         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16172         (dwarf2out_var_location): Remove handling of
16173         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16174         on call_insn.
16175         * final.c (final_scan_insn): Remove all references to
16176         NOTE_INSN_CALL_ARG_LOCATION.
16177         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16178         before dumping final insns.
16179         * except.c (emit_note_eh_region_end): Remove all references to
16180         NOTE_INSN_CALL_ARG_LOCATION.
16181         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16182         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16183         * config/arc/arc.c (hwloop_optimize): Likewise.
16184         * config/arm/arm.c (create_fix_barrier): Likewise.
16185         * config/s390/s390.c (s390_chunkify_start): Likewise.
16186         * config/sh/sh.c (find_barrier): Likewise.
16187         * config/i386/i386.c (rest_of_insert_endbranch,
16188         ix86_seh_fixup_eh_fallthru): Likewise.
16189         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16190         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16191         * config/frv/frv.c (frv_function_prologue): Likewise.
16192         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16193         reg note.
16194         (note_outside_basic_block_p): Remove all references to
16195         NOTE_INSN_CALL_ARG_LOCATION.
16196         * gengtype.c (adjust_field_rtx_def): Likewise.
16197         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16198         Likewise.
16199         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16200         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16202         PR c++/84444
16203         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16204         is ADDR_EXPR.
16206         PR tree-optimization/84452
16207         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16208         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16209         is NULL.
16211 2018-02-19  Martin Liska  <mliska@suse.cz>
16213         PR sanitizer/82183
16214         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16216 2018-02-19  Martin Liska  <mliska@suse.cz>
16217             Richard Sandiford  <richard.sandiford@linaro.org>
16219         PR tree-optimization/82491
16220         * gimple-fold.c (get_base_constructor): Make earlier bail out
16221         to prevent ubsan.
16223 2018-02-19  Carl Love  <cel@us.ibm.com>
16225         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16226         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16227         BU_P8V_OVERLOAD_1.
16228         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16229         P8V_BUILTIN_VEC_NEG.
16231 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16233         * config/rl78/rl78.md (movdf): New define expand.
16235 2018-02-19  Martin Liska  <mliska@suse.cz>
16237         PR other/80589
16238         * doc/invoke.texi: Fix typo.
16239         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16241 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16243         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16244         handle rs6000_single_float and rs6000_double_float specially for
16245         e500 family CPUs.
16247 2018-02-16  Jeff Law  <law@redhat.com>
16249         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16250         (pop_regs): Use it.
16252 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16254         PR ipa/84425
16255         * ipa-inline.c (inline_small_functions): Fix a typo.
16257 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16259         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16261 2018-02-16  Carl Love  <cel@us.ibm.com>
16263         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16264         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16265         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16266         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16267         expansion to P8V_BUILTIN_VEC_FLOAT2.
16269 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16271         PR rtl-optimization/70023
16272         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16273         src_regno into account.
16275 2018-02-16  Carl Love  <cel@us.ibm.com>
16277         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16278         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16279         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16280         * config/rs6000/rs6000.c: Remove case statements for
16281         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16282         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16283         and P9V_BUILTIN_VEC_VINSERT4B.
16284         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16285         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16286         * config/rs6000/vsx.md:
16287         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16288         vec_insert4b.
16290 2018-02-16  Carl Love  <cel@us.ibm.com>
16292         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16293         vec_insert4b.
16294         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16295         definitions.
16296         * config/rs6000/rs6000-c.c: Add the definitions for
16297         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16298         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16299         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16300         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16301         definition for insert4b and define insn *insert3b_internal.
16302         * doc/extend.texi: Add documentation for vec_extract4b.
16304 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16306         * doc/extend.texi (Backwards Compatibility): Mention friend
16307         injection.  Note for-scope is deprecated.
16308         * doc/invoke.texi (-ffriend-injection): Deprecate.
16310 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16312         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16313         that moved to I2, also allow destinations that are a paradoxical
16314         subreg (instead of a normal reg).
16316 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16318         PR target/83831
16319         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16320         to QImode.
16322 2018-02-16  Richard Biener  <rguenther@suse.de>
16324         PR tree-optimization/84037
16325         PR tree-optimization/84016
16326         PR target/82862
16327         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16328         Adjust vec_construct for the fact we need additional higher latency
16329         128bit inserts for AVX256 and AVX512 vector builds.
16330         (ix86_add_stmt_cost): Scale vector construction cost for
16331         elementwise loads.
16333 2018-02-16  Richard Biener  <rguenther@suse.de>
16335         PR tree-optimization/84417
16336         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16337         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16338         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16340 2018-02-16  Martin Liska  <mliska@suse.cz>
16342         PR sanitizer/84307
16343         * internal-fn.def (ASAN_CHECK): Set proper flags.
16344         (ASAN_MARK): Likewise.
16346 2018-02-16  Julia Koval  <julia.koval@intel.com>
16348         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16349         from PTA_CANNONLAKE.
16351 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16353         PR target/84272
16354         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16355         Use ++iter rather than iter++ for std::list iterators.
16356         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16357         defer deleting them until all nodes in the forest are processed.  Do
16358         free even leaf nodes.  Change to_process into auto_vec.
16360         PR bootstrap/84405
16361         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16362         * vec.h (vec_default_construct): Use memset instead of placement new
16363         if BROKEN_VALUE_INITIALIZATION is defined.
16364         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16365         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16366         is defined.
16368         PR rtl-optimization/83723
16369         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16370         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16371         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16372         recursive calls.
16373         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16374         callers.
16375         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16377 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16379         PR rtl-optimization/81443
16380         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16381         from inner REGs to paradoxical SUBREGs.
16383 2018-02-16  Richard Biener  <rguenther@suse.de>
16385         PR tree-optimization/84399
16386         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16387         For operands we can analyze at their definition make sure we can
16388         analyze them at each use as well.
16390 2018-02-16  Richard Biener  <rguenther@suse.de>
16392         PR tree-optimization/84190
16393         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16394         volatile accesses if the decl isn't volatile.
16396 2018-02-15  Jason Merrill  <jason@redhat.com>
16398         PR c++/84314 - ICE with templates and fastcall attribute.
16399         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16400         TYPE_CANONICAL on an existing type.
16402 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16404         PR tree-optimization/84383
16405         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16406         dstoff nor call operand_equal_p if dstbase is NULL.
16408         PR tree-optimization/84334
16409         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16410         also a CONSTANT_CLASS_P, punt.
16412 2018-02-14  Jim Wilson  <jimw@sifive.com>
16414         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16415         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16416         to where locals are set.  Add TARGET_RVC support.
16417         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16419 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16421         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16423 2018-02-14  Martin Sebor  <msebor@redhat.com>
16425         PR tree-optimization/83698
16426         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16427         arrays constrain the offset range to their bounds.
16428         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16429         (builtin_access::overlap): Avoid setting the size of overlap if it's
16430         already been set.
16431         (maybe_diag_overlap): Also consider arrays when deciding what values
16432         of offsets to include in diagnostics.
16434 2018-02-14  Martin Sebor  <msebor@redhat.com>
16436         PR c/84108
16437         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16438         that correspond to the kind of a declaration.
16440 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16442         PR target/83984
16443         * config/pa/pa.md: Load address of PIC label using the linkage table
16444         if the label is nonlocal.
16446 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16448         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16449         warning message if user requests -maltivec=be.
16450         * doc/invoke.texi: Document deprecation of -maltivec=be.
16452 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16454         PR target/84220
16455         * config/rs6000/rs6000-c.c: Update definitions for
16456         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16457         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16459 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16461         PR target/84239
16462         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16463         add _get_ssp intrinsics. Remove argument from
16464         __builtin_ia32_rdssp[d|q].
16465         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16466         * config/i386/i386-builtin.def: Remove argument from
16467         __builtin_ia32_rdssp[d|q].
16468         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16469         ix86_expand_special_args_builtin for _rdssp[d|q].
16470         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16471         Clear register before usage.
16472         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16473         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16475 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16477         PR tree-optimization/84357
16478         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16479         operand 1 of an ARRAY_REF too.
16481 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16483         PR target/83831
16484         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16485         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16486         declarations.
16487         (set_of_reg): New struct.
16488         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16489         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16490         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16491         functions.
16492         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16493         Split into bitclr, bitset, bitinvert patterns if appropriate.
16494         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16495         use rx_fuse_in_memory_bitop.
16496         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16497         to named insn, correct maximum insn length.
16499 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16501         PR target/79242
16502         * machmode.def: Define a complex mode for PARTIAL_INT.
16503         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16504         MODE_PARTIAL_INT.
16505         * doc/rtl.texi: Document CSPImode.
16506         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16507         handling.
16508         (msp430_hard_regno_nregs_with_padding): Likewise.
16510 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16512         PR target/84279
16513         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16515 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16517         PR rtl-optimization/84169
16518         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16519         we generated a parallel as new i3 and we split that to new i2 and i3
16520         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16521         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16522         those to i2, not i1.  Partially rewrite this scan code.
16524 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16526         PR c/82210
16527         * stor-layout.c (place_field): For variable length fields, adjust
16528         offset_align afterwards not just based on the field's alignment,
16529         but also on the size.
16531         PR middle-end/84309
16532         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16533         of exps and logs in the use_exp2 case.
16535 2018-02-13  Jeff Law  <law@redhat.com>
16537         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16538         entry for "vector".
16540         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16541         ARGS as unused.
16543 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16545         PR debug/84342
16546         PR debug/84319
16547         * common.opt (gas-loc-support, gas-locview-support): New.
16548         (ginline-points, ginternal-reset-location-views): New.
16549         * doc/invoke.texi: Document them.  Use @itemx where intended.
16550         (gvariable-location-views): Adjust.
16551         * target.def (reset_location_view): New.
16552         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16553         (TARGET_RESET_LOCATION_VIEW): New.
16554         * doc/tm.texi: Rebuilt.
16555         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16556         (dwarf2out_default_as_locview_support): New.
16557         (output_asm_line_debug_info): Use option variables.
16558         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16559         (output_loc_list): Likewise.
16560         (add_high_low_attributes): Check option variables.
16561         Don't output entry view attribute in strict mode.
16562         (gen_inlined_subroutine_die): Check option variables.
16563         (dwarf2out_inline_entry): Likewise.
16564         (init_sections_and_labels): Likewise.
16565         (dwarf2out_early_finish): Likewise.
16566         (maybe_reset_location_view): New, from...
16567         (dwarf2out_var_location): ... here.  Call it.
16568         * debug.h (dwarf2out_default_as_loc_support): Declare.
16569         (dwarf2out_default_as_locview_support): Declare.
16570         * hooks.c (hook_int_rtx_insn_0): New.
16571         * hooks.h (hook_int_rtx_insn_0): Declare.
16572         * toplev.c (process_options): Take -gas-loc-support and
16573         -gas-locview-support from dwarf2out.  Enable
16574         -gvariable-location-views by default only with locview
16575         assembler support.  Enable -ginternal-reset-location-views by
16576         default only if the target defines the corresponding hook.
16577         Enable -ginline-points by default if location views are
16578         enabled; force it disabled if statement frontiers are
16579         disabled.
16580         * tree-inline.c (expand_call_inline): Check option variables.
16581         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16583 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16585         PR tree-optimization/84321
16586         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16587         handling.  Also check whether the anti-range contains any values
16588         that satisfy the mask; switch to a VR_RANGE if not.
16590 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16592         PR sanitizer/84340
16593         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16595 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16597         PR c++/83990
16598         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16599         of call statements, also set location of a load to a temporary.
16601 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16603         * config/rl78/rl78.c (add_vector_labels): New function.
16604         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16605         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16606         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16607         which checks that no arguments are passed.
16608         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16609         * doc/extend.texi: Documentation for the new attribute.
16611 2018-02-13  Andreas Schwab  <schwab@suse.de>
16613         * config/riscv/linux.h (CPP_SPEC): Define.
16615 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16617         PR target/84335
16618         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16619         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16620         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16621         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16622         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16623         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16624         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16625         temporarily for AES and PCLMUL builtins.
16627         PR tree-optimization/84339
16628         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16629         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16630         Formatting fixes.
16632         PR middle-end/84309
16633         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16634         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16635         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16636         inline function.
16637         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16638         inline function.
16639         * omp-simd-clone.h: New file.
16640         * omp-simd-clone.c: Include omp-simd-clone.h.
16641         (expand_simd_clones): No longer static.
16642         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16643         cgraph.h and omp-simd-clone.h.
16644         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16645         (vect_recog_widen_shift_pattern): Formatting fix.
16646         (vect_pattern_recog_1): Don't check optab for calls.
16648         PR target/84336
16649         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16650         operands[2] into a REG before using gen_lowpart on it.
16652 2018-02-12  Jeff Law  <law@redhat.com>
16654         PR target/83760
16655         * config/sh/sh.c (find_barrier): Consider a sibling call
16656         a barrier as well.
16658         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16659         successfully back substituting a reg.
16661 2018-02-12  Richard Biener  <rguenther@suse.de>
16663         PR tree-optimization/84037
16664         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16665         parameter, move visited init to caller.
16666         (vect_slp_analyze_operations): Separate cost from validity
16667         check, initialize visited once for all instances.
16668         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16669         for all instances.
16670         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16671         out an assert.
16672         (vect_model_promotion_demotion_cost): Likewise.
16673         (vectorizable_bswap): Guard cost modeling with !slp_node
16674         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16675         SLP stmts.
16676         (vectorizable_call): Likewise.
16677         (vectorizable_conversion): Likewise.
16678         (vectorizable_assignment): Likewise.
16679         (vectorizable_shift): Likewise.
16680         (vectorizable_operation): Likewise.
16681         (vectorizable_store): Likewise.
16682         (vectorizable_load): Likewise.
16683         (vectorizable_condition): Likewise.
16684         (vectorizable_comparison): Likewise.
16686 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16688         PR sanitizer/84307
16689         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16690         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16691         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16693 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16695         PR middle-end/83665
16696         * params.def (inline-min-speedup): Increase from 8 to 15.
16697         (max-inline-insns-auto): Decrease from 40 to 30.
16698         * ipa-split.c (consider_split): Add some buffer for function to
16699         be considered inlining candidate.
16700         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16701         default values.
16703 2018-02-12  Richard Biener  <rguenther@suse.de>
16705         PR tree-optimization/84037
16706         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16707         matched stmts if we cannot swap the non-matched ones.
16709 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16711         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16712         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16713         _mm_maskz_scalef_round_ss): New intrinsics.
16714         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16715         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16716         __builtin_ia32_scalefss_round): Remove.
16717         (__builtin_ia32_scalefsd_mask_round,
16718         __builtin_ia32_scalefss_mask_round): New intrinsics.
16719         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16720         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16721         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16722         "<round_constraint>")): Changed to ...
16723         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16724         "<round_scalar_constraint>")): ... this.
16725         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16726         %0, %1, %2<round_op3>}"): Changed to ...
16727         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16728         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16729         %2<round_scalar_mask_op3>}"): ... this.
16730         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16732 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16734         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16735         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16736         (_mm_maskz_sqrt_round_ss): New intrinsics.
16737         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16738         (__builtin_ia32_sqrtsd_mask_round)
16739         (__builtin_ia32_sqrtss_mask_round): New builtins.
16740         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16741         (__builtin_ia32_sqrtss_round): Remove.
16742         (__builtin_ia32_sqrtsd_mask_round)
16743         (__builtin_ia32_sqrtss_mask_round): New builtins.
16744         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16745         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16746         ((match_operand:VF_128 1 "vector_operand"
16747         "xBm,<round_constraint>")): Changed to ...
16748         ((match_operand:VF_128 1 "vector_operand"
16749         "xBm,<round_scalar_constraint>")): ... this.
16750         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16751         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16752         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16753         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16754         %<iptr>1<round_scalar_mask_op3>}): ... this.
16755         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16756         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16758 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16760         PR target/84266
16761         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16762         Cast vec_cmpeq result to correct type.
16763         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16764         Cast vec_cmpgt result to correct type.
16766 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16768         * final.c (final_scan_insn_1): Renamed from...
16769         (final_scan_insn): ... this.  New wrapper, to recover
16770         seen from the outermost call in recursive ones.
16771         * config/sparc/sparc.c (output_return): Drop seen from call.
16772         (output_sibcall): Likewise.
16773         * config/visium/visium.c (output_branch): Likewise.
16775 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16777         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16778         function label.
16780 2018-02-10  Alan Modra  <amodra@gmail.com>
16782         PR target/84300
16783         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16784         Specify LR as an input.
16786 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16788         PR sanitizer/83987
16789         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16790         remove_member_access_dummy_vars): New functions.
16791         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16792         lower_omp_1, execute_lower_omp): Use them.
16794         PR rtl-optimization/84308
16795         * shrink-wrap.c (spread_components): Release todo vector.
16797 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16799         PR rtl-optimization/57193
16800         * ira-color.c (struct allocno_color_data): Add member
16801         conflict_allocno_hard_prefs.
16802         (update_conflict_allocno_hard_prefs): New.
16803         (bucket_allocno_compare_func): Add a preference based on
16804         conflict_allocno_hard_prefs.
16805         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16806         (color_allocnos): Remove a dead code.  Initiate
16807         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16809 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16811         PR target/84226
16812         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16813         constraint from =wa to wa.  Avoid a subreg on the output operand,
16814         instead use a pseudo and subreg it in a move.
16815         (p9_xxbrd_<mode>): Changed to ...
16816         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16817         (p9_xxbrd_v2df): New expander.
16818         (p9_xxbrw_<mode>): Changed to ...
16819         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16820         (p9_xxbrw_v4sf): New expander.
16822 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16824         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16826 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16828         PR target/83926
16829         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16830         multiply in 32-bit mode.
16831         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16832         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16833         mode.
16835 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16837         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16838         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16839         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16840         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16842 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16844         PR lto/84213
16845         * dwarf2out.c (is_trivial_indirect_ref): New function.
16846         (dwarf2out_late_global_decl): Do not generate a location
16847         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16848         and that are not defined in the current unit.
16850 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16852         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16853         instead of a libcall for UNORDERED.
16855 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16857         PR target/82641
16858         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16859         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16861 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16863         PR target/PR84295
16864         * config/s390/s390.c (s390_set_current_function): Invoke
16865         s390_indirect_branch_settings also if fndecl didn't change.
16867 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16869         * config/rs6000/rs6000.md (blockage): Set length to zero.
16871 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16873         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16875 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16877         PR sanitizer/84285
16878         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16879         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16880         -static-lib*san.
16882         PR debug/84252
16883         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16884         PARALLEL incoming that failed vt_get_decl_and_offset check.
16886         PR middle-end/84237
16887         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16888         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16889         TREE_READONLY bit.
16890         (get_variable_section): For decls in named .bss* sections pass true as
16891         second argument to bss_initializer_p.
16893 2018-02-09  Marek Polacek  <polacek@redhat.com>
16894             Jakub Jelinek  <jakub@redhat.com>
16896         PR c++/83659
16897         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16898         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16899         Sync some changes from cxx_fold_indirect_ref.
16901 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16903         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16904         markers.
16905         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16906         (BLOCK_INLINE_ENTRY_LABEL): New.
16907         (dwarf2out_var_location): Disregard inline entry markers.
16908         (inline_entry_data): New struct.
16909         (inline_entry_data_hasher): New hashtable type.
16910         (inline_entry_data_hasher::hash): New.
16911         (inline_entry_data_hasher::equal): New.
16912         (inline_entry_data_table): New variable.
16913         (add_high_low_attributes): Add DW_AT_entry_pc and
16914         DW_AT_GNU_entry_view attributes if a pending entry is found
16915         in inline_entry_data_table.  Add old entry_pc attribute only
16916         if debug nonbinding markers are disabled.
16917         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16918         markers are enabled.
16919         (block_within_block_p, dwarf2out_inline_entry): New.
16920         (dwarf2out_finish): Check that no entries remained in
16921         inline_entry_data_table.
16922         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16923         (final_scan_insn, notice_source_line): Likewise.
16924         (rest_of_clean_state): Skip inline entry markers.
16925         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16926         markers.
16927         * gimple.c (gimple_build_debug_inline_entry): New.
16928         * gimple.h (enum gimple_debug_subcode): Add
16929         GIMPLE_DEBUG_INLINE_ENTRY.
16930         (gimple_build_debug_inline_entry): Declare.
16931         (gimple_debug_inline_entry_p): New.
16932         (gimple_debug_nonbind_marker_p): Adjust.
16933         * insn-notes.def (INLINE_ENTRY): New.
16934         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16935         inline entry marker notes.
16936         (print_insn): Likewise.
16937         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16938         (INSN_DEBUG_MARKER_KIND): Likewise.
16939         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16940         * tree-inline.c (expand_call_inline): Build and insert
16941         debug_inline_entry stmt.
16942         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16943         inline entry blocks early, if nonbind markers are enabled.
16944         (dump_scope_block): Dump fragment info.
16945         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16946         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16947         (gimple_build_debug_inline_entry): New.
16948         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16949         Enable/disable inline entry points too.
16950         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16951         (DEBUG_INSN): Describe inline entry markers.
16953         * common.opt (gvariable-location-views): New.
16954         (gvariable-location-views=incompat5): New.
16955         * config.in: Rebuilt.
16956         * configure: Rebuilt.
16957         * configure.ac: Test assembler for view support.
16958         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16959         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16960         * dwarf2out.c (var_loc_view): New typedef.
16961         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16962         (dwarf2out_locviews_in_attribute): New.
16963         (dwarf2out_locviews_in_loclist): New.
16964         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16965         (enum dw_line_info_opcode): Add LI_adv_address.
16966         (struct dw_line_info_table): Add view.
16967         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16968         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16969         (zero_view_p): New variable.
16970         (ZERO_VIEW_P): New macro.
16971         (output_asm_line_debug_info): New.
16972         (struct var_loc_node): Add view.
16973         (add_AT_view_list, AT_loc_list): New.
16974         (add_var_loc_to_decl): Add view param.  Test it against last.
16975         (new_loc_list): Add view params.  Record them.
16976         (AT_loc_list_ptr): Handle loc and view lists.
16977         (view_list_to_loc_list_val_node): New.
16978         (print_dw_val): Handle dw_val_class_view_list.
16979         (size_of_die): Likewise.
16980         (value_format): Likewise.
16981         (loc_list_has_views): New.
16982         (gen_llsym): Set vl_symbol too.
16983         (maybe_gen_llsym, skip_loc_list_entry): New.
16984         (dwarf2out_maybe_output_loclist_view_pair): New.
16985         (output_loc_list): Output view list or entries too.
16986         (output_view_list_offset): New.
16987         (output_die): Handle dw_val_class_view_list.
16988         (output_dwarf_version): New.
16989         (output_compilation_unit_header): Use it.
16990         (output_skeleton_debug_sections): Likewise.
16991         (output_rnglists, output_line_info): Likewise.
16992         (output_pubnames, output_aranges): Update version comments.
16993         (output_one_line_info_table): Output view numbers in asm comments.
16994         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16995         Call maybe_gen_llsym.
16996         (loc_list_from_tree_1): Adjust.
16997         (add_AT_location_description): Create view list attribute if
16998         needed, check it's absent otherwise.
16999         (convert_cfa_to_fb_loc_list): Adjust.
17000         (maybe_emit_file): Call output_asm_line_debug_info for test.
17001         (dwarf2out_var_location): Reset views as needed.  Precompute
17002         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
17003         attribute.  Set view.
17004         (new_line_info_table): Reset next view.
17005         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
17006         (dwarf2out_source_line): Likewise.  Output view resets and labels to
17007         the assembler, or select appropriate line info opcodes.
17008         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
17009         (optimize_string_length): Catch it.  Adjust.
17010         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
17011         dw_val_class_view_list, and remove it if no longer needed.
17012         (hash_loc_list): Hash view numbers.
17013         (loc_list_hasher::equal): Compare them.
17014         (optimize_location_lists): Check whether a view list symbol is
17015         needed, and whether the locview attribute is present, and
17016         whether they match.  Remove the locview attribute if no longer
17017         needed.
17018         (index_location_lists): Call skip_loc_list_entry for test.
17019         (dwarf2out_finish): Call output_asm_line_debug_info for test.
17020         Use output_dwarf_version.
17021         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
17022         (struct dw_val_node): Add val_view_list.
17023         * final.c (SEEN_NEXT_VIEW): New.
17024         (set_next_view_needed): New.
17025         (clear_next_view_needed): New.
17026         (maybe_output_next_view): New.
17027         (final_start_function): Rename to...
17028         (final_start_function_1): ... this.  Take pointer to FIRST,
17029         add SEEN parameter.  Emit param bindings in the initial view.
17030         (final_start_function): Reintroduce SEEN-less interface.
17031         (final): Rename to...
17032         (final_1): ... this.  Take SEEN parameter.  Output final pending
17033         next view at the end.
17034         (final): Reintroduce seen-less interface.
17035         (final_scan_insn): Output pending next view before switching
17036         sections or ending a block.  Mark the next view as needed when
17037         outputting variable locations.  Notify debug backend of section
17038         changes, and of location view changes.
17039         (rest_of_handle_final): Adjust.
17040         * toplev.c (process_options): Autodetect value for debug variable
17041         location views option.  Warn on incompat5 without -gdwarf-5.
17042         * doc/invoke.texi (gvariable-location-views): New.
17043         (gvariable-location-views=incompat5): New.
17044         (gno-variable-location-views): New.
17046 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
17048         PR tree-optimization/84136
17049         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
17050         that the result of find_edge is non-NULL.
17052 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17054         PR target/83008
17055         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
17056         storing integer register in SImode.  Fix cost of 256 and 512
17057         byte aligned SSE register store.
17059 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
17061         * config/i386/i386.c (ix86_multiplication_cost): Fix
17062         multiplication cost for TARGET_AVX512DQ.
17064 2018-02-08  Marek Polacek  <polacek@redhat.com>
17066         PR tree-optimization/84238
17067         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
17068         get_range_strlen.
17070 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17072         PR tree-optimization/84265
17073         * tree-vect-stmts.c (vectorizable_store): Don't treat
17074         VMAT_CONTIGUOUS accesses as grouped.
17075         (vectorizable_load): Likewise.
17077 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17079         PR tree-optimization/81635
17080         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
17081         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
17082         (test_round_for_mask): New functions.
17083         (wide_int_cc_tests): Call test_round_for_mask.
17084         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
17085         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
17086         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
17087         range returned by get_range_info.
17089 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
17091         PR ipa/81360
17092         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
17093         * symtab.c: Include builtins.h
17094         (symtab_node::output_to_lto_symbol_table_p): Move here
17095         from lto-streamer-out.c:output_symbol_p.
17096         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
17097         (output_symbol_p): Move all logic to symtab.c
17098         (produce_symtab): Update.
17100 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17102         * config/s390/s390-opts.h (enum indirect_branch): Define.
17103         * config/s390/s390-protos.h (s390_return_addr_from_memory)
17104         (s390_indirect_branch_via_thunk)
17105         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
17106         (enum s390_indirect_branch_type): Define.
17107         * config/s390/s390.c (struct s390_frame_layout, struct
17108         machine_function): Remove.
17109         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
17110         (indirect_branch_table_label_no, indirect_branch_table_name):
17111         Define variables.
17112         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
17113         (enum s390_indirect_branch_option): Define.
17114         (s390_return_addr_from_memory): New function.
17115         (s390_handle_string_attribute): New function.
17116         (s390_attribute_table): Add new attribute handler.
17117         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17118         (s390_indirect_branch_via_thunk): New function.
17119         (s390_indirect_branch_via_inline_thunk): New function.
17120         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17121         sibling call optimization for non z10 compiles.
17122         (s390_emit_call): Force indirect branch target to be a single
17123         register.  Add r1 clobber for non-z10 compiles.
17124         (s390_emit_epilogue): Emit return jump via return_use expander.
17125         (s390_reorg): Handle JUMP_INSNs as execute targets.
17126         (s390_option_override_internal): Perform validity checks for the
17127         new command line options.
17128         (s390_indirect_branch_attrvalue): New function.
17129         (s390_indirect_branch_settings): New function.
17130         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17131         (s390_output_indirect_thunk_function):  New function.
17132         (s390_code_end): Implement target hook.
17133         (s390_case_values_threshold): Implement target hook.
17134         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17135         macros.
17136         * config/s390/s390.h (struct s390_frame_layout)
17137         (struct machine_function): Move here from s390.c.
17138         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17139         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17140         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17141         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17142         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17143         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17144         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17145         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17146         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17147         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17148         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17149         (mnemonic attribute): Add values which aren't recognized
17150         automatically.
17151         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17152         pattern for branch conversion.  Fix mnemonic attribute.
17153         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17154         indirect branch via thunk if requested.
17155         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17156         ("*indirect_jump"): Disable for branch conversion using out of
17157         line thunks.
17158         ("indirect_jump_via_thunk<mode>_z10")
17159         ("indirect_jump_via_thunk<mode>")
17160         ("indirect_jump_via_inlinethunk<mode>_z10")
17161         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17162         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17163         ("casesi_jump_via_inlinethunk<mode>_z10")
17164         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17165         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17166         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17167         ("*indirect2_jump"): Disable for branch conversion.
17168         ("casesi_jump"): Turn into expander and expand patterns for branch
17169         conversion.
17170         ("return_use"): New expander.
17171         ("*return"): Emit return via thunk and rename it to ...
17172         ("*return<mode>"): ... this one.
17173         * config/s390/s390.opt: Add new options and and enum for the
17174         option values.
17176 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17178         * lra-constraints.c (match_reload): Unconditionally use
17179         gen_lowpart_SUBREG, rather than selecting between that
17180         and equivalent gen_rtx_SUBREG code.
17182 2018-02-08  Richard Biener  <rguenther@suse.de>
17184         PR tree-optimization/84233
17185         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17186         changed flag instead of boguously re-using phi_inserted.
17188 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17190         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17191         static local variables.
17193 2018-02-08  Richard Biener  <rguenther@suse.de>
17195         PR tree-optimization/84278
17196         * tree-vect-stmts.c (vectorizable_store): When looking for
17197         smaller vector types to perform grouped strided loads/stores
17198         make sure the mode is supported by the target.
17199         (vectorizable_load): Likewise.
17201 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17203         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17204         Increase LDP/STP opportunities by adding adjacent callee-saves.
17206 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17208         PR rtl-optimization/84068
17209         PR rtl-optimization/83459
17210         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17212 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17214         PR tree-optimization/84224
17215         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17216         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17217         non-zero arguments.
17219 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17221         PR target/84113
17222         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17223         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17224         count, remove one USE.
17226 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17228         * doc/install.texi (Configuration): Document the
17229         --with-long-double-format={ibm,ieee} PowerPC configuration
17230         options.
17232         PR target/84154
17233         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17234         Convert from define_expand to be define_insn_and_split.  Rework
17235         float/double/_Float128 conversions to QI/HI/SImode to work with
17236         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17237         conversions to QI/HImode types did a store and then a load to
17238         truncate the value.  For conversions to VSX registers, don't split
17239         the insn, instead emit the code directly.  Use the code iterator
17240         any_fix to combine signed and unsigned conversions.
17241         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17242         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17243         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17244         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17245         (fix_<mode>di2_hw): Likewise.
17246         (fixuns_<mode>di2_hw): Likewise.
17247         (fix_<mode>si2_hw): Likewise.
17248         (fixuns_<mode>si2_hw): Likewise.
17249         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17250         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17251         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17252         fix<uns>_trunc<SFDF:mode>si2_p8.
17253         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17254         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17255         (fix<uns>_<mode>_mem): Likewise.
17256         (fctiw<u>z_<mode>_mem): Likewise.
17257         (fix<uns>_<mode>_mem): Likewise.
17258         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17259         the register allocator from doing a direct move to the GPRs to do
17260         a store, and instead use the ISA 3.0 store byte/half-word from
17261         vector register instruction.  For IEEE 128-bit floating point,
17262         also optimize stores of 32-bit ints.
17263         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17265 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17267         * genextract.c (push_pathstr_operand): New function to support
17268         [a-zA-Z].
17269         (walk_rtx): Call push_pathstr_operand.
17270         (print_path): Support [a-zA-Z].
17272 2018-02-07  Richard Biener  <rguenther@suse.de>
17274         PR tree-optimization/84037
17275         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17276         (cse_and_gimplify_to_preheader): Declare.
17277         (vect_get_place_in_interleaving_chain): Likewise.
17278         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17279         ivexpr_map.
17280         (_loop_vec_info::~_loop_vec_info): Delete it.
17281         (cse_and_gimplify_to_preheader): New function.
17282         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17283         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17284         (vectorizable_load): Likewise.  For grouped stores always base
17285         the IV on the first element.
17286         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17287         condition before gimplifying.
17289 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17291         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17292         *DIV_EXPR and *MOD_EXPR.
17294 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17296         PR target/84248
17297         * config/i386/i386.c (ix86_option_override_internal): Mask out
17298         the CF_SET bit when checking -fcf-protection.
17300 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17302         PR libgomp/84217
17303         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17304         enough.
17306 2018-02-07  Richard Biener  <rguenther@suse.de>
17308         PR tree-optimization/84204
17309         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17310         this place.
17312         PR tree-optimization/84205
17313         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17314         special-case isl_ast_op_zdiv_r.
17316         PR tree-optimization/84223
17317         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17318         Only add conditions from within the region.
17319         (gather_bbs::after_dom_children): Adjust.
17321 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17323         PR target/84209
17324         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17325         * config/avr/avr.md: Only post-reload split REG-REG moves if
17326         either register is GENERAL_REG_P.
17328 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17330         PR tree-optimization/84235
17331         * tree-ssa-scopedtables.c
17332         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17333         if the subtraction is performed in floating point type where NaNs are
17334         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17335         build 1.  Formatting fix.
17337 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17339         PR target/84146
17340         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17341         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17342         and skip it regardless of bb boundaries.  Use CALL_P macro,
17343         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17344         unnecessarily, formatting fix.
17346 2018-02-06  Michael Collison  <michael.collison@arm.com>
17348         * config/arm/thumb2.md:
17349         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17350         (*thumb_mov_notscc): Ditto.
17352 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17354         PR target/84154
17355         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17356         unsigned_fix, not "s".
17358 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17360         * configure.ac (gcc_fn_eh_frame_ro): New function.
17361         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17362         correct .eh_frame permissions.
17363         * configure: Regenerate.
17365 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17367         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17368         irrelevant options.
17370 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17372         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17373         Display warning message for -mno-speculate-indirect-jumps.
17375 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17377         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17378         Undocumented.
17379         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17381 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17383         PR tree-optimization/84225
17384         * tree-eh.c (find_trapping_overflow): Only call
17385         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17387 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17389         PR target/84145
17390         * config/i386/i386.c: Reimplement the check of possible options
17391         -mibt/-mshstk conbination. Change error messages.
17392         * doc/invoke.texi: Fix a typo: remove extra '='.
17394 2018-02-06  Marek Polacek  <polacek@redhat.com>
17396         PR tree-optimization/84228
17397         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17399 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17401         PR target/82641
17402         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17403         emitted arch directives.
17404         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17405         __ARM_FEATURE_COPROC before changing architectures.
17407 2018-02-06  Richard Biener  <rguenther@suse.de>
17409         * config/i386/i386.c (print_reg): Fix typo.
17410         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17412 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17414         * configure: Regenerate.
17416 2018-02-05  Martin Sebor  <msebor@redhat.com>
17418         PR tree-optimization/83369
17419         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17420         inlining context.
17422 2018-02-05  Martin Liska  <mliska@suse.cz>
17424         * doc/invoke.texi: Cherry-pick upstream r323995.
17426 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17428         * ira.c (ira_init_register_move_cost): Adjust comment.
17430 2018-02-05  Martin Liska  <mliska@suse.cz>
17432         PR gcov-profile/84137
17433         * doc/gcov.texi: Fix typo in documentation.
17435 2018-02-05  Martin Liska  <mliska@suse.cz>
17437         PR gcov-profile/83879
17438         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17439         using dlopen functionality.
17441 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17443         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17444         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17445         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17446         _mm_maskz_range_round_ss): New intrinsics.
17447         (__builtin_ia32_rangesd128_round)
17448         (__builtin_ia32_rangess128_round): Remove.
17449         (__builtin_ia32_rangesd128_mask_round,
17450         __builtin_ia32_rangess128_mask_round): New builtins.
17451         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17452         __builtin_ia32_rangess128_round): Remove.
17453         (__builtin_ia32_rangesd128_mask_round,
17454         __builtin_ia32_rangess128_mask_round): New builtins.
17455         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17456         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17457         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17458         "<round_saeonly_constraint>")): Changed to ...
17459         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17460         "<round_saeonly_scalar_constraint>")): ... this.
17461         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17462         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17463         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17464         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17465         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17467 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17469         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17470         options.
17471         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17472         Remove all values except native, 8540 and 8548.
17474 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17476         * config/i386/i386.c (ix86_output_function_return): Pass
17477         INVALID_REGNUM, instead of -1, as invalid register number to
17478         indirect_thunk_name and output_indirect_thunk.
17480 2018-02-02  Julia Koval  <julia.koval@intel.com>
17482         * config.gcc: Add -march=icelake.
17483         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17484         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17485         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17486         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17487         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17488         (processor_target_table): Add icelake.
17489         (ix86_option_override_internal): Handle new PTAs.
17490         (get_builtin_code_for_version): Handle icelake.
17491         (M_INTEL_COREI7_ICELAKE): New.
17492         (fold_builtin_cpu): Handle icelake.
17493         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17494         * doc/invoke.texi: Add -march=icelake.
17496 2018-02-02  Julia Koval  <julia.koval@intel.com>
17498         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17499         to wide_int_bitmask.
17500         * wide-int-bitmask.h: New.
17502 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17504         PR target/84066
17505         * config/i386/i386.md: Replace Pmode with word_mode in
17506         builtin_setjmp_setup and builtin_longjmp to support x32.
17508 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17510         PR target/56010
17511         PR target/83743
17512         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17513         #include "opts.h".
17514         (rs6000_supported_cpu_names): New static variable.
17515         (linux_cpu_translation_table): Likewise.
17516         (elf_platform) <cpu>: Define new static variable and use it.
17517         Translate kernel AT_PLATFORM name to canonical name if needed.
17518         Error if platform name is unknown.
17520 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17522         PR target/84089
17523         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17525 2018-02-01  Jeff Law  <law@redhat.com>
17527         PR target/84128
17528         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17529         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17530         the scratch if RELEASE_VIA_POP is false.
17531         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17532         If we have to save a temporary register, decrement SIZE appropriately.
17533         Pass new arguments to release_scratch_register_on_entry.
17534         (ix86_adjust_stack_and_probe): Likewise.
17535         (ix86_emit_probe_stack_range): Pass new arguments to
17536         release_scratch_register_on_entry.
17538 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17540         PR rtl-optimization/84157
17541         * combine.c (change_zero_ext): Use REG_P predicate in
17542         front of HARD_REGISTER_P predicate.
17544 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17546         * config/avr/avr.c (avr_option_override): Move disabling of
17547         -fdelete-null-pointer-checks to...
17548         * common/config/avr/avr-common.c (avr_option_optimization_table):
17549         ...here.
17551 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17553         PR tree-optimization/81635
17554         * tree-data-ref.c (split_constant_offset_1): For types that
17555         wrap on overflow, try to use range info to prove that wrapping
17556         cannot occur.
17558 2018-02-01  Renlin Li  <renlin.li@arm.com>
17560         PR target/83370
17561         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17562         TAILCALL_ADDR_REGS.
17563         (aarch64_register_move_cost): Likewise.
17564         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17565         TAILCALL_ADDR_REGS.
17566         (REG_CLASS_NAMES): Likewise.
17567         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17568         TAILCALL_ADDR_REGS. Remove IP registers.
17569         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17571 2018-02-01  Richard Biener  <rguenther@suse.de>
17573         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17574         for specifying RPO order and allow NULL for that.
17575         * domwalk.c (dom_walker::dom_walker): Likewise.
17576         (dom_walker::walk): Handle NULL RPO order.
17577         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17578         in RPO order.
17579         (rewrite_update_dom_walker): Likewise.
17580         (mark_def_dom_walker): Likewise.
17582 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17584         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17585         (aarch64_maybe_expand_sve_subreg_move): Declare.
17586         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17587         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17588         predicate.
17589         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17590         that are semantically a reverse operation.
17591         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17592         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17593         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17594         functions.
17595         (aarch64_can_change_mode_class): For big-endian, forbid changes
17596         between two SVE modes if they have different element sizes.
17598 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17600         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17601         the TImode handling for big-endian targets.
17603 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17605         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17606         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17607         not just bytes.
17608         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17609         Remove BSWAP handing for big-endian targets and use the form of
17610         LD1RQ appropariate for the mode.
17612 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17614         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17615         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17616         duplicated element.
17618 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17620         PR tearget/83845
17621         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17622         check for operands that need to go through aarch64_sve_reload_be.
17624 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17626         PR tree-optimization/81661
17627         PR tree-optimization/84117
17628         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17629         * tree-eh.c: Include gimplify.h.
17630         (find_trapping_overflow, replace_trapping_overflow,
17631         rewrite_to_non_trapping_overflow): New functions.
17632         * tree-vect-loop.c: Include tree-eh.h.
17633         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17634         * tree-data-ref.c: Include tree-eh.h.
17635         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17637 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17639         PR rtl-optimization/84123
17640         * combine.c (change_zero_ext): Check if hard register satisfies
17641         can_change_dest_mode before calling gen_lowpart_SUBREG.
17643 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17645         PR target/82444
17646         * ira.c (ira_init_register_move_cost): Remove assert.
17648 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17650         PR rtl-optimization/84071
17651         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17652         * doc/tm.texi: Regenerate.
17654 2018-01-31  Richard Biener  <rguenther@suse.de>
17656         PR tree-optimization/84132
17657         * tree-data-ref.c (analyze_miv_subscript): Properly
17658         check whether evolution_function_is_affine_multivariate_p
17659         before calling gcd_of_steps_may_divide_p.
17661 2018-01-31  Julia Koval  <julia.koval@intel.com>
17663         PR target/83618
17664         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17665         * config/i386/i386.md (rdpid_rex64) New.
17666         (rdpid): Make 32bit only.
17668 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17670         PR lto/84105
17671         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17672         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17674 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17676         Revert
17677         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17679         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17681 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17683         PR rtl-optimization/84071
17684         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17685         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17687 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17689         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17690         (arc_attribute_table): Add 'aux' attribute.
17691         (arc_in_small_data_p): Consider aux like variables.
17692         (arc_is_aux_reg_p): New function.
17693         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17694         (arc_get_aux_arg): New function.
17695         (prepare_move_operands): Handle aux-register access.
17696         (arc_handle_aux_attribute): New function.
17697         * doc/extend.texi (ARC Variable attributes): Add subsection.
17699 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17701         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17702         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17703         (arc_attribute_table): Add 'uncached' attribute.
17704         (arc_print_operand): Print '.di' flag for uncached memory
17705         accesses.
17706         (arc_in_small_data_p): Do not consider for small data the uncached
17707         types.
17708         (arc_is_uncached_mem_p): New function.
17709         * config/arc/predicates.md (compact_store_memory_operand): Check
17710         for uncached memory accesses.
17711         (nonvol_nonimm_operand): Likewise.
17712         * doc/extend.texi (ARC Type Attribute): New subsection.
17714 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17716         PR c/84100
17717         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17718         falign-loops=): Add Optimization flag.
17720 2018-01-30  Jeff Law  <law@redhat.com>
17722         PR target/84064
17723         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17724         INT_REGISTERS_SAVED.  Check it prior to calling
17725         get_scratch_register_on_entry.
17726         (ix86_adjust_stack_and_probe): Similarly.
17727         (ix86_emit_probe_stack_range): Similarly.
17728         (ix86_expand_prologue): Corresponding changes.
17730 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17732         PR target/40411
17733         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17734         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17736 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17738         PR target/84112
17739         * lra-constraints.c (curr_insn_transform): Process AND in the
17740         address.
17742 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17744         PR rtl-optimization/83986
17745         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17746         dependence against last_pending_memory_flush in addition to
17747         pending_jump_insns.
17749 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17751         PR tree-optimization/81611
17752         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17753         copies.
17755 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17757         PR target/83758
17758         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17759         a reg rtx.
17761 2018-01-30  Richard Biener  <rguenther@suse.de>
17762             Jakub Jelinek  <jakub@redhat.com>
17764         PR tree-optimization/84111
17765         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17766         inner loops added during recursion, as they don't have up-to-date
17767         SSA form.
17769 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17771         PR ipa/81360
17772         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17773         (can_inline_edge_by_limits_p): ... here.
17774         (can_early_inline_edge_p, check_callers,
17775         update_caller_keys, update_callee_keys, recursive_inlining,
17776         add_new_edges_to_heap, speculation_useful_p,
17777         inline_small_functions,
17778         inline_small_functions, flatten_function,
17779         inline_to_all_callers_1): Update.
17781 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17783         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17784         zeros correctly.
17786 2018-01-30  Richard Biener  <rguenther@suse.de>
17788         PR tree-optimization/83008
17789         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17790         invariant and constant vector uses in stmts when they need
17791         more than one stmt.
17793 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17795         PR bootstrap/84017
17796         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17797         * configure: Regenerate.
17799 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17801         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17802         pattern.
17803         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17804         Use gen_rtx_REG rather than gen_lowpart.
17806 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17808         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17809         rather than 0 when creating partial subregs.
17811 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17813         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17814         of usage.
17816 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17818         PR target/81550
17819         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17820         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17821         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17822         flags.  This restores the settings used before the 2017-07-24.
17823         Turning off pre increment/decrement/modify allows IVOPTS to
17824         optimize DF/SF loops where the index is an int.
17826 2018-01-29  Richard Biener  <rguenther@suse.de>
17827             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17829         PR bootstrap/80867
17830         * tree-vect-stmts.c (vectorizable_call): Don't call
17831         targetm.vectorize_builtin_md_vectorized_function if callee is
17832         NULL.
17834 2018-01-22  Carl Love  <cel@us.ibm.com>
17836         * doc/extend.tex: Fix typo in second arg in
17837         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17839 2018-01-29  Richard Biener  <rguenther@suse.de>
17841         PR tree-optimization/84086
17842         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17843         (flush_ssaname_freelist): When SSA names were released reset
17844         the SCEV hash table.
17846 2018-01-29  Richard Biener  <rguenther@suse.de>
17848         PR tree-optimization/84057
17849         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17850         removed paths when removing edges.
17852 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17854         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17855         -mfunction-return=@var{choice}.
17857 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17859         PR diagnostic/84034
17860         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17861         Handle CR like TAB.
17862         (layout::print_source_line): Likewise.
17863         (test_get_line_width_without_trailing_whitespace): Add test cases.
17865 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17867         PR middle-end/84040
17868         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17869         debug insns.
17871 2018-01-26  Jim Wilson  <jimw@sifive.com>
17873         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17875         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17876         specified.
17878 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17880         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17881         and CMP + SUB-immediate -> SUBS.
17883 2018-01-26  Martin Sebor  <msebor@redhat.com>
17885         PR tree-optimization/83896
17886         * tree-ssa-strlen.c (get_string_len): Rename...
17887         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17888         Avoid assuming length is constant.
17889         (handle_char_store): Use HOST_WIDE_INT for string length.
17891 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17893         PR target/81763
17894         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17895         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17897 2018-01-26  Richard Biener  <rguenther@suse.de>
17899         PR rtl-optimization/84003
17900         * dse.c (record_store): Only record redundant stores when
17901         the earlier store aliases at least all accesses the later one does.
17903 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17905         PR rtl-optimization/83985
17906         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17907         REG_CFA_RESTORE insns.
17908         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17909         REG_CFA_RESTORE insns here.
17911         PR c/83989
17912         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17913         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17915 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17917         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17918         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17919         (arc_init): Likewise.
17920         (arc_override_options): Likewise.
17921         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17922         value.
17923         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17924         support.
17925         * config/arc/arc.h (TARGET_DBNZ): Define.
17926         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17927         properly set the tune attribute.
17928         (dbnz): Use TARGET_DBNZ guard.
17929         * config/arc/arc.opt (mtune): Add core3 option.
17931 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17933         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17934         recognize new pic like addresses.
17935         (arc_delegitimize_address): Clean up.
17937 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17939         * config/arc/arc-arches.def: Option mrf16 valid for all
17940         architectures.
17941         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17942         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17943         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17944         * config/arc/arc-tables.opt: Regenerate.
17945         * config/arc/arc.c (arc_conditional_register_usage): Handle
17946         reduced register file case.
17947         (arc_file_start): Set must have build attributes.
17948         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17949         mrf16 option value.
17950         * config/arc/arc.opt (mrf16): Add new option.
17951         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17952         * config/arc/genmultilib.awk: Handle new mrf16 option.
17953         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17954         * config/arc/t-multilib: Regenerate.
17955         * doc/invoke.texi (ARC Options): Document mrf16 option.
17957 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17959         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17960         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17961         (arc_attribute_table): Add 'secure_call' attribute.
17962         (arc_print_operand): Print secure call operand.
17963         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17964         secure.
17965         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17966         (call_i): Add support for sjli instruction.
17967         (call_value_i): Likewise.
17968         * config/arc/constraints.md (Csc): New constraint.
17970 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17971             John Eric Martin  <John.Martin@emmicro-us.com>
17973         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17974         * config/arc/arc.c (_arc_jli_section): New struct.
17975         (arc_jli_section): New type.
17976         (rc_jli_sections): New static variable.
17977         (arc_handle_jli_attribute): New function.
17978         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17979         (arc_file_end): New function.
17980         (TARGET_ASM_FILE_END): Define.
17981         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17982         (arc_add_jli_section): New function.
17983         (jli_call_scan): Likewise.
17984         (arc_reorg): Call jli_call_scan.
17985         (arc_output_addsi): Remove 'S' from printing asm operand.
17986         (arc_is_jli_call_p): New function.
17987         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17988         operand.
17989         (movhi_insn): Likewise.
17990         (movsi_insn): Likewise.
17991         (movsi_set_cc_insn): Likewise.
17992         (loadqi_update): Likewise.
17993         (load_zeroextendqisi_update): Likewise.
17994         (load_signextendqisi_update): Likewise.
17995         (loadhi_update): Likewise.
17996         (load_zeroextendhisi_update): Likewise.
17997         (load_signextendhisi_update): Likewise.
17998         (loadsi_update): Likewise.
17999         (loadsf_update): Likewise.
18000         (movsicc_insn): Likewise.
18001         (bset_insn): Likewise.
18002         (bxor_insn): Likewise.
18003         (bclr_insn): Likewise.
18004         (bmsk_insn): Likewise.
18005         (bicsi3_insn): Likewise.
18006         (cmpsi_cc_c_insn): Likewise.
18007         (movsi_ne): Likewise.
18008         (movsi_cond_exec): Likewise.
18009         (clrsbsi2): Likewise.
18010         (norm_f): Likewise.
18011         (normw): Likewise.
18012         (swap): Likewise.
18013         (divaw): Likewise.
18014         (flag): Likewise.
18015         (sr): Likewise.
18016         (kflag): Likewise.
18017         (ffs): Likewise.
18018         (ffs_f): Likewise.
18019         (fls): Likewise.
18020         (call_i): Remove 'S' asm letter, add jli instruction.
18021         (call_value_i): Likewise.
18022         * config/arc/arc.op (mjli-always): New option.
18023         * config/arc/constraints.md (Cji): New constraint.
18024         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
18025         operand.
18026         (subsf3_fpx): Likewise.
18027         (mulsf3_fpx): Likewise.
18028         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
18029         asm operand.
18030         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
18031         function attrbutes.
18032         * doc/invoke.texi (ARC): Document mjli-always option.
18034 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
18036         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
18037         avoid addition with 0 and use incw and decw where possible.
18039 2018-01-26  Richard Biener  <rguenther@suse.de>
18041         PR tree-optimization/81082
18042         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
18043         association if it requires casting to unsigned.
18044         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
18045         from fold_plusminus_mult_expr to catch important cases late when
18046         range info is available.
18048 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18050         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
18051         * configure.ac (hidden_linkonce): New test.
18052         * configure: Regenerate.
18053         * config.in: Regenerate.
18055 2018-01-26  Julia Koval  <julia.koval@intel.com>
18057         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
18058         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
18059         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
18060         _mm_mask_bitshuffle_epi64_mask): Fix type.
18061         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
18062         USI_FTYPE_V4DI_V4DI_USI): Remove.
18063         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
18064         __builtin_ia32_vpshufbitqmb256_mask,
18065         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
18066         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
18067         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
18069 2018-01-26  Alan Modra  <amodra@gmail.com>
18071         PR target/84033
18072         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
18073         UNSPEC_VBPERMQ.  Sort other unspecs.
18075 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
18077         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
18079 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
18081         PR middle-end/83055
18082         * predict.c (drop_profile): Do not push/pop cfun; update also
18083         node->count.
18084         (handle_missing_profiles): Fix logic looking for zero profiles.
18086 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
18088         PR middle-end/83977
18089         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
18090         on functions with #pragma omp declare simd or functions with simd
18091         attribute.
18092         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
18093         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
18094         Remove trailing \n from warning_at calls.
18096 2018-01-25  Tom de Vries  <tom@codesourcery.com>
18098         PR target/84028
18099         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18100         for neutered workers.
18102 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
18104         PR target/68467
18105         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
18106         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
18108 2018-01-24  Jeff Law  <law@redhat.com>
18110         PR target/83994
18111         * i386.c (get_probe_interval): Move to earlier point.
18112         (ix86_compute_frame_layout): If -fstack-clash-protection and
18113         the frame is larger than the probe interval, then use pushes
18114         to save registers rather than reg->mem moves.
18115         (ix86_expand_prologue): Remove conditional for int_registers_saved
18116         assertion.
18118 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18120         PR target/84014
18121         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18122         min/max for never referenced object.
18124 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18126         PR middle-end/83977
18127         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18128         here.
18129         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18130         attributes from DECL_ATTRIBUTES (decl) without affecting
18131         DECL_ATTRIBUTES (current_function_decl).
18132         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18133         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18135 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18137         PR tree-optimization/83979
18138         * fold-const.c (fold_comparison): Use constant_boolean_node
18139         instead of boolean_{true,false}_node.
18141 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18143         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18144         with zero counts.
18146 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18148         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18149         Simplify the clause that sets the length attribute.
18150         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18151         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18152         clause that sets the length attribute.
18153         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18155 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18157         PR target/83589
18158         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18159         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18160         Add strict parameter.
18161         (prevent_branch_around_nothing): Insert dummy insn between branch to
18162         label and label with no ptx insn inbetween.
18163         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18165 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18167         PR target/81352
18168         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18169         for neutered threads in warp.
18170         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18172 2018-01-24  Richard Biener  <rguenther@suse.de>
18174         PR tree-optimization/83176
18175         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18176         operands.
18178 2018-01-24  Richard Biener  <rguenther@suse.de>
18180         PR tree-optimization/82819
18181         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18182         code generating pluses that are no-ops in the target precision.
18184 2018-01-24  Richard Biener  <rguenther@suse.de>
18186         PR middle-end/84000
18187         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18189 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18191         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18192         to merge probabilities.
18193         * predict.c (probably_never_executed): Also mark as cold functions
18194         with global 0 profile and guessed local profile.
18195         * profile-count.c (profile_probability::combine_with_count): New
18196         member function.
18197         * profile-count.h (profile_probability::operator*,
18198         profile_probability::operator*=, profile_probability::operator/,
18199         profile_probability::operator/=): Reduce precision to adjusted
18200         and set value to guessed on contradictory divisions.
18201         (profile_probability::combine_with_freq): Remove.
18202         (profile_probability::combine_wiht_count): Declare.
18203         (profile_count::force_nonzero):: Set to adjusted.
18204         (profile_count::probability_in):: Set quality to adjusted.
18205         * tree-ssa-tail-merge.c (replace_block_by): Use
18206         combine_with_count.
18208 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18209             Jim Wilson  <jimw@sifive.com>
18211         * config/riscv/riscv.c (riscv_stack_boundary): New.
18212         (riscv_option_override): Set riscv_stack_boundary.  Handle
18213         riscv_preferred_stack_boundary_arg.
18214         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18215         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18216         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18217         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18218         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18219         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18221 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18223         PR target/83905
18224         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18225         of struct ix86_frame.
18226         (ix86_expand_epilogue): Likewise.  Add a local variable for
18227         the reg_save_offset field in struct ix86_frame.
18229 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18231         PR tree-optimization/82604
18232         * tree-loop-distribution.c (enum partition_kind): New enum item
18233         PKIND_PARTIAL_MEMSET.
18234         (partition_builtin_p): Support above new enum item.
18235         (generate_code_for_partition): Ditto.
18236         (compute_access_range): Differentiate cases that equality can be
18237         proven at all loops, the innermost loops or no loops.
18238         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18239         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18240         (finalize_partitions, distribute_loop): Don't fuse partition of
18241         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18242         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18243         parloop is enabled.
18245 2018-01-23  Martin Liska  <mliska@suse.cz>
18247         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18248         order to ignore the predictor.
18249         (PRED_POLYMORPHIC_CALL): Likewise.
18250         (PRED_RECURSIVE_CALL): Likewise.
18252 2018-01-23  Martin Liska  <mliska@suse.cz>
18254         * tree-profile.c (tree_profiling): Print function header to
18255         aware reader which function we are working on.
18256         * value-prof.c (gimple_find_values_to_profile): Do not print
18257         not interesting value histograms.
18259 2018-01-23  Martin Liska  <mliska@suse.cz>
18261         * profile-count.h (enum profile_quality): Add
18262         profile_uninitialized as the first value. Do not number values
18263         as they are zero based.
18264         (profile_count::verify): Update sanity check.
18265         (profile_probability::verify): Likewise.
18267 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18269         * doc/invoke.texi (ffor-scope): Deprecate.
18271 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18273         PR tree-optimization/83510
18274         * domwalk.c (set_all_edges_as_executable): New function.
18275         (dom_walker::dom_walker): Convert bool param
18276         "skip_unreachable_blocks" to enum reachability.  Move setup of
18277         edge flags to set_all_edges_as_executable and only do it when
18278         reachability is REACHABLE_BLOCKS.
18279         * domwalk.h (enum dom_walker::reachability): New enum.
18280         (dom_walker::dom_walker): Convert bool param
18281         "skip_unreachable_blocks" to enum reachability.
18282         (set_all_edges_as_executable): New decl.
18283         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18284         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18285         "reachability".
18286         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18287         but converting true to REACHABLE_BLOCKS.
18288         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18289         * tree-vrp.c
18290         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18291         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18292         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18293         REACHABLE_BLOCKS.
18294         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18295         if check_all_array_refs will be called.
18297 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18299         * tree.c (selftest::test_location_wrappers): Add more test
18300         coverage.
18302 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18304         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18305         (selftest::test_bit_in_range): Likewise.
18307 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18309         PR testsuite/83888
18310         * doc/sourcebuild.texi (vect_float): Say that the selector
18311         only describes the situation when -funsafe-math-optimizations is on.
18312         (vect_float_strict): Document.
18314 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18316         PR tree-optimization/83965
18317         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18318         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18319         instead of checking only for a reduction.
18320         (vect_recog_widen_sum_pattern): Likewise.
18322 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18324         * predict.c (probably_never_executed): Only use precise profile info.
18325         (compute_function_frequency): Skip after inlining hack since we now
18326         have quality checking.
18328 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18330         * profile-count.h (profile_probability::very_unlikely,
18331         profile_probability::unlikely, profile_probability::even): Set
18332         precision to guessed.
18334 2018-01-23  Richard Biener  <rguenther@suse.de>
18336         PR tree-optimization/83963
18337         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18338         Properly terminate dominator walk when crossing the exit edge not
18339         when visiting its source block.
18341 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18343         PR c++/83918
18344         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18345         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18347 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18349         PR tree-optimization/83957
18350         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18351         semicolon after for body surrounded by braces.
18353         PR tree-optimization/83081
18354         * profile-count.h (profile_probability::split): New method.
18355         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18356         Use profile_probability::split.
18357         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18358         when splitting a single conditional jump into 2.
18360 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18362         PR tree-optimization/69452
18363         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18364         decl.
18366 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18368         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18369         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18370         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18372 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18374         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18375         declaration.
18376         * config/rl78/rl78.md (movdi): New define_expand.
18377         * config/rl78/rl78.c (rl78_split_movdi): New function.
18379 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18381         PR target/83862
18382         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18383         no longer used.
18384         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18385         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18386         128-bit to produce an UNSPEC move to get the double word with the
18387         signbit and then a shift directly to do signbit.
18388         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18389         implementation with a new version that just does either a direct
18390         move or a regular move.  Move memory interface to separate insns.
18391         Move insns so they are next to the expander.
18392         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18393         with signbit move.  Split big and little endian case.
18394         (signbit<mode>2_dm_mem_le): Likewise.
18395         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18396         (signbit<mode>2_dm2): Likewise.
18398 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18400         * config/rl78/rl78.md (anddi3): New define_expand.
18402 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18404         * config/rl78/rl78.md (umindi3): New define_expand.
18406 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18408         * config/rl78/rl78.md (smindi3): New define_expand.
18410 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18412         * config/rl78/rl78.md (smaxdi3): New define_expand.
18414 2018-01-22  Carl Love  <cel@us.ibm.com>
18416         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18417         LVX_V1TI): Add macro expansion.
18418         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18419         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18420         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18421         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18422         Change check to determine if the instruction is a byte reversing
18423         entry.  Fix typo in comment.
18424         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18425         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18426         Add def_builtin calls for new builtins.
18427         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18428         Add define_insn expansion.
18430 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18432         * config/rl78/rl78.md (umaxdi3): New define_expand.
18434 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18436         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18437         for non-QImode registers.
18439 2018-01-22  Richard Biener  <rguenther@suse.de>
18441         PR tree-optimization/83963
18442         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18443         including the loop exit block.
18444         (scop_detection::merge_sese): Likewise.
18445         (scop_detection::add_scop): Do it here instead.
18447 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18449         * doc/sourcebuild.texi (arm_softfloat): Document.
18451 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18453         PR gcc/77734
18454         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18455         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18456         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18458 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18459             David Edelsohn  <dje.gcc@gmail.com>
18461         PR target/83946
18462         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18463         Change "crset eq" to "crset 2".
18464         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18465         (*call_indirect_aix<mode>_nospec): Likewise.
18466         (*call_value_indirect_aix<mode>_nospec): Likewise.
18467         (*call_indirect_elfv2<mode>_nospec): Likewise.
18468         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18469         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18470         change assembly output from . to $.
18471         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18472         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18473         (*tablejump<mode>_internal1_nospec): Likewise.
18475 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18477         PR target/80870
18478         * config/sh/sh_optimize_sett_clrt.cc:
18479         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18481 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18483         PR tree-optimization/83940
18484         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18485         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18486         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18487         use it to pass back the definition type.
18488         (vect_check_store_rhs): Likewise rhs_dt_out.
18489         (vect_build_gather_load_calls): Add a mask_dt argument and use
18490         it instead of a call to vect_is_simple_use.
18491         (vectorizable_store): Update calls to vect_check_load_store_mask
18492         and vect_check_store_rhs.  Use the dt returned by the latter instead
18493         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18494         instead of calls to vect_is_simple_use.  Pass the scalar rather
18495         than the vector operand to vect_is_simple_use when handling
18496         second and subsequent copies of an rhs value.
18497         (vectorizable_load): Update calls to vect_check_load_store_mask
18498         and vect_build_gather_load_calls.  Use the cached mask_dt and
18499         gs_info.offset_dt instead of calls to vect_is_simple_use.
18501 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18503         PR middle-end/83945
18504         * tree-emutls.c: Include gimplify.h.
18505         (lower_emutls_2): New function.
18506         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18507         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18508         it before further processing.
18510         PR target/83930
18511         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18512         UINTVAL (trueop1) instead of INTVAL (op1).
18514 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18516         PR debug/81570
18517         PR debug/83728
18518         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18519         INCOMING_FRAME_SP_OFFSET if not defined.
18520         (scan_trace): Add ENTRY argument.  If true and
18521         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18522         emit a note to adjust the CFA offset.
18523         (create_cfi_notes): Adjust scan_trace callers.
18524         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18525         INCOMING_FRAME_SP_OFFSET in the CIE.
18526         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18527         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18528         Likewise.
18529         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18530         * doc/tm.texi: Regenerated.
18532 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18534         PR rtl-optimization/83147
18535         * lra-constraints.c (remove_inheritance_pseudos): Use
18536         lra_substitute_pseudo_within_insn.
18538 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18539             Cesar Philippidis  <cesar@codesourcery.com>
18541         PR target/83920
18542         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18544 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18546         PR target/83790
18547         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18548         spaces for function labels.
18550 2018-01-19  Martin Liska  <mliska@suse.cz>
18552         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18553         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18554         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18555         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18556         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18557         (PRED_CONST_RETURN): Change from 69 to 65.
18558         (PRED_NULL_RETURN): Change from 91 to 71.
18559         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18560         (PRED_LOOP_GUARD): Change from 66 to 73.
18562 2018-01-19  Martin Liska  <mliska@suse.cz>
18564         * predict.c (predict_insn_def): Add new assert.
18565         (struct branch_predictor): Change type to signed integer.
18566         (test_prediction_value_range): Amend test to cover
18567         PROB_UNINITIALIZED.
18568         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18569         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18570         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18571         (PRED_LOOP_IV_COMPARE): Likewise.
18572         * predict.h (PROB_UNINITIALIZED): Define new constant.
18574 2018-01-19  Martin Liska  <mliska@suse.cz>
18576         * predict.c (dump_prediction): Add new format for
18577         analyze_brprob.py script which is enabled with -details
18578         suboption.
18579         * profile-count.h (precise_p): New function.
18581 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18583         PR tree-optimization/83922
18584         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18585         there are no statements that need masking.
18586         (vect_active_double_reduction_p): New function.
18587         (vect_analyze_loop_operations): Use it when handling phis that
18588         are not in the loop header.
18590 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18592         PR tree-optimization/83914
18593         * tree-vect-loop.c (vectorizable_induction): Don't convert
18594         init_expr or apply the peeling adjustment for inductions
18595         that are nested within the vectorized loop.
18597 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18599         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18600         instead of NEG.
18602 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18604         PR sanitizer/81715
18605         PR testsuite/83882
18606         * function.h (gimplify_parameters): Add gimple_seq * argument.
18607         * function.c: Include gimple.h and options.h.
18608         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18609         for the added local temporaries if needed.
18610         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18611         if there are any parameter cleanups, wrap whole body into a
18612         try/finally with the cleanups.
18614 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18616         PR target/82964
18617         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18618         Use GET_MODE_CLASS for scalar floating point.
18620 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18622         PR ipa/82256
18623         patch by PaX Team
18624         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18625         Fix call of call_cgraph_insertion_hooks.
18627 2018-01-18  Martin Sebor  <msebor@redhat.com>
18629         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18631 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18633         PR ipa/83619
18634         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18635         frequencies.
18637 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18639         PR other/70268
18640         * common.opt: (-ffile-prefix-map): New option.
18641         * opts.c (common_handle_option): Defer it.
18642         * opts-global.c (handle_common_deferred_options): Handle it.
18643         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18644         * file-prefix-map.h: New file.
18645         (remap_debug_filename, add_debug_prefix_map): ...here.
18646         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18647         * final.c (debug_prefix_map, add_debug_prefix_map
18648         remap_debug_filename): Move to...
18649         * file-prefix-map.c: New file.
18650         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18651         generalize, get rid of alloca(), use strrchr() instead of strchr().
18652         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18653         Implement in terms of add_prefix_map().
18654         (remap_macro_filename, remap_debug_filename): Implement in term of
18655         remap_filename().
18656         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18657         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18658         * dbxout.c: Include file-prefix-map.h.
18659         * varasm.c: Likewise.
18660         * vmsdbgout.c: Likewise.
18661         * xcoffout.c: Likewise.
18662         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18663         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18664         * doc/invoke.texi (-ffile-prefix-map): Document.
18665         (-fdebug-prefix-map): Update description.
18667 2018-01-18  Martin Liska  <mliska@suse.cz>
18669         * config/i386/i386.c (indirect_thunk_name): Document that also
18670         lfence is emitted.
18671         (output_indirect_thunk): Document why both instructions
18672         (pause and lfence) are generated.
18674 2018-01-18  Richard Biener  <rguenther@suse.de>
18676         PR tree-optimization/83887
18677         * graphite-scop-detection.c
18678         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18679         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18680         (scop_detection::merge_sese): Re-implement with a flood-fill
18681         algorithm that properly finds a SESE region if it exists.
18683 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18685         PR c/61240
18686         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18687         pointer_diff optimizations use view_convert instead of convert.
18689 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18691         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18692         Generate different code for -mno-speculate-indirect-jumps.
18693         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18694         (*call_indirect_aix<mode>): Disable for
18695         -mno-speculate-indirect-jumps.
18696         (*call_indirect_aix<mode>_nospec): New define_insn.
18697         (*call_value_indirect_aix<mode>): Disable for
18698         -mno-speculate-indirect-jumps.
18699         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18700         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18701         -mno-speculate-indirect-jumps.
18702         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18704 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18706         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18707         long double type, set the flags for noting the default long double
18708         type, even if we don't pass or return a long double type.
18710 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18712         PR ipa/83051
18713         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18714         failure.
18716 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18718         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18719         support for merge[hl].
18720         (fold_mergehl_helper): New helper function.
18721         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18722         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18723         (altivec_vmrglw_direct): Add xxmrglw insn.
18725 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18727         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18728         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18730 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18732         PR lto/83121
18733         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18734         call the lto_location_cache before reading the
18735         DECL_SOURCE_LOCATION of the types.
18737 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18738             Richard Sandiford  <richard.sandiford@linaro.org>
18740         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18741         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18742         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18743         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18744         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18745         Add declaration.
18746         * config/aarch64/constraints.md (aarch64_movti_operand):
18747         Limit immediates.
18748         * config/aarch64/predicates.md (Uti): Add new constraint.
18750 2018-01-17  Carl Love  <cel@us.ibm.com>
18752         * config/rs6000/vsx.md (define_expand xl_len_r,
18753         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18754         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18755         lxvll.
18756         (define_expand, define_insn): Move the shift left from  the
18757         define_insn to the define_expand for lxvl and stxvl instructions.
18758         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18759         and XL_LEN_R definitions to PURE.
18761 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18763         * config/i386/i386.c (indirect_thunk_name): Declare regno
18764         as unsigned int.  Compare regno with INVALID_REGNUM.
18765         (output_indirect_thunk): Ditto.
18766         (output_indirect_thunk_function): Ditto.
18767         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18768         in the call to output_indirect_thunk_function.
18770 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18772         PR middle-end/83884
18773         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18774         rather than the size of inner_type to determine the stack slot size
18775         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18777 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18779         PR target/83546
18780         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18781         to PTA_SILVERMONT.
18783 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18785         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18786         endian Linux systems to optionally enable multilibs for selecting
18787         the long double type if the user configured an explicit type.
18788         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18789         have no long double multilibs if not defined.
18790         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18791         warn if the user used -mabi={ieee,ibm}longdouble and we built
18792         multilibs for long double.
18793         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18794         appropriate multilib option.
18795         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18796         multilib options.
18797         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18798         for building long double multilibs.
18799         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18801 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18803         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18804         copies.
18806         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18807         64 bits.
18808         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18809         128 bits.
18811         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18812         variables.
18814         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18815         return value.
18817 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18819         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18820         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18822 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18824         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18825         different rtl trees depending on TARGET_64BIT.
18826         (rs6000_gen_lvx): Likewise.
18828 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18830         * config/visium/visium.md (nop): Tweak comment.
18831         (hazard_nop): Likewise.
18833 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18835         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18836         -mspeculate-indirect-jumps.
18837         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18838         for -mno-speculate-indirect-jumps.
18839         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18840         (*call_value_indirect_elfv2<mode>): Disable for
18841         -mno-speculate-indirect-jumps.
18842         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18843         (indirect_jump): Emit different RTL for
18844         -mno-speculate-indirect-jumps.
18845         (*indirect_jump<mode>): Disable for
18846         -mno-speculate-indirect-jumps.
18847         (*indirect_jump<mode>_nospec): New define_insn.
18848         (tablejump): Emit different RTL for
18849         -mno-speculate-indirect-jumps.
18850         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18851         (tablejumpsi_nospec): New define_expand.
18852         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18853         (tablejumpdi_nospec): New define_expand.
18854         (*tablejump<mode>_internal1): Disable for
18855         -mno-speculate-indirect-jumps.
18856         (*tablejump<mode>_internal1_nospec): New define_insn.
18857         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18858         option.
18860 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18862         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18863         callers updated.
18865 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18866             Richard Biener  <rguenth@suse.de>
18868         PR libgomp/83590
18869         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18870         return early, inline manually is_gimple_sizepos.  Make sure if we
18871         call gimplify_expr we don't end up with a gimple constant.
18872         * tree.c (variably_modified_type_p): Don't return true for
18873         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18874         * gimplify.h (is_gimple_sizepos): Remove.
18876 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18878         PR tree-optimization/83857
18879         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18880         vectorizable_live_operation for pure SLP statements.
18881         (vectorizable_live_operation): Handle PHIs.
18883 2018-01-16  Richard Biener  <rguenther@suse.de>
18885         PR tree-optimization/83867
18886         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18887         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18889 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18891         PR c/83844
18892         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18893         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18894         If off is not INTEGER_CST, issue a may not be aligned warning
18895         rather than isn't aligned.  Use isn%'t rather than isn't.
18896         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18897         into MULT_EXPR.
18898         <case MULT_EXPR>: Improve the case when bottom and one of the
18899         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18900         operand, in that case check if the other operand is multiple of
18901         bottom divided by the INTEGER_CST operand.
18903 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18905         PR target/83858
18906         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18907         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18908         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18909         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18910         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18911         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18912         (pa_function_arg_size): New function.
18914 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18916         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18917         in a separate statement.
18919 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18921         PR tree-optimization/83847
18922         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18923         group gathers and scatters.
18925 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18927         PR rtl-optimization/86620
18928         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18930         PR rtl-optimization/83213
18931         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18932         to last if both are JUMP_INSNs.
18934         PR tree-optimization/83843
18935         * gimple-ssa-store-merging.c
18936         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18937         store_immediate_info for bswap/nop orig_stores.
18939 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18941         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18942         !TARGET_MUL.
18943         <UDIV>: Increase cost if !TARGET_DIV.
18945 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18947         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18948         (define_attr "cr_logical_3op"): New.
18949         (cceq_ior_compare): Adjust.
18950         (cceq_ior_compare_complement): Adjust.
18951         (*cceq_rev_compare): Adjust.
18952         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18953         (is_cracked_insn): Adjust.
18954         (insn_must_be_first_in_group): Adjust.
18955         * config/rs6000/40x.md: Adjust.
18956         * config/rs6000/440.md: Adjust.
18957         * config/rs6000/476.md: Adjust.
18958         * config/rs6000/601.md: Adjust.
18959         * config/rs6000/603.md: Adjust.
18960         * config/rs6000/6xx.md: Adjust.
18961         * config/rs6000/7450.md: Adjust.
18962         * config/rs6000/7xx.md: Adjust.
18963         * config/rs6000/8540.md: Adjust.
18964         * config/rs6000/cell.md: Adjust.
18965         * config/rs6000/e300c2c3.md: Adjust.
18966         * config/rs6000/e500mc.md: Adjust.
18967         * config/rs6000/e500mc64.md: Adjust.
18968         * config/rs6000/e5500.md: Adjust.
18969         * config/rs6000/e6500.md: Adjust.
18970         * config/rs6000/mpc.md: Adjust.
18971         * config/rs6000/power4.md: Adjust.
18972         * config/rs6000/power5.md: Adjust.
18973         * config/rs6000/power6.md: Adjust.
18974         * config/rs6000/power7.md: Adjust.
18975         * config/rs6000/power8.md: Adjust.
18976         * config/rs6000/power9.md: Adjust.
18977         * config/rs6000/rs64.md: Adjust.
18978         * config/rs6000/titan.md: Adjust.
18980 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18982         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18983         ix86_indirect_branch_register logic.
18985 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18987         * config/i386/constraints.md (Bs): Update
18988         ix86_indirect_branch_register check.  Don't check
18989         ix86_indirect_branch_register with GOT_memory_operand.
18990         (Bw): Likewise.
18991         * config/i386/predicates.md (GOT_memory_operand): Don't check
18992         ix86_indirect_branch_register here.
18993         (GOT32_symbol_operand): Likewise.
18995 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18997         * config/i386/predicates.md (constant_call_address_operand):
18998         Rewrite ix86_indirect_branch_register logic.
18999         (sibcall_insn_operand): Likewise.
19001 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19003         * config/i386/constraints.md (Bs): Replace
19004         ix86_indirect_branch_thunk_register with
19005         ix86_indirect_branch_register.
19006         (Bw): Likewise.
19007         * config/i386/i386.md (indirect_jump): Likewise.
19008         (tablejump): Likewise.
19009         (*sibcall_memory): Likewise.
19010         (*sibcall_value_memory): Likewise.
19011         Peepholes of indirect call and jump via memory: Likewise.
19012         * config/i386/i386.opt: Likewise.
19013         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19014         (GOT_memory_operand): Likewise.
19015         (call_insn_operand): Likewise.
19016         (sibcall_insn_operand): Likewise.
19017         (GOT32_symbol_operand): Likewise.
19019 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19021         PR middle-end/83837
19022         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
19023         type rather than type addr's type points to.
19024         (expand_omp_atomic_mutex): Likewise.
19025         (expand_omp_atomic): Likewise.
19027 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
19029         PR target/83839
19030         * config/i386/i386.c (output_indirect_thunk_function): Use
19031         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
19032         for  __x86_return_thunk.
19034 2018-01-15  Richard Biener  <rguenther@suse.de>
19036         PR middle-end/83850
19037         * expmed.c (extract_bit_field_1): Fix typo.
19039 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19041         PR target/83687
19042         * config/arm/iterators.md (VF): New mode iterator.
19043         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
19044         Remove integer-related logic from pattern.
19045         (neon_vabd<mode>_3): Likewise.
19047 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
19049         PR middle-end/82694
19050         * common.opt (fstrict-overflow): No longer an alias.
19051         (fwrapv-pointer): New option.
19052         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
19053         also for pointer types based on flag_wrapv_pointer.
19054         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
19055         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
19056         opts->x_flag_wrapv got set.
19057         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
19058         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
19059         POINTER_TYPE_OVERFLOW_UNDEFINED.
19060         * match.pd: Likewise in address comparison pattern.
19061         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
19063 2018-01-15  Richard Biener  <rguenther@suse.de>
19065         PR lto/83804
19066         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
19067         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
19068         Reset type names to their identifier if their TYPE_DECL doesn't
19069         have linkage (and thus is used for ODR and devirt).
19070         (save_debug_info_for_decl): Remove.
19071         (save_debug_info_for_type): Likewise.
19072         (add_tree_to_fld_list): Adjust.
19073         * tree-pretty-print.c (dump_generic_node): Make dumping of
19074         type names more robust.
19076 2018-01-15  Richard Biener  <rguenther@suse.de>
19078         * BASE-VER: Bump to 8.0.1.
19080 2018-01-14  Martin Sebor  <msebor@redhat.com>
19082         PR other/83508
19083         * builtins.c (check_access): Avoid warning when the no-warning bit
19084         is set.
19086 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
19088         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
19089         * ira-color (allocno_hard_regs_compare): Likewise.
19091 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
19093         PR target/83013
19094         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
19095         Use .pushsection/.popsection.
19097 2018-01-14  Martin Sebor  <msebor@redhat.com>
19099         PR c++/81327
19100         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
19102 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
19104         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
19105         entry from extra_headers.
19106         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
19107         extra_headers, make the list bitwise identical to the i?86-*-* one.
19109 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19111         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
19112         -mcmodel=large with -mindirect-branch=thunk,
19113         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19114         -mfunction-return=thunk-extern.
19115         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19116         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19117         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19119 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19121         * config/i386/i386.c (print_reg): Print the name of the full
19122         integer register without '%'.
19123         (ix86_print_operand): Handle 'V'.
19124         * doc/extend.texi: Document 'V' modifier.
19126 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19128         * config/i386/constraints.md (Bs): Disallow memory operand for
19129         -mindirect-branch-register.
19130         (Bw): Likewise.
19131         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19132         (GOT_memory_operand): Likewise.
19133         (call_insn_operand): Likewise.
19134         (sibcall_insn_operand): Likewise.
19135         (GOT32_symbol_operand): Likewise.
19136         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19137         for -mindirect-branch-register.
19138         (tablejump): Likewise.
19139         (*sibcall_memory): Likewise.
19140         (*sibcall_value_memory): Likewise.
19141         Disallow peepholes of indirect call and jump via memory for
19142         -mindirect-branch-register.
19143         (*call_pop): Replace m with Bw.
19144         (*call_value_pop): Likewise.
19145         (*sibcall_pop_memory): Replace m with Bs.
19146         * config/i386/i386.opt (mindirect-branch-register): New option.
19147         * doc/invoke.texi: Document -mindirect-branch-register option.
19149 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19151         * config/i386/i386-protos.h (ix86_output_function_return): New.
19152         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19153         set function_return_type.
19154         (indirect_thunk_name): Add ret_p to indicate thunk for function
19155         return.
19156         (output_indirect_thunk_function): Pass false to
19157         indirect_thunk_name.
19158         (ix86_output_indirect_branch_via_reg): Likewise.
19159         (ix86_output_indirect_branch_via_push): Likewise.
19160         (output_indirect_thunk_function): Create alias for function
19161         return thunk if regno < 0.
19162         (ix86_output_function_return): New function.
19163         (ix86_handle_fndecl_attribute): Handle function_return.
19164         (ix86_attribute_table): Add function_return.
19165         * config/i386/i386.h (machine_function): Add
19166         function_return_type.
19167         * config/i386/i386.md (simple_return_internal): Use
19168         ix86_output_function_return.
19169         (simple_return_internal_long): Likewise.
19170         * config/i386/i386.opt (mfunction-return=): New option.
19171         (indirect_branch): Mention -mfunction-return=.
19172         * doc/extend.texi: Document function_return function attribute.
19173         * doc/invoke.texi: Document -mfunction-return= option.
19175 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19177         * config/i386/i386-opts.h (indirect_branch): New.
19178         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19179         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19180         with local indirect jump when converting indirect call and jump.
19181         (ix86_set_indirect_branch_type): New.
19182         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19183         (indirectlabelno): New.
19184         (indirect_thunk_needed): Likewise.
19185         (indirect_thunk_bnd_needed): Likewise.
19186         (indirect_thunks_used): Likewise.
19187         (indirect_thunks_bnd_used): Likewise.
19188         (INDIRECT_LABEL): Likewise.
19189         (indirect_thunk_name): Likewise.
19190         (output_indirect_thunk): Likewise.
19191         (output_indirect_thunk_function): Likewise.
19192         (ix86_output_indirect_branch_via_reg): Likewise.
19193         (ix86_output_indirect_branch_via_push): Likewise.
19194         (ix86_output_indirect_branch): Likewise.
19195         (ix86_output_indirect_jmp): Likewise.
19196         (ix86_code_end): Call output_indirect_thunk_function if needed.
19197         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19198         needed.
19199         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19200         (ix86_attribute_table): Add indirect_branch.
19201         * config/i386/i386.h (machine_function): Add indirect_branch_type
19202         and has_local_indirect_jump.
19203         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19204         to true.
19205         (tablejump): Likewise.
19206         (*indirect_jump): Use ix86_output_indirect_jmp.
19207         (*tablejump_1): Likewise.
19208         (simple_return_indirect_internal): Likewise.
19209         * config/i386/i386.opt (mindirect-branch=): New option.
19210         (indirect_branch): New.
19211         (keep): Likewise.
19212         (thunk): Likewise.
19213         (thunk-inline): Likewise.
19214         (thunk-extern): Likewise.
19215         * doc/extend.texi: Document indirect_branch function attribute.
19216         * doc/invoke.texi: Document -mindirect-branch= option.
19218 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19220         PR ipa/83051
19221         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19223 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19225         * ipa-inline.c (want_inline_small_function_p): Return false if
19226         inlining has already failed with CIF_FINAL_ERROR.
19227         (update_caller_keys): Call want_inline_small_function_p before
19228         can_inline_edge_p.
19229         (update_callee_keys): Likewise.
19231 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19233         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19234         New function.
19235         (rs6000_quadword_masked_address_p): Likewise.
19236         (quad_aligned_load_p): Likewise.
19237         (quad_aligned_store_p): Likewise.
19238         (const_load_sequence_p): Add comment to describe the outer-most loop.
19239         (mimic_memory_attributes_and_flags): New function.
19240         (rs6000_gen_stvx): Likewise.
19241         (replace_swapped_aligned_store): Likewise.
19242         (rs6000_gen_lvx): Likewise.
19243         (replace_swapped_aligned_load): Likewise.
19244         (replace_swapped_load_constant): Capitalize argument name in
19245         comment describing this function.
19246         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19247         and stores that access quad-word aligned addresses and replace
19248         with stvx or lvx instructions when appropriate.
19249         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19250         New function prototype.
19251         (rs6000_quadword_masked_address_p): Likewise.
19252         (rs6000_gen_lvx): Likewise.
19253         (rs6000_gen_stvx): Likewise.
19254         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19255         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19256         when memory address is aligned.
19257         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19258         this split to select lvx instruction when memory address is aligned.
19259         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19260         instruction when memory address is aligned.
19261         (*vsx_le_perm_load_v16qi): Likewise.
19262         (four unnamed splitters): Modify to select the stvx instruction
19263         when memory is aligned.
19265 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19267         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19268         which appears in the queue multiple times.
19270 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19271             Alan Hayward  <alan.hayward@arm.com>
19272             David Sherwood  <david.sherwood@arm.com>
19274         * tree-vectorizer.h (vec_lower_bound): New structure.
19275         (_loop_vec_info): Add check_nonzero and lower_bounds.
19276         (LOOP_VINFO_CHECK_NONZERO): New macro.
19277         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19278         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19279         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19280         fields.  Make seg_len the distance travelled, not including the
19281         access size.
19282         (dr_direction_indicator): Declare.
19283         (dr_zero_step_indicator): Likewise.
19284         (dr_known_forward_stride_p): Likewise.
19285         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19286         tree-ssanames.h.
19287         (runtime_alias_check_p): Allow runtime alias checks with
19288         variable strides.
19289         (operator ==): Compare access_size and align.
19290         (prune_runtime_alias_test_list): Rework for new distinction between
19291         the access_size and seg_len.
19292         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19293         segment lengths.
19294         (get_segment_min_max): New function.
19295         (create_intersect_range_checks): Use it.
19296         (dr_step_indicator): New function.
19297         (dr_direction_indicator): Likewise.
19298         (dr_zero_step_indicator): Likewise.
19299         (dr_known_forward_stride_p): Likewise.
19300         * tree-loop-distribution.c (data_ref_segment_size): Return
19301         DR_STEP * (niters - 1).
19302         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19303         constructor.
19304         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19305         (vect_preserves_scalar_order_p): New function, split out from...
19306         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19307         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19308         (vect_vfa_access_size): New function.
19309         (vect_vfa_align): Likewise.
19310         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19311         (dump_lower_bound): New function.
19312         (vect_check_lower_bound): Likewise.
19313         (vect_small_gap_p): Likewise.
19314         (vectorizable_with_step_bound_p): Likewise.
19315         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19316         depencies if the vectorization factor is 1.  Convert the checks
19317         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19318         a bunds check for variable steps if the minimum required step is
19319         relatively small. Update calls to the dr_with_seg_len
19320         constructor and to vect_compile_time_alias.
19321         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19322         function.
19323         (vect_loop_versioning): Call it.
19324         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19325         when retrying.
19326         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19328 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19329             Alan Hayward  <alan.hayward@arm.com>
19330             David Sherwood  <david.sherwood@arm.com>
19332         * doc/sourcebuild.texi (vect_scatter_store): Document.
19333         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19334         optabs.
19335         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19336         Document.
19337         * genopinit.c (main): Add supports_vec_scatter_store and
19338         supports_vec_scatter_store_cached to target_optabs.
19339         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19340         IFN_MASK_SCATTER_STORE.
19341         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19342         functions.
19343         * internal-fn.h (internal_store_fn_p): Declare.
19344         (internal_fn_stored_value_index): Likewise.
19345         * internal-fn.c (scatter_store_direct): New macro.
19346         (expand_scatter_store_optab_fn): New function.
19347         (direct_scatter_store_optab_supported_p): New macro.
19348         (internal_store_fn_p): New function.
19349         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19350         IFN_MASK_SCATTER_STORE.
19351         (internal_fn_mask_index): Likewise.
19352         (internal_fn_stored_value_index): New function.
19353         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19354         for scatter stores.
19355         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19356         * optabs-query.c (supports_vec_scatter_store_p): New function.
19357         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19358         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19359         true for scatter stores.
19360         (vect_gather_scatter_fn_p): Handle scatter stores too.
19361         (vect_check_gather_scatter): Consider using scatter stores if
19362         supports_vec_scatter_store_p.
19363         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19364         scatter stores too.
19365         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19366         internal_fn_stored_value_index.
19367         (check_load_store_masking): Handle scatter stores too.
19368         (vect_get_store_rhs): Make public.
19369         (vectorizable_call): Use internal_store_fn_p.
19370         (vectorizable_store): Handle scatter store internal functions.
19371         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19372         when deciding whether the end of the group has been reached.
19373         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19374         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19375         (mask_scatter_store<mode>): New insns.
19377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19378             Alan Hayward  <alan.hayward@arm.com>
19379             David Sherwood  <david.sherwood@arm.com>
19381         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19382         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19383         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19384         function.
19385         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19386         Use vect_truncate_gather_scatter_offset if we can't treat the
19387         operation as a normal gather load or scatter store.
19388         (get_group_load_store_type): Take the gather_scatter_info
19389         as argument.  Try using a gather load or scatter store for
19390         single-element groups.
19391         (get_load_store_type): Update calls to get_group_load_store_type
19392         and vect_use_strided_gather_scatters_p.
19394 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19395             Alan Hayward  <alan.hayward@arm.com>
19396             David Sherwood  <david.sherwood@arm.com>
19398         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19399         optional tree argument.
19400         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19401         null target hooks.
19402         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19403         but continue to use the current value as a fallback.
19404         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19405         to compare the updates.
19406         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19407         (get_load_store_type): Use it when handling a strided access.
19408         (vect_get_strided_load_store_ops): New function.
19409         (vect_get_data_ptr_increment): Likewise.
19410         (vectorizable_load): Handle strided gather loads.  Always pass
19411         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19413 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19414             Alan Hayward  <alan.hayward@arm.com>
19415             David Sherwood  <david.sherwood@arm.com>
19417         * doc/md.texi (gather_load@var{m}): Document.
19418         (mask_gather_load@var{m}): Likewise.
19419         * genopinit.c (main): Add supports_vec_gather_load and
19420         supports_vec_gather_load_cached to target_optabs.
19421         * optabs-tree.c (init_tree_optimization_optabs): Use
19422         ggc_cleared_alloc to allocate target_optabs.
19423         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19424         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19425         functions.
19426         * internal-fn.h (internal_load_fn_p): Declare.
19427         (internal_gather_scatter_fn_p): Likewise.
19428         (internal_fn_mask_index): Likewise.
19429         (internal_gather_scatter_fn_supported_p): Likewise.
19430         * internal-fn.c (gather_load_direct): New macro.
19431         (expand_gather_load_optab_fn): New function.
19432         (direct_gather_load_optab_supported_p): New macro.
19433         (direct_internal_fn_optab): New function.
19434         (internal_load_fn_p): Likewise.
19435         (internal_gather_scatter_fn_p): Likewise.
19436         (internal_fn_mask_index): Likewise.
19437         (internal_gather_scatter_fn_supported_p): Likewise.
19438         * optabs-query.c (supports_at_least_one_mode_p): New function.
19439         (supports_vec_gather_load_p): Likewise.
19440         * optabs-query.h (supports_vec_gather_load_p): Declare.
19441         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19442         and memory_type field.
19443         (NUM_PATTERNS): Bump to 15.
19444         * tree-vect-data-refs.c: Include internal-fn.h.
19445         (vect_gather_scatter_fn_p): New function.
19446         (vect_describe_gather_scatter_call): Likewise.
19447         (vect_check_gather_scatter): Try using internal functions for
19448         gather loads.  Recognize existing calls to a gather load function.
19449         (vect_analyze_data_refs): Consider using gather loads if
19450         supports_vec_gather_load_p.
19451         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19452         (vect_get_gather_scatter_offset_type): Likewise.
19453         (vect_convert_mask_for_vectype): Likewise.
19454         (vect_add_conversion_to_patterm): Likewise.
19455         (vect_try_gather_scatter_pattern): Likewise.
19456         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19457         (vect_vect_recog_func_ptrs): Add it.
19458         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19459         internal_fn_mask_index and internal_gather_scatter_fn_p.
19460         (check_load_store_masking): Take the gather_scatter_info as an
19461         argument and handle gather loads.
19462         (vect_get_gather_scatter_ops): New function.
19463         (vectorizable_call): Check internal_load_fn_p.
19464         (vectorizable_load): Likewise.  Handle gather load internal
19465         functions.
19466         (vectorizable_store): Update call to check_load_store_masking.
19467         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19468         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19469         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19470         (aarch64_gather_scale_operand_d): New predicates.
19471         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19472         (mask_gather_load<mode>): New insns.
19474 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19475             Alan Hayward  <alan.hayward@arm.com>
19476             David Sherwood  <david.sherwood@arm.com>
19478         * optabs.def (fold_left_plus_optab): New optab.
19479         * doc/md.texi (fold_left_plus_@var{m}): Document.
19480         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19481         * internal-fn.c (fold_left_direct): Define.
19482         (expand_fold_left_optab_fn): Likewise.
19483         (direct_fold_left_optab_supported_p): Likewise.
19484         * fold-const-call.c (fold_const_fold_left): New function.
19485         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19486         * tree-parloops.c (valid_reduction_p): New function.
19487         (gather_scalar_reductions): Use it.
19488         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19489         (vect_finish_replace_stmt): Declare.
19490         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19491         (needs_fold_left_reduction_p): New function, split out from...
19492         (vect_is_simple_reduction): ...here.  Accept reductions that
19493         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19494         (vect_force_simple_reduction): Also store the reduction type in
19495         the assignment's STMT_VINFO_REDUC_TYPE.
19496         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19497         (merge_with_identity): New function.
19498         (vect_expand_fold_left): Likewise.
19499         (vectorize_fold_left_reduction): Likewise.
19500         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19501         scalar phi in place for it.  Check for target support and reject
19502         cases that would reassociate the operation.  Defer the transform
19503         phase to vectorize_fold_left_reduction.
19504         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19505         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19506         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19508 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19510         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19511         call to ifc_temp_var.
19513 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19514             Alan Hayward  <alan.hayward@arm.com>
19515             David Sherwood  <david.sherwood@arm.com>
19517         * target.def (legitimize_address_displacement): Take the original
19518         offset as a poly_int.
19519         * targhooks.h (default_legitimize_address_displacement): Update
19520         accordingly.
19521         * targhooks.c (default_legitimize_address_displacement): Likewise.
19522         * doc/tm.texi: Regenerate.
19523         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19524         as an argument, moving assert of ad->disp == ad->disp_term to...
19525         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19526         Try calling targetm.legitimize_address_displacement before expanding
19527         the address rather than afterwards, and adjust for the new interface.
19528         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19529         Match the new hook interface.  Handle SVE addresses.
19530         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19531         new hook interface.
19533 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19535         * Makefile.in (OBJS): Add early-remat.o.
19536         * target.def (select_early_remat_modes): New hook.
19537         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19538         * doc/tm.texi: Regenerate.
19539         * targhooks.h (default_select_early_remat_modes): Declare.
19540         * targhooks.c (default_select_early_remat_modes): New function.
19541         * timevar.def (TV_EARLY_REMAT): New timevar.
19542         * passes.def (pass_early_remat): New pass.
19543         * tree-pass.h (make_pass_early_remat): Declare.
19544         * early-remat.c: New file.
19545         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19546         function.
19547         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19549 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19550             Alan Hayward  <alan.hayward@arm.com>
19551             David Sherwood  <david.sherwood@arm.com>
19553         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19554         vfm1 with a bound_epilog parameter.
19555         (vect_do_peeling): Update calls accordingly, and move the prologue
19556         call earlier in the function.  Treat the base bound_epilog as 0 for
19557         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19558         this base when peeling for gaps.
19559         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19560         with fully-masked loops.
19561         (vect_estimate_min_profitable_iters): Handle the single peeled
19562         iteration in that case.
19564 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19565             Alan Hayward  <alan.hayward@arm.com>
19566             David Sherwood  <david.sherwood@arm.com>
19568         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19569         single-element interleaving even if the size is not a power of 2.
19570         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19571         accesses for single-element interleaving if the group size is
19572         not a power of 2.
19574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19575             Alan Hayward  <alan.hayward@arm.com>
19576             David Sherwood  <david.sherwood@arm.com>
19578         * doc/md.texi (fold_extract_last_@var{m}): Document.
19579         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19580         * optabs.def (fold_extract_last_optab): New optab.
19581         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19582         * internal-fn.c (fold_extract_direct): New macro.
19583         (expand_fold_extract_optab_fn): Likewise.
19584         (direct_fold_extract_optab_supported_p): Likewise.
19585         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19586         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19587         EXTRACT_LAST_REDUCTION.
19588         (get_initial_def_for_reduction): Do not create an initial vector
19589         for EXTRACT_LAST_REDUCTION reductions.
19590         (vectorizable_reduction): Leave the scalar phi in place for
19591         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19592         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19593         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19594         transform phase to vectorizable_condition.
19595         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19596         split out from...
19597         (vect_finish_stmt_generation): ...here.
19598         (vect_finish_replace_stmt): New function.
19599         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19600         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19601         pattern.
19602         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19604 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19605             Alan Hayward  <alan.hayward@arm.com>
19606             David Sherwood  <david.sherwood@arm.com>
19608         * doc/md.texi (extract_last_@var{m}): Document.
19609         * optabs.def (extract_last_optab): New optab.
19610         * internal-fn.def (EXTRACT_LAST): New internal function.
19611         * internal-fn.c (cond_unary_direct): New macro.
19612         (expand_cond_unary_optab_fn): Likewise.
19613         (direct_cond_unary_optab_supported_p): Likewise.
19614         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19615         loops using EXTRACT_LAST.
19616         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19617         (extract_last_<mode>): ...this optab.
19618         (vec_extract<mode><Vel>): Update accordingly.
19620 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19621             Alan Hayward  <alan.hayward@arm.com>
19622             David Sherwood  <david.sherwood@arm.com>
19624         * target.def (empty_mask_is_expensive): New hook.
19625         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19626         * doc/tm.texi: Regenerate.
19627         * targhooks.h (default_empty_mask_is_expensive): Declare.
19628         * targhooks.c (default_empty_mask_is_expensive): New function.
19629         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19630         if the target says that empty masks are expensive.
19631         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19632         New function.
19633         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19635 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19636             Alan Hayward  <alan.hayward@arm.com>
19637             David Sherwood  <david.sherwood@arm.com>
19639         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19640         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19641         (vect_use_loop_mask_for_alignment_p): New function.
19642         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19643         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19644         niters_skip argument.  Make sure that the first niters_skip elements
19645         of the first iteration are inactive.
19646         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19647         Update call to vect_set_loop_masks_directly.
19648         (get_misalign_in_elems): New function, split out from...
19649         (vect_gen_prolog_loop_niters): ...here.
19650         (vect_update_init_of_dr): Take a code argument that specifies whether
19651         the adjustment should be added or subtracted.
19652         (vect_update_init_of_drs): Likewise.
19653         (vect_prepare_for_masked_peels): New function.
19654         (vect_do_peeling): Skip prologue peeling if we're using a mask
19655         instead.  Update call to vect_update_inits_of_drs.
19656         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19657         mask_skip_niters.
19658         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19659         alignment.  Do not include the number of peeled iterations in
19660         the minimum threshold in that case.
19661         (vectorizable_induction): Adjust the start value down by
19662         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19663         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19664         Take the number of skipped iterations into account when calculating
19665         the loop bounds.
19666         * tree-vect-stmts.c (vect_gen_while_not): New function.
19668 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19669             Alan Hayward  <alan.hayward@arm.com>
19670             David Sherwood  <david.sherwood@arm.com>
19672         * doc/sourcebuild.texi (vect_fully_masked): Document.
19673         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19674         default value to 0.
19675         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19676         split out from...
19677         (vect_analyze_loop_2): ...here. Don't check the vectorization
19678         factor against the number of loop iterations if the loop is
19679         fully-masked.
19681 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19682             Alan Hayward  <alan.hayward@arm.com>
19683             David Sherwood  <david.sherwood@arm.com>
19685         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19686         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19687         (dump_groups): Update accordingly.
19688         (iv_use::mem_type): New member variable.
19689         (address_p): New function.
19690         (record_use): Add a mem_type argument and initialize the new
19691         mem_type field.
19692         (record_group_use): Add a mem_type argument.  Use address_p.
19693         Remove obsolete null checks of base_object.  Update call to record_use.
19694         (find_interesting_uses_op): Update call to record_group_use.
19695         (find_interesting_uses_cond): Likewise.
19696         (find_interesting_uses_address): Likewise.
19697         (get_mem_type_for_internal_fn): New function.
19698         (find_address_like_use): Likewise.
19699         (find_interesting_uses_stmt): Try find_address_like_use before
19700         calling find_interesting_uses_op.
19701         (addr_offset_valid_p): Use the iv mem_type field as the type
19702         of the addressed memory.
19703         (add_autoinc_candidates): Likewise.
19704         (get_address_cost): Likewise.
19705         (split_small_address_groups_p): Use address_p.
19706         (split_address_groups): Likewise.
19707         (add_iv_candidate_for_use): Likewise.
19708         (autoinc_possible_for_pair): Likewise.
19709         (rewrite_groups): Likewise.
19710         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19711         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19712         (get_alias_ptr_type_for_ptr_address): New function.
19713         (rewrite_use_address): Rewrite address uses in calls that were
19714         identified by find_address_like_use.
19716 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19717             Alan Hayward  <alan.hayward@arm.com>
19718             David Sherwood  <david.sherwood@arm.com>
19720         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19721         TARGET_MEM_REFs.
19722         * gimple-expr.h (is_gimple_addressable: Likewise.
19723         * gimple-expr.c (is_gimple_address): Likewise.
19724         * internal-fn.c (expand_call_mem_ref): New function.
19725         (expand_mask_load_optab_fn): Use it.
19726         (expand_mask_store_optab_fn): Likewise.
19728 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19729             Alan Hayward  <alan.hayward@arm.com>
19730             David Sherwood  <david.sherwood@arm.com>
19732         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19733         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19734         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19735         (cond_umax@var{mode}): Document.
19736         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19737         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19738         (cond_umin_optab, cond_umax_optab): New optabs.
19739         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19740         (COND_IOR, COND_XOR): New internal functions.
19741         * internal-fn.h (get_conditional_internal_fn): Declare.
19742         * internal-fn.c (cond_binary_direct): New macro.
19743         (expand_cond_binary_optab_fn): Likewise.
19744         (direct_cond_binary_optab_supported_p): Likewise.
19745         (get_conditional_internal_fn): New function.
19746         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19747         Cope with reduction statements that are vectorized as calls rather
19748         than assignments.
19749         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19750         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19751         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19752         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19753         (UNSPEC_COND_EOR): New unspecs.
19754         (optab): Add mappings for them.
19755         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19756         (sve_int_op, sve_fp_op): New int attributes.
19758 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19759             Alan Hayward  <alan.hayward@arm.com>
19760             David Sherwood  <david.sherwood@arm.com>
19762         * optabs.def (while_ult_optab): New optab.
19763         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19764         * internal-fn.def (WHILE_ULT): New internal function.
19765         * internal-fn.h (direct_internal_fn_supported_p): New override
19766         that takes two types as argument.
19767         * internal-fn.c (while_direct): New macro.
19768         (expand_while_optab_fn): New function.
19769         (convert_optab_supported_p): Likewise.
19770         (direct_while_optab_supported_p): New macro.
19771         * wide-int.h (wi::udiv_ceil): New function.
19772         * tree-vectorizer.h (rgroup_masks): New structure.
19773         (vec_loop_masks): New typedef.
19774         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19775         and fully_masked_p.
19776         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19777         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19778         (vect_max_vf): New function.
19779         (slpeel_make_loop_iterate_ntimes): Delete.
19780         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19781         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19782         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19783         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19784         internal-fn.h, stor-layout.h and optabs-query.h.
19785         (vect_set_loop_mask): New function.
19786         (add_preheader_seq): Likewise.
19787         (add_header_seq): Likewise.
19788         (interleave_supported_p): Likewise.
19789         (vect_maybe_permute_loop_masks): Likewise.
19790         (vect_set_loop_masks_directly): Likewise.
19791         (vect_set_loop_condition_masked): Likewise.
19792         (vect_set_loop_condition_unmasked): New function, split out from
19793         slpeel_make_loop_iterate_ntimes.
19794         (slpeel_make_loop_iterate_ntimes): Rename to..
19795         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19796         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19797         (vect_do_peeling): Update call accordingly.
19798         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19799         loops.
19800         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19801         mask_compare_type, can_fully_mask_p and fully_masked_p.
19802         (release_vec_loop_masks): New function.
19803         (_loop_vec_info): Use it to free the loop masks.
19804         (can_produce_all_loop_masks_p): New function.
19805         (vect_get_max_nscalars_per_iter): Likewise.
19806         (vect_verify_full_masking): Likewise.
19807         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19808         retries, and free the mask rgroups before retrying.  Check loop-wide
19809         reasons for disallowing fully-masked loops.  Make the final decision
19810         about whether use a fully-masked loop or not.
19811         (vect_estimate_min_profitable_iters): Do not assume that peeling
19812         for the number of iterations will be needed for fully-masked loops.
19813         (vectorizable_reduction): Disable fully-masked loops.
19814         (vectorizable_live_operation): Likewise.
19815         (vect_halve_mask_nunits): New function.
19816         (vect_double_mask_nunits): Likewise.
19817         (vect_record_loop_mask): Likewise.
19818         (vect_get_loop_mask): Likewise.
19819         (vect_transform_loop): Handle the case in which the final loop
19820         iteration might handle a partial vector.  Call vect_set_loop_condition
19821         instead of slpeel_make_loop_iterate_ntimes.
19822         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19823         (check_load_store_masking): New function.
19824         (prepare_load_store_mask): Likewise.
19825         (vectorizable_store): Handle fully-masked loops.
19826         (vectorizable_load): Likewise.
19827         (supportable_widening_operation): Use vect_halve_mask_nunits for
19828         booleans.
19829         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19830         (vect_gen_while): New function.
19831         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19832         (aarch64_uqdec<mode>): New insn.
19834 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19835             Alan Hayward  <alan.hayward@arm.com>
19836             David Sherwood  <david.sherwood@arm.com>
19838         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19839         (reduc_xor_scal_optab): New optabs.
19840         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19841         (reduc_xor_scal_@var{m}): Document.
19842         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19843         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19844         internal functions.
19845         * fold-const-call.c (fold_const_call): Handle them.
19846         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19847         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19848         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19849         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19850         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19851         (UNSPEC_XORV): New unspecs.
19852         (optab): Add entries for them.
19853         (BITWISEV): New int iterator.
19854         (bit_reduc_op): New int attributes.
19856 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19857             Alan Hayward  <alan.hayward@arm.com>
19858             David Sherwood  <david.sherwood@arm.com>
19860         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19861         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19862         * optabs.def (vec_shl_insert_optab): New optab.
19863         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19864         (duplicate_and_interleave): Likewise.
19865         * tree-vect-loop.c: Include internal-fn.h.
19866         (neutral_op_for_slp_reduction): New function, split out from
19867         get_initial_defs_for_reduction.
19868         (get_initial_def_for_reduction): Handle option 2 for variable-length
19869         vectors by loading the neutral value into a vector and then shifting
19870         the initial value into element 0.
19871         (get_initial_defs_for_reduction): Replace the code argument with
19872         the neutral value calculated by neutral_op_for_slp_reduction.
19873         Use gimple_build_vector for constant-length vectors.
19874         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19875         but the first group_size elements have a neutral value.
19876         Use duplicate_and_interleave otherwise.
19877         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19878         Update call to get_initial_defs_for_reduction.  Handle SLP
19879         reductions for variable-length vectors by creating one vector
19880         result for each scalar result, with the elements associated
19881         with other scalar results stubbed out with the neutral value.
19882         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19883         Require IFN_VEC_SHL_INSERT for double reductions on
19884         variable-length vectors, or SLP reductions that have
19885         a neutral value.  Require can_duplicate_and_interleave_p
19886         support for variable-length unchained SLP reductions if there
19887         is no neutral value, such as for MIN/MAX reductions.  Also require
19888         the number of vector elements to be a multiple of the number of
19889         SLP statements when doing variable-length unchained SLP reductions.
19890         Update call to vect_create_epilog_for_reduction.
19891         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19892         and remove initial values.
19893         (duplicate_and_interleave): Make public.
19894         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19895         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19897 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19898             Alan Hayward  <alan.hayward@arm.com>
19899             David Sherwood  <david.sherwood@arm.com>
19901         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19902         (can_duplicate_and_interleave_p): New function.
19903         (vect_get_and_check_slp_defs): Take the vector of statements
19904         rather than just the current one.  Remove excess parentheses.
19905         Restriction rejectinon of vect_constant_def and vect_external_def
19906         for variable-length vectors to boolean types, or types for which
19907         can_duplicate_and_interleave_p is false.
19908         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19909         (duplicate_and_interleave): New function.
19910         (vect_get_constant_vectors): Use gimple_build_vector for
19911         constant-length vectors and suitable variable-length constant
19912         vectors.  Use duplicate_and_interleave for other variable-length
19913         vectors.  Don't defer the update when inserting new statements.
19915 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19916             Alan Hayward  <alan.hayward@arm.com>
19917             David Sherwood  <david.sherwood@arm.com>
19919         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19920         min_profitable_iters doesn't go negative.
19922 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19923             Alan Hayward  <alan.hayward@arm.com>
19924             David Sherwood  <david.sherwood@arm.com>
19926         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19927         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19928         * optabs.def (vec_mask_load_lanes_optab): New optab.
19929         (vec_mask_store_lanes_optab): Likewise.
19930         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19931         (MASK_STORE_LANES): Likewise.
19932         * internal-fn.c (mask_load_lanes_direct): New macro.
19933         (mask_store_lanes_direct): Likewise.
19934         (expand_mask_load_optab_fn): Handle masked operations.
19935         (expand_mask_load_lanes_optab_fn): New macro.
19936         (expand_mask_store_optab_fn): Handle masked operations.
19937         (expand_mask_store_lanes_optab_fn): New macro.
19938         (direct_mask_load_lanes_optab_supported_p): Likewise.
19939         (direct_mask_store_lanes_optab_supported_p): Likewise.
19940         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19941         parameter.
19942         (vect_load_lanes_supported): Likewise.
19943         * tree-vect-data-refs.c (strip_conversion): New function.
19944         (can_group_stmts_p): Likewise.
19945         (vect_analyze_data_ref_accesses): Use it instead of checking
19946         for a pair of assignments.
19947         (vect_store_lanes_supported): Take a masked_p parameter.
19948         (vect_load_lanes_supported): Likewise.
19949         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19950         vect_store_lanes_supported and vect_load_lanes_supported.
19951         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19952         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19953         parameter.  Don't allow gaps for masked accesses.
19954         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19955         and vect_load_lanes_supported.
19956         (get_load_store_type): Take a masked_p parameter and update
19957         call to get_group_load_store_type.
19958         (vectorizable_store): Update call to get_load_store_type.
19959         Handle IFN_MASK_STORE_LANES.
19960         (vectorizable_load): Update call to get_load_store_type.
19961         Handle IFN_MASK_LOAD_LANES.
19963 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19964             Alan Hayward  <alan.hayward@arm.com>
19965             David Sherwood  <david.sherwood@arm.com>
19967         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19968         modes for SVE.
19969         * config/aarch64/aarch64-protos.h
19970         (aarch64_sve_struct_memory_operand_p): Declare.
19971         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19972         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19973         (VPRED, vpred): Handle SVE structure modes.
19974         * config/aarch64/constraints.md (Utx): New constraint.
19975         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19976         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19977         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19978         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19979         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19980         structure modes.  Split into pieces after RA.
19981         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19982         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19983         New patterns.
19984         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19985         SVE structure modes.
19986         (aarch64_classify_address): Likewise.
19987         (sizetochar): Move earlier in file.
19988         (aarch64_print_operand): Handle SVE register lists.
19989         (aarch64_array_mode): New function.
19990         (aarch64_sve_struct_memory_operand_p): Likewise.
19991         (TARGET_ARRAY_MODE): Redefine.
19993 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19994             Alan Hayward  <alan.hayward@arm.com>
19995             David Sherwood  <david.sherwood@arm.com>
19997         * target.def (array_mode): New target hook.
19998         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19999         * doc/tm.texi: Regenerate.
20000         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
20001         * hooks.c (hook_optmode_mode_uhwi_none): New function.
20002         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
20003         targetm.array_mode.
20004         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
20005         type sizes.
20007 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20008             Alan Hayward  <alan.hayward@arm.com>
20009             David Sherwood  <david.sherwood@arm.com>
20011         * fold-const.c (fold_binary_loc): Check the argument types
20012         rather than the result type when testing for a vector operation.
20014 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20016         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
20017         * doc/tm.texi: Regenerate.
20019 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20020             Alan Hayward  <alan.hayward@arm.com>
20021             David Sherwood  <david.sherwood@arm.com>
20023         * doc/invoke.texi (-msve-vector-bits=): Document new option.
20024         (sve): Document new AArch64 extension.
20025         * doc/md.texi (w): Extend the description of the AArch64
20026         constraint to include SVE vectors.
20027         (Upl, Upa): Document new AArch64 predicate constraints.
20028         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
20029         enum.
20030         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
20031         (msve-vector-bits=): New option.
20032         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
20033         SVE when these are disabled.
20034         (sve): New extension.
20035         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
20036         modes.  Adjust their number of units based on aarch64_sve_vg.
20037         (MAX_BITSIZE_MODE_ANY_MODE): Define.
20038         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
20039         aarch64_addr_query_type.
20040         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
20041         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
20042         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
20043         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
20044         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
20045         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
20046         (aarch64_simd_imm_zero_p): Delete.
20047         (aarch64_check_zero_based_sve_index_immediate): Declare.
20048         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20049         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20050         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20051         (aarch64_sve_float_mul_immediate_p): Likewise.
20052         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20053         rather than an rtx.
20054         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
20055         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
20056         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
20057         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
20058         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
20059         (aarch64_regmode_natural_size): Likewise.
20060         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
20061         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
20062         left one place.
20063         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
20064         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
20065         for VG and the SVE predicate registers.
20066         (V_ALIASES): Add a "z"-prefixed alias.
20067         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
20068         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
20069         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
20070         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
20071         (REG_CLASS_NAMES): Add entries for them.
20072         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
20073         and the predicate registers.
20074         (aarch64_sve_vg): Declare.
20075         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
20076         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
20077         (REGMODE_NATURAL_SIZE): Define.
20078         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
20079         SVE macros.
20080         * config/aarch64/aarch64.c: Include cfgrtl.h.
20081         (simd_immediate_info): Add a constructor for series vectors,
20082         and an associated step field.
20083         (aarch64_sve_vg): New variable.
20084         (aarch64_dbx_register_number): Handle VG and the predicate registers.
20085         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
20086         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
20087         (VEC_ANY_DATA, VEC_STRUCT): New constants.
20088         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
20089         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
20090         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
20091         (aarch64_get_mask_mode): New functions.
20092         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
20093         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
20094         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
20095         predicate modes and predicate registers.  Explicitly restrict
20096         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
20097         to store a vector mode if it is recognized by
20098         aarch64_classify_vector_mode.
20099         (aarch64_regmode_natural_size): New function.
20100         (aarch64_hard_regno_caller_save_mode): Return the original mode
20101         for predicates.
20102         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
20103         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
20104         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
20105         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
20106         functions.
20107         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
20108         does not overlap dest if the function is frame-related.  Handle
20109         SVE constants.
20110         (aarch64_split_add_offset): New function.
20111         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
20112         them aarch64_add_offset.
20113         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20114         and update call to aarch64_sub_sp.
20115         (aarch64_add_cfa_expression): New function.
20116         (aarch64_expand_prologue): Pass extra temporary registers to the
20117         functions above.  Handle the case in which we need to emit new
20118         DW_CFA_expressions for registers that were originally saved
20119         relative to the stack pointer, but now have to be expressed
20120         relative to the frame pointer.
20121         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20122         functions above.
20123         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20124         IP0 and IP1 values for SVE frames.
20125         (aarch64_expand_vec_series): New function.
20126         (aarch64_expand_sve_widened_duplicate): Likewise.
20127         (aarch64_expand_sve_const_vector): Likewise.
20128         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20129         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20130         into the register, rather than emitting a SET directly.
20131         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20132         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20133         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20134         (offset_9bit_signed_scaled_p): New functions.
20135         (aarch64_replicate_bitmask_imm): New function.
20136         (aarch64_bitmask_imm): Use it.
20137         (aarch64_cannot_force_const_mem): Reject expressions involving
20138         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20139         (aarch64_classify_index): Handle SVE indices, by requiring
20140         a plain register index with a scale that matches the element size.
20141         (aarch64_classify_address): Handle SVE addresses.  Assert that
20142         the mode of the address is VOIDmode or an integer mode.
20143         Update call to aarch64_classify_symbol.
20144         (aarch64_classify_symbolic_expression): Update call to
20145         aarch64_classify_symbol.
20146         (aarch64_const_vec_all_in_range_p): New function.
20147         (aarch64_print_vector_float_operand): Likewise.
20148         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20149         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20150         and the FP immediates 1.0 and 0.5.
20151         (aarch64_print_address_internal): Handle SVE addresses.
20152         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20153         (aarch64_regno_regclass): Handle predicate registers.
20154         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20155         data modes.
20156         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20157         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20158         (aarch64_convert_sve_vector_bits): New function.
20159         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20160         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20161         rather than an rtx.
20162         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20163         Handle SVE vector and predicate modes.  Accept VL-based constants
20164         that need only one temporary register, and VL offsets that require
20165         no temporary registers.
20166         (aarch64_conditional_register_usage): Mark the predicate registers
20167         as fixed if SVE isn't available.
20168         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20169         Return true for SVE vector and predicate modes.
20170         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20171         rather than an unsigned int.  Handle SVE modes.
20172         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20173         SVE modes.
20174         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20175         if SVE is enabled.
20176         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20177         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20178         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20179         (aarch64_sve_float_mul_immediate_p): New functions.
20180         (aarch64_sve_valid_immediate): New function.
20181         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20182         Explicitly reject structure modes.  Check for INDEX constants.
20183         Handle PTRUE and PFALSE constants.
20184         (aarch64_check_zero_based_sve_index_immediate): New function.
20185         (aarch64_simd_imm_zero_p): Delete.
20186         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20187         vector modes.  Accept constants in the range of CNT[BHWD].
20188         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20189         ask for an Advanced SIMD mode.
20190         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20191         (aarch64_simd_vector_alignment): Handle SVE predicates.
20192         (aarch64_vectorize_preferred_vector_alignment): New function.
20193         (aarch64_simd_vector_alignment_reachable): Use it instead of
20194         the vector size.
20195         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20196         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20197         functions.
20198         (MAX_VECT_LEN): Delete.
20199         (expand_vec_perm_d): Add a vec_flags field.
20200         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20201         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20202         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20203         for SVE modes.
20204         (aarch64_evpc_rev): Rename to...
20205         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20206         (aarch64_evpc_rev_global): New function.
20207         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20208         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20209         MAX_VECT_LEN.
20210         (aarch64_evpc_sve_tbl): New function.
20211         (aarch64_expand_vec_perm_const_1): Update after rename of
20212         aarch64_evpc_rev.  Handle SVE permutes too, trying
20213         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20214         than aarch64_evpc_tbl.
20215         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20216         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20217         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20218         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20219         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20220         (aarch64_expand_sve_vcond): New functions.
20221         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20222         of aarch64_vector_mode_p.
20223         (aarch64_dwarf_poly_indeterminate_value): New function.
20224         (aarch64_compute_pressure_classes): Likewise.
20225         (aarch64_can_change_mode_class): Likewise.
20226         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20227         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20228         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20229         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20230         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20231         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20232         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20233         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20234         constraints.
20235         (Dn, Dl, Dr): Accept const as well as const_vector.
20236         (Dz): Likewise.  Compare against CONST0_RTX.
20237         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20238         of "vector" where appropriate.
20239         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20240         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20241         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20242         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20243         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20244         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20245         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20246         (v_int_equiv): Extend to SVE modes.
20247         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20248         mode attributes.
20249         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20250         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20251         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20252         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20253         (SVE_COND_FP_CMP): New int iterators.
20254         (perm_hilo): Handle the new unpack unspecs.
20255         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20256         attributes.
20257         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20258         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20259         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20260         (aarch64_equality_operator, aarch64_constant_vector_operand)
20261         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20262         (aarch64_sve_nonimmediate_operand): Likewise.
20263         (aarch64_sve_general_operand): Likewise.
20264         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20265         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20266         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20267         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20268         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20269         (aarch64_sve_float_arith_immediate): Likewise.
20270         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20271         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20272         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20273         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20274         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20275         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20276         (aarch64_sve_float_arith_operand): Likewise.
20277         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20278         (aarch64_sve_float_mul_operand): Likewise.
20279         (aarch64_sve_vec_perm_operand): Likewise.
20280         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20281         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20282         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20283         as well as const_vector.
20284         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20285         in file.  Use CONST0_RTX and CONSTM1_RTX.
20286         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20287         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20288         Use aarch64_simd_imm_zero.
20289         * config/aarch64/aarch64-sve.md: New file.
20290         * config/aarch64/aarch64.md: Include it.
20291         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20292         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20293         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20294         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20295         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20296         (sve): New attribute.
20297         (enabled): Disable instructions with the sve attribute unless
20298         TARGET_SVE.
20299         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20300         aarch64_expand_mov_immediate.
20301         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20302         CNT[BHSD] immediates.
20303         (movti): Split CONST_POLY_INT moves into two halves.
20304         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20305         Split additions that need a temporary here if the destination
20306         is the stack pointer.
20307         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20308         (*add<mode>3_poly_1): New instruction.
20309         (set_clobber_cc): New expander.
20311 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20313         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20314         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20315         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20316         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20317         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20318         Change innermode from fixed_mode_size to machine_mode.
20319         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20320         subreg of a variable-length CONST_VECTOR.
20322 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20323             Alan Hayward  <alan.hayward@arm.com>
20324             David Sherwood  <david.sherwood@arm.com>
20326         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20327         (add_offset_to_base): New function, split out from...
20328         (create_mem_ref): ...here.  When handling a scale other than 1,
20329         check first whether the address is valid without the offset.
20330         Add it into the base if so, leaving the index and scale as-is.
20332 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20334         PR c++/83778
20335         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20336         fold_for_warn before checking if arg2 is INTEGER_CST.
20338 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20340         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20341         (store_multiple_operation): Delete.
20342         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20343         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20344         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20345         guarded by TARGET_STRING.
20346         (rs6000_output_load_multiple): Delete.
20347         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20348         OPTION_MASK_STRING / TARGET_STRING handling.
20349         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20350         (const rs6000_opt_masks) <"string">: Change mask to 0.
20351         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20352         (MASK_STRING): Delete.
20353         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20354         parts.  Simplify.
20355         (load_multiple): Delete.
20356         (*ldmsi8): Delete.
20357         (*ldmsi7): Delete.
20358         (*ldmsi6): Delete.
20359         (*ldmsi5): Delete.
20360         (*ldmsi4): Delete.
20361         (*ldmsi3): Delete.
20362         (store_multiple): Delete.
20363         (*stmsi8): Delete.
20364         (*stmsi7): Delete.
20365         (*stmsi6): Delete.
20366         (*stmsi5): Delete.
20367         (*stmsi4): Delete.
20368         (*stmsi3): Delete.
20369         (movmemsi_8reg): Delete.
20370         (corresponding unnamed define_insn): Delete.
20371         (movmemsi_6reg): Delete.
20372         (corresponding unnamed define_insn): Delete.
20373         (movmemsi_4reg): Delete.
20374         (corresponding unnamed define_insn): Delete.
20375         (movmemsi_2reg): Delete.
20376         (corresponding unnamed define_insn): Delete.
20377         (movmemsi_1reg): Delete.
20378         (corresponding unnamed define_insn): Delete.
20379         * config/rs6000/rs6000.opt (mno-string): New.
20380         (mstring): Replace by deprecation warning stub.
20381         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20383 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20385         * regrename.c (regrename_do_replace): If replacing the same
20386         reg multiple times, try to reuse last created gen_raw_REG.
20388         PR debug/81155
20389         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20390         main to workaround a bug in GDB.
20392 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20394         PR target/83737
20395         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20397 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20399         PR rtl-optimization/80481
20400         * ira-color.c (get_cap_member): New function.
20401         (allocnos_conflict_by_live_ranges_p): Use it.
20402         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20403         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20405 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20407         PR target/83628
20408         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20409         (*saddl_se_1): Ditto.
20410         (*ssubsi_1): Ditto.
20411         (*ssubl_se_1): Ditto.
20413 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20415         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20416         rather than wi::to_widest for DR_INITs.
20417         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20418         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20419         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20420         INTEGER_CSTs.
20421         (vect_analyze_group_access_1): Note that here.
20423 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20425         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20426         polynomial type sizes.
20428 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20430         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20431         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20432         (gimple_add_tmp_var): Likewise.
20434 2018-01-12  Martin Liska  <mliska@suse.cz>
20436         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20437         (gimple_alloc_sizes): Likewise.
20438         (dump_gimple_statistics): Use PRIu64 in printf format.
20439         * gimple.h: Change uint64_t to int.
20441 2018-01-12  Martin Liska  <mliska@suse.cz>
20443         * tree-core.h: Use uint64_t instead of int.
20444         * tree.c (tree_node_counts): Likewise.
20445         (tree_node_sizes): Likewise.
20446         (dump_tree_statistics): Use PRIu64 in printf format.
20448 2018-01-12  Martin Liska  <mliska@suse.cz>
20450         * Makefile.in: As qsort_chk is implemented in vec.c, add
20451         vec.o to linkage of gencfn-macros.
20452         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20453         passing the info to record_node_allocation_statistics.
20454         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20455         and pass the info.
20456         * ggc-common.c (struct ggc_usage): Add operator== and use
20457         it in operator< and compare function.
20458         * mem-stats.h (struct mem_usage): Likewise.
20459         * vec.c (struct vec_usage): Remove operator< and compare
20460         function. Can be simply inherited.
20462 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20464         PR target/81616
20465         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20466         * tree-ssa-math-opts.c: Include domwalk.h.
20467         (convert_mult_to_fma_1): New function.
20468         (fma_transformation_info): New type.
20469         (fma_deferring_state): Likewise.
20470         (cancel_fma_deferring): New function.
20471         (result_of_phi): Likewise.
20472         (last_fma_candidate_feeds_initial_phi): Likewise.
20473         (convert_mult_to_fma): Added deferring logic, split actual
20474         transformation to convert_mult_to_fma_1.
20475         (math_opts_dom_walker): New type.
20476         (math_opts_dom_walker::after_dom_children): New method, body moved
20477         here from pass_optimize_widening_mul::execute, added deferring logic
20478         bits.
20479         (pass_optimize_widening_mul::execute): Moved most of code to
20480         math_opts_dom_walker::after_dom_children.
20481         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20482         * config/i386/i386.c (ix86_option_override_internal): Added
20483         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20485 2018-01-12  Richard Biener  <rguenther@suse.de>
20487         PR debug/83157
20488         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20489         inline instance vars.
20491 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20493         PR target/81819
20494         * config/rx/rx.c (rx_is_restricted_memory_address):
20495         Handle SUBREG case.
20497 2018-01-12  Richard Biener  <rguenther@suse.de>
20499         PR tree-optimization/80846
20500         * target.def (split_reduction): New target hook.
20501         * targhooks.c (default_split_reduction): New function.
20502         * targhooks.h (default_split_reduction): Declare.
20503         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20504         target requests first reduce vectors by combining low and high
20505         parts.
20506         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20507         (get_vectype_for_scalar_type_and_size): Export.
20508         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20509         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20510         * doc/tm.texi: Regenerate.
20511         * config/i386/i386.c (ix86_split_reduction): Implement
20512         TARGET_VECTORIZE_SPLIT_REDUCTION.
20514 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20516         PR target/83368
20517         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20518         in PIC mode except for TARGET_VXWORKS_RTP.
20519         * config/sparc/sparc.c: Include cfgrtl.h.
20520         (TARGET_INIT_PIC_REG): Define.
20521         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20522         (sparc_pic_register_p): New predicate.
20523         (sparc_legitimate_address_p): Use it.
20524         (sparc_legitimize_pic_address): Likewise.
20525         (sparc_delegitimize_address): Likewise.
20526         (sparc_mode_dependent_address_p): Likewise.
20527         (gen_load_pcrel_sym): Remove 4th parameter.
20528         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20529         (sparc_expand_prologue): Do not call load_got_register here.
20530         (sparc_flat_expand_prologue): Likewise.
20531         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20532         (sparc_use_pseudo_pic_reg): New function.
20533         (sparc_init_pic_reg): Likewise.
20534         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20535         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20537 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20539         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20540         Add item for branch_cost.
20542 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20544         PR rtl-optimization/83565
20545         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20546         not extend the result to a larger mode for rotate operations.
20547         (num_sign_bit_copies1): Likewise.
20549 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20551         PR target/40411
20552         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20553         -symbolic.
20554         Use values-Xc.o for -pedantic.
20555         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20557 2018-01-12  Martin Liska  <mliska@suse.cz>
20559         PR ipa/83054
20560         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20561         New function.
20562         (possible_polymorphic_call_targets): Use it.
20563         (ipa_devirt): Likewise.
20565 2018-01-12  Martin Liska  <mliska@suse.cz>
20567         * profile-count.h (enum profile_quality): Use 0 as invalid
20568         enum value of profile_quality.
20570 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20572         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20573         -mext-string options.
20575 2018-01-12  Richard Biener  <rguenther@suse.de>
20577         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20578         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20579         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20580         Likewise.
20581         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20583 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20585         * configure.ac (--with-long-double-format): Add support for the
20586         configuration option to change the default long double format on
20587         PowerPC systems.
20588         * config.gcc (powerpc*-linux*-*): Likewise.
20589         * configure: Regenerate.
20590         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20591         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20592         used without modification.
20594 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20596         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20597         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20598         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20599         MISC_BUILTIN_SPEC_BARRIER.
20600         (rs6000_init_builtins): Likewise.
20601         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20602         enum value.
20603         (speculation_barrier): New define_insn.
20604         * doc/extend.texi: Document __builtin_speculation_barrier.
20606 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20608         PR target/83203
20609         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20610         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20611         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20612         iterators.
20613         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20614         integral modes instead of "ss" and "sd".
20615         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20616         vectors with 32-bit and 64-bit elements.
20617         (vecdupssescalarmodesuffix): New mode attribute.
20618         (vec_dup<mode>): Use it.
20620 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20622         PR target/83330
20623         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20624         frame if argument is passed on stack.
20626 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20628         PR target/82682
20629         * ree.c (combine_reaching_defs): Optimize also
20630         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20631         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20633 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20635         PR middle-end/83189
20636         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20638 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20640         PR middle-end/83718
20641         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20642         after they are computed.
20644 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20646         PR tree-optimization/83695
20647         * gimple-loop-linterchange.cc
20648         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20649         reset cached scev information after interchange.
20650         (pass_linterchange::execute): Remove call to scev_reset_htab.
20652 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20654         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20655         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20656         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20657         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20658         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20659         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20660         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20661         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20662         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20663         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20664         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20665         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20666         (V_lane_reg): Likewise.
20667         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20668         New define_expand.
20669         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20670         (vfmal_lane_low<mode>_intrinsic,
20671         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20672         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20673         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20674         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20675         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20676         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20678 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20680         * config/arm/arm-cpus.in (fp16fml): New feature.
20681         (ALL_SIMD): Add fp16fml.
20682         (armv8.2-a): Add fp16fml as an option.
20683         (armv8.3-a): Likewise.
20684         (armv8.4-a): Add fp16fml as part of fp16.
20685         * config/arm/arm.h (TARGET_FP16FML): Define.
20686         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20687         when appropriate.
20688         * config/arm/arm-modes.def (V2HF): Define.
20689         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20690         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20691         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20692         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20693         vfmsl_low, vfmsl_high): New set of builtins.
20694         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20695         (vfml_op): New code attribute.
20696         (VFMLHALVES): New int iterator.
20697         (VFML, VFMLSEL): New mode attributes.
20698         (V_reg): Define mapping for V2HF.
20699         (V_hi, V_lo): New mode attributes.
20700         (VF_constraint): Likewise.
20701         (vfml_half, vfml_half_selector): New int attributes.
20702         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20703         define_expand.
20704         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20705         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20706         New define_insn.
20707         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20708         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20709         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20710         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20711         documentation.
20712         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20713         Document new effective target and option set.
20715 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20717         * config/arm/arm-cpus.in (armv8_4): New feature.
20718         (ARMv8_4a): New fgroup.
20719         (armv8.4-a): New arch.
20720         * config/arm/arm-tables.opt: Regenerate.
20721         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20722         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20723         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20724         Add matching rules for -march=armv8.4-a and extensions.
20725         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20727 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20729         PR target/81821
20730         * config/rx/rx.md (BW): New mode attribute.
20731         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20733 2018-01-11  Richard Biener  <rguenther@suse.de>
20735         PR tree-optimization/83435
20736         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20737         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20738         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20740 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20741             Alan Hayward  <alan.hayward@arm.com>
20742             David Sherwood  <david.sherwood@arm.com>
20744         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20745         field.
20746         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20747         (aarch64_print_address_internal): Use it to check for a zero offset.
20749 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20750             Alan Hayward  <alan.hayward@arm.com>
20751             David Sherwood  <david.sherwood@arm.com>
20753         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20754         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20755         Return a poly_int64 rather than a HOST_WIDE_INT.
20756         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20757         rather than a HOST_WIDE_INT.
20758         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20759         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20760         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20761         final_offset from HOST_WIDE_INT to poly_int64.
20762         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20763         to_constant when getting the number of units in an Advanced SIMD
20764         mode.
20765         (aarch64_builtin_vectorized_function): Check for a constant number
20766         of units.
20767         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20768         GET_MODE_SIZE.
20769         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20770         attribute instead of GET_MODE_NUNITS.
20771         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20772         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20773         GET_MODE_SIZE for fixed-size registers.
20774         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20775         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20776         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20777         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20778         (aarch64_print_operand, aarch64_print_address_internal)
20779         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20780         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20781         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20782         Handle polynomial GET_MODE_SIZE.
20783         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20784         wider than SImode without modification.
20785         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20786         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20787         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20788         passing and returning SVE modes.
20789         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20790         rather than GEN_INT.
20791         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20792         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20793         (aarch64_allocate_and_probe_stack_space): Likewise.
20794         (aarch64_layout_frame): Cope with polynomial offsets.
20795         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20796         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20797         polynomial offsets.
20798         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20799         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20800         poly_int64 rather than a HOST_WIDE_INT.
20801         (aarch64_get_separate_components, aarch64_process_components)
20802         (aarch64_expand_prologue, aarch64_expand_epilogue)
20803         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20804         (aarch64_anchor_offset): New function, split out from...
20805         (aarch64_legitimize_address): ...here.
20806         (aarch64_builtin_vectorization_cost): Handle polynomial
20807         TYPE_VECTOR_SUBPARTS.
20808         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20809         GET_MODE_NUNITS.
20810         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20811         number of elements from the PARALLEL rather than the mode.
20812         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20813         rather than GET_MODE_BITSIZE.
20814         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20815         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20816         (aarch64_expand_vec_perm_const_1): Handle polynomial
20817         d->perm.length () and d->perm elements.
20818         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20819         Apply to_constant to d->perm elements.
20820         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20821         polynomial CONST_VECTOR_NUNITS.
20822         (aarch64_move_pointer): Take amount as a poly_int64 rather
20823         than an int.
20824         (aarch64_progress_pointer): Avoid temporary variable.
20825         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20826         the mode attribute instead of GET_MODE.
20828 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20829             Alan Hayward  <alan.hayward@arm.com>
20830             David Sherwood  <david.sherwood@arm.com>
20832         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20833         x exists before using it.
20834         (aarch64_add_constant_internal): Rename to...
20835         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20836         src and dest rtxes.  Handle the case in which they're different,
20837         including when the offset is zero.  Replace scratchreg with an rtx.
20838         Use 2 additions if there is no spare register into which we can
20839         move a 16-bit constant.
20840         (aarch64_add_constant): Delete.
20841         (aarch64_add_offset): Replace reg with separate src and dest
20842         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20843         Use aarch64_add_offset_1.
20844         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20845         an rtx rather than an int.  Take the delta as a poly_int64
20846         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20847         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20848         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20849         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20850         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20851         and aarch64_add_sp.
20852         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20853         aarch64_add_constant.
20855 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20857         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20858         Use scalar_float_mode.
20860 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20862         * config/aarch64/aarch64-simd.md
20863         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20864         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20865         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20866         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20867         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20868         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20869         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20870         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20871         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20872         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20874 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20876         PR target/83514
20877         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20878         targ_options->x_arm_arch_string is non NULL.
20880 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20882         * config/aarch64/aarch64.h
20883         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20885 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20887         PR target/82096
20888         * expmed.c (emit_store_flag_force): Swap if const op0
20889         and change VOIDmode to mode of op0.
20891 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20893         PR rtl-optimization/83761
20894         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20895         than bytes to mode_for_size.
20897 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20899         PR middle-end/83189
20900         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20901         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20902         profile.
20904 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20906         PR middle-end/83575
20907         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20908         when in layout mode.
20909         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20910         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20911         partition fixup.
20913 2018-01-10  Michael Collison  <michael.collison@arm.com>
20915         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20916         * config/aarch64/aarch64-option-extension.def: Add
20917         AARCH64_OPT_EXTENSION of 'fp16fml'.
20918         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20919         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20920         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20921         * config/aarch64/constraints.md (Ui7): New constraint.
20922         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20923         (VFMLA_SEL_W): Ditto.
20924         (f16quad): Ditto.
20925         (f16mac1): Ditto.
20926         (VFMLA16_LOW): New int iterator.
20927         (VFMLA16_HIGH): Ditto.
20928         (UNSPEC_FMLAL): New unspec.
20929         (UNSPEC_FMLSL): Ditto.
20930         (UNSPEC_FMLAL2): Ditto.
20931         (UNSPEC_FMLSL2): Ditto.
20932         (f16mac): New code attribute.
20933         * config/aarch64/aarch64-simd-builtins.def
20934         (aarch64_fmlal_lowv2sf): Ditto.
20935         (aarch64_fmlsl_lowv2sf): Ditto.
20936         (aarch64_fmlalq_lowv4sf): Ditto.
20937         (aarch64_fmlslq_lowv4sf): Ditto.
20938         (aarch64_fmlal_highv2sf): Ditto.
20939         (aarch64_fmlsl_highv2sf): Ditto.
20940         (aarch64_fmlalq_highv4sf): Ditto.
20941         (aarch64_fmlslq_highv4sf): Ditto.
20942         (aarch64_fmlal_lane_lowv2sf): Ditto.
20943         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20944         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20945         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20946         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20947         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20948         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20949         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20950         (aarch64_fmlal_lane_highv2sf): Ditto.
20951         (aarch64_fmlsl_lane_highv2sf): Ditto.
20952         (aarch64_fmlal_laneq_highv2sf): Ditto.
20953         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20954         (aarch64_fmlalq_lane_highv4sf): Ditto.
20955         (aarch64_fmlsl_lane_highv4sf): Ditto.
20956         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20957         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20958         * config/aarch64/aarch64-simd.md:
20959         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20960         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20961         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20962         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20963         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20964         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20965         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20966         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20967         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20968         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20969         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20970         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20971         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20972         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20973         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20974         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20975         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20976         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20977         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20978         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20979         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20980         (vfmlsl_low_u32): Ditto.
20981         (vfmlalq_low_u32): Ditto.
20982         (vfmlslq_low_u32): Ditto.
20983         (vfmlal_high_u32): Ditto.
20984         (vfmlsl_high_u32): Ditto.
20985         (vfmlalq_high_u32): Ditto.
20986         (vfmlslq_high_u32): Ditto.
20987         (vfmlal_lane_low_u32): Ditto.
20988         (vfmlsl_lane_low_u32): Ditto.
20989         (vfmlal_laneq_low_u32): Ditto.
20990         (vfmlsl_laneq_low_u32): Ditto.
20991         (vfmlalq_lane_low_u32): Ditto.
20992         (vfmlslq_lane_low_u32): Ditto.
20993         (vfmlalq_laneq_low_u32): Ditto.
20994         (vfmlslq_laneq_low_u32): Ditto.
20995         (vfmlal_lane_high_u32): Ditto.
20996         (vfmlsl_lane_high_u32): Ditto.
20997         (vfmlal_laneq_high_u32): Ditto.
20998         (vfmlsl_laneq_high_u32): Ditto.
20999         (vfmlalq_lane_high_u32): Ditto.
21000         (vfmlslq_lane_high_u32): Ditto.
21001         (vfmlalq_laneq_high_u32): Ditto.
21002         (vfmlslq_laneq_high_u32): Ditto.
21003         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
21004         (AARCH64_FL_FOR_ARCH8_4): New.
21005         (AARCH64_ISA_F16FML): New ISA flag.
21006         (TARGET_F16FML): New feature flag for fp16fml.
21007         (doc/invoke.texi): Document new fp16fml option.
21009 2018-01-10  Michael Collison  <michael.collison@arm.com>
21011         * config/aarch64/aarch64-builtins.c:
21012         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
21013         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21014         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
21015         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
21016         (AARCH64_ISA_SHA3): New ISA flag.
21017         (TARGET_SHA3): New feature flag for sha3.
21018         * config/aarch64/iterators.md (sha512_op): New int attribute.
21019         (CRYPTO_SHA512): New int iterator.
21020         (UNSPEC_SHA512H): New unspec.
21021         (UNSPEC_SHA512H2): Ditto.
21022         (UNSPEC_SHA512SU0): Ditto.
21023         (UNSPEC_SHA512SU1): Ditto.
21024         * config/aarch64/aarch64-simd-builtins.def
21025         (aarch64_crypto_sha512hqv2di): New builtin.
21026         (aarch64_crypto_sha512h2qv2di): Ditto.
21027         (aarch64_crypto_sha512su0qv2di): Ditto.
21028         (aarch64_crypto_sha512su1qv2di): Ditto.
21029         (aarch64_eor3qv8hi): Ditto.
21030         (aarch64_rax1qv2di): Ditto.
21031         (aarch64_xarqv2di): Ditto.
21032         (aarch64_bcaxqv8hi): Ditto.
21033         * config/aarch64/aarch64-simd.md:
21034         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
21035         (aarch64_crypto_sha512su0qv2di): Ditto.
21036         (aarch64_crypto_sha512su1qv2di): Ditto.
21037         (aarch64_eor3qv8hi): Ditto.
21038         (aarch64_rax1qv2di): Ditto.
21039         (aarch64_xarqv2di): Ditto.
21040         (aarch64_bcaxqv8hi): Ditto.
21041         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
21042         (vsha512h2q_u64): Ditto.
21043         (vsha512su0q_u64): Ditto.
21044         (vsha512su1q_u64): Ditto.
21045         (veor3q_u16): Ditto.
21046         (vrax1q_u64): Ditto.
21047         (vxarq_u64): Ditto.
21048         (vbcaxq_u16): Ditto.
21049         * config/arm/types.md (crypto_sha512): New type attribute.
21050         (crypto_sha3): Ditto.
21051         (doc/invoke.texi): Document new sha3 option.
21053 2018-01-10  Michael Collison  <michael.collison@arm.com>
21055         * config/aarch64/aarch64-builtins.c:
21056         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
21057         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21058         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
21059         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
21060         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
21061         (AARCH64_ISA_SM4): New ISA flag.
21062         (TARGET_SM4): New feature flag for sm4.
21063         * config/aarch64/aarch64-simd-builtins.def
21064         (aarch64_sm3ss1qv4si): Ditto.
21065         (aarch64_sm3tt1aq4si): Ditto.
21066         (aarch64_sm3tt1bq4si): Ditto.
21067         (aarch64_sm3tt2aq4si): Ditto.
21068         (aarch64_sm3tt2bq4si): Ditto.
21069         (aarch64_sm3partw1qv4si): Ditto.
21070         (aarch64_sm3partw2qv4si): Ditto.
21071         (aarch64_sm4eqv4si): Ditto.
21072         (aarch64_sm4ekeyqv4si): Ditto.
21073         * config/aarch64/aarch64-simd.md:
21074         (aarch64_sm3ss1qv4si): Ditto.
21075         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
21076         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
21077         (aarch64_sm4eqv4si): Ditto.
21078         (aarch64_sm4ekeyqv4si): Ditto.
21079         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
21080         (sm3part_op): Ditto.
21081         (CRYPTO_SM3TT): Ditto.
21082         (CRYPTO_SM3PART): Ditto.
21083         (UNSPEC_SM3SS1): New unspec.
21084         (UNSPEC_SM3TT1A): Ditto.
21085         (UNSPEC_SM3TT1B): Ditto.
21086         (UNSPEC_SM3TT2A): Ditto.
21087         (UNSPEC_SM3TT2B): Ditto.
21088         (UNSPEC_SM3PARTW1): Ditto.
21089         (UNSPEC_SM3PARTW2): Ditto.
21090         (UNSPEC_SM4E): Ditto.
21091         (UNSPEC_SM4EKEY): Ditto.
21092         * config/aarch64/constraints.md (Ui2): New constraint.
21093         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
21094         * config/arm/types.md (crypto_sm3): New type attribute.
21095         (crypto_sm4): Ditto.
21096         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
21097         (vsm3tt1aq_u32): Ditto.
21098         (vsm3tt1bq_u32): Ditto.
21099         (vsm3tt2aq_u32): Ditto.
21100         (vsm3tt2bq_u32): Ditto.
21101         (vsm3partw1q_u32): Ditto.
21102         (vsm3partw2q_u32): Ditto.
21103         (vsm4eq_u32): Ditto.
21104         (vsm4ekeyq_u32): Ditto.
21105         (doc/invoke.texi): Document new sm4 option.
21107 2018-01-10  Michael Collison  <michael.collison@arm.com>
21109         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
21110         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
21111         (AARCH64_FL_FOR_ARCH8_4): New.
21112         (AARCH64_FL_V8_4): New flag.
21113         (doc/invoke.texi): Document new armv8.4-a option.
21115 2018-01-10  Michael Collison  <michael.collison@arm.com>
21117         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21118         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21119         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21120         * config/aarch64/aarch64-option-extension.def: Add
21121         AARCH64_OPT_EXTENSION of 'sha2'.
21122         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21123         (crypto): Disable sha2 and aes if crypto disabled.
21124         (crypto): Enable aes and sha2 if enabled.
21125         (simd): Disable sha2 and aes if simd disabled.
21126         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21127         New flags.
21128         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21129         (TARGET_SHA2): New feature flag for sha2.
21130         (TARGET_AES): New feature flag for aes.
21131         * config/aarch64/aarch64-simd.md:
21132         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21133         conditional on TARGET_AES.
21134         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21135         (aarch64_crypto_sha1hsi): Make pattern conditional
21136         on TARGET_SHA2.
21137         (aarch64_crypto_sha1hv4si): Ditto.
21138         (aarch64_be_crypto_sha1hv4si): Ditto.
21139         (aarch64_crypto_sha1su1v4si): Ditto.
21140         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21141         (aarch64_crypto_sha1su0v4si): Ditto.
21142         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21143         (aarch64_crypto_sha256su0v4si): Ditto.
21144         (aarch64_crypto_sha256su1v4si): Ditto.
21145         (doc/invoke.texi): Document new aes and sha2 options.
21147 2018-01-10  Martin Sebor  <msebor@redhat.com>
21149         PR tree-optimization/83781
21150         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21151         as string arrays.
21153 2018-01-11  Martin Sebor  <msebor@gmail.com>
21154             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21156         PR tree-optimization/83501
21157         PR tree-optimization/81703
21159         * tree-ssa-strlen.c (get_string_cst): Rename...
21160         (get_string_len): ...to this.  Handle global constants.
21161         (handle_char_store): Adjust.
21163 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21164             Jim Wilson  <jimw@sifive.com>
21166         * config/riscv/riscv-protos.h (riscv_output_return): New.
21167         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21168         (riscv_attribute_table, riscv_output_return),
21169         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21170         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21171         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21172         function.
21173         (riscv_expand_prologue): Add early return for naked function.
21174         (riscv_expand_epilogue): Likewise.
21175         (riscv_function_ok_for_sibcall): Return false for naked function.
21176         (riscv_set_current_function): New.
21177         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21178         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21179         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21180         * doc/extend.texi (RISC-V Function Attributes): New.
21182 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21184         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21185         check for 128-bit long double before checking TCmode.
21186         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21187         128-bit long doubles before checking TFmode or TCmode.
21188         (FLOAT128_IBM_P): Likewise.
21190 2018-01-10  Martin Sebor  <msebor@redhat.com>
21192         PR tree-optimization/83671
21193         * builtins.c (c_strlen): Unconditionally return zero for the empty
21194         string.
21195         Use -Warray-bounds for warnings.
21196         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21197         for non-constant array indices with COMPONENT_REF, arrays of
21198         arrays, and pointers to arrays.
21199         (gimple_fold_builtin_strlen): Determine and set length range for
21200         non-constant character arrays.
21202 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21204         PR middle-end/81897
21205         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21206         empty blocks.
21208 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21210         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21212 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21214         PR target/83399
21215         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21216         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21217         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21218         indexed_or_indirect_operand predicate.
21219         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21220         (*vsx_le_perm_load_v8hi): Likewise.
21221         (*vsx_le_perm_load_v16qi): Likewise.
21222         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21223         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21224         (*vsx_le_perm_store_v8hi): Likewise.
21225         (*vsx_le_perm_store_v16qi): Likewise.
21226         (eight unnamed splitters): Likewise.
21228 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21230         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21231         * config/rs6000/emmintrin.h: Likewise.
21232         * config/rs6000/mmintrin.h: Likewise.
21233         * config/rs6000/xmmintrin.h: Likewise.
21235 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21237         PR c++/43486
21238         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21239         "public_flag".
21240         * tree.c (tree_nop_conversion): Return true for location wrapper
21241         nodes.
21242         (maybe_wrap_with_location): New function.
21243         (selftest::check_strip_nops): New function.
21244         (selftest::test_location_wrappers): New function.
21245         (selftest::tree_c_tests): Call it.
21246         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21247         (maybe_wrap_with_location): New decl.
21248         (EXPR_LOCATION_WRAPPER_P): New macro.
21249         (location_wrapper_p): New inline function.
21250         (tree_strip_any_location_wrapper): New inline function.
21252 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21254         PR target/83735
21255         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21256         stack_realign_offset for the largest alignment of stack slot
21257         actually used.
21258         (ix86_find_max_used_stack_alignment): New function.
21259         (ix86_finalize_stack_frame_flags): Use it.  Set
21260         max_used_stack_alignment if we don't realign stack.
21261         * config/i386/i386.h (machine_function): Add
21262         max_used_stack_alignment.
21264 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21266         * config/arm/arm.opt (-mbranch-cost): New option.
21267         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21268         account.
21270 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21272         PR target/83629
21273         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21274         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21276 2018-01-10  Richard Biener  <rguenther@suse.de>
21278         PR debug/83765
21279         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21280         early out so it also covers the case where we have a non-NULL
21281         origin.
21283 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21285         PR tree-optimization/83753
21286         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21287         for non-strided grouped accesses if the number of elements is 1.
21289 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21291         PR target/81616
21292         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21293         * i386.h (TARGET_USE_GATHER): Define.
21294         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21296 2018-01-10  Martin Liska  <mliska@suse.cz>
21298         PR bootstrap/82831
21299         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21300         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21301         partitioning.
21302         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21303         CLEANUP_NO_PARTITIONING is not set.
21305 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21307         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21308         for vectors, as a partial revert of r254296.
21309         * rtl.h (const_vec_p): Delete.
21310         (const_vec_duplicate_p): Don't test for vector CONSTs.
21311         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21312         * expmed.c (make_tree): Likewise.
21314         Revert:
21315         * common.md (E, F): Use CONSTANT_P instead of checking for
21316         CONST_VECTOR.
21317         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21318         checking for CONST_VECTOR.
21320 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21322         PR middle-end/83575
21323         * predict.c (force_edge_cold): Handle in more sane way edges
21324         with no prediction.
21326 2018-01-09  Carl Love  <cel@us.ibm.com>
21328         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21329         V4SI, V4SF types.
21330         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21331         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21332         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21333         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21334         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21335         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21336         * config/rs6000/rs6000-protos.h: Add extern defition for
21337         rs6000_generate_float2_double_code.
21338         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21339         function.
21340         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21341         (float2_v2df): Add define_expand.
21343 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21345         PR target/83628
21346         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21347         op_mode in the force_to_mode call.
21349 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21351         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21352         instead of checking each element individually.
21353         (aarch64_evpc_uzp): Likewise.
21354         (aarch64_evpc_zip): Likewise.
21355         (aarch64_evpc_ext): Likewise.
21356         (aarch64_evpc_rev): Likewise.
21357         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21358         instead of checking each element individually.  Return true without
21359         generating rtl if
21360         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21361         whether all selected elements come from the same input, instead of
21362         checking each element individually.  Remove calls to gen_rtx_REG,
21363         start_sequence and end_sequence and instead assert that no rtl is
21364         generated.
21366 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21368         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21369         order of HIGH and CONST checks.
21371 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21373         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21374         if the destination isn't an SSA_NAME.
21376 2018-01-09  Richard Biener  <rguenther@suse.de>
21378         PR tree-optimization/83668
21379         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21380         move prologue...
21381         (canonicalize_loop_form): ... here, renamed from ...
21382         (canonicalize_loop_closed_ssa_form): ... this and amended to
21383         swap successor edges for loop exit blocks to make us use
21384         the RPO order we need for initial schedule generation.
21386 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21388         PR tree-optimization/64811
21389         * match.pd: When optimizing comparisons with Inf, avoid
21390         introducing or losing exceptions from comparisons with NaN.
21392 2018-01-09  Martin Liska  <mliska@suse.cz>
21394         PR sanitizer/82517
21395         * asan.c (shadow_mem_size): Add gcc_assert.
21397 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21399         Don't save registers in main().
21401         PR target/83738
21402         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21403         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21404         * config/avr/avr.c (avr_set_current_function): Don't error if
21405         naked, OS_task or OS_main are specified at the same time.
21406         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21407         OS_main.
21408         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21409         attribute.
21410         * common/config/avr/avr-common.c (avr_option_optimization_table):
21411         Switch on -mmain-is-OS_task for optimizing compilations.
21413 2018-01-09  Richard Biener  <rguenther@suse.de>
21415         PR tree-optimization/83572
21416         * graphite.c: Include cfganal.h.
21417         (graphite_transform_loops): Connect infinite loops to exit
21418         and remove fake edges at the end.
21420 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21422         * ipa-inline.c (edge_badness): Revert accidental checkin.
21424 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21426         PR ipa/80763
21427         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21428         symbols; not inline clones.
21430 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21432         PR target/83507
21433         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21434         hard registers.  Formatting fixes.
21436         PR preprocessor/83722
21437         * gcc.c (try_generate_repro): Pass
21438         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21439         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21440         do_report_bug.
21442 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21443             Kito Cheng  <kito.cheng@gmail.com>
21445         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21446         (riscv_leaf_function_p): Delete.
21447         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21449 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21451         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21452         function.
21453         (do_ifelse): New function.
21454         (do_isel): New function.
21455         (do_sub3): New function.
21456         (do_add3): New function.
21457         (do_load_mask_compare): New function.
21458         (do_overlap_load_compare): New function.
21459         (expand_compare_loop): New function.
21460         (expand_block_compare): Call expand_compare_loop() when appropriate.
21461         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21462         option description.
21463         (-mblock-compare-inline-loop-limit): New option.
21465 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21467         PR target/83677
21468         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21469         Reverse order of second and third operands in first alternative.
21470         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21471         of first and second elements in UNSPEC_VPERMR vector.
21472         (altivec_expand_vec_perm_le): Likewise.
21474 2018-01-08  Jeff Law  <law@redhat.com>
21476         PR rtl-optimizatin/81308
21477         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21478         (process_switch): If group_case_labels makes a change, then set
21479         cfg_altered.
21480         (pass_convert_switch::execute): If a switch is converted, then
21481         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21483         PR rtl-optimization/81308
21484         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21485         splitting insns.
21487 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21489         PR target/83663 - Revert r255946
21490         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21491         generation for cases where splatting a value is not useful.
21492         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21493         across a vec_duplicate and a paradoxical subreg forming a vector
21494         mode to a vec_concat.
21496 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21498         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21499         -march=armv8.3-a variants.
21500         * config/arm/t-multilib: Likewise.
21501         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21503 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21505         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21506         to generate rtl.
21507         (cceq_ior_compare_complement): Give it a name so I can use it, and
21508         change boolean_or_operator predicate to boolean_operator so it can
21509         be used to generate a crand.
21510         (eqne): New code iterator.
21511         (bd/bd_neg): New code_attrs.
21512         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21513         a single define_insn.
21514         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21515         decrement (bdnzt/bdnzf/bdzt/bdzf).
21516         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21517         with the new names of the branch decrement patterns, and added the
21518         names of the branch decrement conditional patterns.
21520 2018-01-08  Richard Biener  <rguenther@suse.de>
21522         PR tree-optimization/83563
21523         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21524         cache.
21526 2018-01-08  Richard Biener  <rguenther@suse.de>
21528         PR middle-end/83713
21529         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21531 2018-01-08  Richard Biener  <rguenther@suse.de>
21533         PR tree-optimization/83685
21534         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21535         references to abnormals.
21537 2018-01-08  Richard Biener  <rguenther@suse.de>
21539         PR lto/83719
21540         * dwarf2out.c (output_indirect_strings): Handle empty
21541         skeleton_debug_str_hash.
21542         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21544 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21546         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21547         (emit_store_direct): Likewise.
21548         (arc_trampoline_adjust_address): Likewise.
21549         (arc_asm_trampoline_template): New function.
21550         (arc_initialize_trampoline): Use asm_trampoline_template.
21551         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21552         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21553         * config/arc/arc.md (flush_icache): Delete pattern.
21555 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21557         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21558         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21559         munaligned-access.
21561 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21563         PR target/83681
21564         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21565         by not USED_FOR_TARGET.
21566         (make_pass_resolve_sw_modes): Likewise.
21568 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21570         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21571         USED_FOR_TARGET.
21573 2018-01-08  Richard Biener  <rguenther@suse.de>
21575         PR middle-end/83580
21576         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21578 2018-01-08  Richard Biener  <rguenther@suse.de>
21580         PR middle-end/83517
21581         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21583 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21585         PR middle-end/81897
21586         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21587         basic blocks with a small number of successors.
21588         (convert_control_dep_chain_into_preds): Improve handling of
21589         forwarder blocks.
21590         (dump_predicates): Split apart into...
21591         (dump_pred_chain): ...here...
21592         (dump_pred_info): ...and here.
21593         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21594         (can_chain_union_be_invalidated_p): Improve check for invalidation
21595         of paths.
21596         (uninit_uses_cannot_happen): Avoid unnecessary if
21597         convert_control_dep_chain_into_preds yielded nothing.
21599 2018-01-06  Martin Sebor  <msebor@redhat.com>
21601         PR tree-optimization/83640
21602         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21603         subtracting negative offset from size.
21604         (builtin_access::overlap): Adjust offset bounds of the access to fall
21605         within the size of the object if possible.
21607 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21609         PR rtl-optimization/83699
21610         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21611         extract_bit_field_as_subreg to cases in which the extracted
21612         value is also a vector.
21614         * lra-constraints.c (process_alt_operands): Test for the equivalence
21615         substitutions when detecting a possible reload cycle.
21617 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21619         PR debug/83480
21620         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21621         by default if flag_selective_schedling{,2}.  Formatting fixes.
21623         PR rtl-optimization/83682
21624         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21625         if it has non-VECTOR_MODE element mode.
21626         (vec_duplicate_p): Likewise.
21628         PR middle-end/83694
21629         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21630         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21632 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21634         PR target/83604
21635         * config/i386/i386-builtin.def
21636         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21637         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21638         Require also OPTION_MASK_ISA_AVX512F in addition to
21639         OPTION_MASK_ISA_GFNI.
21640         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21641         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21642         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21643         to OPTION_MASK_ISA_GFNI.
21644         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21645         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21646         OPTION_MASK_ISA_AVX512BW.
21647         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21648         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21649         addition to OPTION_MASK_ISA_GFNI.
21650         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21651         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21652         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21653         to OPTION_MASK_ISA_GFNI.
21654         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21655         a requirement for all ISAs rather than any of them with a few
21656         exceptions.
21657         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21658         processing.
21659         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21660         bitmasks to be enabled with 3 exceptions, instead of requiring any
21661         enabled ISA with lots of exceptions.
21662         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21663         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21664         Change avx512bw in isa attribute to avx512f.
21665         * config/i386/sgxintrin.h: Add license boilerplate.
21666         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21667         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21668         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21669         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21670         defined.
21671         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21672         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21673         temporarily sse2 rather than sse if not enabled already.
21675         PR target/83604
21676         * config/i386/sse.md (VI248_VLBW): Rename to ...
21677         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21678         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21679         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21680         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21681         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21682         mode iterator instead of VI248_VLBW.
21684 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21686         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21687         (record_modified): Skip clobbers; add debug output.
21688         (param_change_prob): Use sreal frequencies.
21690 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21692         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21693         punt for user-aligned variables.
21695 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21697         * tree-chrec.c (chrec_contains_symbols): Return true for
21698         POLY_INT_CST.
21700 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21702         PR target/82439
21703         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21704         of (x|y) == x for BICS pattern.
21706 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21708         PR tree-optimization/83605
21709         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21710         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21711         can throw.
21713 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21715         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21716         * config/epiphany/rtems.h: New file.
21718 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21719             Uros Bizjak  <ubizjak@gmail.com>
21721         PR target/83554
21722         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21723         QIreg_operand instead of register_operand predicate.
21724         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21725         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21726         comments instead of -fmitigate[-_]rop.
21728 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21730         PR bootstrap/81926
21731         * cgraphunit.c (symbol_table::compile): Switch to text_section
21732         before calling assembly_start debug hook.
21733         * run-rtl-passes.c (run_rtl_passes): Likewise.
21734         Include output.h.
21736 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21738         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21739         range_int_cst_p rather than !symbolic_range_p before calling
21740         extract_range_from_multiplicative_op_1.
21742 2018-01-04  Jeff Law  <law@redhat.com>
21744         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21745         redundant test in assertion.
21747 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21749         * doc/rtl.texi: Document machine_mode wrapper classes.
21751 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21753         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21754         using tree_to_uhwi.
21756 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21758         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21759         the VEC_PERM_EXPR fold to fail.
21761 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21763         PR debug/83585
21764         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21765         to switched_sections.
21767 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21769         PR target/83680
21770         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21771         test for d.testing.
21773 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21775         PR target/83387
21776         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21777         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21779 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21781         PR debug/83666
21782         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21783         is BLKmode and bitpos not zero or mode change is needed.
21785 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21787         PR target/83675
21788         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21789         TARGET_VIS2.
21791 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21793         PR target/83628
21794         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21795         instead of MULT rtx.  Update all corresponding splitters.
21796         (*saddl_se): Ditto.
21797         (*ssub<modesuffix>): Ditto.
21798         (*ssubl_se): Ditto.
21799         (*cmp_sadd_di): Update split patterns.
21800         (*cmp_sadd_si): Ditto.
21801         (*cmp_sadd_sidi): Ditto.
21802         (*cmp_ssub_di): Ditto.
21803         (*cmp_ssub_si): Ditto.
21804         (*cmp_ssub_sidi): Ditto.
21805         * config/alpha/predicates.md (const23_operand): New predicate.
21806         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21807         Look for ASHIFT, not MULT inner operand.
21808         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21810 2018-01-04  Martin Liska  <mliska@suse.cz>
21812         PR gcov-profile/83669
21813         * gcov.c (output_intermediate_file): Add version to intermediate
21814         gcov file.
21815         * doc/gcov.texi: Document new field 'version' in intermediate
21816         file format. Fix location of '-k' option of gcov command.
21818 2018-01-04  Martin Liska  <mliska@suse.cz>
21820         PR ipa/82352
21821         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21823 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21825         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21827 2018-01-03  Martin Sebor  <msebor@redhat.com>
21829         PR tree-optimization/83655
21830         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21831         checking calls with invalid arguments.
21833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21835         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21836         (vectorizable_mask_load_store): Delete.
21837         (vectorizable_call): Return false for masked loads and stores.
21838         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21839         instead of gimple_assign_rhs1.
21840         (vectorizable_load): Handle IFN_MASK_LOAD.
21841         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21843 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21845         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21846         split out from..,
21847         (vectorizable_mask_load_store): ...here.
21848         (vectorizable_load): ...and here.
21850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21852         * tree-vect-stmts.c (vect_build_all_ones_mask)
21853         (vect_build_zero_merge_argument): New functions, split out from...
21854         (vectorizable_load): ...here.
21856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21858         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21859         split out from...
21860         (vectorizable_mask_load_store): ...here.
21861         (vectorizable_store): ...and here.
21863 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21865         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21866         split out from...
21867         (vectorizable_mask_load_store): ...here.
21869 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21871         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21872         (vect_model_store_cost): Take a vec_load_store_type instead of a
21873         vect_def_type.
21874         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21875         (vect_model_store_cost): Take a vec_load_store_type instead of a
21876         vect_def_type.
21877         (vectorizable_mask_load_store): Update accordingly.
21878         (vectorizable_store): Likewise.
21879         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21881 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21883         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21884         IFN_MASK_LOAD calls here rather than...
21885         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21887 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21888             Alan Hayward  <alan.hayward@arm.com>
21889             David Sherwood  <david.sherwood@arm.com>
21891         * expmed.c (extract_bit_field_1): For vector extracts,
21892         fall back to extract_bit_field_as_subreg if vec_extract
21893         isn't available.
21895 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21896             Alan Hayward  <alan.hayward@arm.com>
21897             David Sherwood  <david.sherwood@arm.com>
21899         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21900         they are variable or constant sized.
21901         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21902         slots for constant-sized data.
21904 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21905             Alan Hayward  <alan.hayward@arm.com>
21906             David Sherwood  <david.sherwood@arm.com>
21908         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21909         handling COND_EXPRs with boolean comparisons, try to find a better
21910         basis for the mask type than the boolean itself.
21912 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21914         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21915         is calculated and how it can be overridden.
21916         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21917         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21918         if defined.
21919         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21920         if nonzero.
21922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21923             Alan Hayward  <alan.hayward@arm.com>
21924             David Sherwood  <david.sherwood@arm.com>
21926         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21927         Remove the mode argument.
21928         (aarch64_simd_valid_immediate): Remove the mode and inverse
21929         arguments.
21930         * config/aarch64/iterators.md (bitsize): New iterator.
21931         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21932         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21933         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21934         aarch64_simd_valid_immediate.
21935         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21936         (aarch64_reg_or_bic_imm): Likewise.
21937         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21938         with an insn_type enum and msl with a modifier_type enum.
21939         Replace element_width with a scalar_mode.  Change the shift
21940         to unsigned int.  Add constructors for scalar_float_mode and
21941         scalar_int_mode elements.
21942         (aarch64_vect_float_const_representable_p): Delete.
21943         (aarch64_can_const_movi_rtx_p)
21944         (aarch64_simd_scalar_immediate_valid_for_move)
21945         (aarch64_simd_make_constant): Update call to
21946         aarch64_simd_valid_immediate.
21947         (aarch64_advsimd_valid_immediate_hs): New function.
21948         (aarch64_advsimd_valid_immediate): Likewise.
21949         (aarch64_simd_valid_immediate): Remove mode and inverse
21950         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21951         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21952         and aarch64_float_const_representable_p on the result.
21953         (aarch64_output_simd_mov_immediate): Remove mode argument.
21954         Update call to aarch64_simd_valid_immediate and use of
21955         simd_immediate_info.
21956         (aarch64_output_scalar_simd_mov_immediate): Update call
21957         accordingly.
21959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21960             Alan Hayward  <alan.hayward@arm.com>
21961             David Sherwood  <david.sherwood@arm.com>
21963         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21964         (mode_nunits): Likewise CONST_MODE_NUNITS.
21965         * machmode.def (ADJUST_NUNITS): Document.
21966         * genmodes.c (mode_data::need_nunits_adj): New field.
21967         (blank_mode): Update accordingly.
21968         (adj_nunits): New variable.
21969         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21970         parameter.
21971         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21972         listed in adj_nunits.
21973         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21974         listed in adj_nunits.  Don't emit case statements for such modes.
21975         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21976         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21977         nothing if adj_nunits is nonnull.
21978         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21979         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21980         (emit_mode_fbit): Update use of print_maybe_const_decl.
21981         (emit_move_size): Likewise.  Treat the array as non-const
21982         if adj_nunits.
21983         (emit_mode_adjustments): Handle adj_nunits.
21985 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21987         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21988         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21989         (VECTOR_MODES): Use it.
21990         (make_vector_modes): Take the prefix as an argument.
21992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21993             Alan Hayward  <alan.hayward@arm.com>
21994             David Sherwood  <david.sherwood@arm.com>
21996         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21997         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21998         for MODE_VECTOR_BOOL.
21999         * machmode.def (VECTOR_BOOL_MODE): Document.
22000         * genmodes.c (VECTOR_BOOL_MODE): New macro.
22001         (make_vector_bool_mode): New function.
22002         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
22003         MODE_VECTOR_BOOL.
22004         * lto-streamer-in.c (lto_input_mode_table): Likewise.
22005         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
22006         Likewise.
22007         * stor-layout.c (int_mode_for_mode): Likewise.
22008         * tree.c (build_vector_type_for_mode): Likewise.
22009         * varasm.c (output_constant_pool_2): Likewise.
22010         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
22011         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
22012         for MODE_VECTOR_BOOL.
22013         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
22014         of mode class checks.
22015         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
22016         instead of a list of mode class checks.
22017         (expand_vector_scalar_condition): Likewise.
22018         (type_for_widest_vector_mode): Handle BImode as an inner mode.
22020 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22021             Alan Hayward  <alan.hayward@arm.com>
22022             David Sherwood  <david.sherwood@arm.com>
22024         * machmode.h (mode_size): Change from unsigned short to
22025         poly_uint16_pod.
22026         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
22027         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22028         or if measurement_type is not polynomial.
22029         (fixed_size_mode::includes_p): Check for constant-sized modes.
22030         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
22031         return a poly_uint16 rather than an unsigned short.
22032         (emit_mode_size): Change the type of mode_size from unsigned short
22033         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
22034         (emit_mode_adjustments): Cope with polynomial vector sizes.
22035         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22036         for GET_MODE_SIZE.
22037         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22038         for GET_MODE_SIZE.
22039         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
22040         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
22041         * caller-save.c (setup_save_areas): Likewise.
22042         (replace_reg_with_saved_mem): Likewise.
22043         * calls.c (emit_library_call_value_1): Likewise.
22044         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
22045         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
22046         (gen_lowpart_for_combine): Likewise.
22047         * convert.c (convert_to_integer_1): Likewise.
22048         * cse.c (equiv_constant, cse_insn): Likewise.
22049         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
22050         (cselib_subst_to_values): Likewise.
22051         * dce.c (word_dce_process_block): Likewise.
22052         * df-problems.c (df_word_lr_mark_ref): Likewise.
22053         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
22054         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
22055         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
22056         (rtl_for_decl_location): Likewise.
22057         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
22058         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
22059         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
22060         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
22061         (expand_expr_real_1): Likewise.
22062         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
22063         (pad_below): Likewise.
22064         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22065         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
22066         * ira.c (get_subreg_tracking_sizes): Likewise.
22067         * ira-build.c (ira_create_allocno_objects): Likewise.
22068         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
22069         (ira_sort_regnos_for_alter_reg): Likewise.
22070         * ira-costs.c (record_operand_costs): Likewise.
22071         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
22072         (resolve_simple_move): Likewise.
22073         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
22074         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
22075         (lra_constraints): Likewise.
22076         (CONST_POOL_OK_P): Reject variable-sized modes.
22077         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
22078         (add_pseudo_to_slot, lra_spill): Likewise.
22079         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22080         * optabs-query.c (get_best_extraction_insn): Likewise.
22081         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22082         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
22083         (expand_mult_highpart, valid_multiword_target_p): Likewise.
22084         * recog.c (offsettable_address_addr_space_p): Likewise.
22085         * regcprop.c (maybe_mode_change): Likewise.
22086         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
22087         * regrename.c (build_def_use): Likewise.
22088         * regstat.c (dump_reg_info): Likewise.
22089         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
22090         (find_reloads, find_reloads_subreg_address): Likewise.
22091         * reload1.c (eliminate_regs_1): Likewise.
22092         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
22093         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
22094         (simplify_binary_operation_1, simplify_subreg): Likewise.
22095         * targhooks.c (default_function_arg_padding): Likewise.
22096         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
22097         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
22098         (verify_gimple_assign_ternary): Likewise.
22099         * tree-inline.c (estimate_move_cost): Likewise.
22100         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22101         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
22102         (get_address_cost_ainc): Likewise.
22103         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
22104         (vect_supportable_dr_alignment): Likewise.
22105         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22106         (vectorizable_reduction): Likewise.
22107         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
22108         (vectorizable_operation, vectorizable_load): Likewise.
22109         * tree.c (build_same_sized_truth_vector_type): Likewise.
22110         * valtrack.c (cleanup_auto_inc_dec): Likewise.
22111         * var-tracking.c (emit_note_insn_var_location): Likewise.
22112         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
22113         (ADDR_VEC_ALIGN): Likewise.
22115 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22116             Alan Hayward  <alan.hayward@arm.com>
22117             David Sherwood  <david.sherwood@arm.com>
22119         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22120         unsigned short.
22121         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22122         or if measurement_type is polynomial.
22123         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22124         * combine.c (make_extraction): Likewise.
22125         * dse.c (find_shift_sequence): Likewise.
22126         * dwarf2out.c (mem_loc_descriptor): Likewise.
22127         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22128         (extract_bit_field, extract_low_bits): Likewise.
22129         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22130         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22131         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22132         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22133         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22134         * reload.c (find_reloads): Likewise.
22135         * reload1.c (alter_reg): Likewise.
22136         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22137         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22138         * tree-if-conv.c (predicate_mem_writes): Likewise.
22139         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22140         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22141         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22142         * valtrack.c (dead_debug_insert_temp): Likewise.
22143         * varasm.c (mergeable_constant_section): Likewise.
22144         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22146 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22147             Alan Hayward  <alan.hayward@arm.com>
22148             David Sherwood  <david.sherwood@arm.com>
22150         * expr.c (expand_assignment): Cope with polynomial mode sizes
22151         when assigning to a CONCAT.
22153 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22154             Alan Hayward  <alan.hayward@arm.com>
22155             David Sherwood  <david.sherwood@arm.com>
22157         * machmode.h (mode_precision): Change from unsigned short to
22158         poly_uint16_pod.
22159         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22160         short.
22161         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22162         or if measurement_type is not polynomial.
22163         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22164         in which the mode is already known to be a scalar_int_mode.
22165         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22166         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22167         initializer.
22168         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22169         for GET_MODE_PRECISION.
22170         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22171         for GET_MODE_PRECISION.
22172         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22173         as polynomial.
22174         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22175         (expand_field_assignment, make_extraction): Likewise.
22176         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22177         (get_last_value): Likewise.
22178         * convert.c (convert_to_integer_1): Likewise.
22179         * cse.c (cse_insn): Likewise.
22180         * expr.c (expand_expr_real_1): Likewise.
22181         * lra-constraints.c (simplify_operand_subreg): Likewise.
22182         * optabs-query.c (can_atomic_load_p): Likewise.
22183         * optabs.c (expand_atomic_load): Likewise.
22184         (expand_atomic_store): Likewise.
22185         * ree.c (combine_reaching_defs): Likewise.
22186         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22187         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22188         * tree.h (type_has_mode_precision_p): Likewise.
22189         * ubsan.c (instrument_si_overflow): Likewise.
22191 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22192             Alan Hayward  <alan.hayward@arm.com>
22193             David Sherwood  <david.sherwood@arm.com>
22195         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22196         polynomial numbers of units.
22197         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22198         (valid_vector_subparts_p): New function.
22199         (build_vector_type): Remove temporary shim and take the number
22200         of units as a poly_uint64 rather than an int.
22201         (build_opaque_vector_type): Take the number of units as a
22202         poly_uint64 rather than an int.
22203         * tree.c (build_vector_from_ctor): Handle polynomial
22204         TYPE_VECTOR_SUBPARTS.
22205         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22206         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22207         (build_vector_from_val): If the number of units is variable,
22208         use build_vec_duplicate_cst for constant operands and
22209         VEC_DUPLICATE_EXPR otherwise.
22210         (make_vector_type): Remove temporary is_constant ().
22211         (build_vector_type, build_opaque_vector_type): Take the number of
22212         units as a poly_uint64 rather than an int.
22213         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22214         VECTOR_CST_NELTS.
22215         * cfgexpand.c (expand_debug_expr): Likewise.
22216         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22217         (store_constructor, expand_expr_real_1): Likewise.
22218         (const_scalar_mask_from_tree): Likewise.
22219         * fold-const-call.c (fold_const_reduction): Likewise.
22220         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22221         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22222         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22223         (fold_relational_const): Likewise.
22224         (native_interpret_vector): Likewise.  Change the size from an
22225         int to an unsigned int.
22226         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22227         TYPE_VECTOR_SUBPARTS.
22228         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22229         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22230         duplicating a non-constant operand into a variable-length vector.
22231         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22232         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22233         * ipa-icf.c (sem_variable::equals): Likewise.
22234         * match.pd: Likewise.
22235         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22236         * print-tree.c (print_node): Likewise.
22237         * stor-layout.c (layout_type): Likewise.
22238         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22239         * tree-cfg.c (verify_gimple_comparison): Likewise.
22240         (verify_gimple_assign_binary): Likewise.
22241         (verify_gimple_assign_ternary): Likewise.
22242         (verify_gimple_assign_single): Likewise.
22243         * tree-pretty-print.c (dump_generic_node): Likewise.
22244         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22245         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22246         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22247         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22248         (vect_shift_permute_load_chain): Likewise.
22249         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22250         (expand_vector_condition, optimize_vector_constructor): Likewise.
22251         (lower_vec_perm, get_compute_type): Likewise.
22252         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22253         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22254         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22255         (vect_recog_mask_conversion_pattern): Likewise.
22256         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22257         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22258         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22259         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22260         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22261         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22262         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22263         (supportable_widening_operation): Likewise.
22264         (supportable_narrowing_operation): Likewise.
22265         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22266         Likewise.
22267         * varasm.c (output_constant): Likewise.
22269 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22270             Alan Hayward  <alan.hayward@arm.com>
22271             David Sherwood  <david.sherwood@arm.com>
22273         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22274         so that both the length == 3 and length != 3 cases set up their
22275         own permute vectors.  Add comments explaining why we know the
22276         number of elements is constant.
22277         (vect_permute_load_chain): Likewise.
22279 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22280             Alan Hayward  <alan.hayward@arm.com>
22281             David Sherwood  <david.sherwood@arm.com>
22283         * machmode.h (mode_nunits): Change from unsigned char to
22284         poly_uint16_pod.
22285         (ONLY_FIXED_SIZE_MODES): New macro.
22286         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22287         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22288         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22289         New typedefs.
22290         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22291         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22292         or if measurement_type is not polynomial.
22293         * genmodes.c (ZERO_COEFFS): New macro.
22294         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22295         poly_uint16.
22296         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22297         Use ZERO_COEFFS when emitting initializers.
22298         * data-streamer.h (bp_pack_poly_value): New function.
22299         (bp_unpack_poly_value): Likewise.
22300         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22301         for GET_MODE_NUNITS.
22302         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22303         for GET_MODE_NUNITS.
22304         * tree.c (make_vector_type): Remove temporary shim and make
22305         the real function take the number of units as a poly_uint64
22306         rather than an int.
22307         (build_vector_type_for_mode): Handle polynomial nunits.
22308         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22309         * emit-rtl.c (const_vec_series_p_1): Likewise.
22310         (gen_rtx_CONST_VECTOR): Likewise.
22311         * fold-const.c (test_vec_duplicate_folding): Likewise.
22312         * genrecog.c (validate_pattern): Likewise.
22313         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22314         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22315         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22316         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22317         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22318         * rtlanal.c (subreg_get_info): Likewise.
22319         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22320         (vect_grouped_load_supported): Likewise.
22321         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22322         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22323         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22324         (simplify_const_unary_operation, simplify_binary_operation_1)
22325         (simplify_const_binary_operation, simplify_ternary_operation)
22326         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22327         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22328         instead of CONST_VECTOR_NUNITS.
22329         * varasm.c (output_constant_pool_2): Likewise.
22330         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22331         explicit-encoded elements in the XVEC for variable-length vectors.
22333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22335         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22337 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22338             Alan Hayward  <alan.hayward@arm.com>
22339             David Sherwood  <david.sherwood@arm.com>
22341         * coretypes.h (fixed_size_mode): Declare.
22342         (fixed_size_mode_pod): New typedef.
22343         * builtins.h (target_builtins::x_apply_args_mode)
22344         (target_builtins::x_apply_result_mode): Change type to
22345         fixed_size_mode_pod.
22346         * builtins.c (apply_args_size, apply_result_size, result_vector)
22347         (expand_builtin_apply_args_1, expand_builtin_apply)
22348         (expand_builtin_return): Update accordingly.
22350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22352         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22353         * cselib.c (cselib_hash_rtx): Likewise.
22354         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22355         CONST_VECTOR encoding.
22357 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22358             Jeff Law  <law@redhat.com>
22360         PR target/83641
22361         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22362         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22363         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22364         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22366         PR target/83641
22367         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22368         explicitly probe *sp in a noreturn function if there were any callee
22369         register saves or frame pointer is needed.
22371 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22373         PR debug/83621
22374         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22375         BLKmode for ternary, binary or unary expressions.
22377         PR debug/83645
22378         * var-tracking.c (delete_vta_debug_insn): New inline function.
22379         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22380         insns from get_insns () to NULL instead of each bb separately.
22381         Use delete_vta_debug_insn.  No longer static.
22382         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22383         delete_vta_debug_insns callers.
22384         * rtl.h (delete_vta_debug_insns): Declare.
22385         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22386         instead of variable_tracking_main.
22388 2018-01-03  Martin Sebor  <msebor@redhat.com>
22390         PR tree-optimization/83603
22391         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22392         arguments past the endof the argument list in functions declared
22393         without a prototype.
22394         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22395         Avoid checking when arguments are null.
22397 2018-01-03  Martin Sebor  <msebor@redhat.com>
22399         PR c/83559
22400         * doc/extend.texi (attribute const): Fix a typo.
22401         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22402         issuing -Wsuggest-attribute for void functions.
22404 2018-01-03  Martin Sebor  <msebor@redhat.com>
22406         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22407         offset_int::from instead of wide_int::to_shwi.
22408         (maybe_diag_overlap): Remove assertion.
22409         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22410         * gimple-ssa-sprintf.c (format_directive): Same.
22411         (parse_directive): Same.
22412         (sprintf_dom_walker::compute_format_length): Same.
22413         (try_substitute_return_value): Same.
22415 2018-01-03  Jeff Law  <law@redhat.com>
22417         PR middle-end/83654
22418         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22419         non-constant residual for zero at runtime and avoid probing in
22420         that case.  Reorganize code for trailing problem to mirror handling
22421         of the residual.
22423 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22425         PR tree-optimization/83501
22426         * tree-ssa-strlen.c (get_string_cst): New.
22427         (handle_char_store): Call get_string_cst.
22429 2018-01-03  Martin Liska  <mliska@suse.cz>
22431         PR tree-optimization/83593
22432         * tree-ssa-strlen.c: Include tree-cfg.h.
22433         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22434         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22435         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22436         to false.
22437         (strlen_dom_walker::before_dom_children): Call
22438         gimple_purge_dead_eh_edges. Dump tranformation with details
22439         dump flags.
22440         (strlen_dom_walker::before_dom_children): Update call by adding
22441         new argument cleanup_eh.
22442         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22444 2018-01-03  Martin Liska  <mliska@suse.cz>
22446         PR ipa/83549
22447         * cif-code.def (VARIADIC_THUNK): New enum value.
22448         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22449         thunks.
22451 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22453         * sse.md (mov<mode>_internal): Tighten condition for when to use
22454         vmovdqu<ssescalarsize> for TI and OI modes.
22456 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22458         Update copyright years.
22460 2018-01-03  Martin Liska  <mliska@suse.cz>
22462         PR ipa/83594
22463         * ipa-visibility.c (function_and_variable_visibility): Skip
22464         functions with noipa attribure.
22466 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22468         * gcc.c (process_command): Update copyright notice dates.
22469         * gcov-dump.c (print_version): Ditto.
22470         * gcov.c (print_version): Ditto.
22471         * gcov-tool.c (print_version): Ditto.
22472         * gengtype.c (create_file): Ditto.
22473         * doc/cpp.texi: Bump @copying's copyright year.
22474         * doc/cppinternals.texi: Ditto.
22475         * doc/gcc.texi: Ditto.
22476         * doc/gccint.texi: Ditto.
22477         * doc/gcov.texi: Ditto.
22478         * doc/install.texi: Ditto.
22479         * doc/invoke.texi: Ditto.
22481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22483         * vector-builder.h (vector_builder::m_full_nelts): Change from
22484         unsigned int to poly_uint64.
22485         (vector_builder::full_nelts): Update prototype accordingly.
22486         (vector_builder::new_vector): Likewise.
22487         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22488         (vector_builder::operator ==): Likewise.
22489         (vector_builder::finalize): Likewise.
22490         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22491         Take the number of elements as a poly_uint64 rather than an
22492         unsigned int.
22493         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22494         from unsigned int to poly_uint64.
22495         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22496         (vec_perm_indices::new_vector): Likewise.
22497         (vec_perm_indices::length): Likewise.
22498         (vec_perm_indices::nelts_per_input): Likewise.
22499         (vec_perm_indices::input_nelts): Likewise.
22500         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22501         number of elements per input as a poly_uint64 rather than an
22502         unsigned int.  Use the original encoding for variable-length
22503         vectors, rather than clamping each individual element.
22504         For the second and subsequent elements in each pattern,
22505         clamp the step and base before clamping their sum.
22506         (vec_perm_indices::series_p): Handle polynomial element counts.
22507         (vec_perm_indices::all_in_range_p): Likewise.
22508         (vec_perm_indices_to_tree): Likewise.
22509         (vec_perm_indices_to_rtx): Likewise.
22510         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22511         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22512         (tree_vector_builder::new_binary_operation): Handle polynomial
22513         element counts.  Return false if we need to know the number
22514         of elements at compile time.
22515         * fold-const.c (fold_vec_perm): Punt if the number of elements
22516         isn't known at compile time.
22518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22520         * vec-perm-indices.h (vec_perm_builder): Change element type
22521         from HOST_WIDE_INT to poly_int64.
22522         (vec_perm_indices::element_type): Update accordingly.
22523         (vec_perm_indices::clamp): Handle polynomial element_types.
22524         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22525         (vec_perm_indices::all_in_range_p): Likewise.
22526         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22527         than shwi trees.
22528         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22529         polynomial vec_perm_indices element types.
22530         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22531         * fold-const.c (fold_vec_perm): Likewise.
22532         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22533         * tree-vect-generic.c (lower_vec_perm): Likewise.
22534         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22535         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22536         element type to HOST_WIDE_INT.
22538 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22539             Alan Hayward  <alan.hayward@arm.com>
22540             David Sherwood  <david.sherwood@arm.com>
22542         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22543         rather than an int.  Use plus_constant.
22544         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22545         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22548             Alan Hayward  <alan.hayward@arm.com>
22549             David Sherwood  <david.sherwood@arm.com>
22551         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22552         a HOST_WIDE_INT to a poly_int64.
22554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22555             Alan Hayward  <alan.hayward@arm.com>
22556             David Sherwood  <david.sherwood@arm.com>
22558         * calls.c (load_register_parameters): Cope with polynomial
22559         mode sizes.  Require a constant size for BLKmode parameters
22560         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22561         forces a parameter to be padded at the lsb end in order to
22562         fill a complete number of words, require the parameter size
22563         to be ordered wrt UNITS_PER_WORD.
22565 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22566             Alan Hayward  <alan.hayward@arm.com>
22567             David Sherwood  <david.sherwood@arm.com>
22569         * reload1.c (spill_stack_slot_width): Change element type
22570         from unsigned int to poly_uint64_pod.
22571         (alter_reg): Treat mode sizes as polynomial.
22573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22574             Alan Hayward  <alan.hayward@arm.com>
22575             David Sherwood  <david.sherwood@arm.com>
22577         * reload.c (complex_word_subreg_p): New function.
22578         (reload_inner_reg_of_subreg, push_reload): Use it.
22580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22581             Alan Hayward  <alan.hayward@arm.com>
22582             David Sherwood  <david.sherwood@arm.com>
22584         * lra-constraints.c (process_alt_operands): Reject matched
22585         operands whose sizes aren't ordered.
22586         (match_reload): Refer to this check here.
22588 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22589             Alan Hayward  <alan.hayward@arm.com>
22590             David Sherwood  <david.sherwood@arm.com>
22592         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22593         that the mode size is in the set {1, 2, 4, 8, 16}.
22595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22596             Alan Hayward  <alan.hayward@arm.com>
22597             David Sherwood  <david.sherwood@arm.com>
22599         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22600         Use plus_constant instead of gen_rtx_PLUS.
22602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22603             Alan Hayward  <alan.hayward@arm.com>
22604             David Sherwood  <david.sherwood@arm.com>
22606         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22607         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22608         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22609         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22610         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22611         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22612         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22613         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22614         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22615         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22616         a poly_int64.
22617         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22618         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22619         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22620         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22621         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22622         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22623         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22624         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22625         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22626         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22627         function.
22628         * expr.c (emit_move_resolve_push): Treat the input and result
22629         of PUSH_ROUNDING as a poly_int64.
22630         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22631         (emit_push_insn): Likewise.
22632         * lra-eliminations.c (mark_not_eliminable): Likewise.
22633         * recog.c (push_operand): Likewise.
22634         * reload1.c (elimination_effects): Likewise.
22635         * rtlanal.c (nonzero_bits1): Likewise.
22636         * calls.c (store_one_arg): Likewise.  Require the padding to be
22637         known at compile time.
22639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22640             Alan Hayward  <alan.hayward@arm.com>
22641             David Sherwood  <david.sherwood@arm.com>
22643         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22644         Use plus_constant instead of gen_rtx_PLUS.
22646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22647             Alan Hayward  <alan.hayward@arm.com>
22648             David Sherwood  <david.sherwood@arm.com>
22650         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22651         rather than an int.
22653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22654             Alan Hayward  <alan.hayward@arm.com>
22655             David Sherwood  <david.sherwood@arm.com>
22657         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22658         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22659         via stack temporaries.  Treat the mode size as polynomial too.
22661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22662             Alan Hayward  <alan.hayward@arm.com>
22663             David Sherwood  <david.sherwood@arm.com>
22665         * expr.c (expand_expr_real_2): When handling conversions involving
22666         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22667         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22668         as a poly_uint64 too.
22670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22671             Alan Hayward  <alan.hayward@arm.com>
22672             David Sherwood  <david.sherwood@arm.com>
22674         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22676 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22677             Alan Hayward  <alan.hayward@arm.com>
22678             David Sherwood  <david.sherwood@arm.com>
22680         * combine.c (can_change_dest_mode): Handle polynomial
22681         REGMODE_NATURAL_SIZE.
22682         * expmed.c (store_bit_field_1): Likewise.
22683         * expr.c (store_constructor): Likewise.
22684         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22685         and polynomial REGMODE_NATURAL_SIZE.
22686         (gen_lowpart_common): Likewise.
22687         * reginfo.c (record_subregs_of_mode): Likewise.
22688         * rtlanal.c (read_modify_subreg_p): Likewise.
22690 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22691             Alan Hayward  <alan.hayward@arm.com>
22692             David Sherwood  <david.sherwood@arm.com>
22694         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22695         numbers of elements.
22697 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22698             Alan Hayward  <alan.hayward@arm.com>
22699             David Sherwood  <david.sherwood@arm.com>
22701         * match.pd: Cope with polynomial numbers of vector elements.
22703 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22704             Alan Hayward  <alan.hayward@arm.com>
22705             David Sherwood  <david.sherwood@arm.com>
22707         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22708         in a POINTER_PLUS_EXPR.
22710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22711             Alan Hayward  <alan.hayward@arm.com>
22712             David Sherwood  <david.sherwood@arm.com>
22714         * omp-simd-clone.c (simd_clone_subparts): New function.
22715         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22716         (ipa_simd_modify_function_body): Likewise.
22718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22719             Alan Hayward  <alan.hayward@arm.com>
22720             David Sherwood  <david.sherwood@arm.com>
22722         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22723         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22724         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22725         (expand_vector_condition, vector_element): Likewise.
22726         (subparts_gt): New function.
22727         (get_compute_type): Use subparts_gt.
22728         (count_type_subparts): Delete.
22729         (expand_vector_operations_1): Use subparts_gt instead of
22730         count_type_subparts.
22732 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22733             Alan Hayward  <alan.hayward@arm.com>
22734             David Sherwood  <david.sherwood@arm.com>
22736         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22737         (vect_compile_time_alias): ...this new function.  Do the calculation
22738         on poly_ints rather than trees.
22739         (vect_prune_runtime_alias_test_list): Update call accordingly.
22741 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22742             Alan Hayward  <alan.hayward@arm.com>
22743             David Sherwood  <david.sherwood@arm.com>
22745         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22746         numbers of units.
22747         (vect_schedule_slp_instance): Likewise.
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         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22754         constant and extern definitions for variable-length vectors.
22755         (vect_get_constant_vectors): Note that the number of units
22756         is known to be constant.
22758 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22759             Alan Hayward  <alan.hayward@arm.com>
22760             David Sherwood  <david.sherwood@arm.com>
22762         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22763         of units as polynomial.  Choose between WIDE and NARROW based
22764         on multiple_p.
22766 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22767             Alan Hayward  <alan.hayward@arm.com>
22768             David Sherwood  <david.sherwood@arm.com>
22770         * tree-vect-stmts.c (simd_clone_subparts): New function.
22771         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22774             Alan Hayward  <alan.hayward@arm.com>
22775             David Sherwood  <david.sherwood@arm.com>
22777         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22778         vectors as polynomial.  Use build_index_vector for
22779         IFN_GOMP_SIMD_LANE.
22781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22782             Alan Hayward  <alan.hayward@arm.com>
22783             David Sherwood  <david.sherwood@arm.com>
22785         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22786         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22787         for variable-length vectors.
22788         (vectorizable_mask_load_store): Treat the number of units as
22789         polynomial, asserting that it is constant if the condition has
22790         already been enforced.
22791         (vectorizable_store, vectorizable_load): Likewise.
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         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22798         of units as polynomial.  Punt if we can't tell at compile time
22799         which vector contains the final result.
22801 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22802             Alan Hayward  <alan.hayward@arm.com>
22803             David Sherwood  <david.sherwood@arm.com>
22805         * tree-vect-loop.c (vectorizable_induction): Treat the number
22806         of units as polynomial.  Punt on SLP inductions.  Use an integer
22807         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22808         cast of such a series for variable-length floating-point
22809         reductions.
22811 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22812             Alan Hayward  <alan.hayward@arm.com>
22813             David Sherwood  <david.sherwood@arm.com>
22815         * tree.h (build_index_vector): Declare.
22816         * tree.c (build_index_vector): New function.
22817         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22818         of units as polynomial, forcibly converting it to a constant if
22819         vectorizable_reduction has already enforced the condition.
22820         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22821         to create a {1,2,3,...} vector.
22822         (vectorizable_reduction): Treat the number of units as polynomial.
22823         Choose vectype_in based on the largest scalar element size rather
22824         than the smallest number of units.  Enforce the restrictions
22825         relied on above.
22827 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22828             Alan Hayward  <alan.hayward@arm.com>
22829             David Sherwood  <david.sherwood@arm.com>
22831         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22832         number of units as polynomial.
22834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22835             Alan Hayward  <alan.hayward@arm.com>
22836             David Sherwood  <david.sherwood@arm.com>
22838         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22839         * target.def (autovectorize_vector_sizes): Return the vector sizes
22840         by pointer, using vector_sizes rather than a bitmask.
22841         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22842         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22843         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22844         Likewise.
22845         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22846         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22847         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22848         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22849         * omp-general.c (omp_max_vf): Likewise.
22850         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22851         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22852         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22853         * tree-vect-slp.c (vect_slp_bb): Likewise.
22854         * doc/tm.texi: Regenerate.
22855         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22856         to a poly_uint64.
22857         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22858         the vector size as a poly_uint64 rather than an unsigned int.
22859         (current_vector_size): Change from an unsigned int to a poly_uint64.
22860         (get_vectype_for_scalar_type): Update accordingly.
22861         * tree.h (build_truth_vector_type): Take the size and number of
22862         units as a poly_uint64 rather than an unsigned int.
22863         (build_vector_type): Add a temporary overload that takes
22864         the number of units as a poly_uint64 rather than an unsigned int.
22865         * tree.c (make_vector_type): Likewise.
22866         (build_truth_vector_type): Take the number of units as a poly_uint64
22867         rather than an unsigned int.
22869 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22870             Alan Hayward  <alan.hayward@arm.com>
22871             David Sherwood  <david.sherwood@arm.com>
22873         * target.def (get_mask_mode): Take the number of units and length
22874         as poly_uint64s rather than unsigned ints.
22875         * targhooks.h (default_get_mask_mode): Update accordingly.
22876         * targhooks.c (default_get_mask_mode): Likewise.
22877         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22878         * doc/tm.texi: Regenerate.
22880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22881             Alan Hayward  <alan.hayward@arm.com>
22882             David Sherwood  <david.sherwood@arm.com>
22884         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22885         * omp-general.c (omp_max_vf): Likewise.
22886         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22887         (expand_omp_simd): Handle polynomial safelen.
22888         * omp-low.c (omplow_simd_context): Add a default constructor.
22889         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22890         (lower_rec_simd_input_clauses): Update accordingly.
22891         (lower_rec_input_clauses): Likewise.
22893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22894             Alan Hayward  <alan.hayward@arm.com>
22895             David Sherwood  <david.sherwood@arm.com>
22897         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22898         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22899         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22900         (vect_analyze_slp_cost): Likewise.
22901         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22902         (vect_model_load_cost): Likewise.
22904 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22905             Alan Hayward  <alan.hayward@arm.com>
22906             David Sherwood  <david.sherwood@arm.com>
22908         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22909         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22910         from an unsigned int * to a poly_uint64_pod *.
22911         (calculate_unrolling_factor): New function.
22912         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22915             Alan Hayward  <alan.hayward@arm.com>
22916             David Sherwood  <david.sherwood@arm.com>
22918         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22919         from an unsigned int to a poly_uint64.
22920         (_loop_vec_info::slp_unrolling_factor): Likewise.
22921         (_loop_vec_info::vectorization_factor): Change from an int
22922         to a poly_uint64.
22923         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22924         (vect_get_num_vectors): New function.
22925         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22926         (vect_get_num_copies): Use vect_get_num_vectors.
22927         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22928         to an unsigned int *.
22929         (vect_analyze_data_refs): Change min_vf from an int * to a
22930         poly_uint64 *.
22931         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22932         than an unsigned HOST_WIDE_INT.
22933         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22934         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22935         to an unsigned int *.
22936         (vect_analyze_data_ref_dependences): Likewise.
22937         (vect_compute_data_ref_alignment): Handle polynomial vf.
22938         (vect_enhance_data_refs_alignment): Likewise.
22939         (vect_prune_runtime_alias_test_list): Likewise.
22940         (vect_shift_permute_load_chain): Likewise.
22941         (vect_supportable_dr_alignment): Likewise.
22942         (dependence_distance_ge_vf): Take the vectorization factor as a
22943         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22944         (vect_analyze_data_refs): Change min_vf from an int * to a
22945         poly_uint64 *.
22946         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22947         vfm1 as a poly_uint64 rather than an int.  Make the same change
22948         for the returned bound_scalar.
22949         (vect_gen_vector_loop_niters): Handle polynomial vf.
22950         (vect_do_peeling): Likewise.  Update call to
22951         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22952         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22953         be constant.
22954         * tree-vect-loop.c (vect_determine_vectorization_factor)
22955         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22956         (vect_get_known_peeling_cost): Likewise.
22957         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22958         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22959         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22960         updating the upper bounds of the loop.
22961         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22962         rather than an int.
22963         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22964         polynomial unroll factors.
22965         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22966         (vect_make_slp_decision): Likewise.
22967         (vect_supported_load_permutation_p): Likewise, and polynomial
22968         vf too.
22969         (vect_analyze_slp_cost): Handle polynomial vf.
22970         (vect_slp_analyze_node_operations): Likewise.
22971         (vect_slp_analyze_bb_1): Likewise.
22972         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22973         than an unsigned HOST_WIDE_INT.
22974         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22975         (vectorizable_load): Handle polynomial vf.
22976         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22977         a poly_uint64.
22978         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22981             Alan Hayward  <alan.hayward@arm.com>
22982             David Sherwood  <david.sherwood@arm.com>
22984         * match.pd: Handle bit operations involving three constants
22985         and try to fold one pair.
22987 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22989         * tree-vect-loop-manip.c: Include gimple-fold.h.
22990         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22991         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22992         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22993         Add a path that uses a step of VF instead of 1, but disable it
22994         for now.
22995         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22996         and niters_no_overflow parameters.  Update calls to
22997         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22998         Create a new SSA name if the latter choses to use a ste other
22999         than zero, and return it via niters_vector_mult_vf_var.
23000         * tree-vect-loop.c (vect_transform_loop): Update calls to
23001         vect_do_peeling, vect_gen_vector_loop_niters and
23002         slpeel_make_loop_iterate_ntimes.
23003         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
23004         (vect_gen_vector_loop_niters): Update declarations after above changes.
23006 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
23008         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
23009         128-bit round to integer instructions.
23010         (ceil<mode>2): Likewise.
23011         (btrunc<mode>2): Likewise.
23012         (round<mode>2): Likewise.
23014 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23016         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
23017         unaligned VSX load/store on P8/P9.
23018         (expand_block_clear): Allow the use of unaligned VSX
23019         load/store on P8/P9.
23021 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23023         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
23024         New function.
23025         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
23026         swap associated with both a load and a store.
23028 2018-01-02  Andrew Waterman  <andrew@sifive.com>
23030         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
23031         * config/riscv/riscv.md (clear_cache): Use it.
23033 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
23035         * web.c: Remove out-of-date comment.
23037 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23039         * expr.c (fixup_args_size_notes): Check that any existing
23040         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
23041         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
23042         (emit_single_push_insn): ...here.
23044 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23046         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
23047         (const_vector_encoded_nelts): New function.
23048         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
23049         (const_vector_int_elt, const_vector_elt): Declare.
23050         * emit-rtl.c (const_vector_int_elt_1): New function.
23051         (const_vector_elt): Likewise.
23052         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
23053         of CONST_VECTOR_ELT.
23055 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23057         * expr.c: Include rtx-vector-builder.h.
23058         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
23059         directly on the tree encoding.
23060         (const_vector_from_tree): Likewise.
23061         * optabs.c: Include rtx-vector-builder.h.
23062         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
23063         sequence of "u" values.
23064         * vec-perm-indices.c: Include rtx-vector-builder.h.
23065         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
23066         directly on the vec_perm_indices encoding.
23068 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23070         * doc/rtl.texi (const_vector): Describe new encoding scheme.
23071         * Makefile.in (OBJS): Add rtx-vector-builder.o.
23072         * rtx-vector-builder.h: New file.
23073         * rtx-vector-builder.c: Likewise.
23074         * rtl.h (rtx_def::u2): Add a const_vector field.
23075         (CONST_VECTOR_NPATTERNS): New macro.
23076         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
23077         (CONST_VECTOR_DUPLICATE_P): Likewise.
23078         (CONST_VECTOR_STEPPED_P): Likewise.
23079         (CONST_VECTOR_ENCODED_ELT): Likewise.
23080         (const_vec_duplicate_p): Check for a duplicated vector encoding.
23081         (unwrap_const_vec_duplicate): Likewise.
23082         (const_vec_series_p): Check for a non-duplicated vector encoding.
23083         Say that the function only returns true for integer vectors.
23084         * emit-rtl.c: Include rtx-vector-builder.h.
23085         (gen_const_vec_duplicate_1): Delete.
23086         (gen_const_vector): Call gen_const_vec_duplicate instead of
23087         gen_const_vec_duplicate_1.
23088         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
23089         (gen_const_vec_duplicate): Use rtx_vector_builder.
23090         (gen_const_vec_series): Likewise.
23091         (gen_rtx_CONST_VECTOR): Likewise.
23092         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
23093         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23094         Build a new vector rather than modifying a CONST_VECTOR in-place.
23095         (handle_special_swappables): Update call accordingly.
23096         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
23097         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
23098         Build a new vector rather than modifying a CONST_VECTOR in-place.
23099         (handle_special_swappables): Update call accordingly.
23101 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23103         * simplify-rtx.c (simplify_const_binary_operation): Use
23104         CONST_VECTOR_ELT instead of XVECEXP.
23106 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23108         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
23109         the selector elements to be different from the data elements
23110         if the selector is a VECTOR_CST.
23111         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
23112         ssizetype for the selector.
23114 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23116         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23117         before testing each element individually.
23118         * tree-vect-generic.c (lower_vec_perm): Likewise.
23120 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23122         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23123         * selftest-run-tests.c (selftest::run_tests): Call it.
23124         * vector-builder.h (vector_builder::operator ==): New function.
23125         (vector_builder::operator !=): Likewise.
23126         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23127         (vec_perm_indices::all_from_input_p): New function.
23128         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23129         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23130         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23131         instead of reading the VECTOR_CST directly.  Detect whether both
23132         vector inputs are the same before constructing the vec_perm_indices,
23133         and update the number of inputs argument accordingly.  Use the
23134         utility functions added above.  Only construct sel2 if we need to.
23136 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23138         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23139         the broadcast of the low byte.
23140         (expand_mult_highpart): Use an explicit encoding for the permutes.
23141         * optabs-query.c (can_mult_highpart_p): Likewise.
23142         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23143         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23144         (vectorizable_bswap): Likewise.
23145         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23146         explicit encoding for the power-of-2 permutes.
23147         (vect_permute_store_chain): Likewise.
23148         (vect_grouped_load_supported): Likewise.
23149         (vect_permute_load_chain): Likewise.
23151 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23153         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23154         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23155         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23156         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23157         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23158         (vect_gen_perm_mask_any): Likewise.
23160 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23162         * int-vector-builder.h: New file.
23163         * vec-perm-indices.h: Include int-vector-builder.h.
23164         (vec_perm_indices): Redefine as an int_vector_builder.
23165         (auto_vec_perm_indices): Delete.
23166         (vec_perm_builder): Redefine as a stand-alone class.
23167         (vec_perm_indices::vec_perm_indices): New function.
23168         (vec_perm_indices::clamp): Likewise.
23169         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23170         (vec_perm_indices::new_vector): New function.
23171         (vec_perm_indices::new_expanded_vector): Update for new
23172         vec_perm_indices class.
23173         (vec_perm_indices::rotate_inputs): New function.
23174         (vec_perm_indices::all_in_range_p): Operate directly on the
23175         encoded form, without computing elided elements.
23176         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23177         encoding.  Update for new vec_perm_indices class.
23178         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23179         the given vec_perm_builder.
23180         (expand_vec_perm_var): Update vec_perm_builder constructor.
23181         (expand_mult_highpart): Use vec_perm_builder instead of
23182         auto_vec_perm_indices.
23183         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23184         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23185         or double series encoding as appropriate.
23186         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23187         vec_perm_indices instead of auto_vec_perm_indices.
23188         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23189         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23190         (vect_permute_store_chain): Likewise.
23191         (vect_grouped_load_supported): Likewise.
23192         (vect_permute_load_chain): Likewise.
23193         (vect_shift_permute_load_chain): Likewise.
23194         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23195         (vect_transform_slp_perm_load): Likewise.
23196         (vect_schedule_slp_instance): Likewise.
23197         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23198         (vectorizable_mask_load_store): Likewise.
23199         (vectorizable_bswap): Likewise.
23200         (vectorizable_store): Likewise.
23201         (vectorizable_load): Likewise.
23202         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23203         vec_perm_indices instead of auto_vec_perm_indices.  Use
23204         tree_to_vec_perm_builder to read the vector from a tree.
23205         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23206         vec_perm_builder instead of a vec_perm_indices.
23207         (have_whole_vector_shift): Use vec_perm_builder and
23208         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23209         truncation to calc_vec_perm_mask_for_shift.
23210         (vect_create_epilog_for_reduction): Likewise.
23211         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23212         from auto_vec_perm_indices to vec_perm_indices.
23213         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23214         instead of changing individual elements.
23215         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23216         the vector in d.perm.
23217         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23218         from auto_vec_perm_indices to vec_perm_indices.
23219         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23220         instead of changing individual elements.
23221         (arm_vectorize_vec_perm_const): Use new_vector to install
23222         the vector in d.perm.
23223         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23224         Update vec_perm_builder constructor.
23225         (rs6000_expand_interleave): Likewise.
23226         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23227         (rs6000_expand_interleave): Likewise.
23229 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23231         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23232         to qimode could truncate the indices.
23233         * optabs.c (expand_vec_perm_var): Likewise.
23235 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23237         * Makefile.in (OBJS): Add vec-perm-indices.o.
23238         * vec-perm-indices.h: New file.
23239         * vec-perm-indices.c: Likewise.
23240         * target.h (vec_perm_indices): Replace with a forward class
23241         declaration.
23242         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23243         * optabs.h: Include vec-perm-indices.h.
23244         (expand_vec_perm): Delete.
23245         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23246         (expand_vec_perm_const): Declare.
23247         * target.def (vec_perm_const_ok): Replace with...
23248         (vec_perm_const): ...this new hook.
23249         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23250         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23251         * doc/tm.texi: Regenerate.
23252         * optabs.def (vec_perm_const): Delete.
23253         * doc/md.texi (vec_perm_const): Likewise.
23254         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23255         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23256         expand_vec_perm for constant permutation vectors.  Assert that
23257         the mode of variable permutation vectors is the integer equivalent
23258         of the mode that is being permuted.
23259         * optabs-query.h (selector_fits_mode_p): Declare.
23260         * optabs-query.c: Include vec-perm-indices.h.
23261         (selector_fits_mode_p): New function.
23262         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23263         is defined, instead of checking whether the vec_perm_const_optab
23264         exists.  Use targetm.vectorize.vec_perm_const instead of
23265         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23266         fit in the vector mode before using a variable permute.
23267         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23268         vec_perm_indices instead of an rtx.
23269         (expand_vec_perm): Replace with...
23270         (expand_vec_perm_const): ...this new function.  Take the selector
23271         as a vec_perm_indices rather than an rtx.  Also take the mode of
23272         the selector.  Update call to shift_amt_for_vec_perm_mask.
23273         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23274         Use vec_perm_indices::new_expanded_vector to expand the original
23275         selector into bytes.  Check whether the indices fit in the vector
23276         mode before using a variable permute.
23277         (expand_vec_perm_var): Make global.
23278         (expand_mult_highpart): Use expand_vec_perm_const.
23279         * fold-const.c: Includes vec-perm-indices.h.
23280         * tree-ssa-forwprop.c: Likewise.
23281         * tree-vect-data-refs.c: Likewise.
23282         * tree-vect-generic.c: Likewise.
23283         * tree-vect-loop.c: Likewise.
23284         * tree-vect-slp.c: Likewise.
23285         * tree-vect-stmts.c: Likewise.
23286         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23287         Delete.
23288         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23289         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23290         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23291         (aarch64_vectorize_vec_perm_const): ...this new function.
23292         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23293         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23294         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23295         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23296         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23297         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23298         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23299         into...
23300         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23301         check for NEON modes.
23302         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23303         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23304         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23305         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23306         into...
23307         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23308         the old VEC_PERM_CONST conditions.
23309         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23310         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23311         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23312         (ia64_vectorize_vec_perm_const_ok): Merge into...
23313         (ia64_vectorize_vec_perm_const): ...this new function.
23314         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23315         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23316         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23317         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23318         * config/mips/mips.c (mips_expand_vec_perm_const)
23319         (mips_vectorize_vec_perm_const_ok): Merge into...
23320         (mips_vectorize_vec_perm_const): ...this new function.
23321         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23322         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23323         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23324         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23325         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23326         (rs6000_expand_vec_perm_const): Delete.
23327         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23328         Delete.
23329         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23330         (altivec_expand_vec_perm_const_le): Take each operand individually.
23331         Operate on constant selectors rather than rtxes.
23332         (altivec_expand_vec_perm_const): Likewise.  Update call to
23333         altivec_expand_vec_perm_const_le.
23334         (rs6000_expand_vec_perm_const): Delete.
23335         (rs6000_vectorize_vec_perm_const_ok): Delete.
23336         (rs6000_vectorize_vec_perm_const): New function.
23337         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23338         an element count and rtx array.
23339         (rs6000_expand_extract_even): Update call accordingly.
23340         (rs6000_expand_interleave): Likewise.
23341         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23342         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23343         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23344         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23345         (rs6000_expand_vec_perm_const): Delete.
23346         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23347         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23348         (altivec_expand_vec_perm_const_le): Take each operand individually.
23349         Operate on constant selectors rather than rtxes.
23350         (altivec_expand_vec_perm_const): Likewise.  Update call to
23351         altivec_expand_vec_perm_const_le.
23352         (rs6000_expand_vec_perm_const): Delete.
23353         (rs6000_vectorize_vec_perm_const_ok): Delete.
23354         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23355         reference to the SPE evmerge intructions.
23356         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23357         an element count and rtx array.
23358         (rs6000_expand_extract_even): Update call accordingly.
23359         (rs6000_expand_interleave): Likewise.
23360         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23361         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23362         new function.
23363         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23365 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23367         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23368         vector mode and that that mode matches the mode of the data
23369         being permuted.
23370         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23371         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23372         directly using expand_vec_perm_1 when forcing selectors into
23373         registers.
23374         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23376 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23378         * optabs-query.h (can_vec_perm_p): Delete.
23379         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23380         * optabs-query.c (can_vec_perm_p): Split into...
23381         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23382         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23383         particular selector is valid.
23384         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23385         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23386         (vect_grouped_load_supported): Likewise.
23387         (vect_shift_permute_load_chain): Likewise.
23388         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23389         (vect_transform_slp_perm_load): Likewise.
23390         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23391         (vectorizable_bswap): Likewise.
23392         (vect_gen_perm_mask_checked): Likewise.
23393         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23394         implementations of variable permutation vectors into account
23395         when deciding which selector to use.
23396         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23397         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23398         with a false third argument.
23399         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23400         to test whether the constant selector is valid and can_vec_perm_var_p
23401         to test whether a variable selector is valid.
23403 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23405         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23406         * optabs-query.c (can_vec_perm_p): Likewise.
23407         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23408         instead of vec_perm_indices.
23409         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23410         (vect_gen_perm_mask_checked): Likewise,
23411         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23412         (vect_gen_perm_mask_checked): Likewise,
23414 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23416         * optabs-query.h (qimode_for_vec_perm): Declare.
23417         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23418         (qimode_for_vec_perm): ...this new function.
23419         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23421 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23423         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23424         does not have a conditional at the top.
23426 2018-01-02  Richard Biener  <rguenther@suse.de>
23428         * ipa-inline.c (big_speedup_p): Fix expression.
23430 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23432         PR target/81616
23433         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23434         for generic 4->6.
23436 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23438         PR target/81616
23439         Generic tuning.
23440         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23441         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23442         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23443         cond_taken_branch_cost 3->4.
23445 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23447         PR tree-optimization/83581
23448         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23449         TODO_cleanup_cfg if any changes have been made.
23451         PR middle-end/83608
23452         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23453         convert_modes if target mode has the right side, but different mode
23454         class.
23456         PR middle-end/83609
23457         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23458         last argument when extracting from CONCAT.  If either from_real or
23459         from_imag is NULL, use expansion through memory.  If result is not
23460         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23461         the parts directly to inner mode, if even that fails, use expansion
23462         through memory.
23464         PR middle-end/83623
23465         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23466         check for bswap in mode rather than HImode and use that in expand_unop
23467         too.
23469 Copyright (C) 2018 Free Software Foundation, Inc.
23471 Copying and distribution of this file, with or without modification,
23472 are permitted in any medium without royalty provided the copyright
23473 notice and this notice are preserved.