2018-08-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blobdb625ddd4f068dec1bcdaf0634dc1afd387952a0
1 2018-08-17  Richard Biener  <rguenther@suse.de>
3         PR tree-optimization/86841
4         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6 2018-08-17  Martin Liska  <mliska@suse.cz>
8         * common.opt: Remove Warn, Init and Report for options with
9         Ignore/Deprecated flag. Warning is done automatically for
10         Deprecated flags.
11         * config/i386/i386.opt: Likewise.
12         * config/ia64/ia64.opt: Likewise.
13         * config/rs6000/rs6000.opt: Likewise.
14         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
15         Remove usage of flag_check_pointer_bounds.
16         * lto-wrapper.c (merge_and_complain): Do not handle
17         OPT_fcheck_pointer_bounds.
18         (append_compiler_options): Likewise.
19         * opt-functions.awk: Do not handle Deprecated.
20         * optc-gen.awk: Check that Var, Report and Init are not
21         used for an option with Ignore/Deprecated flag.
22         * opts-common.c (decode_cmdline_option): Do not report
23         CL_ERR_DEPRECATED.
24         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
25         options.
26         * opts.h (struct cl_option): Remove cl_deprecated flag.
27         (CL_ERR_DEPRECATED): Remove error enum value.
29 2018-08-17  Richard Biener  <rguenther@suse.de>
31         PR middle-end/86505
32         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
33         across a va-arg-pack using call adjust its return value accordingly.
35 2018-08-16  Martin Sebor  <msebor@redhat.com>
37         PR tree-optimization/86853
38         * gimple-ssa-sprintf.c (struct format_result): Rename member.
39         (struct fmtresult): Add member and initialize it in ctors.
40         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
41         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
42         (format_directive): Set POSUNDER4K when MAYFAIL is set.
43         (parse_directive): Handle %C same as %c.
44         (sprintf_dom_walker::compute_format_length): Adjust.
45         (is_call_safe): Adjust.
47 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
49         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
50         for determining how to count the elements.
51         * builtins.h (c_strlen): Adjust prototype.
52         * expr.c (string_constant): Add new parameter mem_size.
53         Set *mem_size appropriately.
54         * expr.h (string_constant): Adjust protoype.
55         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
56         * gimple-fold.h (get_range_strlen): Adjust prototype.
57         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
58         (format_string): Call get_string_length with eltsize.
60 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
62         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
63         to emit the span, rather than setting it as the prefix.
65 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
67         * diagnostic-show-locus.c (layout::start_annotation_line): Add
68         "margin_char" parameter, defaulting to space.  Use it in place
69         of pp_space for the initial part of the margin.
70         (layout::print_leading_fixits): Use '+' when filling the margin
71         of line-insertion fix-it hints.
73 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
75         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
76         Delete.
78 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
80         * config/rs6000/altivec.md: Don't set length attribute to the default
81         value.
82         * config/rs6000/darwin.md: Ditto.
83         * config/rs6000/dfp.md: Ditto.
84         * config/rs6000/htm.md: Ditto.
85         * config/rs6000/rs6000.md: Ditto.
86         * config/rs6000/sync.md: Ditto.
87         * config/rs6000/vsx.md: Ditto.
89 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
91         * config/rs6000/altivec.md: Don't set length attribute to the default
92         value, for branch instructions.
93         * config/rs6000/darwin.md: Ditto.
94         * config/rs6000/rs6000.md: Ditto.
96 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
98         * config/rs6000/rs6000.md (length): Always define as const_int 4.
99         (unnamed conditional branch define_insn): Set length to 4 or 8
100         depending on offset.
101         (<bd>_<mode>): Similar, for alternative 0.
102         (<bd>tf_<mode>): Ditto.
104 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
106         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
108 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
110         * doc/rtl.texi: Replace old RTX class names with new names.
113 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
115         * expmed.h (canonicalize_comparison): New declaration.
116         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
117         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
118         * optabs.c (prepare_cmp_insn): Likewise.
119         * rtl.h (unsigned_condition_p): New function which checks if a
120         comparison operator is unsigned.
122 2018-08-16  Nathan Sidwell  <nathan@acm.org>
124         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
125         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
127 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
129         PR target/84711
130         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
131         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
132         (mov<mov>): ..this and enable unconditionally.
134 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
136         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
138 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
140         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
141         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
142         "Common" with "Target".
144 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
146         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
147         * doc/invoke.texi (mmitigate-rop): Remove.
148         * config/i386/i386.c: Do not include "regrename.h".
149         (ix86_rop_should_change_byte_p, reg_encoded_number)
150         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
151         Remove.
152         (ix86_reorg): Remove call to ix86_mitigate_rop.
153         * config/i386/i386.md (attr "modrm_class"): Remove.
154         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
155         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
156         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
158 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
160         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
161         allow folding of mergeh() and mergel() for the float and double types.
162         (fold_mergehl_helper): Rework to handle building a permute tree
163         for float vectors.
165 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
167         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
168         for TARGET_SSE.
170 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
172         * common.opt (fdiagnostics-show-labels): New option.
173         * diagnostic-show-locus.c (class layout_range): Add field
174         "m_label".
175         (class layout): Add field "m_show_labels_p".
176         (layout_range::layout_range): Add param "label" and use it to
177         initialize m_label.
178         (make_range): Pass in NULL for new "label" param of layout_range's
179         ctor.
180         (layout::layout): Initialize m_show_labels_p.
181         (layout::maybe_add_location_range): Pass in loc_range->m_label
182         when constructing layout_range instances.
183         (struct line_label): New struct.
184         (layout::print_any_labels): New member function.
185         (layout::print_line): Call it if label-printing is enabled.
186         (selftest::test_one_liner_labels): New test.
187         (selftest::test_diagnostic_show_locus_one_liner): Call it.
188         * diagnostic.c (diagnostic_initialize): Initialize
189         context->show_labels_p.
190         * diagnostic.h (struct diagnostic_context): Add field
191         "show_labels_p".
192         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
193         -fno-diagnostics-show-labels.
194         * dwarf2out.c (gen_producer_string): Add
195         OPT_fdiagnostics_show_labels to the ignored options.
196         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
197         param.
198         (gcc_rich_location::maybe_add_expr): Likewise.
199         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
200         label" param, defaulting to NULL.
201         (gcc_rich_location::add_expr): Add "label" param.
202         (gcc_rich_location::maybe_add_expr): Likewise.
203         (class text_range_label): New class.
204         (class range_label_for_type_mismatch): New class.
205         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
206         of format_warning_va.
207         (fmtwarn_n): Likewise for new params of format_warning_n_va.
208         * lto-wrapper.c (merge_and_complain): Add
209         OPT_fdiagnostics_show_labels to the "pick one setting" options.
210         (append_compiler_options): Likewise to the dropped options.
211         (append_diag_options): Likewise to the passed-on options.
212         * opts.c (common_handle_option): Handle the new option.
213         * selftest-diagnostic.c
214         (test_diagnostic_context::test_diagnostic_context): Enable
215         show_labels_p.
216         * substring-locations.c: Include "gcc-rich-location.h".
217         (format_warning_n_va): Add "fmt_label" and "param_label" params
218         and use them as appropriate.
219         (format_warning_va): Add "fmt_label" and "param_label" params,
220         passing them on to format_warning_n_va.
221         (format_warning_at_substring): Likewise.
222         (format_warning_at_substring_n): Likewise.
223         * substring-locations.h (format_warning_va): Add "fmt_label" and
224         "param_label" params.
225         (format_warning_n_va): Likewise.
226         (format_warning_at_substring): Likewise.
227         (format_warning_at_substring_n): Likewise.
228         * toplev.c (general_init): Initialize global_dc->show_labels_p.
230 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
232         PR testsuite/86519
233         * builtins.c (expand_builtin_memcmp): Do not expand the call
234         when overflow is detected.
236 2018-08-15  Martin Sebor  <msebor@redhat.com>
238         PR tree-optimization/71625
239         * config/aarch64/aarch64-builtins.c
240         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
242 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
244         * config/s390/s390.c (s390_reorg): Remove loop.
246 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
248         * config/darwin.c
249          (darwin_function_switched_text_sections): Delete.
250         * gcc/config/darwin.h
251          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
253 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
255         PR target/81685
256         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
257         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
258         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
260 2018-08-15  Martin Liska  <mliska@suse.cz>
262         PR tree-optimization/86925
263         * predict.c (expr_expected_value_1): When taking
264         later predictor, assign also probability.
265         Use fold_build2_initializer_loc in order to fold
266         the expression in -frounding-math.
268 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
270         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
271         patterns.
272         (expand_vec_perm_1): Try the new method.
274 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
276         PR target/86547
277         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
278         Check whether lra_live_max_point is 0 before dividing.
280 2018-08-14  Martin Sebor  <msebor@redhat.com>
282         PR tree-optimization/86650
283         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
284         (vrp_prop::check_mem_ref): Same.
286 2018-08-13  Liu Hao <lh_mouse@126.com>
288         * pretty-print.c (eat_esc_sequence): Swap the foreground and
289         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
290         and clear it thereafter, as it only works for DBCS.
292 2018-08-13  Liu Hao <lh_mouse@126.com>
294         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
295         handle returned by _get_osf_handle().
297 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
299         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
300         for folding vec_perm.
302 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
304         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
305         Add support for gimple-folding of vec_pack() and vec_unpack()
306         intrinsics.
308 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
310         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
311         vec_xst variants to the list.
312         (rs6000_gimple_fold_builtin): Add support for folding unaligned
313         vector loads and stores.
315 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
317         * config.gcc (rs6000-ibm-aix4.x): Delete.
318         (rs6000-ibm-aix5.1): Delete.
319         (rs6000-ibm-aix5.2): Delete.
320         (rs6000-ibm-aix5.3): Delete.
321         * config/rs6000/aix43.h: Delete.
322         * config/rs6000/aix51.h: Delete.
323         * config/rs6000/aix52.h: Delete.
324         * config/rs6000/t-aix43: Delete.
326 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
328         * config/s390/s390.c (s390_decompose_constant_pool_ref):
329         New function.
330         (s390_decompose_address): Factor out constant pool ref
331         decomposition.
333 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
335         * config/nds32/nds32-predicates.c
336         (nds32_can_use_bclr_p): Change return type as bool.
337         (nds32_can_use_bset_p): Ditto.
338         (nds32_can_use_btgl_p): Ditto.
339         (nds32_can_use_bitci_p): Ditto.
340         * config/nds32/nds32-protos.h
341         (nds32_can_use_bclr_p): Change declaration.
342         (nds32_can_use_bset_p): Ditto.
343         (nds32_can_use_btgl_p): Ditto.
344         (nds32_can_use_bitci_p): Ditto.
346 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
348         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
349         Support -msched-prolog-epilog option.
350         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
352 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
354         * common/config/nds32/nds32-common.c
355         (nds32_option_optimization_table): Enalbe -malways-align.
357 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
359         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
360         extra_headers.
361         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
362         OPT_misr_secure_ case.
363         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
364         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
365         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
366         secure attribute.
367         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
368         (nds32_isr_info): New field security_level.
369         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
370         * config/nds32/nds32.md (return_internal): Consider critical attribute.
371         * config/nds32/nds32.opt (misr-secure): New option.
372         * config/nds32/nds32_init.inc: New file.
373         * config/nds32/nds32_isr.h: New file.
375 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
377         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
378         Update comment for atomic instructions.
379         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
380         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
381         Remove.
382         (atomic_loaddi): Revise fence expansion to only emit fence prior to
383         load for __ATOMIC_SEQ_CST model.
384         (atomic_loaddi_1): Remove float register target.
385         (atomic_storedi): Handle CONST_INT values.
386         (atomic_storedi_1): Remove float register source.  Add special case
387         for zero value.
388         (memory_barrier): New expander and insn.
390 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
392         PR tree-optimization/86835
393         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
394         new_stmt after def_gsi, make sure to insert new_square_stmt after
395         that stmt, not 2 stmts before it.
397 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
399         PR target/82418
400         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
401         instead of SWI48.
403 2018-08-10  Martin Liska  <mliska@suse.cz>
405         PR target/83610
406         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
407         function type.
408         * builtins.c (expand_builtin_expect_with_probability):
409         New function.
410         (expand_builtin_expect_with_probability): New function.
411         (build_builtin_expect_predicate): Add new argumnet probability
412         for BUILT_IN_EXPECT_WITH_PROBABILITY.
413         (fold_builtin_expect):
414         (fold_builtin_2):
415         (fold_builtin_3):
416         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
417         * builtins.h (fold_builtin_expect): Set new argument.
418         * doc/extend.texi: Document __builtin_expect_with_probability.
419         * doc/invoke.texi: Likewise.
420         * gimple-fold.c (gimple_fold_call): Pass new argument.
421         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
422         also BUILT_IN_EXPECT_WITH_PROBABILITY.
423         * predict.c (get_predictor_value): New function.
424         (expr_expected_value): Add new argument probability. Assume
425         that predictor and probability are always non-null.
426         (expr_expected_value_1): Likewise.  For __builtin_expect and
427         __builtin_expect_with_probability set probability.  Handle
428         combination in binary expressions.
429         (tree_predict_by_opcode): Simplify code by simply calling
430         get_predictor_value.
431         (pass_strip_predict_hints::execute): Add handling of
432         BUILT_IN_EXPECT_WITH_PROBABILITY.
433         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
434         new predictor.
435         * tree.h (DECL_BUILT_IN_P): New function.
437 2018-08-10  Martin Liska  <mliska@suse.cz>
439         PR tree-optimization/85799
440         * passes.def: Add argument for pass_strip_predict_hints.
441         * predict.c (class pass_strip_predict_hints): Add new argument
442         early_p.
443         (strip_predictor_early): New function.
444         (pass_strip_predict_hints::execute): Call the function to
445         strip predictors.
446         (strip_predict_hints): New function.
447         * predict.def: Fix comment.
449 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
451         * Makefile.in: Clarify which tm.texi to copy over to assert the
452         right to grant a GFDL license for all.
454 2018-08-09  Jeff Law  <law@redhat.com>
456         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
457         unused variable.
459 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
461         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
462         prototype.
464 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
466         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
467         reductions for variable-length vectors.
469 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
471         PR other/84889
472         * common.opt (fdiagnostics-show-line-numbers): New option.
473         * diagnostic-show-locus.c (class layout): Add fields
474         "m_show_line_numbers_p" and "m_linenum_width";
475         (num_digits): New function.
476         (test_num_digits): New function.
477         (layout::layout): Initialize new fields.  Update m_x_offset
478         logic to handle any left margin.
479         (layout::print_source_line): Print line number when requested.
480         (layout::start_annotation_line): New member function.
481         (layout::print_annotation_line): Call it.
482         (layout::print_leading_fixits): Likewise.
483         (layout::print_trailing_fixits): Likewise.  Update calls to
484         move_to_column for new parameter.
485         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
486         it to potentially call start_annotation_line.
487         (layout::show_ruler): Call start_annotation_line.
488         (selftest::test_line_numbers_multiline_range): New selftest.
489         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
490         and selftest::test_line_numbers_multiline_range.
491         * diagnostic.c (diagnostic_initialize): Initialize
492         show_line_numbers_p.
493         * diagnostic.h (struct diagnostic_context): Add field
494         "show_line_numbers_p".
495         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
496         -fno-diagnostics-show-line-numbers.
497         * dwarf2out.c (gen_producer_string): Add
498         OPT_fdiagnostics_show_line_numbers to the ignored options.
499         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
500         one setting" options.
501         (append_compiler_options): Likewise to the dropped options.
502         (append_diag_options): Likewise to the passed-on options.
503         * opts.c (common_handle_option): Handle the new option.
504         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
506 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
508         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
509         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
510         third argument of type "const signed char" to descriptions of
511         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
512         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
513         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
514         __builtin_bcdsub_ov functions.
516 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
518         PR tree-optimization/86858
519         * tree-vect-loop.c (vect_is_simple_reduction): Restore
520         flow_bb_inside_loop_p calls.
522 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
524         PR tree-optimization/86871
525         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
526         instead of gimple_assign_lhs.
528 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
530         PR target/86887
531         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
532         register constraint to operand 0.
533         (add<mode>3_carryinC): Likewise.
534         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
536 2018-08-09  Martin Liska  <mliska@suse.cz>
538         PR c/86895
539         * common.opt: Remove extra line.
541 2018-08-09  Martin Liska  <mliska@suse.cz>
543         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
544         at the end of a line, make first letter capital and end up
545         a sentence with a dot.
546         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
547         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
548         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
549         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
550         (PARAM_MAX_ISL_OPERATIONS): Likewise.
551         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
552         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
553         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
554         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
555         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
556         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
557         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
558         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
559         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
560         (PARAM_TREE_REASSOC_WIDTH): Likewise.
561         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
562         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
563         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
565 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
567         PR target/84332
568         * config/s390/s390.c (s390_option_override_internal): Reduce the
569         stack-clash-protection-probe-interval param if it would be too big
570         for z900.
572 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
574         PR target/46179
575         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
576         * config/m68k/m68k.c (handle_move_double): Don't call
577         m68k_final_prescan_insn.
578         (m68k_adjust_decorated_operand): Renamed from
579         m68k_final_prescan_insn, remove first and third operand and
580         simplify.
581         (print_operand): Call it.
582         (print_operand_address): Call it.
584 2018-08-08  Nathan Sidwell  <nathan@acm.org>
586         * diagnostic.c (diagnostic_report_current_module): Use
587         linemap_included_from & linemap_included_from_linemap.
589 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
591         * config/aarch64/aarch64-cores.def: Add phecda core.
592         * config/aarch64/aarch64-tune.md: Regenerate.
593         * doc/invoke.texi: Add phecda core.
595 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
597         PR target/85295
598         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
599         definitions.
600         * config/s390/s390.md ("movti"): Add more alternatives for
601         constant to GPR copies.
603 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
605         * config/s390/s390.c: Fix whitespace damage throughout the file.
606         * config/s390/s390.h: Likewise.
607         * config/s390/tpf.h: Likewise.
609 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
611         * config/s390/s390.c (s390_loadrelative_operand_p):
612         Remove TARGET_CPU_ZARCH usages.
613         (s390_rtx_costs): Likewise.
614         (s390_legitimate_constant_p): Likewise.
615         (s390_cannot_force_const_mem): Likewise.
616         (legitimate_reload_constant_p): Likewise.
617         (s390_preferred_reload_class): Likewise.
618         (legitimize_pic_address): Likewise.
619         (legitimize_tls_address): Likewise.
620         (s390_split_branches): Removed.
621         (s390_add_execute): Removed.
622         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
623         (s390_mainpool_start): Likewise.
624         (s390_mainpool_finish): Likewise.
625         (s390_mainpool_cancel): Removed.
626         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
627         (s390_chunkify_cancel): Likewise.
628         (s390_return_addr_rtx): Likewise.
629         (s390_register_info): Remove split_branches_pending_p uages.
630         (s390_optimize_register_info): Likewise.
631         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
632         split_branches_pending_p usages.
633         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
634         (s390_load_got): Likewise.
635         (s390_expand_split_stack_prologue): Likewise.
636         (output_asm_nops): Likewise.
637         (s390_function_profiler): Likewise.
638         (s390_emit_call): Likewise.
639         (s390_conditional_register_usage): Likewise.
640         (s390_optimize_prologue): Likewise.
641         (s390_reorg): Remove TARGET_CPU_ZARCH and
642         split_branches_pending_p usages.
643         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
644         usages.
645         (s390_output_indirect_thunk_function): Likewise.
646         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
647         (TARGET_CPU_ZARCH_P): Removed.
648         (struct machine_function): Remove split_branches_pending_p.
649         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
651 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
653         * common/config/s390/s390-common.c (processor_flags_table):
654         Remove flags.
655         * config.gcc: Remove with_arch/with_tune support.
656         * config/s390/2064.md: Remove cpu attribute comparisons.
657         * config/s390/driver-native.c (s390_host_detect_local_cpu):
658         Remove MTN.
659         * config/s390/linux.h (ASM_SPEC):
660         Remove -march support.
661         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
662         Use a table to get an arch level.
663         * config/s390/s390-opts.h (enum processor_type):
664         Remove enum values.
665         * config/s390/s390.c
666         (processor_table): Remove entries, add arch_level values.
667         (s390_issue_rate): Remove cases.
668         (s390_option_override): Adjust
669         s390_option_override_internal() call.
670         (s390_option_override_internal): Remove deprecation warning.
671         (s390_valid_target_attribute_tree): Adjust
672         s390_option_override_internal() call.
673         * config/s390/s390.h (struct s390_processor):
674         Share with s390-c.c, add arch_level field.
675         * config/s390/s390.md:
676         Remove occurrences in cpu attribute.
677         * config/s390/s390.opt: Remove -march/-mtune support.
678         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
679         * doc/invoke.texi: Remove deprecation warning.
681 2018-08-08  Luis Machado  <luis.machado@linaro.org>
683         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
684         global.
685         (qdf24xx_tunings): Set vector cost structure to
686         qdf24xx_vector_cost.
688         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
689         <register_sextend>: Set to 3.
691 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
693         PR target/86838
694         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
695         * config/aarch64/aarch64-simd.md
696         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
697         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
698         (aarch64_frecpx<mode>): ...this new pattern.
699         * config/aarch64/aarch64-simd-builtins.def: Remove comment
700         about aarch64_frecp<FRECP:frecp_suffix><mode>.
702 2018-08-07  Martin Liska  <mliska@suse.cz>
704         PR middle-end/83023
705         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
706         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
707         * predict.def (PRED_MALLOC_NONNULL): New predictor.
708         * doc/extend.texi: Document that malloc attribute adds
709         hit to compiler.
711 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
713         PR target/86785
714         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
715         Define to speculation_safe_value_not_needed.
717 2018-08-06  Jeff Law  <law@redhat.com>
719         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
720         the vr_values instance to cprop_into_stmt.
721         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
722         (cprop_operand): Also query EVRP to determine if OP is a constant.
724 2018-08-06  Nathan Sidwell  <nathan@acm.org>
726         * diagnostic.c (diagnostic_report_current_module): Reroll
727         included-at loop.  Translate text.
729 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
731         * function-tests.c (selftest::test_expansion_to_rtl): Call
732         free_after_compilation.
734 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
736         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
738 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
740         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
741         loops with memory block operations from getting unrolled.
743 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
745         PR target/86807
746         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
747         Define to speculation_safe_value_not_needed.
749 2018-08-06  Jeff Law  <law@redhat.com>
751         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
752         assert.
754 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
756         PR target/86662
757         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
758         with all enabled __intN types.
760         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
762 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
764         * alias.c (record_set): Check for clobber high.
765         * cfgexpand.c (expand_gimple_stmt): Likewise.
766         * combine-stack-adj.c (single_set_for_csa): Likewise.
767         * combine.c (find_single_use_1): Likewise.
768         (set_nonzero_bits_and_sign_copies): Likewise.
769         (get_combine_src_dest): Likewise.
770         (is_parallel_of_n_reg_sets): Likewise.
771         (try_combine): Likewise.
772         (record_dead_and_set_regs_1): Likewise.
773         (reg_dead_at_p_1): Likewise.
774         (reg_dead_at_p): Likewise.
775         * dce.c (deletable_insn_p): Likewise.
776         (mark_nonreg_stores_1): Likewise.
777         (mark_nonreg_stores_2): Likewise.
778         * df-scan.c (df_find_hard_reg_defs): Likewise.
779         (df_uses_record): Likewise.
780         (df_get_call_refs): Likewise.
781         * dwarf2out.c (mem_loc_descriptor): Likewise.
782         * haifa-sched.c (haifa_classify_rtx): Likewise.
783         * ira-build.c (create_insn_allocnos): Likewise.
784         * ira-costs.c (scan_one_insn): Likewise.
785         * ira.c (equiv_init_movable_p): Likewise.
786         (rtx_moveable_p): Likewise.
787         (interesting_dest_for_shprep): Likewise.
788         * jump.c (mark_jump_label_1): Likewise.
789         * postreload-gcse.c (record_opr_changes): Likewise.
790         * postreload.c (reload_cse_simplify): Likewise.
791         (struct reg_use): Add source expr.
792         (reload_combine): Check for clobber high.
793         (reload_combine_note_use): Likewise.
794         (reload_cse_move2add): Likewise.
795         (move2add_note_store): Likewise.
796         * print-rtl.c (print_pattern): Likewise.
797         * recog.c (decode_asm_operands): Likewise.
798         (store_data_bypass_p): Likewise.
799         (if_test_bypass_p): Likewise.
800         * regcprop.c (kill_clobbered_value): Likewise.
801         (kill_set_value): Likewise.
802         * reginfo.c (reg_scan_mark_refs): Likewise.
803         * reload1.c (maybe_fix_stack_asms): Likewise.
804         (eliminate_regs_1): Likewise.
805         (elimination_effects): Likewise.
806         (mark_not_eliminable): Likewise.
807         (scan_paradoxical_subregs): Likewise.
808         (forget_old_reloads_1): Likewise.
809         * reorg.c (find_end_label): Likewise.
810         (try_merge_delay_insns): Likewise.
811         (redundant_insn): Likewise.
812         (own_thread_p): Likewise.
813         (fill_simple_delay_slots): Likewise.
814         (fill_slots_from_thread): Likewise.
815         (dbr_schedule): Likewise.
816         * resource.c (update_live_status): Likewise.
817         (mark_referenced_resources): Likewise.
818         (mark_set_resources): Likewise.
819         * rtl.c (copy_rtx): Likewise.
820         * rtlanal.c (reg_referenced_p): Likewise.
821         (single_set_2): Likewise.
822         (noop_move_p): Likewise.
823         (note_stores): Likewise.
824         * sched-deps.c (sched_analyze_reg): Likewise.
825         (sched_analyze_insn): Likewise.
827 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
829         * cse.c (invalidate_reg): New function extracted from...
830         (invalidate): ...here.
831         (canonicalize_insn): Check for clobber high.
832         (invalidate_from_clobbers): invalidate clobber highs.
833         (invalidate_from_sets_and_clobbers): Likewise.
834         (count_reg_usage): Check for clobber high.
835         (insn_live_p): Likewise.
836         * cselib.c (cselib_expand_value_rtx_1):Likewise.
837         (cselib_invalidate_regno): Check for clobber in setter.
838         (cselib_invalidate_rtx): Pass through setter.
839         (cselib_invalidate_rtx_note_stores):
840         (cselib_process_insn): Check for clobber high.
841         * cselib.h (cselib_invalidate_rtx): Add operand.
843 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
845         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
846         (mark_not_eliminable): Likewise.
847         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
848         * lra-lives.c (process_bb_lives): Check for clobber high.
849         * lra.c (new_insn_reg): Remember clobber highs.
850         (collect_non_operand_hard_regs): Check for clobber high.
851         (lra_set_insn_recog_data): Likewise.
852         (add_regs_to_insn_regno_info): Likewise.
853         (lra_update_insn_regno_info): Likewise.
855 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
857         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
858         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
860 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
862         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
863         (copy_insn_1): Likewise.
864         (gen_hard_reg_clobber_high): New gen function.
865         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
866         * genemit.c (gen_exp): Likewise.
867         (gen_emit_seq): Pass through info.
868         (gen_insn): Check for CLOBBER_HIGH.
869         (gen_expand): Pass through info.
870         (gen_split): Likewise.
871         (output_add_clobbers): Likewise.
872         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
873         (remove_clobbers): Likewise.
874         * rtl.h (gen_hard_reg_clobber_high): New declaration.
876 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
878         * doc/rtl.texi (clobber_high): Add.
879         (parallel): Add in clobber high
880         * rtl.c (rtl_check_failed_code3): Add function.
881         * rtl.def (CLOBBER_HIGH): Add expression.
882         * rtl.h (RTL_CHECKC3): Add macro.
883         (rtl_check_failed_code3): Add declaration.
884         (XC3EXP): Add macro.
886 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
888         PR target/86386
889         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
890         cfun->machine->max_used_stack_alignment if needed.
892 2018-08-04  Martin Sebor  <msebor@redhat.com>
894         PR tree-optimization/86571
895         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
896         NaN output to 4.
898 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
900         PR target/86799
901         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
902         Define.
904 2018-08-03  Jeff Law  <law@redhat.com>
906         PR target/86795
907         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
908         Define to speculation_safe_value_not_needed.
910 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
912         * doc/gcov.texi (-x): Remove duplicate "to".
913         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
914         (-Wif-not-aligned): Remove duplicate "is".
915         (-flto): Remove duplicate "the".
916         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
917         duplicate "v5.00.b".
918         (MSP430 Options): Remove duplicate "and" from the description
919         of "-mgprel-sec=regexp".
920         (x86 Options): Remove duplicate copies of "vmldLog102" and
921         vmlsLog104 from description of "-mveclibabi=type".
923 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
925         * internal-fn.h (first_commutative_argument): Declare.
926         * internal-fn.c (first_commutative_argument): New function.
927         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
928         restrictions for pattern statements.  Use first_commutative_argument
929         to look for commutative operands in calls to internal functions.
931 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
933         * Makefile.in (wide-int-range.o): New.
934         * tree-vrp.c: Move all the wide_int_* functions to...
935         * wide-int-range.cc: ...here.
936         * tree-vrp.h: Move all the wide_int_* prototypes to...
937         * wide-int-range.h: ...here.
939 2018-08-03  Tom de Vries  <tdevries@suse.de>
941         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
942         UI_NONE.
943         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
944         * except.c (output_function_exception_table): Do early exit if
945         targetm_common.except_unwind_info (&global_options) == UI_NONE.
947 2018-08-03  Martin Liska  <mliska@suse.cz>
949         * predict.c (dump_prediction): Change to 2 digits
950         in fraction part.
952 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
954         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
955         neon_dup_q to...
956         (falkor_am_1_gtov_gtov): ... a new insn reservation.
958 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
960         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
961         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
962         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
963         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
964         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
966 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
968         * diagnostic-show-locus.c (diagnostic_show_locus): Use
969         pp_take_prefix when saving the existing prefix.
970         * diagnostic.c (diagnostic_append_note): Likewise.
971         * langhooks.c (lhd_print_error_function): Likewise.
972         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
973         param's type.  Free the existing prefix.
974         (pp_take_prefix): New function.
975         (pretty_printer::pretty_printer): Drop the prefix parameter.
976         Rename the length parameter to match the comment.
977         (pretty_printer::~pretty_printer): Free the prefix.
978         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
979         parameter.
980         (struct pretty_printer): Drop the "const" from "prefix" field's
981         type and clarify memory management.
982         (pp_set_prefix): Drop the "const" from the 2nd param.
983         (pp_take_prefix): New decl.
985 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
987         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
988         for word_mode_ok here instead of passing as argument.
989         (expand_block_compare): Change select_block_compare_mode() call.
990         (expand_strncmp_gpr_sequence): New function.
991         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
993 2018-08-02  Jeff Law  <law@redhat.com>
995         PR target/86790
996         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
997         Define to speculation_safe_value_not_needed.
999         PR target/86784
1000         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1001         Define to speculation_safe_value_not_needed.
1003 2018-08-02  Tom de Vries  <tdevries@suse.de>
1005         PR target/86660
1006         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
1007         function.  Return UI_TARGET unconditionally.
1008         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
1009         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
1011 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1013         * genemit.c (print_overload_test): Fix typo.
1015 2018-08-02  Richard Biener  <rguenther@suse.de>
1017         PR tree-optimization/86816
1018         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
1019         which checks for value availability before querying it.
1020         (gvn_uses_equal): Use it.
1021         (same_succ_hash): Likewise.
1022         (gimple_equal_p): Likewise.
1024 2018-08-02  Nick Clifton  <nickc@redhat.com>
1026         PR target/86813
1027         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1028         Define to speculation_safe_value_not_needed.
1030         PR target/86810
1031         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1032         Define to speculation_safe_value_not_needed.
1034         PR target/86810
1035         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1036         Define to speculation_safe_value_not_needed.
1038         PR target/86803
1039         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1040         Define to speculation_safe_value_not_needed.
1042         PR target/86797
1043         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1044         Define to speculation_safe_value_not_needed.
1046         PR target/86791
1047         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1048         Define to speculation_safe_value_not_needed.
1050         PR target/86789
1051         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1052         Define to speculation_safe_value_not_needed.
1054         PR target/86787
1055         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1056         Define to speculation_safe_value_not_needed.
1058         PR target/86782
1059         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1060         speculation_safe_value_not_needed.
1062         PR target/86781
1063         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
1064         to speculation_safe_value_not_needed.
1066 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1068         * doc/md.texi: Expand the documentation of instruction names
1069         to mention port-local uses.  Document '@' in pattern names.
1070         * read-md.h (overloaded_instance, overloaded_name): New structs.
1071         (mapping): Declare.
1072         (md_reader::handle_overloaded_name): New member function.
1073         (md_reader::get_overloads): Likewise.
1074         (md_reader::m_first_overload): New member variable.
1075         (md_reader::m_next_overload_ptr): Likewise.
1076         (md_reader::m_overloads_htab): Likewise.
1077         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
1078         m_next_overload_ptr and m_overloads_htab.
1079         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
1080         (get_mode_token, get_code_token, get_int_token): New functions.
1081         (map_attr_string): Add an optional argument that passes back
1082         the associated iterator.
1083         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
1084         (md_reader::handle_overloaded_name, add_overload_instance): New
1085         functions.
1086         (apply_iterators): Handle '@' names.  Report an error if '@'
1087         is used without iterators.
1088         (initialize_iterators): Initialize the new iterator_group fields.
1089         * genopinit.c (handle_overloaded_code_for)
1090         (handle_overloaded_gen): New functions.
1091         (main): Use them to print declarations of maybe_code_for_* and
1092         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
1093         * genemit.c (print_overload_arguments, print_overload_test)
1094         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
1095         (main): Use it to print definitions of maybe_code_for_* and
1096         maybe_gen_* functions.
1097         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
1098         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
1099         instead of explicit mode checks.
1100         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
1101         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
1102         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
1103         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
1104         (aarch64_expand_compare_and_swap): Likewise
1105         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
1106         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
1107         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
1108         (aarch64_constant_pool_reload_icode): Delete.
1109         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
1110         instead of aarch64_constant_pool_reload_icode.  Use
1111         code_for_aarch64_reload_mov instead of explicit mode checks.
1112         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
1113         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
1114         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
1115         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
1116         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
1117         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
1118         (aarch64_atomic_load_op_code): Delete.
1119         (aarch64_emit_atomic_load_op): Likewise.
1120         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
1121         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
1122         instead of aarch64_emit_atomic_load_op.
1123         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
1124         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
1125         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
1126         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
1127         character before the pattern name.
1128         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
1129         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
1130         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
1131         (aarch64_frecps<mode>): Likewise.
1132         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
1133         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
1134         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
1135         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
1136         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
1138 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
1140         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
1141         Allow HFmode constants if TARGET_FP_F16INST.
1143 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
1145         PR target/86014
1146         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
1147         No longer check last store for clobber of address register.
1149 2018-08-02  Martin Liska  <mliska@suse.cz>
1151         PR gcov-profile/86817
1152         * gcov.c (process_all_functions): New function.
1153         (main): Call it.
1154         (process_file): Move functions processing to
1155         process_all_functions.
1157 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
1159         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
1160         "const" to the "gimple *" and "rtx_insn *" parameters.
1161         * dumpfile.h (dump_user_location_t::dump_user_location_t):
1162         Likewise.
1163         (dump_location_t::dump_location_t): Likewise.
1165 2018-08-01  Martin Sebor  <msebor@redhat.com>
1167         PR tree-optimization/86650
1168         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
1169         rather than a "gcall *".  Directly pass the data of interest
1170         to percent_K_format, rather than building a temporary CALL_EXPR
1171         to hold it.
1172         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
1173         (gimple_fold_builtin_strncat): Adjust.
1174         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
1175         gcall* argument with gimple*.
1176         * gimple-ssa-warn-restrict.c (check_call): Same.
1177         (wrestrict_dom_walker::before_dom_children): Same.
1178         (builtin_access::builtin_access): Same.
1179         (check_bounds_or_overlap): Same
1180         (maybe_diag_overlap): Same.
1181         (maybe_diag_offset_bounds): Same.
1182         * tree-diagnostic.c (default_tree_printer): Move usage of
1183         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
1184         to this callsite.
1185         * tree-pretty-print.c (percent_K_format): Add argument.
1186         * tree-pretty-print.h: Add argument.
1187         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
1188         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
1189         (maybe_diag_stxncpy_trunc): Same.
1190         (handle_builtin_stxncpy): Same.
1191         (handle_builtin_strcat): Same.
1193 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1195         * match.pd: Optimise pointer range checks.
1197 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1199         PR tree-optimization/86758
1200         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
1201         to remove pattern statements.
1203 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1205         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
1206         result of dfs_enumerate_from when constructing stmt_vec_infos,
1207         instead of additionally calling get_loop_body.
1209 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1211         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
1212         parameter.
1213         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
1214         When creating an iv, assert that the step is not known to be zero.
1215         (vect_setup_realignment): Update call accordingly.
1216         * tree-vect-stmts.c (vectorizable_store): Likewise.
1217         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
1219 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1221         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
1222         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
1223         (vectorizable_reduction): Likewise.
1224         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
1225         (vect_detect_hybrid_slp_stmts): Likewise.
1226         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
1228 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
1230         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
1231         (wide_int_set_zero_nonzero_bits): ...this.
1232         (zero_nonzero_bits_from_vr): Rename to...
1233         (vrp_set_zero_nonzero_bits): ...this.
1234         (extract_range_from_multiplicative_op_1): Abstract wide int
1235         code...
1236         (wide_int_range_multiplicative_op): ...here.
1237         (extract_range_from_binary_expr_1): Extract wide int binary
1238         operations into their own functions.
1239         (wide_int_range_lshift): New.
1240         (wide_int_range_can_optimize_bit_op): New.
1241         (wide_int_range_shift_undefined_p): New.
1242         (wide_int_range_bit_xor): New.
1243         (wide_int_range_bit_ior): New.
1244         (wide_int_range_bit_and): New.
1245         (wide_int_range_trunc_mod): New.
1246         (extract_range_into_wide_ints): New.
1247         (vrp_shift_undefined_p): New.
1248         (extract_range_from_multiplicative_op): New.
1249         (vrp_can_optimize_bit_op): New.
1250         * tree-vrp.h (value_range::dump): New.
1251         (wide_int_range_multiplicative_op): New.
1252         (wide_int_range_lshift):New.
1253         (wide_int_range_shift_undefined_p): New.
1254         (wide_int_range_bit_xor): New.
1255         (wide_int_range_bit_ior): New.
1256         (wide_int_range_bit_and): New.
1257         (wide_int_range_trunc_mod): New.
1258         (zero_nonzero_bits_from_bounds): Rename to...
1259         (wide_int_set_zero_nonzero_bits): ...this.
1260         (zero_nonzero_bits_from_vr): Rename to...
1261         (vrp_set_zero_nonzero_bits): ...this.
1262         (range_easy_mask_min_max): Rename to...
1263         (wide_int_range_can_optimize_bit_op): this.
1264         * vr-values.c (simplify_bit_ops_using_ranges): Rename
1265         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
1267 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1269         * tree-vectorizer.h (vect_orig_stmt): New function.
1270         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
1271         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
1272         (vect_create_epilog_for_reduction): Likewise.
1273         (vectorizable_live_operation): Likewise.
1274         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
1275         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
1276         * tree-vect-stmts.c (vectorizable_call): Likewise.
1277         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
1279 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1281         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
1282         argument.
1283         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
1284         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
1285         (vect_transform_loop): Likewise.
1286         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1288 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1290         * tree-vectorizer.h (vect_schedule_slp): Return void.
1291         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
1292         (vect_schedule_slp): Likewise.
1294 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1296         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
1297         argument.
1298         (vect_transform_loop): Update calls accordingly.  Schedule SLP
1299         instances before the main loop, if any exist.
1301 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
1303         PR tree-optimization/86749
1304         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
1305         If the lhs is used in a COND_EXPR, check that it is being used
1306         as the "then" or "else" value.
1308 2018-08-01  Tom de Vries  <tdevries@suse.de>
1310         PR target/86800
1311         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
1312         speculation_safe_value_not_needed.
1314 2018-08-01  Richard Biener  <rguenther@suse.de>
1316         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
1317         as base and offset.
1319 2018-08-01  Martin Liska  <mliska@suse.cz>
1321         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
1322         format how successful transformation is dumped.
1323         (gimple_mod_pow2_value_transform): Likewise.
1324         (gimple_mod_subtract_transform): Likewise.
1325         (gimple_stringops_transform): Likewise.
1327 2018-08-01  Martin Liska  <mliska@suse.cz>
1329         PR value-prof/35543
1330         * value-prof.c (interesting_stringop_to_profile_p):
1331         Simplify the code and add BUILT_IN_MEMMOVE.
1332         (gimple_stringops_transform): Likewise.
1334 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
1336         * config/aarch64/aarch64-simd.md
1337         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
1338         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
1339         use GPI iterator instead of SI mode.
1341 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1343         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
1344         rs6000_speculation_barrier.
1345         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
1346         new barrier pattern name.
1348 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
1350         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
1351         (speculation_barrier): New insn.
1353 2018-08-01  Richard Biener  <rguenther@suse.de>
1355         PR bootstrap/86724
1356         * graphite.h: Include isl/id.h and isl/space.h to allow build
1357         with ISL 0.20.
1359 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
1361         PR target/86651
1362         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1363         mode for COFF targets.
1364         * defaults.h (TARGET_COFF): Define.
1365         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
1366         TARGET_COFF): Define.
1367         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
1368         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
1369         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
1371 2018-07-31  Alexandre Oliva <oliva@adacore.com>
1373         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
1374         * gimple-streamer-out.c (output_bb): Save it.
1375         * lto-streamer-in.c (input_struct_function_base): Restore
1376         instance discriminator if available.  Create map on demand.
1377         * lto-streamer-out.c (output_struct_function_base): Save it if
1378         available.
1379         * final.c (decl_to_instance_map): Document LTO strategy.
1381 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
1382             Olivier Hainque  <hainque@adacore.com>
1384         * debug.h (decl_to_instance_map_t): New type.
1385         (decl_to_instance_map): Declare.
1386         (maybe_create_decl_to_instance_map): New inline function.
1387         * final.c (bb_discriminator, last_bb_discriminator): New statics,
1388         to track basic block discriminators.
1389         (final_start_function_1): Initialize them.
1390         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
1391         bb_discriminator.
1392         (decl_to_instance_map): New variable.
1393         (map_decl_to_instance, maybe_set_discriminator): New functions.
1394         (notice_source_line): Set discriminator.
1396 2018-07-31  Ian Lance Taylor  <iant@golang.org>
1398         * targhooks.c (default_have_speculation_safe_value): Add
1399         ATTRIBUTE_UNUSED.
1401 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1403         * dump-context.h: Include "pretty-print.h".
1404         (dump_context::refresh_dumps_are_enabled): New decl.
1405         (dump_context::emit_item): New decl.
1406         (class dump_context): Add fields "m_test_pp" and
1407         "m_test_pp_flags".
1408         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1409         (temp_dump_context::get_dumped_text): New decl.
1410         (class temp_dump_context): Add field "m_pp".
1411         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
1412         (dump_context::refresh_dumps_are_enabled): ...and add a test for
1413         m_test_pp.
1414         (set_dump_file): Update for above change.
1415         (set_alt_dump_file): Likewise.
1416         (dump_loc): New overload, taking a pretty_printer *.
1417         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
1418         to any test pretty-printer.
1419         (make_item_for_dump_gimple_stmt): New function, adapted from
1420         optinfo::add_gimple_stmt.
1421         (dump_context::dump_gimple_stmt): Call it, and use the result,
1422         eliminating the direct usage of dump_file and alt_dump_file in
1423         favor of indirectly using them via emit_item.
1424         (make_item_for_dump_gimple_expr): New function, adapted from
1425         optinfo::add_gimple_expr.
1426         (dump_context::dump_gimple_expr): Call it, and use the result,
1427         eliminating the direct usage of dump_file and alt_dump_file in
1428         favor of indirectly using them via emit_item.
1429         (make_item_for_dump_generic_expr): New function, adapted from
1430         optinfo::add_tree.
1431         (dump_context::dump_generic_expr): Call it, and use the result,
1432         eliminating the direct usage of dump_file and alt_dump_file in
1433         favor of indirectly using them via emit_item.
1434         (make_item_for_dump_printf_va): New function, adapted from
1435         optinfo::add_printf_va.
1436         (make_item_for_dump_printf): New function.
1437         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
1438         and use the result, eliminating the direct usage of dump_file and
1439         alt_dump_file in favor of indirectly using them via emit_item.
1440         (make_item_for_dump_dec): New function.
1441         (dump_context::dump_dec): Call it, and use the result,
1442         eliminating the direct usage of dump_file and alt_dump_file in
1443         favor of indirectly using them via emit_item.
1444         (make_item_for_dump_symtab_node): New function, adapted from
1445         optinfo::add_symtab_node.
1446         (dump_context::dump_symtab_node): Call it, and use the result,
1447         eliminating the direct usage of dump_file and alt_dump_file in
1448         favor of indirectly using them via emit_item.
1449         (dump_context::begin_scope): Reimplement, avoiding direct usage
1450         of dump_file and alt_dump_file in favor of indirectly using them
1451         via emit_item.
1452         (dump_context::emit_item): New member function.
1453         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
1454         Set up test pretty-printer on the underlying context.  Call
1455         refresh_dumps_are_enabled.
1456         (temp_dump_context::~temp_dump_context): Call
1457         refresh_dumps_are_enabled.
1458         (temp_dump_context::get_dumped_text): New member function.
1459         (selftest::verify_dumped_text): New function.
1460         (ASSERT_DUMPED_TEXT_EQ): New macro.
1461         (selftest::test_capture_of_dump_calls): Run all tests twice, with
1462         and then without optinfo enabled.  Add uses of
1463         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
1464         * dumpfile.h: Update comment for the dump_* API.
1465         * optinfo-emit-json.cc
1466         (selftest::test_building_json_from_dump_calls): Update for new
1467         param for temp_dump_context ctor.
1468         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
1469         and "m_owned" field.
1470         (optinfo_item::~optinfo_item): Likewise.
1471         (optinfo::add_item): New member function.
1472         (optinfo::emit): Update comment.
1473         (optinfo::add_string): Delete.
1474         (optinfo::add_printf): Delete.
1475         (optinfo::add_printf_va): Delete.
1476         (optinfo::add_gimple_stmt): Delete.
1477         (optinfo::add_gimple_expr): Delete.
1478         (optinfo::add_tree): Delete.
1479         (optinfo::add_symtab_node): Delete.
1480         (optinfo::add_dec): Delete.
1481         * optinfo.h (class dump_context): New forward decl.
1482         (optinfo::add_item): New decl.
1483         (optinfo::add_string): Delete.
1484         (optinfo::add_printf): Delete.
1485         (optinfo::add_printf_va): Delete.
1486         (optinfo::add_gimple_stmt): Delete.
1487         (optinfo::add_gimple_expr): Delete.
1488         (optinfo::add_tree): Delete.
1489         (optinfo::add_symtab_node): Delete.
1490         (optinfo::add_dec): Delete.
1491         (optinfo::add_poly_int): Delete.
1492         (optinfo_item::optinfo_item): Remove "owned" param.
1493         (class optinfo_item): Remove field "m_owned".
1495 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1497         PR middle-end/86705
1498         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
1499         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
1500         requested variable alignment.
1501         (expand_one_ssa_partition): Likewise.
1502         (expand_one_var): Likewise.
1504 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1506         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
1507         to speculation_safe_value_not_needed.
1509 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1511         * targhooks.h (speculation_safe_value_not_needed): New prototype.
1512         * targhooks.c (speculation_safe_value_not_needed): New function.
1513         * target.def (have_speculation_safe_value): Update documentation.
1514         * doc/tm.texi: Regenerated.
1516 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1518         * config/aarch64/iterators.md (ALLI_TI): New iterator.
1519         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
1520         expand.
1521         (despeculate_copy<ALLI:mode>_insn): New insn.
1522         (despeculate_copyti_insn): New insn.
1523         (despeculate_simple<ALLI:mode>): New insn
1524         (despeculate_simpleti): New insn.
1525         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
1526         function.
1527         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
1528         aarch64_speculation_safe_value.
1529         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
1531 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1533         * config/aarch64/aarch64-speculation.cc: New file.
1534         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
1535         before pass_reorder_blocks.
1536         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
1537         prototype.
1538         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
1539         X14 and X15 when tracking speculation.
1540         * config/aarch64/aarch64.md (register name constants): Add
1541         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
1542         (unspec): Add UNSPEC_SPECULATION_TRACKER.
1543         (speculation_barrier): New insn attribute.
1544         (cmp<mode>): Allow SP in comparisons.
1545         (speculation_tracker): New insn.
1546         (speculation_barrier): Add speculation_barrier attribute.
1547         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
1548         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
1549         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
1551 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1553         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
1554         aarch64_track_speculation is true.
1555         (tb<optab><mode>1): Likewise.
1556         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
1557         generate CB[N]Z when tracking speculation.
1558         (aarch64_split_compare_and_swap): Likewise.
1559         (aarch64_split_atomic_op): Likewise.
1561 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1563         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
1565 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1567         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
1568         (speculation_barrier): New insn.
1570 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1572         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
1573         * config/arm/arm.md (speculation_barrier): New expand.
1574         (speculation_barrier_insn): New pattern.
1576 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
1578         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
1579         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
1580         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
1581         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
1582         list.
1583         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
1584         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
1585         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
1586         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
1587         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
1588         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
1589         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
1590         * builtins.c (expand_speculation_safe_value): New function.
1591         (expand_builtin): Call it.
1592         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
1593         * doc/extend.texi: Document __builtin_speculation_safe_value.
1594         * doc/md.texi: Document "speculation_barrier" pattern.
1595         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
1596         TARGET_HAVE_SPECULATION_SAFE_VALUE.
1597         * doc/tm.texi: Regenerated.
1598         * target.def (have_speculation_safe_value, speculation_safe_value): New
1599         hooks.
1600         * targhooks.c (default_have_speculation_safe_value): New function.
1601         (default_speculation_safe_value): New function.
1602         * targhooks.h (default_have_speculation_safe_value): Add prototype.
1603         (default_speculation_safe_value): Add prototype.
1605 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
1607         * dump-context.h (dump_context::dump_loc): New decl.
1608         * dumpfile.c (dump_context::dump_loc): New member function.
1609         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
1610         and dump_gimple_stmt.
1611         (dump_context::dump_gimple_expr_loc): Likewise, using
1612         dump_gimple_expr.
1613         (dump_context::dump_generic_expr_loc): Likewise, using
1614         dump_generic_expr.
1615         (dump_context::dump_printf_loc_va): Likewise, using
1616         dump_printf_va.
1617         (dump_context::begin_scope): Explicitly using the global function
1618         "dump_loc", rather than the member function.
1620 2018-07-31  Martin Sebor  <msebor@redhat.com>
1622         PR tree-optimization/86741
1623         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
1625 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
1627         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
1628         depend on whether prefetch instructions will be emitted or not.
1629         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
1630         will be emitted or not.
1631         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
1632         (TARGET_SETMEM_PFD): New macros.
1634 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1636         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
1637         (NULL_STMT_VEC_INFO): Delete.
1638         (stmt_vec_info::operator*): Likewise.
1639         (stmt_vec_info::operator gimple *): Likewise.
1640         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
1641         of NULL_STMT_VEC_INFO.
1642         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
1643         (vect_reassociating_reduction_p): Likewise.
1644         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
1645         (vectorizable_store): Likewise.
1646         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
1647         (vec_info::free_stmt_vec_infos): Likewise.
1649 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1651         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
1652         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
1654 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1656         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
1657         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1658         (vec_info::free_stmt_vec_info): New private member functions.
1659         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
1660         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
1661         * tree-parloops.c (gather_scalar_reductions): Remove calls to
1662         set_stmt_vec_info_vec and free_stmt_vec_infos.
1663         * tree-vect-loop.c (_loop_vec_info): Remove call to
1664         set_stmt_vec_info_vec.
1665         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
1666         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
1667         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
1668         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
1669         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
1670         assignments in {vec_info::,}new_stmt_vec_info that are redundant
1671         with the clearing in the xcalloc.
1672         (stmt_vec_info_vec): Delete.
1673         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
1674         (vectorize_loops): Likewise.
1675         (vec_info::~vec_info): Remove argument from call to
1676         free_stmt_vec_infos.
1677         (vec_info::add_stmt): Remove vinfo argument from call to
1678         new_stmt_vec_info.
1680 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1682         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
1683         rather than a gimple stmt.
1684         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
1685         information for pattern statements when passed the original
1686         statement; instead wait to be passed the pattern statement itself.
1687         Don't call set_vinfo_for_stmt here.
1688         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
1689         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
1690         stmt_vec_infos here.
1691         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
1692         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
1693         stmt_vec_infos entry.
1695 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1697         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
1698         * tree-vectorizer.c (vec_info::replace_stmt): New function.
1699         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
1700         * tree-vect-stmts.c (vectorizable_call): Likewise.
1701         (vectorizable_simd_clone_call): Likewise.
1703 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1705         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
1706         * tree-vectorizer.c (vec_info::remove_stmt): New function.
1707         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
1708         * tree-vect-loop.c (vect_transform_loop): Likewise.
1709         * tree-vect-slp.c (vect_schedule_slp): Likewise.
1710         * tree-vect-stmts.c (vect_remove_stores): Likewise.
1712 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1714         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
1715         (vect_dr_stmt): Delete.
1716         * tree-vectorizer.c (vec_info::lookup_dr): New function.
1717         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
1718         of DR_VECT_AUX.
1719         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
1720         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
1721         (vect_verify_datarefs_alignment, vect_peeling_supportable)
1722         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1723         (vect_analyze_data_refs): Likewise.
1724         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
1725         argument.
1726         (vect_find_same_alignment_drs): Likewise.
1727         (vect_slp_analyze_node_dependences): Update calls accordingly.
1728         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1729         instead of DR_VECT_AUX.
1730         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
1731         of a vector data references.  Use vec_info::lookup_dr instead of
1732         DR_VECT_AUX.
1733         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
1734         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
1735         instead of DR_VECT_AUX.
1737 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1739         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
1740         dr_vec_info.
1741         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
1742         accordingly.
1743         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1744         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
1745         (vect_gen_prolog_loop_niters): Likewise.
1747 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1749         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
1750         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
1751         (vect_known_alignment_in_bytes, vect_dr_behavior)
1752         (vect_get_scalar_dr_size): Take references as dr_vec_infos
1753         instead of data_references.  Update calls to other routines for
1754         which the same change has been made.
1755         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
1756         dr_vec_infos instead of stmt_vec_infos.
1757         (vect_analyze_data_ref_dependence): Update call accordingly.
1758         (vect_slp_analyze_data_ref_dependence)
1759         (vect_record_base_alignments): Use DR_VECT_AUX.
1760         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
1761         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
1762         (vector_alignment_reachable_p, vect_get_data_access_cost)
1763         (vect_peeling_supportable, vect_analyze_group_access_1)
1764         (vect_analyze_group_access, vect_analyze_data_ref_access)
1765         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
1766         (vect_compile_time_alias, vect_small_gap_p)
1767         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
1768         (vect_supportable_dr_alignment): Take references as dr_vec_infos
1769         instead of data_references.  Update calls to other routines for
1770         which the same change has been made.
1771         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
1772         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
1773         (vect_slp_analyze_and_verify_node_alignment)
1774         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
1775         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1776         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
1777         above changes.
1778         (_vect_peel_info::dr): Replace with...
1779         (_vect_peel_info::dr_info): ...this new field.
1780         (vect_peeling_hash_get_most_frequent)
1781         (vect_peeling_hash_choose_best_peeling): Update accordingly.
1782         (vect_peeling_hash_get_lowest_cost):
1783         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
1784         routines for which the same change has been made.
1785         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
1786         data_reference.
1787         * tree-vect-loop-manip.c (get_misalign_in_elems)
1788         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
1789         above changes.
1790         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
1791         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
1792         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
1793         (get_group_load_store_type, get_negative_load_store_type)
1794         (vect_get_data_ptr_increment, vectorizable_store)
1795         (vectorizable_load): Likewise.
1796         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
1797         Update calls to other routines for which the same change has been made.
1799 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1801         * tree-vectorizer.h (vec_info::move_dr): New member function.
1802         (dataref_aux): Rename to...
1803         (dr_vec_info): ...this and add "dr" and "stmt" fields.
1804         (_stmt_vec_info::dr_aux): Update accordingly.
1805         (_stmt_vec_info::data_ref_info): Delete.
1806         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
1807         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
1808         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
1809         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
1810         of data_ref.
1811         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
1812         (STMT_VINFO_DR_INFO): New macro.
1813         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
1814         (set_dr_misalignment): Update after rename of dataref_aux.
1815         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
1816         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
1817         initialization of STMT_VINFO_DATA_REF.
1818         * tree-vectorizer.c (vec_info::move_dr): New function.
1819         * tree-vect-patterns.c (vect_recog_bool_pattern)
1820         (vect_recog_mask_conversion_pattern)
1821         (vect_recog_gather_scatter_pattern): Use it.
1822         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
1823         the "dr" and "stmt" fields of dr_vec_info instead of
1824         STMT_VINFO_DATA_REF.
1826 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1828         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
1829         (is_pattern_stmt_p): Use it.
1830         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
1831         on pattern statements.
1833 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1835         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
1836         original stmt as a stmt_vec_info rather than a gimple stmt.
1837         (vect_pattern_recog_1): Take the statement directly as a
1838         stmt_vec_info, rather than via a gimple_stmt_iterator.
1839         Update call to vect_mark_pattern_stmts.
1840         (vect_pattern_recog): Update calls accordingly.
1842 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1844         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
1845         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
1846         a vect_def_type for the first argument.
1847         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
1848         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
1849         operand if it isn't defined by a vectorized statement.
1850         (vect_build_gather_load_calls): Remove the mask_dt argument and
1851         update calls to vect_get_vec_def_for_stmt_copy.
1852         (vectorizable_bswap): Likewise the dt argument.
1853         (vectorizable_call): Update calls to vectorizable_bswap and
1854         vect_get_vec_def_for_stmt_copy.
1855         (vectorizable_simd_clone_call, vectorizable_assignment)
1856         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
1857         (vectorizable_comparison): Update calls to
1858         vect_get_vec_def_for_stmt_copy.
1859         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
1860         vect_is_simple_use.
1861         (vect_get_loop_based_defs): Remove dt argument and update call
1862         to vect_get_vec_def_for_stmt_copy.
1863         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
1864         and vect_get_vec_def_for_stmt_copy.
1865         (vectorizable_load): Update calls to vect_build_gather_load_calls
1866         and vect_get_vec_def_for_stmt_copy.
1867         * tree-vect-loop.c (vect_create_epilog_for_reduction)
1868         (vectorizable_reduction, vectorizable_live_operation): Update calls
1869         to vect_get_vec_def_for_stmt_copy.
1871 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1873         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
1874         and gimple stmt arguments with a stmt_vec_info.
1875         (vect_record_base_alignments): Update calls accordingly.
1876         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
1877         and gimple stmt arguments with a stmt_vec_info.
1878         (vect_build_slp_tree_1): Remove vinfo argument and update call
1879         to vect_record_max_nunits.
1880         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
1881         and vect_record_max_nunits.
1883 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1885         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
1886         file and take a stmt_vec_info instead of a gimple stmt.
1887         (supportable_widening_operation, vect_finish_replace_stmt)
1888         (vect_finish_stmt_generation, vect_get_store_rhs)
1889         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
1890         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
1891         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
1892         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
1893         (vect_create_data_ref_ptr, bump_vector_ptr)
1894         (vect_permute_store_chain, vect_setup_realignment)
1895         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
1896         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
1897         (vectorizable_reduction, vectorizable_induction)
1898         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
1899         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
1900         than gimple stmts as arguments.
1901         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
1902         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
1903         (can_group_stmts_p, vect_check_gather_scatter)
1904         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
1905         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
1906         (vect_permute_load_chain, vect_shift_permute_load_chain)
1907         (vect_transform_grouped_load)
1908         (vect_record_grouped_load_vectors): Likewise.
1909         * tree-vect-loop.c (vect_fixup_reduc_chain)
1910         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
1911         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
1912         (vectorizable_reduction, vectorizable_induction)
1913         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
1914         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
1915         (vect_get_load_store_mask): Likewise.
1916         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
1917         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
1918         * tree-vect-stmts.c (vect_mark_relevant)
1919         (is_simple_and_all_uses_invariant)
1920         (exist_non_indexing_operands_for_use_p, process_use)
1921         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
1922         (vect_get_vec_def_for_operand, vect_get_vec_defs)
1923         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
1924         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
1925         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
1926         (get_negative_load_store_type, get_load_store_type)
1927         (vect_check_load_store_mask, vect_check_store_rhs)
1928         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
1929         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
1930         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
1931         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
1932         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
1933         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
1934         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
1935         (supportable_widening_operation): Likewise.
1937 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1939         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
1940         a stmt_vec_info instead of a gcall.
1941         (vect_check_gather_scatter): Update call accordingly.
1942         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
1943         of a gphi.
1944         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
1945         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
1946         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
1947         instead of a gimple stmt.
1948         (vect_transform_loop): Update calls accordingly.
1949         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
1950         stmt_vec_infos instead of gimple stmts.
1951         (vect_analyze_slp_instance): Update use accordingly.
1952         * tree-vect-stmts.c (read_vector_array, write_vector_array)
1953         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
1954         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
1955         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
1956         (vect_gen_widened_results_half, vect_get_loop_based_defs)
1957         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
1958         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
1959         down to subroutines.
1961 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1963         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
1964         of the worklist from a vector of gimple stmts to a vector of
1965         stmt_vec_infos.
1966         * tree-vect-stmts.c (vect_mark_relevant, process_use)
1967         (vect_mark_stmts_to_be_vectorized): Likewise
1969 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1971         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
1972         statement before passing it to vect_analyze_stmt.
1973         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
1974         the chain of phi vector definitions.  Track the exit phi via its
1975         stmt_vec_info.
1976         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
1977         STMT_VINFO_REDUC_DEF.
1978         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
1979         stmt_vec_infos to handle the statement chains.
1980         (vect_get_slp_defs): Record the first statement in the node
1981         using a stmt_vec_info.
1982         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
1983         statements here and pass their stmt_vec_info down to subroutines.
1984         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
1985         down to vect_finish_stmt_generation.
1986         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
1987         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
1988         stmt_vec_infos to subroutines.
1989         (vect_remove_stores): Use stmt_vec_infos to handle the statement
1990         chains.
1992 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
1994         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
1995         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
1996         (vect_permute_store_chain, vect_setup_realignment)
1997         (vect_permute_load_chain, vect_shift_permute_load_chain)
1998         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
1999         stmts internally, and when passing values to other vectorizer routines.
2000         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2001         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
2002         (vect_analyze_loop_operations, get_initial_def_for_reduction)
2003         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
2004         (vectorizable_reduction, vectorizable_induction)
2005         (vectorizable_live_operation, vect_transform_loop_stmt)
2006         (vect_transform_loop): Likewise.
2007         * tree-vect-patterns.c (vect_reassociating_reduction_p)
2008         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
2009         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
2010         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2011         (vect_slp_analyze_node_operations_1): Likewise.
2012         * tree-vect-stmts.c (vect_mark_relevant, process_use)
2013         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
2014         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
2015         (vect_finish_stmt_generation_1, get_group_load_store_type)
2016         (get_load_store_type, vect_build_gather_load_calls)
2017         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2018         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2019         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2020         (vectorizable_store, vectorizable_load, vectorizable_condition)
2021         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
2022         (supportable_widening_operation): Likewise.
2023         (vect_get_vector_types_for_stmt): Likewise.
2024         * tree-vectorizer.h (vect_dr_behavior): Likewise.
2026 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2028         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2029         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
2030         (vect_permute_store_chain, vect_permute_load_chain)
2031         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
2032         repeated stmt_vec_info lookups.
2033         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
2034         (vect_update_ivs_after_vectorizer): Likewise.
2035         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
2036         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2037         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
2038         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2039         (vect_bb_slp_scalar_cost): Likewise.
2040         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2042 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2044         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
2045         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
2046         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
2047         to get gassigns and gcalls, rather than operating on generc gimple
2048         stmts.
2049         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
2050         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
2051         (vectorizable_load, vect_analyze_stmt): Likewise.
2052         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2054 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2056         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
2057         return stmt_vec_infos rather than gimple stmts.  Do not accept
2058         null arguments.
2059         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
2060         of a gimple stmt.
2061         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
2062         Update use of get_later_stmt.
2063         (vect_get_constant_vectors): Update call accordingly.
2064         (vect_schedule_slp_instance): Likewise
2065         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
2066         (vect_slp_analyze_instance_dependence): Likewise.
2067         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2069 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2071         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
2072         (stmt_info_for_cost::stmt_info): ...this new field.
2073         (add_stmt_costs): Update accordingly.
2074         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2075         (vect_get_known_peeling_cost): Likewise.
2076         (vect_estimate_min_profitable_iters): Likewise.
2077         * tree-vect-stmts.c (record_stmt_cost): Likewise.
2079 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2081         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
2082         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2083         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
2084         accordingly.
2085         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2087 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2089         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
2090         a gimple stmt to a stmt_vec_info.
2091         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
2093 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2095         * tree-vectorizer.h (vec_info::grouped_stores): Change from
2096         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2097         (_loop_vec_info::reduction_chains): Likewise.
2098         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
2099         accordingly.
2100         * tree-vect-slp.c (vect_analyze_slp): Likewise.
2102 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2104         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
2105         a gimple stmt to a stmt_vec_info.
2106         (_stmt_vec_info::next_element): Likewise.
2107         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
2108         (vect_slp_analyze_and_verify_node_alignment)
2109         (vect_analyze_group_access_1, vect_analyze_group_access)
2110         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
2111         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
2112         (vect_supportable_dr_alignment): Update accordingly.
2113         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
2114         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
2115         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
2116         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2117         * tree-vect-slp.c (vect_build_slp_tree_1)
2118         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
2119         (vect_split_slp_store_group, vect_analyze_slp_instance)
2120         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
2121         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
2122         (get_group_load_store_type, get_load_store_type)
2123         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
2124         (vect_transform_stmt, vect_remove_stores): Likewise.
2126 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2128         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
2129         than a gimple stmt.
2130         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
2131         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
2132         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
2133         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
2134         (vector_alignment_reachable_p, vect_get_data_access_cost)
2135         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
2136         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
2137         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
2138         (vect_analyze_group_access_1, vect_analyze_group_access)
2139         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
2140         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
2141         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
2142         result of vect_dr_stmt and use the stmt_vec_info instead of
2143         the associated gimple stmt.
2144         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
2145         (vect_gen_prolog_loop_niters): Likewise.
2146         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2148 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2150         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
2151         to a vec<stmt_vec_info>.
2152         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
2153         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
2154         vec<stmt_vec_info>.
2155         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
2156         to a vec<stmt_vec_info>.
2157         (bst_traits::value_type, bst_traits::value_type): Likewise.
2158         (bst_traits::hash): Update accordingly.
2159         (vect_get_and_check_slp_defs): Change the stmts parameter from
2160         a vec<gimple *> to a vec<stmt_vec_info>.
2161         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
2162         (vect_build_slp_tree): Likewise.
2163         (vect_build_slp_tree_2): Likewise.  Update uses of
2164         SLP_TREE_SCALAR_STMTS.
2165         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
2166         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
2167         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
2168         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
2169         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
2170         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
2171         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
2172         (vect_get_constant_vectors, vect_get_slp_defs)
2173         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
2174         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
2175         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
2176         instead of gimple stmts.
2177         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
2178         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
2179         (vect_slp_analyze_instance_dependence): Update uses of
2180         SLP_TREE_SCALAR_STMTS.
2181         (vect_slp_analyze_and_verify_node_alignment): Likewise.
2182         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
2183         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
2184         (get_initial_defs_for_reduction): Likewise.
2185         (vect_create_epilog_for_reduction): Likewise.
2186         (vectorize_fold_left_reduction): Likewise.
2187         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
2188         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
2189         (can_vectorize_live_stmts): Likewise.
2191 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2193         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
2194         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
2195         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
2196         than gimple stmts.
2197         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
2198         of a gimple stmt.
2199         (gather_scalar_reductions): Update after above interface changes.
2200         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
2201         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
2202         than gimple stmts.
2203         (vect_force_simple_reduction): Likewise.
2204         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
2205         LOOP_VINFO_REDUCTIONS.
2206         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2208 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2210         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
2211         a gimple stmt to a stmt_vec_info.
2212         * tree-vect-loop.c (vect_active_double_reduction_p)
2213         (vect_force_simple_reduction, vectorizable_reduction): Update
2214         accordingly.
2216 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2218         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
2219         vec<gimple *> to a vec<stmt_vec_info>.
2220         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
2221         the reduction_phis argument from a vec<gimple *> to a
2222         vec<stmt_vec_info>.
2223         (vectorizable_reduction): Likewise the phis local variable that
2224         is passed to vect_create_epilog_for_reduction.  Update for new type
2225         of SLP_TREE_VEC_STMTS.
2226         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
2227         (vectorizable_live_operation): Likewise.
2228         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
2229         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2231 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2233         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
2234         a gimple stmt to a stmt_vec_info.
2235         (vectorizable_condition, vectorizable_live_operation)
2236         (vectorizable_reduction, vectorizable_induction): Pass back the
2237         vectorized statement as a stmt_vec_info.
2238         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
2239         use of STMT_VINFO_VEC_STMT.
2240         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
2241         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
2242         as stmt_vec_infos rather than gimple stmts.
2243         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
2244         to a stmt_vec_info.
2245         (vectorizable_live_operation): Likewise.
2246         (vectorizable_reduction, vectorizable_induction): Likewise,
2247         updating use of STMT_VINFO_VEC_STMT.
2248         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
2249         of STMT_VINFO_VEC_STMT.
2250         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
2251         (vectorizable_simd_clone_call, vectorizable_conversion)
2252         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2253         (vectorizable_store, vectorizable_load, vectorizable_condition)
2254         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
2255         from a gimple stmt to a stmt_vec_info.
2256         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
2257         pointer to a stmt_vec_info to the vectorizable_* routines.
2259 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2261         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
2262         a gimple stmt to a stmt_vec_info.
2263         (is_pattern_stmt_p): Update accordingly.
2264         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
2265         (vect_record_grouped_load_vectors): Likewise.
2266         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2267         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
2268         (vect_model_reduction_cost): Likewise.
2269         (vect_create_epilog_for_reduction): Likewise.
2270         (vectorizable_reduction, vectorizable_induction): Likewise.
2271         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2272         Return the stmt_vec_info for the pattern statement.
2273         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
2274         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
2275         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2276         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
2277         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2278         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
2279         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
2280         (free_stmt_vec_info, vect_is_simple_use): Likewise.
2282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2284         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
2285         (vect_finish_stmt_generation): Likewise.
2286         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2287         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
2288         (vect_build_gather_load_calls): Use the return value of the above
2289         functions instead of a separate call to vinfo_for_stmt.  Use narrow
2290         scopes for the input gimple stmt and wider scopes for the associated
2291         stmt_vec_info.  Use vec_info::lookup_def when setting these
2292         stmt_vec_infos from an SSA_NAME definition.
2293         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
2294         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
2295         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
2296         (vectorizable_store, vectorizable_load, vectorizable_condition)
2297         (vectorizable_comparison): Likewise.
2298         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
2299         (vectorizable_reduction): Likewise.
2301 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2303         * tree-vectorizer.h (vect_is_simple_use): Add an optional
2304         stmt_vec_info * parameter before the optional gimple **.
2305         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2306         (process_use, vect_get_vec_def_for_operand_1): Update callers.
2307         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
2308         * tree-vect-loop.c (vectorizable_reduction): Likewise.
2309         (vectorizable_live_operation): Likewise.
2310         * tree-vect-patterns.c (type_conversion_p): Likewise.
2311         (vect_look_through_possible_promotion): Likewise.
2312         (vect_recog_rotate_pattern): Likewise.
2313         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2315 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2317         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
2318         a typedef to a wrapper class.
2319         (NULL_STMT_VEC_INFO): New macro.
2320         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
2321         (stmt_vec_info::operator*): New function.
2322         (stmt_vec_info::operator gimple *): Likewise.
2323         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
2324         (add_stmt_costs): Likewise.
2325         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
2326         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
2327         (vect_get_known_peeling_cost): Likewise.
2328         (vect_estimate_min_profitable_iters): Likewise.
2329         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2330         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
2331         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
2332         (vectorizable_store, free_stmt_vec_infos): Likewise.
2333         (new_stmt_vec_info): Change return type of xcalloc to
2334         _stmt_vec_info *.
2336 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2338         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
2339         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
2340         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
2341         a single_imm_use-based sequence.
2342         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
2344 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2346         * tree-vectorizer.h (vec_info::lookup_def): Declare.
2347         * tree-vectorizer.c (vec_info::lookup_def): New function.
2348         * tree-vect-patterns.c (vect_get_internal_def): Use it.
2349         (vect_widened_op_tree): Likewise.
2350         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
2351         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
2352         (vectorizable_reduction): Likewise.
2353         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
2354         of a gimple *.
2355         (vect_is_slp_reduction): Update calls accordingly.  Use
2356         vec_info::lookup_def.
2357         (vect_is_simple_reduction): Likewise
2358         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2360 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2362         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
2363         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
2364         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
2365         of vinfo_for_stmt.
2366         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
2367         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
2368         (vect_update_vf_for_slp, vect_analyze_loop_operations)
2369         (vect_is_slp_reduction, vectorizable_induction)
2370         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
2371         * tree-vect-patterns.c (vect_init_pattern_stmt):
2372         (vect_determine_min_output_precision_1, vect_determine_precisions)
2373         (vect_pattern_recog): Likewise.
2374         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
2375         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
2376         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
2377         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
2378         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
2379         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
2380         info field from a loop to a loop_vec_info.
2382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2384         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
2385         (vec_info::add_stmt): Declare.
2386         * tree-vectorizer.c (vec_info::add_stmt): New function.
2387         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
2388         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
2389         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
2390         (vectorizable_induction): Likewise.
2391         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
2392         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2393         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
2394         (vectorizable_load): Likewise.
2395         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
2396         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
2397         (vect_recog_gather_scatter_pattern): Likewise.
2398         (append_pattern_def_seq): Likewise.  Remove a check that is
2399         performed by add_stmt itself.
2401 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2403         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
2404         which make_ssa_name was called with new_stmt before new_stmt
2405         had been created.
2407 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2409         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
2410         split out from...
2411         (vect_is_slp_reduction): ...here...
2412         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
2413         that are already known to be false.
2415 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2417         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
2418         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
2419         STMT_VINFO_NUM_SLP_USES when it's true.
2420         (vect_free_slp_instance): Add a final_p parameter and pass it to
2421         vect_free_slp_tree.
2422         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
2423         (vect_analyze_slp_instance): Likewise.
2424         (vect_slp_analyze_operations): Likewise.
2425         (vect_slp_analyze_bb_1): Likewise.
2426         * tree-vectorizer.c (vec_info): Likewise.
2427         * tree-vect-loop.c (vect_transform_loop): Likewise.
2429 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2431         * tree-vect-loop.c (vectorizable_reduction): Assert that the
2432         function is not called for second and subsequent members of
2433         a reduction group.
2435 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
2437         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
2438         cases for nested loops from here to ...
2439         (vect_create_epilog_for_reduction): ...here.  Only call
2440         vect_is_simple_use for inner-loop reductions.
2442 2018-07-31  Martin Liska  <mliska@suse.cz>
2444         PR gcov-profile/85338
2445         PR gcov-profile/85350
2446         PR gcov-profile/85372
2447         * profile.c (struct location_triplet): New.
2448         (struct location_triplet_hash): Likewise.
2449         (output_location): Do not output a BB that
2450         is already recorded for a line.
2451         (branch_prob): Use streamed_locations.
2453 2018-07-31  Martin Liska  <mliska@suse.cz>
2455         PR gcov-profile/85370
2456         * coverage.c (coverage_begin_function): Do not mark target
2457         clones as artificial functions.
2459 2018-07-31  Martin Liska  <mliska@suse.cz>
2461         PR gcov-profile/83813
2462         PR gcov-profile/84758
2463         PR gcov-profile/85217
2464         PR gcov-profile/85332
2465         * profile.c (branch_prob): Do not record GOTO expressions
2466         for GIMPLE statements which locations are already streamed.
2468 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2470         * gcc.c (handle_spec_function): Accept a soft_matched_part
2471         argument, as do_spec_1.  Pass it down to ...
2472         (eval_spec_function): Accept a soft_matched_part argument,
2473         and pass it down to ...
2474         (do_spec_2): Accept a soft_matched_part argument, and pass
2475         it down to do_spec_1.
2476         (do_spec_1): Pass soft_matched_part to handle_spec_function.
2477         (handle_braces): Update call to handle_spec_function.
2478         (driver::set_up_specs): Update calls to do_spec_2.
2479         (compare_debug_dump_opt_spec_function): Likewise.
2480         (compare_debug_self_opt_spec_function): Likewise.
2482 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2484         * common.opt (nolibc): New option.
2485         * doc/invoke.texi (Link Options): Document it.
2486         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
2487         * config/alpha/linux.h: Likewise.
2488         * config/arc/elf.h: Likewise.
2489         * config/arm/uclinux-elf.h: Likewise.
2490         * config/arm/unknown-elf.h: Likewise.
2491         * config/avr/avrlibc.h: Likewise.
2492         * config/bfin/bfin.h: Likewise.
2493         * config/bfin/linux.h: Likewise.
2494         * config/bfin/uclinux.h: Likewise.
2495         * config/darwin.h: Likewise.
2496         * config/darwin10.h: Likewise.
2497         * config/darwin12.h: Likewise.
2498         * config/gnu-user.h: Likewise.
2499         * config/lm32/uclinux-elf.h: Likewise.
2500         * config/pa/pa-hpux11.h: Likewise.
2501         * config/pa/pa64-hpux.h: Likewise.
2502         * config/sparc/sparc.h: Likewise.
2504 2018-07-31  Olivier Hainque  <hainque@adacore.com>
2506         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
2507         undefined variables.
2509 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2511         PR target/86640
2512         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
2513         instead of GEN_INT.
2515 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2517         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2518         terminated string literal.
2520 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
2522         PR rtl-optimization/85160
2523         * combine.c (is_just_move): New function.
2524         (try_combine): Allow combining two instructions into two if neither of
2525         the original instructions was a move.
2527 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
2529         PR target/86673
2530         * doc/extend.texi (Global Register Variables): Discourage use of type
2531         qualifiers.
2532         (Local Register Variables): Likewise.
2534 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
2536         PR tree-optimization/86506
2537         * hwint.h (ceil_log2): Resync with hwint.c implementation.
2539 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
2541         PR target/86547
2542         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
2543         hard_regno, make sure no insn between `from` and `to` clobbers it.
2545 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
2546             Tom de Vries  <tdevries@suse.de>
2548         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
2549         (PTX_DEFAULT_RUNTIME_DIM): ... this.
2550         (nvptx_goacc_validate_dims): Set default worker and gang dims to
2551         PTX_DEFAULT_RUNTIME_DIM.
2552         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2554 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
2556         * config/pa/pa.c (pa_output_addr_vec): Align address table.
2557         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
2558         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2560 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
2562         * config/rs6000/constraints.md (wG constraint): Delete, no longer
2563         used.
2564         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
2565         predicate to reflect toc fusion has been deleted.
2566         (toc_fusion_mem_raw): Delete, no longer used.
2567         (toc_fusion_mem_wrapped): Likewise.
2568         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
2569         fusion mask bit.
2570         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
2571         Delete, no longer used.
2572         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
2573         meant to be used for toc fusion.
2574         (rs6000_debug_print_mode): Delete toc fusion debugging.
2575         (rs6000_debug_reg_global): Likewise.
2576         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
2577         fusion and secondary reload support that were never used.
2578         (rs6000_option_override_internal): Delete TOC fusion, that was only
2579         partially defined, and it did not work unless you also used the
2580         -mcmodel= switch.
2581         (rs6000_legitimate_address_p): Delete TOC fusion support.
2582         (rs6000_opt_masks): Likewise.
2583         (fusion_wrap_memory_address): Delete function, no longer used.
2584         (fusion_split_address); Delete TOC fusion support.
2585         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
2586         longer used with toc fusion being deleted.
2587         (TARGET_TOC_FUSION_FP): Likewise.
2588         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
2589         UNSPEC.
2590         (toc fusion spliter): Delete TOC fusion support.
2591         (toc_fusionload_<mode>): Likewise.
2592         (toc_fusionload_di): Likewise.
2593         (fusion_gpr_load_<mode>): Delete generator function, this insn no
2594         longer needs to be named.  Rename predicate to delete TOC fusion.
2595         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2596         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2597         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
2598         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
2599         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2601 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2603         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
2604         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
2605         __int128 in built-in function prototypes.
2606         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
2607         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2609 2018-07-27  Martin Sebor  <msebor@redhat.com>
2611         PR tree-optimization/86696
2612         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
2613         types, including enums.
2614         (handle_char_store): Be prepared for the above function to fail.
2616 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
2618         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
2619         when optimization level is lower than 2 or optimize for size.
2621 2018-07-26  Martin Sebor  <msebor@redhat.com>
2623         PR tree-optimization/86043
2624         PR tree-optimization/86042
2625         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
2626         (get_string_cst_length): Rename...
2627         (get_min_string_length): ...to this.  Add argument.
2628         (handle_char_store): Extend to handle multi-character stores by
2629         MEM_REF.
2630         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
2631         * tree.h (initializer_zerop): Add argument.
2633 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
2635         PR middle-end/86660
2636         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
2637         declare target to variables if they have always,{to,from,tofrom} map
2638         kinds.
2640 2018-07-26  Martin Liska  <mliska@suse.cz>
2642         PR lto/86548
2643         * lto-wrapper.c: Add linker_output as prefix
2644         for ltrans_output_file.
2646 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
2648         PR rtl-optimization/85805
2649         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
2650         value for hard registers if that was written in the same mode.
2652 2018-07-26  Martin Liska  <mliska@suse.cz>
2654         PR gcov-profile/86536
2655         * gcov.c (format_gcov): Use printf format %.*f directly
2656         and do not handle special values.
2658 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2660         * common/config/arc/arc-common.c (arc_option_optimization_table):
2661         Update default optimizations for size.
2663 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2665         * config/arc/arc.md (movsf_insn): Add short instruction selection.
2666         * config/arc/constraints.md (CfZ): New constraint.
2667         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
2668         (subsf3_fpu): Likewise.
2669         (cmpsf_fpu): Likewise.
2670         (cmpsf_fpu_uneq): Likewise.
2672 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2674         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
2675         accesses as well.
2676         (arc_is_uncached_mem_p): uncached applies to both the variable and
2677         the pointer.
2679 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
2681         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
2682         register names.
2684 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
2686         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
2687         field "m_scopes" from vec to auto_vec.
2689 2018-07-25  Martin Liska  <mliska@suse.cz>
2691         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
2692         return type.
2694 2018-07-25  Richard Biener  <rguenther@suse.de>
2696         PR debug/86654
2697         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
2698         special wrt context_die late.
2699         (gen_subprogram_die): Re-use DIEs in local scope.
2701 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
2703         PR tree-optimization/86644
2704         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
2706 2018-07-25  Martin Liska  <mliska@suse.cz>
2708         PR middle-end/86645
2709         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
2710         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2712 2018-07-25  Martin Liska  <mliska@suse.cz>
2714         PR sanitizer/79635
2715         * params.def: Explain ASan abbreviation and provide
2716         a documentation link.
2718 2018-07-24  Martin Sebor  <msebor@redhat.com>
2720         PR tree-optimization/86622
2721         PR tree-optimization/86532
2722         * builtins.h (string_length): Declare.
2723         * builtins.c (c_strlen): Correct handling of non-constant offsets.
2724         (check_access): Be prepared for non-constant length ranges.
2725         (string_length): Make extern.
2726         * expr.c (string_constant): Only handle the minor non-constant
2727         array index.  Use string_constant to compute the length of
2728         a generic string constant.
2730 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
2732         PR tree-optimization/86618
2733         * tree-vect-stmts.c (vectorizable_call): Don't take the address
2734         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2736 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
2738         PR tree-optimization/86636
2739         * json.cc (json::object::set): Fix comment.  Add assertions.
2740         (json::array::append): Move here from json.h.  Add comment and an
2741         assertion.
2742         (json::string::string): Likewise.
2743         * json.h (json::array::append): Move to json.cc.
2744         (json::string::string): Likewise.
2745         * optinfo-emit-json.cc
2746         (optrecord_json_writer::impl_location_to_json): Assert that we
2747         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
2748         wrapper around it.  Expand the location once, rather than three
2749         times.
2750         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
2751         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
2752         wrappers.
2753         (optrecord_json_writer::optinfo_to_json): Likewise, in four
2754         places.  Fix some overlong lines.
2756 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
2758         * config/aarch64/aarch64-simd.md
2759         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
2760         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
2761         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
2762         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
2763         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
2764         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
2765         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
2766         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
2767         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2769 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
2771         PR middle-end/86627
2772         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
2773         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
2774         and abs_d == d, do the power of two handling if profitable.
2776 2018-07-24  Richard Biener  <rguenther@suse.de>
2778         * match.pd: Add BIT_FIELD_REF canonicalizations.
2780 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2782         PR c/86617
2783         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2785 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2787         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
2788         terminated STRING_CST object.
2790 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2792         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2794 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2796         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
2797         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
2798         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
2799         the elements into a register.
2800         (rs6000_split_v4si_init_di_reg): Delete.
2801         (rs6000_split_v4si_init): Delete.
2802         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
2803         (vsx_init_v4si): Rewrite as a define_expand.
2805 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
2807         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
2808         zero_extend argument from memory): New.
2810 2018-07-22  Martin Sebor  <msebor@redhat.com>
2812         PR bootstrap/86621
2813         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
2814         diagnosing calls with unknown arguments unless -Walloca-larger-than
2815         is restricted to less than PTRDIFF_MAX bytes.
2817 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
2819         * doc/gcov.texi (Invoking Gcov): Editorial changes.
2821 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2823         * pretty-print.c (text_info::set_location): Remove redundant
2824         "line_table" parameter from call to rich_location::set_range.
2826 2018-07-20  Martin Sebor  <msebor@redhat.com>
2828         PR middle-end/82063
2829         * builtins.c (expand_builtin_alloca): Adjust.
2830         * calls.c (alloc_max_size): Simplify.
2831         * cgraphunit.c (cgraph_node::expand): Adjust.
2832         * common.opt (larger_than_size, warn_frame_larger_than): Remove
2833         variables.
2834         (frame_larger_than_size): Same.
2835         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
2836         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
2837         Initialize.
2838         * doc/invoke.texi (GCC Command Options): Document option arguments.
2839         Explain byte-size arguments and suffixes.
2840         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
2841         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
2842         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
2843         * doc/options.texi (UInteger): Expand.
2844         (Host_Wide_Int, ByteSize): Document new properties.
2845         * final.c (final_start_function_1): Include sizes in an error message.
2846         * function.c (frame_offset_overflow): Same.
2847         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
2848         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
2849         Diagnose unbounded alloca calls only for limits of less than
2850         PTRDIFF_MAX.
2851         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
2852         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
2853         for alloca(0).
2854         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
2855         only for limits of less than PTRDIFF_MAX.
2856         * langhooks-def.h (lhd_handle_option): Change function argument
2857         to HOST_WIDE_INT.
2858         * langhooks.c (lhd_handle_option): Same.
2859         * langhooks.h (handle_option): Same.
2860         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
2861         ByteSize flags.
2862         (var_type, var_type_struct): Same.
2863         (var_set): Handle ByteSize flag.
2864         * optc-gen.awk: Add comments to output to ease debugging.  Make
2865         use of HOST_WIDE_INT where appropriate.
2866         * opts-gen-save.awk:  Use %lx to format unsigned long.
2867         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
2868         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
2869         arguments.  Parse bytes-size suffixes.
2870         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
2871         (enum_value_to_arg): Same.
2872         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
2873         (handle_option): Adjust.
2874         (generate_option): Change function argument to HOST_WIDE_INT.
2875         (cmdline_handle_error): Adjust.
2876         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
2877         (set_option): Change function argument to HOST_WIDE_INT.
2878         (option_enabled): Handle cl_host_wide_int.
2879         (get_option_state): Handle CLVC_SIZE.
2880         (control_warning_option): Same.
2881         * opts.c (common_handle_option): Change function argument to
2882         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
2883         OPT_Wvla_larger_than_.
2884         * opts.h (enum cl_var_type): Add an enumerator.
2885         * stor-layout.c (layout_decl): Print a more meaningful warning.
2886         * toplev.c (output_stack_usage): Adjust.
2888 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
2890         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
2891         call to inline_expand_builtin_string_cmp.
2892         (expand_builtin_strcmp): Likewise.
2893         (expand_builtin_strncmp): Likewise.
2894         (inline_string_cmp): Delete the last parameter, change char_type_node
2895         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
2896         two operands.
2897         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
2898         the inlining expansion on target where the type of the call has same or
2899         narrower precision than unsigned char.
2901 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
2903         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
2904         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
2905         * common.opt (fsave-optimization-record): New option.
2906         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
2907         * doc/invoke.texi (-fsave-optimization-record): New option.
2908         * dumpfile.c: Include "optinfo-emit-json.h".
2909         (struct kv_pair): Move to coretypes.h.
2910         (optgroup_options): Make non-static.
2911         (dump_context::end_scope): Call
2912         optimization_records_maybe_pop_dump_scope.
2913         * dumpfile.h (optgroup_options): New decl.
2914         * json.cc: New file.
2915         * json.h: New file.
2916         * optinfo-emit-json.cc: New file.
2917         * optinfo-emit-json.h: New file.
2918         * optinfo.cc: Include "optinfo-emit-json.h".
2919         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
2920         (optinfo_enabled_p): Check optimization_records_enabled_p.
2921         (optinfo_wants_inlining_info_p): Likewise.
2922         * optinfo.h: Update comment.
2923         * profile-count.c (profile_quality_as_string): New function.
2924         * profile-count.h (profile_quality_as_string): New decl.
2925         (profile_count::quality): New accessor.
2926         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
2927         and optinfo_emit_json_cc_tests.
2928         * selftest.h (selftest::json_cc_tests): New decl.
2929         (selftest::optinfo_emit_json_cc_tests): New decl.
2930         * toplev.c: Include "optinfo-emit-json.h".
2931         (compile_file): Call optimization_records_finish.
2932         (do_compile): Call optimization_records_start.
2933         * tree-ssa-live.c: Include optinfo.h.
2934         (remove_unused_scope_block_p): Retain inlining information if
2935         optinfo_wants_inlining_info_p returns true.
2937 2018-07-20  Richard Biener  <rguenther@suse.de>
2939         PR debug/86585
2940         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
2941         to cover -flto-partition=none.
2943 2018-07-20  Martin Liska  <mliska@suse.cz>
2945         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
2946         (get_decl_source_range): Remove unused function.
2948 2018-07-20  Richard Biener  <rguenther@suse.de>
2950         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
2951         (struct vn_phi_s): Likewise.
2952         (struct vn_reference_s): Likewise.
2953         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
2954         for searching the slot of an entry known to be in the hash itself.
2955         (vn_phi_hasher::equal): Likewise.
2956         (vn_reference_hasher::equal): Likewise.
2957         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
2958         globals.
2959         (optimistic_info, current_info): Remove, keeping only valid_info.
2960         (vn_reference_lookup_1): Remove fallback lookup.
2961         (vn_reference_lookup_2): Likewise.
2962         (vn_nary_op_lookup_1): Likewise.
2963         (vn_phi_lookup): Likewise.
2964         (vn_nary_build_or_lookup_1): Make sure to not chain the built
2965         hash element.
2966         (vn_reference_insert): Adjust, chain the inserted hash element
2967         at last_inserted_ref.
2968         (vn_reference_insert_pieces): Likewise.
2969         (visit_reference_op_call): Likewise.
2970         (vn_nary_op_insert_into): Chain the inserted hash element at
2971         last_inserted_nary.
2972         (vn_nary_op_insert_pieces): Adjust.
2973         (vn_nary_op_insert): Likewise.
2974         (vn_nary_op_insert_stmt): Likewise.
2975         (vn_phi_insert): Adjust, chain the inserted hash element at
2976         last_inserted_phi.
2977         (process_scc): Remove clearing and copying the optimistic
2978         table.  Instead remove elements inserted during an optimistic
2979         iteration from the single table we maintain.
2980         (init_scc_vn): Adjust.
2981         (free_scc_vn): Likewise.
2982         (sccvn_dom_walker::record_cond): Likewise.
2983         (sccvn_dom_walker::after_dom_children): Likewise.
2985 2018-07-19  Martin Sebor  <msebor@redhat.com>
2987         PR tree-optimization/84047
2988         PR tree-optimization/83776
2989         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
2990         (check_array_bounds): Call it.
2992 2018-07-19  Martin Sebor  <msebor@redhat.com>
2994         * align.h (align_flags): Use member initialization.
2996 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
2998         * Makefile.in (OBJS): Add optinfo.o.
2999         * coretypes.h (class symtab_node): New forward decl.
3000         (struct cgraph_node): New forward decl.
3001         (class varpool_node): New forward decl.
3002         * dump-context.h: New file.
3003         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
3004         "tree-pass.h".
3005         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
3006         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
3007         (set_alt_dump_file): Likewise.
3008         (dump_context::~dump_context): New dtor.
3009         (dump_gimple_stmt): Move implementation to...
3010         (dump_context::dump_gimple_stmt): ...this new member function.
3011         Add the stmt to any pending optinfo, creating one if need be.
3012         (dump_gimple_stmt_loc): Move implementation to...
3013         (dump_context::dump_gimple_stmt_loc): ...this new member function.
3014         Start a new optinfo and add the stmt to it.
3015         (dump_gimple_expr): Move implementation to...
3016         (dump_context::dump_gimple_expr): ...this new member function.
3017         Add the stmt to any pending optinfo, creating one if need be.
3018         (dump_gimple_expr_loc): Move implementation to...
3019         (dump_context::dump_gimple_expr_loc): ...this new member function.
3020         Start a new optinfo and add the stmt to it.
3021         (dump_generic_expr): Move implementation to...
3022         (dump_context::dump_generic_expr): ...this new member function.
3023         Add the tree to any pending optinfo, creating one if need be.
3024         (dump_generic_expr_loc): Move implementation to...
3025         (dump_context::dump_generic_expr_loc): ...this new member
3026         function.  Add the tree to any pending optinfo, creating one if
3027         need be.
3028         (dump_printf): Move implementation to...
3029         (dump_context::dump_printf_va): ...this new member function.  Add
3030         the text to any pending optinfo, creating one if need be.
3031         (dump_printf_loc): Move implementation to...
3032         (dump_context::dump_printf_loc_va): ...this new member function.
3033         Start a new optinfo and add the stmt to it.
3034         (dump_dec): Move implementation to...
3035         (dump_context::dump_dec): ...this new member function.  Add the
3036         value to any pending optinfo, creating one if need be.
3037         (dump_context::dump_symtab_node): New member function.
3038         (dump_context::get_scope_depth): New member function.
3039         (dump_context::begin_scope): New member function.
3040         (dump_context::end_scope): New member function.
3041         (dump_context::ensure_pending_optinfo): New member function.
3042         (dump_context::begin_next_optinfo): New member function.
3043         (dump_context::end_any_optinfo): New member function.
3044         (dump_context::s_current): New global.
3045         (dump_context::s_default): New global.
3046         (dump_scope_depth): Delete global.
3047         (dumpfile_ensure_any_optinfo_are_flushed): New function.
3048         (dump_symtab_node): New function.
3049         (get_dump_scope_depth): Reimplement in terms of dump_context.
3050         (dump_begin_scope): Likewise.
3051         (dump_end_scope): Likewise.
3052         (selftest::temp_dump_context::temp_dump_context): New ctor.
3053         (selftest::temp_dump_context::~temp_dump_context): New dtor.
3054         (selftest::verify_item): New function.
3055         (ASSERT_IS_TEXT): New macro.
3056         (ASSERT_IS_TREE): New macro.
3057         (ASSERT_IS_GIMPLE): New macro.
3058         (selftest::test_capture_of_dump_calls): New test.
3059         (selftest::dumpfile_c_tests): Call it.
3060         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
3061         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
3062         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
3063         descriptive comment.
3064         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
3065         (dump_node, dump_bb): Move these unrelated decls.
3066         (class dump_manager): Add leading comment.
3067         * optinfo.cc: New file.
3068         * optinfo.h: New file.
3070 2018-07-19  Michael Collison  <michael.collison@arm.com>
3071             Richard Henderson <rth@redhat.com>
3073         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
3074         (subti): Handle op1 zero.
3075         (subvti4, usub4ti4): New.
3076         (*sub<GPI>3_compare1_imm): New.
3077         (sub<GPI>3_carryinCV): New.
3078         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
3079         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
3081 2018-07-19  Michael Collison  <michael.collison@arm.com>
3082             Richard Henderson <rth@redhat.com>
3084         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
3085         (addti3): Create simpler code if low part is already known to be 0.
3086         (addvti4, uaddvti4): New.
3087         (*add<GPI>3_compareC_cconly_imm): New.
3088         (*add<GPI>3_compareC_cconly): New.
3089         (*add<GPI>3_compareC_imm): New.
3090         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
3091         handle constants within this pattern..
3092         (*add<GPI>3_compareV_cconly_imm): New.
3093         (*add<GPI>3_compareV_cconly): New.
3094         (*add<GPI>3_compareV_imm): New.
3095         (add<GPI>3_compareV): New.
3096         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
3097         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
3098         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
3099         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
3100         with 'comparison' operator.
3101         (*add<GPI>3_compareV_cconly_imm): Ditto.
3102         (*add<GPI>3_compareV_cconly): Ditto.
3103         (*add<GPI>3_compareV_imm): Ditto.
3104         (add<GPI>3_compareV): Ditto.
3105         (add<mode>3_carryinC): Ditto.
3106         (*add<mode>3_carryinC_zero): Ditto.
3107         (*add<mode>3_carryinC): Ditto.
3108         (add<mode>3_carryinV): Ditto.
3109         (*add<mode>3_carryinV_zero): Ditto.
3110         (*add<mode>3_carryinV): Ditto.
3112 2018-07-19  Michael Collison  <michael.collison@arm.com>
3113             Richard Henderson <rth@redhat.com>
3115         * config/aarch64/aarch64-modes.def (CC_V): New.
3116         * config/aarch64/aarch64-protos.h
3117         (aarch64_addti_scratch_regs): Declare
3118         (aarch64_subvti_scratch_regs): Declare.
3119         (aarch64_expand_subvti): Declare.
3120         (aarch64_gen_unlikely_cbranch): Declare
3121         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
3122         for signed overflow using CC_Vmode.
3123         (aarch64_get_condition_code_1): Handle CC_Vmode.
3124         (aarch64_gen_unlikely_cbranch): New function.
3125         (aarch64_addti_scratch_regs): New function.
3126         (aarch64_subvti_scratch_regs): New function.
3127         (aarch64_expand_subvti): New function.
3129 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3131         * config/aarch64/aarch64-option-extensions.def: New entry for profile
3132         extension.
3133         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
3134         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
3135         extension.
3137 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3139         PR target/83009
3140         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3141         address check not strict.
3143 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3145         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
3146         Umq with Umn.
3147         (store_pair_lanes<mode>): Likewise.
3148         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
3149         enum value 'ADDR_QUERY_LDP_STP_N'.
3150         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
3151         (aarch64_print_address_internal): Add declaration.
3152         (aarch64_print_ldpstp_address): Remove.
3153         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
3154         (aarch64_print_operand): Change printing of 'y'.
3155         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
3156         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
3157         'true' rather than '1'.
3158         * config/aarch64/constraints.md (Uml): Likewise.
3159         (Uml): Rename to Umn.
3160         (Umq): Remove.
3162 2018-07-19  Richard Biener  <rguenther@suse.de>
3164         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
3165         a trailing array.
3166         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
3167         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
3168         (vn_reference_hasher): Likewise.
3169         (struct vn_tables_s): Remove obstack and alloc-pool members.
3170         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
3171         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
3172         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
3173         (vn_reference_insert_pieces): Likewise.
3174         (alloc_vn_nary_op_noinit): Adjust.
3175         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
3176         (vn_phi_eq): Adjust.
3177         (shared_lookup_phiargs): Remove.
3178         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
3179         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
3180         (visit_reference_op_call): Likewise.
3181         (copy_nary, copy_phi, copy_reference): Remove.
3182         (process_scc): Rewind the obstack when iterating.  Do not
3183         copy the elements to valid_info but just move them from one
3184         hashtable to the other.
3185         (allocate_vn_table): Adjust.
3186         (free_vn_table): Likewise.
3187         (init_scc_vn): Likewise.
3188         (free_scc_vn): Likewise.
3190 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
3192         PR target/86560
3193         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
3194         indirect_return as function type attribute.
3195         (ix86_attribute_table): Change indirect_return to function
3196         type attribute.
3197         * doc/extend.texi: Update indirect_return attribute.
3199 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
3201         * wide-int.h (widest2_int): New.
3202         * gimple-fold.c (arith_overflowed_p): Use it.
3203         * tree.h (widest2_int_cst): New.
3204         * tree-vrp.c (wide_int_binop_overflow): Rename from
3205         vrp_int_const_binop.
3206         Rewrite to work on trees.
3207         (extract_range_from_multiplicative_op_1): Abstract code to...
3208         (wide_int_range_min_max): ...here.
3209         (wide_int_range_cross_product): ...and here.
3210         (extract_range_from_binary_expr_1): Abstract overflow code to...
3211         (wide_int_range_mult_wrapping): ...here.
3212         * tree-vrp.h (wide_int_range_cross_product): New.
3213         (wide_int_range_mult_wrapping): New.
3215 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
3216             Julia Koval  <julia.koval@intel.com>
3218         * config/i386/x86-tune-costs.h (skylake_memcpy,
3219         skylake_memset): Replace rep_prefix with unrolling for size 512.
3221 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
3223         PR middle-end/86544
3224         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
3225         comparision with EQ_EXPR in last stmt.
3227 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3229         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
3230         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
3231         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
3232         previously known as "PowerPC AltiVec Built-in Functions".  Move
3233         some material to new subsubsections "PowerPC AltiVec Built-in
3234         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
3235         ISA 2.07".
3236         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
3237         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
3238         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
3239         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
3241 2018-07-18  Richard Biener  <rguenther@suse.de>
3243         PR tree-optimization/86557
3244         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
3245         EXACT_DIV_EXPR.
3247 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
3249         * config/s390/s390.c (s390_function_profiler): Generate CFI.
3251 2018-07-17  Jeff Law  <law@redhat.com>
3253         * config/arm/arm.c (get_label_padding): Update for recent
3254         changes to label_to_alignment.
3256         PR tree-optimization/86010
3257         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
3259         * config/mips/mips.c (vr4130_align_insns): Update for recent
3260         changes to label_to_alignment.
3262         * config/frv/frv.c (frv_label_align): Update for recent changes
3263         to label_to_alignment.
3265         * config/nios2/nios2.c (nios2_label_align): Update for recent
3266         changes which dropped ALIGN_LABELS_LOG.
3268 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
3270         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3271         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3273 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
3275         * config/arc/arc.c (arc_label_align): Use align_labels instead of
3276         deprecated align_labels_log.
3278 2018-07-17  Richard Biener  <rguenther@suse.de>
3280         PR lto/86456
3281         * dwarf2out.c (init_sections_and_labels): Always generate
3282         a debug_line_str_section for early LTO debug.
3283         (dwarf2out_finish): Reset debug_line_str_hash output early.
3284         Bump counter for extra dwarf5 .debug_loc labels to not conflict
3285         with fat LTO part.
3286         (dwarf2out_early_finish): Output debug_line_str.
3288 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3290         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
3291         index register on z196 or later.
3293 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
3295         * config/s390/s390.c (s390_default_align): Set default function
3296         alignment to 16.
3297         (s390_override_options_after_change): Call s390_default align.
3298         (s390_option_override_internal): Call s390_default_align.
3299         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
3301 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3303         PR middle-end/86542
3304         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3305         to _looptemp_ clauses, other than the first two.
3307 2018-07-17  Martin Liska  <mliska@suse.cz>
3309         * opts.c: Do not enable OPT_falign_* for -Os.
3311 2018-07-17  Martin Liska  <mliska@suse.cz>
3313         * align.h (MAX_CODE_ALIGN): New.
3314         (MAX_CODE_ALIGN_VALUE): New.
3315         * common/config/i386/i386-common.c (ix86_handle_option):
3316         (MAX_CODE_ALIGN): Moved to align.h.
3317         * final.c (MAX_CODE_ALIGN): Likewise.
3318         * opts.c (parse_and_check_align_values):
3319         (MAX_CODE_ALIGN): Likewise.
3320         (MAX_CODE_ALIGN_VALUE): Likewise.
3322 2018-07-17  Martin Liska  <mliska@suse.cz>
3324         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
3325         in order to fulfil coding style.
3326         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
3327         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3328         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
3329         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
3330         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
3331         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
3332         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
3333         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
3334         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
3336 2018-07-17  Martin Liska  <mliska@suse.cz>
3338         * align.h: New file.
3339         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
3340         directly.
3341         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
3342         align_flags of label_to_alignment.
3343         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
3344         align_flags class.
3345         * config/m68k/m68k.c: Do not use removed align_labels_value and
3346         align_loops_value.
3347         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
3348         (LOOP_ALIGN): Likewise.
3349         (LABEL_ALIGN): Likewise.
3350         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3351         Remove not used macro.
3352         (rs6000_loop_align): Change return type to align_flags.
3353         (rs6000_loop_align_max_skip): Remove.
3354         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
3355         Change return type to align_flags.
3356         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
3357         Remove not used macro.
3358         (rs6000_loop_align):  Change return type to align_flags.
3359         (rs6000_loop_align_max_skip): Remove.
3360         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
3361         * config/rx/rx-protos.h (rx_align_for_label): Make it
3362         static function.
3363         * config/rx/rx.c (rx_align_for_label): Change return type
3364         to align_flags.
3365         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
3366         macro definitions.
3367         into align_flags class.
3368         (LABEL_ALIGN): Likewise.
3369         (LOOP_ALIGN): Likewise.
3370         * config/s390/s390.c (s390_label_align): Use align_flags
3371         class member.
3372         (s390_asm_output_function_label): Likewise.
3373         * config/sh/sh.c (sh_override_options_after_change):
3374         Use align_flags class directly without macros.
3375         (find_barrier): Likewise.
3376         (barrier_align): Likewise.
3377         (sh_loop_align): Likewise.
3378         * config/spu/spu.c (spu_option_override):
3379         Use align_flags_tuple::get_value instead of removed macros.
3380         (spu_sched_init): Likewise.
3381         * config/spu/spu.h (GTY): Likewise.
3382         * config/visium/visium.c (visium_option_override):
3383         Set "8" as default secondary alignment.
3384         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
3385         in order to guarantee secondary alignment of 8.
3386         * coretypes.h: Include align.h header file.
3387         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
3388         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
3389         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
3390         * doc/tm.texi.in: Likewise.
3391         * final.c (struct label_alignment): Remove not used structure.
3392         (LABEL_ALIGN): Change type to align_flags.
3393         (LOOP_ALIGN): Likewise.
3394         (JUMP_ALIGN): Likewise.
3395         (default_loop_align_max_skip): Remove.
3396         (default_label_align_max_skip): Likewise.
3397         (default_jump_align_max_skip): Likewise.
3398         (default_label_align_after_barrier_max_skip):
3399         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
3400         (LABEL_TO_MAX_SKIP): Remove.
3401         (label_to_alignment): Return align_flags type instead of integer.
3402         (label_to_max_skip): Remove.
3403         (align_fuzz): Use align_flags type.
3404         (compute_alignments): Use align_flags type and use align_flags::max
3405         to combine multiple alignments.
3406         (grow_label_align): Grow vec instead of C array.
3407         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
3408         (shorten_branches):  Use align_flags type and use align_flags::max
3409         to combine multiple alignments.
3410         (final_scan_insn_1): Remove usage of secondary alignment that comes
3411         from label alignment, but instead use proper secondary alignment
3412         which is computed in grow_label_align.
3413         * flags.h (struct align_flags_tuple): Move to align.h.
3414         (struct align_flags): Likewise.
3415         (state_align_loops): Rename to align_loops.
3416         (state_align_jumps): Rename to align_jumps.
3417         (state_align_labels): Rename to align_labels.
3418         (state_align_functions): Rename to align_functions.
3419         (align_loops_log): Remove.
3420         (align_jumps_log): Remove.
3421         (align_labels_log): Remove.
3422         (align_functions_log): Remove.
3423         (align_loops_max_skip): Remove.
3424         (align_jumps_max_skip): Remove.
3425         (align_labels_max_skip): Remove.
3426         (align_functions_max_skip): Remove.
3427         (align_loops_value): Remove.
3428         (align_jumps_value): Remove.
3429         (align_labels_value): Remove.
3430         (align_functions_value): Remove.
3431         * output.h (label_to_alignment): Change return type to align_flags.
3432         (label_to_max_skip): Remove.
3433         * target.def: Remove loop_align_max_skip, label_align_max_skip,
3434         jump_align_max_skip macros.
3435         * targhooks.h (default_loop_align_max_skip): Remove.
3436         (default_label_align_max_skip): Likewise.
3437         (default_jump_align_max_skip): Likewise.
3438         (default_label_align_after_barrier_max_skip): Remove.
3439         * toplev.c (read_log_maxskip): Use ::normalize function.
3440         (parse_N_M): Remove not used argument and also call ::normalize.
3441         (parse_alignment_opts): Do not pass unused arguments.
3442         * varasm.c (assemble_start_function): Use directly align_functions
3443         instead of removed macros.
3444         * system.h: Do not poison removed macros.
3446 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
3448         PR middle-end/86539
3449         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3450         and cond temporaries don't have reference type if iterator has
3451         pointer type.  For init use &for_pre_body instead of pre_p if
3452         for_pre_body is non-empty.
3454 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3456         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
3457         double-double modes to SFmode directly directly.
3458         (trunc<mode>sf2_fprs): Delete.
3460 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3462         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
3463         for conversions between IFmode and the decimal floating point modes.
3464         (init_float128_ieee): Use the correct names for conversions between
3465         KFmode and the decimal floating point modes.
3467 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
3469         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
3470         for the conversions between TDmode and IFmode.
3471         (init_float128_ieee): Use more correct names for the conversions
3472         between TDmode and KFmode.
3474 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
3476         PR tree-optimization/86526
3477         * builtins.c (expand_builtin_memcmp): Formatting fixes.
3478         (inline_expand_builtin_string_cmp): Likewise.
3479         (inline_string_cmp): Likewise.  Use c_readstr instead of
3480         builtin_memcpy_read_str.  Add unit_mode temporary.
3482 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3484         PR middle-end/86528
3485         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
3486         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
3488 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3490         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
3491         Alphabetize prototypes of built-in functions, separating out
3492         built-in functions that are listed in this section but should be
3493         described elsewhere.
3495 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
3497         PR target/86511
3498         * expmed.c (emit_store_flag): Do not emit setcc followed by a
3499         conditional move when trapping comparison was split to a
3500         non-trapping one (and vice versa).
3502 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3504         * config/s390/s390.c (s390_function_profiler): Generate nops
3505         instead of profiler call sequences.
3506         * config/s390/s390.opt: Add the new option.
3508 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3510         * config/s390/s390.c (s390_function_profiler): Generate
3511         __mcount_loc section.
3512         * config/s390/s390.opt: Add the new option.
3514 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
3516         * common.opt: Add the new warning.
3517         * config/s390/s390.c (s390_function_profiler): Emit "brasl
3518         %r0,__fentry__" when -mfentry is specified.
3519         (s390_option_override_internal): Disallow -mfentry for 31-bit
3520         CPUs.
3521         * config/s390/s390.opt: Add the new option.
3523 2018-07-16  Richard Biener  <rguenther@suse.de>
3525         PR lto/86523
3526         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
3527         for function-local FUNCTION_DECL and RESULT_DECL immediately.
3529 2018-07-16  Martin Liska  <mliska@suse.cz>
3531         PR ipa/86529
3532         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
3533         to ::get_create.
3535 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3537         * config/arc/arcHS.md: Update ARCHS scheduling rules.
3539 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
3541         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
3542         for ARCHS4x.
3543         * config/arc/arc-cpus.def (hs4x): New cpu.
3544         (hs4xd): Likewise.
3545         * config/arc/arc-tables.opt: Regenerate.
3546         * config/arc/arc.c (arc_sched_issue_rate): New function.
3547         (TARGET_SCHED_ISSUE_RATE): Define.
3548         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
3549         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
3550         fpu_cvt.
3551         (attr tune): Add ARCHS4x tune values.
3552         (attr tune_dspmpy): Define.
3553         (*tst): Correct instruction type.
3554         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
3555         * config/arc/arcHS4x.md: New file.
3556         * config/arc/fpu.md: Update instruction type attributes.
3557         * config/arc/t-multilib: Regenerate.
3559 2018-07-16  Tom de Vries  <tdevries@suse.de>
3561         PR debug/86455
3562         * var-tracking.c (vt_initialize): Fix pre_dec handling.
3564 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3566         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
3567         early clobber.
3569 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
3571         PR tree-optimization/86514
3572         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3573         conversion to a boolean type from a type with greater precision.
3575 2018-07-16  Tom de Vries  <tdevries@suse.de>
3577         * var-tracking.c (vt_initialize): Print adjusted insn slim if
3578         dump_flags request TDF_SLIM.
3580 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
3582         * fold-const.c (int_const_binop_1): Abstract...
3583         (wide_int_binop): ...wide int code here.
3584         (poly_int_binop): ...poly int code here.
3585         Abstract the rest of int_const_binop_1 into int_const_binop.
3586         * fold-const.h (wide_int_binop): New.
3587         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
3588         Remove useless PLUS/MINUS_EXPR case.
3589         (zero_nonzero_bits_from_vr): Move wide int code...
3590         (zero_nonzero_bits_from_bounds): ...here.
3591         (extract_range_from_binary_expr_1): Move mask optimization code...
3592         (range_easy_mask_min_max): ...here.
3593         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
3594         (range_easy_mask_min_max): New.
3596 2018-07-15  Jeff Law  <law@redhat.com>
3598         PR target/85993
3599         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
3600         block.
3602 2018-07-14  Jim Wilson  <jimw@sifive.com>
3604         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
3606 2018-07-14  Paul Koning  <ni1d@arrl.net>
3608         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
3610 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
3612         * lto-streamer-out.c (copy_function_or_variable): Dump info about
3613         copying section.
3615 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
3616             Steve Munroe  <munroesj52@gmail.com>
3618         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3619         (_mm_andnot_si128): Likewise.
3620         (_mm_or_si128): Likewise.
3621         (_mm_xor_si128): Likewise.
3623 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
3625         PR middle-end/78809
3626         * builtins.c (expand_builtin_memcmp): Inline the calls first
3627         when result_eq is false.
3628         (expand_builtin_strcmp): Inline the calls first.
3629         (expand_builtin_strncmp): Likewise.
3630         (inline_string_cmp): New routine. Expand a string compare
3631         call by using a sequence of char comparison.
3632         (inline_expand_builtin_string_cmp): New routine. Inline expansion
3633         a call to str(n)cmp/memcmp.
3634         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
3635         New option.
3636         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
3638 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
3640         * config/arm/driver-arm.c: Include arm-native.h.
3641         (host_detect_local_cpu): Use auto-generated data tables.
3642         (vendors, arm_cpu_table): Delete.  Move part information to ...
3643         * config/arm/arm-cpus.in: ... here.
3644         * config/arm/parsecpu.awk (gen_native): New function.
3645         (vendor, part): New CPU fields.
3646         (END): Add support for building the native CPU detection tables.
3647         * config/arm/t-arm (arm-native.h): Add build rule.
3648         (driver-arm.o): Add dependency on arm-native.h.
3650 2018-07-13  Richard Biener  <rguenther@suse.de>
3652         PR middle-end/85974
3653         * match.pd (addr1 - addr2): Allow either of the operand to
3654         have a conversion.
3656 2018-07-13  Tom de Vries  <tdevries@suse.de>
3658         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
3659         in remap_ssa_name.
3661 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
3663         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
3664         arrays instead of numbered variables.
3666 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
3668         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
3669         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
3671 2018-07-13  Richard Biener  <rguenther@suse.de>
3673         PR debug/86452
3674         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3675         instead of get_context_die.
3677 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3678             Richard Biener  <rguenther@suse.de>
3680         PR middle-end/86489
3681         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
3682         that the loop latch destination where phi is defined.
3684 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
3686         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
3687         (riscv_expand_epilogue): Add assertion to check interrupt mode.
3688         (riscv_set_current_function): Extract getting interrupt type to new
3689         function.
3690         (riscv_get_interrupt_type): New function.
3691         (riscv_merge_decl_attributes): New function, checking interrupt type is
3692         same.
3693         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
3695 2018-07-12  Paul Koning  <ni1d@arrl.net>
3697         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
3698         directive.
3700 2018-07-12  Paul Koning  <ni1d@arrl.net>
3702         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
3703         zero reference, add doloop_end instead.
3704         * doc/md.texi (decrement_and_branch_until_zero): Remove.
3705         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
3706         detail for doloop_end.
3708 2018-07-12  Martin Sebor  <msebor@redhat.com>
3710         PR c/86453
3711         * attribs.c (decl_attributes): Reject conflicting attributes before
3712         calling attribute handlers.
3714 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3716         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
3717          parameter.
3718         (gcc::dump_manager::get_dump_file_name): likewise.
3719         (dump_begin): Likewise.
3720         * dumpfile.h (dump_begin): Update prototype.
3721         (gcc::dump_manager::get_dump_file_name,
3722         gcc::dump_manager::get_dump_file_name): Update prototype.
3724 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3726         * internal-fn.h (vectorizable_internal_fn_p): New function.
3727         * tree-vect-slp.c (compatible_calls_p): Likewise.
3728         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
3729         to internal functions.
3730         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
3732 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3734         * fold-const.h (inverse_conditions_p): Declare.
3735         * fold-const.c (inverse_conditions_p): New function.
3736         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
3737         that test the inverse condition of a conditional internal function.
3738         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
3739         * internal-fn.c (internal_fn_mask_index): Handle conditional
3740         internal functions.
3741         (vectorized_internal_fn_supported_p): New function.
3742         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
3743         (any_pred_load_store): Replace with...
3744         (need_to_predicate): ...this new variable.
3745         (redundant_ssa_names): New variable.
3746         (ifcvt_can_use_mask_load_store): Move initial checks to...
3747         (ifcvt_can_predicate): ...this new function.  Handle tree codes
3748         for which a conditional internal function exists.
3749         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
3750         instead of ifcvt_can_use_mask_load_store.  Update after variable
3751         name change.
3752         (predicate_load_or_store): New function, split out from
3753         predicate_mem_writes.
3754         (check_redundant_cond_expr): New function.
3755         (value_available_p): Likewise.
3756         (predicate_rhs_code): Likewise.
3757         (predicate_mem_writes): Rename to...
3758         (predicate_statements): ...this.  Use predicate_load_or_store
3759         and predicate_rhs_code.
3760         (combine_blocks, tree_if_conversion): Update after above name changes.
3761         (ifcvt_local_dce): Handle redundant_ssa_names.
3762         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
3763         general conditional functions.
3764         * tree-vect-stmts.c (vectorizable_call): Likewise.
3766 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3767             Alan Hayward  <alan.hayward@arm.com>
3768             David Sherwood  <david.sherwood@arm.com>
3770         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
3771         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
3772         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
3773         plus and minus and convert them into IFN_COND_FMA-based sequences.
3774         (convert_mult_to_fma): Handle conditional plus and minus.
3776 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3778         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
3779         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
3780         (cond_fnms_optab): New optabs.
3781         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
3782         internal functions.
3783         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
3784         * internal-fn.h (get_conditional_internal_fn): Declare.
3785         (get_unconditional_internal_fn): Likewise.
3786         * internal-fn.c (cond_ternary_direct): New macro.
3787         (expand_cond_ternary_optab_fn): Likewise.
3788         (direct_cond_ternary_optab_supported_p): Likewise.
3789         (FOR_EACH_COND_FN_PAIR): Likewise.
3790         (get_conditional_internal_fn): New function.
3791         (get_unconditional_internal_fn): Likewise.
3792         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
3793         (gimple_match_op::gimple_match_op): Add a new overload for 5
3794         operands.
3795         (gimple_match_op::set_op): Likewise.
3796         (gimple_resimplify5): Declare.
3797         * genmatch.c (decision_tree::gen): Generate simplifications for
3798         5 operands.
3799         * gimple-match-head.c (gimple_simplify): Define an overload for
3800         5 operands.  Handle calls with 5 arguments in the top-level overload.
3801         (convert_conditional_op): Handle conversions from unconditional
3802         internal functions to conditional ones.
3803         (gimple_resimplify5): New function.
3804         (build_call_internal): Pass a fifth operand.
3805         (maybe_push_res_to_seq): Likewise.
3806         (try_conditional_simplification): Try converting conditional
3807         internal functions to unconditional internal functions.
3808         Handle 3-operand unconditional forms.
3809         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
3810         Define ternary equivalents of the current rules for binary conditional
3811         internal functions.
3812         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
3813         ternary operations.
3814         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
3815         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
3816         (optab): Handle them.
3817         (SVE_COND_FP_TERNARY): New int iterator.
3818         (sve_fmla_op, sve_fmad_op): New int attributes.
3819         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
3820         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
3821         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
3823 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
3825         * target.def (preferred_else_value): New target hook.
3826         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
3827         * doc/tm.texi: Regenerate.
3828         * targhooks.h (default_preferred_else_value): Declare.
3829         * targhooks.c (default_preferred_else_value): New function.
3830         * internal-fn.h (conditional_internal_fn_code): Declare.
3831         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
3832         (get_conditional_internal_fn): Use it.
3833         (conditional_internal_fn_code): New function.
3834         * gimple-match.h (gimple_match_cond): New struct.
3835         (gimple_match_op): Add a cond member function.
3836         (gimple_match_op::gimple_match_op): Update all forms to take a
3837         gimple_match_cond.
3838         * genmatch.c (expr::gen_transform): Use the same condition as res_op
3839         for the suboperation, but don't specify a particular else_value.
3840         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
3841         (visit_nary_op, visit_reference_op_load): Pass
3842         gimple_match_cond::UNCOND to the gimple_match_op constructor.
3843         * gimple-match-head.c: Include tree-eh.h
3844         (convert_conditional_op): New function.
3845         (maybe_resimplify_conditional_op): Likewise.
3846         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
3847         (gimple_resimplify2): Likewise.
3848         (gimple_resimplify3): Likewise.
3849         (gimple_resimplify4): Likewise.
3850         (maybe_push_res_to_seq): Return null for conditional operations.
3851         (try_conditional_simplification): New function.
3852         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
3853         constructor.
3854         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
3855         IFN_COND_* call.
3856         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
3857         function.
3858         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
3860 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
3862         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
3863         DECL_FCONTEXT
3864         (hash_tree): Do not hash DECL_FCONTEXT
3865         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
3866         Do not stream DECL_FCONTEXT.
3867         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
3868         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
3870 2018-07-12  Richard Biener  <rguenther@suse.de>
3872         PR debug/86462
3873         * dwarf2out.c (gen_block_die): Only output blocks when they have
3874         at least one !DECL_IGNORED_P variable.
3876 2018-07-12  Richard Biener  <rguenther@suse.de>
3878         PR target/84829
3879         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3880         Remove -mieee-fp handling.
3882 2018-07-12  Richard Biener  <rguenther@suse.de>
3884         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
3885         left-over from last patch.
3887 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3889         PR tree-optimization/86492
3890         * gimple-ssa-store-merging.c
3891         (imm_store_chain_info::coalesce_immediate_stores): Call
3892         check_no_overlap even for the merge_overlapping case.  Formatting fix.
3894 2018-07-12  Richard Biener  <rguenther@suse.de>
3896         PR middle-end/86479
3897         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
3898         move possibly trapping operations into the conditional.
3900 2018-07-12  Richard Biener  <rguenther@suse.de>
3902         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
3903         (vn_lookup_simplify_result): Remove recursion limit applied
3904         here.
3905         (vn_nary_build_or_lookup_1): Adjust.
3906         (try_to_simplify): Likewise.
3907         * gimple-match-head.c (gimple_resimplify1): Instead apply one
3908         here.
3909         (gimple_resimplify2): Likewise.
3910         (gimple_resimplify3): Likewise.
3911         (gimple_resimplify4): Likewise.
3913 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
3915         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3916         Use __mmask64 type instead of __mmask8 for __M argument.
3917         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3918         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3919         __U argument.
3920         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3921         __mmask16 for __M argument.
3922         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3923         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3924         to __mmask16 instead of __mmask8.
3925         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3926         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3927         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3928         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3929         instead of __mmask16 for __U argument.
3930         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3931         __mmask16 instead of __mmask8 for __U argument.
3932         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3933         __U argument.
3934         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3935         __mmask16.
3936         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3937         argument.
3938         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3939         __U argument.
3940         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3941         __mmask16.
3942         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3943         of __mmask16.
3944         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3945         __U argument.
3946         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3947         __U argument.
3948         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3949         __U argument.
3950         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3951         __U argument.
3952         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3953         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3954         return type as well as __M argument type and all casts from __mmask8
3955         to __mmask32.
3956         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3957         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3958         return type as well as __M argument type and all casts from __mmask8
3959         to __mmask16.
3960         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3961         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3962         return type as well as __M argument type and all casts from __mmask8
3963         to __mmask32.
3964         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3965         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3966         return type as well as __M argument type and all casts from __mmask8
3967         to __mmask16.
3968         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3969         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3970         __mmask16.
3972 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
3974         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3975         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3976         for __U argument.
3978 2018-07-11  Paul Koning  <ni1d@arrl.net>
3980         * doc/md.texi (define_subst): Document how multiple occurrences of
3981         the same argument in the replacement pattern are handled.
3983 2018-07-11  Paul Koning  <ni1d@arrl.net>
3985         * doc/extend.texi (Common Variable Attributes): Move "mode" into
3986         alphabetical order.
3987         (Common Type Attributes): Add "mode" attribute.
3989 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
3991         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
3992         stream DECL_ORIGINAL_TYPE.
3993         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
3994         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
3995         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
3996         Do not walk original type.
3997         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
3998         external decls.
3999         (write_ts_decl_non_common_tree_pointers): Do not stream
4000         DECL_ORIGINAL_TYPE
4001         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
4002         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
4004 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4006         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
4007         thread twice from the same starting edge.
4009 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
4011         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
4012         * gimple.c (gimple_call_nonnull_result_p): ...here...
4013         (gimple_call_nonnull_arg): ...and here.
4014         * gimple.h (gimple_call_nonnull_result_p): New.
4015         (gimple_call_nonnull_arg): New.
4017 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
4019         * config/arm/arm-cpus.in: Move information from fpu field of each
4020         cpu definition to the isa field.
4021         * config/arm/parsecpu.awk (fpu): Delete match rule.
4022         (gen_comm_data): Don't add bits from the CPU's FPU entry.
4024 2018-07-11  Richard Biener  <rguenther@suse.de>
4026         PR debug/86457
4027         * dwarf2out.c (init_sections_and_labels): Use
4028         output_asm_line_debug_info consistently.
4029         (dwarf2out_early_finish): Likewise.
4030         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
4031         type units.
4033 2018-07-11  Richard Biener  <rguenther@suse.de>
4035         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4036         Rework father_bb setting in a way to avoid propagating constants
4037         multiple times on a loop body.
4039 2018-07-10  Mark Wielaard  <mark@klomp.org>
4041         PR debug/86459
4042         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
4044 2018-07-10  Richard Biener  <rguenther@suse.de>
4046         * hash-map.h (hash_map::iterator::operator*): Return
4047         references to key and value.
4049 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
4051         PR c++/86443
4052         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
4053         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
4054         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
4055         (gimplify_omp_for): For composite loops, move outer
4056         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
4057         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
4058         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
4059         TREE_LIST for both the original class iterator and the "last" helper
4060         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
4061         loop, remember has_decl_expr from outer composite loops for the
4062         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
4064 2018-07-09  Martin Sebor  <msebor@redhat.com>
4066         PR middle-end/77357
4067         PR middle-end/86428
4068         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
4069         accessing implicitly initialized array elements.
4070         * expr.c (string_constant): Handle string initializers of
4071         character arrays within aggregates.
4072         * gimple-fold.c (fold_array_ctor_reference): Add argument.
4073         Store element offset.  As a special case, handle zero size.
4074         (fold_nonarray_ctor_reference): Same.
4075         (fold_ctor_reference): Add argument.  Store subobject offset.
4076         * gimple-fold.h (fold_ctor_reference): Add argument.
4078 2018-07-09  Paul Koning  <ni1d@arrl.net>
4080         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
4081         (pdp11_insn_cost): New function.
4082         (pdp11_md_asm_adjust): New function.
4083         (TARGET_INVALID_WITHIN_DOLOOP): Define.
4084         (pdp11_rtx_costs): Update to match machine better.
4085         (output_addr_const_pdp11): Correct format mismatch warnings.
4086         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
4087         * config/pdp11/pdp11.md: General change to add base_cost and/or
4088         length attributes for use by new pdp11_insn_cost function.
4089         (MIN_BRANCH): Correct definition.
4090         (MIN_SOB): Ditto.
4091         (doloop_end): Use standard pattern name for looping pattern.
4092         (doloop_end_nocc): New.
4093         (movsf): Add another constraint alternative.
4094         (zero_extendqihi2): Add constraint alternatives for not in place
4095         extend.
4096         (zero_extendhisi2): Remove.
4097         (shift patterns): Add CC handling variants.
4098         (bswaphi2): New.
4099         (bswapsi2): New.
4100         (rothi3): New.
4101         (define_peephole2): New peephole to recognize mov that sets CC for
4102         subsequent test.
4104 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4106         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
4107         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
4108         wi::add.
4110 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
4112         PR c/86420
4113         * real.c (real_nextafter): Return true if result is denormal.
4115 2018-07-09  Martin Liska  <mliska@suse.cz>
4117         * common.opt: Add back wrongly removed attribute.
4119 2018-07-09  Richard Biener  <rguenther@suse.de>
4121         PR debug/86413
4122         * dwarf2out.c (gen_block_die): For an early generated DIE
4123         always output high/low PC attributes.
4125 2018-07-09  Tom de Vries  <tdevries@suse.de>
4127         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
4128         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
4129         onto VAR_DECL with abstract origin.
4131 2018-07-07  Jim Wilson  <jimw@sifive.com>
4133         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
4135 2018-07-07  Tom de Vries  <tdevries@suse.de>
4137         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
4139 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
4141         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
4142         overflow_type.
4143         (combine_bound): Use wide-int overflow calculation instead of
4144         rolling our own.
4145         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
4146         overflow_type.
4147         * fold-const.c (int_const_binop_2): Same.
4148         (extract_muldiv_1): Same.
4149         (fold_div_compare): Same.
4150         (fold_abs_const): Same.
4151         * match.pd: Same.
4152         * poly-int.h (add): Same.
4153         (sub): Same.
4154         (neg): Same.
4155         (mul): Same.
4156         * predict.c (predict_iv_comparison): Same.
4157         * profile-count.c (slow_safe_scale_64bit): Same.
4158         * simplify-rtx.c (simplify_const_binary_operation): Same.
4159         * tree-chrec.c (tree_fold_binomial): Same.
4160         * tree-data-ref.c (split_constant_offset_1): Same.
4161         * tree-if-conv.c (idx_within_array_bound): Same.
4162         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
4163         * tree-ssa-phiopt.c (minmax_replacement): Same.
4164         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
4165         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
4166         * vr-values.c (vr_values::adjust_range_with_scev): Same.
4167         * wide-int.cc (wi::add_large): Same.
4168         (wi::mul_internal): Same.
4169         (wi::sub_large): Same.
4170         (wi::divmod_internal): Same.
4171         * wide-int.h: Change overflow type to overflow_type for neg, add,
4172         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
4173         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
4174         mul_internal, divmod_internal.
4175         (overflow_type): New enum.
4176         (accumulate_overflow): New.
4178 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
4180         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
4181         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
4183 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4185         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
4186         argument is checked for zero before entering loop, avoid checking again.
4188 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
4190         * gimplify.h (generic_expr_could_trap_p): Set as global function.
4191         * gimplify.h (generic_expr_could_trap_p): Likwise.
4192         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
4194 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
4196         PR tree-optimization/86401
4197         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
4198         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
4199         (fold_bit_and_mask): ... here.  New helper function for match.pd.
4200         * fold-const.h (fold_bit_and_mask): Declare.
4201         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
4203 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
4205         PR target/86324
4206         * target.def (translate_mode_attribute): New hook.
4207         * targhooks.h (default_translate_mode_attribute): Declare.
4208         * targhooks.c (default_translate_mode_attribute): New function.
4209         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
4210         * doc/tm.texi: Regenerate.
4211         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
4212         (rs6000_translate_mode_attribute): New function.
4214 2018-07-06  Paul Koning  <ni1d@arrl.net>
4216         * doc/md.texi (define_split): Document DONE and FAIL.
4217         (define_peephole2): Ditto.
4219 2018-07-05  Jeff Law  <law@redhat.com>
4221         PR tree-optimization/86010
4222         * tree-ssa-dse.c (compute_trims): More aggressively trim at
4223         both the head and tail of mem* and str* calls.
4225 2018-07-05  Jim Wilson  <jimw@sifive.com>
4227         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
4229 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
4231         * config/aarch64/aarch64-simd.md: correct flags text for
4232         MIN_EXPR replacement.
4234 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
4236         * configure: Regenerated.
4238 2018-07-05  Carl Love  <cel@us.ibm.com>
4240         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
4241         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
4242         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
4243         VSX_BUILTIN_DOUBLEL_V4SF.
4245 2018-07-05  Martin Sebor  <msebor@redhat.com>
4247         PR c++/86400
4248         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
4249         than its domain to compute its the upper bound of a char array.
4251 2018-07-05  Nathan Sidwell  <nathan@acm.org>
4253         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
4254         * doc/cpp.texi: Update comment.
4255         * doc/tm.texi: Rebuilt.
4256         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
4257         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
4258         * doc/extend.texi (Backwards Compatibility): Clarify it is system
4259         headers affected by extern "C".
4260         * system.h: Poison NO_IMPLICIT_EXTERN_C.
4261         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
4262         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
4263         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
4264         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
4265         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
4266         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
4267         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
4268         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
4269         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
4270         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
4271         config/sparc/sp64-elf.h, config/spu/spu.h,
4272         config/stormy16/stormy16.h, config/v850/v850.h,
4273         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
4274         define NO_IMPLICIT_EXTERN_C.
4275         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
4277 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4279         PR target/84711
4280         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4281         instead of GET_MODE_SIZE when comparing Units.
4283 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4285         PR target/84711
4286         * rtlanal.c (set_noop_p): Constrain on mode change,
4287         include hard-reg-set.h
4289 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
4291         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
4293 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
4295         Revert
4296         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4298         PR sanitizer/84250
4299         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4300         libasan.
4301         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4303 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
4305         PR sanitizer/84250
4306         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
4307         libasan.
4308         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
4310 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
4312         PR middle-end/86380
4313         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
4315 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
4317         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
4318         neg_*_op* variables.
4320 2018-07-04  Martin Liska  <mliska@suse.cz>
4322         * tree-switch-conversion.c: Define
4323         max_ratio_for_speed and max_ratio_for_size constants.
4325 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4326             Martin Liska  <mliska@suse.cz>
4328         PR middle-end/66240
4329         PR target/45996
4330         PR c/84100
4331         * common.opt: Rename align options with 'str_' prefix.
4332         * common/config/i386/i386-common.c (set_malign_value): New
4333         function.
4334         (ix86_handle_option): Use it to set -falign-* options/
4335         * config/aarch64/aarch64-protos.h (struct tune_params): Change
4336         type from int to string.
4337         * config/aarch64/aarch64.c: Update default values from int
4338         to string.
4339         * config/alpha/alpha.c (alpha_override_options_after_change):
4340         Likewise.
4341         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
4342         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4343         max skip conditionally.
4344         * config/i386/freebsd.h (SUBALIGN_LOG): New.
4345         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4346         max skip conditionally.
4347         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4348         max skip conditionally.
4349         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
4350         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4351         max skip conditionally.
4352         * config/i386/i386.c (struct ptt): Change type from int to
4353         string.
4354         (ix86_default_align): Set default values.
4355         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
4356         max skip conditionally.
4357         * config/i386/iamcu.h (SUBALIGN_LOG): New.
4358         (ASM_OUTPUT_MAX_SKIP_ALIGN):
4359         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
4360         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4361         max skip conditionally.
4362         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
4363         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
4364         * config/i386/x86-64.h (SUBALIGN_LOG): New.
4365         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
4366         max skip conditionally.
4367         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4368         * config/ia64/ia64.c (ia64_option_override): Set default values
4369         for alignment options.
4370         * config/m68k/m68k.c: Handle new str_align_* options.
4371         * config/mips/mips.c (mips_set_compression_mode): Change
4372         type of constants.
4373         (mips_option_override): Set default values for options.
4374         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4375         Likewise.
4376         * config/rs6000/rs6000.c (rs6000_option_override_internal):
4377         Likewise.
4378         * config/rx/rx.c (rx_option_override): Likewise.
4379         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
4380         (LABEL_ALIGN): Use align_labels_log.
4381         (LOOP_ALIGN): Use align_loops_align.
4382         * config/s390/s390.c (s390_asm_output_function_label): Use new
4383         macros.
4384         * config/sh/sh.c (sh_override_options_after_change):
4385         Change type of constants.
4386         * config/spu/spu.c (spu_sched_init): Likewise.
4387         * config/sparc/sparc.c (sparc_option_override): Set default
4388         values for options.
4389         * config/visium/visium.c (visium_option_override): Likewise.
4390         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
4391         emit p2align format with last argument if it's not needed.
4392         * doc/invoke.texi: Document extended format of -falign-*.
4393         * final.c: Use align_labels alignment.
4394         * flags.h (struct target_flag_state): Change type to use
4395         align_flags.
4396         (struct align_flags_tuple): New.
4397         (struct align_flags): Likewise.
4398         (align_loops_log): Redefine macro to use new types.
4399         (align_loops_max_skip): Redefine macro to use new types.
4400         (align_jumps_log): Redefine macro to use new types.
4401         (align_jumps_max_skip): Redefine macro to use new types.
4402         (align_labels_log): Redefine macro to use new types.
4403         (align_labels_max_skip): Redefine macro to use new types.
4404         (align_functions_log): Redefine macro to use new types.
4405         (align_loops): Redefine macro to use new types.
4406         (align_jumps): Redefine macro to use new types.
4407         (align_labels): Redefine macro to use new types.
4408         (align_functions): Redefine macro to use new types.
4409         (align_functions_max_skip): Redefine macro to use new types.
4410         (align_loops_value): New macro.
4411         (align_jumps_value): New macro.
4412         (align_labels_value): New macro.
4413         (align_functions_value): New macro.
4414         * function.c (invoke_set_current_function_hook): Propagate
4415         alignment values from flags to global variables default in
4416         topleev.h.
4417         * ipa-icf.c (sem_function::equals_wpa): Use
4418         cl_optimization_option_eq instead of memcmp.
4419         * lto-streamer.h (cl_optimization_stream_out): Support streaming
4420         of string types.
4421         (cl_optimization_stream_in): Likewise.
4422         * optc-save-gen.awk: Support strings in cl_optimization.
4423         * opth-gen.awk: Likewise.
4424         * opts.c (finish_options): Remove error checking of invalid
4425         value ranges.
4426         (MAX_CODE_ALIGN): Remove.
4427         (MAX_CODE_ALIGN_VALUE): Likewise.
4428         (parse_and_check_align_values): New function.
4429         (check_alignment_argument): Likewise.
4430         (common_handle_option): Use check_alignment_argument.
4431         * opts.h (parse_and_check_align_values): Declare.
4432         * toplev.c (init_alignments): Remove.
4433         (read_log_maxskip): New.
4434         (parse_N_M): Likewise.
4435         (parse_alignment_opts): Likewise.
4436         (backend_init_target): Remove usage of init_alignments.
4437         * toplev.h (parse_alignment_opts): Declare.
4438         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
4439         argument.
4440         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
4441         * tree.c (cl_option_hasher::equal): New.
4442         * varasm.c: Use new global macros.
4444 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
4446         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
4447         Use a simpler align directive also if MAXSKIP = ALIGN-1.
4448         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4449         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4450         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4451         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
4452         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
4453         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
4454         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
4455         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4456         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4457         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4458         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
4460 2018-07-04  Martin Liska  <mliska@suse.cz>
4461             Jonathan Wakely  <jwakely@redhat.com>
4463         * coverage.c: Use correct type.
4464         * doc/invoke.texi: Language correction.
4466 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
4468         PR target/85620
4469         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
4470         ENDBRANCH for non-tail call which may return via indirect branch.
4471         * doc/extend.texi: Document indirect_return attribute.
4473 2018-07-03  Martin Sebor  <msebor@redhat.com>
4475         PR tree-optimization/86274
4476         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
4477         precondition.
4478         (format_floating): Correct handling of infinities and NaNs.
4480 2018-07-03  Martin Sebor  <msebor@redhat.com>
4482         * print-tree.c (print_real_cst): New function.
4483         (print_node_brief): Call it.
4484         (print_node): Ditto.
4486 2018-07-03  Jeff Law  <law@redhat.com>
4488         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
4489         into a single pattern.
4491         * config/h8300/h8300.md (ors code_iterator): New.
4492         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
4493         a single pattern and single splitter.
4494         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
4495         (iorqi3_1, xorqi3_1): Likewise.
4496         (iorqi3, xorqi3 expanders): Similarly.
4498         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
4499         (movmd_internal) into a single pattern using the P mode iterator.
4500         (movmd splitters): Similarly.
4501         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
4502         (movsd splitters): Similarly.
4504         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
4505         ADDB, ADDW and ADDL into a single ADD attribute which selects the
4506         right table based on the size of the operand.
4507         * config/h8300/h8300.md (length_table): Corresponding changes. All
4508         references to "addb", "addw" and "addl" changed to "add".
4509         (btst patterns): Merge two variants into a single pattern.
4510         (tstqi, tsthi): Likewise.
4511         (addhi3_incdec, addsi3_incdec): Likewise.
4512         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
4513         (mulhi3, mulsi3): Likewise.
4514         (udivhi3, udivsi3): Likewise.
4515         (divhi3, divsi3): Likewise.
4516         (andorqi3, andorhi3, andorsi3): Likewise.
4518 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
4520         PR target/85694
4521         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
4522         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
4524 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4526         PR tree-optimization/85694
4527         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
4528         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
4529         UNSPEC_URHADD.
4530         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
4531         (<u>avg<mode>3_ceil): New patterns.
4533 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
4535         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
4536         scan-tree-dump directive.
4537         * gcc.dg/vect/slp-perm-2.c: Likewise.
4538         * gcc.dg/vect/slp-perm-3.c: Likewise.
4539         * gcc.dg/vect/slp-perm-5.c: Likewise.
4540         * gcc.dg/vect/slp-perm-6.c: Likewise.
4541         * gcc.dg/vect/slp-perm-7.c: Likewise.
4542         * gcc.dg/vect/slp-perm-8.c: Likewise.
4544 2018-07-03  Marek Polacek  <polacek@redhat.com>
4546         PR middle-end/86202
4547         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
4549 2018-07-03  Richard Biener  <rguenther@suse.de>
4551         PR ipa/86389
4552         * tree-ssa-structalias.c (find_func_clobbers): Properly
4553         handle indirect calls.
4555 2018-07-03  Jeff Law  <law@redhat.com>
4557         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
4558         (shifts): New code iterator.
4559         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
4560         expander.  Fix HImode handling on H8/SX.
4561         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
4562         (subqi3, subhi3, subsi3 expanders): Likewise.
4563         (andqi3, andhi3, andsi3 expanders): Likewise.
4564         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
4565         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
4566         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
4567         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
4568         (zero_extendqihi2, zero_extendqisi2): Likewise.
4569         (extendqihi2, extendqisi2): Likewise.
4570         (rotlqi3, rotlhi3, rotlsi3): Likewise.
4571         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
4572         (rotlqi3_1, rotlhi3_1): Likewise.
4573         (logicalhi3_sn, logicalsi3_sn): Likewise.
4574         (logicalhi3, logicalsi3): Likewise.
4576 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4578         * tree-vect-patterns.c (vect_recog_rotate_pattern)
4579         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4580         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
4581         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
4582         type to append_pattern_def_seq instead of creating a stmt_vec_info
4583         directly.
4584         (build_mask_conversion): Likewise.  Remove vinfo argument.
4585         (vect_add_conversion_to_patterm): Likewise, renaming to...
4586         (vect_add_conversion_to_pattern): ...this.
4587         (vect_recog_mask_conversion_pattern): Update call to
4588         build_mask_conversion.  Pass the vector type to
4589         append_pattern_def_seq here too.
4590         (vect_recog_gather_scatter_pattern): Update call to
4591         vect_add_conversion_to_pattern.
4593 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4595         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
4596         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4597         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
4598         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
4599         STMT_VINFO_PATTERN_DEF_SEQ to null here.
4600         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
4601         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
4602         append_pattern_def_seq instead of new_pattern_def_seq.
4603         (vect_recog_divmod_pattern): Do both of the above.
4604         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
4605         is null.
4607 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4609         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
4610         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
4611         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
4612         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
4613         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
4614         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4615         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
4616         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
4617         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
4618         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
4619         parameter with a single stmt_vec_info.
4620         (vect_recog_func_ptr): Likewise.
4621         (vect_recog_gather_scatter_pattern): Likewise, folding in...
4622         (vect_try_gather_scatter_pattern): ...this.
4623         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
4624         the stmt_vec_info of the statement to be matched.  Don't clear
4625         STMT_VINFO_RELATED_STMT.
4626         (vect_pattern_recog): Update call accordingly.
4628 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4630         PR tree-optimization/85694
4631         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
4632         (uavgM3_ceil): Document new optabs.
4633         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
4634         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
4635         functions.
4636         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
4637         (savg_ceil_optab): New optabs.
4638         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
4639         (vect_vect_recog_func_ptrs): Add it.
4640         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
4641         constant directly from the associated lhs.
4643 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4645         * tree-vect-patterns.c (vect_split_statement): New function.
4646         (vect_convert_input): Use it to try to split an existing cast.
4648 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4650         * poly-int.h (print_hex): New function.
4651         * dumpfile.h (dump_dec, dump_hex): Declare.
4652         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
4653         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
4654         min_input_precision, operation_precision and operation_sign.
4655         * tree-vect-patterns.c (vect_get_range_info): New function.
4656         (vect_same_loop_or_bb_p, vect_single_imm_use)
4657         (vect_operation_fits_smaller_type): Delete.
4658         (vect_look_through_possible_promotion): Add an optional
4659         single_use_p parameter.
4660         (vect_recog_over_widening_pattern): Rewrite to use new
4661         stmt_vec_info infomration.  Handle one operation at a time.
4662         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
4663         (vect_truncatable_operation_p, vect_set_operation_type)
4664         (vect_set_min_input_precision): New functions.
4665         (vect_determine_min_output_precision_1): Likewise.
4666         (vect_determine_min_output_precision): Likewise.
4667         (vect_determine_precisions_from_range): Likewise.
4668         (vect_determine_precisions_from_users): Likewise.
4669         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
4670         (vect_vect_recog_func_ptrs): Put over_widening first.
4671         Add cast_forwprop.
4672         (vect_pattern_recog): Call vect_determine_precisions.
4674 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
4676         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
4677         statements that have been replaced by further pattern statements.
4678         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
4680 2018-07-03  Richard Biener  <rguenther@suse.de>
4682         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
4683         always set *dt.  Dump vectype in vectype overload.
4684         * dumpfile.h (dump_gimple_expr): New function.
4685         (dump_gimple_expr_loc): Likewise.
4686         * dumpfile.c (dump_gimple_expr): New function.
4687         (dump_gimple_expr_loc): Likewise.
4689 2018-07-02  Jeff Law  <law@redhat.com>
4691         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
4692         the H8/300, H8/300H and H8/S variants into a single pattern.
4693         (movhi_h8300, movqi_h8300hs): Similarly.
4694         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
4695         (QHI mode iterator): New.
4697         * config/h8300/h8300.md: Remove trailing whitespace.
4699 2018-07-02  Jim Wilson  <jimw@sifive.com>
4701         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
4702         instead of emit_insn for interrupt returns.
4703         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
4704         (riscv_sret, riscv_uret): Likewise.
4706 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4708         * pretty-print.c (selftest::test_pp_format): Move save and restore
4709         of quotes to class auto_fix_quotes, and add an instance.
4710         * selftest.c: Include "intl.h".
4711         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
4712         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
4713         * selftest.h (selftest::auto_fix_quotes): New class.
4715 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
4717         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
4718         (aarch64_sve_prepare_conditional_op): Remove.
4719         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
4720         Allow aarch64_simd_reg_or_zero as select operand; remove
4721         the aarch64_sve_prepare_conditional_op call.
4722         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
4723         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4724         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
4725         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
4726         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
4727         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
4728         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
4729         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
4730         and a splitters to match all of the *_any patterns.
4731         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
4733         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
4734         (SVE_COND_FP_BINARY_REV): Remove.
4735         (sve_int_op_rev, sve_fp_op_rev): New.
4736         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
4737         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
4738         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
4739         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
4740         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
4741         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
4742         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
4743         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
4744         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
4746         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
4747         Remove match_dup 1 from the inner unspec.
4748         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
4750         * config/aarch64/aarch64.md (movprfx): New attr.
4751         (length): Default movprfx to 8.
4752         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
4753         (*madd<SVE_I>, *msub<SVE_I): Likewise.
4754         (*<su>mul<SVE_I>3_highpart): Likewise.
4755         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
4756         (*v<ASHIFT><SVE_I>3): Likewise.
4757         (*<su><MAXMIN><SVE_I>3): Likewise.
4758         (*<su><MAXMIN><SVE_F>3): Likewise.
4759         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
4760         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
4761         (*div<SVE_F>4): Likewise.
4763 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
4765         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
4766         in dump string.
4768 2018-07-02  Richard Biener  <rguenther@suse.de>
4770         PR tree-optimization/86363
4771         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
4772         memset argument refers to a non-variable address.
4774 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4776         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
4777         {PLUS,MINUS}_EXPR code to...
4778         (adjust_symbolic_bound): ...here,
4779         (combine_bound): ...here,
4780         (set_value_range_with_overflow): ...and here.
4782 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
4784         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
4785         code...
4786         (extract_range_from_abs_expr): ...here.
4788 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4790         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
4791         -fno-omit-frame-pointer when not optimizing.
4793 2018-07-02  Martin Liska  <mliska@suse.cz>
4795         PR ipa/86279
4796         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
4797         (propagate_nothrow): Likewise.
4799 2018-07-02  Martin Liska  <mliska@suse.cz>
4801         PR ipa/86323
4802         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
4804 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
4806         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
4807         function in r262149, changing "loc" param from source_location to
4808         const dump_location_t &.
4809         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
4810         declaration, as above.
4812 2018-07-01  Paul Koning  <ni1d@arrl.net>
4814         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
4815         -munit-asm, -mgnu-asm, -mdec-asm.
4816         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
4817         (pdp11_output_labelref): New.
4818         (pdp11_output_def): New.
4819         (pdp11_output_addr_vec_elt): New.
4820         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
4821         %# and %@ format codes.
4822         (pdp11_option_override): New.
4823         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
4824         (pdp11_output_ident): New.
4825         (pdp11_asm_named_section): New.
4826         (pdp11_asm_init_sections): New.
4827         (pdp11_file_start): New.
4828         (pdp11_file_end): New.
4829         (output_ascii): Use .ascii/.asciz for -mdec-asm.
4830         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
4831         %o, like %c but octal.
4832         (pdp11_option_override): New.
4833         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
4834         -mdec-asm.
4835         (DATA_SECTION_ASM_OP): Ditto.
4836         (READONLY_DATA_SECTION_ASM_OP): New.
4837         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
4838         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
4839         (ASM_OUTPUT_LABELREF): Ditto.
4840         (ASM_OUTPUT_DEF): Ditto.
4841         (ASM_OUTPUT_EXTERNAL): New.
4842         (ASM_OUTPUT_SOURCE_FILENAME): New.
4843         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
4844         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
4845         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
4846         %# and %@ format codes.
4847         * config/pdp11/pdp11.opt (mgnu-asm): New.
4848         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
4849         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
4850         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
4852 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
4854         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
4855         dereferencing path[] beyond its length.
4856         (debug_path): New.
4857         (debug_all_paths): New.
4858         (rewire_first_differing_edge): New.
4859         (adjust_paths_after_duplication): New.
4860         (duplicate_thread_path): Call adjust_paths_after_duplication.
4861         Add new argument.
4862         (thread_through_all_blocks): Add new argument to
4863         duplicate_thread_path.
4865 2018-06-30  Jim Wilson  <jimw@sifive.com>
4867         * config/riscv/predicates.md (p2m1_shift_operand): New.
4868         (high_mask_shift_operand): New.
4869         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
4870         pattern using p2m1_shift_operand.
4871         (lshsi3_zero_extend_3+2): New combiner pattern using
4872         high_mask_shift_operand.
4874 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4876         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
4877         split out from...
4878         (vect_recog_rotate_pattern): ...here.
4879         (vect_convert_input): Try to insert casts of invariants in the
4880         preheader.
4881         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
4882         preheader to be empty.
4884 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4886         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
4887         vector type.  If given, install it in the new statement's
4888         STMT_VINFO_VECTYPE.
4889         (vect_element_precision): New function.
4890         (vect_unpromoted_value): New struct.
4891         (vect_unpromoted_value::vect_unpromoted_value): New function.
4892         (vect_unpromoted_value::set_op): Likewise.
4893         (vect_look_through_possible_promotion): Likewise.
4894         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
4895         (vect_widened_op_tree, vect_convert_input): Likewise.
4896         (vect_convert_inputs, vect_convert_output): Likewise.
4897         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
4898         to handle the optional cast of the multiplication result and
4899         vect_widened_op_tree to detect the widened multiplication itself.
4900         Do not require the input and output of promotion casts to have
4901         the same sign, but base the signedness of the operation on the
4902         input rather than the result.  If the pattern includes two
4903         promotions, check that those promotions have the same sign.
4904         Do not restrict the MULT_EXPR handling to a double-width result;
4905         handle quadruple-width results and wider.  Use vect_convert_inputs
4906         to convert the inputs to the common type.
4907         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
4908         to handle the optional cast of the ABS result.  Also allow a sign
4909         change or a sign extension between the ABS and MINUS.
4910         Use vect_widened_op_tree to detect the widened subtraction and use
4911         vect_convert_inputs to convert the inputs to the common type.
4912         (vect_handle_widen_op_by_const): Delete.
4913         (vect_recog_widen_op_pattern): New function.
4914         (vect_recog_widen_mult_pattern): Use it.
4915         (vect_recog_widen_shift_pattern): Likewise.
4916         (vect_recog_widen_sum_pattern): Use
4917         vect_look_through_possible_promotion to handle the promoted
4918         PLUS_EXPR operand.
4920 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4922         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
4923         the containing gimple_seq *.
4924         * gimple-iterator.h (gsi_for_stmt): Declare it.
4925         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
4926         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
4927         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
4928         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
4929         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
4930         checks.
4931         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
4932         split out from...
4933         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
4934         statement being replaced is part of an existing pattern
4935         definition sequence, inserting the new pattern statements before
4936         the original one.
4937         (vect_pattern_recog_1): Don't return a bool.  If the statement
4938         is already part of a pattern, instead apply pattern matching
4939         to the pattern definition statements.  Don't clear the
4940         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
4941         (vect_pattern_recog): Don't break after the first match;
4942         continue processing the pattern definition statements instead.
4943         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
4945 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4947         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
4948         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
4949         (vect_recog_widen_sum_pattern): Use it.
4951 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4953         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4954         phi is not a pattern statement and has not been replaced by
4955         a pattern statement.
4956         * tree-vect-patterns.c (type_conversion_p): Don't check
4957         STMT_VINFO_IN_PATTERN_P.
4958         (vect_recog_vector_vector_shift_pattern): Likewise.
4959         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
4960         the pattern statement rather than the original statement; check
4961         directly for a WIDEN_MULT_EXPR here.
4962         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
4963         vect_is_simple_use to return the pattern statement rather
4964         than the original statement; use is_pattern_stmt_p to check
4965         for such a pattern statement.
4966         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
4967         to return the pattern statement rather than the original statement;
4968         don't do the same transformation here.
4969         (vect_is_simple_use): If the defining statement has been replaced
4970         by a pattern statement, return the pattern statement instead.
4971         Remove the corresponding (local) transformation from the vectype
4972         overload.
4974 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
4976         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
4977         end and default to null.
4978         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4979         (vectorizable_reduction): Update calls accordingly, dropping the
4980         gimple ** argument if the passed-back statement isn't needed.
4981         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
4982         (vect_recog_rotate_pattern): Likewise.
4983         (vect_recog_mask_conversion_pattern): Likewise.
4984         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4985         (vect_mask_constant_operand_p): Likewise.
4986         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
4987         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
4988         (get_group_load_store_type, get_load_store_type): Likewise.
4989         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
4990         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
4991         (vectorizable_conversion, vectorizable_assignment): Likewise.
4992         (vectorizable_shift, vectorizable_operation): Likewise.
4993         (vectorizable_store, vect_is_simple_cond): Likewise.
4994         (vectorizable_condition, vectorizable_comparison): Likewise.
4995         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
4996         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
4997         and move it to the end.  Cope with null def_stmt_outs.
4999 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5001         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
5003 2018-06-29  Jeff Law  <law@redhat.com>
5005         * config/v850/v850.c (v850_legitimate_address_p): Handle large
5006         displacements for TARGET_V850E2V3 and newer.
5007         (TARGET_LRA_P): Remove.  Defaults to LRA now.
5008         * config/v850/v850.md (sign23byte_load): Remove.
5009         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
5010         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
5012 2018-06-29  Martin Liska  <mliska@suse.cz>
5014         PR lto/85759
5015         * coverage.c (coverage_init): Mangle full path name.
5016         * doc/invoke.texi: Document the change.
5017         * gcov-io.c (mangle_path): New.
5018         * gcov-io.h (mangle_path): Likewise.
5019         * gcov.c (mangle_name): Use mangle_path for path mangling.
5021 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5023         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
5024         if starting source register is not even.
5026 2018-06-29  Martin Liska  <mliska@suse.cz>
5028         PR tree-optimization/86263
5029         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
5030         Make edge redirection.
5032 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
5034         * dumpfile.c (dump_loc): Add indentation based on scope depth.
5035         (dump_scope_depth): New variable.
5036         (get_dump_scope_depth): New function.
5037         (dump_begin_scope): New function.
5038         (dump_end_scope): New function.
5039         * dumpfile.h (get_dump_scope_depth): New declaration.
5040         (dump_begin_scope): New declaration.
5041         (dump_end_scope): New declaration.
5042         (class auto_dump_scope): New class.
5043         (AUTO_DUMP_SCOPE): New macro.
5044         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
5045         AUTO_DUMP_SCOPE.
5047 2018-06-29  Richard Biener  <rguenther@suse.de>
5049         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
5050         compute_all_dependences succeeds.
5051         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
5052         exceed --param loop-max-datarefs-for-datadeps.
5054 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
5056         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
5058 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
5060         PR target/86348
5061         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
5062         alternative 0 in preferred_for_speed attribute.
5064 2018-06-28  Paul Koning  <ni1d@arrl.net>
5066         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
5067         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
5068         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
5069         * config/pdp11/pdp11.md: Correct "length" attribute calculation
5070         for shift insn patterns.
5072 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
5074         * cgraph.c (cgraph_node::get_body): Replace assignments to
5075         "dump_file" with calls to set_dump_file.
5076         * dumpfile.c (alt_dump_file): Make static, and group with...
5077         (alt_flags): ...this definition.
5078         (dumps_are_enabled): New variable.
5079         (refresh_dumps_are_enabled): New function.
5080         (set_dump_file): New function.
5081         (set_alt_dump_file): New function.
5082         (gcc::dump_manager::dump_start): Replace assignments to
5083         "dump_file" and "alt_dump_file" with calls to set_dump_file and
5084         set_alt_dump_file.
5085         (gcc::dump_manager::dump_finish): Likewise.
5086         * dumpfile.h (alt_dump_file): Delete decl.
5087         (dumps_are_enabled): New variable decl.
5088         (set_dump_file): New function decl.
5089         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
5090         global.
5091         * tree-nested.c (lower_nested_functions): Replace assignments to
5092         "dump_file" with calls to set_dump_file.
5094 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5096         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
5097         goto_locus of each outgoing edge of each basic block.
5099 2018-06-28  Richard Biener  <rguenther@suse.de>
5101         * dwarf2out.c (decl_scope_table): Remove.
5102         (push_decl_scope): Likewise.
5103         (pop_decl_scope): Likewise.
5104         (gen_type_die_for_member): Do not call push/pop_decl_scope.
5105         (gen_struct_or_union_type_die): Likewise.
5106         (gen_tagged_type_die): Likewise.
5107         (dwarf2out_init): Do not initialize decl_scope_table.
5108         (dwarf2out_c_finalize): Do not free it.
5110 2018-06-28  Richard Biener  <rguenther@suse.de>
5112         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
5113         deciding whether to not re-use a DIE.
5115 2018-06-28  Richard Biener  <rguenther@suse.de>
5117         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
5118         DW_AT_abstract_origin attribute.
5120 2018-06-28  Martin Liska  <mliska@suse.cz>
5122         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
5123         Use newly introduced constants.
5124         * tree-switch-conversion.h (struct jump_table_cluster):
5125         Define max_ratio_for_size and max_ratio_for_speed.
5127 2018-06-28  Martin Liska  <mliska@suse.cz>
5129         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5130         Add new checking assert to catch invalid state.
5131         (jump_table_cluster::can_be_handled): Handle single case
5132         clusters.
5133         (jump_table_cluster::is_beneficial): Bail out for such case.
5134         (bit_test_cluster::find_bit_tests):
5135         Add new checking assert to catch invalid state.
5136         (bit_test_cluster::can_be_handled): Handle single case
5137         clusters.
5138         (bit_test_cluster::is_beneficial): Bail out for such case.
5139         (switch_decision_tree::analyze_switch_statement):
5140         Fix comment.
5142 2018-06-28  Martin Liska  <mliska@suse.cz>
5144         * common.opt: Introduce -completion option.
5145         * gcc.c (driver_handle_option): Handle it.
5146         (driver::main): Print completions if completion
5147         is set.
5148         * opt-suggestions.c (option_proposer::get_completions):
5149         New function.
5150         (option_proposer::suggest_completion): Likewise.
5151         (option_proposer::find_param_completions): Likewise.
5152         (verify_autocompletions): Likewise.
5153         (test_completion_valid_options): Likewise.
5154         (test_completion_valid_params): Likewise.
5155         (in_completion_p): Likewise.
5156         (empty_completion_p): Likewise.
5157         (test_completion_partial_match): Likewise.
5158         (test_completion_garbage): Likewise.
5159         (opt_proposer_c_tests): Likewise.
5160         * opt-suggestions.h: Declare new functions.
5161         * opts.c (common_handle_option): Handle OPT__completion_.
5162         * selftest-run-tests.c (selftest::run_tests): Add
5163         opt_proposer_c_tests.
5164         * selftest.c (assert_str_startswith): New.
5165         * selftest.h (assert_str_startswith): Likewise.
5166         (opt_proposer_c_tests): New.
5167         (ASSERT_STR_STARTSWITH): Likewise.
5169 2018-06-28  Martin Liska  <mliska@suse.cz>
5171         * Makefile.in: Add opt-suggestions.o.
5172         * gcc-main.c: Include opt-suggestions.h.
5173         * gcc.c (driver::driver): Likewise.
5174         (driver::~driver): Remove m_option_suggestions.
5175         (driver::build_option_suggestions): Moved to option_proposer.
5176         (driver::suggest_option): Likewise.
5177         (driver::handle_unrecognized_options): Use option_proposer.
5178         * gcc.h (class driver): Add new memver m_option_proposer.
5179         * opt-suggestions.c: New file.
5180         * opt-suggestions.h: New file.
5182 2018-06-28  Martin Liska  <mliska@suse.cz>
5184         * vec.h (class auto_string_vec): New (moved from auto_argvec).
5185         (auto_string_vec::~auto_string_vec): Likewise.
5187 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
5189         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
5190         prevent_decl_creation_for_types fields up and add reset_location field.
5191         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
5192         statement if id->reset_location is true.
5193         (copy_edges_for_bb): Do not set goto_locus on the new edges if
5194         id->reset_location is true.
5195         (copy_phis_for_bb): Force input_location on the arguments if
5196         id->reset_location is true.
5197         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
5198         is set on the function to be inlined.
5200 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
5202         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
5204 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
5206         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
5207         registers for Pmode.
5208         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
5209         hard registers for the clobbered pseudo.
5211 2018-06-27  Paul Koning  <ni1d@arrl.net>
5213         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
5214         mutually exclusive options.
5215         * config/pdp11/constraints.md (h): New constraint.
5216         (O): Update definition to match shift code generation.
5217         (D): New constraint.
5218         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
5219         (CCFP): Remove.
5220         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
5221         function.
5222         (output_jump): Change arguments.
5223         (pdp11_fixed_cc_regs): New function.
5224         (pdp11_cc_mode): Ditto.
5225         (pdp11_expand_shift): Ditto.
5226         (pdp11_assemble_shift): Ditto.
5227         (pdp11_small_shift): Ditto.
5228         (pdp11_branch_cost): Remove.
5229         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
5230         from output.
5231         (pdp11_register_move_cost): Update for CC registers.
5232         (pdp11_rtx_costs): Add case for LSHIFTRT.
5233         (pdp11_output_jump): Add CCNZ mode conditional branches.
5234         (notice_update_cc_on_set): Remove.
5235         (pdp11_cc_mode): New function.
5236         (simple_memory_operand): Correct pre/post decrement case.
5237         (no_side_effect_operand): New function.
5238         (pdp11_regno_reg_class): Add CC_REGS class.
5239         (pdp11_fixed_cc_regs): New function.
5240         (pdp11_small_shift): New function.
5241         (pdp11_expand_shift): New function to expand shift insns.
5242         (pdp11_assemble_shift): New function to output shifts.
5243         (pdp11_branch_cost): Remove.
5244         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
5245         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
5246         (WCHAR_TYPE): Ditto.
5247         (PTRDIFF_TYPE): Ditto.
5248         (ADJUST_INSN_LENGTH): New macro.
5249         (FIXED_REGISTERS): Add CC registers.
5250         (CALL_USED_REGISTERS): Ditto.
5251         (reg_class): Ditto.
5252         (REG_CLASS_NAMES): Ditto.
5253         (REG_CLASS_CONTENTS): Ditto.
5254         (SELECT_CC_MODE): Use new function.
5255         (TARGET_FLAGS_REGNUM): New macro.
5256         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
5257         (cc0_reg_rtx): Remove.
5258         (CC_STATUS_MDEP): Remove.
5259         (CC_STATUS_MDEFP_INIT): Remove.
5260         (CC_IN_FPU): Remove.
5261         (NOTICE_UPDATE_CC): Remove.
5262         (REGISTER_NAMES): Add CC registers.
5263         (BRANCH_COST): Change to constant 1.
5264         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
5265         handling.
5266         * config/pdp11/pdp11.opt (mbcopy): Remove.
5267         (mbcopy-builtin): Remove.
5268         (mbranch-cheap): Remove.
5269         (mbranch-expensive): Remove.
5270         * config/pdp11/predicates.md (expand_shift_operand): Update to
5271         match shift code generation.
5272         (ccnz_operator): New predicate.
5273         * doc/invoke.texi (PDP-11 Options): Remove deleted options
5274         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
5275         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
5276         exclusive options.
5277         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
5278         description of O constraint.
5280 2018-06-27  Jeff Law  <law@redhat.com>
5281             Austin Law  <austinklaw@gmail.com>
5283         * config/v850/v850.md (addsi3_set_flags): New pattern.
5284         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
5285         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
5286         (zero_extendhisi2_v850_set_flags): Likewise.
5287         (zero_extendqisi2_v850_set_flags): Likewise.
5288         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
5289         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
5290         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
5292         * config/v850/v850-protos.h (notice_update_cc): Remove.
5293         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
5294         (v850_print_operand): Handle 'D' and "d".
5295         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
5296         Add handling of arithmetic/logical operations compared against zero.
5297         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
5298         Do not look at v850_compare_op, instead get mode from last argument.
5299         (v850_gen_compare): Remove
5300         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
5301         after reload for prologue insns.
5302         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
5303         patterns.
5304         (construct_save_jarl): Likewise.
5305         (TARGET_FLAGS_REGNUM): Define.
5306         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
5307         (NOTICE_UPDATE_CC): Remove.
5308         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
5309         than cc0.  Conditionalize on reload_completed.
5310         (cmpsi_insn, setfcc_insn): Likewise.
5311         (tst1 splitter): Turn into define_and_split which sets the flags
5312         after reload.
5313         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
5314         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
5315         (cstoresf4, cstoredf4): Clobber the flags.
5316         (cmpsi, cmpsf, cmpdf): Remove expanders.
5317         (setf_insn): Remove pattern.
5318         (addsi3): Turn into define_and_split which clobbers the flags after
5319         reload and a suitable pattern (addsi3_clobber_flags) for use after
5320         reload.
5321         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
5322         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
5323         (ashrsi3, ashrsi3_v850e2): Likewise.
5324         (bins): Clobber the flags.
5325         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
5326         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
5327         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
5328         (call_value_internal_short, call_value_internal_long): Likewise.
5329         (callt_save_interrupt, callt_return_interrupt): Likewise.
5330         (save_interrupt, return_interrupt): Likewise.
5331         (callt_save_all_interrupt, save_all_interrupt): Likewise.
5332         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
5333         (restore_all_interrupt, _restore_all_interrupt): Likewise.
5334         (All FP comparisons): Only allow after reload has completed.
5335         (trfsr): Likewise.
5336         (divh, divhu): Tweak output template.
5337         (branch_z_normal, branch_z_invert): Remove
5338         (branch_nz_normal, branch_nz_invert): Likewise.
5339         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
5341         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
5342         * config/v850/v850.c (notice_update_cc): Remove.
5343         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
5344         (CC_NO_CARRY): Likewise.
5345         (NOTICE_UPDATE_CC): Define to nothing.
5346         * config/v850/v850.md: Remove block comment on cc0 handling
5347         Remove "cc" attribute from all patterns.  Remove cc_status handling
5348         from all patterns.  Minor formatting fixes.
5350 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5352         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
5353         (cortex-a76.cortex-a55): Likewise.
5354         * config/aarch64/aarch64-tune.md: Regenerate.
5355         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
5356         cortex-a76.cortex-a55.
5358 2018-06-27  Jeff Law  <law@redhat.com>
5360         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
5361         (MULTILIB_DIRNAMES): Similarly.
5363 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
5365         * gimple.h (gimple_return_retbnd): Delete.
5366         (gimple_return_set_retbnd): Likewise.
5367         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
5368         gimple_return_set_retbnd.
5369         * gimple-pretty-print.c (dump_gimple_return): Remove call to
5370         gimple_return_retbnd and adjust.
5371         * tree-inline.h (struct copy_body_data): Remove retbnd field.
5372         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
5373         Explicitly return NULL in a couple more cases.  Move assertion
5374         on debug statements and remove unreachable code.
5375         (reset_debug_binding): Do not test id->retbnd.
5376         (expand_call_inline): Do not set it.
5378 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
5380         * configure.ac: Add --disable-gcov option.
5381         * configure: Regenerate.
5382         * Makefile.in: Honour @enable_gcov@.
5383         * doc/install.texi: Document --disable-gcov.
5385 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5387         * config/arm/arm-cpus.in (cortex-a76): New entry.
5388         (cortex-a76.cortex-a55): Likewise.
5389         * config/arm/arm-tables.opt: Regenerate.
5390         * config/arm/arm-tune.md: Likewise.
5391         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
5392         * doc/invoke.texi (ARM Options): Document cortex-a76 and
5393         cortex-a76.cortex-a55.
5395 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
5397         PR target/85769
5398         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
5400 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
5402         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
5403         comment.
5404         (EPILOGUE_USES): Likewise.
5406 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
5408         * tree-inline.c (remap_location): New function extracted from...
5409         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
5410         (copy_phis_for_bb): ...here.  Call remap_location.
5411         (copy_cfg_body): Adjust call to copy_edges_for_bb.
5413 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5415         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
5416         unaligned vsx for 16B memset.
5418 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
5420         PR target/86285
5421         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
5422         ieee128_float_type_node to long_double_type_node unless
5423         TARGET_LONG_DOUBLE_128 is set.
5425 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
5427         * cfgloop.c (get_loop_location): Convert return type from
5428         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
5429         by implicit construction from rtx_insn *, and using
5430         dump_user_location_t::from_function_decl for the fallback case.
5431         * cfgloop.h (get_loop_location): Convert return type from
5432         location_t to dump_user_location_t.
5433         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
5434         dump_printf_loc to pass in a dump_location_t rather than a
5435         location_t, via the gimple stmt.
5436         * coverage.c (get_coverage_counts): Update calls to
5437         dump_printf_loc to pass in dump_location_t rather than a
5438         location_t.
5439         * doc/optinfo.texi (Dump types): Convert example of
5440         dump_printf_loc from taking "locus" to taking "insn".  Update
5441         description of the "_loc" calls to cover dump_location_t.
5442         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
5443         "selftest.h".
5444         (dump_user_location_t::dump_user_location_t): New constructors,
5445         from gimple *stmt and rtx_insn *.
5446         (dump_user_location_t::from_function_decl): New function.
5447         (dump_loc): Make static.
5448         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
5449         const dump_location_t &.
5450         (dump_generic_expr_loc): Delete.
5451         (dump_printf_loc): Convert param "loc" from location_t to
5452         const dump_location_t &.
5453         (selftest::test_impl_location): New function.
5454         (selftest::dumpfile_c_tests): New function.
5455         * dumpfile.h: Include "profile-count.h".
5456         (class dump_user_location_t): New class.
5457         (struct dump_impl_location_t): New struct.
5458         (class dump_location_t): New class.
5459         (dump_printf_loc): Convert 2nd param from source_location to
5460         const dump_location_t &.
5461         (dump_generic_expr_loc): Delete.
5462         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
5463         const dump_location_t &.
5464         * gimple-fold.c (fold_gimple_assign): Update call to
5465         dump_printf_loc to pass in a dump_location_t rather than a
5466         location_t, via the gimple stmt.
5467         (gimple_fold_call): Likewise.
5468         * gimple-loop-interchange.cc
5469         (loop_cand::analyze_iloop_reduction_var): Update for change to
5470         check_reduction_path.
5471         (tree_loop_interchange::interchange): Update for change to
5472         find_loop_location.
5473         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
5474         change in return-type of find_loop_location.
5475         (graphite_regenerate_ast_isl): Likewise.
5476         * graphite-optimize-isl.c (optimize_isl): Likewise.
5477         * graphite.c (graphite_transform_loops): Likewise.
5478         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
5479         pass in a dump_location_t rather than a location_t, via the
5480         gimple stmt.
5481         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
5482         * ipa.c (walk_polymorphic_call_targets): Likewise.
5483         * loop-unroll.c (report_unroll): Convert "locus" param from
5484         location_t to dump_location_t.
5485         (decide_unrolling): Update for change to get_loop_location's
5486         return type.
5487         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
5488         location_t to dump_user_location_t.
5489         (grid_find_single_omp_among_assignments_1): Updates calls to
5490         dump_printf_loc to pass in a dump_location_t rather than a
5491         location_t, via the gimple stmt.
5492         (grid_parallel_clauses_gridifiable): Convert "tloc" from
5493         location_t to dump_location_t.  Updates calls to dump_printf_loc
5494         to pass in a dump_location_t rather than a location_t, via the
5495         gimple stmt.
5496         (grid_inner_loop_gridifiable_p): Likewise.
5497         (grid_dist_follows_simple_pattern): Likewise.
5498         (grid_gfor_follows_tiling_pattern): Likewise.
5499         (grid_target_follows_gridifiable_pattern): Likewise.
5500         (grid_attempt_target_gridification): Convert initialization
5501         of local "grid" from memset to zero-initialization; FIXME: does
5502         this require C++11?  Update call to dump_printf_loc to pass in a
5503         optinfo_location rather than a location_t, via the gimple stmt.
5504         * profile.c (read_profile_edge_counts): Updates call to
5505         dump_printf_loc to pass in a dump_location_t rather than a
5506         location_t
5507         (compute_branch_probabilities): Likewise.
5508         * selftest-run-tests.c (selftest::run_tests): Call
5509         dumpfile_c_tests.
5510         * selftest.h (dumpfile_c_tests): New decl.
5511         * tree-loop-distribution.c (pass_loop_distribution::execute):
5512         Update for change in return type of find_loop_location.
5513         * tree-parloops.c (parallelize_loops): Likewise.
5514         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
5515         "locus" from location_t to dump_user_location_t.
5516         (canonicalize_loop_induction_variables): Likewise.
5517         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
5518         for change in return type of find_loop_location.
5519         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
5520         to dump_printf_loc to pass in a dump_location_t rather than a
5521         location_t, via the stmt.
5522         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
5523         Likewise.
5524         * tree-vect-loop-manip.c (find_loop_location): Convert return
5525         type from source_location to dump_user_location_t.
5526         (vect_do_peeling): Update for above change.
5527         (vect_loop_versioning): Update for change in type of
5528         vect_location.
5529         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
5530         from location_t to dump_user_location_t.
5531         (vect_estimate_min_profitable_iters): Update for change in type
5532         of vect_location.
5533         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
5534         location_t to dump_location_t.
5535         (vect_slp_bb): Update for change in type of vect_location.
5536         * tree-vectorizer.c (vect_location): Convert from source_location
5537         to dump_user_location_t.
5538         (try_vectorize_loop_1): Update for change in vect_location's type.
5539         (vectorize_loops): Likewise.
5540         (increase_alignment): Likewise.
5541         * tree-vectorizer.h (vect_location): Convert from source_location
5542         to dump_user_location_t.
5543         (find_loop_location): Convert return type from source_location to
5544         dump_user_location_t.
5545         (check_reduction_path): Convert 1st param from location_t to
5546         dump_user_location_t.
5547         * value-prof.c (check_counter): Update call to dump_printf_loc to
5548         pass in a dump_user_location_t rather than a location_t; update
5549         call to error_at for change in type of "locus".
5550         (check_ic_target): Update call to dump_printf_loc to
5551         pass in a dump_user_location_t rather than a location_t, via the
5552         call_stmt.
5554 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
5556         * config/s390/s390.h (enum processor_flags): Do not use
5557         default tune parameter when -march was specified.
5559 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
5561         PR target/86314
5562         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
5563         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
5564         operands.
5566 2018-06-26  Richard Biener  <rguenther@suse.de>
5568         PR tree-optimization/86287
5569         PR bootstrap/86316
5570         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
5571         (vect_analyze_loop): Initialize n_stmts.
5573 2018-06-26  Richard Biener  <rguenther@suse.de>
5575         PR middle-end/86271
5576         * fold-const.c (fold_convertible_p): Pointer extension
5577         isn't valid.
5579 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
5581         PR debug/86064
5582         * dwarf2out.c (loc_list_has_views): Adjust comments.
5583         (dw_loc_list): Split single cross-partition range with
5584         nonzero locview.
5586 2018-06-25  Jeff Law  <law@redhat.com>
5588         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
5589         on -mbig-switch by default.
5591         * config/v850/predicates.md (const_float_1_operand): Fix match_code
5592         test.
5593         (const_float_0_operand): Remove unused predicate.
5594         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
5595         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
5596         (recipsf2): New expander.  Original pattern now called
5597         (recipsf2_insn).
5598         (recipdf2, recipdf2_insn): Similarly.
5599         (rsqrtsf2, rsqrtsf2_insn): Similarly
5600         (rsqrtdf2, rsqrtdf2_insn): Similarly
5602 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
5604         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
5605         Simplify logic for FreeBSD (twice).
5607 2018-06-25  Martin Sebor  <msebor@redhat.com>
5609         PR tree-optimization/86204
5610         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
5611         a strnlen result if it's less than the length of the string.
5613 2018-06-25  Martin Sebor  <msebor@redhat.com>
5615         PR tree-optimization/85700
5616         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
5617         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
5618         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
5620 2018-06-25  Martin Sebor  <msebor@redhat.com>
5622         * doc/extend.texi (Zero-length arrays): Update and clarify.
5624 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
5626         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
5627         added IEEE/IBM long double multilib support on PowerPC little
5628         endian Linux systems.
5629         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
5630         (MULTILIB_DEFAULTS): Likewise.
5631         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5632         Likewise.
5633         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
5634         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
5635         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
5637 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
5639         PR middle-end/86311
5640         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
5641         (REORDER_45): Likewise.
5643 2018-06-25  Jeff Law  <law@redhat.com>
5645         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
5646         dividend to 32 bits.  Adjust length.
5647         (udivmodhi4): Cleanup output template.  Fix length.
5649 2018-06-25  Carl Love  <cel@us.ibm.com>
5651         * config/rs6000/vsx.md: Change word selector to prefered location.
5653 2018-06-25  Richard Biener  <rguenther@suse.de>
5655         PR tree-optimization/86304
5656         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
5657         epilogue-if-converted loops as well.
5659 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
5661         * lto-section-out.c (lto_begin_section): Do not print section
5662         name for noaddr and unnumbered dumps.
5664 2018-06-25  Richard Biener  <rguenther@suse.de>
5666         * tree-vectorizer.h (struct vec_info_shared): New structure
5667         with parts split out from struct vec_info and loop_nest from
5668         struct _loop_vec_info.
5669         (struct vec_info): Adjust accordingly.
5670         (struct _loop_vec_info): Likewise.
5671         (LOOP_VINFO_LOOP_NEST): Adjust.
5672         (LOOP_VINFO_DATAREFS): Likewise.
5673         (LOOP_VINFO_DDRS): Likewise.
5674         (struct _bb_vec_info): Likewise.
5675         (BB_VINFO_DATAREFS): Likewise.
5676         (BB_VINFO_DDRS): Likewise.
5677         (struct _stmt_vec_info): Add dr_aux member.
5678         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
5679         (DR_MISALIGNMENT_UNINITIALIZED): New.
5680         (set_dr_misalignment): Adjust.
5681         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
5682         (vect_analyze_loop): Adjust prototype.
5683         (vect_analyze_loop_form): Likewise.
5684         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
5685         Compute dependences lazily.
5686         (vect_record_base_alignments): Use shared datarefs/ddrs.
5687         (vect_verify_datarefs_alignment): Likewise.
5688         (vect_analyze_data_refs_alignment): Likewise.
5689         (vect_analyze_data_ref_accesses): Likewise.
5690         (vect_analyze_data_refs): Likewise.
5691         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
5692         constructor parameter for shared part.
5693         (vect_analyze_loop_form): Pass in shared part and adjust.
5694         (vect_analyze_loop_2): Pass in storage for the number of
5695         stmts.  Move loop nest finding to the caller.  Compute
5696         datarefs lazily.
5697         (vect_analyze_loop): Pass in shared part.
5698         (vect_transform_loop): Verify shared datarefs are unchanged.
5699         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
5700         constructor parameter for shared part.
5701         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
5702         (vect_slp_bb): Verify shared datarefs are unchanged before
5703         transform.
5704         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
5705         change.
5706         (new_stmt_vec_info): Initialize DR_AUX misalignment to
5707         DR_MISALIGNMENT_UNINITIALIZED.
5708         * tree-vectorizer.c (vec_info::vec_info): Add constructor
5709         parameter for shared part.
5710         (vec_info::~vec_info): Adjust.
5711         (vec_info_shared::vec_info_shared): New.
5712         (vec_info_shared::~vec_info_shared): Likewise.
5713         (vec_info_shared::save_datarefs): Likewise.
5714         (vec_info_shared::check_datarefs): Likewise.
5715         (try_vectorize_loop_1): Construct shared part live for analyses
5716         of a single loop for multiple vector sizes.
5717         * tree-parloops.c (gather_scalar_reductions): Adjust.
5719 2018-06-25  Richard Biener  <rguenther@suse.de>
5721         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
5722         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
5723         (vect_analyze_data_refs): Remove similar code from here and
5724         simplify accordingly.
5726 2018-06-25  Richard Biener  <rguenther@suse.de>
5728         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
5729         for reverse storage order accesses rather than asserting
5730         they cannot happen here.
5732 2018-06-25  Tom de Vries  <tdevries@suse.de>
5734         PR debug/86257
5735         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
5736         Use data16 instead of .byte for insn prefix.
5738 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
5740         PR C++/86082
5741         * parser.c (make_char_string_pack): Pass this literal chars
5742         through cpp_interpret_string.
5743         (cp_parser_userdef_numeric_literal): Check the result of
5744         make_char_string_pack.
5746 2018-06-24  Maya Rashish  <coypu@sdf.org>
5748         * ginclude/stddef.h: Simplify conditions around avoiding
5749         re-definition of __size_t.
5751 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5753         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
5754         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
5756 2018-06-22  Maya Rashish  <coypu@sdf.org>
5758         * doc/invoke.texi (mno-fancy-math-387): Update for changes
5759         made to OpenBSD and NetBSD through the years.
5761 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5763         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5764         behavior of vec_pack (vector double, vector double) to match
5765         behavior of vec_float2 (vector double, vector double).
5767 2018-06-22  Olivier Hainque  <hainque@adacore.com>
5769         * gimplify.c (gimplify_function_tree): Prevent creation
5770         of a trampoline for the address of the current function
5771         passed to entry/exit instrumentation hooks.
5773 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
5775         PR target/86222
5776         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
5777         correctly.
5779 2018-06-22  Martin Liska  <mliska@suse.cz>
5781         PR tree-optimization/86263
5782         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
5783         Bail out if is_enabled is false.
5784         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
5785         New declaration.
5786         (jump_table_cluster::is_enabled): New function.
5788 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5790         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5791         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
5792         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
5793         (lto_input_ts_binfo_tree_pointers): Likewise.
5794         * tree-streamer-out.c (streamer_write_tree_bitfields,
5795         write_ts_binfo_tree_pointers): Likewise.
5796         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
5798 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
5800         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
5802 2018-06-22  Martin Liska  <mliska@suse.cz>
5804         * symbol-summary.h (get): Make it pure and inline move
5805         functionality from ::get function.
5806         (get): Remove and inline into ::get and ::get_create.
5807         (get_create): Move code from ::get function.
5809 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5811         PR target/85994
5812         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
5813         -x assembler-with-cpp.
5815 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5817         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
5818         _FILE_OFFSET_BITS=64 for C++.
5820 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
5822         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
5823         conversion insn that shows up when pr85657-3.c is compiled using
5824         IEEE 128-bit long double.
5825         (neg<mode>2_internal): Use the correct mode to check whether the
5826         mode is IBM extended.
5827         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
5828         multiply and divide external functions from being created more
5829         than once.
5831 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5833         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
5834         functions.
5835         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
5836         the edge can be forwarded.
5837         (cfg_layout_merge_blocks): Likewise.
5839 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5841         * except.c (finish_eh_generation): Commit edge insertions only after
5842         the EH edges have been redirected from post-landing to landing pads.
5844 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5846         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
5847         create_tmp_var_for to create the FRAME decl.
5848         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
5850 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
5852         * tree-inline.c (copy_edges_for_bb): Minor tweak.
5853         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
5854         debug statement when resetting its value.
5855         (expand_call_inline): Copy the locus of the call onto the assignment
5856         of the return value, if any.  Use local variable in more cases.
5858 2018-06-21  Martin Liska  <mliska@suse.cz>
5860         * ipa-pure-const.c (propagate_nothrow): Use
5861         funct_state_summaries->get.
5862         (dump_malloc_lattice): Likewise.
5863         (propagate_malloc): Likewise.
5865 2018-06-21  Richard Biener  <rguenther@suse.de>
5867         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
5868         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
5869         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
5870         comment.
5871         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
5872         BLOCK_ABSTRACT_ORIGIN unconditionally.
5874 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
5876         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
5877         deleting it.
5878         * ipa-reference.c (ipa_reference_c_finalize): Delete
5879         ipa_ref_opt_sum_summaries and set it to NULL.
5881 2018-06-21  Tom de Vries  <tdevries@suse.de>
5883         PR tree-optimization/85859
5884         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
5885         test with comment from bb_no_side_effects_p.
5887 2018-06-21  Richard Biener  <rguenther@suse.de>
5889         PR tree-optimization/86232
5890         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
5891         max for constant niter.
5893 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5895         * config/aarch64/aarch64-simd.md
5896         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
5898 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5900         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
5901         Make opernads of the unspec commutative.
5903 2018-06-21  Richard Biener  <rguenther@suse.de>
5905         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
5906         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
5907         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
5908         (vect_analyze_data_ref_dependence): Re-order checks to deal with
5909         NULL DR_STEP.
5910         (vect_record_base_alignments): Do not record base alignment
5911         for gathers or scatters.
5912         (vect_compute_data_ref_alignment): Drop return value that is always
5913         true.  Bail out early for gathers or scatters.
5914         (vect_enhance_data_refs_alignment): Bail out early for gathers
5915         or scatters.
5916         (vect_find_same_alignment_drs): Likewise.
5917         (vect_analyze_data_refs_alignment): Remove dead code.
5918         (vect_slp_analyze_and_verify_node_alignment): Likewise.
5919         (vect_analyze_data_refs): For possible gathers or scatters do
5920         not create an alternate DR, just check their possible validity
5921         and mark them.  Adjust DECL_NONALIASED handling to not rely
5922         on DR_BASE_ADDRESS.
5923         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
5924         update inits of gathers or scatters.
5925         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
5926         Also copy gather/scatter flag to pattern vinfo.
5928 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5930         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
5931         behavior of vec_packsu (vector unsigned long long, vector unsigned
5932         long long) to match behavior of vec_packs with same signature.
5934 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
5935             Thomas Schwinge <thomas@codesourcery.com>
5936             Cesar Philippidis  <cesar@codesourcery.com>
5938         * gimplify.c (gimplify_scan_omp_clauses): Add support for
5939         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5940         (gimplify_adjust_omp_clauses): Likewise.
5941         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
5942         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
5943         (gimplify_omp_target_update): Update handling of acc update and
5944         enter/exit data.
5945         * omp-low.c (install_var_field): Remove unused parameter
5946         base_pointers_restrict.
5947         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
5948         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
5949         FINALIZE}
5950         (omp_target_base_pointers_restrict_p): Delete.
5951         (scan_omp_target): Update call to scan_sharing_clauses.
5952         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
5953         FINALIZE}.
5954         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
5955         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
5956         (convert_local_omp_clauses): Likewise.
5957         * tree-pretty-print.c (dump_omp_clause): Likewise.
5958         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
5959         FINALIZE}.
5960         (omp_clause_code_name): Likewise.
5962 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5964         PR debug/86194
5965         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
5966         be narrowed.
5968         PR tree-optimization/86231
5969         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
5970         anti-range don't overwrite *vr0min before using it to compute *vr0max.
5972 2018-06-20  Tom de Vries  <tdevries@suse.de>
5974         PR tree-optimization/86097
5975         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
5976         iv type if signedness of iv type is not the same as that of *nit.
5978 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
5980         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
5981         EDGE_EH edges, verify they are all EDGE_EH.
5983 2018-06-20  Maya Rashish  <coypu@sdf.org>
5985         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
5987 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5989         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
5990         * config/aarch64/aarch64.c (xgene1_tunings): Add
5991         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
5992         (aarch64_mode_valid_for_sched_fusion_p):
5993         Allow 16-byte modes.
5994         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
5995         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
5996         128-bit modes.
5997         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
5998         New pattern.
5999         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
6000         * config/aarch64/iterators.md (VQ2): New mode iterator.
6002 2018-06-20  Martin Liska  <mliska@suse.cz>
6004         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
6005         Change default ratio from 10 to 8.
6007 2018-06-20  Martin Liska  <mliska@suse.cz>
6009         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
6010         New.
6011         (bit_test_cluster::find_bit_tests): Likewise.
6012         (switch_decision_tree::analyze_switch_statement): Find clusters.
6013         * tree-switch-conversion.h (struct jump_table_cluster): Document
6014         hierarchy.
6016 2018-06-20  Martin Liska  <mliska@suse.cz>
6018         * tree-switch-conversion.c (switch_conversion::collect):
6019         Record m_uniq property.
6020         (switch_conversion::expand): Bail out for special conditions.
6021         (group_cluster::~group_cluster): New.
6022         (group_cluster::group_cluster): Likewise.
6023         (group_cluster::dump): Likewise.
6024         (jump_table_cluster::emit): New.
6025         (switch_decision_tree::fix_phi_operands_for_edges): New.
6026         (struct case_node): Remove struct.
6027         (jump_table_cluster::can_be_handled): New.
6028         (case_values_threshold): Moved to header.
6029         (reset_out_edges_aux): Likewise.
6030         (jump_table_cluster::is_beneficial): New.
6031         (bit_test_cluster::can_be_handled): Likewise.
6032         (add_case_node): Remove.
6033         (bit_test_cluster::is_beneficial): New.
6034         (case_bit_test::cmp): New.
6035         (bit_test_cluster::emit): New.
6036         (expand_switch_as_decision_tree_p): Remove.
6037         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
6038         (fix_phi_operands_for_edge): Likewise.
6039         (switch_decision_tree::analyze_switch_statement): New.
6040         (compute_cases_per_edge): Move ...
6041         (switch_decision_tree::compute_cases_per_edge): ... here.
6042         (try_switch_expansion): Likewise.
6043         (switch_decision_tree::try_switch_expansion): Likewise.
6044         (record_phi_operand_mapping): Likewise.
6045         (switch_decision_tree::record_phi_operand_mapping): Likewise.
6046         (emit_case_decision_tree): Likewise.
6047         (switch_decision_tree::emit): Likewise.
6048         (balance_case_nodes): Likewise.
6049         (switch_decision_tree::balance_case_nodes): Likewise.
6050         (dump_case_nodes): Likewise.
6051         (switch_decision_tree::dump_case_nodes): Likewise.
6052         (emit_jump): Likewise.
6053         (switch_decision_tree::emit_jump): Likewise.
6054         (emit_cmp_and_jump_insns): Likewise.
6055         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
6056         (emit_case_nodes): Likewise.
6057         (switch_decision_tree::emit_case_nodes): Likewise.
6058         (conditional_probability): Remove.
6059         * tree-switch-conversion.h (enum cluster_type): New.
6060         (PRINT_CASE): New.
6061         (struct cluster): Likewise.
6062         (cluster::cluster): Likewise.
6063         (struct simple_cluster): Likewise.
6064         (simple_cluster::simple_cluster): Likewise.
6065         (struct group_cluster): Likewise.
6066         (struct jump_table_cluster): Likewise.
6067         (struct bit_test_cluster): Likewise.
6068         (struct min_cluster_item): Likewise.
6069         (struct case_tree_node): Likewise.
6070         (case_tree_node::case_tree_node): Likewise.
6071         (jump_table_cluster::case_values_threshold): Likewise.
6072         (struct case_bit_test): Likewise.
6073         (struct switch_decision_tree): Likewise.
6074         (struct switch_conversion): Likewise.
6075         (switch_decision_tree::reset_out_edges_aux): Likewise.
6077 2018-06-20  Martin Liska  <mliska@suse.cz>
6079         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
6080         (hoist_edge_and_branch_if_true): Likewise.
6081         (expand_switch_using_bit_tests_p): Likewise.
6082         (struct case_bit_test): Likewise.
6083         (case_bit_test_cmp): Likewise.
6084         (emit_case_bit_tests): Likewise.
6085         (switch_conversion::switch_conversion): New class.
6086         (struct switch_conv_info): Remove old struct.
6087         (collect_switch_conv_info): More to ...
6088         (switch_conversion::collect): ... this.
6089         (check_range): Likewise.
6090         (switch_conversion::check_range): Likewise.
6091         (check_all_empty_except_final): Likewise.
6092         (switch_conversion::check_all_empty_except_final): Likewise.
6093         (check_final_bb): Likewise.
6094         (switch_conversion::check_final_bb): Likewise.
6095         (create_temp_arrays): Likewise.
6096         (switch_conversion::create_temp_arrays): Likewise.
6097         (free_temp_arrays): Likewise.
6098         (gather_default_values): Likewise.
6099         (switch_conversion::gather_default_values): Likewise.
6100         (build_constructors): Likewise.
6101         (switch_conversion::build_constructors): Likewise.
6102         (constructor_contains_same_values_p): Likewise.
6103         (switch_conversion::contains_same_values_p): Likewise.
6104         (array_value_type): Likewise.
6105         (switch_conversion::array_value_type): Likewise.
6106         (build_one_array): Likewise.
6107         (switch_conversion::build_one_array): Likewise.
6108         (build_arrays): Likewise.
6109         (switch_conversion::build_arrays): Likewise.
6110         (gen_def_assigns): Likewise.
6111         (switch_conversion::gen_def_assigns): Likewise.
6112         (prune_bbs): Likewise.
6113         (switch_conversion::prune_bbs): Likewise.
6114         (fix_phi_nodes): Likewise.
6115         (switch_conversion::fix_phi_nodes): Likewise.
6116         (gen_inbound_check): Likewise.
6117         (switch_conversion::gen_inbound_check): Likewise.
6118         (process_switch): Use the newly created class.
6119         (switch_conversion::expand): New.
6120         (switch_conversion::~switch_conversion): New.
6121         * tree-switch-conversion.h: New file.
6123 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6125         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
6126         tree-vect-patterns.c.
6127         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
6128         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
6129         (vect_recog_sad_pattern): Likewise.
6130         (vect_recog_widen_sum_pattern): Likewise.
6131         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
6132         (vect_recog_widen_shift_pattern): Remove the type_in argument.
6133         (vect_recog_rotate_pattern): Likewise.
6134         (vect_recog_mult_pattern): Likewise.
6135         (vect_recog_vector_vector_shift_pattern): Likewise.
6136         (vect_recog_divmod_pattern): Likewise.
6137         (vect_recog_mixed_size_cond_pattern): Likewise.
6138         (vect_recog_bool_pattern): Likewise.
6139         (vect_recog_mask_conversion_pattern): Likewise.
6140         (vect_try_gather_scatter_pattern): Likewise.
6141         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
6142         (vect_recog_over_widening_pattern): Likewise.
6143         (vect_recog_gather_scatter_pattern): Likewise.
6144         (vect_recog_func_ptr): Move from tree-vectorizer.h
6145         (vect_vect_recog_func_ptrs): Move further down the file.
6146         (vect_recog_func): Likewise.  Remove the third argument.
6147         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
6148         (vect_pattern_recog_1): Expect the pattern function to do any
6149         necessary target tests.  Also expect it to provide a vector type.
6150         Remove the type_in handling.
6152 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6154         * tree-vect-patterns.c (vect_pattern_detected): New function.
6155         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
6156         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
6157         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
6158         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
6159         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6160         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6161         (vect_recog_mask_conversion_pattern)
6162         (vect_try_gather_scatter_pattern): Likewise.
6164 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6166         * tree-vect-patterns.c (vect_get_internal_def): New function.
6167         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6168         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
6169         (search_type_for_mask_1): Use it.
6171 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6173         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6174         redundant WIDEN_SUM_EXPR handling.
6175         (vect_recog_sad_pattern): Likewise.
6177 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6179         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
6180         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
6181         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
6182         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
6183         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
6185 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6187         * tree-vect-stmts.c (vectorizable_call): Make sure that we
6188         use the stmt_vec_info of the original bb statement for the
6189         new zero assignment, even if the call is part of a pattern.
6191 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6193         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
6194         that the sequence is attached to the original statement rather
6195         than the pattern statement.
6196         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
6197         PATTERN_DEF_SEQ from the original statement rather than
6198         the main pattern statement.
6199         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
6200         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
6201         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
6203 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
6205         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
6206         definition statements before the early exit for statements that aren't
6207         live or relevant.
6208         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
6209         split out from...
6210         (vect_transform_loop): ...here.  Process pattern definition
6211         statements without first checking whether the main pattern
6212         statement is live or relevant.
6214 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6216         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
6217         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
6219 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
6221         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
6222         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
6223         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
6224         (expand_block_compare): Change select_block_compare_mode call.
6225         (expand_strncmp_align_check): Use new functions, fix comment.
6226         (emit_final_str_compare_gpr): New function.
6227         (expand_strn_compare): Refactor and clean up code.
6228         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
6230 2018-06-19  Tony Reix  <tony.reix@atos.com>
6231             Damien Bergamini  <damien.bergamini@atos.com>
6232             David Edelsohn  <dje.gcc@gmail.com>
6234         * collect2.c (static_obj): New variable.
6235         (static_libs): New variable.
6236         (is_in_list): Uncomment declaration.
6237         (main): Track AIX libraries linked statically.
6238         (is_in_list): Uncomment definition.
6239         (scan_prog_file): Don't add AIX shared libraries initializer
6240         to constructor list if linking statically.
6242 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
6244         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
6245         constant.
6246         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
6248 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
6250         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
6251         blocks.
6253 2018-06-19  Martin Liska  <mliska@suse.cz>
6255         * config/i386/i386.c (ix86_can_inline_p): Do not use
6256         ipa_fn_summaries::get_create.
6257         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
6258         get.
6259         (devirtualization_time_bonus): Likewise.
6260         (ipcp_propagate_stage): Likewise.
6261         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
6262         (edge_set_predicate): Likewise.
6263         (evaluate_conditions_for_known_args): Likewise.
6264         (evaluate_properties_for_edge): Likewise.
6265         (ipa_call_summary::reset): Tranform to ...
6266         (ipa_call_summary::~ipa_call_summary): ... this.
6267         (ipa_fn_summary::reset): Transform to ...
6268         (ipa_fn_summary::~ipa_fn_summary): ... this.
6269         (ipa_fn_summary_t::remove): Rename to ...
6270         (ipa_fn_summary_t::remove_callees): ... this.
6271         (ipa_fn_summary_t::duplicate): Use placement new
6272         instead of memory copy.
6273         (ipa_call_summary_t::duplicate): Likewise.
6274         (ipa_call_summary_t::remove): Remove.
6275         (dump_ipa_call_summary): Change get_create to get.
6276         (ipa_dump_fn_summary): Dump only when summary exists.
6277         (analyze_function_body): Use symbol_summary::get instead
6278         of get_create.
6279         (compute_fn_summary): Likewise.
6280         (estimate_edge_devirt_benefit): Likewise.
6281         (estimate_edge_size_and_time): Likewise.
6282         (inline_update_callee_summaries): Likewise.
6283         (remap_edge_change_prob): Likewise.
6284         (remap_edge_summaries): Likewise.
6285         (ipa_merge_fn_summary_after_inlining): Likewise.
6286         (write_ipa_call_summary): Likewise.
6287         (ipa_fn_summary_write): Likewise.
6288         (ipa_free_fn_summary): Likewise.
6289         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
6290         (struct ipa_call_summary): Likewise.
6291         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
6292         of get_create.
6293         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
6294         (estimate_size_after_inlining): Likewise.
6295         (estimate_growth): Likewise.
6296         (growth_likely_positive): Likewise.
6297         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
6298         (inline_call): Likewise.
6299         * ipa-inline.c (caller_growth_limits): Likewise.
6300         (can_inline_edge_p): Likewise.
6301         (can_inline_edge_by_limits_p): Likewise.
6302         (compute_uninlined_call_time): Likewise.
6303         (compute_inlined_call_time): Likewise.
6304         (want_inline_small_function_p): Likewise.
6305         (edge_badness): Likewise.
6306         (update_caller_keys): Likewise.
6307         (update_callee_keys): Likewise.
6308         (inline_small_functions): Likewise.
6309         (inline_to_all_callers_1): Likewise.
6310         (dump_overall_stats): Likewise.
6311         (early_inline_small_functions): Likewise.
6312         (early_inliner): Likewise.
6313         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
6314         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
6315         * ipa-pure-const.c (malloc_candidate_p): Likewise.
6316         * ipa-split.c (execute_split_functions): Likewise.
6317         * symbol-summary.h: Likewise.
6318         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
6320 2018-06-19  Richard Biener  <rguenther@suse.de>
6322         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
6323         (vectorize_loops): ... here.  Fix dbgcnt handling.
6324         (try_vectorize_loop): Wrap try_vectorize_loop_1.
6326 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
6328         PR target/86197
6329         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
6330         ieee128 argument takes up only one (vector) register, not two (floating
6331         point) registers.
6333 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
6335         * gimplify.c (gimplify_init_constructor): Really never clear for an
6336         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
6338 2018-06-19  Richard Biener  <rguenther@suse.de>
6340         PR tree-optimization/86179
6341         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
6342         after failed recognition.
6344 2018-06-18  Martin Sebor  <msebor@redhat.com>
6346         PR middle-end/85602
6347         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
6348         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
6349         Handle integer subtraction.
6350         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
6351         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
6353 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6355         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
6356         param from rtx to rtx_insn *.
6357         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
6358         param.
6359         (frv_ifcvt_modify_insn): Likwise.
6360         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
6361         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
6362         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
6363         as_a <rtx_insn *> cast to local "unprotected_region" once
6364         it's been established that it's not NULL or pc_rtx.
6365         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
6366         param "sethi" from rtx to rtx_insn *.
6367         (nds32_group_float_insns): Likewise for param "insn".
6368         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
6369         param.
6370         (vax_output_int_subtract): Likewise.
6371         * config/vax/vax.c (vax_output_int_add): Likewise for param
6372         "insn".
6373         (vax_output_int_subtract): Likewise.
6374         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
6375         (emit_pattern_after): Likewise for param "after".
6376         (emit_insn_after): Likewise.
6377         (emit_jump_insn_after): Likewise.
6378         (emit_call_insn_after): Likewise.
6379         (emit_debug_insn_after): Likewise.
6380         (emit_pattern_before): Likewise for param "before".
6381         (emit_insn_before): Likewise.
6382         (emit_jump_insn_before): Likewise.
6383         * final.c (get_insn_template): Likewise for param "insn", removing
6384         a cast.
6385         * output.h (get_insn_template): Likewise for 2nd param.
6386         * rtl.h (emit_insn_before): Likewise.
6387         (emit_jump_insn_before): Likewise.
6388         (emit_debug_insn_before_noloc): Likewise.
6389         (emit_insn_after): Likewise.
6390         (emit_jump_insn_after): Likewise.
6391         (emit_call_insn_after): Likewise.
6392         (emit_debug_insn_after): Likewise.
6393         (set_insn_deleted): Likewise for param.
6395 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
6397         PR target/85358
6398         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
6399         floating point modes, so that IFmode is numerically greater than
6400         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
6401         to declare the ordering.  This prevents IFmode from being
6402         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
6403         machine.  Include rs6000-modes.h to share the fractional values
6404         between genmodes* and the rest of the compiler.
6405         (IFmode): Likewise.
6406         (KFmode): Likewise.
6407         (TFmode): Likewise.
6408         * config/rs6000/rs6000-modes.h: New file.
6409         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
6410         meaning of rs6000_long_double_size so that 126..128 selects an
6411         appropriate 128-bit floating point type.
6412         (rs6000_option_override_internal): Likewise.
6413         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
6414         (TARGET_LONG_DOUBLE_128): Change the meaning of
6415         rs6000_long_double_size so that 126..128 selects an appropriate
6416         128-bit floating point type.
6417         (LONG_DOUBLE_TYPE_SIZE): Update comment.
6418         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
6419         source and destination to match the standard usage.
6420         (truncifkf2): Likewise.
6421         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
6422         ISA 2.07 to use an explicit clobber, instead of passing in a
6423         temporary.
6424         (copysign<mode>3_soft): Likewise.
6426 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
6428         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
6429         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
6430         (vect_slp_analyze_instance_dependence): Likewise.
6431         (vect_enhance_data_refs_alignment): Likewise.
6432         (vect_analyze_data_refs_alignment): Likewise.
6433         (vect_slp_analyze_and_verify_instance_alignment
6434         (vect_analyze_data_ref_accesses): Likewise.
6435         (vect_prune_runtime_alias_test_list): Likewise.
6436         (vect_analyze_data_refs): Likewise.
6437         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
6438         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
6439         (vect_analyze_scalar_cycles_1): Likewise.
6440         (vect_get_loop_niters): Likewise.
6441         (vect_analyze_loop_form_1): Likewise.
6442         (vect_update_vf_for_slp): Likewise.
6443         (vect_analyze_loop_operations): Likewise.
6444         (vect_analyze_loop): Likewise.
6445         (vectorizable_induction): Likewise.
6446         (vect_transform_loop): Likewise.
6447         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
6448         * tree-vect-slp.c (vect_analyze_slp): Likewise.
6449         (vect_make_slp_decision): Likewise.
6450         (vect_detect_hybrid_slp): Likewise.
6451         (vect_slp_analyze_operations): Likewise.
6452         (vect_slp_bb): Likewise.
6453         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
6454         (vectorizable_bswap): Likewise.
6455         (vectorizable_call): Likewise.
6456         (vectorizable_simd_clone_call): Likewise.
6457         (vectorizable_conversion): Likewise.
6458         (vectorizable_assignment): Likewise.
6459         (vectorizable_shift): Likewise.
6460         (vectorizable_operation): Likewise.
6461         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
6463 2018-06-18  Martin Sebor  <msebor@redhat.com>
6465         PR tree-optimization/81384
6466         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
6467         * builtins.c (expand_builtin_strnlen): New function.
6468         (expand_builtin): Call it.
6469         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
6470         * builtins.def (BUILT_IN_STRNLEN): New.
6471         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
6472         Warn for bounds in excess of maximum object size.
6473         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
6474         single-value ranges.  Handle strnlen.
6475         (handle_builtin_strlen): Handle strnlen.
6476         (strlen_check_and_optimize_stmt): Same.
6477         * doc/extend.texi (Other Builtins): Document strnlen.
6479 2018-06-18  Maya Rashish  <coypu@sdf.org>
6481         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
6482         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
6483         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
6485         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
6486         here to ...
6487         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
6489 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6491         * tree.c (escaped_string::escape): Replace cast to char * by
6492         const_cast<char *> (unescaped).
6494 2018-06-18  Nick Clifton  <nickc@redhat.com>
6496         PR 84195
6497         * tree.c (escaped_string): New class.  Converts an unescaped
6498         string into its escaped equivalent.
6499         (warn_deprecated_use): Use the new class to convert the
6500         deprecation message, if present.
6501         (test_escaped_strings): New self test.
6502         (test_c_tests): Add test_escaped_strings.
6503         * doc/extend.texi (deprecated): Add a note that the
6504         deprecation message is affected by the -fmessage-length
6505         option, and that control characters will be escaped.
6506         (#pragma GCC error): Document this pragma.
6507         (#pragma GCC warning): Likewise.
6508         * doc/invoke.texi (-fmessage-length): Document this option's
6509         effect on the #warning and #error preprocessor directives and
6510         the deprecated attribute.
6512 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6514         * tree.c (decl_value_expr_lookup): Revert latest change.
6515         (decl_value_expr_insert): Likewise.
6517 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6519         * gimplify.c (nonlocal_vlas): Delete.
6520         (nonlocal_vla_vars): Likewise.
6521         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
6522         referenced VLAs.
6523         (gimplify_body): Do not create and destroy nonlocal_vlas.
6524         * tree-nested.c: Include diagnostic.h.
6525         (use_pointer_in_frame): Tweak.
6526         (lookup_field_for_decl): Add assertion and declare the transformation.
6527         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
6528         internal error when the reference is in a wrong context.  Do not
6529         create a debug decl by default.
6530         (note_nonlocal_block_vlas): Delete.
6531         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
6532         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
6533         create a debug decl by default.
6534         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
6535         call is in a wrong context.
6536         (fixup_vla_decls): New function.
6537         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
6538         debug variables were created.
6539         * tree.c (decl_value_expr_lookup): Add checking assertion.
6540         (decl_value_expr_insert): Likewise.
6542 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6544         PR middle-end/82479
6545         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
6546         * tree-scalar-evolution.c (interpret_expr): Likewise.
6547         (expression_expensive_p): Likewise.
6548         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
6549         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
6550         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
6551         (ssa_defined_by_minus_one_stmt_p): New.
6553 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
6555         PR middle-end/64946
6556         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
6557         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
6558         * dojump.c (do_jump): Likewise.
6559         * expr.c (expand_expr_real_2): Check operand type's sign.
6560         * fold-const.c (const_unop): Handle ABSU_EXPR.
6561         (fold_abs_const): Likewise.
6562         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
6563         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
6564         (strip_sign_op_1): Likesise.
6565         * match.pd: Add new pattern to generate ABSU_EXPR.
6566         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
6567         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
6568         * tree-eh.c (operation_could_trap_helper_p): Likewise.
6569         * tree-inline.c (estimate_operator_cost): Likewise.
6570         * tree-pretty-print.c (dump_generic_node): Likewise.
6571         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
6572         * tree.def (ABSU_EXPR): New.
6574 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
6576         PR middle-end/86095
6577         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
6578         documented as preserved for backward compatibility only.
6579         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
6581         PR rtl-optimization/86108
6582         * bb-reorder.c (create_forwarder_block): Renamed to ...
6583         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
6584         jump from new landing pad to the second part.
6585         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
6586         Adjust callers.
6588 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
6590         PR middle-end/85878
6591         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
6592         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
6593         Only call store_expr for halves if the mode is the same.
6595         PR middle-end/86123
6596         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
6597         Fix up comment formatting.
6599 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6601         * typed-splay-tree.h (typed_splay_tree::remove): New function.
6602         (typed_splay_tree::closure,
6603         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
6604         (typed_splay_tree::typed_splay_tree,
6605         typed_splay_tree::operator =): Declared private.
6606         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
6607         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
6608         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
6609         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
6610         typed_splay_tree::splay_tree_splay,
6611         typed_splay_tree::splay_tree_foreach_helper,
6612         typed_splay_tree::splay_tree_insert,
6613         typed_splay_tree::splay_tree_remove,
6614         typed_splay_tree::splay_tree_lookup,
6615         typed_splay_tree::splay_tree_predecessor,
6616         typed_splay_tree::splay_tree_successor,
6617         typed_splay_tree::splay_tree_min,
6618         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
6619         (typed_splay_tree::root, typed_splay_tree::comp,
6620         typed_splay_tree::delete_key,
6621         typed_splay_tree::delete_value): New data members.
6622         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
6623         typed_splay_tree::remove.
6625 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
6627         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
6628         -mginv and -mno-ginv to the assembler.
6629         * config/mips/mips.opt (-mcrc): New option.
6630         (-mginv): Likewise.
6631         * doc/invoke.text (-mcrc): Document.
6632         (-mginv): Likewise.
6634 2018-06-15  Nick Clifton  <nickc@redhat.com>
6636         PR 84195
6637         * tree.c (escaped_string): New class.  Converts an unescaped
6638         string into its escaped equivalent.
6639         (warn_deprecated_use): Use the new class to convert the
6640         deprecation message, if present.
6641         (test_escaped_strings): New self test.
6642         (test_c_tests): Add test_escaped_strings.
6643         * doc/extend.texi (deprecated): Add a note that the
6644         deprecation message is affected by the -fmessage-length
6645         option, and that control characters will be escaped.
6646         (#pragma GCC error): Document this pragma.
6647         (#pragma GCC warning): Likewise.
6648         * doc/invoke.texi (-fmessage-length): Document this option's
6649         effect on the #warning and #error preprocessor directives and
6650         the deprecated attribute.
6652 2018-06-15  Richard Biener  <rguenther@suse.de>
6654         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
6655         here, also noting vector size used.
6656         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
6657         size used in MSG_OPTIMIZED_LOCATIONS dump.
6658         (pass_slp_vectorize::execute): Adjust.
6660 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
6662         PR target/85968
6663         * config/arc/arc.c (arc_return_address_register): Fix
6664         if-condition.
6666 2018-06-15  Richard Biener  <rguenther@suse.de>
6668         PR middle-end/86159
6669         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
6670         leave useless conversion stripping to force_gimple_operand_gsi.
6671         (gimplify_build2): Likewise.
6672         (gimplify_build1): Likewise.
6674 2018-06-15  Richard Biener  <rguenther@suse.de>
6676         PR middle-end/86076
6677         * tree-cfg.c (move_stmt_op): unshare invariant addresses
6678         before adjusting their block.
6680 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6682         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
6683         multilibs for *-*-rtems*.
6684         * config/riscv/t-rtems: New file.
6686 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
6688         PR middle-end/86122
6689         * match.pd ((A +- CST1) +- CST2): Punt if last resort
6690         unsigned_type_for returns NULL.
6692         PR target/85945
6693         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
6694         subregs of multi-word pseudos unless the float mode has word size.
6696 2018-06-14  Richard Biener  <rguenther@suse.de>
6698         PR middle-end/86139
6699         * tree-vect-generic.c (build_word_mode_vector_type): Remove
6700         duplicate and harmful type_hash_canon.
6701         * tree.c (type_hash_canon): Assert we didn't find ourselves.
6703 2018-06-14  Richard Biener  <rguenther@suse.de>
6705         PR ipa/86124
6706         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
6707         NULL cgraph_node.
6709 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6711         * config/rtems.h (STDINT_LONG32): Define.
6713 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
6714             Prachi Godbole  <prachi.godbole@imgtec.com>
6716         * config/mips/mips-cpus.def: Define P6600.
6717         * config/mips/mips-tables.opt: Regenerate.
6718         * config/mips/mips.c (mips_ucbranch_type): New enum.
6719         (mips_rtx_cost_data): Add support for P6600.
6720         (mips_issue_rate): Likewise.
6721         (mips_multipass_dfa_lookahead): Likewise.
6722         (mips_avoid_hazard): Likewise.
6723         (mips_reorg_process_insns): Likewise.
6724         (mips_classify_branch_p6600): New function.
6725         * config/mips/mips.h (TUNE_P6600): New define.
6726         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
6727         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
6728         * config/mips/mips.md: Include p6600.md.
6729         (processor): Add p6600.
6730         * config/mips/p6600.md: New file.
6731         * doc/invoke.texi: Add p6600 to supported architectures.
6733 2018-06-13  Martin Sebor  <msebor@redhat.com>
6735         PR tree-optimization/86114
6736         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
6737         of integer types.
6738         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
6740 2018-06-13  Richard Biener  <rguenther@suse.de>
6742         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
6743         Properly set vector type of the intermediate stmt.
6744         * tree-vect-stmts.c (vectorizable_operation): The destination
6745         var always has vectype_out type.
6747 2018-06-13  Jeff Law  <law@redhat.com>
6749         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
6750         integer 0 for argument to print_rtl_with_bb.
6751         (rl78_reorg): Likewise.
6753 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
6755         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
6756         from rtx to rtx_insn *.
6757         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
6758         "label".
6759         (add_sched_insns_for_speculation): Likewise for local "target",
6760         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6761         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
6762         from rtx_insn ** to rtx_code_label **.
6763         (reorg_emit_nops): Likewise.
6764         (c6x_reorg): Likewise for local "call_labels".
6765         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
6766         rtx to rtx_insn *.
6767         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
6768         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
6769         the loops over LABEL_REFS.
6770         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
6771         braf_label.
6772         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
6773         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
6774         (split_branches): Strengthen local "olabel" from rtx to
6775         rtx_insn *, adding a safe_as_a cast.
6776         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
6777         to "rtx_insn *".
6778         (add_insn_after): Likewise for first two params.
6779         (add_insn_before): Likewise.
6780         (remove_insn): Likewise for param.
6781         (emit_pattern_before_noloc): Likewise for second and third params.
6782         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
6783         (emit_call_insn_before_noloc): Likewise.
6784         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
6785         to "rtx_insn *".
6786         (emit_barrier_before): Likewise.
6787         (emit_label_before): Strengthen "label" param from "rtx" to
6788         "rtx_code_label *".  Strengthen "before" param from "rtx" to
6789         "rtx_insn *".
6790         (emit_insn_after_1): Strengthen "after" param from "rtx" to
6791         "rtx_insn *".
6792         (emit_pattern_after_noloc): Likewise.
6793         (emit_insn_after_noloc): Likewise.
6794         (emit_jump_insn_after_noloc): Likewise.
6795         (emit_call_insn_after_noloc): Likewise.
6796         (emit_debug_insn_after_noloc): Likewise.
6797         (emit_barrier_after): Likewise.
6798         (emit_label_after): Likewise for both params.
6799         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
6800         "loc" param from "int" to "location_t".
6801         (emit_insn_after_setloc): Likewise.
6802         (emit_jump_insn_after_setloc): Likewise.
6803         (emit_call_insn_after_setloc): Likewise.
6804         (emit_debug_insn_after_setloc): Likewise.
6805         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
6806         "loc" param from "int" to "location_t".
6807         (emit_pattern_before): Convert NULL_RTX to NULL.
6808         (emit_insn_before_setloc): Convert "loc" param from "int" to
6809         "location_t".
6810         (emit_jump_insn_before_setloc): Likewise.
6811         (emit_call_insn_before_setloc): Likewise.
6812         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
6813         rtx_insn *.  Convert "loc" param from "int" to "location_t".
6814         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
6815         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
6816         Convert 3rd param from "int" to "location_t".
6817         (emit_barrier_before, emit_barrier_after, next_real_insn):
6818         Strengthen param from rtx to rtx_insn *.
6819         (emit_label_before): Strengthen 1st param from "rtx" to
6820         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
6821         "rtx_insn *".
6822         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
6823         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
6824         Strengthen 2nd param from "rtx" to "rtx_insn *".
6825         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
6826         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
6827         Likewise. Convert 3rd param from "int" to "location_t".
6828         (emit_label_after): Strengthen 1st param from "rtx" to
6829         "rtx_code_label *".
6830         (next_real_insn, remove_insn): Strengthen param from "rtx" to
6831         "rtx_insn *".
6832         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
6833         from "rtx" to "rtx_insn *".
6835 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
6837         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
6838         bodies streamed in with -Q.
6839         * dumpfile.c (dump_files): Add lto-stream-out dump file.
6840         * dumpfile.h (tree_dump_index): Add lto_stream_out.
6841         * gimple-streamer-out.c: Include gimple-pretty-print.h
6842         (output_bb): Dump stmts streamed.
6843         * lto-section-out.c: Include print-tree.h
6844         (lto_begin_section): Dump sections created.
6845         (lto_output_decl_index): Dump decl encoded.
6846         * lto-streamer-out.c: Include print-tree.h
6847         (create_output_block): Dump output block created.
6848         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
6849         (output_function): Dump function output.
6850         (output_constructor): Dump constructor streamed.
6851         (write_global_stream): Output indexes encoded.
6852         (produce_asm_for_decls): Dump streams encoded.
6853         * lto-streamer.c (streamer_dump_file): New global var.
6854         * lto-streamer.h (streamer_dump_file): Declare.
6855         * passes.c (ipa_write_summaries): Initialize streamer dump.
6856         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
6857         in.
6859 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
6861         PR target/86048
6862         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
6863         offsets for register save directives.  Emit a second batch of save
6864         directives, if need be, when the function accesses prior frames.
6866 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6868         * config/arc/fpu.md (fmasf4): Force operand to register.
6869         (fnmasf4): Likewise.
6871 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6873         * config/arc/arc-protos.h (arc_pad_return): Remove.
6874         * config/arc/arc.c (machine_function): Remove force_short_suffix
6875         and size_reason.
6876         (arc_print_operand): Adjust printing of '&'.
6877         (arc_verify_short): Remove conditional printing of short suffix.
6878         (arc_final_prescan_insn): Remove reference to size_reason.
6879         (pad_return): New function.
6880         (arc_reorg): Call pad_return.
6881         (arc_pad_return): Remove.
6882         (arc_init_machine_status): Remove reference to force_short_suffix.
6883         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
6884         (attr length): When attribute iscompact is true force to 2
6885         regardless; in the case of maybe check if we want to force the
6886         instruction to have 4 bytes length.
6887         (nopv): Change it to generate 4 byte long nop as well.
6888         (blockage): New pattern.
6889         (simple_return): Remove call to arc_pad_return.
6890         (p_return_i): Likewise.
6892 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6894         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
6896 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6898         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
6899         ARC cores.
6901 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
6903         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
6904         for ARC700 and ARCv2.
6906 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
6908         PR target/86076
6909         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
6910         operands[2] instead of operands[1].
6913 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6915         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
6916         case, check whether the outer register overlaps an unallocatable
6917         register, not just whether it fits the required class.
6919 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
6921         * poly-int.h (can_div_trunc_p): Add new overload in which all values
6922         are poly_ints.
6923         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
6924         (memrefs_conflict_p): Likewise.
6925         (init_alias_analysis): Likewise.
6926         * cfgexpand.c (expand_debug_expr): Likewise.
6927         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
6928         * cse.c (fold_rtx): Likewise.
6929         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
6930         * expr.c (emit_block_move_hints): Likewise.
6931         (clear_storage_hints, push_block, emit_push_insn): Likewise.
6932         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
6933         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
6934         (emit_group_store): Likewise.
6935         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
6936         to read the PRE/POST_MODIFY increment.
6937         * calls.c (store_one_arg): Use strip_offset.
6938         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
6939         poly_int_rtx_p.
6940         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
6941         by a VEC_SELECT.
6942         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
6943         (simplify_binary_operation_1): Extend CONST_INT handling to
6944         poly_int_rtx_p.
6945         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
6946         than a HOST_WIDE_INT.
6947         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
6948         poly_int64.
6949         (adjust_mems, add_stores): Update accodingly.
6950         (vt_canonicalize_addr): Track polynomial offsets.
6951         (emit_note_insn_var_location): Likewise.
6952         (vt_add_function_parameter): Likewise.
6953         (vt_initialize): Likewise.
6955 2018-06-12  Jeff Law  <law@redhat.com>
6957         * config.gcc (alpha*-*-freebsd*): Remove.
6958         * config/alpha/freebsd.h: Remove.
6960 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
6962         PR other/69968
6963         * spellcheck-tree.c (levenshtein_distance): Rename to...
6964         (get_edit_distance): ...this, and update for underlying renaming.
6965         * spellcheck-tree.h (levenshtein_distance): Rename to...
6966         (get_edit_distance): ...this.
6967         * spellcheck.c (levenshtein_distance): Rename to...
6968         (get_edit_distance): ...this.  Convert from Levenshtein distance
6969         to Damerau-Levenshtein distance by supporting transpositions of
6970         adjacent characters.  Rename "v1" to "v_next" and "v0" to
6971         "v_one_ago".
6972         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
6973         (selftest::test_edit_distance_unit_test_oneway): ...this, and
6974         update for underlying renaming.
6975         (selftest::levenshtein_distance_unit_test): Rename to...
6976         (selftest::test_get_edit_distance_unit): ...this, and update for
6977         underlying renaming.
6978         (selftest::test_find_closest_string): Add example from PR 69968
6979         where transposition helps
6980         (selftest::test_metric_conditions): Update for renaming.
6981         (selftest::test_metric_conditions): Likewise.
6982         (selftest::spellcheck_c_tests): Likewise.
6983         * spellcheck.h (levenshtein_distance): Rename both overloads to...
6984         (get_edit_distance): ...this.
6985         (best_match::consider): Update for renaming.
6987 2018-06-12  Martin Sebor  <msebor@redhat.com>
6989         PR tree-optimization/85259
6990         * builtins.c (compute_objsize): Handle constant offsets.
6991         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
6992         true iff a warning has been issued.
6993         * gimple.h (gimple_nonartificial_location): New function.
6994         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
6995         gimple_nonartificial_location and handle -Wno-system-headers.
6996         (handle_builtin_stxncpy): Same.
6998 2018-06-12  Martin Sebor  <msebor@redhat.com>
7000         PR c/85931
7001         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
7003 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
7005         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
7006         BUILTIN_VEC_XST entries for pointer to double and long long.
7008 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
7010         PR target/85990
7011         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7012         Update comments.
7013         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
7014         Likewise.
7016 2018-06-12  Martin Liska  <mliska@suse.cz>
7018         * doc/options.texi: Document IntegerRange.
7020 2018-06-12  Martin Liska  <mliska@suse.cz>
7022         * config/i386/i386.opt: Make MPX-related options as Deprecated.
7023         * opt-functions.awk: Handle Deprecated flag.
7024         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
7025         and report error.
7026         (read_cmdline_option): Report warning for a deprecated option.
7027         * opts.h (struct cl_option): Add new field cl_deprecated.
7028         (CL_ERR_DEPRECATED): New.
7030 2018-06-12  Martin Liska  <mliska@suse.cz>
7032         * doc/options.texi: Document Deprecated option flag.
7034 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7036         * config/arc/arc-arch.h (arc_extras): New enum.
7037         (arc_cpu_t):Add field extra.
7038         (arc_cpu_types): Consider the extras.
7039         * config/arc/arc-cpus.def: Add extras info.
7040         * config/arc/arc-opts.h (processor_type): Consider extra field.
7041         * config/arc/arc.c (arc_override_options): Handle extra field.
7043 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
7045         * config/arc/arc-arch.h: Update ARC_OPTX macro.
7046         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
7047         field.
7048         * config/arc/arc.c (arc_init): Update pic warning.
7049         (irq_range): Update irq range parsing warnings.
7050         (arc_override_options): Update various warning messages.
7051         (arc_handle_aux_attribute): Likewise.
7053 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
7055         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
7057 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7059         * doc/sourcebuild.texi: Document usage of line number 0 in verify
7060         compiler messages directives.
7062 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
7064         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
7065         * config/mips/mips-tables.opt: Regenerate.
7066         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
7067         mips64r6.
7068         * doc/invoke.texi: Document -march=i6500.
7070 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
7072         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
7073         (i6400_gpmul): Add cpu_unit.
7074         (i6400_gpdiv): Likewise.
7075         (i6400_msa_add_d): Update reservations.
7076         (i6400_msa_int_add) Likewise.
7077         (i6400_msa_short_logic3) Likewise.
7078         (i6400_msa_short_logic2) Likewise.
7079         (i6400_msa_short_logic) Likewise.
7080         (i6400_msa_move) Likewise.
7081         (i6400_msa_cmp) Likewise.
7082         (i6400_msa_short_float2) Likewise.
7083         (i6400_msa_div_d) Likewise.
7084         (i6400_msa_long_logic1) Likewise.
7085         (i6400_msa_long_logic2) Likewise.
7086         (i6400_msa_mult) Likewise.
7087         (i6400_msa_long_float2) Likewise.
7088         (i6400_msa_long_float4) Likewise.
7089         (i6400_msa_long_float5) Likewise.
7090         (i6400_msa_long_float8) Likewise.
7091         (i6400_fpu_fadd): Include frint type.
7092         (i6400_fpu_store): New define_insn_reservation.
7093         (i6400_fpu_load): Likewise.
7094         (i6400_fpu_move): Likewise.
7095         (i6400_fpu_fcmp): Likewise.
7096         (i6400_fpu_fmadd): Likewise.
7097         (i6400_int_mult): Include imul3nc type and update reservation.
7098         (i6400_int_div): Include idiv3 type and update reservation.
7099         (i6400_int_load): Update to check type not move_type.
7100         (i6400_int_store): Likewise.
7101         (i6400_int_prefetch): Set zero latency.
7103 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
7105         * gcc.c: Document new %@{...} sequence.
7106         (LINK_COMMAND_SPEC): Use it for the -L switches.
7107         (cpp_unique_options): Use it for the -I switches.
7108         (at_file_argbuf): New global variable.
7109         (in_at_file): Likewise.
7110         (alloc_args): Create at_file_argbuf.
7111         (clear_args): Truncate at_file_argbuf.
7112         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
7113         (open_at_file): New function.
7114         (close_at_file): Likewise.
7115         (create_at_file): Delete.
7116         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
7117         <'o'>: Likewise.
7118         <'@'>: New case.
7119         (validate_switches_from_spec): Deal with %@{...} sequence.
7120         (validate_switches): Likewise.
7121         (driver::finalize): Call clear_args.
7123 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
7125         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
7127 2018-06-11  Martin Sebor  <msebor@redhat.com>
7129         * doc/invoke.texi (-Wall): List -Wc++17-compat.
7130         (Wno-class-memaccess): Add @opindex.
7131         (Wno-templates, Wno-multiple-inheritance): Same.
7132         (Wno-virtual-inheritance, Wno-namespaces): Same.
7133         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
7134         (Wno-format-overflow, Wno-format-truncation): Same.
7135         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
7136         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
7137         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
7138         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
7139         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
7140         (Wno-misspelled-isr): Same.
7142 2018-06-11  Martin Sebor  <msebor@redhat.com>
7144         * PR tree-optimization/86083
7145         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
7147 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
7149         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
7151 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
7153         PR target/85755
7154         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
7155         on the correct operand.
7156         (*movdi_internal64): Ditto.
7158 2018-06-11  Martin Liska  <mliska@suse.cz>
7160         PR tree-optimization/86089
7161         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
7163 2018-06-11  Julia Koval  <julia.koval@intel.com>
7165         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
7166         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
7167         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
7169 2018-06-11  Olivier Hainque  <hainque@adacore.com>
7171         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
7172         for Ada with strict dwarf2.
7174 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
7176         PR target/85755
7177         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
7178         addresses.
7180 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
7182         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
7184 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
7186         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
7187         TARGET_ELF.
7189 2018-06-08  Martin Liska  <mliska@suse.cz>
7191         * tree-cfg.h (debug_function): Fix argument type to match
7192         implementation.
7194 2018-06-08  Martin Liska  <mliska@suse.cz>
7196         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
7197         Remove usage of MPX-related (and removed) fields.
7198         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
7200 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
7202         * cfg.c (debug): Use TDF_NONE rather than 0.
7203         * cfghooks.c (debug): Likewise.
7204         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
7205         (struct dump_option_value_info): Convert to...
7206         (struct kv_pair): ...this template type.
7207         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
7208         rather than 0.
7209         (optinfo_verbosity_options): Likewise.
7210         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
7211         OPTGROUP_NONE.
7212         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
7213         than int for "optgroup_flags" param.
7214         (dump_generic_expr_loc): Use dump_flags_t rather than int for
7215         "dump_kind" param.
7216         (dump_dec): Likewise.
7217         (dump_finish): Use TDF_NONE rather than 0.
7218         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
7219         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
7220         than 0.  Update for change to option_ptr.
7221         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
7222         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
7223         0.  Update for changes to optinfo_verbosity_options and
7224         optgroup_options.
7225         (opt_info_switch_p): Convert optgroup_flags from int to
7226         optgroup_flags_t.
7227         (dump_basic_block): Use dump_flags_t rather than int
7228         for "dump_kind" param.
7229         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
7230         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
7231         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
7232         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
7233         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
7234         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
7235         TDF_NONE): Convert from macros to...
7236         (enum dump_flag): ...this new enum.
7237         (dump_flags_t): Update to use enum.
7238         (operator|, operator&, operator~, operator|=, operator&=):
7239         Implement for dump_flags_t.
7240         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
7241         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
7242         Convert from macros to...
7243         (enum optgroup_flag): ...this new enum.
7244         (optgroup_flags_t): New typedef.
7245         (operator|, operator|=): Implement for optgroup_flags_t.
7246         (struct dump_file_info): Convert field "alt_flags" to
7247         dump_flags_t.  Convert field "optgroup_flags" to
7248         optgroup_flags_t.
7249         (dump_basic_block): Use dump_flags_t rather than int for param.
7250         (dump_generic_expr_loc): Likewise.
7251         (dump_dec): Likewise.
7252         (dump_register): Convert param "optgroup_flags" to
7253         optgroup_flags_t.
7254         (opt_info_enable_passes): Likewise.
7255         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
7256         than 0.
7257         * gimple-pretty-print.c (debug): Likewise.
7258         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
7259         (merged_store_group::apply_stores): Likewise.
7260         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
7261         * gimple.c (verify_gimple_pp): Likewise.
7262         * graphite-poly.c (print_pbb_body): Likewise.
7263         * passes.c (pass_manager::register_one_dump_file): Convert
7264         local "optgroup_flags" to optgroup_flags_t.
7265         * print-tree.c (print_node): Use TDF_NONE rather than 0.
7266         (debug): Likewise.
7267         (debug_body): Likewise.
7268         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
7269         to optgroup_flags_t.
7270         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
7271         than 0.
7272         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
7273         (convert_mult_to_fma): Likewise.
7274         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
7275         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
7276         * tree-vect-data-refs.c (dump_lower_bound): Convert param
7277         "dump_kind" to dump_flags_t.
7279 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7281         * config/rs6000/rs6000.c (min, max): Delete.
7283 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
7285         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
7286         -mabi=spe and -mabi=no-spe.
7288 2018-06-08  Martin Liska  <mliska@suse.cz>
7290         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
7291         where we expect an existing summary.
7293 2018-06-08  Martin Liska  <mliska@suse.cz>
7295         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
7296         * ipa-inline.h (estimate_edge_growth): Likewise.
7298 2018-06-08  Martin Liska  <mliska@suse.cz>
7300         * cgraph.c (function_version_hasher::hash): Use
7301         cgraph_node::get_uid ().
7302         (function_version_hasher::equal):
7303         * cgraph.h (cgraph_node::get_uid): New method.
7304         * ipa-inline.c (update_caller_keys): Use
7305         cgraph_node::get_uid ().
7306         (update_callee_keys): Likewise.
7307         * ipa-utils.c (searchc): Likewise.
7308         (ipa_reduced_postorder): Likewise.
7309         * lto-cgraph.c (input_node): Likewise.
7310         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
7311         * symbol-summary.h (symtab_insertion): Likewise.
7312         (symtab_removal): Likewise.
7313         (symtab_duplication): Likewise.
7314         * tree-pretty-print.c (dump_function_header): Likewise.
7315         * tree-sra.c (convert_callers_for_node): Likewise.
7317 2018-06-08  Martin Liska  <mliska@suse.cz>
7319         * cgraph.c (symbol_table::create_edge): Always assign a new
7320         unique number.
7321         (symbol_table::free_edge): Do not recycle numbers.
7322         * cgraph.h (cgraph_edge::get): New method.
7323         * symbol-summary.h (symtab_removal): Use it.
7324         (symtab_duplication): Likewise.
7325         (call_summary::hashable_uid): Remove.
7327 2018-06-08  Martin Liska  <mliska@suse.cz>
7329         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
7330         (initialize_growth_caches): Remove.
7331         (free_growth_caches): Likewise.
7332         (do_estimate_edge_time): Use edge_growth_cache.
7333         (do_estimate_edge_size): Likewise.
7334         (do_estimate_edge_hints): Likewise.
7335         * ipa-inline.c (reset_edge_caches): Likewise.
7336         (recursive_inlining): Likewise.
7337         (inline_small_functions): Likewise.
7338         * ipa-inline.h (initialize_growth_caches): Remove.
7339         (estimate_edge_size): Likewise.
7340         (estimate_edge_time): Likewise.
7341         (estimate_edge_hints): Likewise.
7342         (reset_edge_growth_cache): Likewise.
7343         * symbol-summary.h (call_summary::remove): New method.
7345 2018-06-08  Martin Liska  <mliska@suse.cz>
7347         * ipa-cp.c (class edge_clone_summary): New summary.
7348         (grow_edge_clone_vectors): Remove.
7349         (ipcp_edge_duplication_hook): Remove.
7350         (class edge_clone_summary_t): New call_summary class.
7351         (ipcp_edge_removal_hook): Remove.
7352         (edge_clone_summary_t::duplicate): New function.
7353         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
7354         (create_specialized_node): Likewise.
7355         (ipcp_driver): Initialize edge_clone_summaries and do not
7356         register hooks.
7358 2018-06-08  Martin Liska  <mliska@suse.cz>
7360         * symbol-summary.h (get): New function.
7361         (call_summary::m_initialize_when_cloning): New class member.
7363 2018-06-08  Martin Liska  <mliska@suse.cz>
7365         * cgraph.c (cgraph_node::remove): Do not recycle uid.
7366         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
7367         (symbol_table::allocate_cgraph_symbol): Do not set uid.
7368         * passes.c (uid_hash_t): Record removed_nodes by their uids.
7369         (remove_cgraph_node_from_order): Use the removed_nodes set.
7370         (do_per_function_toporder): Likwise.
7371         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
7372         instead of summary_uid.
7373         (symtab_removal): Likewise.
7374         (symtab_duplication): Likewise.
7376 2018-06-08  Martin Liska  <mliska@suse.cz>
7378         * ipa-cp.c (ipcp_store_bits_results): Use
7379         ipcp_transformation_sum.
7380         (ipcp_store_vr_results): Likewise.
7381         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
7382         to ...
7383         (ipcp_transformation_initialize): ... this.
7384         (ipa_set_node_agg_value_chain):
7385         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
7386         (write_ipcp_transformation_info): Likewise.
7387         (read_ipcp_transformation_info): Likewise.
7388         (ipcp_update_bits): Likewise.
7389         (ipcp_update_vr): Likewise.
7390         (ipcp_transform_function): Likewise.
7391         * ipa-prop.h: Rename ipcp_transformation_summary to
7392         ipcp_transformation.
7393         (class ipcp_transformation_t): New function summary.
7394         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
7395         (ipa_get_agg_replacements_for_node): Likewise.
7397 2018-06-08  Martin Liska  <mliska@suse.cz>
7399         * ipa-pure-const.c (struct funct_state_d): Do it class instead
7400         of struct.
7401         (class funct_state_summary_t): New function_summary class.
7402         (has_function_state): Remove.
7403         (get_function_state): Likewise.
7404         (set_function_state): Likewise.
7405         (add_new_function): Likewise.
7406         (funct_state_summary_t::insert): New function.
7407         (duplicate_node_data): Remove.
7408         (remove_node_data): Remove.
7409         (funct_state_summary_t::duplicate): New function.
7410         (register_hooks): Create new funct_state_summaries.
7411         (pure_const_generate_summary): Use it.
7412         (pure_const_write_summary): Likewise.
7413         (pure_const_read_summary): Likewise.
7414         (propagate_pure_const): Likewise.
7415         (propagate_nothrow): Likewise.
7416         (dump_malloc_lattice): Likewise.
7417         (propagate_malloc): Likewise.
7418         (execute): Do not register hooks, just remove summary
7419         instead.
7420         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
7421         constructor.
7423 2018-06-08  Martin Liska  <mliska@suse.cz>
7425         * ipa-reference.c (remove_node_data): Remove.
7426         (duplicate_node_data): Likewise.
7427         (class ipa_ref_var_info_summary_t): New class.
7428         (class ipa_ref_opt_summary_t): Likewise.
7429         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
7430         (get_reference_optimization_summary): Use
7431         ipa_ref_opt_sum_summaries.
7432         (set_reference_vars_info): Remove.
7433         (set_reference_optimization_summary): Likewise.
7434         (ipa_init): Create summaries.
7435         (init_function_info): Use function summary.
7436         (ipa_ref_opt_summary_t::duplicate): New function.
7437         (ipa_ref_opt_summary_t::remove): New function.
7438         (get_read_write_all_from_node): Fix GNU coding style.
7439         (propagate): Use function summary.
7440         (write_node_summary_p): Fix GNU coding style.
7441         (stream_out_bitmap): Likewise.
7442         (ipa_reference_read_optimization_summary): Use function summary.
7443         (ipa_reference_c_finalize): Do not release hooks.
7445 2018-06-08  Martin Liska  <mliska@suse.cz>
7447         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
7448         (analyze_function_body): Extract multiple calls of get_create.
7449         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7450         * ipa-inline.c (recursive_inlining): Use ::get method.
7451         * ipa-inline.h (estimate_edge_growth): Likewise.
7453 2018-06-08  Martin Liska  <mliska@suse.cz>
7455         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
7456         HSA_INVALID.
7457         (hsa_function_summary::hsa_function_summary): Use the new enum
7458         value.
7459         (hsa_gpu_implementation_p): Use hsa_summaries::get.
7460         * hsa-gen.c (hsa_get_host_function): Likewise.
7461         (get_brig_function_name): Likewise.
7462         * ipa-hsa.c (process_hsa_functions): Likewise.
7463         (ipa_hsa_write_summary): Likewise.
7464         * symbol-summary.h (symtab_duplication): Use ::get function/
7465         (get): New function.
7467 2018-06-08  Martin Liska  <mliska@suse.cz>
7469         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
7470         of get.
7471         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
7472         (hsa_register_kernel): Likewise.
7473         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
7474         * hsa-gen.c (hsa_get_host_function): Likewise.
7475         (get_brig_function_name): Likewise.
7476         (generate_hsa): Likewise.
7477         (pass_gen_hsail::execute): Likewise.
7478         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
7479         (devirtualization_time_bonus): Likewise.
7480         (ipcp_propagate_stage): Likewise.
7481         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
7482         (edge_set_predicate): Likewise.
7483         (evaluate_conditions_for_known_args): Likewise.
7484         (evaluate_properties_for_edge): Likewise.
7485         (ipa_fn_summary::reset): Likewise.
7486         (ipa_fn_summary_t::duplicate): Likewise.
7487         (dump_ipa_call_summary): Likewise.
7488         (ipa_dump_fn_summary): Likewise.
7489         (analyze_function_body): Likewise.
7490         (compute_fn_summary): Likewise.
7491         (estimate_edge_devirt_benefit): Likewise.
7492         (estimate_edge_size_and_time): Likewise.
7493         (estimate_calls_size_and_time): Likewise.
7494         (estimate_node_size_and_time): Likewise.
7495         (inline_update_callee_summaries): Likewise.
7496         (remap_edge_change_prob): Likewise.
7497         (remap_edge_summaries): Likewise.
7498         (ipa_merge_fn_summary_after_inlining): Likewise.
7499         (ipa_update_overall_fn_summary): Likewise.
7500         (read_ipa_call_summary): Likewise.
7501         (inline_read_section): Likewise.
7502         (write_ipa_call_summary): Likewise.
7503         (ipa_fn_summary_write): Likewise.
7504         (ipa_free_fn_summary): Likewise.
7505         * ipa-hsa.c (process_hsa_functions): Likewise.
7506         (ipa_hsa_write_summary): Likewise.
7507         (ipa_hsa_read_section): Likewise.
7508         * ipa-icf.c (sem_function::merge): Likewise.
7509         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
7510         (do_estimate_edge_time): Likewise.
7511         (estimate_size_after_inlining): Likewise.
7512         (estimate_growth): Likewise.
7513         (growth_likely_positive): Likewise.
7514         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
7515         (inline_call): Likewise.
7516         * ipa-inline.c (caller_growth_limits): Likewise.
7517         (can_inline_edge_p): Likewise.
7518         (can_inline_edge_by_limits_p): Likewise.
7519         (compute_uninlined_call_time): Likewise.
7520         (compute_inlined_call_time): Likewise.
7521         (want_inline_small_function_p): Likewise.
7522         (edge_badness): Likewise.
7523         (update_caller_keys): Likewise.
7524         (update_callee_keys): Likewise.
7525         (recursive_inlining): Likewise.
7526         (inline_small_functions): Likewise.
7527         (inline_to_all_callers_1): Likewise.
7528         (dump_overall_stats): Likewise.
7529         (early_inline_small_functions): Likewise.
7530         (early_inliner): Likewise.
7531         * ipa-inline.h (estimate_edge_growth): Likewise.
7532         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
7533         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7534         * ipa-prop.h (IPA_NODE_REF): Likewise.
7535         (IPA_EDGE_REF): Likewise.
7536         * ipa-pure-const.c (malloc_candidate_p): Likewise.
7537         (propagate_malloc): Likewise.
7538         * ipa-split.c (execute_split_functions): Likewise.
7539         * symbol-summary.h: Rename get to get_create.
7540         (get): Likewise.
7541         (get_create): Likewise.
7542         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
7544 2018-06-08  Martin Liska  <mliska@suse.cz>
7546         * symbol-summary.h (release): Move definition out of class
7547         declaration.
7548         (symtab_removal): Likewise.
7549         (symtab_duplication): Likewise.
7551 2018-06-08  Martin Liska  <mliska@suse.cz>
7553         * symbol-summary.h (function_summary): Move constructor
7554         implementation out of class declaration.
7555         (release): Likewise.
7556         (symtab_insertion): Likewise.
7557         (symtab_removal): Likewise.
7558         (symtab_duplication): Likewise.
7559         (get): Likewise.
7561 2018-06-08  Martin Liska  <mliska@suse.cz>
7563         * Makefile.in: Remove support for MPX (macros, related functions,
7564         fields in cgraph_node, ...).
7565         * builtin-types.def (BT_BND): Likewise.
7566         (BT_FN_BND_CONST_PTR): Likewise.
7567         (BT_FN_CONST_PTR_BND): Likewise.
7568         (BT_FN_VOID_PTR_BND): Likewise.
7569         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
7570         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
7571         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
7572         (expand_builtin_mempcpy_with_bounds): Likewise.
7573         (expand_builtin_memset_with_bounds): Likewise.
7574         (expand_builtin_memset_args): Likewise.
7575         (std_expand_builtin_va_start): Likewise.
7576         (expand_builtin): Likewise.
7577         (expand_builtin_with_bounds): Likewise.
7578         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
7579         (DEF_LIB_BUILTIN_CHKP): Likewise.
7580         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
7581         (DEF_CHKP_BUILTIN): Likewise.
7582         (BUILT_IN_MEMCPY): Likewise.
7583         (BUILT_IN_MEMMOVE): Likewise.
7584         (BUILT_IN_MEMPCPY): Likewise.
7585         (BUILT_IN_MEMSET): Likewise.
7586         (BUILT_IN_STPCPY): Likewise.
7587         (BUILT_IN_STRCAT): Likewise.
7588         (BUILT_IN_STRCHR): Likewise.
7589         (BUILT_IN_STRCPY): Likewise.
7590         (BUILT_IN_STRLEN): Likewise.
7591         (BUILT_IN_MEMCPY_CHK): Likewise.
7592         (BUILT_IN_MEMMOVE_CHK): Likewise.
7593         (BUILT_IN_MEMPCPY_CHK): Likewise.
7594         (BUILT_IN_MEMSET_CHK): Likewise.
7595         (BUILT_IN_STPCPY_CHK): Likewise.
7596         (BUILT_IN_STRCAT_CHK): Likewise.
7597         (BUILT_IN_STRCPY_CHK): Likewise.
7598         * calls.c (store_bounds): Likewise.
7599         (emit_call_1): Likewise.
7600         (special_function_p): Likewise.
7601         (maybe_warn_nonstring_arg): Likewise.
7602         (initialize_argument_information): Likewise.
7603         (finalize_must_preallocate): Likewise.
7604         (compute_argument_addresses): Likewise.
7605         (expand_call): Likewise.
7606         * cfgexpand.c (expand_call_stmt): Likewise.
7607         (expand_return): Likewise.
7608         (expand_gimple_stmt_1): Likewise.
7609         (pass_expand::execute): Likewise.
7610         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
7611         (cgraph_node::remove): Likewise.
7612         (cgraph_node::dump): Likewise.
7613         (cgraph_node::verify_node): Likewise.
7614         * cgraph.h (chkp_function_instrumented_p): Likewise.
7615         (symtab_node::get_alias_target): Likewise.
7616         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
7617         (cgraph_local_p): Likewise.
7618         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
7619         (cgraph_edge::rebuild_references): Likewise.
7620         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
7621         (walk_polymorphic_call_targets): Likewise.
7622         (cgraph_node::expand_thunk): Likewise.
7623         (symbol_table::output_weakrefs): Likewise.
7624         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
7625         (ix86_handle_option): Likewise.
7626         * config/i386/constraints.md: Likewise.
7627         * config/i386/i386-builtin-types.def (BND): Likewise.
7628         (VOID): Likewise.
7629         (PVOID): Likewise.
7630         (ULONG): Likewise.
7631         * config/i386/i386-builtin.def (BDESC_END): Likewise.
7632         (BDESC_FIRST): Likewise.
7633         (BDESC): Likewise.
7634         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
7635         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
7636         * config/i386/i386.c (enum reg_class): Likewise.
7637         (ix86_target_string): Likewise.
7638         (ix86_option_override_internal): Likewise.
7639         (ix86_conditional_register_usage): Likewise.
7640         (ix86_valid_target_attribute_inner_p): Likewise.
7641         (ix86_set_indirect_branch_type): Likewise.
7642         (ix86_set_current_function): Likewise.
7643         (ix86_function_arg_regno_p): Likewise.
7644         (init_cumulative_args): Likewise.
7645         (ix86_function_arg_advance): Likewise.
7646         (ix86_function_arg): Likewise.
7647         (ix86_pass_by_reference): Likewise.
7648         (ix86_function_value_regno_p): Likewise.
7649         (ix86_function_value_1): Likewise.
7650         (ix86_function_value_bounds): Likewise.
7651         (ix86_return_in_memory): Likewise.
7652         (ix86_setup_incoming_vararg_bounds): Likewise.
7653         (ix86_va_start): Likewise.
7654         (indirect_thunk_need_prefix): Likewise.
7655         (print_reg): Likewise.
7656         (ix86_print_operand): Likewise.
7657         (ix86_expand_call): Likewise.
7658         (ix86_output_function_return): Likewise.
7659         (reg_encoded_number): Likewise.
7660         (BDESC_VERIFYS): Likewise.
7661         (ix86_init_mpx_builtins): Likewise.
7662         (ix86_init_builtins): Likewise.
7663         (ix86_emit_cmove): Likewise.
7664         (ix86_emit_move_max): Likewise.
7665         (ix86_expand_builtin): Likewise.
7666         (ix86_builtin_mpx_function): Likewise.
7667         (ix86_get_arg_address_for_bt): Likewise.
7668         (ix86_load_bounds): Likewise.
7669         (ix86_store_bounds): Likewise.
7670         (ix86_load_returned_bounds): Likewise.
7671         (ix86_store_returned_bounds): Likewise.
7672         (ix86_class_likely_spilled_p): Likewise.
7673         (ix86_hard_regno_mode_ok): Likewise.
7674         (x86_order_regs_for_local_alloc): Likewise.
7675         (ix86_mitigate_rop): Likewise.
7676         (ix86_bnd_prefixed_insn_p): Likewise.
7677         (ix86_mpx_bound_mode): Likewise.
7678         (ix86_make_bounds_constant): Likewise.
7679         (ix86_initialize_bounds): Likewise.
7680         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
7681         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
7682         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
7683         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
7684         (TARGET_CHKP_BOUND_MODE): Likewise.
7685         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
7686         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
7687         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
7688         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
7689         * config/i386/i386.h (TARGET_MPX): Likewise.
7690         (TARGET_MPX_P): Likewise.
7691         (VALID_BND_REG_MODE): Likewise.
7692         (FIRST_BND_REG): Likewise.
7693         (LAST_BND_REG): Likewise.
7694         (enum reg_class): Likewise.
7695         (BND_REG_P): Likewise.
7696         (BND_REGNO_P): Likewise.
7697         (BNDmode): Likewise.
7698         (ADJUST_INSN_LENGTH): Likewise.
7699         * config/i386/i386.md: Likewise.
7700         * config/i386/i386.opt: Likewise.
7701         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
7702         (defined): Likewise.
7703         (LINK_MPX): Likewise.
7704         (MPX_SPEC): Likewise.
7705         (LIBMPX_SPEC): Likewise.
7706         (LIBMPXWRAPPERS_SPEC): Likewise.
7707         (CHKP_SPEC): Likewise.
7708         * config/i386/predicates.md: Likewise.
7709         * dbxout.c (dbxout_type): Likewise.
7710         * doc/extend.texi: Likewise.
7711         * doc/invoke.texi: Likewise.
7712         * doc/md.texi: Likewise.
7713         * doc/tm.texi: Likewise.
7714         * doc/tm.texi.in: Likewise.
7715         * dwarf2out.c (is_base_type): Likewise.
7716         (gen_formal_types_die): Likewise.
7717         (gen_subprogram_die): Likewise.
7718         (gen_type_die_with_usage): Likewise.
7719         (gen_decl_die): Likewise.
7720         (dwarf2out_late_global_decl): Likewise.
7721         * expr.c (expand_assignment): Likewise.
7722         (emit_storent_insn): Likewise.
7723         (store_expr_with_bounds): Likewise.
7724         (store_expr): Likewise.
7725         (expand_expr_real_1): Likewise.
7726         * expr.h (store_expr_with_bounds): Likewise.
7727         * function.c (use_register_for_decl): Likewise.
7728         (struct bounds_parm_data): Likewise.
7729         (assign_parms_augmented_arg_list): Likewise.
7730         (assign_parm_find_entry_rtl): Likewise.
7731         (assign_parm_is_stack_parm): Likewise.
7732         (assign_parm_load_bounds): Likewise.
7733         (assign_bounds): Likewise.
7734         (assign_parms): Likewise.
7735         (expand_function_start): Likewise.
7736         * gcc.c (CHKP_SPEC): Likewise.
7737         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
7738         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
7739         (wrestrict_dom_walker::check_call): Likewise.
7740         * gimple.c (gimple_build_call_from_tree): Likewise.
7741         * gimple.h (enum gf_mask): Likewise.
7742         (gimple_call_with_bounds_p): Likewise.
7743         (gimple_call_set_with_bounds): Likewise.
7744         * gimplify.c (gimplify_init_constructor): Likewise.
7745         * ipa-cp.c (initialize_node_lattices): Likewise.
7746         (propagate_constants_across_call): Likewise.
7747         (find_more_scalar_values_for_callers_subset): Likewise.
7748         * ipa-hsa.c (process_hsa_functions): Likewise.
7749         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
7750         * ipa-icf.c (sem_function::merge): Likewise.
7751         * ipa-inline.c (early_inliner): Likewise.
7752         * ipa-pure-const.c (warn_function_noreturn): Likewise.
7753         (warn_function_cold): Likewise.
7754         (propagate_pure_const): Likewise.
7755         * ipa-ref.h (enum GTY): Likewise.
7756         * ipa-split.c (find_retbnd): Likewise.
7757         (consider_split): Likewise.
7758         (split_function): Likewise.
7759         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7760         * ipa.c (walk_polymorphic_call_targets): Likewise.
7761         (symbol_table::remove_unreachable_nodes): Likewise.
7762         (process_references): Likewise.
7763         (cgraph_build_static_cdtor_1): Likewise.
7764         * lto-cgraph.c (lto_output_node): Likewise.
7765         (output_refs): Likewise.
7766         (compute_ltrans_boundary): Likewise.
7767         (input_overwrite_node): Likewise.
7768         (input_node): Likewise.
7769         (input_cgraph_1): Likewise.
7770         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
7771         * passes.c (pass_manager::execute_early_local_passes): Likewise.
7772         (class pass_chkp_instrumentation_passes): Likewise.
7773         (make_pass_chkp_instrumentation_passes): Likewise.
7774         * passes.def: Likewise.
7775         * rtl.h (struct GTY): Likewise.
7776         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
7777         * stor-layout.c (layout_type): Likewise.
7778         * symtab.c: Likewise.
7779         * target.def: Likewise.
7780         * targhooks.c (default_chkp_bound_type): Likewise.
7781         (default_chkp_bound_mode): Likewise.
7782         (default_builtin_chkp_function): Likewise.
7783         (default_chkp_function_value_bounds): Likewise.
7784         (default_chkp_make_bounds_constant): Likewise.
7785         (default_chkp_initialize_bounds): Likewise.
7786         * targhooks.h (default_chkp_bound_type): Likewise.
7787         (default_chkp_bound_mode): Likewise.
7788         (default_builtin_chkp_function): Likewise.
7789         (default_chkp_function_value_bounds): Likewise.
7790         (default_chkp_make_bounds_constant): Likewise.
7791         (default_chkp_initialize_bounds): Likewise.
7792         * toplev.c (compile_file): Likewise.
7793         (process_options): Likewise.
7794         * tree-core.h (DEF_BUILTIN): Likewise.
7795         (DEF_BUILTIN_CHKP): Likewise.
7796         * tree-inline.c (declare_return_variable): Likewise.
7797         (remap_gimple_stmt): Likewise.
7798         (copy_bb): Likewise.
7799         (initialize_inlined_parameters): Likewise.
7800         (expand_call_inline): Likewise.
7801         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
7802         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
7803         (make_pass_ipa_chkp_produce_thunks): Likewise.
7804         (make_pass_chkp): Likewise.
7805         (make_pass_chkp_opt): Likewise.
7806         (make_pass_chkp_instrumentation_passes): Likewise.
7807         * tree-pretty-print.c (dump_generic_node): Likewise.
7808         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
7809         * tree-ssa-dce.c (propagate_necessity): Likewise.
7810         (eliminate_unnecessary_stmts): Likewise.
7811         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
7812         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
7813         * tree-ssa-sccvn.h: Likewise.
7814         * tree-ssa-strlen.c (get_string_length): Likewise.
7815         (valid_builtin_call): Likewise.
7816         (adjust_last_stmt): Likewise.
7817         (handle_builtin_strchr): Likewise.
7818         (handle_builtin_strcpy): Likewise.
7819         (handle_builtin_stxncpy): Likewise.
7820         (handle_builtin_memcpy): Likewise.
7821         (handle_builtin_strcat): Likewise.
7822         (strlen_check_and_optimize_stmt): Likewise.
7823         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
7824         * tree-streamer-in.c: Likewise.
7825         * tree-streamer.c (record_common_node): Likewise.
7826         * tree.c (tree_code_size): Likewise.
7827         (wide_int_to_tree_1): Likewise.
7828         (type_contains_placeholder_1): Likewise.
7829         (build_common_tree_nodes): Likewise.
7830         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
7831         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
7832         (POINTER_BOUNDS_P): Likewise.
7833         (BOUNDED_TYPE_P): Likewise.
7834         (BOUNDED_P): Likewise.
7835         (CALL_WITH_BOUNDS_P): Likewise.
7836         (pointer_bounds_type_node): Likewise.
7837         * value-prof.c (gimple_ic): Likewise.
7838         * var-tracking.c (vt_add_function_parameters): Likewise.
7839         * varasm.c (make_decl_rtl): Likewise.
7840         (assemble_start_function): Likewise.
7841         (output_constant): Likewise.
7842         (maybe_assemble_visibility): Likewise.
7843         * varpool.c (ctor_for_folding): Likewise.
7844         * chkp-builtins.def: Remove.
7845         * ipa-chkp.c: Remove.
7846         * ipa-chkp.h: Remove.
7847         * rtl-chkp.c: Remove.
7848         * rtl-chkp.h: Remove.
7849         * tree-chkp-opt.c: Remove.
7850         * tree-chkp.c: Remove.
7851         * tree-chkp.h: Remove.
7853 2018-06-07  Carl Love  <cel@us.ibm.com>
7855         * config/rs6000/vsx.md (vextract_fp_from_shorth,
7856         vextract_fp_from_shortl): Add BE support.
7858 2018-06-07  Paul Koning  <ni1d@arrl.net>
7860         * compare-elim.c (try_merge_compare): Don't merge compare if
7861         address contains a side effect.
7862         (try_eliminate_compare): Likewise.
7864 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
7866         * config.gcc: Support "tremont".
7867         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
7868         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7869         PROCESSOR_TREMONT.
7870         * config/i386/i386.c (m_TREMONT): Define.
7871         (processor_target_table): Add "tremont".
7872         (PTA_TREMONT): Define.
7873         (ix86_lea_outperforms): Add TARGET_TREMONT.
7874         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
7875         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
7876         and M_INTEL_GOLDMONT_PLUS.
7877         (fold_builtin_cpu): Add "tremont".
7878         (ix86_add_stmt_cost): Add TARGET_TREMONT.
7879         (ix86_option_override_internal): Add "tremont".
7880         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
7881         (processor_type): Add PROCESSOR_TREMONT.
7882         * config/i386/x86-tune.def: Add m_TREMONT.
7883         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
7885 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
7887         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
7888         symbol defined for msp430i* devices to be lower case.
7890 2018-06-07  Richard Biener  <rguenther@suse.de>
7892         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
7893         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
7894         Properly wrap signed arithmetic if overflow wraps.
7896 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
7898         PR tree-optimization/69615
7899         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
7900         of a cast from a same precision integral SSA_NAME in a bb dominated
7901         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
7902         cast to utype if rhs2 has already a compatible type.
7904 2018-06-07  Richard Biener  <rguenther@suse.de>
7906         PR tree-optimization/85935
7907         * graphite-scop-detection.c (find_params_in_bb): Analyze
7908         condition operands with respect to the correct loop.  Assert
7909         the analysis doesn't fail.
7911 2018-06-04  Carl Love  <cel@us.ibm.com>
7913         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
7914         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
7915         as it is slightly cheaper.
7916         (first_match_or_eos_index_<mode>):
7917         Calculate index using natural element order.
7918         (first_match_index_<mode>):
7919         Calculate index using natural element order.
7920         (first_match_or_eos_index_<mode>):
7921         Calculate index using natural order.
7922         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
7923         for BE and LE modes.
7924         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
7925         P9V_BUILTIN_VCLZLSBB_V16QI.
7926         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
7927         specific.
7929 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7931         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
7932         indentation and line wrap for many prototypes.  Add missing
7933         @smallexample directives around block of prototypes for vec_xl and
7934         vec_xst.
7936 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
7938         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
7939         track if we pass or return IEEE 128-bit floating point.
7940         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
7941         C++ mangling that is compatible with GCC 8.1.
7942         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
7943         (init_cumulative_args): Note if we pass or return IEEE 128-bit
7944         floating point types.
7945         (rs6000_function_arg_advance_1): Likewise.
7946         (rs6000_mangle_type): Optionally generate mangled names that match
7947         what GCC 8.1 generated for IEEE 128-bit floating point types.
7948         (rs6000_globalize_decl_name): If we have an external function that
7949         passes or returns IEEE 128-bit types, generate a weak reference
7950         from the mangled name used in GCC 8.1 to the current mangled
7951         name.
7952         (rs6000_init_builtins): Make __ibm128 use the long double type if
7953         long double is IBM extended double.  Make __float128 use the long
7954         double type if long double is IEEE 128-bit.
7956         PR target/85657
7957         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
7958         macro for __ibm128 built-in functions.
7959         (PACK_IF): Add __ibm128 pack/unpack functions.
7960         (UNPACK_IF): Likewise.
7961         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
7962         enable long double built-in functions if long double is IEEE
7963         128-bit floating point.
7964         (rs6000_invalid_builtin): Update long double built-in function
7965         error message.
7966         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
7967         functions, adjust the built-in function to use the long double
7968         built-in function if __ibm128 and long double are the same type.
7969         * doc/extend.texi (PowerPC builtins): Update documention for
7970         __builtin_{,un}pack_longdouble.  Add documentation for
7971         __builtin_{,un}pack_ibm128.
7973 2018-06-06  Jim Wilson  <jimw@sifive.com>
7975         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
7976         (struct machine_function): New field interrupt_mode.
7977         (riscv_handle_type_attribute): New function.  Add forward declaration.
7978         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
7979         (riscv_expand_epilogue): Check interrupt_mode field.
7980         (riscv_set_current_function): Check interrupt attribute args and
7981         set interrupt_mode field.
7982         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
7983         (riscv_sret, riscv_uret): New.
7984         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
7985         new arguments to interrupt attribute.
7987 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
7989         PR target/63177
7990         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
7991         Don't handle -mcpu=power8 if -mpower9-vector is also used.
7993 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7995         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
7996         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
7997         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7998         several redundant entries.
8000 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
8002         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
8003         type from "rtx" to "rtx_insn *".
8004         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
8005         for local "call_insn", removing cast.
8006         (ix86_expand_call): Likewise, introducing a "call_insn" local.
8008 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
8010         PR tree-optimization/86066
8011         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
8012         for BIT_INSERT_EXPR stores.
8014 2018-06-06  Richard Biener  <rguenther@suse.de>
8016         PR tree-optimization/86062
8017         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
8018         component refs ontop
8019         of to be offsetted base.
8021 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8023         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
8024         to be static and remove check on interrupt attribute name.
8026 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8028         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8029         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
8031 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
8033         PR target/79924
8034         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
8035         second argument.
8036         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
8037         Remove second argument, change how error is called.
8038         (aarch64_layout_arg): Remove second argument from
8039         aarch64_err_no_fpadvsimd call.
8040         (aarch64_init_cumulative_args): Ditto.
8041         (aarch64_gimplify_va_arg_expr): Ditto.
8042         * config/aarch64/aarch64.md (mov<mode>): Ditto.
8044 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
8046         * config/i386/i386.md (simple_return_indirect_internal): New expander.
8047         (*simple_return_indirect_internal<mode>): Rename from
8048         simple_return_indirect_internal.  Use W mode iterator.
8049         (rstorssp): New expander.
8050         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
8051         (clrssbsy): New expander.
8052         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
8054 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8056         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
8057         __typeof__.
8058         (cmse_check_pointed_object): Likewise.
8060 2018-06-05  Martin Liska  <mliska@suse.cz>
8062         PR gcov-profile/47618
8063         * doc/invoke.texi: Document how -fprofile-dir format
8064         is extended.
8066 2018-06-05  Richard Biener  <rguenther@suse.de>
8068         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
8069         removal pretend DOM info isn't available so we do not update
8070         it and only remove edges, not dominated blocks.  Actually free
8071         DOM info in case we removed something.  Remove unreachable blocks.
8072         (mfb_keep_latches): Work with either DOM info or marked backedges.
8073         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
8074         first.  Mark backedges if DOM info isn't available.
8075         (Re-)compute DOM info after cleanup_control_flow_pre.
8077 2018-06-05  Richard Biener  <rguenther@suse.de>
8079         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
8080         (locus_discrim_hasher::hash): Adjust.
8081         (locus_discrim_hasher::equal): Likewise.
8082         (next_discriminator_for_locus): Work on line directly.
8083         (same_line_p): Pass in expanded locus1 as well.
8084         (assign_discriminators): Avoid redundant location expansions.
8086 2018-06-05  Richard Biener  <rguenther@suse.de>
8088         PR tree-optimization/86046
8089         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
8090         if required after clearing TREE_ADDRESSABLE.
8092 2018-06-05  Richard Biener  <rguenther@suse.de>
8094         PR tree-optimization/86047
8095         * tree-ssa-loop.c (for_each_index): Glob handling of all
8096         decls and constants and really handle all of them.
8098 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8100         PR target/81497
8101         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
8102         qualifier_void_pointer and qualifier_const_void_pointer.
8103         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
8104         (arm_init_builtins): Handle the above.
8105         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
8106         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
8107         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
8108         void intrinsics.
8110 2018-06-05  Martin Liska  <mliska@suse.cz>
8112         * auto-profile.c (read_autofdo_file): Do not use
8113         gcov_ctr_summary struct.
8114         (afdo_callsite_hot_enough_for_early_inline): Likewise.
8115         * coverage.c (struct counts_entry): Likewise.
8116         (read_counts_file): Read just single summary entry.
8117         (get_coverage_counts): Use gcov_summary struct.
8118         * coverage.h (get_coverage_counts): Likewise.
8119         * gcov-dump.c (dump_working_sets): Likewise.
8120         (tag_summary): Dump just single summary.
8121         * gcov-io.c (gcov_write_summary): Write just histogram
8122         summary.
8123         (gcov_read_summary): Read just single summary.
8124         (compute_working_sets): Use gcov_summary struct.
8125         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
8126         of GCOV_COUNTERS_SUMMABLE.
8127         (GCOV_COUNTERS_SUMMABLE): Remove.
8128         (GCOV_FIRST_VALUE_COUNTER): Replace with
8129         GCOV_COUNTER_V_INTERVAL.
8130         (struct gcov_ctr_summary): Remove.
8131         (struct gcov_summary): Directly use fields of former
8132         gcov_ctr_summary.
8133         (compute_working_sets): Use gcov_summary struct.
8134         * gcov.c (read_count_file): Do not use ctrs fields.
8135         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
8136         struct.
8137         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
8138         struct.
8139         * profile.c: Likewise.
8140         * profile.h: Likewise.
8142 2018-06-05  Martin Liska  <mliska@suse.cz>
8144         PR gcov-profile/84846
8145         * gcov.c (output_lines): Print working directory only
8146         in intermediate format.
8148 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
8150         * config/s390/s390-builtin-types.def: Add void function type.
8151         * config/s390/s390-builtins.def: Use the function type for the
8152         tbeginc builtin.
8154 2018-06-04  Jim Wilson  <jimw@sifive.com>
8156         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
8157         to int.
8158         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
8159         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
8160         handle EH_RETURN_DATA_REGNO registers properly.
8161         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
8162         (riscv_expand_epilogue): Update comment.  Change argument name and
8163         type.  Update code to use new name and type.  Pass new args to
8164         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
8165         EXCEPTION_RETURN.
8166         * config/riscv/riscv.md (NORMAL_RETURN): New.
8167         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
8168         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
8169         (eh_return): Call gen_eh_return_internal and emit barrier.
8170         (eh_return_internal): Call riscv_expand_epilogue.
8172 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
8174         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
8175         bit_insertion field and declare can_be_merged_into method.
8176         (merged_store_group::can_be_merged_into): New method.
8177         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
8178         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
8179         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
8181 2018-06-04  Richard Biener  <rguenther@suse.de>
8183         PR tree-optimization/85955
8184         * builtins.c (fold_builtin_sincos): Convert pointers to
8185         destination to appropriate type before dereferencing.
8187 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
8189         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
8191 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
8193         * expr.c (expand_expr_real_1): Force the operand into memory if
8194         its TYPE_MODE is BLKmode and if there is no integer mode for
8195         the number of bits being extracted.
8197 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8199         PR target/85832
8200         PR target/86036
8201         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
8202         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
8204 2018-06-04  Richard Biener  <rguenther@suse.de>
8206         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
8207         (cleanup_tree_cfg_noloop): ... single caller.  Do
8208         start_recording_case_labels later.
8210 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
8212         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
8213         to _IMMINTRIN_H_INCLUDED.
8214         * config/i386/pconfigintrin.h: Ditto.
8215         * config/i386/waitpkgintrin.h: Ditto.
8216         * config/i386/immintrin.h: Add includes for sgxintrin.h,
8217         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
8218         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
8219         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
8220         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
8221         waitpkgintrin.h and cldemoteintrin.h.
8223 2018-06-04  Richard Biener  <rguenther@suse.de>
8225         PR tree-optimization/86038
8226         * tracer.c (find_best_successor): Check probability for
8227         being initialized, bail out if not.
8229 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
8231         PR target/86003
8232         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
8233         of bits to ignore when comparing architectures.
8235 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
8237         PR tree-optimization/69615
8238         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
8239         maximum or minimum of the type, try to merge it also as if
8240         range1 is + [-, x - 1] or + [x + 1, -].
8242         PR c++/86025
8243         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
8245 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
8247         PR tree-optimization/86034
8248         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
8249         the unsigned bitfield type in a bit insertion sequence if it does not
8250         have a larger precision than the bitfield size.
8251         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
8253 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
8255         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
8257 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8259         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
8260         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
8261         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
8262         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
8264 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
8266         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
8267         Disable -fdelete-null-pointer-checks for ELF toolchain.
8269 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8270             Kito Cheng  <kito.cheng@gmail.com>
8272         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
8273         (nds32le-*-*, nds32be-*-*): Integrate checking process.
8274         (nds32*-*-*): Add glibc and uclibc conditions.
8275         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
8276         (TARGET_EXCEPT_UNWIND_INFO): Define.
8277         * config/nds32/elf.h: New file.
8278         * config/nds32/linux.h: New file.
8279         * config/nds32/nds32-elf.opt: New file.
8280         * config/nds32/nds32-linux.opt: New file.
8281         * config/nds32/nds32-fp-as-gp.c
8282         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
8283         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
8284         TARGET_LINUX_ABI.
8285         (nds32_asm_file_end): Ditto.
8286         (nds32_print_operand): Ditto.
8287         (nds32_insert_attributes): Ditto.
8288         (nds32_init_libfuncs): New function.
8289         (TARGET_HAVE_TLS): Define.
8290         (TARGET_INIT_LIBFUNCS): Define.
8291         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
8292         spec content.
8293         (TARGET_ELF): Apply different mcmodel setting.
8294         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
8295         been migrated into elf.h and linux.h files.
8296         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
8297         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
8298         (mcmodel): The content has been migrated into nds32-elf.opt and
8299         nds32-linux.opt files.
8300         * config/nds32/t-elf: New file.
8301         * config/nds32/t-linux: New file.
8303 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8304             Shiva Chen  <shiva0217@gmail.com>
8306         * config/nds32/constants.md (unspec_volatile_element): Add
8307         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
8308         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
8309         optimization.
8310         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
8311         (make_pass_nds32_fp_as_gp): Declare.
8312         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
8313         optmization pass.
8314         (nds32_asm_function_end_prologue): Remove unused asm output.
8315         (nds32_asm_function_begin_epilogue): Remove unused asm output.
8316         (nds32_asm_file_start): Output necessary fp_as_gp information.
8317         (nds32_option_override): Adjust register usage.
8318         (nds32_expand_prologue): Consider fp_as_gp situation.
8319         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
8320         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
8321         (epilogue): Ditto.
8322         (return): Ditto.
8323         (simple_return): Ditto.
8324         (omit_fp_begin): Output special directive for fp_as_gp.
8325         (omit_fp_end): Output special directive for fp_as_gp.
8326         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
8327         mforbid-fp-as-gp): New options.
8329 2018-06-01  Mark Wielaard  <mark@klomp.org>
8331         * dwarf2out.c (dwarf2out_finish): Remove generation of
8332         DW_AT_loclists_base.
8334 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
8336         * gimple-ssa-store-merging.c: Include gimple-fold.h.
8337         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
8338         (struct merged_store_group): Add bit_insertion field.
8339         (dump_char_array): Use standard hexadecimal format.
8340         (merged_store_group::merged_store_group): Set bit_insertion to false.
8341         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
8342         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
8343         also print the mask in the dump file.
8344         (pass_store_merging::gate): Minor tweak.
8345         (imm_store_chain_info::coalesce_immediate): Fix wrong association
8346         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
8347         stores with INTEGER_CST stores.
8348         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
8349         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
8350         and use it throughout.  Generate bit insertion sequences if need be.
8351         (pass_store_merging::process_store): Remove redundant condition.
8352         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
8354 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
8356         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
8357         the 128-bit floating point types.  Fix function comment.
8359 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8361         * config/aarch64/aarch64-simd.md
8362         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
8363         mnemonics.
8364         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
8365         mnemonics.
8367 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8369         PR tree-optimization/85989
8370         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
8371         variable.
8372         (backprop::intersect_uses): Check it when deciding whether this
8373         is a backedge reference.
8374         (backprop::process_block): Add each phi to m_visited_phis
8375         after visiting it, then clear it at the end.
8377 2018-06-01  Richard Biener  <rguenther@suse.de>
8379         * tree-vectorizer.h (vect_dr_stmt): New function.
8380         (vect_get_load_cost): Adjust.
8381         (vect_get_store_cost): Likewise.
8382         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
8383         Use vect_dr_stmt instead of DR_SMTT.
8384         (vect_record_base_alignments): Likewise.
8385         (vect_calculate_target_alignment): Likewise.
8386         (vect_compute_data_ref_alignment): Likewise and make static.
8387         (vect_update_misalignment_for_peel): Likewise.
8388         (vect_verify_datarefs_alignment): Likewise.
8389         (vector_alignment_reachable_p): Likewise.
8390         (vect_get_data_access_cost): Likewise.  Pass down
8391         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
8392         (vect_get_peeling_costs_all_drs): Likewise.
8393         (vect_peeling_hash_get_lowest_cost): Likewise.
8394         (vect_enhance_data_refs_alignment): Likewise.
8395         (vect_find_same_alignment_drs): Likewise.
8396         (vect_analyze_data_refs_alignment): Likewise.
8397         (vect_analyze_group_access_1): Likewise.
8398         (vect_analyze_group_access): Likewise.
8399         (vect_analyze_data_ref_access): Likewise.
8400         (vect_analyze_data_ref_accesses): Likewise.
8401         (vect_vfa_segment_size): Likewise.
8402         (vect_small_gap_p): Likewise.
8403         (vectorizable_with_step_bound_p): Likewise.
8404         (vect_prune_runtime_alias_test_list): Likewise.
8405         (vect_analyze_data_refs): Likewise.
8406         (vect_supportable_dr_alignment): Likewise.
8407         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8408         (vect_gen_prolog_loop_niters): Likewise.
8409         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8410         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
8411         modify DR_STMT.
8412         (vect_recog_mask_conversion_pattern): Likewise.
8413         (vect_try_gather_scatter_pattern): Likewise.
8414         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
8415         to vect_get_store_cost.
8416         (vect_get_store_cost): Get stmt_info instead of DR.
8417         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
8418         (vect_get_load_cost): Get stmt_info instead of DR.
8420 2018-06-01  Richard Biener  <rguenther@suse.de>
8422         PR middle-end/86017
8423         * gimple-fold.c (var_decl_component_p): Also allow offsetted
8424         vars wrapped in MEM_REFs.
8426 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
8428         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8429         Fix subreg tests so that we only return a choice between
8430         GENERAL_REGS and FP_REGS if the original classes included both.
8432 2018-06-01  Richard Biener  <rguenther@suse.de>
8434         PR ipa/85960
8435         * tree-ssa-structalias.c (get_function_part_constraint):
8436         Handle NULL fi->decl.
8437         (find_func_aliases_for_call): Properly handle indirect
8438         fi from direct call.
8439         (find_func_clobbers): Likewise.
8440         (ipa_pta_execute): Likewise.
8441         (create_variable_info_for): For functions that are ifunc_resolver
8442         resolve to a varinfo that contains the result of the resolver call.
8443         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
8444         aliases.
8446 2018-05-31  Michael Collison  <michael.collison@arm.com>
8448         * config/aarch64/aarch64.md:
8449         (*fix_to_zero_extenddfdi2): New pattern.
8450         * gcc.target/aarch64/fix_extend1.c: New testcase.
8452 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
8454         PR middle-end/78809
8455         PR middle-end/83026
8456         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
8457         and BUILT_IN_STRNCMP_EQ.
8458         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
8459         BUILT_IN_STRNCMP_EQ.
8460         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
8461         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8462         (gimple_fold_builtin): Likewise.
8463         * tree-ssa-strlen.c (compute_string_length): New function.
8464         (determine_min_obsize): New function.
8465         (handle_builtin_string_cmp): New function to handle calls to
8466         string compare functions.
8467         (strlen_optimize_stmt): Add handling to builtin string compare
8468         calls.
8469         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
8470         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
8471         * tree.c (build_common_builtin_nodes): Add new defines of
8472         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
8474 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
8476         PR target/85984
8477         * bb-reorder.c (pass_partition_blocks::gate): Return false for
8478         functions with naked attribute.
8480 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
8482         * config/i386/sse.md (avx_vec_concat<mode>):
8483         Substitute concat_tg_mode mode attribute with xtg_mode.
8484         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
8485         (concat_tg_mode): Remove mode attribute.
8487 2018-05-31  Martin Sebor  <msebor@redhat.com>
8489         PR c/82063
8490         * calls.c (alloc_max_size): Correct a logic error/typo.
8491         Treat excessive arguments as infinite.  Warn for invalid arguments.
8492         * doc/invoke.texi (-Walloc-size-larger-than): Update.
8494 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
8496         PR target/85829
8497         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
8498         and movx for Haswell.
8500 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
8501             Cesar Philippidis  <cesar@codesourcery.com>
8503         PR middle-end/85879
8504         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
8505         when emitting error on private/firstprivate reductions.
8506         * omp-low.c (lower_omp_target): Avoid reference-type processing
8507         on pointers for firstprivate clause.
8509 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8511         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
8512         (st1x2): Likewise.
8513         (st1x3): Likewise.
8514         * config/aarch64/aarch64-simd.md
8515         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
8516         (aarch64_ld1_x3_<mode>): Likewise
8517         (aarch64_st1x2<VALLDIF:mode>): Likewise
8518         (aarch64_st1_x2_<mode>): Likewise
8519         (aarch64_st1x3<VALLDIF:mode>): Likewise
8520         (aarch64_st1_x3_<mode>): Likewise
8521         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
8522         (vld1_s8_x3): Likewise.
8523         (vld1_u16_x3): Likewise.
8524         (vld1_s16_x3): Likewise.
8525         (vld1_u32_x3): Likewise.
8526         (vld1_s32_x3): Likewise.
8527         (vld1_u64_x3): Likewise.
8528         (vld1_s64_x3): Likewise.
8529         (vld1_f16_x3): Likewise.
8530         (vld1_f32_x3): Likewise.
8531         (vld1_f64_x3): Likewise.
8532         (vld1_p8_x3): Likewise.
8533         (vld1_p16_x3): Likewise.
8534         (vld1_p64_x3): Likewise.
8535         (vld1q_u8_x3): Likewise.
8536         (vld1q_s8_x3): Likewise.
8537         (vld1q_u16_x3): Likewise.
8538         (vld1q_s16_x3): Likewise.
8539         (vld1q_u32_x3): Likewise.
8540         (vld1q_s32_x3): Likewise.
8541         (vld1q_u64_x3): Likewise.
8542         (vld1q_s64_x3): Likewise.
8543         (vld1q_f16_x3): Likewise.
8544         (vld1q_f32_x3): Likewise.
8545         (vld1q_f64_x3): Likewise.
8546         (vld1q_p8_x3): Likewise.
8547         (vld1q_p16_x3): Likewise.
8548         (vld1q_p64_x3): Likewise.
8549         (vst1_s64_x2): Likewise.
8550         (vst1_u64_x2): Likewise.
8551         (vst1_f64_x2): Likewise.
8552         (vst1_s8_x2): Likewise.
8553         (vst1_p8_x2): Likewise.
8554         (vst1_s16_x2): Likewise.
8555         (vst1_p16_x2): Likewise.
8556         (vst1_s32_x2): Likewise.
8557         (vst1_u8_x2): Likewise.
8558         (vst1_u16_x2): Likewise.
8559         (vst1_u32_x2): Likewise.
8560         (vst1_f16_x2): Likewise.
8561         (vst1_f32_x2): Likewise.
8562         (vst1_p64_x2): Likewise.
8563         (vst1q_s8_x2): Likewise.
8564         (vst1q_p8_x2): Likewise.
8565         (vst1q_s16_x2): Likewise.
8566         (vst1q_p16_x2): Likewise.
8567         (vst1q_s32_x2): Likewise.
8568         (vst1q_s64_x2): Likewise.
8569         (vst1q_u8_x2): Likewise.
8570         (vst1q_u16_x2): Likewise.
8571         (vst1q_u32_x2): Likewise.
8572         (vst1q_u64_x2): Likewise.
8573         (vst1q_f16_x2): Likewise.
8574         (vst1q_f32_x2): Likewise.
8575         (vst1q_f64_x2): Likewise.
8576         (vst1q_p64_x2): Likewise.
8577         (vst1_s64_x3): Likewise.
8578         (vst1_u64_x3): Likewise.
8579         (vst1_f64_x3): Likewise.
8580         (vst1_s8_x3): Likewise.
8581         (vst1_p8_x3): Likewise.
8582         (vst1_s16_x3): Likewise.
8583         (vst1_p16_x3): Likewise.
8584         (vst1_s32_x3): Likewise.
8585         (vst1_u8_x3): Likewise.
8586         (vst1_u16_x3): Likewise.
8587         (vst1_u32_x3): Likewise.
8588         (vst1_f16_x3): Likewise.
8589         (vst1_f32_x3): Likewise.
8590         (vst1_p64_x3): Likewise.
8591         (vst1q_s8_x3): Likewise.
8592         (vst1q_p8_x3): Likewise.
8593         (vst1q_s16_x3): Likewise.
8594         (vst1q_p16_x3): Likewise.
8595         (vst1q_s32_x3): Likewise.
8596         (vst1q_s64_x3): Likewise.
8597         (vst1q_u8_x3): Likewise.
8598         (vst1q_u16_x3): Likewise.
8599         (vst1q_u32_x3): Likewise.
8600         (vst1q_u64_x3): Likewise.
8601         (vst1q_f16_x3): Likewise.
8602         (vst1q_f32_x3): Likewise.
8603         (vst1q_f64_x3): Likewise.
8604         (vst1q_p64_x3): Likewise.
8606 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8608         * config/msp430/msp430.c (msp430_output_labelref): Prepend
8609         user_label_prefix to name.
8611         * tree-core.h: Update comment about the format of NAME string
8612         passed to handler in attribute_spec.
8614         * config/msp430/msp430.md: Remove erroneous subreg expression from
8615         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
8616         zero_extend{q,h}isi2.
8618 2018-05-30  Borislav Petkov  <bp@suse.de>
8620         * doc/extend.texi: Document some architecture specific
8621         constraints and sort entries.
8623 2018-05-30  Martin Sebor  <msebor@redhat.com>
8625         PR middle-end/85369
8626         * builtins.c (expand_builtin_stpcpy_1): New function.
8627         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
8628         only if the former succeeds.
8630 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
8632         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
8633         in saphira.
8635 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8637         * doc/invoke.texi (-flinker-output): Document
8639 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8641         * passes.c (ipa_write_summaries): Only modify statements if body
8642         is in memory.
8643         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
8644         incrementally linking.
8645         (ipa_passes): Likewise.
8646         * lto-cgraph.c (lto_output_node): When incrementally linking do not
8647         pass down resolution info.
8648         * common.opt (flag_incremental_link): Update info.
8649         * gcc.c (plugin specs): Turn flinker-output=* to
8650         -plugin-opt=-linker-output-known
8651         * toplev.c (compile_file): Also cut compilation when doing incremental
8652         link.
8653         * flag-types. (enum lto_partition_model): Add
8654         LTO_LINKER_OUTPUT_NOLTOREL.
8655         (invoke.texi): Add -flinker-output docs.
8656         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
8657         link same way as WPA; do not stream in dead initializers.
8659         * dwarf2out.c (dwarf2out_die_ref_for_decl,
8660         darf2out_register_external_decl): Support incremental link.
8662 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8664         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
8666 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
8668         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
8669         it down to simple_object_copy_lto_debug_sections.
8670         (run_gcc): Determine incremental LTO link time and configure
8671         lto1 into non-wpa mode, disable renaming of debug sections.
8673 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8675         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
8676         descriptions of various incorrectly documented functions.
8678 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8680         Revert:
8681         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
8682         address check not strict.
8684 2018-05-30  Richard Biener  <rguenther@suse.de>
8686         PR tree-optimization/85964
8687         * tracer.c (better_p): Drop initialized count check, we only
8688         call the function with initialized counts now.
8689         (find_best_successor): Do find a best edge if one
8690         has uninitialized count.
8691         (find_best_predecessor): Likewise.  Do BB frequency check only
8692         if count is initialized.
8694 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
8696         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
8697         (aarch64_ldrstr_offset_compare): New.
8698         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
8699         load/store orderings.
8700         (aarch64_gen_adjusted_ldpstp): Likewise.
8702 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
8704         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
8705         Check for subset of GENERAL_REGS and FP_REGS.
8706         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
8707         r=w alternative.
8709 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
8711         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
8712         and wi::to_poly_offset.  Add the current offset and then check
8713         whether the sum fits, rather than using an unchecked addition of
8714         a checked term.  Check for a shwi rather than a uhwi.
8715         * expr.c (get_bit_range): Use tree_to_poly_uint64.
8716         (store_constructor): Use poly_int_tree_p.
8717         (expand_expr_real_1): Likewise.
8718         * function.c (assign_temp): Likewise.
8719         * fold-const.c (const_binop): Use poly_int_tree_p and
8720         wi::to_poly_offset.
8721         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
8722         division.
8723         * ipa-icf-gimple.c (func_checker::compare_operand): Use
8724         to_poly_offset for MEM offsets.
8725         * ipa-icf.c (sem_variable::equals): Likewise.
8726         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
8727         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
8728         wi::to_poly_offset for BIT_FIELD_REF offsets.
8729         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
8730         wi::to_poly_offset.
8731         * var-tracking.c (emit_note_insn_var_location): Use
8732         tree_to_poly_uint64.
8734 2018-05-29  Jim Wilson  <jimw@sifive.com>
8736         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
8738 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
8740         PR target/85950
8741         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
8742         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
8743         sequence.
8744         (sse4_1_round<mode>2): Use nonimmediate_operand
8745         for operand 1 predicate.
8747 2018-05-29  Martin Sebor  <msebor@redhat.com>
8748             Richard Biener  <rguenther@suse.de>
8750         PR testsuite/85888
8751         * calls.c (get_size_range): Call determine_value_range instead
8752         of get_value_range..
8753         * tree-vrp.h (determine_value_range): Declared new function.
8754         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
8756 2018-05-29  Richard Biener  <rguenther@suse.de>
8758         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
8759         sure to use non-pattern stmts for get_earlier_stmt arguments.
8760         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
8761         called on pattern stmts.
8762         (get_later_stmt): Likewise.
8764 2018-05-29  Martin Liska  <mliska@suse.cz>
8766         PR gcov-profile/85759
8767         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
8768         env variables.
8770 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
8772         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
8773         VEC_UNPACK_*_EXPR.
8774         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
8775         VEC_PACK_*_EXPR.
8777         PR target/85918
8778         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8779         VEC_PACK_FLOAT_EXPR): New tree codes.
8780         * tree-pretty-print.c (op_code_prio): Handle
8781         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8782         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8783         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8784         * tree-inline.c (estimate_operator_cost): Likewise.
8785         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
8786         * fold-const.c (const_binop): Likewise.
8787         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
8788         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
8789         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8790         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
8791         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
8792         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
8793         * expr.c (expand_expr_real_2): Likewise.
8794         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
8795         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
8796         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
8797         optabs.
8798         * optabs.c (expand_widen_pattern_expr): For
8799         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
8800         sign from result type rather than operand's type.
8801         (expand_binop_directly): For vec_packu_float_optab and
8802         vec_packs_float_optab allow result type to be different from operand's
8803         type.
8804         * optabs-tree.c (optab_for_tree_code): Handle
8805         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8806         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
8807         * tree-vect-generic.c (expand_vector_operations_1):  Handle
8808         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
8809         VEC_PACK_FLOAT_EXPR.
8810         * tree-vect-stmts.c (supportable_widening_operation): Handle
8811         FIX_TRUNC_EXPR.
8812         (supportable_narrowing_operation): Handle FLOAT_EXPR.
8813         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
8814         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
8815         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
8816         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
8817         mode attributes.
8818         (vec_pack<floatprefix>_float_<mode>): New expander.
8819         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
8820         attributes.
8821         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
8822         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
8823         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
8824         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
8825         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
8826         Document.
8827         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
8828         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
8829         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
8830         VEC_PACK_FLOAT_EXPR): Document.
8832 2018-05-29  Richard Biener  <rguenther@suse.de>
8834         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
8835         member.
8836         (stmt_vec_info_vec): Make pointer.
8837         (init_stmt_vec_info_vec): Remove.
8838         (free_stmt_vec_info_vec): Likewise.
8839         (set_stmt_vec_info_vec): New function.
8840         (free_stmt_vec_infos): Likewise.
8841         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
8842         (set_vinfo_for_stmt): Likewise.
8843         (get_earlier_stmt): Likewise.
8844         (get_later_stmt): Likewise.
8845         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
8846         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
8847         (vec_info::~vec_info): Free stmt_vec_infos.
8848         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
8849         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
8850         (pass_slp_vectorize::execute): Likewise.
8851         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
8852         (free_stmt_vec_info_vec): Likewise.
8853         (set_stmt_vec_info_vec): New function.
8854         (free_stmt_vec_infos): Likewise.
8855         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
8856         the global stmt_vec_info_vec.
8857         * tree-parloops.c (gather_scalar_reductions): Use
8858         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
8859         vector.
8861 2018-05-29  Richard Biener  <rguenther@suse.de>
8863         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
8865 2018-05-29  Martin Liska  <mliska@suse.cz>
8866             David Malcolm  <dmalcolm@redhat.com>
8868         * vec.c (test_reverse): New.
8869         (vec_c_tests): Add new test.
8870         * vec.h (vl_ptr>::reverse): New function.
8872 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
8874         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
8876         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
8877         and later.
8879 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8881         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
8883 2018-05-28  Richard Biener  <rguenther@suse.de>
8885         PR tree-optimization/85933
8886         * tree-vect-data-refs.c (vect_record_base_alignments): Only
8887         look at stmts marked as vectorizable.
8889 2018-05-28  Richard Biener  <rguenther@suse.de>
8891         PR tree-optimization/85934
8892         * tree-vect-generic.c (expand_vector_operations_1): Hoist
8893         vector boolean check before scalar optimization.
8895 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
8897         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
8898         for armv5te.
8900 2018-05-28  Mark Wielaard  <mark@klomp.org>
8902         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
8903         if it is an expression containing a minus sign.
8905 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
8907         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
8909 2018-05-27  Paul Koning  <ni1d@arrl.net>
8911         * config/pdp11/pdp11.md (truncsihi2): Remove.
8913 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
8914             Chung-Ju Wu  <jasonwucj@gmail.com>
8916         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
8917         implementation.
8918         (unaligned_store_dw): Ditto.
8919         * config/nds32/nds32-memory-manipulation.c
8920         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
8921         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
8922         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
8923         (emit_setmem_word_loop): Rename to ...
8924         (emit_setmem_doubleword_loop): ... this.
8925         (nds32_gen_dup_4_byte_to_word_value): New function.
8926         (nds32_gen_dup_8_byte_to_double_word_value): New function.
8927         (nds32_expand_setmem_loop): Refine implementation.
8928         (nds32_expand_setmem_loop_v3m): Ditto.
8929         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
8930         pattern.
8932 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8934         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
8936 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8938         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
8939         (nds32_init_machine_status): Initialize machine->attr_naked_p and
8940         machine->attr_no_prologue_p.
8941         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
8942         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
8943         (nds32_expand_epilogue): Consider attr_naked_p.
8944         (nds32_expand_epilogue_v3pop): Likewise.
8945         (nds32_can_use_return_insn): Likewise.
8946         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
8947         attr_no_prologue_p fields.
8948         * config/nds32/nds32.opt (mret-in-naked-func): New option.
8950 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
8952         PR target/85918
8953         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
8954         attributes.
8955         * config/i386/sse.md
8956         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
8957         Rename to ...
8958         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
8959         ... this.
8960         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
8961         Rename to ...
8962         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
8963         ... this.
8964         (*<floatsuffix>floatv2div2sf2): Rename to ...
8965         (*float<floatunssuffix>v2div2sf2): ... this.
8966         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
8967         (float<floatunssuffix>v2div2sf2_mask): ... this.
8968         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
8969         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
8970         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
8971         to ...
8972         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
8973         ... this.
8974         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8975         Rename to ...
8976         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
8977         ... this.
8978         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8979         Rename to ...
8980         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
8981         ... this.
8982         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
8983         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
8984         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
8985         gen_ufix_truncv8dfv8si2.
8986         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
8987         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
8988         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
8989         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
8990         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
8991         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
8992         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
8993         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
8995 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
8997         PR target/85900
8998         PR target/85345
8999         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
9001 2018-05-25  Jim Wilson  <jimw@sifive.com>
9003         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
9004         * config/riscv/riscv.c (struct machine_function): Add
9005         interrupt_handler_p and attribute_checked_p fields.
9006         (riscv_attribute_table): Add interrupt.
9007         (riscv_interrupt_type_p): New.
9008         (riscv_save_reg_p): Save extra regs for interrupt handler.
9009         (riscv_use_save_libcall): Return false  for interrupt handler.
9010         (riscv_first_stack_step): Add forward declaration.
9011         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
9012         for interrupt handler with large frame.  Use it for saved reg list.
9013         (riscv_expand_prologue): Move flag_stack_usage_info support to
9014         eliminate duplication.
9015         (riscv_expand_epilogue): Generate mret for interrupt handler.
9016         (riscv_epilogue_uses): New.
9017         (riscv_can_use_return_insn): Return false for interrupt handler.
9018         (riscv_function_ok_for_sibcall): Likewise.
9019         (riscv_set_current_function): Add interrupt handler support.
9020         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
9021         * config/riscv/riscv.md (UNSPECV_MRET): New.
9022         (GP_REGNUM): New.
9023         (riscv_frflags, riscv_fsflags): Use tab after opcode.
9024         (riscv_mret): New.
9025         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
9027 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
9029         PR tree-optimization/85712
9030         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
9031         this candidate has already been replaced in-situ by a copy.
9033 2018-05-25  Jason Merrill  <jason@redhat.com>
9035         PR c++/80485 - inline function non-zero address.
9036         * symtab.c (nonzero_address): Check DECL_COMDAT.
9038 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
9040         PR target/83628
9041         * config/alpha/alpha.md (ashlsi3): New insn pattern.
9042         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
9043         extension of SImode operation.  Use const123_operand predicate.
9044         (*saddsi_1): Remove.
9045         (*saddl_se_1): Ditto.
9046         (*ssubsi_1): Ditto.
9047         (*ssubl_se_1): Ditto.
9048         * config/alpha/predicates.md (const123_operand): New predicate.
9049         * config/alpha/constraints.md (P): Use IN_RANGE.
9051 2018-05-25  Richard Biener  <rguenther@suse.de>
9053         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
9054         defaulted to true.
9055         (ref_maybe_used_by_stmt_p): Likewise.
9056         (stmt_may_clobber_ref_p): Likewise.
9057         (stmt_may_clobber_ref_p_1): Likewise.
9058         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
9059         and pass it along.
9060         (ref_maybe_used_by_stmt_p): Likewise.
9061         (stmt_may_clobber_ref_p): Likewise.
9062         (stmt_may_clobber_ref_p_1): Likewise.
9063         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
9064         the alias oracle to disambiguate DRs with stmts DR analysis
9065         couldn't handle.
9066         (vect_analyze_data_refs): Do not give up on not analyzable
9067         DRs for BB vectorization.  Remove code truncating the dataref
9068         vector.
9070 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
9072         PR target/85832
9073         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
9074         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
9075         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
9077 2018-05-25  Richard Biener  <rguenther@suse.de>
9079         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
9080         function, combining stmt data ref gathering and fatal analysis
9081         parts.
9082         (vect_analyze_data_refs): Remove now redudnant code and simplify.
9083         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
9084         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
9085         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
9086         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
9088 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9090         PR tree-optimization/85720
9091         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
9092         SCC if all partitions are builtins.
9093         (version_loop_by_alias_check): New parameter.  Generate cancelable
9094         runtime alias check if all partitions are builtins.
9095         (distribute_loop): Update call to above function.
9097 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9099         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
9100         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
9101         (parm_default_def_partition_arg): Ditto.
9102         (set_parm_default_def_partition): Ditto.
9103         (get_parm_default_def_partitions): Ditto and make it static.
9104         (get_undefined_value_partitions): Ditto and make it static.
9105         (remove_ssa_form): Refactor call to init_var_map here.
9106         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
9107         computation for loop region.
9108         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
9109         (register_default_def): Delete.
9110         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
9111         (parm_default_def_partition_arg): Ditto.
9112         (set_parm_default_def_partition): Ditto.
9113         (get_parm_default_def_partitions): Ditto and make it static.
9114         (get_undefined_value_partitions): Ditto and make it static.
9115         (coalesce_with_default, coalesce_with_default): Update comment.
9116         (create_coalesce_list_for_region): New func factored out from
9117         create_outofssa_var_map.
9118         (populate_coalesce_list_for_outofssa): New func factored out from
9119         create_outofssa_var_map and coalesce_ssa_name.
9120         (create_outofssa_var_map): Delete.
9121         (coalesce_ssa_name): Refactor to support live range computation.
9122         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
9123         (get_parm_default_def_partitions): Delete.
9124         (get_undefined_value_partitions): Ditto.
9125         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
9126         computation for loop region.
9127         (new_tree_live_info, loe_visit_block): Ditto.
9128         (live_worklist, set_var_live_on_entry): Ditto.
9129         (calculate_live_on_exit, verify_live_on_entry): Ditto.
9130         * tree-ssa-live.h (struct _var_map): New fields.
9131         (init_var_map): Change decl.
9132         (region_contains_p): New.
9134 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
9136         * tree-ssa-live.h (live_merge_and_clear): Delete.
9138 2018-05-25  Richard Biener  <rguenther@suse.de>
9140         PR c++/85912
9141         * tree-dump.c (dequeue_and_dump): Remove access to removed
9142         operand 2 of a SWITCH_EXPR.
9144 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9146         * doc/sourcebuild.texi (vect_double_cond_arith): Include
9147         multiplication and division.
9148         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
9149         (cond_udiv@var{m}, cond_umod@var{m}): Document.
9150         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
9151         (cond_udiv_optab, cond_umod_optab): New optabs.
9152         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
9153         (IFN_COND_RDIV): New internal functions.
9154         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
9155         TRUNC_MOD_EXPR and RDIV_EXPR.
9156         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
9157         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
9158         New unspecs.
9159         (SVE_INT_BINARY): Include mult.
9160         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
9161         (optab, sve_int_op): Handle mult.
9162         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
9163         UNSPEC_COND_DIV.
9164         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
9165         for SVE_INT_BINARY_SD.
9167 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9169         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
9170         (optab, sve_int_op): Handle div and udiv.
9171         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
9172         for SVE_INT_BINARY_SD.
9173         (*<optab><mode>3): New insn for the same.
9175 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9177         * tree-vect-patterns.c: Include predict.h.
9178         (vect_recog_divmod_pattern): Restrict check for division support
9179         to when optimizing for size.
9181 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9183         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
9184         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
9185         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
9186         (gimple_match_op::set_op): Likewise.
9187         (gimple_resimplify4): Declare.
9188         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
9189         (expr::gen_transform): Likewise.
9190         (decision_tree::gen): Generate a simplification routine for 4 operands.
9191         * gimple-match-head.c (gimple_simplify): Add an overload for
9192         4 operands.  In the top-level function, handle up to 4 call
9193         arguments and call gimple_resimplify4.
9194         (gimple_resimplify4): New function.
9195         (build_call_internal): Pass a fourth operand.
9196         (maybe_push_to_seq): Likewise.
9197         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
9198         Fold VEC_COND_EXPRs of an operation and a default value into
9199         an IFN_COND_* function if possible.
9200         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
9201         New unspecs.
9202         (SVE_COND_FP_BINARY): Include them.
9203         (optab, sve_fp_op): Handle them.
9204         (SVE_INT_BINARY_REV): New code iterator.
9205         (SVE_COND_FP_BINARY_REV): New int iterator.
9206         (commutative): New int attribute.
9207         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
9208         Declare.
9209         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
9210         function.
9211         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
9212         (*cond_<optab><mode>): New patterns for reversed operands.
9214 2018-05-25  Richard Biener  <rguenther@suse.de>
9216         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
9217         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
9218         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
9219         (STMT_VINFO_GROUPED_ACCESS): Adjust.
9220         * tree-vect-data-refs.c (everywhere): Adjust users.
9221         * tree-vect-loop.c (everywhere): Likewise.
9222         * tree-vect-slp.c (everywhere): Likewise.
9223         * tree-vect-stmts.c (everywhere): Likewise.
9224         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9226 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9228         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
9229         Rename to...
9230         (gcc_cv_as_section_exclude): ... this.
9231         Try Solaris as #exclude syntax.
9232         * configure: Regenerate.
9233         * config.in: Regenerate.
9234         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
9235         SECTION_EXCLUDE.
9236         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
9237         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
9239         * varasm.c (default_elf_asm_named_section): Don't check if
9240         HAVE_GAS_SECTION_EXCLUDE is defined.
9242 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9244         * doc/md.texi: Update the documentation of the cond_* optabs
9245         to mention the new final operand.  Fix GET_MODE_NUNITS call.
9246         Describe the scalar case too.
9247         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
9248         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
9249         instead of 2.
9250         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
9251         (get_conditional_internal_fn): Update comment.
9252         * tree-vect-loop.c (vectorizable_reduction): Pass the original
9253         accumulator value as a final argument to conditional functions.
9254         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
9255         a define_expand and add an "else" operand.  Assert for now that
9256         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
9257         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
9258         (*cond_<optab><mode>): New patterns.
9259         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
9260         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9261         (UNSPEC_COND_EOR): Delete.
9262         (optab): Remove associated mappings.
9263         (SVE_INT_BINARY): New code iterator.
9264         (sve_int_op): Remove int attribute and add "minus" to the code
9265         attribute.
9266         (SVE_COND_INT_OP): Delete.
9267         (SVE_COND_FP_OP): Rename to...
9268         (SVE_COND_FP_BINARY): ...this.
9270 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
9272         * optabs.c (can_reuse_operands_p): New function.
9273         (maybe_legitimize_operands): Try to reuse the results for
9274         earlier operands.
9276 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9278         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
9279         Add {q} suffix to insn mnemonic.
9281 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9283         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
9284         (msp430_warn_func_return): New.
9286 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
9288         * fold-const.c (tree_nonzero_bits): New function.
9289         * fold-const.h (tree_nonzero_bits): Likewise.
9290         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
9291         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
9293 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
9295         PR target/85900
9296         PR target/85345
9297         * varasm.c (assemble_alias): Check ifunc_resolver only on
9298         FUNCTION_DECL.
9300 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
9302         PR target/85903
9303         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
9304         when memory input operand is handled.
9306 2018-05-24  Luis Machado  <luis.machado@linaro.org>
9308         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
9309         global.
9310         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
9312 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9314         * match.pd: Delay FMA folds until after vectorization.
9316 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
9318         PR target/83009
9319         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9320         address check not strict.
9322 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
9324         * gimple-match.h (gimple_match_op): New class.
9325         (mprts_hook): Replace parameters with a gimple_match_op *.
9326         (maybe_build_generic_op): Likewise.
9327         (gimple_simplified_result_is_gimple_val): Replace parameters with
9328         a const gimple_match_op *.
9329         (gimple_simplify): Replace code_helper * and tree * parameters with
9330         a gimple_match_op * parameter.
9331         (gimple_resimplify1): Replace code_helper *, tree and tree *
9332         parameters with a gimple_match_op * parameter.
9333         (gimple_resimplify2): Likewise.
9334         (gimple_resimplify3): Likewise.
9335         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
9336         parameters with a gimple_match_op * parameter.
9337         * gimple-match-head.c (gimple_simplify): Change prototypes of
9338         auto-generated functions to take a gimple_match_op * instead of
9339         separate code_helper * and tree * parameters.  Make the same
9340         change in the top-level overload and update calls to the
9341         gimple_resimplify routines.  Update calls to the auto-generated
9342         functions and to maybe_push_res_to_seq in the publicly-facing
9343         operation-specific gimple_simplify overloads.
9344         (gimple_match_op::MAX_NUM_OPS): Define.
9345         (gimple_resimplify1): Replace rcode and ops with a single res_op
9346         parameter.  Update call to gimple_simplify.
9347         (gimple_resimplify2): Likewise.
9348         (gimple_resimplify3): Likewise.
9349         (mprts_hook): Replace parameters with a gimple_match_op *.
9350         (maybe_build_generic_op): Likewise.
9351         (build_call_internal): Replace type, nargs and ops with
9352         a gimple_match_op *.
9353         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
9354         with a single gimple_match_op *.  Update calls to mprts_hook,
9355         build_call_internal and gimple_simplified_result_is_gimple_val.
9356         Factor out code that is common to the tree_code and combined_fn cases.
9357         * genmatch.c (expr::gen_transform): Replace tem_code and
9358         tem_ops with a gimple_match_op called tem_op.  Update calls
9359         to the gimple_resimplify functions and maybe_push_res_to_seq.
9360         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
9361         res_ops.  Update call to the gimple_resimplify functions.
9362         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
9363         (decision_tree::gen): Make the functions take a gimple_match_op *
9364         called res_op instead of separate res_code and res_ops parameters.
9365         Update call accordingly.
9366         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
9367         and ops with a single res_op parameter.  Update calls to
9368         maybe_build_generic_op and maybe_push_res_to_seq.
9369         (fold_stmt_1): Update calls to gimple_simplify and
9370         replace_stmt_with_simplification.
9371         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
9372         and gimple_simplified_result_is_gimple_val.
9373         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
9374         gimple_simplify.
9375         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
9376         with a gimple_match_op *.
9377         (vn_nary_build_or_lookup): Likewise.  Update call to
9378         vn_nary_build_or_lookup_1.
9379         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
9380         gimple_match_op *.  Update calls to the gimple_resimplify routines
9381         and to gimple_simplified_result_is_gimple_val.
9382         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
9383         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
9384         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
9385         (visit_nary_op): Likewise.
9386         (visit_reference_op_load): Likewise.
9388 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9390         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
9391         modifier for printing the step amount.
9393 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
9395         PR target/78849
9396         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
9397         types.
9399 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
9401         * doc/sourcebuild.texi (Endianness): New subsubsection.
9403 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9405         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9406         <prefetch_dynamic_strides>: New const bool field.
9407         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9408         prefetch_dynamic_strides.
9409         (exynosm1_prefetch_tune): Likewise.
9410         (thunderxt88_prefetch_tune): Likewise.
9411         (thunderx_prefetch_tune): Likewise.
9412         (thunderx2t99_prefetch_tune): Likewise.
9413         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
9414         false.
9415         (aarch64_override_options_internal): Update to set
9416         PARAM_PREFETCH_DYNAMIC_STRIDES.
9417         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
9418         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
9419         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
9420         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
9421         prefetch-dynamic-strides setting.
9423 2018-05-23  Luis Machado  <luis.machado@linaro.org>
9425         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
9426         <minimum_stride>: New const int field.
9427         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
9428         minimum_stride field defaulting to -1.
9429         (exynosm1_prefetch_tune): Likewise.
9430         (thunderxt88_prefetch_tune): Likewise.
9431         (thunderx_prefetch_tune): Likewise.
9432         (thunderx2t99_prefetch_tune): Likewise.
9433         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
9434         <default_opt_level>: Set to 3.
9435         (aarch64_override_options_internal): Update to set
9436         PARAM_PREFETCH_MINIMUM_STRIDE.
9437         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
9438         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
9439         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
9440         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
9441         stride is constant and is below the minimum stride threshold.
9443 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9445         * config/arm/arm-cpus.in (mode26): Delete.
9446         (armv4): Delete mode26 reference.
9447         * config/arm/arm.c (arm_configure_build_target): Delete use of
9448         isa_bit_mode26.
9450 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9452         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
9453         New insn pattern.
9454         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
9455         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
9456         for non-SSE modes.
9457         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
9458         (floatunsdidf2): Ditto.
9460 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
9462         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
9463         (fixuns_trunc<mode>si2_avx512f): Ditto.
9464         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
9465         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
9466         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
9468 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9470         PR rtl-optimization/79985
9471         * df-scan.c (df_insn_refs_collect): Remove special case for
9472         global registers and asm statements.
9474 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
9476         * extend.texi (Global Register Variables): Rewrite the bullet list.
9477         Note that the register is available for allocation. Note that access
9478         via inline asm must use constraints. Add note about async-signal
9479         handlers. Remove paragraph about automagic register selection.
9481 2018-05-23  Richard Biener  <rguenther@suse.de>
9483         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
9484         of fixed offset from memset VN.
9486 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
9488         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
9489         first_interp field.
9490         (alloc_cand_and_find_basis): Initialize first_interp field.
9491         (slsr_process_mul): Modify first_interp field.
9492         (slsr_process_add): Likewise.
9493         (slsr_process_cast): Modify first_interp field for each new
9494         interpretation.
9495         (slsr_process_copy): Likewise.
9496         (dump_candidate): Dump first_interp field.
9497         (replace_mult_candidate): Process all interpretations, not just
9498         subsequent ones.
9499         (replace_rhs_if_not_dup): Likewise.
9500         (replace_one_candidate): Likewise.
9502 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
9504         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
9505         Add new boolean.
9506         (aarch64_needs_frame_chain): New function.
9507         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
9509 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
9511         PR target/84882
9512         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
9513         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
9514         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
9515         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
9516         as true for strict-align.
9517         (aarch64_can_inline_p): Perform checks even when callee has no
9518         attributes to check for strict alignment.
9519         * doc/extend.texi (AArch64 Function Attributes): Document
9520         no-strict-align.
9521         * doc/invoke.texi: (AArch64 Options): Likewise.
9523 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
9525         PR tree-optimization/85853
9526         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
9527         the handling of the root of the node to...
9528         (vect_slp_analyze_node_operations_1): ...this new function,
9529         and run the whole thing with the child nodes' def types
9530         set according to their SLP node's def type.
9532 2018-05-23  Richard Biener  <rguenther@suse.de>
9534         PR middle-end/85874
9535         * tree-data-ref.c (create_runtime_alias_checks): Defer
9536         and ignore overflow warnings.
9538 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
9540         PR tree-optimization/85822
9541         * tree-vrp.c (is_masked_range_test): Fix handling of negative
9542         constants.
9544 2018-05-23  Richard Biener  <rguenther@suse.de>
9546         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
9547         memset constants via native_interpret_expr.
9549 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
9551         PR target/85345
9552         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
9553         attribute.
9554         (cgraph_node::create_alias): Likewise.
9555         (cgraph_node::get_availability): Check ifunc_resolver instead
9556         of looking up ifunc attribute.
9557         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9558         * varasm.c (do_assemble_alias): Likewise.
9559         (assemble_alias): Likewise.
9560         (default_binds_local_p_3): Likewise.
9561         * cgraph.h (cgraph_node): Add ifunc_resolver.
9562         (cgraph_node::only_called_directly_or_aliased_p): Return false
9563         for IFUNC resolver.
9564         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
9565         attribute.
9566         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
9567         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
9568         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
9569         instead of looking up ifunc attribute.
9571 2018-05-22  Luis Machado  <luis.machado@linaro.org>
9573         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
9575 2018-05-22  Martin Sebor  <msebor@redhat.com>
9577         PR middle-end/85359
9578         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
9579         only when expasion succeeds.
9580         (expand_builtin_strcmp): Same.
9581         (expand_builtin_strncmp): Same.
9583 2018-05-22  Martin Sebor  <msebor@redhat.com>
9585         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
9587 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9588             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9590         * config/aarch64/aarch64-ldpstp.md: Replace uses of
9591         aarch64_mem_pair_operand with memory_operand and delete operand swapping
9592         code.
9593         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9594         Add check for legitimate_address.
9595         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
9596         (aarch64_swap_ldrstr_operands): New.
9597         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
9598         Define prototype.
9600 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
9601             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9603         * config/aarch64/aarch64.md: New patterns to generate stp
9604         and ldp.
9605         (store_pair_sw, store_pair_dw): New patterns to generate stp for
9606         single words and double words.
9607         (load_pair_sw, load_pair_dw): Likewise.
9608         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
9609         Delete.
9610         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
9611         Delete.
9612         * config/aarch64/aarch64-ldpstp.md: Modify peephole
9613         for different mode ldpstp and add peephole for merged zero stores.
9614         Likewise for loads.
9615         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
9616         Add size check.
9617         (aarch64_gen_store_pair): Rename calls to match new patterns.
9618         (aarch64_gen_load_pair): Rename calls to match new patterns.
9619         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
9620         (load_pair<DREG:mode><DREG2:mode>): ... This.
9621         (store_pair<mode>): Rename to...
9622         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
9623         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
9624         New mode iterators.
9625         (V_INT_EQUIV): Handle SImode.
9626         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
9627         New predicate.
9629 2018-05-22  Martin Sebor  <msebor@redhat.com>
9631         PR c/85623
9632         * calls.c (maybe_warn_nonstring_arg): Use string length to set
9633         or ajust the presumed bound on an operation to avoid unnecessary
9634         warnings.
9636 2018-05-22  Martin Sebor  <msebor@redhat.com>
9638         PR tree-optimization/85826
9639         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
9640         assuming that a DECL necesarily has a constant size.
9642 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
9644         PR middle-end/85862
9645         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
9647 2018-05-22  Richard Biener  <rguenther@suse.de>
9649         PR tree-optimization/85834
9650         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
9651         non-constant and non-zero memset arguments.
9653 2018-05-22  Martin Liska  <mliska@suse.cz>
9655         PR ipa/85607
9656         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
9658 2018-05-22  Richard Biener  <rguenther@suse.de>
9660         PR tree-optimization/85863
9661         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
9662         comparisons when vectype is specified.
9663         (vectorizable_condition): Do not specify vectype for
9664         vect_is_simple_cond when SLP vectorizing.
9666 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
9668         PR target/85657
9669         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
9670         define __ibm128 as long double.
9671         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
9672         as a distinct type when IEEE 128-bit support is enabled.
9673         (init_float128_ieee): Fix up conversions between IFmode and IEEE
9674         128-bit types to use the correct functions.
9675         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
9676         convert between 128-bit floating point types that have different
9677         modes but the same representation, instead of using gen_lowpart to
9678         makean alias.
9679         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
9680         KFmode.
9681         (IFKF_reg): New attributes to give the register constraints for
9682         IFmode and KFmode.
9683         (extend<mode>tf2_internal): New insns to mark an explicit
9684         conversion between 128-bit floating point types that have a
9685         different mode but share the same representation.
9687 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
9689         PR tree-optimization/85814
9690         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
9691         a null return from get_strinfo when unsharing the next
9692         strinfo in the chain.
9694 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9696         PR gcc/84923
9697         * varasm.c (weak_finish): Clean up weak_decls.
9699 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9701         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
9702         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
9703         UNSPEC_UADALP values.
9704         * config/aarch64/iterators.md (ABAL): New int iterator.
9705         (ABDL2): Likewise.
9706         (ADALP): Likewise.
9707         (sur): Add mappings for the above.
9708         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
9709         New define_insn.
9710         (aarch64_<sur>abal<mode>_4): Likewise.
9711         (aarch64_<sur>adalp<mode>_3): Likewise.
9712         (<sur>sadv16qi): New define_expand.
9714 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
9716         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
9717         (*movdf_internal): Ditto.
9718         (*rcpsf2_sse): Ditto.
9719         (*rsqrtsf2_sse): Ditto.
9720         (*sqrt<mode>2_sse): Ditto.
9722 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
9724         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
9725         eor3q<mode>4.
9726         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
9727         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
9728         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
9729         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
9730         vbcaxq_s64): New.
9731         * config/aarch64/arm_neon.h: Likewise.
9732         * config/aarch64/iterators.md (VQ_I): New.
9734 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
9736         * config.gcc: Add arc/t-multilib-linux to tmake_file for
9737         arc*-*-linux*.
9738         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
9739         MULTILIB_DIRNAMES
9741 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9743         * config/nds32/constraints.md (S): New constraint.
9744         * config/nds32/nds32.md (call_internal): Use constraint S.
9745         (call_value_internal): Likewise.
9746         (sibcall_internal): Likewise.
9747         (sibcall_value_internal): Likewise.
9749 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9750             Chung-Ju Wu  <jasonwucj@gmail.com>
9752         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
9753         into consideration.
9755 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
9756             Chung-Ju Wu  <jasonwucj@gmail.com>
9758         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
9759         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
9760         (nds32_rtx_costs_impl): Simplify.
9761         (nds32_address_cost_impl): Simplify.
9762         (nds32_init_rtx_costs): New function.
9763         (nds32_rtx_costs_speed_prefer): Likewise.
9764         (nds32_rtx_costs_size_prefer): Likewise.
9765         (nds32_address_cost_speed_prefer): Likewise.
9766         (nds32_address_cost_speed_fwprop): Likewise.
9767         (nds32_address_cost_size_prefer): Likewise.
9768         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
9769         * config/nds32/nds32.c (nds32_option_override): Use
9770         nds32_init_rtx_costs function.
9772 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
9774         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
9775         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
9776         (TARGET_PIPELINE_N8): Likewise.
9777         (TARGET_PIPELINE_N10): Likewise.
9778         (TARGET_PIPELINE_N13): Likewise.
9779         (TARGET_PIPELINE_GRAYWOLF): Likewise.
9781 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
9783         * config/nds32/nds32-fpu.md: Update copyright year.
9785 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9787         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
9789 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9791         * config/nds32/nds32.c
9792         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
9793         * config/nds32/nds32.opt (minline-asm-r15): New option.
9795 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9797         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
9798         MASK_HW_ABS.
9799         * config/nds32/nds32.md (abssi2): New pattern.
9801 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
9803         * config/i386/i386.md (rex64namesuffix): New mode attribute.
9804         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
9805         Merge insn pattern from sse_cvtsi2ss<round_name> and
9806         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
9807         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
9808         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
9809         using SWI48 mode iterator.
9810         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
9811         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
9812         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
9813         pattern from sse_cvttss2si<round_saeonly_name>
9814         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
9815         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
9816         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
9817         using SWI48 mode iterator.
9818         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
9819         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
9820         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
9821         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
9822         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
9823         using SWI48 mode iterator.
9824         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
9825         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
9826         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
9827         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
9828         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
9829         SWI48 mode iterator.
9830         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
9831         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
9832         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
9833         pattern from sse_cvttsd2si<round_saeonly_name>
9834         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
9836 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9838         * config/nds32/nds32-md-auxiliary.c
9839         (nds32_valid_smw_lwm_base_p): Refine.
9840         (nds32_output_smw_single_word): Refine.
9841         (nds32_output_smw_double_word): New.
9842         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
9844 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9846         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
9847         (nds32_output_stack_pop): Refine.
9848         (nds32_expand_unaligned_load): Refine.
9849         (nds32_expand_unaligned_store): Refine.
9851 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9852             Chung-Ju Wu  <jasonwucj@gmail.com>
9854         * config/nds32/constants.md: Add TP_REGNUM constant.
9855         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
9856         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
9857         UNSPEC_ADD32.
9858         * config/nds32/nds32-doubleword.md: Consider flag_pic.
9859         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
9860         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
9861         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
9862         and PIC code generation.
9863         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
9864         code generation.
9865         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
9866         optimization.
9867         * config/nds32/nds32.md: Support TLS and PIC.
9868         * config/nds32/nds32.c: Support TLS and PIC.
9869         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
9870         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
9871         predicate.
9873 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
9875         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
9876         mode with E_ prefix.
9878 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
9879             Chung-Ju Wu  <jasonwucj@gmail.com>
9881         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
9882         * config/nds32/nds32-md-auxiliary.c
9883         (symbolic_reference_mentioned_p): New.
9884         (nds32_legitimize_ict_address): New.
9885         (nds32_expand_ict_move): New.
9886         (nds32_indirect_call_referenced_p): New.
9887         (nds32_symbol_binds_local_p): Delete.
9888         (nds32_long_call_p): Modify.
9889         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
9890         * config/nds32/nds32-protos.h
9891         (symbolic_reference_mentioned_p): Declare.
9892         (nds32_legitimize_ict_address): Declare.
9893         (nds32_expand_ict_move): Declare.
9894         (nds32_indirect_call_referenced_p): Declare.
9895         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
9896         (nds32_relax_group): Use nds32_ict_const_p as condition.
9897         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
9898         (nds32_asm_file_start): Output ict_model directive in asm code.
9899         (nds32_legitimate_address_p): Consider indirect call.
9900         (nds32_print_operand): Consider indirect call.
9901         (nds32_print_operand_address): Consider indirect call.
9902         (nds32_insert_attributes): Handle "indirect_call" attribute.
9903         (TARGET_LEGITIMATE_ADDRESS_P): Define.
9904         (TARGET_LEGITIMATE_CONSTANT_P): Define.
9905         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
9906         (TARGET_DELEGITIMIZE_ADDRESS): Define.
9907         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
9908         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
9909         (TARGET_ICT_MODEL_SMALL): Define.
9910         (TARGET_ICT_MODEL_LARGE): Define.
9911         * config/nds32/nds32.md (movsi): Consider ict model.
9912         (call, call_value): Consider ict model.
9913         (sibcall, sibcall_value): Consider ict model.
9914         * config/nds32/nds32.opt (mict-model): New option.
9915         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
9916         model.
9918 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
9919             Monk Chiang  <sh.chiang04@gmail.com>
9920             Jim Wilson <jimw@sifive.com>
9922         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
9923         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
9924         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
9925         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
9926         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
9927         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
9928         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
9929         compute save_libcall_adjustment properly.
9930         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
9931         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
9932         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
9933         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
9934         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
9935         (ABI_SPEC): Handle mabi=ilp32e.
9936         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
9937         (RVE): Add RVE mask.
9938         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
9939         <-march>: Add rv32e as an example.
9941 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
9943         PR c++/82899
9944         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
9945         (intra_create_variable_infos): Handle C++ constructors.
9947 2018-05-18  Martin Liska  <mliska@suse.cz>
9949         * passes.def: Remove a redundant pass.
9951 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9953         PR bootstrap/85838
9954         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
9956 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9958         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
9959         (ARMv4): Update.
9960         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
9961         (ARMv6m): Update.
9962         (armv2, armv2a, armv3, armv3m): Delete architectures.
9963         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
9964         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
9965         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
9966         Delete cpus.
9967         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
9968         (*mulsidi3adddi): Likewise.
9969         (mulsidi3): Likewise.
9970         (*mulsidi3_nov6): Likewise.
9971         (umulsidi3): Likewise.
9972         (umulsidi3_nov6): Likewise.
9973         (umaddsidi4): Likewise.
9974         (*umulsidi3adddi): Likewise.
9975         (smulsi3_highpart): Likewise.
9976         (*smulsi3_highpart_nov6): Likewise.
9977         (umulsi3_highpart): Likewise.
9978         (*umulsi3_highpart_nov6): Likewise.
9979         * config/arm/arm.h (arm_arch3m): Delete.
9980         * config/arm/arm.c (arm_arch3m): Delete.
9981         (arm_option_override_internal): Update armv3-related comment.
9982         (arm_configure_build_target): Delete use of isa_bit_mode32.
9983         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
9984         (arm_rtx_costs_internal): Delete check of arm_arch3m.
9985         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
9986         (mulsa3): Likewise.
9987         (mulusa3): Likewise.
9988         * config/arm/arm-protos.h (arm_arch3m): Delete.
9989         * config/arm/arm-tables.opt: Regenerate.
9990         * config/arm/arm-tune.md: Likewise.
9991         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
9992         deleted architectures.
9994 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9996         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
9997         (armv5t, armv5te): New features.
9998         (ARMv5, ARMv5e): Delete fgroups.
9999         (ARMv5t, ARMv5te): Adjust for above changes.
10000         (ARMv6m): Likewise.
10001         (armv5, armv5e): Delete arches.
10002         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
10003         arm_arch5.
10004         (*call_reg_arm): Likewise.
10005         (*call_value_reg_armv5): Likewise.
10006         (*call_value_reg_arm): Likewise.
10007         (*call_symbol): Likewise.
10008         (*call_value_symbol): Likewise.
10009         (*sibcall_insn): Likewise.
10010         (*sibcall_value_insn): Likewise.
10011         (clzsi2): Likewise.
10012         (prefetch): Likewise.
10013         (define_split and define_peephole2 dependent on arm_arch5):
10014         Likewise.
10015         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
10016         arm_arch5e.
10017         (TARGET_ARM_QBIT): Likewise.
10018         (TARGET_DSP_MULTIPLY): Likewise.
10019         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
10020         (arm_arch5, arm_arch5e): Delete.
10021         (arm_arch5t, arm_arch5te): Declare.
10022         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
10023         (arm_arch5t): Declare.
10024         (arm_option_reconfigure_globals): Update for the above.
10025         (arm_options_perform_arch_sanity_checks): Update comment, replace
10026         use of arm_arch5 with arm_arch5t.
10027         (use_return_insn): Likewise.
10028         (arm_emit_call_insn): Likewise.
10029         (output_return_instruction): Likewise.
10030         (arm_final_prescan_insn): Likewise.
10031         (arm_coproc_builtin_available): Likewise.
10032         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
10033         arm_arch5e with arm_arch5t and arm_arch5te.
10034         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
10035         (arm_arch5t, arm_arch5te): Declare.
10036         * config/arm/arm-tables.opt: Regenerate.
10037         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
10038         * config/arm/t-multilib: Likewise.
10039         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
10040         instead of arm_arch5.
10041         (*call_reg_thumb1): Likewise.
10042         (*call_value_reg_thumb1_v5): Likewise.
10043         (*call_value_reg_thumb1): Likewise.
10044         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
10045         unreachable path.
10046         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
10048 2018-05-18  Martin Liska  <mliska@suse.cz>
10050         PR gcov-profile/84846
10051         * doc/gcov.texi: Document -t option of gcov tool.
10053 2018-05-18  Martin Liska  <mliska@suse.cz>
10055         PR gcov-profile/84846
10056         * gcov.c (print_usage): Add new -t option.
10057         (process_args): Handle the option.
10058         (generate_results): Use stdout as output when requested by
10059         the option.
10061 2018-05-18  Martin Liska  <mliska@suse.cz>
10063         PR gcov-profile/84846
10064         * coverage.c (coverage_init): Write PWD to .gcno file.
10065         * doc/gcov.texi: Document how working directory is printed.
10066         * gcov-dump.c (dump_gcov_file): Print PWD.
10067         * gcov.c (output_intermediate_file): Likewise.
10068         (read_graph_file): Read PWD string.
10069         (output_lines): Print PWD.
10071 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10073         PR middle-end/85817
10074         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
10075         for retval and return false if all args to phi are zero.
10077 2018-05-18  Richard Biener  <rguenther@suse.de>
10079         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
10080         method.
10081         (evrp_dom_walker::before_dom_children): Call it.
10083 2018-05-18  Richard Biener  <rguenther@suse.de>
10085         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
10086         results when processing array refs with variable index.
10088 2018-05-18  Toon Moene  <toon@moene.org>
10090         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
10091         directly after that of -floop-interchange. Indicate that both
10092         options are enabled by default when specifying -O3.
10094 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10096         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
10097         iterator.  Delete separate integer-mode vec_set<mode> expander.
10098         (aarch64_simd_vec_setv2di): Delete.
10099         (vec_setv2di): Delete.
10100         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
10101         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
10102         the "w, r" alternative.
10104 2018-05-18  Martin Liska  <mliska@suse.cz>
10106         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
10107         * tree-pass.h (make_pass_lower_switch_O0): New function.
10108         * tree-switch-conversion.c (node_has_low_bound): Remove.
10109         (node_has_high_bound): Likewise.
10110         (node_is_bounded): Likewise.
10111         (class pass_lower_switch): Make it a template type and create
10112         two instances.
10113         (pass_lower_switch::execute): Add template argument.
10114         (make_pass_lower_switch): New function.
10115         (make_pass_lower_switch_O0): New function.
10116         (do_jump_if_equal): Remove.
10117         (emit_case_nodes): Simplify to just handle all 3 cases and leave
10118         all the hard work to tree optimization passes.
10120 2018-05-18  Martin Liska  <mliska@suse.cz>
10122         * dbgcnt.c (limit_low): Renamed from limit.
10123         (limit_high): New variable.
10124         (dbg_cnt_is_enabled): Check for upper limit.
10125         (dbg_cnt): Adjust dumping.
10126         (dbg_cnt_set_limit_by_index): Add new argument for high
10127         value.
10128         (dbg_cnt_set_limit_by_name): Likewise.
10129         (dbg_cnt_process_single_pair): Parse new format.
10130         (dbg_cnt_process_opt): Use strtok.
10131         (dbg_cnt_list_all_counters): Remove 'value' and add
10132         'limit_high'.
10133         * doc/invoke.texi: Document changes.
10135 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
10137         * doc/sourcebuild.texi (scalar_all_fma): Document.
10138         * tree.def (FMA_EXPR): Delete.
10139         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
10140         * internal-fn.c (ternary_direct): New macro.
10141         (expand_ternary_optab_fn): Likewise.
10142         (direct_ternary_optab_supported_p): Likewise.
10143         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
10144         * builtins.c (fold_builtin_fma): Delete.
10145         (fold_builtin_3): Don't call it.
10146         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
10147         * expr.c (expand_expr_real_2): Likewise.
10148         * fold-const.c (operand_equal_p): Likewise.
10149         (fold_ternary_loc): Likewise.
10150         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
10151         * gimple.c (DEFTREECODE): Likewise.
10152         * gimplify.c (gimplify_expr): Likewise.
10153         * optabs-tree.c (optab_for_tree_code): Likewise.
10154         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
10155         * tree-eh.c (operation_could_trap_p): Likewise.
10156         (stmt_could_throw_1_p): Likewise.
10157         * tree-inline.c (estimate_operator_cost): Likewise.
10158         * tree-pretty-print.c (dump_generic_node): Likewise.
10159         (op_code_prio): Likewise.
10160         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10161         * tree-ssa-operands.c (get_expr_operands): Likewise.
10162         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
10163         * fold-const-call.h (fold_fma): Delete.
10164         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
10165         CFN_FNMA and CFN_FNMS.
10166         (fold_fma): Delete.
10167         * genmatch.c (combined_fn): New enum.
10168         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
10169         (commutative_op): New function.
10170         (commutate): Use it.  Handle more than 2 operands.
10171         (dt_operand::gen_gimple_expr): Use commutative_op.
10172         (parser::parse_expr): Allow :c to be used with non-binary
10173         operators if the commutative operand is known.
10174         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
10175         CFN_FMS, CFN_FNMA and CFN_FNMS.
10176         (backprop::process_assign_use): Remove FMA_EXPR handling.
10177         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
10178         (gen_hsa_fma): New function.
10179         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
10180         IFN_FNMA and IFN_FNMS.
10181         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
10182         * gimple-fold.h (follow_all_ssa_edges): Declare.
10183         * gimple-fold.c (follow_all_ssa_edges): New function.
10184         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
10185         gimple_build interface and use follow_all_ssa_edges to fold the result.
10186         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
10187         instead of checking for optabs directly.
10188         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
10189         rather than FMA_EXPRs.
10190         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
10191         call to IFN_FMA instead of an FMA_EXPR.
10193 2018-05-17  Jim Wilson  <jimw@sifive.com>
10195         * expr.c (do_tablejump): When converting index to Pmode, if we have a
10196         sign extended promoted subreg, and the range does not have the sign bit
10197         set, then do a sign extend.
10199         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
10200         test, check for sign extended subreg and/or constant operands, and
10201         do a sign extend in that case.
10203 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
10205         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
10206         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
10207         Add untyped.
10208         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
10209         Change logics_shift_reg to logics_shift_imm.
10210         (thunderx2t99_fp_loadpair_basic): Delete.
10211         (thunderx2t99_fp_storepair_basic): Delete.
10212         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
10213         (thunderx2t99_asimd_polynomial): Delete.
10214         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
10215         and neon_fp_mul_d_scalar_q.
10216         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
10217         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
10218         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
10219         (thunderx2t99_asimd_lut): Add missing tbl types.
10220         (thunderx2t99_asimd_ext): Delete.
10221         (thunderx2t99_asimd_load1_1_mult): Delete.
10222         (thunderx2t99_asimd_load1_2_mult): Delete.
10223         (thunderx2t99_asimd_load1_ldp): New.
10224         (thunderx2t99_asimd_load1): New.
10225         (thunderx2t99_asimd_load2): Add missing *load2* types.
10226         (thunderx2t99_asimd_load3): New.
10227         (thunderx2t99_asimd_load4): New.
10228         (thunderx2t99_asimd_store1_1_mult): Delete.
10229         (thunderx2t99_asimd_store1_2_mult): Delete.
10230         (thunderx2t99_asimd_store2_mult): Delete.
10231         (thunderx2t99_asimd_store2_onelane): Delete.
10232         (thunderx2t99_asimd_store_stp): New.
10233         (thunderx2t99_asimd_store1): New.
10234         (thunderx2t99_asimd_store2): New.
10235         (thunderx2t99_asimd_store3): New.
10236         (thunderx2t99_asimd_store4): New.
10238 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
10240         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
10241         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
10243 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
10244             Segher Boessenkool  <segher@kernel.crashing.org>
10246         PR target/85698
10247         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
10248         operand.
10250 2018-05-17  Richard Biener  <rguenther@suse.de>
10252         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
10253         for pruning loop and prune defs feeding only already visited PHIs.
10255 2018-05-17  Richard Biener  <rguenther@suse.de>
10257         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
10259 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
10260             Richard Biener  <rguenther@suse.de>
10262         PR tree-optimization/85793
10263         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
10264         for VMAT_ELEMENTWISE.
10266 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10268         * internal-fn.h (lookup_internal_fn): Declare
10269         * internal-fn.c (lookup_internal_fn): New function.
10270         * gimple.c (gimple_build_call_from_tree): Handle calls to
10271         internal functions.
10272         * gimple-pretty-print.c (dump_gimple_call): Print "." before
10273         internal function names.
10274         * tree-pretty-print.c (dump_generic_node): Likewise.
10275         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
10277 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
10279         * gimple-fold.h (gimple_build): Make the function forms take
10280         combined_fn rather than built_in_function.
10281         (gimple_simplify): Likewise.
10282         * gimple-match-head.c (gimple_simplify): Likewise.
10283         * gimple-fold.c (gimple_build): Likewise.
10284         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
10285         rather than gimple_build_call_internal.
10286         (get_initial_defs_for_reduction): Likewise.
10287         (vect_create_epilog_for_reduction): Likewise.
10288         (vectorizable_live_operation): Likewise.
10290 2018-05-17  Martin Liska  <mliska@suse.cz>
10292         * gimple-ssa-sprintf.c (format_directive): Do not use
10293         space in between 'G_' and '('.
10295 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
10297         PR target/85323
10298         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
10299         even if the mask is not all ones.
10301         PR target/85323
10302         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
10303         vector.
10304         (ix86_gimple_fold_builtin): Likewise.
10306         PR target/85323
10307         * config/i386/i386.c: Include tree-vector-builder.h.
10308         (ix86_vector_shift_count): New function.
10309         (ix86_fold_builtin): Fold shift builtins by scalar count.
10310         (ix86_gimple_fold_builtin): Likewise.
10312         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
10313         _mm512_setzero): New intrinsics.
10315 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
10316             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10318         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
10319         code generation for cases where splatting a value is not useful.
10320         * simplify-rtx.c (simplify_ternary_operation): Simplify
10321         vec_merge across a vec_duplicate and a paradoxical subreg forming
10322         a vector mode to a vec_concat.
10324 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
10326         * config.gcc: Support "goldmont-plus".
10327         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10328         "goldmont-plus".
10329         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10330         PROCESSOR_GOLDMONT_PLUS.
10331         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
10332         (processor_target_table): Add "goldmont-plus".
10333         (PTA_GOLDMONT_PLUS): Define.
10334         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
10335         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
10336         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
10337         (fold_builtin_cpu): Add "goldmont-plus".
10338         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
10339         (ix86_option_override_internal): Add "goldmont-plus".
10340         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
10341         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
10342         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
10343         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
10345 2018-05-17  Richard Biener  <rguenther@suse.de>
10347         PR tree-optimization/85757
10348         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
10349         remove defs that only feed that PHI from further processing.
10351 2018-05-16  Jim Wilson  <jimw@sifive.com>
10353         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
10354         asterisk to name.
10355         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
10357 2018-05-16  Mark Wielaard  <mark@klomp.org>
10359         * dwarf2out.c (count_index_strings): New function.
10360         (output_indirect_strings): Call count_index_strings and generate
10361         header for dwarf_version >= 5.
10363 2018-05-16  Mark Wielaard  <mark@klomp.org>
10365         * dwarf2out.c (dwarf_FORM): New function.
10366         (set_indirect_string): Use dwarf_FORM.
10367         (reset_indirect_string): Likewise.
10368         (size_of_die): Likewise.
10369         (value_format): Likewise.
10370         (output_die): Likewise.
10371         (add_skeleton_AT_string): Likewise.
10372         (output_macinfo_op): Likewise.
10373         (index_string): Likewise.
10374         (output_index_string_offset): Likewise.
10375         (output_index_string): Likewise.
10376         (count_index_strings): Likewise.
10378 2018-05-16  Carl Love  <cel@us.ibm.com>
10380         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10381         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
10383 2018-05-16  Martin Jambor  <mjambor@suse.cz>
10385         * ipa-prop.c (ipa_free_all_edge_args): Remove.
10386         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
10388 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
10390         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
10391         (fnma<mode>4): Likewise.
10392         (fms<mode>4): Likewise.
10393         (fnms<mode>4): Likewise.
10394         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
10395         (aarch64_fnma<mode>4): Likewise.
10396         (aarch64_fms<mode>4): Likewise.
10397         (aarch64_fnms<mode>4): Likewise.
10398         (aarch64_fnmadd<mode>4): Likewise.
10400 2018-05-16  Jason Merrill  <jason@redhat.com>
10402         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
10404 2018-05-16  Richard Biener  <rguenther@suse.de>
10406         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
10407         (dump_stmt_cost): Declare.
10408         (add_stmt_cost): Dump cost we add.
10409         (add_stmt_costs): New function.
10410         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
10411         No longer exported.
10412         (vect_analyze_stmt): Adjust prototype.
10413         (vectorizable_condition): Likewise.
10414         (vectorizable_live_operation): Likewise.
10415         (vectorizable_reduction): Likewise.
10416         (vectorizable_induction): Likewise.
10417         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
10418         cost vector to pass to vectorizable_ and record afterwards.
10419         (vect_model_reduction_cost): Take cost vector argument and adjust.
10420         (vect_model_induction_cost): Likewise.
10421         (vectorizable_reduction): Likewise.
10422         (vectorizable_induction): Likewise.
10423         (vectorizable_live_operation): Likewise.
10424         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
10425         SLP_TREE_NUMBER_OF_VEC_STMTS.
10426         (vect_analyze_slp_cost_1): Remove.
10427         (vect_analyze_slp_cost): Likewise.
10428         (vect_slp_analyze_node_operations): Take visited args and
10429         a target cost vector.  Avoid processing already visited stmt sets.
10430         (vect_slp_analyze_operations): Use a local cost vector to gather
10431         costs and register those of non-discarded instances.
10432         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
10433         (vect_schedule_slp_instance): Remove copying of
10434         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
10435         zero.
10436         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
10437         adding cost.  Record cost entry location.
10438         (vect_prologue_cost_for_slp_op): Function to compute cost of
10439         a constant or invariant generated for SLP vect in the prologue,
10440         split out from vect_analyze_slp_cost_1.
10441         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
10442         (vect_model_promotion_demotion_cost): Likewise.
10443         (vect_model_store_cost): Likewise, make static.
10444         (vect_model_load_cost): Likewise.
10445         (vectorizable_bswap): Add cost vector arg and adjust.
10446         (vectorizable_call): Likewise.
10447         (vectorizable_simd_clone_call): Likewise.
10448         (vectorizable_conversion): Likewise.
10449         (vectorizable_assignment): Likewise.
10450         (vectorizable_shift): Likewise.
10451         (vectorizable_operation): Likewise.
10452         (vectorizable_store): Likewise.
10453         (vectorizable_load): Likewise.
10454         (vectorizable_condition): Likewise.
10455         (vectorizable_comparison): Likewise.
10456         (can_vectorize_live_stmts): Likewise.
10457         (vect_analyze_stmt): Likewise.
10458         (vect_transform_stmt): Adjust calls to vectorizable_*.
10459         * tree-vectorizer.c: Include gimple-pretty-print.h.
10460         (dump_stmt_cost): New function.
10462 2018-05-16  Richard Biener  <rguenther@suse.de>
10464         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
10465         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
10466         * tree-ssa-dse.c: Include tree-ssa-loop.h.
10467         (check_name): New callback.
10468         (dse_classify_store): Track cycles via a visited bitmap of PHI
10469         defs and simplify handling of in-loop and across loop dead stores
10470         and properly fail for loop-variant refs.  Handle byte-tracking with
10471         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
10472         limiting the walk.
10474 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
10476         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
10477         (vect_get_mask_type_for_stmt): Likewise.
10478         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
10479         split out from...
10480         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
10481         to determine the statement's vector type and the vector type that
10482         should be used for calculating nunits.  Deal with cases in which
10483         the type has to be deferred.
10484         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
10485         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
10486         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
10487         (vect_determine_vf_for_stmt): New functions, split out from...
10488         (vect_determine_vectorization_factor): ...here.
10489         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
10490         (vect_get_mask_type_for_stmt): New functions, split out from
10491         vect_determine_vectorization_factor.
10493 2018-05-16  Richard Biener  <rguenther@suse.de>
10495         * tree-cfg.c (verify_gimple_assign_ternary): Properly
10496         verify the [VEC_]COND_EXPR embedded comparison.
10498 2018-05-15  Martin Sebor  <msebor@redhat.com>
10500         PR tree-optimization/85753
10501         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
10502         RECORD_TYPE in addition to ARRAY_TYPE.
10504 2018-05-15  Martin Sebor  <msebor@redhat.com>
10506         PR middle-end/85643
10507         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
10509 2018-05-15  Richard Biener  <rguenther@suse.de>
10511         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
10512         add by_clobber_p one.  Change algorithm to collect all defs
10513         representing uses we need to walk and try reducing them to
10514         a single one before failing.
10515         (dse_dom_walker::dse_optimize_stmt): Adjust.
10517 2018-05-13  Mark Wielaard  <mark@klomp.org>
10519         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
10520         (size_of_loc_descr): Likewise.
10521         (output_loc_operands): Likewise.
10522         (output_loc_operands_raw): Likewise.
10523         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
10524         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
10525         (hash_loc_operands): Likewise.
10526         (compare_loc_operands): Likewise.
10528 2018-05-14  Mark Wielaard  <mark@klomp.org>
10530         * dwarf2out.c (count_index_addrs): New function.
10531         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
10533 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10535         PR tree-optimization/83648
10536         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
10537         return value as malloc candidate.
10539 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10541         PR ipa/85734
10542         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
10543         param as true in call to suggest_attribute.
10545 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
10547         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
10548         -mreadonly-in-sdata.
10550 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10552         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
10553         New pattern.
10554         (aarch64_crypto_aesd_fused): Likewise.
10556 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
10558         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
10559         (movsi_aarch64): Likewise.
10560         (load_pairsi): Likewise.
10561         (load_pairdi): Likewise.
10562         (store_pairsi): Likewise.
10563         (store_pairdi): Likewise.
10564         (load_pairsf): Likewise.
10565         (load_pairdf): Likewise.
10566         (store_pairsf): Likewise.
10567         (store_pairdf): Likewise.
10568         (zero_extend): Likewise.
10569         (trunc): Swap alternatives.
10570         (fcvt_target): Add '?' to prefer w over r.
10572 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
10574         PR target/85756
10575         * config/i386/i386.md: Disallow non-commutative arithmetics in
10576         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
10577         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
10578         in the peephole2 before it.
10580 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
10582         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
10583         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
10584         (ix86_handle_option): Handle -mcldemote.
10585         * config.gcc: New header.
10586         * config/i386/cldemoteintrin.h: New file.
10587         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
10588         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
10589         -mcldemote.
10590         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10591         OPTION_MASK_ISA_CLDEMOTE.
10592         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
10593         (ix86_valid_target_attribute_inner_p): Ditto.
10594         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
10595         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
10596         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
10597         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
10598         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
10599         (cldemote): New.
10600         * config/i386/i386.opt: Add -mcldemote.
10601         * config/i386/x86intrin.h: New header.
10602         * doc/invoke.texi: Add -mcldemote.
10604 2018-05-14  Richard Biener  <rguenther@suse.de>
10606         * doc/match-and-simplify.texi: Adjust :s documentation.
10608 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
10610         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
10611         intended memcpy size.
10612         (REORDER_45): Likewise.
10614 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
10616         * sort.cc: New file.
10617         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
10618         * vec.c (qsort_chk): Use gcc_qsort.
10619         * Makefile.in (OBJS-libcommon): Add sort.o.
10620         (build/sort.o): New target.  Use it...
10621         (BUILD_RTL): ... here, and...
10622         (build/gencfn-macros): ... here, and...
10623         (build/genmatch): ... here.
10625 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10626             Chung-Ju Wu  <jasonwucj@gmail.com>
10628         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
10629         * config/nds32/nds32-graywolf.md: New file.
10630         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
10631         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
10632         pipeline.
10633         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
10634         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
10635         * config/nds32/nds32.md (pipeline_model): Add graywolf.
10636         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
10637         * config/nds32/pipelines.md: Include n15 settings.
10639 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10640             Chung-Ju Wu  <jasonwucj@gmail.com>
10642         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
10643         * config/nds32/nds32-n13.md: New file.
10644         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
10645         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
10646         pipeline.
10647         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
10648         * config/nds32/nds32.md (pipeline_model): Add n13.
10649         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
10650         * config/nds32/pipelines.md: Include n13 settings.
10652 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
10653             Chung-Ju Wu  <jasonwucj@gmail.com>
10655         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
10656         * config/nds32/nds32-n10.md: New file.
10657         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
10658         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
10659         pipeline.
10660         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
10661         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
10662         * config/nds32/nds32.md (pipeline_model): Add n10.
10663         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
10664         * config/nds32/pipelines.md: Include n10 settings.
10666 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
10667             Kito Cheng  <kito.cheng@gmail.com>
10668             Chung-Ju Wu  <jasonwucj@gmail.com>
10670         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
10671         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
10672         Add enum values for DSP extension instructions.
10673         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
10674         New constraints.
10675         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
10676         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
10677         New code iterators.
10678         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
10679         * config/nds32/nds32-dspext.md: New file for DSP implementation.
10680         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
10681         * config/nds32/nds32-intrinsic.md: Likewise.
10682         * config/nds32/nds32_intrinsic.h: Likewise.
10683         * config/nds32/nds32-md-auxiliary.c: Likewise.
10684         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
10685         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
10686         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
10687         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
10688         * config/nds32/nds32-protos.h: New declarations for DSP extension.
10689         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
10690         TYPE_DMAC in switch statement.
10691         * config/nds32/nds32.c: New checking and implementation for DSP
10692         extension instructions.
10693         * config/nds32/nds32.h: Likewise.
10694         * config/nds32/nds32.md: Likewise.
10695         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
10696         * config/nds32/predicates.md: Implement new predicates for DSP
10697         extension.
10699 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
10701         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
10702         Reformat alternatives and attributes so it is easier to identify
10703         which constraints/attributes go with which instruction.
10704         (mov<mode>_hardfloat32, FMOVE64): Likewise.
10705         (mov<mode>_softfloat32, FMOVE64): Likewise.
10706         (mov<mode>_hardfloat64, FMOVE64): Likewise.
10707         (mov<mode>_softfloat64, FMOVE64): Likewise.
10709 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10711         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10712         subsection.
10713         (Basic PowerPC Built-in Functions): The new name of the
10714         subsection previously known as "PowerPC Built-in Functions".
10715         (Basic PowerPC Built-in Functions Available on all Configurations):
10716         New subsubsection.
10717         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
10718         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
10719         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
10720         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
10722 2018-05-11  Martin Jambor  <mjambor@suse.cz>
10724         PR ipa/85655
10725         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
10726         single const.
10728 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10730         PR target/85733
10731         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
10733 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
10735         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
10736         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
10737         (ix86_handle_option): Handle -mwaitpkg.
10738         * config.gcc: New header.
10739         * config/i386/cpuid.h (bit_WAITPKG): New bit.
10740         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
10741         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
10742         function type.
10743         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10744         OPTION_MASK_ISA_WAITPKG.
10745         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
10746         (ix86_option_override_internal): Add PTA_WAITPKG.
10747         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
10748         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
10749         IX86_BUILTIN_TPAUSE.
10750         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
10751         __builtin_ia32_umwait and __builtin_ia32_tpause.
10752         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
10753         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
10754         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
10755         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
10756         UNSPECV_TPAUSE): New.
10757         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
10758         * config/i386/i386.opt: Add -mwaitpkg.
10759         * config/i386/waitpkgintrin.h: New file.
10760         * config/i386/x86intrin.h: New header.
10761         * doc/invoke.texi: Add -mwaitpkg.
10763 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
10765         PR target/85606
10766         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
10767         equivalent.
10768         (cortex-m0): Use armv6s-m isa.
10769         (cortex-m0plus): Likewise.
10770         (cortex-m1): Likewise.
10771         (cortex-m0.small-multiply): Likewise.
10772         (cortex-m0plus.small-multiply): Likewise.
10773         (cortex-m1.small-multiply): Likewise.
10775 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
10776             Jakub Jelinek  <jakub@redhat.com>
10778         PR tree-optimization/85692
10779         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
10780         source permute as well.
10782 2018-05-11  Martin Liska  <mliska@suse.cz>
10784         PR sanitizer/85556
10785         * doc/extend.texi: Document LLVM style format for no_sanitize
10786         attribute.
10788 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10790         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
10791         mode_supports_vsx_dform_quad to mode_supports_dq_form.
10792         (mode_supports_vsx_dform_quad): Likewise.
10793         (mode_supports_vmx_dform): Move these functions to be next to the
10794         other mode_supports functions.
10795         (mode_supports_dq_form): Likewise.
10796         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
10797         mode_supports_dq_form.
10798         (reg_offset_addressing_ok_p): Likewise.
10799         (offsettable_ok_by_alignment): Likewise.
10800         (rs6000_legitimate_offset_address_p): Likewise.
10801         (legitimate_lo_sum_address_p): Likewise.
10802         (rs6000_legitimize_address): Likewise.
10803         (rs6000_legitimize_reload_address): Likewise.
10804         (rs6000_secondary_reload_inner): Likewise.
10805         (rs6000_preferred_reload_class): Likewise.
10806         (rs6000_output_move_128bit): Likewise.
10808 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10810         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
10811         Generate SImode target register for null target.
10812         <case IX86_BUILTIN_XGETBV>: Ditto.
10813         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
10814         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
10816 2018-05-10  Carl Love  <cel@us.ibm.com>
10818         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
10819         dcbtt and dcbtstt if operands[2] is 0.
10821 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
10823         PR target/85693
10824         * config/i386/sse.md (usadv64qi): New expander.
10826 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
10828         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
10829         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
10830         -maltivec=be support.
10831         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
10832         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
10833         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
10834         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
10835         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
10836         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
10837         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
10838         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
10839         altivec_vsumsws): Adjust.
10840         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
10841         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
10842         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
10843         support.
10844         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
10845         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
10846         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
10847         (altivec_lve<VI_char>x): Delete expand.
10848         (*altivec_lve<VI_char>x_internal): Rename to...
10849         (altivec_lve<VI_char>x): ... this.
10850         (altivec_lvxl_<mode>): Delete expand.
10851         (*altivec_lvxl_<mode>_internal): Rename to ...
10852         (altivec_lvxl_<mode>): ... this.
10853         (altivec_stvxl_<mode>): Delete expand.
10854         (*altivec_stvxl_<mode>_internal): Rename to ...
10855         (altivec_stvxl_<mode>): ... this.
10856         (altivec_stve<VI_char>x): Delete expand.
10857         (*altivec_stve<VI_char>x_internal): Rename to ...
10858         (altivec_stve<VI_char>x): ... this.
10859         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
10860         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
10861         reduc_plus_scal_<mode>): Adjust.
10862         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
10863         comment.
10864         (rs6000_cpu_cpp_builtins): Adjust.
10865         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
10866         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
10867         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
10868         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
10869         -maltivec=be support.
10870         (rs6000_split_vec_extract_var): Adjust.
10871         (rs6000_split_v4si_init): Adjust.
10872         (swap_selector_for_mode): Delete.
10873         (altivec_expand_lvx_be, altivec_expand_stvx_be,
10874         altivec_expand_stvex_be): Delete.
10875         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
10876         -maltivec=be support.
10877         (rs6000_gimple_fold_builtin): Ditto.
10878         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
10879         Adjust.
10880         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
10881         (TARGET_DIRECT_MOVE_64BIT): Adjust.
10882         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
10883         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
10884         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
10885         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
10886         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
10887         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
10888         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
10889         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
10890         anonymous split): Adjust.
10891         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
10892         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
10894 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
10896         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
10897         when --with-gxx-include-dir is also specified.
10898         * configure: Regenerate.
10900 2018-05-09  Jim Wilson  <jimw@sifive.com>
10902         PR target/84797
10903         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
10904         * config/riscv/t-withmultilib: New.
10905         * config/riscv/withmultilib.h: New.
10906         * doc/install.texi: Document RISC-V --with-multilib-list support.
10908 2018-05-09  Richard Biener  <rguenther@suse.de>
10910         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
10911         vector.
10912         (vect_bb_vectorization_profitable_p): Adjust.  Compute
10913         actual scalar cost using the cost vector and the add_stmt_cost
10914         machinery.
10916 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10918         PR rtl-optimization/85645
10919         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
10920         in the REG_CFA_REGISTER note for LR, don't leave it empty.
10922 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10924         PR rtl-optimization/85645
10925         * shrink-wrap.c (spread_components): Return a boolean saying if
10926         anything was changed.
10927         (try_shrink_wrapping_separate): Iterate spread_components until
10928         nothing changes anymore.
10930 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10932         PR rtl-optimization/85645
10933         * regrename.c (build_def_use): Also kill the chains that include the
10934         destination of a REG_CFA_REGISTER note.
10936 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
10938         PR rtl-optimization/85645
10939         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
10940         insn that has a REG_CFA_REGISTER note.
10942 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
10944         * cfgexpand.c (expand_clobber): New function.
10945         (expand_gimple_stmt_1): Use it.
10946         * tree-vect-stmts.c (vect_clobber_variable): New function,
10947         split out from...
10948         (vectorizable_simd_clone_call): ...here.
10949         (vectorizable_store): Emit a clobber either side of an
10950         IFN_STORE_LANES sequence.
10951         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
10953 2018-05-09  Tom de Vries  <tom@codesourcery.com>
10955         PR target/85626
10956         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
10957         (define_insn "trap_if_false"): Add exit after trap.
10959 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
10961         PR rtl-optimization/85638
10962         * bb-reorder.c: Include common/common-target.h.
10963         (create_forwarder_block): New function extracted from...
10964         (fix_up_crossing_landing_pad): ...here.  Rename into...
10965         (dw2_fix_up_crossing_landing_pad): ...this.
10966         (sjlj_fix_up_crossing_landing_pad): New function.
10967         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
10968         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
10969         from both partitions and exit the loop after one iteration.
10971 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10973         Revert:
10974         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10975         subsection.
10976         (Basic PowerPC Built-in Functions): The new name of the
10977         subsection previously known as "PowerPC Built-in Functions".
10978         (Basic PowerPC Built-in Functions Available on all Configurations):
10979         New subsubsection.
10980         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
10981         subsubsection.
10982         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
10983         subsubsection.
10984         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
10985         subsubsection.
10986         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
10987         subsubsection.
10989 2018-05-08  Jim Wilson  <jimw@sifive.com>
10991         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
10992         (LD_EMUL_SUFFIX): New.
10993         (LINK_SPEC): Use it.
10995 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10997         * doc/extend.texi (PowerPC Built-in Functions): Rename this
10998         subsection.
10999         (Basic PowerPC Built-in Functions): The new name of the
11000         subsection previously known as "PowerPC Built-in Functions".
11001         (Basic PowerPC Built-in Functions Available on all Configurations):
11002         New subsubsection.
11003         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
11004         subsubsection.
11005         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
11006         subsubsection.
11007         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
11008         subsubsection.
11009         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
11010         subsubsection.
11012 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11014         PR target/85683
11015         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
11016         after cmpelim optimization.
11018 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
11020         * config.gcc: Support "goldmont".
11021         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
11022         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11023         PROCESSOR_GOLDMONT.
11024         * config/i386/i386.c (m_GOLDMONT): Define.
11025         (processor_target_table): Add "goldmont".
11026         (PTA_GOLDMONT): Define.
11027         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
11028         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
11029         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
11030         (fold_builtin_cpu): Add "goldmont".
11031         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
11032         (ix86_option_override_internal): Add "goldmont".
11033         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
11034         (processor_type): Add PROCESSOR_GOLDMONT.
11035         * config/i386/i386.md: Add CPU "glm".
11036         * config/i386/glm.md: New file.
11037         * config/i386/x86-tune.def: Add m_GOLDMONT.
11038         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
11040 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
11042         PR target/85572
11043         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
11044         E_V4DImode.
11045         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
11046         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
11047         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
11049         PR target/85317
11050         * config/i386/i386.c (ix86_fold_builtin): Handle
11051         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
11053         PR target/85480
11054         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
11055         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
11057 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
11059         PR target/85658
11060         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
11061         (check_arch): Likewise.
11062         (check_fpu): Return the result rather than printing it.
11063         (end arch): Fix operator precedence.
11064         (end cpu): Likewise.
11065         (END): Print the result from check_fpu.
11067 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11068             Alan Hayward  <alan.hayward@arm.com>
11069             David Sherwood  <david.sherwood@arm.com>
11071         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
11072         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
11073         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
11074         (*fcmuo<mode>_and): New patterns.
11076 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
11078         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
11079         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
11080         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
11081         (cmp_op, sve_imm_con): New code attributes.
11082         (SVE_COND_INT_CMP, imm_con): Delete.
11083         (cmp_op): Remove above unspecs from int attribute.
11084         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
11085         to...
11086         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
11087         comparison-specific unspecs.
11088         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
11089         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
11090         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
11091         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
11092         (*vec_fcm<cmp_op><mode>): Rename to...
11093         (*fcm<cmp_op><mode>): ...this and adjust likewise.
11094         (*vec_fcmuo<mode>): Rename to...
11095         (*fcmuo<mode>): ...this and adjust likewise.
11096         (*pred_fcm<cmp_op><mode>): New pattern.
11097         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
11098         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
11099         functions.
11100         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
11101         and UNORDERED.
11102         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
11103         (aarch64_emit_sve_predicated_cond): New function.
11104         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
11105         (aarch64_emit_unspec_cond_or): Replace with...
11106         (aarch64_emit_sve_or_conds): ...this new function.  Use
11107         aarch64_emit_sve_ptrue_op for the individual comparisons and
11108         aarch64_emit_binop to OR them together.
11109         (aarch64_emit_inverted_unspec_cond): Replace with...
11110         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
11111         aarch64_emit_sve_ptrue_op for the comparison and
11112         aarch64_emit_unop to invert the result.
11113         (aarch64_expand_sve_vec_cmp_float): Update after the above
11114         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
11116 2018-05-07  Nathan Sidwell  <nathan@acm.org>
11118         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
11119         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
11120         (Backwards Compatibility): Likewise.
11122 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11124         PR bootstrap/85681
11125         Revert:
11126         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11128         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11129         <prefetch_dynamic_strides>: New const bool field.
11130         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11131         prefetch_dynamic_strides.
11132         (exynosm1_prefetch_tune): Likewise.
11133         (thunderxt88_prefetch_tune): Likewise.
11134         (thunderx_prefetch_tune): Likewise.
11135         (thunderx2t99_prefetch_tune): Likewise.
11136         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11137         to false.
11138         (aarch64_override_options_internal): Update to set
11139         PARAM_PREFETCH_DYNAMIC_STRIDES.
11140         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11141         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11142         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11143         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11144         prefetch-dynamic-strides setting.
11146         2018-05-07  Luis Machado  <luis.machado@linaro.org>
11148         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11149         <minimum_stride>: New const int field.
11150         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11151         minimum_stride field.
11152         (exynosm1_prefetch_tune): Likewise.
11153         (thunderxt88_prefetch_tune): Likewise.
11154         (thunderx_prefetch_tune): Likewise.
11155         (thunderx2t99_prefetch_tune): Likewise.
11156         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11157         (aarch64_override_options_internal): Update to set
11158         PARAM_PREFETCH_MINIMUM_STRIDE.
11159         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11160         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11161         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11162         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11163         stride is constant and is below the minimum stride threshold.
11165 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11167         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
11168         to 512.
11170 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11172         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11173         <prefetch_dynamic_strides>: New const bool field.
11174         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11175         prefetch_dynamic_strides.
11176         (exynosm1_prefetch_tune): Likewise.
11177         (thunderxt88_prefetch_tune): Likewise.
11178         (thunderx_prefetch_tune): Likewise.
11179         (thunderx2t99_prefetch_tune): Likewise.
11180         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
11181         to false.
11182         (aarch64_override_options_internal): Update to set
11183         PARAM_PREFETCH_DYNAMIC_STRIDES.
11184         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11185         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11186         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11187         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11188         prefetch-dynamic-strides setting.
11190 2018-05-07  Luis Machado  <luis.machado@linaro.org>
11192         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11193         <minimum_stride>: New const int field.
11194         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11195         minimum_stride field.
11196         (exynosm1_prefetch_tune): Likewise.
11197         (thunderxt88_prefetch_tune): Likewise.
11198         (thunderx_prefetch_tune): Likewise.
11199         (thunderx2t99_prefetch_tune): Likewise.
11200         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
11201         (aarch64_override_options_internal): Update to set
11202         PARAM_PREFETCH_MINIMUM_STRIDE.
11203         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11204         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11205         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11206         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11207         stride is constant and is below the minimum stride threshold.
11209 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
11211         PR c++/85659
11212         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
11213         the type is addressable.  Don't force op into register if it has
11214         BLKmode.
11216 2018-05-05  Roland McGrath  <mcgrathr@google.com>
11218         PR other/77609
11219         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
11220         any section for which we don't know a specific type it should have,
11221         regardless of name.  Previously this was done only for the exact
11222         names ".init_array", ".fini_array", and ".preinit_array".
11223         (default_elf_asm_named_section): Add comment about
11224         relationship with default_section_type_flags and SECTION_NOTYPE.
11225         (get_section): Don't consider it a type conflict if one side has
11226         SECTION_NOTYPE and the other doesn't, as long as neither has the
11227         SECTION_BSS et al used in the default_section_type_flags logic.
11229 2018-05-05  Tom de Vries  <tom@codesourcery.com>
11231         PR target/85653
11232         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
11233         (workaround_barsyncs): New function.
11234         (nvptx_reorg): Use workaround_barsyncs.
11235         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
11236         (define_expand "nvptx_membar_cta"): New define_expand.
11237         (define_insn "*nvptx_membar_cta"): New insn.
11239 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
11241         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
11242         To improve optimization opportunities.
11243         * builtin-types.def: The new needed builtin types for the above.
11245 2018-05-04  Richard Biener  <rguenther@suse.de>
11247         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
11248         * gimple-ssa-store-merging.c
11249         (imm_store_chain_info::output_merged_store): Remove redundant create,
11250         release split_store vector contents on failure.
11251         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
11252         scalar stmt vector on cache hit.
11254 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
11256         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
11257         Xilinx FP support.
11258         * config.gcc (powerpc-xilinx-eabi*): Remove.
11259         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
11260         support.
11261         (fusion_addis_mem_combo_load): Ditto.
11262         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
11263         FP support.
11264         (rs6000_cpu_cpp_builtins): Ditto.
11265         * config/rs6000/rs6000-linux.c
11266         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
11267         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
11268         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
11269         support.
11270         (rs6000_setup_reg_addr_masks): Ditto.
11271         (rs6000_init_hard_regno_mode_ok): Ditto.
11272         (rs6000_option_override_internal): Ditto.
11273         (legitimate_lo_sum_address_p): Ditto.
11274         (rs6000_legitimize_address): Ditto.
11275         (rs6000_legitimize_reload_address): Ditto.
11276         (rs6000_legitimate_address_p): Ditto.
11277         (abi_v4_pass_in_fpr): Ditto.
11278         (setup_incoming_varargs): Ditto.
11279         (rs6000_gimplify_va_arg): Ditto.
11280         (rs6000_split_multireg_move): Ditto.
11281         (rs6000_savres_strategy): Ditto.
11282         (rs6000_emit_prologue_components): Ditto.
11283         (rs6000_emit_epilogue_components): Ditto.
11284         (rs6000_emit_prologue): Ditto.
11285         (rs6000_emit_epilogue): Ditto.
11286         (rs6000_elf_file_end): Ditto.
11287         (rs6000_function_value): Ditto.
11288         (rs6000_libcall_value): Ditto.
11289         * config/rs6000/rs6000.h: Ditto.
11290         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
11291         (TARGET_MINMAX): ... this.  New.
11292         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
11293         * config/rs6000/rs6000.md: Remove Xilinx FP support.
11294         (*movsi_internal1_single): Delete.
11295         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
11296         mfpu=, mxilinx-fpu): Delete.
11297         * config/rs6000/singlefp.h: Delete.
11298         * config/rs6000/sysv4.h: Remove Xilinx FP support.
11299         * config/rs6000/t-rs6000: Ditto.
11300         * config/rs6000/t-xilinx: Delete.
11301         * config/rs6000/titan.md: Adjust for fp_type removal.
11302         * config/rs6000/vsx.md: Remove Xilinx FP support.
11303         (VStype_simple): Delete.
11304         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
11305         * config/rs6000/xfpu.h: Delete.
11306         * config/rs6000/xfpu.md: Delete.
11307         * config/rs6000/xilinx.h: Delete.
11308         * config/rs6000/xilinx.opt: Delete.
11309         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
11310         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
11312 2018-05-04  Tom de Vries  <tom@codesourcery.com>
11314         PR libgomp/85639
11315         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
11316         if ignore == 0.
11318 2018-05-04  Richard Biener  <rguenther@suse.de>
11320         PR middle-end/85627
11321         * tree-complex.c (update_complex_assignment): We are always in SSA form.
11322         (expand_complex_div_wide): Likewise.
11323         (expand_complex_operations_1): Likewise.
11324         (expand_complex_libcall): Preserve EH info of the original stmt.
11325         (tree_lower_complex): Handle removed blocks.
11326         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
11327         on complex multiplication and division libcall builtins.
11329 2018-05-04  Richard Biener  <rguenther@suse.de>
11331         PR middle-end/85574
11332         * fold-const.c (negate_expr_p): Restrict negation of operand
11333         zero of a division to when we know that can happen without
11334         overflow.
11335         (fold_negate_expr_1): Likewise.
11337 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
11339         PR libstdc++/85466
11340         * real.h (real_nextafter): Declare.
11341         * real.c (real_nextafter): New function.
11342         * fold-const-call.c (fold_const_nextafter): New function.
11343         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
11344         CASE_CFN_NEXTTOWARD.
11345         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
11346         even when arg1_mode is different from arg0_mode.
11348 2018-05-03  Nathan Sidwell  <nathan@acm.org>
11350         * doc/extend.texi (Deprecated Features): Remove
11351         -ffriend-injection.
11352         (Backwards Compatibility): Likewise.
11353         * doc/invoke.texi (C++ Language Options): Likewise.
11354         (C++ Dialect Options): Likewise.
11356 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
11358         PR target/85530
11359         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
11360         _mm512_mask_mullox_epi64): New intrinsics.
11362 2018-05-03  Tom de Vries  <tom@codesourcery.com>
11364         PR testsuite/85106
11365         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11366         dump files): Add offload-tree.
11368 2018-05-03  Richard Biener  <rguenther@suse.de>
11370         PR tree-optimization/85615
11371         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
11372         to loops not nested in BBs loop father to avoid creating multi-entry
11373         loops.
11375 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11377         PR tree-optimization/70291
11378         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
11379         arguments.  Change return type to tree.  Emit libcall as a new
11380         statement rather than replacing existing one when inplace_p is true.
11381         (expand_complex_multiplication_components): New function.
11382         (expand_complex_multiplication): Expand floating-point complex
11383         multiplication using the above.
11384         (expand_complex_division): Rename inner_type parameter to type.
11385         Update expand_complex_libcall call-site.
11386         (expand_complex_operations_1): Update expand_complex_multiplication
11387         and expand_complex_division call-sites.
11389 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11391         PR target/85582
11392         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11393         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11394         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
11395         the highest significant bit of the shift count mask is clear.  In
11396         check whether and[sq]i3 is needed verify that all significant bits
11397         of the shift count other than the highest are set.
11399 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11401         PR libgomp/82428
11402         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
11403         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
11404         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
11405         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
11406         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
11407         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
11408         __builtin_goacc_parlevel_size.
11410 2018-05-02  Richard Biener  <rguenther@suse.de>
11412         PR tree-optimization/85597
11413         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
11414         do not use split vect_get_vec_defs call but call vect_get_slp_defs
11415         directly.
11417 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11419         PR testsuite/85106
11420         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11421         dump files): Add ltrans-tree.
11423 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11425         PR testsuite/85106
11426         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
11427         dump files): Add wpa-ipa.
11429 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
11431         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
11432         powerpc*-*-linux*paired* target.
11433         * config/rs6000/750cl.h: Delete.
11434         * config/rs6000/paired.h: Delete.
11435         * config/rs6000/paired.md: Delete.
11436         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
11437         float support.
11438         * config/rs6000/rs6000-builtin.def: Remove paired float support.
11439         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
11440         comment.  Remove paired float support.
11441         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
11442         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
11443         VECTOR_PAIRED.
11444         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
11445         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
11446         declarations.
11447         * config/rs6000/rs6000.c: Remove paired float support.
11448         (paired_expand_vector_init, paired_expand_vector_move,
11449         paired_emit_vector_compare, paired_emit_vector_cond_expr,
11450         (paired_expand_lv_builtin, paired_expand_stv_builtin,
11451         paired_expand_builtin, paired_expand_predicate_builtin,
11452         paired_init_builtins): Delete.
11453         * config/rs6000/rs6000.h: Remove paired float support.
11454         * config/rs6000/rs6000.md: Remove paired float support.
11455         (move_from_CR_ov_bit): Delete.
11456         * config/rs6000/rs6000.opt (mpaired): Delete.
11457         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
11458         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
11460 2018-05-02  Richard Biener  <rguenther@suse.de>
11462         PR middle-end/85567
11463         * gimplify.c (gimplify_save_expr): When in SSA form allow
11464         SAVE_EXPRs to compute to SSA vars.
11466 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
11468         PR target/85582
11469         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
11470         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
11471         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
11472         clobber operands[2], instead use a new pseudo.  Formatting fixes.
11474 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
11476         PR tree-optimization/85586
11477         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
11478         exit early for statements in the same group if the accesses are
11479         not strided.
11481 2018-05-02  Tom de Vries  <tom@codesourcery.com>
11483         PR lto/85451
11484         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
11485         error message.
11487 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
11489         PR tree-optimization/85143
11490         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
11492 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11494         PR lto/85451
11495         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
11496         not found" error message.
11498 2018-05-01  Tom de Vries  <tom@codesourcery.com>
11500         PR other/83786
11501         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
11502         * vec.c (test_ordered_remove_if): New function.
11503         (vec_c_tests): Call test_ordered_remove_if.
11504         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
11505         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
11506         * tree-vect-patterns.c (vect_pattern_recog_1): Use
11507         VEC_ORDERED_REMOVE_IF.
11509 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11511         PR tree-optimization/82665
11512         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
11513         pointer subtraction where arguments come from a memchr call.
11515 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
11517         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
11518         --push-state --as-needed and --pop-state instead of --as-needed and
11519         --no-as-needed if ld supports it.
11520         * configure: Regenerated.
11522         PR web/85578
11523         * doc/install.texi2html: Replace _002d with - and _002a with * in
11524         generated html files using sed.
11526 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11528         PR c++/85523
11529         * gcc-rich-location.c (blank_line_before_p): New function.
11530         (use_new_line): New function.
11531         (gcc_rich_location::add_fixit_insert_formatted): New function.
11532         * gcc-rich-location.h
11533         (gcc_rich_location::add_fixit_insert_formatted): New function.
11535 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11537         * selftest.c (assert_streq): Rename "expected" and "actual" to
11538         "val1" and "val2".  Extend NULL-handling to cover both inputs
11539         symmetrically, while still requiring both to be non-NULL for a pass.
11540         * selftest.h (assert_streq): Rename "expected" and "actual" to
11541         "val1" and "val2".
11542         (ASSERT_EQ): Likewise.
11543         (ASSERT_EQ_AT): Likewise.
11544         (ASSERT_KNOWN_EQ): Likewise.
11545         (ASSERT_KNOWN_EQ_AT): Likewise.
11546         (ASSERT_NE): Likewise.
11547         (ASSERT_MAYBE_NE): Likewise.
11548         (ASSERT_MAYBE_NE_AT): Likewise.
11549         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
11550         the assertion to pass.
11551         (ASSERT_STREQ_AT): Likewise.
11553 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11555         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
11556         interaction with -pie.
11558 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11560         * selftest.h: Fix alphabetization of per-source-file selftest
11561         declarations.
11563 2018-04-30  Jason Merrill  <jason@redhat.com>
11565         PR c++/61982 - dead stores to destroyed objects.
11566         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
11567         of clobber.
11569 2018-04-30  Jason Merrill  <jason@redhat.com>
11571         * tree.c (build_clobber): New.
11572         * tree.h: Declare it.
11573         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
11575 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11577         * diagnostic-show-locus.c (layout::layout): Update for
11578         location_get_source_line returning a char_span.
11579         (struct char_span): Move to input.h.
11580         (struct correction): Update for fields in char_span becoming
11581         private.
11582         (struct source_line): Update for location_get_source_line
11583         returning a char_span.
11584         (layout::print_line): Likewise.
11585         * edit-context.c (edited_file::print_content): Likewise.
11586         (edited_file::print_diff_hunk): Likewise.
11587         (edited_file::print_run_of_changed_lines): Likewise.
11588         (edited_file::get_num_lines): Likewise.
11589         (edited_line::edited_line): Likewise.
11590         * final.c (asm_show_source): Likewise.
11591         * input.c (location_get_source_line): Convert return type
11592         from const char * to char_span, losing the final "line_len"
11593         param.
11594         (dump_location_info): Update for the above.
11595         (get_substring_ranges_for_loc): Likewise.  Use a char_span
11596         when handling the literal within the line.
11597         (test_reading_source_line): Update for location_get_source_line
11598         returning a char_span.
11599         * input.h (class char_span): Move here from
11600         diagnostic-show-locus.c, converting from a struct to a class.
11601         Make data members private.
11602         (char_span::operator bool): New.
11603         (char_span::length): New.
11604         (char_span::get_buffer): New.
11605         (char_span::operator[]): New.
11606         (char_span::subspan): Make const.
11607         (char_span::xstrdup): New.
11608         (location_get_source_line): Convert return type from const char *
11609         to char_span, losing the final "line_size" param.
11611 2018-04-30  Jan Hubicka  <jh@suse.cz>
11613         * lto-wrapper.c (ltrans_priorities): New static var.
11614         (cmp_priority): New.
11615         (run_gcc): Read priorities and if doing parallel build order
11616         the Makefile by them.
11618 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
11620         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
11622 2018-04-30  Richard Biener  <rguenther@suse.de>
11624         * tree-cfg.c (verify_address): Remove base argument, add
11625         flag whether to check TREE_ADDRESSABLE and do that.
11626         (verify_expr): Remove.
11627         (verify_types_in_gimple_reference): Add pieces from verify_expr.
11628         (verify_gimple_assign_single): Likewise.
11629         (verify_gimple_switch): Likewise.
11630         (verify_expr_location_1): Dereference tp once.  Add (disabled)
11631         piece from verify_expr.
11632         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
11634 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11636         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
11638 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11640         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
11641         (small_data_pattern): Likewise.
11642         (arc_rewrite_small_data): Likewise.
11643         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
11644         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
11645         (get_symbol_alignment): New function.
11646         (legitimate_small_data_address_p): Likewise.
11647         (legitimate_scaled_address): Update, call
11648         legitimate_small_data_address_p.
11649         (output_sdata): New static variable.
11650         (arc_print_operand): Update how we handle small data operands.
11651         (arc_print_operand_address): Likewise.
11652         (arc_legitimate_address_p): Update, use
11653         legitimate_small_data_address_p.
11654         (arc_rewrite_small_data_p): Remove.
11655         (arc_rewrite_small_data_1): Likewise.
11656         (arc_rewrite_small_data): Likewise.
11657         (small_data_pattern): Likewise.
11658         (compact_sda_memory_operand): Update to use
11659         legitimate_small_data_address_p and get_symbol_alignment.
11660         (prepare_move_operands): Don't rewite sdata pattern.
11661         (prepare_extend_operands): Remove.
11662         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
11663         pattern.
11664         (zero_extendqisi2): Likewise.
11665         (zero_extendhisi2): Likewise.
11666         (extendqihi2): Likewise.
11667         (extendqisi2): Likewise.
11668         (extendhisi2): Likewise.
11669         (addsi3): Likewise.
11670         (subsi3): Likewise.
11671         (andsi3): Likewise.
11672         * config/arc/constraints.md (Usd): Change it to memory constraint.
11674 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
11676         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
11677         as source of std instructions.
11678         * config/arc/arc.md (movsi_insn): Update pattern predicate to
11679         allow 6-bit constants as source for store instructions.
11680         (movdi_insn): Update instruction pattern to allow 6-bit constants
11681         as source for store instructions.
11683 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
11685         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
11687 2018-04-30  Nathan Sidwell  <nathan@acm.org>
11688             Sandra Loosemore <sandra@codesourcery.com>
11690         * dumpfile.c (dump_open): Allow '-' for stdout.
11691         * doc/invoke.texi (Developer Options): Document dump filename
11692         determination early.  Document stdin/stdout selection.
11694 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
11696         Microblaze Target: PIC data text relative
11698         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
11699         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
11700         Add declaration.
11701         * config/microblaze/microblaze.h (microblaze_constant_address_p):
11702         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
11703         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
11704         New addressing mode for data-text relative position indepenedent code.
11705         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
11706         'ADDRESS_SYMBOLIC_TXT_REL'.
11707         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
11708         (microblaze_legitimate_pic_operand): Exclude function calls from
11709         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
11710         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
11711         addresses cases.
11712         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11713         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
11714         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
11715         for 'address + offset'.
11716         (microblaze_expand_prologue): Add new function prologue call for
11717         'r20' assignation.
11718         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
11719         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
11720         table in case of TARGET_PIC_DATA_TEXT_REL.
11721         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
11722         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
11723         Add new macros 'UNSPEC_TEXT',
11724         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
11725         + exclude function calls from 'UNSPEC_PLT' in case of data text
11726         relative mode.
11727         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11728         new target hook for generating address diff vector tables in case of
11729         flag_pic.
11730         * doc/tm.texi : Regenerate.
11731         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
11732         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
11733         of addr diff vector generation.
11734         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
11735         target hook definition.
11736         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
11737         Add default function for generate_pic_addr_diff_vec -> flag_pic.
11738         * doc/invoke.texi (Add new pic option): Add new microblaze pic
11739         option for data text relative.
11741 2018-04-30  Richard Biener  <rguenther@suse.de>
11743         * tree-chrec.h (evolution_function_is_constant_p): Remove
11744         redundant check.
11745         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
11747 2018-04-30  Richard Biener  <rguenther@suse.de>
11749         PR bootstrap/85571
11750         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
11752 2018-04-30  Richard Biener  <rguenther@suse.de>
11754         PR tree-optimization/28364
11755         PR tree-optimization/85275
11756         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
11757         copying first exit test.
11759 2018-04-28  Mark Wielaard  <mark@klomp.org>
11761         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
11762         dwarf_version >= 5.
11763         (dwarf_AT): Handle DW_AT_addr_base.
11764         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
11766 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
11768         PR target/84431
11769         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
11770         (*ashl<dwi>3_doubleword_mask_1): Ditto.
11771         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
11772         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
11774 2018-04-28  Richard Biener  <rguenther@suse.de>
11776         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
11777         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
11778         to reflect use.  Only add interesting stmts.
11780 2018-04-27  Martin Jambor  <mjambor@suse.cz>
11782         PR ipa/85549
11783         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
11784         the jump function allows for passing through aggregate values.
11786 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
11788         * input.h (in_system_header_at): Convert from macro to inline
11789         function.
11790         (from_macro_expansion_at): Likewise.
11791         (from_macro_definition_at): Likewise.
11793 2018-04-27  Jeff Law  <law@redhat.com>
11795         * config.gcc: Mark tile* targets as deprecated/obsolete.
11797 2018-04-27  Richard Biener  <rguenther@suse.de>
11799         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
11800         fix for ILP32.
11802 2018-04-27  Richard Biener  <rguenther@suse.de>
11804         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
11806 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
11808         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
11809         with Yd constraint. Set "preferred_for_speed" attribute from
11810         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
11811         with Yd constraint.
11812         (*movdi_internal): Ditto.
11813         (movti_interunit splitters): Remove
11814         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
11815         (movdi_interunit splitters): Ditto.
11816         * config/i386/constraints.md (Ye): Remove.
11817         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
11819 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11821         PR target/85512
11822         * config/aarch64/constraints.md (Usg): Limit to 31.
11823         (Usj): Limit to 63.
11825 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
11827         PR tree-optimization/85529
11828         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
11829         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
11830         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
11831         zero extension or masking of the MSB bit.
11832         (optimize_range_tests): Add FIRST_BB argument, pass it through
11833         to optimize_range_tests_var_bound.
11834         (maybe_optimize_range_tests, reassociate_bb): Adjust
11835         optimize_range_tests callers.
11837 2018-04-26  Richard Biener  <rguenther@suse.de>
11838             Jakub Jelinek  <jakub@redhat.com>
11840         * cgraph.h (symbol_table): Just declare debug method here.
11841         * symtab.c (symbol_table::debug): Define.
11843 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
11845         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
11847 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
11849         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
11850         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
11851         (*movdi_internal): Substitute Yi and Yj constraint with x
11852         and Ym and Yn constraint with y constraint.  Update "isa"
11853         attribute and set "preferred_for_speed" attribute from
11854         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
11855         (*movsi_internal): Ditto.
11856         (*movdf_internal): Ditto.
11857         (*movsf_internal): Ditto.
11858         (*zero_extendsidi2): Ditto.
11859         * config/i386/sse.md (vec_set<mode>_0): Ditto.
11860         (sse2_loadld): Ditto.
11861         (*vec_extract<ssevecmodelower>_0): Ditto.
11862         (*vec_extractv4si_0_zext_sse4): Ditto.
11863         (vec_concatv2di): Ditto.
11864         (*vec_dup<mode>): Ditto.
11865         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
11866         * config/i386/constraints.md (Yi): Remove.
11867         (Yj): Remove.
11868         (Ym): Remove.
11869         (Yn): Remove.
11871 2018-04-26  Nathan Sidwell  <nathan@acm.org>
11873         * dumpfile.c (dump_open): New.
11874         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
11875         (dump_finish): Detect stdio/stderr by value not name.
11877 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
11879         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
11881 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11883         PR target/84952
11884         * config/nvptx/nvptx.c (verify_neutering_jumps)
11885         (verify_neutering_labels): New function
11886         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
11888 2018-04-26  Tom de Vries  <tom@codesourcery.com>
11890         PR target/84025
11891         * config/nvptx/nvptx.c (needs_neutering_p): New function.
11892         (nvptx_single): Use needs_neutering_p to skip over insns that do not
11893         need neutering.
11895 2018-04-26  Richard Biener <rguenther@suse.de>
11896             Tom de Vries  <tom@codesourcery.com>
11898         PR lto/85422
11899         * lto-streamer-out.c (output_function): Fixup loops if required to match
11900         discovery done in the reader.
11902 2018-04-26  Richard Biener  <rguenther@suse.de>
11904         PR tree-optimization/85116
11905         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
11906         have a loop exit from the single latch predecessor.  Remove
11907         case of header with just condition.
11908         (ch_base::copy_headers): Exclude infinite loops from any
11909         processing.
11910         (pass_ch::execute): Record exits.
11912 2018-04-26  Richard Biener  <rguenther@suse.de>
11914         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
11915         prologue cost vector and pass it to vect_get_load_cost.
11916         (vect_get_peeling_costs_all_drs): Likewise.
11917         (vect_peeling_hash_get_lowest_cost): Likewise.
11918         (vect_enhance_data_refs_alignment): Likewise.
11920 2018-04-26  Richard Biener  <rguenther@suse.de>
11922         PR middle-end/85450
11923         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
11924         checking of integer<->pointer conversions.
11925         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
11926         sign-/zero-extending pointer types.
11927         (expand_omp_for_static_chunk): Likewise.
11929 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
11930             Jean Lee  <xiaoyur347@gmail.com>
11932         * config/mips/mips.c (mips_asan_shadow_offset): New function.
11933         (TARGET_ASAN_SHADOW_OFFSET): Define.
11934         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
11935         true for -fsanitize=address.
11937 2018-04-25  Mark Wielaard  <mark@klomp.org>
11939         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
11940         shorter ones.
11942 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11944         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
11945         than "alu", remove explicit "memory" and "imm_disp" attributes.
11946         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
11948         PR middle-end/85414
11949         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
11950         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
11951         gen_lowpart_no_emit.
11953 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
11955         PR target/85473
11956         * config/i386/i386.c (ix86_expand_builtin): Change memory
11957         operand to XI, extend p0 to Pmode.
11958         * config/i386/i386.md: Change unspec volatile and operand
11959         1 mode to XI, change operand 0 mode to P.
11961 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11963         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
11964         GET_MODE_MASK before any checking.
11965         (nds32_can_use_bset_p): Likewise.
11966         (nds32_can_use_btgl_p): Likewise.
11968 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11970         * config/nds32/nds32-doubleword.md: New define_split pattern for
11971         illegal register number.
11973 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11975         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
11977 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
11979         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
11981 2018-04-25  Richard Biener  <rguenther@suse.de>
11983         * lto-streamer.h (LTO_major_version): Bump to 8.
11985 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
11987         * BASE-VER: Set to 9.0.0.
11989 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
11991         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
11992         in __abskf2 and __powikf2.
11994 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11996         PR target/85512
11997         * config/aarch64/constraints.md (Usg, Usj): New constraints.
11998         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
11999         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
12000         Use the above on operand 2.  Reindent.
12001         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
12003 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12005         PR target/85485
12006         * common/config/i386/i386-common.c (ix86_handle_option): Don't
12007         handle OPT_mcet.
12008         * config/i386/i386.opt (mcet): Removed.
12009         * doc/install.texi: Remove -mcet documentation.
12010         * doc/invoke.texi: Likewise.
12012 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
12014         PR target/85485
12015         * doc/install.texi: Remove -mcet from bootstrap-cet.
12017 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12019         PR target/85511
12020         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
12021         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
12022         if TARGET_64BIT.
12024         PR target/85503
12025         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
12026         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
12027         containing a CONST_VECTOR.
12029 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
12031         * doc/install.texi: Update newlib dependency for nvptx.
12033 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12035         PR target/85508
12036         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
12037         instead of INTVAL when shifting x left.
12039 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
12041         PR tree-optimization/85478
12042         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
12043         vect_grouped_store_supported for single element vectors.
12045 2018-04-24  Richard Biener  <rguenther@suse.de>
12047         PR target/85491
12048         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
12049         load cost increase to the case of non-constant step.
12051 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
12053         PR target/84828
12054         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
12055         destination if any_malformed_asm.
12057 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
12059         PR middle-end/85496
12060         * expr.c (store_field): In the bitfield case, if the value comes from
12061         a function call and is returned in registers by means of a PARALLEL,
12062         do not change the mode of the temporary unless BLKmode and VOIDmode.
12064 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
12066         PR rtl-optimization/85423
12067         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
12068         dependencies to debug insns when the previous insn is non-debug.
12070 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12072         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
12073         enums into a single definition.
12074         (fls): Fix predicates and printing.
12075         (seti): Likewise.
12077 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
12079         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
12080         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
12081         and short u6 immediate.
12082         (check_if_valid_sleep_operand): Remove.
12083         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
12085 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12087         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
12088         flag_always_save_lp condition.
12089         * config/nds32/nds32.opt (malways-save-lp): New option.
12091 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12093         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
12094         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
12095         * config/nds32/nds32.h
12096         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
12097         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
12099 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12101         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
12102         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
12104 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
12105             Chung-Ju Wu  <jasonwucj@gmail.com>
12107         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
12108         Declare.
12109         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
12110         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
12112 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12114         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
12116 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12118         * config/nds32/nds32-protos.h (nds32_data_alignment,
12119         nds32_local_alignment): Declare.
12120         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
12121         nds32_local_alignment): New functions.
12122         (TARGET_CONSTANT_ALIGNMENT): Define.
12123         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
12125 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12127         * config/nds32/nds32.c
12128         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
12129         (TARGET_MODES_TIEABLE_P): Likewise.
12131 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
12133         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
12134         level Ofast and Og.
12136 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
12137             Chung-Ju Wu  <jasonwucj@gmail.com>
12139         * config/nds32/constants.md (unspec_volatile_element): Add enum values
12140         for unaligned access.
12141         * config/nds32/nds32-intrinsic.c: Implementation of expanding
12142         unaligned access.
12143         * config/nds32/nds32-intrinsic.md: Likewise.
12144         * config/nds32/nds32_intrinsic.h: Likewise.
12145         * config/nds32/nds32.h (nds32_builtins): Likewise.
12146         * config/nds32/nds32.opt (munaligned-access): New option.
12147         * config/nds32/nds32.c (nds32_asm_file_start): Display
12148         flag_unaligned_access status.
12150 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12152         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
12153         -mno-relax is present.
12154         * config/riscv/linux.h (LINK_SPEC): Ditto.
12156 2018-04-20  Martin Sebor  <msebor@redhat.com>
12158         PR c/85365
12159         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
12160         for null pointers.
12161         (gimple_fold_builtin_stxcpy_chk): Same.
12162         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
12164 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
12166         PR target/85456
12167         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
12168         __powikf2 when long double is IEEE 128-bit.
12170 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
12172         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
12173         step to make sure stack always aligned.
12175 2018-04-20  Carl Love  <cel@us.ibm.com>
12177         PR target/83402
12178         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
12179         size check for arg0.
12181 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12182             Tom de Vries  <tom@codesourcery.com>
12184         PR target/85445
12185         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
12186         Emit insns for calls too.
12187         (nvptx_find_par): Always look for worker-level predecessor insn.
12188         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
12189         calls.
12190         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
12191         (nvptx_process_pars): Propagate frames for calls.
12193 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
12195         PR target/85469
12196         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
12197         Removed.
12198         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
12199         (ix86_handle_option): Don't handle OPT_mibt.
12200         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
12201         __SHSTK__.
12202         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
12203         has_ibt and ibt.
12204         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
12205         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
12206         (ix86_target_macros): Define __CET__ with flag_cf_protection
12207         for -fcf-protection.
12208         * config/i386/i386.c (isa2_opts): Remove -mibt.
12209         * config/i386/i386.h (TARGET_IBT): Removed.
12210         (TARGET_IBT_P): Likewise.
12211         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
12212         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
12213         * config/i386/i386.opt (mcet): Update help message.
12214         (mshstk): Likewise.
12215         (mibt): Removed.
12216         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
12217         -mcet as an alias for -mshstk.
12219 2018-04-20  Richard Biener <rguenther@suse.de>
12221         PR middle-end/85475
12222         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
12223         complexity by forcing a single use of the multiply operand.
12225 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12227         ipa/85449
12228         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
12229         recursion dependency to only apply to non-clones.
12231 2018-04-20  Martin Jambor  <mjambor@suse.cz>
12233         ipa/85447
12234         * ipa-cp.c (create_specialized_node): Check that clones of
12235         self-recursive edges exist during IPA-CP.
12237 2018-04-19  Toon Moene  <toon@moene.org>
12239         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
12240         by -O3.
12242 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12244         PR tree-optimization/85467
12245         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
12246         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
12247         VECTOR_CST element to type.
12249 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12251         PR target/85397
12252         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
12253         * config/i386/i386.md (builtin_setjmp_setup): Removed.
12254         (builtin_longjmp): Likewise.
12255         (save_stack_nonlocal): New pattern.
12256         (restore_stack_nonlocal): Likewise.
12258 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12260         PR target/85404
12261         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12262         Replace ASM_OUTPUT_LABEL with fprintf.
12264 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
12266         PR target/85417
12267         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
12268         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
12269         * config/i386/i386-c.c (ix86_target_macros_internal): Also
12270         define __IBT__ and __SHSTK__ for -fcf-protection.
12271         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
12272         TARGET_IBT.
12273         (ix86_trampoline_init): Likewise.
12274         (x86_output_mi_thunk): Likewise.
12275         (ix86_notrack_prefixed_insn_p): Likewise.
12276         (ix86_option_override_internal): Don't disallow -fcf-protection.
12277         * config/i386/i386.md (rdssp<mode>): Also enable for
12278         -fcf-protection.
12279         (incssp<mode>): Likewise.
12280         (nop_endbr): Likewise.
12281         * config/i386/i386.opt (mcet): Change help message to built-in
12282         functions only.
12283         (mibt): Likewise.
12284         (mshstk): Likewise.
12285         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
12286         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
12287         enable CET built-in functions.
12289 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
12291         * common/config/i386/i386-common.c
12292         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
12293         OPTION_MASK_ISA_MOVDIRI_UNSET,
12294         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
12295         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
12296         * config.gcc (movdirintrin.h): New header.
12297         * config/i386/cpuid.h (bit_MOVDIRI,
12298         bit_MOVDIR64B): New bits.
12299         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
12300         and -mmvodir64b.
12301         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
12302         (VOID, PVOID, PCVOID)): New function types.
12303         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
12304         __builtin_ia32_directstoreu_u64,
12305         __builtin_ia32_movdir64b): New builtins.
12306         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
12307         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
12308         and -mmovdiri.
12309         (ix86_valid_target_attribute_inner_p): Ditto.
12310         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
12311         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
12312         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
12313         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
12314         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
12315         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
12316         (movdiri<mode>, movdir64b_<mode>): New.
12317         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
12318         * config/i386/immintrin.h: Include movdirintrin.h.
12319         * config/i386/movdirintrin.h: New file.
12320         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
12322 2018-04-19  Richard Biener  <rguenther@suse.de>
12324         PR middle-end/85455
12325         * cfg.c (clear_bb_flags): When loop state says we have
12326         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
12328 2018-04-19  Richard Biener  <rguenther@suse.de>
12330         PR tree-optimization/84737
12331         * tree-vect-data-refs.c (vect_copy_ref_info): New function
12332         copying restrict info.
12333         (vect_setup_realignment): Use it.
12334         * tree-vectorizer.h (vect_copy_ref_info): Declare.
12335         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
12336         the first DR to all generated stores.
12337         (vectorizable_load): Likewise for loads.
12339 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
12341         PR tree-optimization/85446
12342         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
12343         the integral and pointer types to have the same precision.
12345         * doc/install.texi: Document --disable-cet being the default and
12346         --enable-cet=auto.
12348 2018-04-18  Martin Liska  <mliska@suse.cz>
12350         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
12351         style.
12353 2018-04-18  Martin Liska  <mliska@suse.cz>
12355         Revert
12356         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
12358         PR ipa/83983
12359         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
12360         arguments if they are comparable.
12362 2018-04-18  Martin Liska  <mliska@suse.cz>
12364         Revert
12365         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
12367         PR lto/84805
12368         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
12369         incomplete types.
12371 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
12373         PR target/85388
12374         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
12375         ENDBR after calling __morestack.
12377 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
12379         PR jit/85384
12380         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
12381         by using gcc_base_ver to generate a gcc_driver_version, and use
12382         it when generating GCC_DRIVER_NAME.
12383         * configure: Regenerate.
12385 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
12387         PR target/81084
12388         * config.gcc: Obsolete powerpc*-*-*spe*.
12390 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12392         PR debug/84637
12393         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
12394         (stabstr_D): Change type of unum from unsigned int to
12395         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
12396         type.
12398 2018-04-17  Jim Wilson  <jimw@sifive.com>
12400         PR 84856
12401         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
12402         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
12403         Set arg_pointer_offset after using pretend_args_size.
12405 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12407         PR rtl-optimization/85431
12408         * dse.c (record_store): Ignore zero width stores.
12410         PR sanitizer/85230
12411         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
12412         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
12413         __builtin_stack_restore rather than after it.
12414         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
12415         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
12416         argument instead of virtual_dynamic_stack_rtx.
12418 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12420         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
12421         New prototype.
12422         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12423         Add note to error message to explain internal mapping of overloaded
12424         built-in function name to non-overloaded built-in function name.
12425         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
12426         function.
12428 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
12430         PR target/85424
12431         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
12432         where the inputs overlap with the output.
12434 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12436         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
12437         (=v, v) alternative and explicit "memory" attribute.
12438         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
12439         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12440         attributes.
12441         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
12442         "sselog1" type instead of "sselog".
12443         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
12444         "sselog".  Remove explicit "memory" attribute.
12445         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
12446         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12447         attributes.
12448         (vec_extract_hi_v32hi): Merge all alternatives into one, use
12449         "sselog1" type instead of "sselog".  Remove explicit "memory"
12450         attribute.
12451         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
12452         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12453         attribute.
12454         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
12455         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
12456         attributes.
12457         (vec_extract_hi_v64qi): Merge all alternatives into one, use
12458         "sselog1" type instead of "sselog".  Remove explicit "memory"
12459         attribute.
12460         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
12461         use "sselog1" type instead of "sselog".  Remove explicit "memory"
12462         attribute.
12464         PR target/85430
12465         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
12467         PR middle-end/85414
12468         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
12469         on a SUBREG.
12471 2018-04-17  Martin Jambor  <mjambor@suse.cz>
12473         PR ipa/85421
12474         * ipa-cp.c (create_specialized_node): Call
12475         expand_all_artificial_thunks if necessary.
12477 2018-04-17  Martin Liska  <mliska@suse.cz>
12479         PR lto/85405
12480         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
12481         in message, remote space in between '_G' and '('.
12483 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
12485         PR target/85281
12486         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
12487         avx512f_vmcmp<mode>3<round_saeonly_name>,
12488         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
12489         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
12490         avx512f_rndscale<mode><round_saeonly_name>,
12491         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
12492         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
12493         Use %<iptr>2 instead of %2 for -masm=intel.
12494         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
12495         avx512f_vcvttss2usi<round_saeonly_name>,
12496         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
12497         -masm=intel.
12498         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
12499         avx512f_vcvttsd2usi<round_saeonly_name>,
12500         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
12501         Use %q1 instead of %1 for -masm=intel.
12502         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
12503         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
12504         of %3 for -masm=intel.
12505         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
12506         -masm=intel.
12507         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
12508         -masm=intel.
12509         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
12510         -masm=intel.
12511         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
12512         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
12513         %g1.
12514         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
12515         -masm=intel.
12516         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
12517         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
12518         %g1 and one with %0 and %1.
12519         (avx512er_vmrcp28<mode><round_saeonly_name>,
12520         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
12521         %1 for -masm=intel.
12522         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
12523         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
12524         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
12525         of %0 and %{%4%} for -masm=intel.
12526         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
12527         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
12528         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
12529         order of %0 and %{%5%}%{z%} for -masm=intel.
12531 2018-04-17  Jan Hubicka  <jh@suse.cz>
12533         PR lto/85405
12534         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
12536 2018-04-17  Martin Liska  <mliska@suse.cz>
12538         PR ipa/85329
12539         * multiple_target.c (create_dispatcher_calls): Set apostrophes
12540         for target_clone error message.  Make default implementation
12541         clone to be a local declaration.
12542         (separate_attrs): Add new argument and check for an empty
12543         string.
12544         (expand_target_clones): Handle it.
12545         (ipa_target_clone): Make redirection just for target_clones
12546         functions.
12548 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
12549             Tom de Vries  <tom@codesourcery.com>
12551         PR middle-end/84955
12552         * omp-expand.c (expand_oacc_for): Add dummy false branch for
12553         tiled basic blocks without omp continue statements.
12555 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
12557         PR target/83660
12558         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
12559         vec_extract expression as having side effects to make sure it gets
12560         a cleanup point.
12562 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
12564         PR target/85403
12565         * config/i386/i386.c (get_builtin_code_for_version): Check
12566         error_mark_node.
12568 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
12570         PR target/84331
12571         * config.gcc: Support "skylake".
12572         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12573         PROCESSOR_SKYLAKE.
12574         * config/i386/i386.c (m_SKYLAKE): Define.
12575         (processor_target_table): Add "skylake".
12576         (ix86_option_override_internal): Add "skylake".
12577         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
12578         PROCESSOR_CANNONLAKE.
12579         (get_builtin_code_for_version): Fix priority for
12580         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
12581         PROCESSOR_SKYLAKE-AVX512.
12582         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
12583         (processor_type): Add PROCESSOR_SKYLAKE.
12585 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
12586             Jason Merrill  <jason@redhat.com>
12588         PR c++/85112
12589         * convert.c (convert_to_integer_1): Use direct recursion for
12590         enumeral types and types with a precision less than the number
12591         of bits in their mode.
12593 2018-04-16  Julia Koval  <julia.koval@intel.com>
12595         PR target/84413
12596         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
12597         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
12599 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
12601         PR target/85293
12602         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
12603         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
12604         and -mno-direct-move.
12606 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
12608         PR target/83402
12609         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
12610         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
12611         Ensure negative shifts result in {0}.
12613 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
12615         PR rtl-optimization/79916
12616         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
12617         regs (if any) to define how to gnerate SD moves when LRA is in
12618         progress.
12620 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
12622         PR rtl-optimization/85393
12623         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
12624         * except.c (expand_dw2_landing_pad_for_region): Make static.
12625         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
12626         a label and unconditional jump to old_bb, rather than
12627         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
12628         basic block.
12630         PR rtl-optimization/85376
12631         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
12632         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
12633         instead of a specific value.
12635 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12636             Bin Cheng  <bin.cheng@arm.com>
12638         PR tree-optimization/82965
12639         PR tree-optimization/83991
12640         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
12641         by_profile_only parameter.
12642         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
12643         information if the loop was predicted to iterate too many times.
12644         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
12646 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
12648         PR lto/71991
12649         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
12650         always inline.
12652 2018-04-13  Martin Liska  <mliska@suse.cz>
12653             Jakub Jelinek  <jakub@redhat.com>
12655         PR middle-end/81657
12656         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
12657         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
12658         * builtins.c (expand_builtin_memory_copy_args): Use
12659         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
12660         handle dest_addr == pc_rtx.
12662 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
12664         PR target/85291
12665         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
12666         asked to not generate direct moves.
12667         (fix_trunc<mode>si2_stfiwx): Similar.
12668         (fix_trunc<mode>si2_internal): Similar.
12670 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12672         PR debug/83157
12673         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
12674         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
12675         lookup if dest in some wider mode is known to be const0_rtx and
12676         if so, record permanent equivalence for it to be ZERO_EXTEND of
12677         the narrower mode destination.
12679 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12681         * lto-streamer-out.c (output_function): Revert 259346.
12682         * omp-expand.c (expand_oacc_for): Likewise.
12684 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
12686         PR rtl-optimization/85354
12687         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
12688         * sel-sched.c (sel_global_init): ... here.
12690 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
12692         PR target/85238
12693         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
12694         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12695         mode for PE-COFF targets.
12696         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
12697         (i386_pe_asm_lto_end): Likewise.
12698         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
12699         (TARGET_ASM_LTO_END): Likewise.
12700         * config/i386/winnt.c (saved_debug_info_level): New static variable.
12701         (i386_pe_asm_lto_start): New function.
12702         (i386_pe_asm_lto_end): Likewise.
12704 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
12705             Richard Biener  <rguenther@suse.de>
12707         PR middle-end/84955
12708         * lto-streamer-out.c (output_function): Fix CFG loop state before
12709         streaming out.
12710         * omp-expand.c (expand_oacc_for): Handle calls to internal
12711         functions like regular functions.
12713 2018-04-12  Richard Biener  <rguenther@suse.de>
12715         PR lto/85371
12716         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
12717         for the early LTO debug to properly generate references to it
12718         during DIE emission.  Do not re-use that for the skeleton for
12719         split-dwarf.
12720         (dwarf2out_early_finish): Likewise.
12722 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12724         PR target/85328
12725         * config/i386/sse.md
12726         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
12727         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
12728         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
12729         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
12730         and output is a reg, avoid creating invalid lowpart subreg, but
12731         instead split into a 512-bit move.  Don't split if not AVX512VL,
12732         input is xmm16+ reg and output is a mem.
12733         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
12734         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
12735         xmm16+ reg and output is a mem.
12737 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12739         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
12740         also for flag_dwarf2_cfi_asm.
12742 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
12744         PR rtl-optimization/85342
12745         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
12746         a bool scalar var inside of the loop instead.  Don't try to update
12747         recog_data.operand after failed apply_change_group.
12749 2018-04-12  Tom de Vries  <tom@codesourcery.com>
12751         PR target/85296
12752         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
12753         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
12754         array with flexible array member as array without given dimension.
12755         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
12756         argument for undefined param to true.
12758 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
12760         PR target/85321
12761         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12762         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
12763         from PowerPC section.
12764         * config/rs6000/sysv4.opt (mcall-): Improve help text.
12765         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
12766         help text that is too long.
12767         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
12768         help text that is too long.
12769         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
12770         help text that is too long.
12772 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
12774         * config/alpha/alpha.md (stack_probe_internal): Rename
12775         from "probe_stack".  Update all callers.
12777 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12779         PR rtl-optimization/84566
12780         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
12781         sched_macro_fuse_insns.
12783 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12785         PR target/84301
12786         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
12787         (compute_block_dependences): ... from here.
12789 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12791         PR tree-optimization/85331
12792         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
12793         from int to HOST_WIDE_INT.
12795 2018-04-11  Martin Jambor  <mjambor@suse.cz>
12797         PR ipa/84149
12798         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
12799         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
12800         not the same as the source val.
12801         (cgraph_edge_brings_value_p): New parameter.
12802         (gather_edges_for_value): Pass destination value to
12803         cgraph_edge_brings_value_p.
12804         (perhaps_add_new_callers): Likewise.
12805         (get_info_about_necessary_edges): Likewise and exclude values brought
12806         only by self-recursive edges.
12807         (create_specialized_node): Redirect only clones of self-calling edges.
12808         (+self_recursive_pass_through_p): New function.
12809         (find_more_scalar_values_for_callers_subset): Use it.
12810         (find_aggregate_values_for_callers_subset): Likewise.
12811         (known_aggs_to_agg_replacement_list): Removed.
12812         (decide_whether_version_node): Re-calculate known constants for all
12813         remaining context clones.
12815 2018-04-11  Richard Biener  <rguenther@suse.de>
12817         PR lto/85339
12818         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
12819         from early DWARF output.
12820         (dwarf2out_early_finish): Output line info unconditionally into
12821         early DWARF and add reference to it.
12823 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12825         PR target/85281
12826         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
12827         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
12828         other than V2DFmode using iptr mode attribute.
12829         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
12831 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
12833         PR rtl-optimization/84659
12834         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
12836 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
12838         PR debug/85302
12839         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
12840         SIZEP is NULL.
12841         (output_loc_list): Pass address of a dummy size variable even in the
12842         locview handling loop.
12843         (index_location_lists): Add comment on why skip_loc_list_entry can't
12844         call size_of_locs.
12846 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12848         PR target/85261
12849         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
12850         into register.
12852 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
12854         PR target/85321
12855         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
12856         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
12857         and -mstring-compare-inline-limit.
12859 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12861         PR target/85287
12862         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
12863         for stack clash protection in a register whenever we need it to be in
12864         a register.
12866 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12868         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
12869         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
12871 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
12873         PR target/85321
12874         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
12875         the help text.
12876         (mlong-double-): Ditto.
12877         * config/rs6000/sysv4.opt (msdata=): Ditto.
12878         (mtls-size=): Ditto.
12880 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12882         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12883         erroneous entries for
12884         "vector int vec_ldl (int, long int *)", and
12885         "vector unsigned int vec_ldl (int, unsigned long int *)".
12886         Add comments and entries for
12887         "vector bool char vec_ldl (int, bool char *)",
12888         "vector bool short vec_ldl (int, bool short *)",
12889         "vector bool int vec_ldl (int, bool int *)",
12890         "vector bool long long vec_ldl (int, bool long long *)",
12891         "vector pixel vec_ldl (int, pixel *)",
12892         "vector long long vec_ldl (int, long long *)",
12893         "vector unsigned long long vec_ldl (int, unsigned long long *)".
12894         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
12895         type tree bool_long_long_type_node and correct definition of
12896         bool_V2DI_type_node to make reference to this new type tree.
12897         (rs6000_mangle_type): Replace erroneous reference to
12898         bool_long_type_node with bool_long_long_type_node.
12899         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
12900         comments to emphasize sign distinctions for char and int types and
12901         replace RS6000_BTI_bool_long constant with
12902         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
12903         use of RS6000_BTI_pixel.
12904         (bool_long_type_node): Remove this macro definition.
12905         (bool_long_long_type_node): New macro definition
12907 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12909         PR rtl-optimization/85300
12910         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
12911         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
12912         simplify_unary_operation fails.
12914 2018-04-10  Martin Liska  <mliska@suse.cz>
12916         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
12917         cgraph_edge and ipa_ref.
12919 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
12921         PR target/85177
12922         PR target/85255
12923         * config/i386/sse.md
12924         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
12925         computation of the VEC_MERGE selector from mask.
12926         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
12927         Fix decoding of the VEC_MERGE selector into mask.
12929 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12931         PR tree-optimization/85286
12932         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
12934 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
12936         * final.c (final_1): Set insn_last_address as well as
12937         insn_current_address.
12939 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12941         PR target/85173
12942         * explow.c (emit_stack_probe): Call validize_mem on memory location
12943         before passing it to gen_probe_stack.  Create address operand and
12944         legitimize it for the probe_stack_address case.
12946 2018-04-09  Jan Hubicka  <jh@suse.cz>
12948         PR lto/85078
12949         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
12950         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
12951         * tree.c (free_lang_data_in_type): Fix handling of binfos;
12952         walk basetypes.
12953         (free_lang_data): Rebuild type inheritance graph.
12955 2018-04-09  Martin Sebor  <msebor@redhat.com>
12957         * invoke.texi (-finline-small-functions): Mention other optimization
12958         options.
12959         (-findirect-inlining, -fpartial-inlining): Same.
12960         (-finline-functions-called-once): Same.
12961         (-freorder-blocks-and-partition): Same.
12963 2018-04-09  Jan Hubicka  <jh@suse.cz>
12965         PR rtl/84058
12966         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
12967         jumps; choose last target that matches the criteria (i.e.
12968         no partition changes for non-crossing jumps).
12969         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
12970         support for redirecting crossing jumps to non-crossing.
12972 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
12974         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
12975         also for naked functions.
12977 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
12979         * config/arc/arc.md (add_shift): New pattern.
12980         (add_shift2): Likewise.
12981         (sub_shift): Likewise.
12982         (sub_shift_cmp0_noout): Likewise.
12983         (compare_si_ashiftsi): Likewise.
12984         (xbfu_cmp0_noout): New combine pattern.
12985         (xbfu_cmp0"): Likewise.
12986         (movsi_set_cc_insn): Place the predicable variant first.
12987         (commutative_binary_cmp0_noout): Remove clobber.
12988         (commutative_binary_cmp0): New pattern.
12989         (noncommutative_binary_cmp0): Likewise.
12990         (noncommutative_binary_cmp0_noout): Likewise.
12991         (noncommutative_binary_comparison_result_used): Removed.
12992         (rsub_cmp0): New pattern.
12993         (rsub_cmp0_noout): Likewise.
12994         (extzvsi): Changed, keep only meaningful variants.
12995         (SQH, SEZ): New iterators.
12996         (SQH_postfix): New mode attribute.
12997         (SEZ_prefix): New code attribute.
12998         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
12999         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
13000         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
13001         of numerical value.
13002         (noncommutative_operator): Check the availability of barrel
13003         shifter option.
13005 2018-04-09  Richard Biener  <rguenther@suse.de>
13007         PR tree-optimization/85284
13008         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
13009         Only use the niter constraining form of simple_iv when the exit
13010         is always executed.
13012 2018-04-09  Tom de Vries  <tom@codesourcery.com>
13014         PR target/84041
13015         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13016         (define_expand "*memory_barrier"): New define_expand.
13017         (define_insn "memory_barrier"): New insn.
13019 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13021         PR rtl-optimization/80463
13022         PR rtl-optimization/83972
13023         PR rtl-optimization/83480
13025         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
13026         correct producer for the insn.
13027         (tidy_control_flow): Fixup seqnos in case of debug insns.
13029 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13031         PR rtl-optimization/83913
13033         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
13034         different sched-times when merging exprs.
13036 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13038         PR rtl-optimization/83962
13040         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
13041         tidy_fallthru_edge and tidy_control_flow.
13043 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
13045         PR rtl-optimization/83530
13047         * sel-sched.c (force_next_insn): New global variable.
13048         (remove_insn_for_debug): When force_next_insn is true, also leave only
13049         next insn in the ready list.
13050         (sel_sched_region): When the region wasn't scheduled, make another pass
13051         over it with force_next_insn set to 1.
13053 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13055         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
13056         into tm_file.
13057         * config/nds32/constants.md (unspec_volatile_element): Add enum values
13058         for interrupt control.
13059         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13060         functions for interrupt control.
13061         * config/nds32/nds32-intrinsic.md: Likewise.
13062         * config/nds32/nds32_intrinsic.h: Likewise.
13063         * config/nds32/nds32.h (nds32_builtins): Likewise.
13065 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13067         * config/nds32/nds32.c (nds32_init_machine_status,
13068         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
13069         strict_aligned_p field.
13070         (nds32_expand_to_rtl_hook): New function.
13071         (TARGET_EXPAND_TO_RTL_HOOK): Define.
13072         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
13074 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13075             Chung-Ju Wu  <jasonwucj@gmail.com>
13077         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
13078         * config/nds32/nds32-n7.md: New file.
13079         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
13080         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
13081         pipeline.
13082         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
13083         * config/nds32/nds32.md (pipeline_model): Add n7.
13084         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
13085         * config/nds32/pipelines.md: Include n7 settings.
13087 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13088             Chung-Ju Wu  <jasonwucj@gmail.com>
13090         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
13091         * config/nds32/nds32-e8.md: New file.
13092         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
13093         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
13094         pipeline.
13095         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
13096         * config/nds32/nds32.md (pipeline_model): Add e8.
13097         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
13098         * config/nds32/pipelines.md: Include e8 settings.
13100 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13101             Chung-Ju Wu  <jasonwucj@gmail.com>
13103         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
13104         * config/nds32/nds32-n8.md: New file.
13105         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
13106         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
13107         pipeline.
13108         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
13109         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
13110         * config/nds32/nds32.md (pipeline_model): Add n8.
13111         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
13112         * config/nds32/pipelines.md: Include n8 settings.
13114 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
13115             Chung-Ju Wu  <jasonwucj@gmail.com>
13117         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
13118         * config/nds32/nds32-n9-2r1w.md: New file.
13119         * config/nds32/nds32-n9-3r2w.md: New file.
13120         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
13121         nds32_register_ports): New or modify for cpu n9.
13122         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
13123         pipeline.
13124         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
13125         * config/nds32/nds32-utils.c: New file.
13126         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
13127         TARGET_MUL_SLOW): Define.
13128         * config/nds32/nds32.md (pipeline_model): New attribute.
13129         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
13130         New options that support cpu n9.
13131         * config/nds32/pipelines.md: Include n9 settings.
13132         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
13134 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
13136         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
13137         information if necessary.
13138         (output_cond_branch_compare_zero): Likewise.
13139         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
13140         (nds32_target_alignment): Refine for alignment.
13141         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
13142         (FUNCTION_BOUNDARY): Modify.
13143         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
13144         align case.
13145         * config/nds32/nds32.opt (malways-align, malign-functions): New.
13147 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
13149         * config/nds32/constants.md (unspec_volatile_element): Add values for
13150         TLB operation and data prefetch.
13151         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
13152         functions for TLB operation and data prefetch.
13153         * config/nds32/nds32-intrinsic.md: Likewise.
13154         * config/nds32/nds32_intrinsic.h: Likewise.
13155         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
13156         (nds32_print_operand): Likewise.
13157         * config/nds32/nds32.h (nds32_builtins): Likewise.
13159 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
13160         Andrew Pinski <pinsika@gcc.gnu.org>
13162         PR middle-end/82976
13163         * match.pd: Use constant_boolean_node of correct type instead of
13164         boolean_true_node or boolean_false_node for simplifying
13165         pointer comparisons to zero.
13167 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13169         PR tree-optimization/80021
13170         * tree.c (verify_type_variant): Make error call in verify_variant_match
13171         translatable and remove final full stop.
13173 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13175         * config/nds32/constants.md (unspec_volatile_element): Add
13176         UNSPEC_VOLATILE_EH_RETURN.
13177         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
13178         nds32_output_stack_pop): Support dwarf exception handling process.
13179         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
13180         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
13181         exception handling process.
13182         (nds32_compute_stack_frame): Likewise.
13183         (nds32_return_addr_rtx): Likewise.
13184         (nds32_initial_elimination_offset): Likewise.
13185         (nds32_expand_prologue): Likewise.
13186         (nds32_expand_epilogue): Likewise.
13187         (nds32_dynamic_chain_address): New function.
13188         * config/nds32/nds32.h (machine_function): Add fields for dwarf
13189         exception handling.
13190         (DYNAMIC_CHAIN_ADDRESS): Define.
13191         (EH_RETURN_DATA_REGNO): Define.
13192         (EH_RETURN_STACKADJ_RTX): Define.
13193         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
13194         patterns for dwarf exception handling.
13196 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13198         * config/nds32/nds32.h: Clean up obsolete macros.
13200 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13202         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13203         Add enum values for particular instructions.
13204         * config/nds32/nds32-intrinsic.c: Implementation of expanding
13205         particular intrinsic functions.
13206         * config/nds32/nds32-intrinsic.md: Likewise.
13207         * config/nds32/nds32_intrinsic.h: Likewise.
13208         * config/nds32/nds32.h (nds32_builtins): Likewise.
13209         * config/nds32/nds32.md (type): Add pbsad and pbsada.
13210         (btst, ave): New patterns for particular instructions.
13212 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13214         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
13215         Add enum values for atomic load/store and memory sync.
13216         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
13217         and memory sync.
13218         * config/nds32/nds32-intrinsic.md: Likewise.
13219         * config/nds32/nds32_intrinsic.h: Likewise.
13220         * config/nds32/nds32.h (nds32_builtins): Likewise.
13222 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
13224         PR tree-optimization/85257
13225         * fold-const.c (native_encode_vector): If not all elts could fit
13226         and off is -1, return 0 rather than offset.
13227         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
13228         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
13229         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
13230         adjust buffer in native_interpret_expr call.
13232 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13234         * config/nds32/constants.md (unspec_volatile_element): Add cache
13235         control enum values.
13236         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
13237         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
13238         * config/nds32/nds32.c (nds32_cctl_names): New.
13239         (nds32_print_operand): Handle cache control register names.
13240         * config/nds32/nds32.h (nds32_builtins): New enum values.
13241         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
13242         macros.
13243         * config/nds32/nds32.md (type): Add mmu.
13244         * config/nds32/pipelines.md (simple_insn): Add mmu.
13246 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13248         * config/nds32/nds32.md (type): Remove call.
13249         * config/nds32/pipelines.md (simple_insn): Likewise.
13251 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13253         * config/nds32/constants.md (unspec_volatile_element): Add
13254         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
13255         UNSPEC_VOLATILE_FMFCFG.
13256         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
13257         description for fmfcfg and fmfcsr.
13258         (bdesc_1arg): Add fmtcsr.
13259         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
13260         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
13261         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
13262         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
13263         unspec_fmfcfg): New patterns.
13264         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
13265         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
13266         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
13267         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
13268         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
13269         __nds32__fmfcfg): Define.
13271 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
13273         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
13274         intrinsic register names.
13275         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
13276         intrinsic register enum values and macros.
13278 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
13280         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
13281         for load/store addressing form.
13282         (nds32_print_operand_address): Likewise.
13284 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
13286         PR target/85196
13287         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
13288         based on LABEL_REF.  Remove useless assertion.
13289         (pic_address_needs_scratch): Fix formatting.
13290         (sparc_legitimize_pic_address): Minor tweaks.
13291         (sparc_delegitimize_address): Adjust assertion accordingly.
13292         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
13293         into symbolic_operand.
13294         (movsi_high_pic_label_ref): Likewise.
13295         (movsi_lo_sum_pic_label_ref): Likewise.
13296         (movdi_pic_label_ref): Likewise.
13297         (movdi_high_pic_label_ref): Likewise.
13298         (movdi_lo_sum_pic_label_ref): Likewise.
13300 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
13302         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
13303         custom LIB_SPEC setup.
13305 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
13306             Kito Cheng  <kito.cheng@gmail.com>
13308         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
13309         * config/riscv/freebsd.h: New.
13311 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13313         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
13314         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
13315         file.
13317 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13318             Kito Cheng  <kito.cheng@gmail.com>
13320         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
13321         nds32_output_call, nds32_symbol_binds_local_p): New functions.
13322         * config/nds32/nds32-protos.h (nds32_output_call,
13323         nds32_output_return): Declare.
13324         * config/nds32/nds32.md: Refine all the call and return patterns.
13326 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13328         PR debug/85252
13329         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
13330         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
13332         PR rtl-optimization/84872
13333         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
13334         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
13335         EDGE_CROSSING edge.
13337 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
13339         * expr.c (copy_blkmode_to_reg): Revert 254862.
13340         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
13342 2018-04-06  Richard Biener  <rguenther@suse.de>
13344         PR middle-end/85244
13345         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
13346         after seeing a component reference with an adjacent field.  Treat
13347         refs to arrays at struct end of external decls similar to
13348         refs to unconstrained commons.
13350 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
13352         PR sanitizer/85213
13353         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
13354         look through SAVE_EXPRs with non-side-effects argument.  Adjust
13355         recursive calls.
13356         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
13357         save_p here.
13359 2018-04-06  Richard Biener  <rguenther@suse.de>
13361         PR middle-end/85180
13362         * alias.c (find_base_term): New wrapper around find_base_term
13363         unwinding CSELIB_VAL_PTR changes.
13364         (find_base_term): Do not restore CSELIB_VAL_PTR during the
13365         recursion.
13367 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13369         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
13370         instructions.
13371         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
13372         constant definitions.
13373         ("nop"): lr 0,0 -> nopr r0
13374         ("nop_lr0", "nop_lr1"): New insn definitions.
13376 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
13378         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
13379         NDS32_V3PUSH_AVAILABLE_P macro.
13381 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
13382             Chung-Ju Wu  <jasonwucj@gmail.com>
13384         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
13385         (nds32*-*-*): Add float and fpu_config into supported_defaults.
13386         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
13387         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
13388         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
13389         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
13390         * config/nds32/constraints.md: New constraints and checking for hard
13391         float configuration.
13392         * config/nds32/iterators.md: New mode iterator and attribute for hard
13393         float configuration.
13394         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
13395         patterns.
13396         * config/nds32/nds32-fpu.md: New file.
13397         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
13398         deal with hard float code generation.
13399         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
13400         ARCH_V3S.
13401         (abi_type, float_reg_number): New enum type.
13402         * config/nds32/nds32-predicates.c: New predicates for hard float.
13403         * config/nds32/nds32-protos.h: Declare functions for hard float.
13404         * config/nds32/nds32.c: Implementation for hard float configuration.
13405         * config/nds32/nds32.h: Definitions for hard float configuration.
13406         * config/nds32/nds32.md: Include hard float machine description and
13407         modify patterns for hard float configuration.
13408         * config/nds32/nds32.opt: New options for hard float configuration.
13409         * config/nds32/predicates.md: New predicates for hard float
13410         configuration.
13412 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13414         * common/config/nds32/nds32-common.c
13415         (nds32_option_optimization_table): Enable -mreleax-hint by default.
13417 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
13419         PR middle-end/85195
13420         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
13421         CONSTRUCTOR_ELT (ctor, ...)->value.
13423 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
13425         PR target/85193
13426         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
13428 2018-04-05  Tom de Vries  <tom@codesourcery.com>
13430         PR target/85204
13431         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
13432         cond jump.
13434 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13435             Kito Cheng  <kito.cheng@gmail.com>
13437         * config/nds32/constraints.md (U33): Fine-tune checking condition.
13438         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
13439         * config/nds32/nds32.h (nds32_16bit_address_type): Add
13440         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
13442 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
13443             Kito Cheng  <kito.cheng@gmail.com>
13445         * config/nds32/constraints.md (Ufe): New memory constraint.
13446         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
13447         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
13448         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
13449         operands.
13450         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
13451         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
13453 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13455         * config/nds32/nds32.md: Use optimize_size in the condition for
13456         alu-shift instructions.
13458 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13460         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
13462 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13464         * config/nds32/nds32.md (negsi2): Refine pattern.
13466 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13467             Chung-Ju Wu  <jasonwucj@gmail.com>
13469         * config/nds32/iterators.md (shift_rotate): New code iterator.
13470         (shift): New code attribute.
13471         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
13472         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
13473         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
13474         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
13475         bit-wise operations.
13476         (andsi3, *andsi3): Ditto.
13477         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
13478         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
13479         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
13480         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
13481         nds32_ior_operand, nds32_xor_operand): New predicates.
13483 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13485         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
13486         (addsi3, subsi3): ... this.
13488 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13490         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
13492 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13494         * config/nds32/nds32.md: Adjust indention.
13496 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
13498         * config/nds32/nds32.md (feature): New attribute.
13500 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
13502         * config/nds32/nds32.md (subtype): New attribute.
13504 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13506         PR target/85203
13507         * config/arm/arm-builtins.c (arm_expand_builtin): Change
13508         expansion to perform a bitwise AND of the argument followed by a
13509         boolean negation of the result.
13511 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
13513         PR rtl-optimization/84878
13514         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
13515         the basic block.  Assert the use reference is not artificial and that
13516         it has an associated insn.
13518 2018-04-04  Michael Matz  <matz@suse.de>
13520         * builtins.c (compute_objsize): Pass correct operand
13521         to array_at_struct_end_p.
13523 2018-04-04  Richard Biener  <rguenther@suse.de>
13525         PR lto/85176
13526         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
13527         from contexts for DINFO_LEVEL_TERSE and below.
13529 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13531         * config/nds32/nds32-doubleword.md (move_<mode>): Require
13532         resiter_operand condition.
13533         * config/nds32/nds32.md (*move<mode>): Ditto.
13535 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13536             Monk Chiang  <sh.chiang04@gmail.com>
13538         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
13540 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13542         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
13544 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13545             Kito Cheng  <kito.cheng@gmail.com>
13547         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
13548         nds32_cond_code_str, output_cond_branch,
13549         output_cond_branch_compare_zero, nds32_expand_cbranch,
13550         nds32_expand_cstore, nds32_expand_movcc,
13551         nds32_output_cbranchsi4_equality_zero,
13552         nds32_output_cbranchsi4_equality_reg,
13553         nds32_output_cbranchsi4_equality_reg_or_const_int,
13554         nds32_output_cbranchsi4_greater_less_zero: New functions.
13555         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
13556         nds32_expand_cstore, nds32_expand_movcc,
13557         nds32_output_cbranchsi4_equality_zero,
13558         nds32_output_cbranchsi4_equality_reg,
13559         nds32_output_cbranchsi4_equality_reg_or_const_int,
13560         nds32_output_cbranchsi4_greater_less_zero): Declare.
13561         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
13562         nds32_rimm11s_operand): New predicates.
13563         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
13564         * config/nds32/nds32.md: Rewrite all the branch and conditional move
13565         patterns.
13567 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
13569         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
13570         * config/nds32/nds32.md: Ditto.
13571         * config/nds32/pipelines.md: Ditto.
13573 2018-04-04  Richard Biener  <rguenther@suse.de>
13575         PR tree-optimization/85168
13576         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
13577         propagating abnormals.
13579 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13581         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
13583 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
13584             Kito Cheng  <kito.cheng@gmail.com>
13586         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
13587         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
13588         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
13589         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
13590         * config/nds32/nds32.md (sibcall_internal): New.
13591         (sibcall_register): Remove.
13592         (sibcall_immediate): Remove.
13593         (sibcall_value_internal): New.
13594         (sibcall_value_register): Remove.
13595         (sibcall_value_immediate): Remove.
13596         * config/nds32/predicates.md (nds32_general_register_operand): New.
13597         (nds32_call_address_operand): New.
13599 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13601         PR rtl-optimization/85167
13602         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
13603         bb_defs if *split_p, instead preinitialize it to NULL.
13605         PR tree-optimization/85156
13606         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
13607         evaluating the argument multiple times.
13609 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
13611         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
13612         than vector.
13613         (_mm_cvtpd_ps): Likewise.
13614         (_mm_cvttpd_epi32): Likewise.
13615         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
13616         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
13617         vector, pixel, and bool following altivec.h include.
13619 2018-04-03  Martin Sebor  <msebor@redhat.com>
13621         * doc/extend.texi (Common Function Attributes): Clarify.
13622         (const attribute): Likewise.
13623         (pure attribute): Likewise.
13625 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
13627         PR target/85169
13628         * config/i386/i386.c (ix86_expand_vector_set): Use
13629         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
13631 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
13633         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
13634         instructions when changing rounding bits to preserve precision bits
13635         in the x87 control word.
13637 2018-04-03  Martin Liska  <mliska@suse.cz>
13639         PR tree-optimization/82491
13640         * rtl.h (strip_offset_and_add): Replace += suboffset with
13641         poly_uint64 () + suboffset.
13643 2018-03-29  Martin Liska  <mliska@suse.cz>
13644             Martin Jambor  <mjambor@suse.cz>
13646         PR ipa/84947
13647         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
13648         param_type is not an integral or pointer type.
13650 2018-04-03  Richard Biener  <rguenther@suse.de>
13652         * sese.h (recompute_all_dominators): Remove.
13654 2018-04-02  Martin Sebor  <msebor@redhat.com>
13656         * doc/invoke.texi (-Wrestrict): Fix typos.
13658 2018-04-02  Jim Wilson  <jimw@sifive.com>
13660         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
13661         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
13662         (<optab>di3, <optab>si3_extend): Likewise.
13663         (<optab>si3_mask, <optab>si3_mask_1): New.
13664         (<optab>di3_mask, <optab>di3_mask_1): New.
13665         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
13666         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
13667         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
13669 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
13671         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
13672         example.
13674 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
13676         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
13677         (nds32_canonicalize_comparison): New function.
13679 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13680             Kito Cheng  <kito.cheng@gmail.com>
13681             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
13683         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
13684         * config/nds32/constants.md (unspec_volatile_element): Add
13685         UNSPEC_VOLATILE_RELAX_GROUP.
13686         * config/nds32/nds32-relax-opt.c: New file.
13687         * config/nds32/nds32-predicates.c
13688         (nds32_symbol_load_store_p): New function.
13689         * config/nds32/nds32-protos.h
13690         (nds32_symbol_load_store_p): Declare function.
13691         (make_pass_nds32_relax_opt): Declare new rtl pass function.
13692         * config/nds32/nds32.c
13693         (nds32_register_pass): New function to register pass.
13694         (nds32_register_passes): New function to register passes.
13695         * config/nds32/nds32.md (relax_group): New pattern.
13696         * config/nds32/nds32.opt (mrelax-hint): New option.
13697         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
13699 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
13701         * config/nds32/t-nds32: Modify files dependency.
13703 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13705         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
13706         (PROFILE_HOOK): Define its implementation.
13708 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
13710         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
13711         type and 32-bit size.
13713 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
13715         PR middle-end/85090
13716         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
13717         (V_128_256): New mode iterator.
13718         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
13719         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
13720         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
13721         of V.
13722         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
13723         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
13725 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
13727         PR target/83315
13728         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
13729         NaN inputs correctly.
13731 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
13733         PR target/80546
13734         * config/rs6000/vsx.md (??r): New mode attribute.
13735         (*vsx_mov<mode>_64bit): Use it.
13736         (*vsx_mov<mode>_32bit): Likewise.
13738 2018-03-30  Martin Sebor  <msebor@redhat.com>
13740         PR tree-optimization/84818
13741         * builtins.c (check_access): Use warning_n.
13743 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13745         PR target/83822
13746         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
13747         condition.
13748         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
13749         condition.
13751 2018-03-30  Julia Koval  <julia.koval@intel.com>
13753         PR target/84413
13754         * x86-tune.def (movx, partial_reg_dependency): Enable for
13755         m_SKYLAKE_AVX512.
13757 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
13759         PR inline-asm/84985
13760         * lra-constraints.c (process_alt_operands): Move setting
13761         this_alternative_matches below.
13763 2018-03-29  Martin Liska  <mliska@suse.cz>
13765         PR lto/84995.
13766         * doc/invoke.texi: Document how LTO works with debug info.
13767         Describe auto-load support of binutils.  Mention 'x86-64'
13768         as valid option value of -march option.
13770 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
13772         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
13774         PR c/85094
13775         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
13776         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
13777         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
13778         checking.
13780 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13782         PR target/84912
13783         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
13784         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
13785         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
13786         for RS6000_BTM_POWERPC64.
13787         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
13788         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
13789         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
13790         definition.
13791         (DIVDE): Use it.
13792         (DIVDEU): Likewise.
13794 2018-03-28  Carl Love  <cel@us.ibm.com>
13796         Revert
13797         2017-09-27  Carl Love  <cel@us.ibm.com>
13799         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13800         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13801         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13802         fctiw instruction.
13804 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13806         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
13807         instead of __vector bool.
13808         (_mm_max_pu8): Likewise.
13809         (_mm_min_pi16): Likewise.
13811 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
13813         PR target/84912
13814         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
13815         (DIVWEUO): Likewise.
13816         (DIVDEO): Likewise.
13817         (DIVDEUO): Likewise.
13818         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
13819         DIVWEUO and DIVDEUO.
13820         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
13821         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
13822         (div_extend): Likewise.
13823         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
13824         builtin function.
13825         (__builtin_divweuo): Likewise.
13826         (__builtin_divdeo): Likewise.
13827         (__builtin_divdeuo): Likewise.
13829 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13831         PR target/85095
13832         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
13833         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
13835         PR tree-optimization/82004
13836         * gimple-match-head.c (optimize_pow_to_exp): New function.
13837         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
13838         Don't fold to exp if optimize_pow_to_exp is false.
13840 2018-03-28  Martin Liska  <mliska@suse.cz>
13842         PR other/84819
13843         * calls.c (initialize_argument_information): Fix trailing space.
13844         * common.opt: Fix typo and provide better explanation for
13845         -fsanitize-coverage option.
13846         * config/i386/i386.opt: Fix typo.
13848 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
13849             Martin Liska  <mliska@suse.cz>
13851         PR sanitizer/85081
13852         * gimplify.c (asan_poison_variable): Don't do the check for
13853         gimplify_omp_ctxp here.
13854         (gimplify_decl_expr): Do it here.
13855         (gimplify_target_expr): Likewise.
13857 2018-03-28  Martin Liska  <mliska@suse.cz>
13859         PR target/84988
13860         * config/i386/i386.c (ix86_function_arg_advance): Do not call
13861         chkp_type_bounds_count if MPX is not enabled.
13863 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
13865         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
13867 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
13869         PR target/84914
13870         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
13871         function to create the function decl for complex long double
13872         multiply and divide for -mabi=ieeelongdouble.
13873         (init_float128_ieee): Call it.
13875 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
13877         PR target/85044
13878         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
13879         -fcf-protection=branch -mibt.
13880         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
13882 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13884         PR target/81863
13885         * config/arm/arm.c (arm_valid_symbolic_address): Handle
13886         arm_word_relocations.
13888 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
13890         PR target/85056
13891         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
13892         extern array declarations.
13894 2018-03-27  Richard Biener  <rguenther@suse.de>
13896         PR middle-end/84067
13897         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
13898         explicit single_use checks.
13900 2018-03-27  Richard Biener  <rguenther@suse.de>
13902         PR tree-optimization/85082
13903         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
13904         Valueize the VUSE.
13906 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13908         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
13909         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
13910         Turn on fasynchronous-unwind-tables and funwind-tables.
13912 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
13914         PR target/85073
13915         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
13916         (*bmi_blsr_<mode>_ccz): Ditto.
13918 2018-03-26  Tom de Vries  <tom@codesourcery.com>
13920         PR tree-optimization/85063
13921         * omp-general.c (offloading_function_p): New function.  Factor out
13922         of ...
13923         * omp-offload.c (pass_omp_target_link::gate): ... here.
13924         * omp-general.h (offloading_function_p): Declare.
13925         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
13926         with attribute omp declare target for offloading functions.
13928 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
13930         PR tree-optimization/84005
13931         * tree-data-ref.h (get_base_for_alignment): Declare.
13932         * tree-data-ref.c (get_base_for_alignment_1): New function.
13933         (get_base_for_alignment): Likewise.
13934         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
13935         get_base_for_alignment to find a suitable base object, instead
13936         of always using drb->base_address.
13938 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13940         PR inline-asm/85022
13941         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
13942         known size by default.
13944 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
13946         PR inline-asm/85030
13947         * lra-constraints.c (process_alt_operands): Don't match BLKmode
13948         and non BLKmode operands.
13950 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13952         PR target/85026
13953         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
13954         Clean up attributes.
13956 2018-03-23  Richard Biener  <rguenther@suse.de>
13958         PR debug/85020
13959         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
13960         we are going to emit early debug for LTO.
13962 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
13964         PR inline-asm/85034
13965         * function.c (match_asm_constraints_1): Don't optimize if input
13966         doesn't satisfy general_operand predicate for output's mode.
13968         PR inline-asm/85022
13969         * alias.c (write_dependence_p): Don't require for x_canonicalized
13970         non-VOIDmode if x has VOIDmode.
13972         PR sanitizer/85029
13973         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
13974         just don't try to optimize it rather than assert it never happens.
13976 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13978         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
13979         macro expansions for definition of ST_INTERNAL_<mode> and
13980         LD_INTERNAL_<mode> builtins.
13981         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
13982         Remove prototype.
13983         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
13984         function.
13985         (altivec_expand_st_builtin): Likewise.
13986         (altivec_expand_builtin): Remove calls to deleted functions.
13987         (rs6000_address_for_altivec): Delete this function.
13988         * config/rs6000/vector.md: Remove expands for
13989         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
13991 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
13993         PR target/84826
13994         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
13995         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
13996         re-computing once computed.
13997         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
13998         (arm_init_machine_status): Initialize
13999         machine->static_chain_stack_bytes.
14001 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14003         PR target/84760
14004         * doc/extend.texi: Add four new prototypes for vec_ld.
14005         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
14006         definitions for more logical presentation.
14007         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
14008         entries for V1TI variants of __builtin_altivec_ld builtin.
14009         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
14010         handling of V1TI variant of LVX icode pattern.
14011         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
14012         (rs6000_gimple_fold_builtin): Likewise.
14013         (altivec_init_builtins): Add code to define
14014         __builtin_altivec_lvx_v1ti function.
14016 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14018         PR inline-asm/84941
14019         * function.c (match_asm_constraints_1): Don't do the optimization
14020         if input isn't a REG, SUBREG, MEM or constant.
14022 2018-03-22  Tom de Vries  <tom@codesourcery.com>
14024         PR tree-optimization/84956
14025         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
14026         bb_has_abnormal_pred.
14028 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
14030         PR sanitizer/85018
14031         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
14032         DECL_INITIAL (decl) to decl at the end.
14033         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
14034         adjust the comment.
14036 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
14038         * doc/extend.texi (__builtin_tgmath): Document when complex
14039         integer types are treated as _Complex _Float64.
14041 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14043         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
14045 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14047         PR tree-optimization/84960
14048         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
14049         if it is ENTRY block, move them into single succ of ENTRY in that case.
14051 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
14053         PR tree-optimization/84811
14054         * poly-int.h (poly_span_traits): Remove the T3 parameter and
14055         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
14056         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
14057         (known_subrange_p): Update accordingly.  Cast each value involved
14058         in the size comparison, rather than casting the result of the
14059         subtraction.
14061 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14063         PR tree-optimization/84982
14064         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
14065         by flipping the least significant bit rather than all bits from
14066         bitpos to bitpos + bitsize - 1.
14068 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14070         * doc/extend.texi (Deprecated Features): Remove mention of
14071         long-deleted deprecations.
14073 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14075         PR jit/84288
14076         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
14077         * configure: Regenerate.
14079 2018-03-21  Tom de Vries  <tom@codesourcery.com>
14081         PR tree-optimization/83126
14082         * tree-parloops.c (num_phis): New function.
14083         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
14085 2018-03-21  Nathan Sidwell  <nathan@acm.org>
14087         * doc/extend.texi (Deprecated Features): Update deprecated flags,
14088         mention anon-struct/union members and trailing attributes.
14090 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
14092         PR tree-optimization/84969
14093         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
14094         builtin memset partitions if they set different rhs values.
14096 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
14098         PR rtl-optimization/84989
14099         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
14100         VEC_DUPLICATE with scalar result mode.
14102 2018-03-21  Martin Liska  <mliska@suse.cz>
14104         PR ipa/84963
14105         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
14106         not intended return statement.
14108 2018-03-21  Martin Liska  <mliska@suse.cz>
14110         PR target/84988
14111         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
14112         (chkp_find_bound_slots_1): Limit number of iterations.
14114 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
14116         PR target/84838
14117         * Minor grammar fixes for x86 options.
14119 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14121         PR debug/84875
14122         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
14123         holding REG_CFA_RESTORE notes, instead turn them into a USE.
14125 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
14127         PR target/83789
14128         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
14129         (altivec_lvx_<mode>_1op): Likewise.
14130         (altivec_stvx_<mode>_2op): Likewise.
14131         (altivec_stvx_<mode>_1op): Likewise.
14132         (altivec_lvx_<VM2:mode>): New define_expand.
14133         (altivec_stvx_<VM2:mode>): Likewise.
14134         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
14135         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14136         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
14137         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
14138         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
14139         (rs6000_gen_lvx): Likewise.
14140         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
14141         (altivec_expand_stv_builtin): Likewise.
14142         (altivec_expand_builtin): Likewise.
14143         * config/rs6000/vector.md: Likewise.
14145 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14147         PR target/82518
14148         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
14149         BYTES_BIG_ENDIAN.
14151 2018-03-20  Richard Biener  <rguenther@suse.de>
14153         PR target/84986
14154         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
14155         sign-conversions as zero, fall back to standard scalar_stmt
14156         cost for the rest.
14158 2018-03-20  Martin Liska  <mliska@suse.cz>
14160         PR ipa/84825
14161         * predict.c (rebuild_frequencies): Handle case when we have
14162         PROFILE_ABSENT, but flag_guess_branch_prob is false.
14164 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14166         PR target/84990
14167         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
14168         flag_section_anchors.
14169         * varasm.c (use_blocks_for_decl_p): Remove hack for
14170         dw2_force_const_mem.
14172         PR target/84845
14173         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
14174         to ...
14175         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
14176         be created, use lowpart_subreg of operands[0] rather than operands[0]
14177         itself.
14178         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
14179         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
14180         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
14181         and n constraint instead of aarch64_shift_imm_di and Usd.
14182         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
14183         (*aarch64_<optab>_reg_minus<mode>3): ... this.
14185 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
14187         PR target/82989
14188         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
14189         to favor GPR over NEON registers.
14190         (<shift>di3_neon): Likewise.
14192 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14194         PR target/84952
14195         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
14196         (nvptx_process_pars): Emit bar.sync asap and alap.
14198 2018-03-20  Tom de Vries  <tom@codesourcery.com>
14200         PR target/84954
14201         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
14202         seen_label if seen_label is already set.
14204 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
14206         PR target/84945
14207         * config/i386/i386.c (fold_builtin_cpu): For features above 31
14208         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
14209         Use 1U instead of 1.  Formatting fixes.
14211         PR c/84953
14212         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
14213         instead of TREE_TYPE (s1) for the return value.
14215 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
14217         PR tree-optimization/84946
14218         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
14219         bitsize + bitsize in poly_uint64 rather than poly_int64.
14221         PR sanitizer/78651
14222         * dwarf2asm.c: Include fold-const.c.
14223         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
14224         of decl rather than decl itself.
14226         PR rtl-optimization/84643
14227         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
14229 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
14231         PR sanitizer/78651
14232         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
14233         calling assemble_variable.
14235 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
14237         PR target/81647
14238         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
14239         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
14241 2018-03-19  Jim Wilson  <jimw@sifive.com>
14243         PR bootstrap/84856
14244         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
14245         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
14246         (riscv_first_stack_step): Likewise.
14247         (riscv_option_override): Use STACK_BOUNDARY instead of
14248         MIN_STACK_BOUNDARY.
14249         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
14250         MIN_STACK_BOUNDARY.
14251         (BIGGEST_ALIGNMENT): Set to 128.
14252         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
14253         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
14254         STACK_BOUNDARY.
14256 2018-03-19  Richard Biener  <rguenther@suse.de>
14258         PR tree-optimization/84933
14259         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
14260         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
14262 2018-03-19  Richard Biener  <rguenther@suse.de>
14264         PR tree-optimization/84859
14265         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
14266         (cond_if_else_store_replacement): Perform sinking operation on
14267         single-store BBs regardless of MAX_STORES_TO_SINK setting.
14268         Generalize what a BB with a single eligible store is.
14270 2018-03-19  Richard Biener  <rguenther@suse.de>
14272         PR tree-optimization/84929
14273         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
14274         chrec_is_positive against non-chrec arg.
14276 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
14278         PR target/84711
14279         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
14281 2018-03-18  Martin Liska  <mliska@suse.cz>
14283         PR rtl-optimization/84635
14284         * regrename.c (build_def_use): Use matches_mode only when
14285         matches >= 0.
14287 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
14289         PR tree-optimization/84913
14290         * tree-vect-loop.c (vectorizable_reduction): Don't try to
14291         vectorize chains of COND_EXPRs.
14293 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14295         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
14297 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14299         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
14301 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
14303         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
14305 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14306             Kito Cheng  <kito.cheng@gmail.com>
14308         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
14309         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
14310         (nds32_adjust_reg_alloc_order): New function.
14311         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
14313 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
14315         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
14316         nds32_print_operand, nds32_print_operand_address): Use
14317         HOST_WIDE_INT_PRINT_DEC instead.
14319 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
14321         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
14323 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
14325         PR target/84902
14326         * config/i386/i386.c (initial_ix86_tune_features,
14327         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
14328         unsigned long long.
14329         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
14330         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
14331         rather than 1u << ix86_tune.  Formatting fix.
14332         (ix86_option_override_internal): Change ix86_arch_mask from
14333         unsigned int to unsigned HOST_WIDE_INT, initialize to
14334         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
14335         (ix86_function_specific_restore): Likewise.
14337 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14339         PR target/84899
14340         * postreload.c (reload_combine_recognize_pattern): Perform
14341         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
14342         truncate_int_for_mode the result for the destination's mode.
14344         PR c/84909
14345         * hsa-gen.c (mem_type_for_type): Fix comment typo.
14346         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
14347         Likewise.
14348         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14349         Likewise.
14351 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
14353         PR target/84876
14354         * lra-assigns.c (lra_split_hard_reg_for): Don't use
14355         regno_allocno_class_array and sorted_pseudos.
14356         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
14357         insns where regno is used.
14359 2018-03-16  Martin Liska  <mliska@suse.cz>
14361         PR ipa/84833
14362         * multiple_target.c (create_dispatcher_calls): Redirect
14363         reference in the symbol table.
14365 2018-03-16  Martin Liska  <mliska@suse.cz>
14367         PR ipa/84722
14368         * multiple_target.c (create_dispatcher_calls): Redirect also
14369         an alias.
14371 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14373         PR c++/79937
14374         PR c++/82410
14375         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
14376         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
14377         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
14379 2018-03-16  Julia Koval  <julia.koval@intel.com>
14381         * doc/invoke.texi (Skylake Server): Add CLWB.
14382         Cannonlake): Remove CLWB.
14384 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
14386         PR tree-optimization/84841
14387         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
14388         1 << 3.
14389         (FLOAT_ONE_CONST_TYPE): Define.
14390         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
14391         (sort_by_operand_rank): Put entries with higher constant_type last
14392         rather than first to match comments.
14394 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
14396         * config/nios2/nios2.md (movsi_internal): Fix thinko in
14397         split predicate.
14399 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14401         PR c++/79085
14402         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
14403         check and use address of target always.
14405 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
14407         PR target/84574
14408         * config/i386/i386.c (indirect_thunk_needed): Update comments.
14409         (indirect_thunk_bnd_needed): Likewise.
14410         (indirect_thunks_used): Likewise.
14411         (indirect_thunks_bnd_used): Likewise.
14412         (indirect_return_needed): New.
14413         (indirect_return_bnd_needed): Likewise.
14414         (output_indirect_thunk_function): Add a bool argument for
14415         function return.
14416         (output_indirect_thunk_function): Don't generate alias for
14417         function return thunk.
14418         (ix86_code_end): Call output_indirect_thunk_function to generate
14419         function return thunks.
14420         (ix86_output_function_return): Set indirect_return_bnd_needed
14421         and indirect_return_needed instead of indirect_thunk_bnd_needed
14422         and indirect_thunk_needed.
14424 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
14426         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
14427         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
14428         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
14430 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
14431             Paul Hua <paul.hua.gm@gmail.com>
14433         PR c/84852
14434         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
14436 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
14438         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
14439         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
14440         resp. SFmode cases.
14442 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
14444         PR target/84711
14445         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14446         instead of GET_MODE_SIZE when comparing Units.
14448 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
14450         PR target/68256
14451         * varasm.c (hash_section): Return an unchangeble hash value
14452         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
14453         Return !aarch64_can_use_per_function_literal_pools_p ().
14455 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
14457         PR target/84860
14458         * optabs.c (emit_conditional_move): Pass address of cmode's copy
14459         rather than address of cmode as last argument to prepare_cmp_insn.
14461 2018-03-15  Julia Koval  <julia.koval@intel.com>
14463         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
14464         F_AVX512VNNI, F_AVX512BITALG): New.
14466 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
14468         PR target/83451
14469         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
14470         insn for floating-point loads and stores.
14472 2018-03-14  Carl Love  <cel@us.ibm.com>
14474         * config/rs6000/rs6000-c.c: Add macro definitions for
14475         ALTIVEC_BUILTIN_VEC_PERMXOR.
14476         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
14477         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
14478         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
14479         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
14480         UNSPEC_VPERMXOR.
14481         * config/doc/extend.texi: Add prototypes for vec_permxor.
14483 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
14485         PR c/84852
14486         * diagnostic-show-locus.c (class layout_point): Convert m_line
14487         from int to linenum_type.
14488         (line_span::comparator): Use linenum "compare" function when
14489         comparing line numbers.
14490         (test_line_span): New function.
14491         (layout_range::contains_point): Convert param "row" from int to
14492         linenum_type.
14493         (layout_range::intersects_line_p): Likewise.
14494         (layout::will_show_line_p): Likewise.
14495         (layout::print_source_line): Likewise.
14496         (layout::should_print_annotation_line_p): Likewise.
14497         (layout::print_annotation_line): Likewise.
14498         (layout::print_leading_fixits): Likewise.
14499         (layout::annotation_line_showed_range_p): Likewise.
14500         (struct line_corrections): Likewise for field m_row.
14501         (line_corrections::line_corrections): Likewise for param "row".
14502         (layout::print_trailing_fixits): Likewise.
14503         (layout::get_state_at_point): Likewise.
14504         (layout::get_x_bound_for_row): Likewise.
14505         (layout::print_line): Likewise.
14506         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
14507         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
14508         * input.c (selftest::test_linenum_comparisons): New function.
14509         (selftest::input_c_tests): Call it.
14510         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
14511         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
14512         * selftest.h (ASSERT_GT): New macro.
14513         (ASSERT_GT_AT): New macro.
14514         (ASSERT_LT): New macro.
14515         (ASSERT_LT_AT): New macro.
14517 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
14519         PR rtl-optimization/84780
14520         * combine.c (distribute_links): Don't make a link based on pc_rtx.
14522 2018-03-14  Martin Liska  <mliska@suse.cz>
14524         * tree.c (record_node_allocation_statistics): Use
14525         get_stats_node_kind.
14526         (get_stats_node_kind): New function extracted from
14527         record_node_allocation_statistics.
14528         (free_node): Use get_stats_node_kind.
14530 2018-03-14  Richard Biener  <rguenther@suse.de>
14532         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
14533         that the value-set of ANTIC_IN doesn't grow.
14535         Revert
14536         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
14537         member.
14538         (BB_VISITED_WITH_VISITED_SUCCS): New define.
14539         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
14541 2018-03-14  Julia Koval  <julia.koval@intel.com>
14543         * config.gcc (icelake-client, icelake-server): New.
14544         (icelake): Remove.
14545         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
14546         (initial_ix86_arch_features): Ditto.
14547         (PTA_SKYLAKE): Add SGX.
14548         (PTA_ICELAKE): Remove.
14549         (PTA_ICELAKE_CLIENT): New.
14550         (PTA_ICELAKE_SERVER): New.
14551         (ix86_option_override_internal): Split up icelake on icelake client and
14552         icelake server.
14553         (get_builtin_code_for_version): Ditto.
14554         (fold_builtin_cpu): Ditto.
14555         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
14556         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
14557         * config/i386/i386.h (processor_type): Ditto.
14558         * doc/invoke.texi: Ditto.
14560 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
14562         PR sanitizer/83392
14563         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
14564         INTEGER_CST offset, add it together with bitpos / 8 and
14565         sign extend based on POINTER_SIZE.
14567         PR target/84844
14568         Revert
14569         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
14571         PR target/78090
14572         * config/i386/constraints.md (Yc): New register constraint.
14573         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
14574         Use Yc constraint for alternative 2 of operand 0.  Remove
14575         preferred_for_speed attribute.
14577 2018-03-14  Richard Biener  <rguenther@suse.de>
14579         PR tree-optimization/84830
14580         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
14581         with the old one to avoid oscillations.
14583 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
14585         PR target/83712
14586         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
14587         pseudos.
14588         (assign_by_spills): Return a flag of reload assignment failure.
14589         Do not process the reload assignment failures.  Do not spill other
14590         reload pseudos if they has the same reg class.  Update n if
14591         necessary.
14592         (lra_assign): Add a return arg.  Set up from the result of
14593         assign_by_spills call.
14594         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14595         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14596         usage_insns if it is not NULL.
14597         (spill_hard_reg_in_range): New function.
14598         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14599         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14600         function prototypes.
14601         (lra_assign): Change prototype.
14602         * lra.c (lra): Add code to deal with fails by splitting hard reg
14603         live ranges.
14605 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
14607         * config/riscv/riscv.opt (mrelax): New option.
14608         * config/riscv/riscv.c (riscv_file_start): Emit ".option
14609         "norelax" when riscv_mrelax is disabled.
14610         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
14612 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14614         PR target/84743
14615         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
14616         reassociation for int modes.
14618 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14620         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
14621         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
14622         for big-endian.
14623         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
14624         * config/aarch64/aarch64-sve.md
14625         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
14626         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
14627         (*extend<mode><Vwide>2): Rename to...
14628         (aarch64_sve_extend<mode><Vwide>2): ...this.
14629         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
14630         renaming the old pattern to...
14631         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
14632         unsigned packs.
14633         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
14634         define_expand, renaming the old pattern to...
14635         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
14636         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
14637         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
14638         account when deciding which SVE instruction the optab should use.
14639         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
14641 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14643         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
14644         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
14645         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
14646         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
14647         (tlsdesc_small_<mode>): Turn a define_expand and use
14648         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
14649         (tlsdesc_small_advsimd_<mode>): ...this.
14650         (tlsdesc_small_sve_<mode>): New pattern.
14652 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
14654         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
14655         (UNSPEC_UMUL_HIGHPART): New constants.
14656         (MUL_HIGHPART): New int iteraor.
14657         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
14658         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
14659         define_expand.
14660         (*<su>mul<mode>3_highpart): New define_insn.
14662 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14664         PR lto/84805
14665         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14666         incomplete types.
14668 2018-03-13  Martin Liska  <mliska@suse.cz>
14670         PR ipa/84658.
14671         * (sem_item_optimizer::sem_item_optimizer): Initialize new
14672         vector.
14673         (sem_item_optimizer::~sem_item_optimizer): Release it.
14674         (sem_item_optimizer::merge_classes): Register variable aliases.
14675         (sem_item_optimizer::fixup_pt_set): New function.
14676         (sem_item_optimizer::fixup_points_to_sets): Likewise.
14677         * ipa-icf.h: Declare new variables and functions.
14679 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
14681         PR middle-end/84834
14682         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
14683         integer_pow2p@2 and test integer_pow2p in condition.
14684         (A < 0 ? C : 0): Similarly for @1.
14686         PR middle-end/84831
14687         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
14688         characters starting at p contain '\0' character, don't look beyond
14689         that.
14691         PR target/84827
14692         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
14693         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
14695         PR target/84828
14696         * reg-stack.c (change_stack): Change update_end var from int to
14697         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
14698         also call set_block_for_insn on the newly added insns and rescan.
14700         PR target/84786
14701         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
14702         on the last operand.
14704         PR c++/84704
14705         * tree.c (stabilize_reference_1): Return save_expr (e) for
14706         STATEMENT_LIST even if it doesn't have side-effects.
14708 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
14710         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
14712 2018-03-12  Renlin Li  <renlin.li@arm.com>
14714         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
14715         aarch64_output_scalar_simd_mov_immediate.
14717 2018-03-12  Martin Sebor  <msebor@redhat.com>
14719         PR tree-optimization/83456
14720         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
14721         for perfectly overlapping calls to memcpy.
14722         (gimple_fold_builtin_memory_chk): Same.
14723         (gimple_fold_builtin_strcpy): Handle no-warning.
14724         (gimple_fold_builtin_stxcpy_chk): Same.
14725         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
14727 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14729         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
14730         parameter.  Use it for SFmode.
14731         (rs6000_function_arg_advance_1): Adjust.
14732         (rs6000_function_arg): Adjust.
14733         (rs6000_gimplify_va_arg): Pass false for that new parameter.
14735 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
14737         PR rtl-optimization/84169
14738         PR rtl-optimization/84780
14739         * combine.c (can_combine_p): Check for a 2-insn combination whether
14740         the destination register is used between the two insns, too.
14742 2018-03-12  Richard Biener  <rguenther@suse.de>
14744         PR tree-optimization/84803
14745         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
14746         for refs DR analysis didn't process.
14748 2018-03-12  Richard Biener  <rguenther@suse.de>
14750         PR tree-optimization/84777
14751         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
14752         force-vectorize loops ignore whether we are optimizing for size.
14754 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
14756         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
14757         (TARGET_MD_ASM_ADJUST): Define.
14759 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
14760             Kito Cheng  <kito.cheng@gmail.com>
14761             Chung-Ju Wu  <jasonwucj@gmail.com>
14763         * config/nds32/nds32.c (nds32_compute_stack_frame,
14764         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
14765         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
14766         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
14767         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
14768         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
14769         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
14770         * config/nds32/nds32.md (prologue, epilogue): Use macro
14771         NDS32_V3PUSH_AVAILABLE_P to do checking.
14773 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
14775         PR debug/58150
14776         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
14777         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
14778         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
14779         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
14780         addition of most attributes on !orig_type_die or the attribute not
14781         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
14783 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14784             Chung-Ju Wu  <jasonwucj@gmail.com>
14786         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
14787         __NDS32_VH__ macro.
14788         * config/nds32/nds32.opt (mvh): New option.
14790 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14791             Chung-Ju Wu  <jasonwucj@gmail.com>
14793         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
14794         function.
14795         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
14796         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
14797         definition.
14799 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
14800             Chung-Ju Wu  <jasonwucj@gmail.com>
14802         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
14803         function.
14804         * config/nds32/nds32-multiple.md (strlensi): New pattern.
14805         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
14807 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
14808             Kito Cheng  <kito.cheng@gmail.com>
14809             Chung-Ju Wu  <jasonwucj@gmail.com>
14811         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
14812         UNSPEC_FFMISM and UNSPEC_FLMISM.
14813         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
14814         for ffb, ffmism and flmism.
14815         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
14816         (unspec_ffmism): Ditto.
14817         (unspec_flmism): Ditto.
14818         (nds32_expand_builtin_impl): Check if string extension is available.
14819         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
14820         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
14822 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
14824         Reverting patch:
14825         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14827         PR target/83712
14828         * lra-assigns.c (assign_by_spills): Return a flag of reload
14829         assignment failure.  Do not process the reload assignment
14830         failures.  Do not spill other reload pseudos if they has the same
14831         reg class.
14832         (lra_assign): Add a return arg.  Set up from the result of
14833         assign_by_spills call.
14834         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14835         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14836         usage_insns if it is not NULL.
14837         (spill_hard_reg_in_range): New function.
14838         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14839         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14840         function prototypes.
14841         (lra_assign): Change prototype.
14842         * lra.c (lra): Add code to deal with fails by splitting hard reg
14843         live ranges.
14845 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
14847         PR target/84807
14848         * config/i386/i386.opt: Replace Enforcment with Enforcement.
14850 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
14852         PR debug/84620
14853         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
14854         (dw_val_node): Add val_symbolic_view.
14855         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
14856         (symview_upper_bound): New.
14857         (new_line_info_table): Initialize symviews_since_reset.
14858         (dwarf2out_source_line): Count symviews_since_reset and set
14859         symview_upper_bound.
14860         (dw_val_equal_p): Handle symview.
14861         (add_AT_symview): New.
14862         (print_dw_val): Handle symview.
14863         (attr_checksum, attr_checksum_ordered): Likewise.
14864         (same_dw_val_p, size_of_die): Likewise.
14865         (value_format, output_die): Likewise.
14866         (add_high_low_attributes): Use add_AT_symview for entry_view.
14867         (dwarf2out_finish): Reset symview_upper_bound, clear
14868         zero_view_p.
14870 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
14872         PR target/83969
14873         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
14874         Add strict argument and use it.
14875         (rs6000_split_multireg_move): Update for new strict argument.
14876         (mem_operand_gpr): Disallow all non-offsettable addresses.
14877         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
14879 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
14881         PR target/84772
14882         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
14883         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
14884         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
14886         PR c++/84767
14887         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
14888         decl, use remap_type if we want to use the type.
14890 2018-03-09  Martin Sebor  <msebor@redhat.com>
14892         PR tree-optimization/84526
14893         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
14894         Remove dead code.
14895         (builtin_access::generic_overlap): Be prepared to handle non-array
14896         base objects.
14898 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
14900         PR rtl-optimization/84682
14901         * lra-constraints.c (process_address_1): Check is_address flag
14902         for address constraints.
14903         (process_alt_operands): Likewise.
14904         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
14905         preprocess_constraints.
14906         * recog.h (preprocess_constraints): Add oploc parameter.
14907         Adjust callers.
14908         * recog.c (preprocess_constraints): Test address_operand for
14909         CT_ADDRESS constraints.
14911 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
14913         PR target/83712
14914         * lra-assigns.c (assign_by_spills): Return a flag of reload
14915         assignment failure.  Do not process the reload assignment
14916         failures.  Do not spill other reload pseudos if they has the same
14917         reg class.
14918         (lra_assign): Add a return arg.  Set up from the result of
14919         assign_by_spills call.
14920         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
14921         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
14922         usage_insns if it is not NULL.
14923         (spill_hard_reg_in_range): New function.
14924         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
14925         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
14926         function prototypes.
14927         (lra_assign): Change prototype.
14928         * lra.c (lra): Add code to deal with fails by splitting hard reg
14929         live ranges.
14931 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14933         PR target/83193
14934         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
14935         Accept complain bool parameter.  Only emit errors if it is true.
14936         (arm_parse_cpu_option_name): Likewise.
14937         (arm_target_thumb_only): Adjust callers of the above.
14938         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
14939         prototype to take a default true bool parameter.
14940         (arm_parse_arch_option_name): Likewise.
14942 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
14943             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
14945         PR jit/64089
14946         PR jit/84288
14947         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
14948         * configure: Regenerate.
14949         * configure.ac ("linker --version-script option"): New.
14950         ("linker soname option"): New.
14952 2018-03-09  Richard Biener  <rguenther@suse.de>
14954         PR tree-optimization/84775
14955         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
14956         immediate uses of predicate stmts and mark them modified.
14958         Revert
14959         PR tree-optimization/84178
14960         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14961         to caller.
14962         (version_loop_for_if_conversion): Delay update_ssa call.
14963         (tree_if_conversion): Delay update_ssa until after predicate
14964         insertion.
14966 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
14968         PR target/84763
14969         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
14970         when the function accesses prior frames.
14972 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
14974         PR debug/84456
14975         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
14976         gen_llsym, otherwise call maybe_gen_llsym.
14978         PR inline-asm/84742
14979         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
14980         has ',' character inside of it.
14982 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14984         PR target/84748
14985         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
14986         as clobbering CC_REGNUM.
14988 2018-03-08  Richard Biener  <rguenther@suse.de>
14990         PR middle-end/84552
14991         * tree-scalar-evolution.c: Include tree-into-ssa.h.
14992         (follow_copies_to_constant): Do not follow SSA names registered
14993         for update.
14995 2018-03-08  Richard Biener  <rguenther@suse.de>
14997         PR tree-optimization/84178
14998         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
14999         to caller.
15000         (version_loop_for_if_conversion): Delay update_ssa call.
15001         (tree_if_conversion): Delay update_ssa until after predicate
15002         insertion.
15004 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
15006         PR tree-optimization/84178
15007         * tree-if-conv.c (release_bb_predicate): Remove the
15008         the assertion that the stmts have NULL use_ops.
15009         Discard the statements, asserting that they haven't
15010         yet been added to a BB.
15012 2018-03-08  Richard Biener  <rguenther@suse.de>
15014         PR tree-optimization/84746
15015         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
15016         (phi_translate): Pass in destination ANTIC_OUT set.
15017         (phi_translate_1): Likewise.  For a simplified result lookup
15018         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
15019         (phi_translate_set): Adjust.
15020         (do_pre_regular_insertion): Likewise.
15021         (do_pre_partial_partial_insertion): Likewise.
15023 2018-03-08  Martin Liska  <mliska@suse.cz>
15025         PR gcov-profile/84735
15026         * doc/gcov.texi: Document usage of profile files.
15027         * gcov-io.h: Document changes in the format.
15029 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
15031         PR debug/84404
15032         PR debug/84408
15033         * dwarf2out.c (struct dw_line_info_table): Update comments for
15034         view == -1.
15035         (FORCE_RESET_NEXT_VIEW): New.
15036         (FORCE_RESETTING_VIEW_P): New.
15037         (RESETTING_VIEW_P): Check for -1 too.
15038         (ZERO_VIEW_P): Likewise.
15039         (new_line_info_table): Force-reset next view.
15040         (dwarf2out_begin_function): Likewise.
15041         (dwarf2out_source_line): Simplify zero_view_p initialization.
15042         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
15043         view directly.  Omit view when omitting .loc at line 0.
15045 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
15047         PR tree-optimization/84740
15048         * tree-switch-conversion.c (process_switch): Call build_constructors
15049         only if info.phi_count is non-zero.
15051         PR tree-optimization/84739
15052         * tree-tailcall.c (find_tail_calls): Check call arguments against
15053         DECL_ARGUMENTS (current_function_decl) rather than
15054         DECL_ARGUMENTS (func) when checking for tail recursion.
15056 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15058         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
15059         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
15060         Volker Reichelt's entry and add entries for people that perform
15061         GCC fuzzy testing and report numerous bugs.
15063 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
15065         PR target/82411
15066         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
15067         readonly data in sdata, if that is disabled.
15068         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
15069         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
15070         -mreadonly-in-sdata option.
15072 2018-03-07  Martin Sebor  <msebor@redhat.com>
15074         PR tree-optimization/84468
15075         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
15076         basic block when looking for nul assignment.
15078 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
15080         PR target/84277
15081         * except.h (output_function_exception_table): Adjust prototype.
15082         * except.c (output_function_exception_table): Remove FNNAME parameter
15083         and add SECTION parameter.  Ouput one part of the table at a time.
15084         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
15085         the first part of the exception table and emit unwind directives.
15086         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
15087         (i386_pe_seh_cold_init): Likewise.
15088         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
15089         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
15090         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
15091         (ix86_output_call_insn): Emit a nop in one more case for SEH.
15092         * config/i386/winnt.c: Include except.h.
15093         (struct seh_frame_state): Add reg_offset, after_prologue and
15094         in_cold_section fields.
15095         (i386_pe_seh_end_prologue): Set seh->after_prologue.
15096         (i386_pe_seh_cold_init): New function.
15097         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
15098         to seh->in_cold_section.
15099         (seh_emit_push): Record the offset of the push.
15100         (seh_emit_save): Record the offet of the save.
15101         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
15102         Test seh->after_prologue to disregard the epilogue.
15103         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
15104         (i386_pe_end_cold_function): New function.
15106 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
15108         PR fortran/84565
15109         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
15110         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
15112         PR c++/84704
15113         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
15114         on tmp_var.
15115         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
15116         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
15118         PR middle-end/84723
15119         * multiple_target.c: Include tree-inline.h and intl.h.
15120         (expand_target_clones): Diagnose and fail if node->definition and
15121         !tree_versionable_function_p (node->decl).
15123 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
15125         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
15126         sprint_ul.
15127         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
15128         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
15129         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
15131 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15133         PR target/84710
15134         * combine.c (try_combine): Use reg_or_subregno instead of handling
15135         just paradoxical SUBREGs and REGs.
15137 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
15139         * config/arc/arc.c (arc_finalize_pic): Remove function.
15140         (arc_must_save_register): We use single base PIC register, remove
15141         checks to save/restore the PIC register.
15142         (arc_expand_prologue): Likewise.
15143         * config/arc/arc-protos.h (arc_set_default_type_attributes):
15144         Remove.
15145         (arc_verify_short): Likewise.
15146         (arc_attr_type): Likewise.
15147         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
15148         (walk_stores): Likewise.
15149         (arc_address_cost): Make it static.
15150         (arc_verify_short): Likewise.
15151         (branch_dest): Likewise.
15152         (arc_attr_type): Likewise.
15153         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
15154         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
15155         (arc_final_prescan_insn): Remove inserting the nops due to
15156         hardware hazards.  It is done in reorg step.
15157         (insn_length_variant_t): Remove.
15158         (insn_length_parameters_t): Likewise.
15159         (arc_insn_length_parameters): Likewise.
15160         (arc_get_insn_variants): Likewise.
15161         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
15163 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
15165         PR inline-asm/84683
15166         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
15167         assertion failure.
15169         PR tree-optimization/84687
15170         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
15171         on new_node->decl.
15172         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
15174 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15176         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
15177         Rename to ppc_speculation_barrier.
15178         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
15179         __builtin_ppc_speculation_barrier.
15181 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15183         PR target/84700
15184         * combine.c (combine_simplify_rtx): Don't try to simplify if
15185         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
15186         are equal to x.
15188 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
15190         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
15191         to 32 bytes when compiling for POWER9.
15193 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
15195         PR target/84564
15196         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
15197         regparm >= 3 with no arg reg available also for calls with
15198         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
15200         PR target/84524
15201         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
15202         orig,vex.
15203         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
15205 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
15207         PR target/84264
15208         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
15210 2018-03-05  Richard Biener  <rguenther@suse.de>
15212         PR tree-optimization/84486
15213         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
15214         When inserting a __builtin_assume_aligned call set the LHS
15215         SSA name alignment info accordingly.
15217 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
15219         PR tree-optimization/84114
15220         * config/aarch64/aarch64.c (aarch64_reassociation_width)
15221         Avoid reassociation of FLOAT_MODE addition.
15223 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
15225         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
15226         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
15227         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
15228         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
15229         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
15230         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
15231         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
15232         and -mwbnoinvd.
15233         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
15234         __builtin_ia32_wbinvd): New builtins.
15235         (SPECIAL_ARGS2): New.
15236         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
15237         (SPECIAL_ARGS2): New.
15238         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
15239         (ix86_valid_target_attribute_inner_p): Ditto.
15240         (ix86_init_mmx_sse_builtins): Add special_args2.
15241         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
15242         TARGET_WBNOINVD_P): New.
15243         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
15244         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
15245         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
15246         * config/i386/immintrin.h (_wbinvd): New intrinsic.
15247         * config/i386/pconfigintrin.h: New file.
15248         * config/i386/wbnoinvdintrin.h: Ditto.
15249         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
15250         wbnoinvdintrin.h.
15251         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
15253 2018-03-05  Richard Biener  <rguenther@suse.de>
15255         PR tree-optimization/84670
15256         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
15257         member.
15258         (BB_VISITED_WITH_VISITED_SUCCS): New define.
15259         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
15260         (compute_antic_aux): Only assert the number of values in ANTIC_IN
15261         doesn't grow if all successors (recursively) were visited at least
15262         once.
15264 2018-03-05  Richard Biener  <rguenther@suse.de>
15266         PR tree-optimization/84650
15267         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
15268         if executed in the loop pipeline.
15270 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
15272         * doc/configfiles.texi (Configuration Files): Move info about
15273         conditionalizing $target-protos.h to...
15274         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
15275         differs from $target-protos.h.
15277 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
15278             Chung-Ju Wu  <jasonwucj@gmail.com>
15280         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
15281         * config/nds32/nds32-multiple.md (setmemsi): Define.
15282         * config/nds32/nds32-memory-manipulation.c
15283         (nds32_gen_dup_4_byte_to_word_value): New.
15284         (emit_setmem_word_loop): New.
15285         (emit_setmem_byte_loop): New.
15286         (nds32_expand_setmem_loop): New.
15287         (nds32_expand_setmem_loop_v3m): New.
15288         (nds32_expand_setmem_unroll): New.
15289         (nds32_expand_setmem): New.
15291 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15292             Chung-Ju Wu  <jasonwucj@gmail.com>
15294         * config/nds32/nds32-memory-manipulation.c
15295         (nds32_emit_load_store): New.
15296         (nds32_emit_post_inc_load_store): New.
15297         (nds32_emit_mem_move): New.
15298         (nds32_emit_mem_move_block): New.
15299         (nds32_expand_movmemsi_loop_unknown_size): New.
15300         (nds32_expand_movmemsi_loop_known_size): New.
15301         (nds32_expand_movmemsi_loop): New.
15302         (nds32_expand_movmemsi_unroll): New.
15303         (nds32_expand_movmemqi): Rename ...
15304         (nds32_expand_movmemsi): ... to this.
15305         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
15306         (movmemsi): ... to this.
15307         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
15308         (nds32_expand_movmemsi): ... to this.
15310 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15311             Monk Chiang  <sh.chiang04@gmail.com>
15312             Chung-Ju Wu  <jasonwucj@gmail.com>
15314         * config/nds32/nds32-protos.h
15315         (nds32_expand_load_multiple): New arguments.
15316         (nds32_expand_store_multiple): Ditto.
15317         (nds32_valid_multiple_load_store): Rename ...
15318         (nds32_valid_multiple_load_store_p): ... to this.
15319         * config/nds32/nds32-memory-manipulation.c
15320         (nds32_expand_load_multiple): Refine implementation.
15321         (nds32_expand_store_multiple): Ditto.
15322         * config/nds32/nds32-multiple.md
15323         (load_multiple): Update nds32_expand_load_multiple interface.
15324         (store_multiple): Update nds32_expand_store_multiple interface.
15325         * config/nds32/nds32-predicates.c
15326         (nds32_valid_multiple_load_store): Rename ...
15327         (nds32_valid_multiple_load_store_p): ... to this and refine
15328         implementation.
15329         * config/nds32/predicates.md
15330         (nds32_load_multiple_and_update_address_operation): New predicate.
15331         (nds32_store_multiple_and_update_address_operation): New predicate.
15333 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
15334             Chung-Ju Wu  <jasonwucj@gmail.com>
15336         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
15337         (combo): New attribute.
15338         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
15340 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
15342         * config/nds32/nds32.opt: Change -mcmodel= default value.
15344 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
15345             Monk Chiang  <sh.chiang04@gmail.com>
15346             Chung-Ju Wu  <jasonwucj@gmail.com>
15348         * config/nds32/constants.md (unspec_element): New enum.
15349         * config/nds32/constraints.md (Umw): New constraint.
15350         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
15351         * config/nds32/nds32-intrinsic.md: Likewise.
15352         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
15353         (nds32_valid_smw_lwm_base_p): New.
15354         (nds32_output_smw_single_word): New.
15355         (nds32_output_lmw_single_word): New.
15356         (nds32_expand_unaligned_load): New.
15357         (nds32_expand_unaligned_store): New.
15358         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
15359         (nds32_output_smw_single_word): Declare.
15360         (nds32_output_lmw_single_word): Declare.
15361         (nds32_expand_unaligned_load): Declare.
15362         (nds32_expand_unaligned_store): Declare.
15363         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
15364         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
15365         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
15366         NDS32_BUILTIN_UASTORE_DW.
15367         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
15368         predicate.
15370 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
15371             Kito Cheng  <kito.cheng@gmail.com>
15372             Chung-Ju Wu  <jasonwucj@gmail.com>
15374         * config/nds32/nds32-intrinsic.c
15375         (nds32_expand_builtin_null_ftype_reg): Delete.
15376         (nds32_expand_builtin_reg_ftype_imm): Ditto.
15377         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
15378         (nds32_read_argument): New.
15379         (nds32_legitimize_target): Ditto.
15380         (nds32_legitimize_argument): Ditto.
15381         (nds32_check_constant_argument): Ditto.
15382         (nds32_expand_unop_builtin): Ditto.
15383         (nds32_expand_unopimm_builtin): Ditto.
15384         (nds32_expand_binop_builtin): Ditto.
15385         (nds32_builtin_decl_impl): Ditto.
15386         (builtin_description): Ditto.
15387         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
15388         (nds32_init_builtins_impl): Ditto.
15389         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
15390         (nds32_builtin_decl): New.
15391         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
15392         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
15394 2018-03-02  Jeff Law  <law@redhat.com>
15396         * reorg.c (stop_search_p): Handle DEBUG_INSN.
15397         (redundant_insn, fill_simple_delay_slots): Likewise.
15398         (fill_slots_from_thread): Likewise.
15399         * resource.c (mark_referenced_resources): Likewise.
15400         (mark_set_resources, find_dead_or_set_registers): Likewise.
15402 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15404         * substring-locations.h (format_warning_va): Formatting fix for
15405         ATTRIBUTE_GCC_DIAG.
15406         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
15407         argument.
15408         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
15409         * substring-locations.c: Include intl.h.
15410         (format_warning_va): Turned into small wrapper around
15411         format_warning_n_va, renamed to ...
15412         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
15413         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
15414         use ngettext.
15415         (format_warning_at_substring_n): New function.
15416         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
15417         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
15418         format_warning_at_substring with just a shorter name instead of
15419         const function pointer.
15420         (fmtwarn_n): New function.
15421         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
15422         appropriate, get rid of all the fmtstr temporaries, move conditionals
15423         with G_() wrapped string literals directly into fmtwarn arguments,
15424         cast dir.len to (int), formatting fixes.
15426 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
15428         * doc/invoke.texi: Remove "Cilk Plus" references.
15430 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15431             Richard Biener  <rguenther@suse.de>
15433         PR ipa/84628
15434         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
15435         for error or warning attributes if CALL_FROM_THUNK_P is set.
15436         Formatting fixes.
15438 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15440         PR target/56540
15441         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
15442         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
15444         PR target/56540
15445         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
15446         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
15448         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
15449         instead of -1U in last predictors element's probability member.
15451 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
15453         PR ipa/83983
15454         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
15455         arguments if they are comparable.
15457 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15459         PR tree-optimization/84634
15460         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
15461         masks and masked_loop_p with a single loop_masks, making sure it's
15462         null for bb vectorization.
15464 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
15466         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
15467         (vect_analyze_data_ref_access): Use loop->safe_len rather than
15468         loop->force_vectorize to check whether there is no alias.
15470 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
15472         PR target/84614
15473         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
15474         prototypes.
15475         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
15476         comments.
15477         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
15478         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
15479         instead of a loop around prev_real_insn.
15480         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
15481         prev_real_insn.
15483         PR inline-asm/84625
15484         * config/i386/i386.c (ix86_print_operand): Use conditional
15485         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
15486         zero vector.
15488 2018-03-02  Richard Biener  <rguenther@suse.de>
15490         PR tree-optimization/84427
15491         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
15492         (bitmap_set_subtract_values): Rewrite to handle multiple
15493         exprs per value.
15494         (clean): Likewise.
15495         (prune_clobbered_mems): Likewise.
15496         (phi_translate): Take edge instead of pred/phiblock.
15497         (phi_translate_1): Likewise.
15498         (phi_translate_set): Likewise.  Insert all translated
15499         exprs for a value into the set, keeping possibly multiple
15500         expressions per value.
15501         (compute_antic_aux): Adjust for phi_translate changes.
15502         When intersecting union the expressions and prune those
15503         not in the final value set, keeping possibly multiple
15504         expressions per value.  Do not use value-insertion
15505         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
15506         all expressions.  Add verification that the value-sets
15507         only shrink during iteration.
15508         (compute_partial_antic_aux): Adjust for the phi_translate changes.
15509         (do_pre_regular_insertion): Likewise.
15510         (do_pre_partial_partial_insertion): Likewise.
15512 2018-03-02  Richard Biener  <rguenther@suse.de>
15514         PR target/82005
15515         * config/darwin.c (saved_debug_info_level): New static global.
15516         (darwin_asm_lto_start): Disable debug info generation for LTO out.
15517         (darwin_asm_lto_end): Restore debug info generation settings.
15519 2018-03-01  Martin Liska  <mliska@suse.cz>
15521         PR sanitizer/82484
15522         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
15523         volatile arguments.
15525 2018-03-01  Richard Biener  <rguenther@suse.de>
15527         PR debug/84645
15528         * dwarf2out.c (gen_variable_die): Properly handle late VLA
15529         type annotation with LTO when debug was disabled at compile-time.
15531 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
15533         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
15534         XINT with INTVAL.
15535         (mips_final_postscan_insn): Likewise.
15537 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
15539         PR rtl-optimization/84528
15540         * alias.c (init_alias_target): Add commentary.
15541         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
15542         a unique base value if the frame pointer is not eliminated
15543         to the stack pointer.
15545 2018-03-01  Tom de Vries  <tom@codesourcery.com>
15547         PR rtl-optimization/83327
15548         * lra-int.h (hard_regs_spilled_into): Declare.
15549         * lra.c (hard_regs_spilled_into): Define.
15550         (init_reg_info): Init hard_regs_spilled_into.
15551         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
15552         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
15553         (process_bb_lives): Handle hard_regs_spilled_into.
15554         (lra_create_live_ranges_1): Before doing liveness propagation, clear
15555         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
15557 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
15559         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
15560         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
15561         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
15562         * config/rs6000/aix72.h: New file.
15564 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
15566         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
15567         instead of warning_at with conditional singular and plural messages
15568         where possible.
15570         PR target/52991
15571         * stor-layout.c (update_alignment_for_field): For
15572         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
15573         && !DECL_PACKED (field), do the alignment update, just use
15574         only desired_align instead of MAX (type_align, desired_align)
15575         as the alignment.
15576         (place_field): Don't do known_align < desired_align handling
15577         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
15578         is non-NULL, instead do it after rli->prev_field handling and
15579         only if not within a bitfield word.  For DECL_PACKED (field)
15580         use type_align of BITS_PER_UNIT.
15582 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
15584         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
15585         superfluous parentheses and trailing spaces.
15587 2018-02-28  Richard Biener  <rguenther@suse.de>
15589         PR tree-optimization/84584
15590         * graphite-scop-detection.c (scop_detection::add_scop): Discard
15591         SCoPs with fake exit edge.
15593 2018-02-28  Martin Liska  <mliska@suse.cz>
15595         PR testsuite/84597
15596         * timevar.c (timer::print): Fix format to properly print 100%
15597         values.
15599 2018-02-28  Richard Biener  <rguenther@suse.de>
15601         PR middle-end/84607
15602         * genmatch.c (capture_info::walk_match): Do not mark
15603         captured expressions without operands as expr_p given
15604         they act more like predicates and should be subject to
15605         "lost tail" side-effect preserving.
15607 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
15609         PR rtl-optimization/81611
15610         * auto-inc-dec.c (attempt_change): Move dead note from
15611         mem_insn if it's the next use of regno
15612         (find_address): Take address use of reg holding
15613         non-incremented value.  Add parm to limit search to the named
15614         reg only.
15615         (merge_in_block): Attempt to use a mem insn that is the next
15616         use of the original regno.
15618 2018-02-27  Martin Sebor  <msebor@redhat.com>
15620         PR c++/83871
15621         * doc/invoke.texi (-Wmissing-attributes): New option.
15622         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
15624 2018-02-27  Martin Sebor  <msebor@redhat.com>
15626         PR translation/84207
15627         * diagnostic-core.h (warning_n, error_n, inform_n): Change
15628         n argument to unsigned HOST_WIDE_INT.
15629         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
15630         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
15631         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
15632         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
15634 2018-02-27  Richard Biener  <rguenther@suse.de>
15636         PR tree-optimization/84512
15637         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
15638         Do not use the estimate returned from record_stmt_cost for
15639         the scalar iteration cost but sum properly using add_stmt_cost.
15641 2018-02-27  Richard Biener  <rguenther@suse.de>
15643         PR tree-optimization/84466
15644         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
15645         Adjust last change to less strictly validate use operands.
15647 2018-02-27  Martin Liska  <mliska@suse.cz>
15649         PR gcov-profile/84548
15650         * gcov.c (process_file): Allow partial overlap and consider it
15651         also as group functions.
15652         (output_lines): Properly calculate range of lines for a group.
15654 2018-02-27  Martin Liska  <mliska@suse.cz>
15656         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
15657         'ggc' suffixes.  Change first column width.
15658         (timer::print): Fix formatting of the column.
15660 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
15662         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
15663         preserve inline entry blocks for the sake of debug inline
15664         entry point markers alone.
15665         (remove_unused_locals): Suggest in comments a better place to
15666         force the preservation of inline entry blocks that are
15667         otherwise unused, but do not preserve them.
15669 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15671         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
15673 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15675         PR target/84039
15676         * config/i386/constraints.md (Bs): Replace
15677         ix86_indirect_branch_register with
15678         TARGET_INDIRECT_BRANCH_REGISTER.
15679         (Bw): Likewise.
15680         * config/i386/i386.md (indirect_jump): Likewise.
15681         (tablejump): Likewise.
15682         (*sibcall_memory): Likewise.
15683         (*sibcall_value_memory): Likewise.
15684         Peepholes of indirect call and jump via memory: Likewise.
15685         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
15686         (*sibcall_value_GOT_32): Likewise.
15687         * config/i386/predicates.md (indirect_branch_operand): Likewise.
15688         (GOT_memory_operand): Likewise.
15689         (call_insn_operand): Likewise.
15690         (sibcall_insn_operand): Likewise.
15691         (GOT32_symbol_operand): Likewise.
15692         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
15694 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15696         PR rtl-optimization/83496
15697         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
15698         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
15699         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
15700         redundant insn, if any.
15701         (relax_delay_slots): Likewise.
15702         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
15704 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
15706         PR tree-optimization/83965
15707         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
15708         that grouped statements are part of a reduction chain.  Return
15709         true if the statement is not marked as a reduction itself but
15710         is part of a group.
15711         (vect_recog_dot_prod_pattern): Don't check whether the statement
15712         is part of a group here.
15713         (vect_recog_sad_pattern): Likewise.
15714         (vect_recog_widen_sum_pattern): Likewise.
15716 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
15718         PR debug/84545
15719         * final.c (rest_of_clean_state): Also look for calls inside sequences.
15721 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
15723         PR target/84530
15724         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
15725         the bool argument.
15726         (ix86_output_indirect_function_return): New prototype.
15727         (ix86_split_simple_return_pop_internal): Likewise.
15728         * config/i386/i386.c (indirect_return_via_cx): New.
15729         (indirect_return_via_cx_bnd): Likewise.
15730         (indirect_thunk_name): Handle return va CX_REG.
15731         (output_indirect_thunk_function): Create alias for
15732         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
15733         (ix86_output_indirect_jmp): Remove the bool argument.
15734         (ix86_output_indirect_function_return): New function.
15735         (ix86_split_simple_return_pop_internal): Likewise.
15736         * config/i386/i386.md (*indirect_jump): Don't pass false
15737         to ix86_output_indirect_jmp.
15738         (*tablejump_1): Likewise.
15739         (simple_return_pop_internal): Change it to define_insn_and_split.
15740         Call ix86_split_simple_return_pop_internal to split it for
15741         -mfunction-return=.
15742         (simple_return_indirect_internal): Call
15743         ix86_output_indirect_function_return instead of
15744         ix86_output_indirect_jmp.
15746 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
15748         PR bootstrap/84405
15749         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
15750         memset and value initialization afterwards.
15752 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
15754         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
15756 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15758         PR target/84521
15759         * common/config/aarch64/aarch64-common.c
15760         (aarch_option_optimization_table[]): Switch
15761         off fomit-frame-pointer
15763 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15764             Chung-Ju Wu  <jasonwucj@gmail.com>
15766         * config/nds32/nds32-multiple.md (load_multiple): Disallow
15767         volatile memory.
15768         (store_multiple): Ditto.
15770 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
15772         * config.gcc: Add --with-cpu support for nds32 target.
15773         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
15774         * config/nds32/nds32.opt: Add -mcpu= option.
15776 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
15778         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
15779         isel=yes): Warn for these deprecated options.
15781 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
15783         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
15784         ISA_2_5_MASKS_EMBEDDED.
15786 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
15788         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
15789         p->max as pointers rather than using iterative_hash_expr.
15791 2018-02-23  Carl Love  <cel@us.ibm.com>
15793         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
15794         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
15795         BU_P8V_OVERLOAD_2.
15796         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
15797         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
15798         P8V_BUILTIN_VEC_VUNSIGNED2.
15800 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
15802         PR target/81572
15803         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
15804         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
15805         LRA_UNKNOWN_ALT.
15806         * lra-constraints.c (curr_insn_transform): Set up
15807         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
15808         LRA_UNKNOWN_ALT.
15809         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
15810         * lra-eliminations.c (spill_pseudos): Ditto.
15811         (process_insn_for_elimination): Ditto.
15812         * lra-lives.c (reg_early_clobber_p): Use the new macros.
15813         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
15814         LRA_NON_CLOBBERED_ALT.
15816 2018-02-22  Martin Sebor  <msebor@redhat.com>
15818         PR tree-optimization/84480
15819         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
15820         to maybe_diag_stxncpy_trunc.  Call it.
15821         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
15822         from gimple_fold_builtin_strcpy.  Print inlining stack.
15823         (handle_builtin_stxncpy): Print inlining stack.
15824         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
15826 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
15828         PR target/84176
15829         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
15830         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
15831         and -fcheck-pointer-bounds are used together.
15832         (indirect_thunk_prefix): New enum.
15833         (indirect_thunk_need_prefix): New function.
15834         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
15835         "_nt" instead of "_bnd" for NOTRACK prefix.
15836         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
15837         (output_indirect_thunk_function): Likewise.
15838         (): Likewise.
15839         (ix86_code_end): Update output_indirect_thunk_function calls.
15840         (ix86_output_indirect_branch_via_reg): Replace
15841         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
15842         (ix86_output_indirect_branch_via_push): Likewise.
15843         (ix86_output_function_return): Likewise.
15844         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
15845         incompatible with -fcf-protection=branch and
15846         -fcheck-pointer-bounds.
15848 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15850         PR target/83335
15851         * config/aarch64/aarch64.c (aarch64_print_address_internal):
15852         Change gcc_assert call to output_operand_lossage.
15854 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
15856         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
15858 2018-02-22  DJ Delorie  <dj@redhat.com>
15859             Sebastian Perta  <sebastian.perta@renesas.com>
15860             Oleg Endo  <olegendo@gcc.gnu.org>
15862         * config/rx/rx.c (rx_rtx_costs): New function.
15863         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
15865 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15867         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
15869 2018-02-22  Martin Liska  <mliska@suse.cz>
15871         PR driver/83193
15872         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
15873         Add "native" as a possible value.
15875 2018-02-22  Martin Liska  <mliska@suse.cz>
15877         PR driver/83193
15878         * config/i386/i386.c (ix86_option_override_internal):
15879         Add "native" as a possible value for -march and -mtune.
15881 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
15883         PR target/84502
15884         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
15885         to all type variants.
15887         PR tree-optimization/84503
15888         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
15889         width as info->bitpos + info->bitsize - start.
15890         (merged_store_group::merge_overlapping): Simplify width computation.
15891         (check_no_overlap): New function.
15892         (imm_store_chain_info::try_coalesce_bswap): Compute expected
15893         start + width and last_order of the group, fail if check_no_overlap
15894         fails.
15895         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
15896         to group if check_no_overlap fails.
15898 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15900         * config/rs6000/altivec.md: Delete contraint arguments to
15901         define_expand, define_split, and define_peephole2, and in
15902         define_insn_and_split if always unused.
15903         * config/rs6000/darwin.md: Ditto.
15904         * config/rs6000/dfp.md: Ditto.
15905         * config/rs6000/rs6000.md: Ditto.
15906         * config/rs6000/sync.md: Ditto.
15907         * config/rs6000/vector.md: Ditto.
15908         * config/rs6000/vsx.md: Ditto.
15910 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
15912         * config/rs6000/altivec.md: Write output control strings as braced
15913         blocks instead of double-quoted strings.
15914         * config/rs6000/darwin.md: Ditto.
15915         * config/rs6000/rs6000.md: Ditto.
15916         * config/rs6000/vector.md: Ditto.
15917         * config/rs6000/vsx.md: Ditto.
15919 2018-02-21  Jason Merrill  <jason@redhat.com>
15921         PR c++/84314 - ICE with templates and fastcall attribute.
15922         * attribs.c (build_type_attribute_qual_variant): Remove assert.
15924 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15926         * ipa-cp.c (determine_versionability): Fix comment typos.
15928 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
15930         PR c/84229
15931         * ipa-cp.c (determine_versionability): Do not version functions caling
15932         va_arg_pack.
15934 2018-02-21  Martin Liska  <mliska@suse.cz>
15936         PR driver/83193
15937         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
15938         Add "native" as a possible value.
15939         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
15940         the macro when native cpu detection is available.
15942 2018-02-21  Martin Liska  <mliska@suse.cz>
15944         PR driver/83193
15945         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
15946         Add "native" as a possible value.
15947         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
15948         when native cpu detection is available.
15950 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
15951             Martin Sebor  <msebor@redhat.com>
15953         PR tree-optimization/84478
15954         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
15955         false.
15956         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
15957         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
15958         support which is conservatively correct, for 2 only stay conservative
15959         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
15960         argument to the 2 argument get_range_strlen, adjust 6 arg
15961         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
15962         false.
15963         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
15964         (gimple_fold_builtin_strlen): Pass true as last argument to
15965         get_range_strlen.
15967 2018-02-20  Martin Sebor  <msebor@redhat.com>
15969         PR middle-end/84095
15970         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
15971         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
15972         (builtin_memref::builtin_memref): Factor out parts into
15973         set_base_and_offset and call it.
15975 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
15977         PR middle-end/84406
15978         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
15979         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
15980         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
15981         search at the associated MODE_INT.
15983 2018-02-20  Jeff Law  <law@redhat.com>
15985         PR middle-end/82123
15986         PR tree-optimization/81592
15987         PR middle-end/79257
15988         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
15989         for range data rather than using global data.
15990         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
15991         range data rather than using global data.
15992         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
15993         pass it to children as needed.
15994         (struct directive::fmtresult): Similarly.
15995         (struct directive::set_width): Similarly.
15996         (struct directive::set_precision): Similarly.
15997         (format_integer, format_directive, parse_directive): Similarly.
15998         (format_none): Accept unnamed vr_values parameter.
15999         (format_percent, format_floating, format_character): Similarly.
16000         (format_string, format_plain): Similarly.
16001         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
16002         the EVRP range analyzer for range data rather than using global data.
16003         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
16004         gimple-ssa-evrp-analyze.h
16005         (class sprintf_dom_walker): Add after_dom_children member function.
16006         Add evrp_range_analyzer member.
16007         (sprintf_dom_walker::before_dom_children): Call into the EVRP
16008         range analyzer as needed.
16009         (sprintf_dom_walker::after_dom_children): New member function.
16010         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
16011         if not optimizing.
16012         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
16013         (evrp_range_analyzer::pop_to_marker): Likewise.
16015 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
16017         PR tree-optimization/84419
16018         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
16019         with the required type if its current type is compatible but
16020         different.
16022 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
16024         PR middle-end/82004
16025         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
16026         after vectorization.
16028 2018-02-20  Martin Liska  <mliska@suse.cz>
16030         PR driver/83193
16031         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
16032         possible values if we don't have a hint.
16034 2018-02-20  Martin Liska  <mliska@suse.cz>
16036         PR c/84310
16037         PR target/79747
16038         * final.c (shorten_branches): Build align_tab array with one
16039         more element.
16040         * opts.c (finish_options): Add alignment option limit check.
16041         (MAX_CODE_ALIGN): Likewise.
16042         (MAX_CODE_ALIGN_VALUE): Likewise.
16043         * doc/invoke.texi: Document maximum allowed option value for
16044         all -falign-* options.
16046 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
16048         PR target/84146
16049         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
16050         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
16051         * var-tracking.c (emit_note_insn_var_location): Remove all references
16052         to NOTE_INSN_CALL_ARG_LOCATION.
16053         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
16054         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
16055         Use copy_rtx_if_shared.
16056         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
16057         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
16058         (dwarf2out_var_location): Remove handling of
16059         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
16060         on call_insn.
16061         * final.c (final_scan_insn): Remove all references to
16062         NOTE_INSN_CALL_ARG_LOCATION.
16063         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
16064         before dumping final insns.
16065         * except.c (emit_note_eh_region_end): Remove all references to
16066         NOTE_INSN_CALL_ARG_LOCATION.
16067         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
16068         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
16069         * config/arc/arc.c (hwloop_optimize): Likewise.
16070         * config/arm/arm.c (create_fix_barrier): Likewise.
16071         * config/s390/s390.c (s390_chunkify_start): Likewise.
16072         * config/sh/sh.c (find_barrier): Likewise.
16073         * config/i386/i386.c (rest_of_insert_endbranch,
16074         ix86_seh_fixup_eh_fallthru): Likewise.
16075         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
16076         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
16077         * config/frv/frv.c (frv_function_prologue): Likewise.
16078         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
16079         reg note.
16080         (note_outside_basic_block_p): Remove all references to
16081         NOTE_INSN_CALL_ARG_LOCATION.
16082         * gengtype.c (adjust_field_rtx_def): Likewise.
16083         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
16084         Likewise.
16085         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
16086         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
16088         PR c++/84444
16089         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
16090         is ADDR_EXPR.
16092         PR tree-optimization/84452
16093         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
16094         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
16095         is NULL.
16097 2018-02-19  Martin Liska  <mliska@suse.cz>
16099         PR sanitizer/82183
16100         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
16102 2018-02-19  Martin Liska  <mliska@suse.cz>
16103             Richard Sandiford  <richard.sandiford@linaro.org>
16105         PR tree-optimization/82491
16106         * gimple-fold.c (get_base_constructor): Make earlier bail out
16107         to prevent ubsan.
16109 2018-02-19  Carl Love  <cel@us.ibm.com>
16111         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
16112         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
16113         BU_P8V_OVERLOAD_1.
16114         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
16115         P8V_BUILTIN_VEC_NEG.
16117 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
16119         * config/rl78/rl78.md (movdf): New define expand.
16121 2018-02-19  Martin Liska  <mliska@suse.cz>
16123         PR other/80589
16124         * doc/invoke.texi: Fix typo.
16125         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
16127 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
16129         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
16130         handle rs6000_single_float and rs6000_double_float specially for
16131         e500 family CPUs.
16133 2018-02-16  Jeff Law  <law@redhat.com>
16135         * config/rx/rx.c (add_pop_cfi_notes): New function.;
16136         (pop_regs): Use it.
16138 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16140         PR ipa/84425
16141         * ipa-inline.c (inline_small_functions): Fix a typo.
16143 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16145         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
16147 2018-02-16  Carl Love  <cel@us.ibm.com>
16149         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
16150         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
16151         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
16152         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
16153         expansion to P8V_BUILTIN_VEC_FLOAT2.
16155 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
16157         PR rtl-optimization/70023
16158         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
16159         src_regno into account.
16161 2018-02-16  Carl Love  <cel@us.ibm.com>
16163         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
16164         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
16165         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
16166         * config/rs6000/rs6000.c: Remove case statements for
16167         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
16168         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
16169         and P9V_BUILTIN_VEC_VINSERT4B.
16170         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
16171         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
16172         * config/rs6000/vsx.md:
16173         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
16174         vec_insert4b.
16176 2018-02-16  Carl Love  <cel@us.ibm.com>
16178         * config/rs6000/altivec.h: Add builtin names vec_extract4b
16179         vec_insert4b.
16180         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
16181         definitions.
16182         * config/rs6000/rs6000-c.c: Add the definitions for
16183         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
16184         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
16185         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
16186         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
16187         definition for insert4b and define insn *insert3b_internal.
16188         * doc/extend.texi: Add documentation for vec_extract4b.
16190 2018-02-16  Nathan Sidwell  <nathan@acm.org>
16192         * doc/extend.texi (Backwards Compatibility): Mention friend
16193         injection.  Note for-scope is deprecated.
16194         * doc/invoke.texi (-ffriend-injection): Deprecate.
16196 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
16198         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
16199         that moved to I2, also allow destinations that are a paradoxical
16200         subreg (instead of a normal reg).
16202 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
16204         PR target/83831
16205         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
16206         to QImode.
16208 2018-02-16  Richard Biener  <rguenther@suse.de>
16210         PR tree-optimization/84037
16211         PR tree-optimization/84016
16212         PR target/82862
16213         * config/i386/i386.c (ix86_builtin_vectorization_cost):
16214         Adjust vec_construct for the fact we need additional higher latency
16215         128bit inserts for AVX256 and AVX512 vector builds.
16216         (ix86_add_stmt_cost): Scale vector construction cost for
16217         elementwise loads.
16219 2018-02-16  Richard Biener  <rguenther@suse.de>
16221         PR tree-optimization/84417
16222         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
16223         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
16224         (non_rewritable_lvalue_p): Likewise, use poly-ints.
16226 2018-02-16  Martin Liska  <mliska@suse.cz>
16228         PR sanitizer/84307
16229         * internal-fn.def (ASAN_CHECK): Set proper flags.
16230         (ASAN_MARK): Likewise.
16232 2018-02-16  Julia Koval  <julia.koval@intel.com>
16234         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
16235         from PTA_CANNONLAKE.
16237 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
16239         PR target/84272
16240         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
16241         Use ++iter rather than iter++ for std::list iterators.
16242         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
16243         defer deleting them until all nodes in the forest are processed.  Do
16244         free even leaf nodes.  Change to_process into auto_vec.
16246         PR bootstrap/84405
16247         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
16248         * vec.h (vec_default_construct): Use memset instead of placement new
16249         if BROKEN_VALUE_INITIALIZATION is defined.
16250         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
16251         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
16252         is defined.
16254         PR rtl-optimization/83723
16255         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
16256         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
16257         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
16258         recursive calls.
16259         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
16260         callers.
16261         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
16263 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
16265         PR rtl-optimization/81443
16266         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
16267         from inner REGs to paradoxical SUBREGs.
16269 2018-02-16  Richard Biener  <rguenther@suse.de>
16271         PR tree-optimization/84399
16272         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
16273         For operands we can analyze at their definition make sure we can
16274         analyze them at each use as well.
16276 2018-02-16  Richard Biener  <rguenther@suse.de>
16278         PR tree-optimization/84190
16279         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
16280         volatile accesses if the decl isn't volatile.
16282 2018-02-15  Jason Merrill  <jason@redhat.com>
16284         PR c++/84314 - ICE with templates and fastcall attribute.
16285         * attribs.c (build_type_attribute_qual_variant): Don't clobber
16286         TYPE_CANONICAL on an existing type.
16288 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
16290         PR tree-optimization/84383
16291         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
16292         dstoff nor call operand_equal_p if dstbase is NULL.
16294         PR tree-optimization/84334
16295         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
16296         also a CONSTANT_CLASS_P, punt.
16298 2018-02-14  Jim Wilson  <jimw@sifive.com>
16300         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
16301         first SMALL_OPERAND check.  New local min_second_step.  Move assert
16302         to where locals are set.  Add TARGET_RVC support.
16303         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
16305 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
16307         * doc/invoke.texi: Correct -Wformat-overflow code sample.
16309 2018-02-14  Martin Sebor  <msebor@redhat.com>
16311         PR tree-optimization/83698
16312         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
16313         arrays constrain the offset range to their bounds.
16314         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
16315         (builtin_access::overlap): Avoid setting the size of overlap if it's
16316         already been set.
16317         (maybe_diag_overlap): Also consider arrays when deciding what values
16318         of offsets to include in diagnostics.
16320 2018-02-14  Martin Sebor  <msebor@redhat.com>
16322         PR c/84108
16323         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
16324         that correspond to the kind of a declaration.
16326 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
16328         PR target/83984
16329         * config/pa/pa.md: Load address of PIC label using the linkage table
16330         if the label is nonlocal.
16332 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16334         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
16335         warning message if user requests -maltivec=be.
16336         * doc/invoke.texi: Document deprecation of -maltivec=be.
16338 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
16340         PR target/84220
16341         * config/rs6000/rs6000-c.c: Update definitions for
16342         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
16343         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
16345 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
16347         PR target/84239
16348         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
16349         add _get_ssp intrinsics. Remove argument from
16350         __builtin_ia32_rdssp[d|q].
16351         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
16352         * config/i386/i386-builtin.def: Remove argument from
16353         __builtin_ia32_rdssp[d|q].
16354         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
16355         ix86_expand_special_args_builtin for _rdssp[d|q].
16356         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
16357         Clear register before usage.
16358         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
16359         Add documentation for new _get_ssp and _inc_ssp intrinsics.
16361 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
16363         PR tree-optimization/84357
16364         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
16365         operand 1 of an ARRAY_REF too.
16367 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
16369         PR target/83831
16370         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
16371         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16372         declarations.
16373         (set_of_reg): New struct.
16374         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
16375         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
16376         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
16377         functions.
16378         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
16379         Split into bitclr, bitset, bitinvert patterns if appropriate.
16380         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
16381         use rx_fuse_in_memory_bitop.
16382         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
16383         to named insn, correct maximum insn length.
16385 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
16387         PR target/79242
16388         * machmode.def: Define a complex mode for PARTIAL_INT.
16389         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
16390         MODE_PARTIAL_INT.
16391         * doc/rtl.texi: Document CSPImode.
16392         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
16393         handling.
16394         (msp430_hard_regno_nregs_with_padding): Likewise.
16396 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
16398         PR target/84279
16399         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
16401 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
16403         PR rtl-optimization/84169
16404         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
16405         we generated a parallel as new i3 and we split that to new i2 and i3
16406         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
16407         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
16408         those to i2, not i1.  Partially rewrite this scan code.
16410 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16412         PR c/82210
16413         * stor-layout.c (place_field): For variable length fields, adjust
16414         offset_align afterwards not just based on the field's alignment,
16415         but also on the size.
16417         PR middle-end/84309
16418         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
16419         of exps and logs in the use_exp2 case.
16421 2018-02-13  Jeff Law  <law@redhat.com>
16423         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
16424         entry for "vector".
16426         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
16427         ARGS as unused.
16429 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
16431         PR debug/84342
16432         PR debug/84319
16433         * common.opt (gas-loc-support, gas-locview-support): New.
16434         (ginline-points, ginternal-reset-location-views): New.
16435         * doc/invoke.texi: Document them.  Use @itemx where intended.
16436         (gvariable-location-views): Adjust.
16437         * target.def (reset_location_view): New.
16438         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
16439         (TARGET_RESET_LOCATION_VIEW): New.
16440         * doc/tm.texi: Rebuilt.
16441         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
16442         (dwarf2out_default_as_locview_support): New.
16443         (output_asm_line_debug_info): Use option variables.
16444         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
16445         (output_loc_list): Likewise.
16446         (add_high_low_attributes): Check option variables.
16447         Don't output entry view attribute in strict mode.
16448         (gen_inlined_subroutine_die): Check option variables.
16449         (dwarf2out_inline_entry): Likewise.
16450         (init_sections_and_labels): Likewise.
16451         (dwarf2out_early_finish): Likewise.
16452         (maybe_reset_location_view): New, from...
16453         (dwarf2out_var_location): ... here.  Call it.
16454         * debug.h (dwarf2out_default_as_loc_support): Declare.
16455         (dwarf2out_default_as_locview_support): Declare.
16456         * hooks.c (hook_int_rtx_insn_0): New.
16457         * hooks.h (hook_int_rtx_insn_0): Declare.
16458         * toplev.c (process_options): Take -gas-loc-support and
16459         -gas-locview-support from dwarf2out.  Enable
16460         -gvariable-location-views by default only with locview
16461         assembler support.  Enable -ginternal-reset-location-views by
16462         default only if the target defines the corresponding hook.
16463         Enable -ginline-points by default if location views are
16464         enabled; force it disabled if statement frontiers are
16465         disabled.
16466         * tree-inline.c (expand_call_inline): Check option variables.
16467         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
16469 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
16471         PR tree-optimization/84321
16472         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
16473         handling.  Also check whether the anti-range contains any values
16474         that satisfy the mask; switch to a VR_RANGE if not.
16476 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
16478         PR sanitizer/84340
16479         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
16481 2018-02-13  Martin Jambor  <mjambor@suse.cz>
16483         PR c++/83990
16484         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
16485         of call statements, also set location of a load to a temporary.
16487 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
16489         * config/rl78/rl78.c (add_vector_labels): New function.
16490         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
16491         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
16492         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
16493         which checks that no arguments are passed.
16494         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
16495         * doc/extend.texi: Documentation for the new attribute.
16497 2018-02-13  Andreas Schwab  <schwab@suse.de>
16499         * config/riscv/linux.h (CPP_SPEC): Define.
16501 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
16503         PR target/84335
16504         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
16505         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
16506         OPTION_MASK_ISA_AES as first argument to def_builtin_const
16507         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
16508         instead of OPTION_MASK_ISA_PCLMUL as first argument to
16509         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
16510         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
16511         temporarily for AES and PCLMUL builtins.
16513         PR tree-optimization/84339
16514         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
16515         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
16516         Formatting fixes.
16518         PR middle-end/84309
16519         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
16520         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
16521         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
16522         inline function.
16523         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
16524         inline function.
16525         * omp-simd-clone.h: New file.
16526         * omp-simd-clone.c: Include omp-simd-clone.h.
16527         (expand_simd_clones): No longer static.
16528         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
16529         cgraph.h and omp-simd-clone.h.
16530         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
16531         (vect_recog_widen_shift_pattern): Formatting fix.
16532         (vect_pattern_recog_1): Don't check optab for calls.
16534         PR target/84336
16535         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
16536         operands[2] into a REG before using gen_lowpart on it.
16538 2018-02-12  Jeff Law  <law@redhat.com>
16540         PR target/83760
16541         * config/sh/sh.c (find_barrier): Consider a sibling call
16542         a barrier as well.
16544         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
16545         successfully back substituting a reg.
16547 2018-02-12  Richard Biener  <rguenther@suse.de>
16549         PR tree-optimization/84037
16550         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
16551         parameter, move visited init to caller.
16552         (vect_slp_analyze_operations): Separate cost from validity
16553         check, initialize visited once for all instances.
16554         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
16555         for all instances.
16556         * tree-vect-stmts.c (vect_model_simple_cost): Make early
16557         out an assert.
16558         (vect_model_promotion_demotion_cost): Likewise.
16559         (vectorizable_bswap): Guard cost modeling with !slp_node
16560         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
16561         SLP stmts.
16562         (vectorizable_call): Likewise.
16563         (vectorizable_conversion): Likewise.
16564         (vectorizable_assignment): Likewise.
16565         (vectorizable_shift): Likewise.
16566         (vectorizable_operation): Likewise.
16567         (vectorizable_store): Likewise.
16568         (vectorizable_load): Likewise.
16569         (vectorizable_condition): Likewise.
16570         (vectorizable_comparison): Likewise.
16572 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
16574         PR sanitizer/84307
16575         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
16576         (ASAN_MARK): Fix fnspec to account for return value, change pointer
16577         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
16579 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16581         PR middle-end/83665
16582         * params.def (inline-min-speedup): Increase from 8 to 15.
16583         (max-inline-insns-auto): Decrease from 40 to 30.
16584         * ipa-split.c (consider_split): Add some buffer for function to
16585         be considered inlining candidate.
16586         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
16587         default values.
16589 2018-02-12  Richard Biener  <rguenther@suse.de>
16591         PR tree-optimization/84037
16592         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
16593         matched stmts if we cannot swap the non-matched ones.
16595 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16597         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
16598         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
16599         _mm_maskz_scalef_round_ss): New intrinsics.
16600         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
16601         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
16602         __builtin_ia32_scalefss_round): Remove.
16603         (__builtin_ia32_scalefsd_mask_round,
16604         __builtin_ia32_scalefss_mask_round): New intrinsics.
16605         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
16606         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
16607         ((match_operand:VF_128 2 "<round_nimm_predicate>"
16608         "<round_constraint>")): Changed to ...
16609         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
16610         "<round_scalar_constraint>")): ... this.
16611         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
16612         %0, %1, %2<round_op3>}"): Changed to ...
16613         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
16614         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
16615         %2<round_scalar_mask_op3>}"): ... this.
16616         * config/i386/subst.md (round_scalar_nimm_predicate): New.
16618 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
16620         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
16621         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
16622         (_mm_maskz_sqrt_round_ss): New intrinsics.
16623         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
16624         (__builtin_ia32_sqrtsd_mask_round)
16625         (__builtin_ia32_sqrtss_mask_round): New builtins.
16626         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
16627         (__builtin_ia32_sqrtss_round): Remove.
16628         (__builtin_ia32_sqrtsd_mask_round)
16629         (__builtin_ia32_sqrtss_mask_round): New builtins.
16630         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
16631         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
16632         ((match_operand:VF_128 1 "vector_operand"
16633         "xBm,<round_constraint>")): Changed to ...
16634         ((match_operand:VF_128 1 "vector_operand"
16635         "xBm,<round_scalar_constraint>")): ... this.
16636         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
16637         %0, %2, %<iptr>1<round_op3>}): Changed to ...
16638         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
16639         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
16640         %<iptr>1<round_scalar_mask_op3>}): ... this.
16641         ((set_attr "prefix" "<round_prefix>")): Changed to ...
16642         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
16644 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
16646         PR target/84266
16647         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
16648         Cast vec_cmpeq result to correct type.
16649         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
16650         Cast vec_cmpgt result to correct type.
16652 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
16654         * final.c (final_scan_insn_1): Renamed from...
16655         (final_scan_insn): ... this.  New wrapper, to recover
16656         seen from the outermost call in recursive ones.
16657         * config/sparc/sparc.c (output_return): Drop seen from call.
16658         (output_sibcall): Likewise.
16659         * config/visium/visium.c (output_branch): Likewise.
16661 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
16663         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
16664         function label.
16666 2018-02-10  Alan Modra  <amodra@gmail.com>
16668         PR target/84300
16669         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
16670         Specify LR as an input.
16672 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
16674         PR sanitizer/83987
16675         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
16676         remove_member_access_dummy_vars): New functions.
16677         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
16678         lower_omp_1, execute_lower_omp): Use them.
16680         PR rtl-optimization/84308
16681         * shrink-wrap.c (spread_components): Release todo vector.
16683 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
16685         PR rtl-optimization/57193
16686         * ira-color.c (struct allocno_color_data): Add member
16687         conflict_allocno_hard_prefs.
16688         (update_conflict_allocno_hard_prefs): New.
16689         (bucket_allocno_compare_func): Add a preference based on
16690         conflict_allocno_hard_prefs.
16691         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
16692         (color_allocnos): Remove a dead code.  Initiate
16693         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
16695 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16697         PR target/84226
16698         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
16699         constraint from =wa to wa.  Avoid a subreg on the output operand,
16700         instead use a pseudo and subreg it in a move.
16701         (p9_xxbrd_<mode>): Changed to ...
16702         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
16703         (p9_xxbrd_v2df): New expander.
16704         (p9_xxbrw_<mode>): Changed to ...
16705         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
16706         (p9_xxbrw_v4sf): New expander.
16708 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16710         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
16712 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
16714         PR target/83926
16715         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
16716         multiply in 32-bit mode.
16717         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
16718         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
16719         mode.
16721 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
16723         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
16724         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
16725         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
16726         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
16728 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
16730         PR lto/84213
16731         * dwarf2out.c (is_trivial_indirect_ref): New function.
16732         (dwarf2out_late_global_decl): Do not generate a location
16733         attribute for variables that have a non-trivial DECL_VALUE_EXPR
16734         and that are not defined in the current unit.
16736 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16738         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
16739         instead of a libcall for UNORDERED.
16741 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
16743         PR target/82641
16744         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
16745         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
16747 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16749         PR target/PR84295
16750         * config/s390/s390.c (s390_set_current_function): Invoke
16751         s390_indirect_branch_settings also if fndecl didn't change.
16753 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16755         * config/rs6000/rs6000.md (blockage): Set length to zero.
16757 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
16759         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
16761 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
16763         PR sanitizer/84285
16764         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
16765         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
16766         -static-lib*san.
16768         PR debug/84252
16769         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
16770         PARALLEL incoming that failed vt_get_decl_and_offset check.
16772         PR middle-end/84237
16773         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
16774         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
16775         TREE_READONLY bit.
16776         (get_variable_section): For decls in named .bss* sections pass true as
16777         second argument to bss_initializer_p.
16779 2018-02-09  Marek Polacek  <polacek@redhat.com>
16780             Jakub Jelinek  <jakub@redhat.com>
16782         PR c++/83659
16783         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
16784         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
16785         Sync some changes from cxx_fold_indirect_ref.
16787 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
16789         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
16790         markers.
16791         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
16792         (BLOCK_INLINE_ENTRY_LABEL): New.
16793         (dwarf2out_var_location): Disregard inline entry markers.
16794         (inline_entry_data): New struct.
16795         (inline_entry_data_hasher): New hashtable type.
16796         (inline_entry_data_hasher::hash): New.
16797         (inline_entry_data_hasher::equal): New.
16798         (inline_entry_data_table): New variable.
16799         (add_high_low_attributes): Add DW_AT_entry_pc and
16800         DW_AT_GNU_entry_view attributes if a pending entry is found
16801         in inline_entry_data_table.  Add old entry_pc attribute only
16802         if debug nonbinding markers are disabled.
16803         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
16804         markers are enabled.
16805         (block_within_block_p, dwarf2out_inline_entry): New.
16806         (dwarf2out_finish): Check that no entries remained in
16807         inline_entry_data_table.
16808         * final.c (reemit_insn_block_notes): Handle inline entry notes.
16809         (final_scan_insn, notice_source_line): Likewise.
16810         (rest_of_clean_state): Skip inline entry markers.
16811         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
16812         markers.
16813         * gimple.c (gimple_build_debug_inline_entry): New.
16814         * gimple.h (enum gimple_debug_subcode): Add
16815         GIMPLE_DEBUG_INLINE_ENTRY.
16816         (gimple_build_debug_inline_entry): Declare.
16817         (gimple_debug_inline_entry_p): New.
16818         (gimple_debug_nonbind_marker_p): Adjust.
16819         * insn-notes.def (INLINE_ENTRY): New.
16820         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
16821         inline entry marker notes.
16822         (print_insn): Likewise.
16823         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
16824         (INSN_DEBUG_MARKER_KIND): Likewise.
16825         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
16826         * tree-inline.c (expand_call_inline): Build and insert
16827         debug_inline_entry stmt.
16828         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
16829         inline entry blocks early, if nonbind markers are enabled.
16830         (dump_scope_block): Dump fragment info.
16831         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
16832         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
16833         (gimple_build_debug_inline_entry): New.
16834         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
16835         Enable/disable inline entry points too.
16836         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
16837         (DEBUG_INSN): Describe inline entry markers.
16839         * common.opt (gvariable-location-views): New.
16840         (gvariable-location-views=incompat5): New.
16841         * config.in: Rebuilt.
16842         * configure: Rebuilt.
16843         * configure.ac: Test assembler for view support.
16844         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
16845         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
16846         * dwarf2out.c (var_loc_view): New typedef.
16847         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
16848         (dwarf2out_locviews_in_attribute): New.
16849         (dwarf2out_locviews_in_loclist): New.
16850         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
16851         (enum dw_line_info_opcode): Add LI_adv_address.
16852         (struct dw_line_info_table): Add view.
16853         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
16854         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
16855         (zero_view_p): New variable.
16856         (ZERO_VIEW_P): New macro.
16857         (output_asm_line_debug_info): New.
16858         (struct var_loc_node): Add view.
16859         (add_AT_view_list, AT_loc_list): New.
16860         (add_var_loc_to_decl): Add view param.  Test it against last.
16861         (new_loc_list): Add view params.  Record them.
16862         (AT_loc_list_ptr): Handle loc and view lists.
16863         (view_list_to_loc_list_val_node): New.
16864         (print_dw_val): Handle dw_val_class_view_list.
16865         (size_of_die): Likewise.
16866         (value_format): Likewise.
16867         (loc_list_has_views): New.
16868         (gen_llsym): Set vl_symbol too.
16869         (maybe_gen_llsym, skip_loc_list_entry): New.
16870         (dwarf2out_maybe_output_loclist_view_pair): New.
16871         (output_loc_list): Output view list or entries too.
16872         (output_view_list_offset): New.
16873         (output_die): Handle dw_val_class_view_list.
16874         (output_dwarf_version): New.
16875         (output_compilation_unit_header): Use it.
16876         (output_skeleton_debug_sections): Likewise.
16877         (output_rnglists, output_line_info): Likewise.
16878         (output_pubnames, output_aranges): Update version comments.
16879         (output_one_line_info_table): Output view numbers in asm comments.
16880         (dw_loc_list): Determine current endview, pass it to new_loc_list.
16881         Call maybe_gen_llsym.
16882         (loc_list_from_tree_1): Adjust.
16883         (add_AT_location_description): Create view list attribute if
16884         needed, check it's absent otherwise.
16885         (convert_cfa_to_fb_loc_list): Adjust.
16886         (maybe_emit_file): Call output_asm_line_debug_info for test.
16887         (dwarf2out_var_location): Reset views as needed.  Precompute
16888         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
16889         attribute.  Set view.
16890         (new_line_info_table): Reset next view.
16891         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
16892         (dwarf2out_source_line): Likewise.  Output view resets and labels to
16893         the assembler, or select appropriate line info opcodes.
16894         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
16895         (optimize_string_length): Catch it.  Adjust.
16896         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
16897         dw_val_class_view_list, and remove it if no longer needed.
16898         (hash_loc_list): Hash view numbers.
16899         (loc_list_hasher::equal): Compare them.
16900         (optimize_location_lists): Check whether a view list symbol is
16901         needed, and whether the locview attribute is present, and
16902         whether they match.  Remove the locview attribute if no longer
16903         needed.
16904         (index_location_lists): Call skip_loc_list_entry for test.
16905         (dwarf2out_finish): Call output_asm_line_debug_info for test.
16906         Use output_dwarf_version.
16907         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
16908         (struct dw_val_node): Add val_view_list.
16909         * final.c (SEEN_NEXT_VIEW): New.
16910         (set_next_view_needed): New.
16911         (clear_next_view_needed): New.
16912         (maybe_output_next_view): New.
16913         (final_start_function): Rename to...
16914         (final_start_function_1): ... this.  Take pointer to FIRST,
16915         add SEEN parameter.  Emit param bindings in the initial view.
16916         (final_start_function): Reintroduce SEEN-less interface.
16917         (final): Rename to...
16918         (final_1): ... this.  Take SEEN parameter.  Output final pending
16919         next view at the end.
16920         (final): Reintroduce seen-less interface.
16921         (final_scan_insn): Output pending next view before switching
16922         sections or ending a block.  Mark the next view as needed when
16923         outputting variable locations.  Notify debug backend of section
16924         changes, and of location view changes.
16925         (rest_of_handle_final): Adjust.
16926         * toplev.c (process_options): Autodetect value for debug variable
16927         location views option.  Warn on incompat5 without -gdwarf-5.
16928         * doc/invoke.texi (gvariable-location-views): New.
16929         (gvariable-location-views=incompat5): New.
16930         (gno-variable-location-views): New.
16932 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
16934         PR tree-optimization/84136
16935         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
16936         that the result of find_edge is non-NULL.
16938 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16940         PR target/83008
16941         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
16942         storing integer register in SImode.  Fix cost of 256 and 512
16943         byte aligned SSE register store.
16945 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
16947         * config/i386/i386.c (ix86_multiplication_cost): Fix
16948         multiplication cost for TARGET_AVX512DQ.
16950 2018-02-08  Marek Polacek  <polacek@redhat.com>
16952         PR tree-optimization/84238
16953         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
16954         get_range_strlen.
16956 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16958         PR tree-optimization/84265
16959         * tree-vect-stmts.c (vectorizable_store): Don't treat
16960         VMAT_CONTIGUOUS accesses as grouped.
16961         (vectorizable_load): Likewise.
16963 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
16965         PR tree-optimization/81635
16966         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
16967         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
16968         (test_round_for_mask): New functions.
16969         (wide_int_cc_tests): Call test_round_for_mask.
16970         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
16971         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
16972         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
16973         range returned by get_range_info.
16975 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
16977         PR ipa/81360
16978         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
16979         * symtab.c: Include builtins.h
16980         (symtab_node::output_to_lto_symbol_table_p): Move here
16981         from lto-streamer-out.c:output_symbol_p.
16982         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
16983         (output_symbol_p): Move all logic to symtab.c
16984         (produce_symtab): Update.
16986 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16988         * config/s390/s390-opts.h (enum indirect_branch): Define.
16989         * config/s390/s390-protos.h (s390_return_addr_from_memory)
16990         (s390_indirect_branch_via_thunk)
16991         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
16992         (enum s390_indirect_branch_type): Define.
16993         * config/s390/s390.c (struct s390_frame_layout, struct
16994         machine_function): Remove.
16995         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
16996         (indirect_branch_table_label_no, indirect_branch_table_name):
16997         Define variables.
16998         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
16999         (enum s390_indirect_branch_option): Define.
17000         (s390_return_addr_from_memory): New function.
17001         (s390_handle_string_attribute): New function.
17002         (s390_attribute_table): Add new attribute handler.
17003         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
17004         (s390_indirect_branch_via_thunk): New function.
17005         (s390_indirect_branch_via_inline_thunk): New function.
17006         (s390_function_ok_for_sibcall): When jumping via thunk disallow
17007         sibling call optimization for non z10 compiles.
17008         (s390_emit_call): Force indirect branch target to be a single
17009         register.  Add r1 clobber for non-z10 compiles.
17010         (s390_emit_epilogue): Emit return jump via return_use expander.
17011         (s390_reorg): Handle JUMP_INSNs as execute targets.
17012         (s390_option_override_internal): Perform validity checks for the
17013         new command line options.
17014         (s390_indirect_branch_attrvalue): New function.
17015         (s390_indirect_branch_settings): New function.
17016         (s390_set_current_function): Invoke s390_indirect_branch_settings.
17017         (s390_output_indirect_thunk_function):  New function.
17018         (s390_code_end): Implement target hook.
17019         (s390_case_values_threshold): Implement target hook.
17020         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
17021         macros.
17022         * config/s390/s390.h (struct s390_frame_layout)
17023         (struct machine_function): Move here from s390.c.
17024         (TARGET_INDIRECT_BRANCH_NOBP_RET)
17025         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
17026         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
17027         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
17028         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
17029         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
17030         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
17031         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
17032         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
17033         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
17034         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
17035         (mnemonic attribute): Add values which aren't recognized
17036         automatically.
17037         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
17038         pattern for branch conversion.  Fix mnemonic attribute.
17039         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
17040         indirect branch via thunk if requested.
17041         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
17042         ("*indirect_jump"): Disable for branch conversion using out of
17043         line thunks.
17044         ("indirect_jump_via_thunk<mode>_z10")
17045         ("indirect_jump_via_thunk<mode>")
17046         ("indirect_jump_via_inlinethunk<mode>_z10")
17047         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
17048         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
17049         ("casesi_jump_via_inlinethunk<mode>_z10")
17050         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
17051         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
17052         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
17053         ("*indirect2_jump"): Disable for branch conversion.
17054         ("casesi_jump"): Turn into expander and expand patterns for branch
17055         conversion.
17056         ("return_use"): New expander.
17057         ("*return"): Emit return via thunk and rename it to ...
17058         ("*return<mode>"): ... this one.
17059         * config/s390/s390.opt: Add new options and and enum for the
17060         option values.
17062 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
17064         * lra-constraints.c (match_reload): Unconditionally use
17065         gen_lowpart_SUBREG, rather than selecting between that
17066         and equivalent gen_rtx_SUBREG code.
17068 2018-02-08  Richard Biener  <rguenther@suse.de>
17070         PR tree-optimization/84233
17071         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
17072         changed flag instead of boguously re-using phi_inserted.
17074 2018-02-08  Martin Jambor  <mjambor@suse.cz>
17076         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
17077         static local variables.
17079 2018-02-08  Richard Biener  <rguenther@suse.de>
17081         PR tree-optimization/84278
17082         * tree-vect-stmts.c (vectorizable_store): When looking for
17083         smaller vector types to perform grouped strided loads/stores
17084         make sure the mode is supported by the target.
17085         (vectorizable_load): Likewise.
17087 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17089         * config/aarch64/aarch64.c (aarch64_components_for_bb):
17090         Increase LDP/STP opportunities by adding adjacent callee-saves.
17092 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
17094         PR rtl-optimization/84068
17095         PR rtl-optimization/83459
17096         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
17098 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
17100         PR tree-optimization/84224
17101         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
17102         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
17103         non-zero arguments.
17105 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
17107         PR target/84113
17108         * config/rs6000/altivec.md (*restore_world): Remove LR use.
17109         * config/rs6000/predicates.md (restore_world_operation): Adjust op
17110         count, remove one USE.
17112 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
17114         * doc/install.texi (Configuration): Document the
17115         --with-long-double-format={ibm,ieee} PowerPC configuration
17116         options.
17118         PR target/84154
17119         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
17120         Convert from define_expand to be define_insn_and_split.  Rework
17121         float/double/_Float128 conversions to QI/HI/SImode to work with
17122         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
17123         conversions to QI/HImode types did a store and then a load to
17124         truncate the value.  For conversions to VSX registers, don't split
17125         the insn, instead emit the code directly.  Use the code iterator
17126         any_fix to combine signed and unsigned conversions.
17127         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
17128         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
17129         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17130         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
17131         (fix_<mode>di2_hw): Likewise.
17132         (fixuns_<mode>di2_hw): Likewise.
17133         (fix_<mode>si2_hw): Likewise.
17134         (fixuns_<mode>si2_hw): Likewise.
17135         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
17136         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
17137         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
17138         fix<uns>_trunc<SFDF:mode>si2_p8.
17139         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
17140         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
17141         (fix<uns>_<mode>_mem): Likewise.
17142         (fctiw<u>z_<mode>_mem): Likewise.
17143         (fix<uns>_<mode>_mem): Likewise.
17144         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
17145         the register allocator from doing a direct move to the GPRs to do
17146         a store, and instead use the ISA 3.0 store byte/half-word from
17147         vector register instruction.  For IEEE 128-bit floating point,
17148         also optimize stores of 32-bit ints.
17149         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
17151 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
17153         * genextract.c (push_pathstr_operand): New function to support
17154         [a-zA-Z].
17155         (walk_rtx): Call push_pathstr_operand.
17156         (print_path): Support [a-zA-Z].
17158 2018-02-07  Richard Biener  <rguenther@suse.de>
17160         PR tree-optimization/84037
17161         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
17162         (cse_and_gimplify_to_preheader): Declare.
17163         (vect_get_place_in_interleaving_chain): Likewise.
17164         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
17165         ivexpr_map.
17166         (_loop_vec_info::~_loop_vec_info): Delete it.
17167         (cse_and_gimplify_to_preheader): New function.
17168         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
17169         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
17170         (vectorizable_load): Likewise.  For grouped stores always base
17171         the IV on the first element.
17172         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
17173         condition before gimplifying.
17175 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17177         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
17178         *DIV_EXPR and *MOD_EXPR.
17180 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
17182         PR target/84248
17183         * config/i386/i386.c (ix86_option_override_internal): Mask out
17184         the CF_SET bit when checking -fcf-protection.
17186 2018-02-07  Tom de Vries  <tom@codesourcery.com>
17188         PR libgomp/84217
17189         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
17190         enough.
17192 2018-02-07  Richard Biener  <rguenther@suse.de>
17194         PR tree-optimization/84204
17195         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
17196         this place.
17198         PR tree-optimization/84205
17199         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
17200         special-case isl_ast_op_zdiv_r.
17202         PR tree-optimization/84223
17203         * graphite-scop-detection.c (gather_bbs::before_dom_children):
17204         Only add conditions from within the region.
17205         (gather_bbs::after_dom_children): Adjust.
17207 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
17209         PR target/84209
17210         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
17211         * config/avr/avr.md: Only post-reload split REG-REG moves if
17212         either register is GENERAL_REG_P.
17214 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
17216         PR tree-optimization/84235
17217         * tree-ssa-scopedtables.c
17218         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
17219         if the subtraction is performed in floating point type where NaNs are
17220         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
17221         build 1.  Formatting fix.
17223 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
17225         PR target/84146
17226         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
17227         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
17228         and skip it regardless of bb boundaries.  Use CALL_P macro,
17229         don't test INSN_P (insn) together with CALL_P or JUMP_P check
17230         unnecessarily, formatting fix.
17232 2018-02-06  Michael Collison  <michael.collison@arm.com>
17234         * config/arm/thumb2.md:
17235         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
17236         (*thumb_mov_notscc): Ditto.
17238 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
17240         PR target/84154
17241         * config/rs6000/rs6000.md (su code attribute): Use "u" for
17242         unsigned_fix, not "s".
17244 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17246         * configure.ac (gcc_fn_eh_frame_ro): New function.
17247         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
17248         correct .eh_frame permissions.
17249         * configure: Regenerate.
17251 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
17253         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
17254         irrelevant options.
17256 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17258         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17259         Display warning message for -mno-speculate-indirect-jumps.
17261 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
17263         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
17264         Undocumented.
17265         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
17267 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
17269         PR tree-optimization/84225
17270         * tree-eh.c (find_trapping_overflow): Only call
17271         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
17273 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17275         PR target/84145
17276         * config/i386/i386.c: Reimplement the check of possible options
17277         -mibt/-mshstk conbination. Change error messages.
17278         * doc/invoke.texi: Fix a typo: remove extra '='.
17280 2018-02-06  Marek Polacek  <polacek@redhat.com>
17282         PR tree-optimization/84228
17283         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
17285 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
17287         PR target/82641
17288         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
17289         emitted arch directives.
17290         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
17291         __ARM_FEATURE_COPROC before changing architectures.
17293 2018-02-06  Richard Biener  <rguenther@suse.de>
17295         * config/i386/i386.c (print_reg): Fix typo.
17296         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
17298 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
17300         * configure: Regenerate.
17302 2018-02-05  Martin Sebor  <msebor@redhat.com>
17304         PR tree-optimization/83369
17305         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
17306         inlining context.
17308 2018-02-05  Martin Liska  <mliska@suse.cz>
17310         * doc/invoke.texi: Cherry-pick upstream r323995.
17312 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
17314         * ira.c (ira_init_register_move_cost): Adjust comment.
17316 2018-02-05  Martin Liska  <mliska@suse.cz>
17318         PR gcov-profile/84137
17319         * doc/gcov.texi: Fix typo in documentation.
17321 2018-02-05  Martin Liska  <mliska@suse.cz>
17323         PR gcov-profile/83879
17324         * doc/gcov.texi: Document necessity of --dynamic-list-data when
17325         using dlopen functionality.
17327 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
17329         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
17330         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
17331         _mm_maskz_range_ss, _mm_mask_range_round_ss,
17332         _mm_maskz_range_round_ss): New intrinsics.
17333         (__builtin_ia32_rangesd128_round)
17334         (__builtin_ia32_rangess128_round): Remove.
17335         (__builtin_ia32_rangesd128_mask_round,
17336         __builtin_ia32_rangess128_mask_round): New builtins.
17337         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
17338         __builtin_ia32_rangess128_round): Remove.
17339         (__builtin_ia32_rangesd128_mask_round,
17340         __builtin_ia32_rangess128_mask_round): New builtins.
17341         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
17342         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
17343         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
17344         "<round_saeonly_constraint>")): Changed to ...
17345         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
17346         "<round_saeonly_scalar_constraint>")): ... this.
17347         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
17348         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
17349         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
17350         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
17351         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
17353 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
17355         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
17356         options.
17357         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
17358         Remove all values except native, 8540 and 8548.
17360 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
17362         * config/i386/i386.c (ix86_output_function_return): Pass
17363         INVALID_REGNUM, instead of -1, as invalid register number to
17364         indirect_thunk_name and output_indirect_thunk.
17366 2018-02-02  Julia Koval  <julia.koval@intel.com>
17368         * config.gcc: Add -march=icelake.
17369         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
17370         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
17371         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
17372         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
17373         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
17374         (processor_target_table): Add icelake.
17375         (ix86_option_override_internal): Handle new PTAs.
17376         (get_builtin_code_for_version): Handle icelake.
17377         (M_INTEL_COREI7_ICELAKE): New.
17378         (fold_builtin_cpu): Handle icelake.
17379         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
17380         * doc/invoke.texi: Add -march=icelake.
17382 2018-02-02  Julia Koval  <julia.koval@intel.com>
17384         * config/i386/i386.c (ix86_option_override_internal): Change flags type
17385         to wide_int_bitmask.
17386         * wide-int-bitmask.h: New.
17388 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
17390         PR target/84066
17391         * config/i386/i386.md: Replace Pmode with word_mode in
17392         builtin_setjmp_setup and builtin_longjmp to support x32.
17394 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
17396         PR target/56010
17397         PR target/83743
17398         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
17399         #include "opts.h".
17400         (rs6000_supported_cpu_names): New static variable.
17401         (linux_cpu_translation_table): Likewise.
17402         (elf_platform) <cpu>: Define new static variable and use it.
17403         Translate kernel AT_PLATFORM name to canonical name if needed.
17404         Error if platform name is unknown.
17406 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
17408         PR target/84089
17409         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
17411 2018-02-01  Jeff Law  <law@redhat.com>
17413         PR target/84128
17414         * config/i386/i386.c (release_scratch_register_on_entry): Add new
17415         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
17416         the scratch if RELEASE_VIA_POP is false.
17417         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
17418         If we have to save a temporary register, decrement SIZE appropriately.
17419         Pass new arguments to release_scratch_register_on_entry.
17420         (ix86_adjust_stack_and_probe): Likewise.
17421         (ix86_emit_probe_stack_range): Pass new arguments to
17422         release_scratch_register_on_entry.
17424 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
17426         PR rtl-optimization/84157
17427         * combine.c (change_zero_ext): Use REG_P predicate in
17428         front of HARD_REGISTER_P predicate.
17430 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
17432         * config/avr/avr.c (avr_option_override): Move disabling of
17433         -fdelete-null-pointer-checks to...
17434         * common/config/avr/avr-common.c (avr_option_optimization_table):
17435         ...here.
17437 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17439         PR tree-optimization/81635
17440         * tree-data-ref.c (split_constant_offset_1): For types that
17441         wrap on overflow, try to use range info to prove that wrapping
17442         cannot occur.
17444 2018-02-01  Renlin Li  <renlin.li@arm.com>
17446         PR target/83370
17447         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
17448         TAILCALL_ADDR_REGS.
17449         (aarch64_register_move_cost): Likewise.
17450         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
17451         TAILCALL_ADDR_REGS.
17452         (REG_CLASS_NAMES): Likewise.
17453         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
17454         TAILCALL_ADDR_REGS. Remove IP registers.
17455         * config/aarch64/aarch64.md (Ucs): Update register constraint.
17457 2018-02-01  Richard Biener  <rguenther@suse.de>
17459         * domwalk.h (dom_walker::dom_walker): Add additional constructor
17460         for specifying RPO order and allow NULL for that.
17461         * domwalk.c (dom_walker::dom_walker): Likewise.
17462         (dom_walker::walk): Handle NULL RPO order.
17463         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
17464         in RPO order.
17465         (rewrite_update_dom_walker): Likewise.
17466         (mark_def_dom_walker): Likewise.
17468 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17470         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
17471         (aarch64_maybe_expand_sve_subreg_move): Declare.
17472         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
17473         * config/aarch64/predicates.md (aarch64_any_register_operand): New
17474         predicate.
17475         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
17476         that are semantically a reverse operation.
17477         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
17478         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
17479         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
17480         functions.
17481         (aarch64_can_change_mode_class): For big-endian, forbid changes
17482         between two SVE modes if they have different element sizes.
17484 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17486         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
17487         the TImode handling for big-endian targets.
17489 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17491         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
17492         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
17493         not just bytes.
17494         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
17495         Remove BSWAP handing for big-endian targets and use the form of
17496         LD1RQ appropariate for the mode.
17498 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17500         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
17501         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
17502         duplicated element.
17504 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
17506         PR tearget/83845
17507         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
17508         check for operands that need to go through aarch64_sve_reload_be.
17510 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
17512         PR tree-optimization/81661
17513         PR tree-optimization/84117
17514         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
17515         * tree-eh.c: Include gimplify.h.
17516         (find_trapping_overflow, replace_trapping_overflow,
17517         rewrite_to_non_trapping_overflow): New functions.
17518         * tree-vect-loop.c: Include tree-eh.h.
17519         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
17520         * tree-data-ref.c: Include tree-eh.h.
17521         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
17523 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
17525         PR rtl-optimization/84123
17526         * combine.c (change_zero_ext): Check if hard register satisfies
17527         can_change_dest_mode before calling gen_lowpart_SUBREG.
17529 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
17531         PR target/82444
17532         * ira.c (ira_init_register_move_cost): Remove assert.
17534 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17536         PR rtl-optimization/84071
17537         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
17538         * doc/tm.texi: Regenerate.
17540 2018-01-31  Richard Biener  <rguenther@suse.de>
17542         PR tree-optimization/84132
17543         * tree-data-ref.c (analyze_miv_subscript): Properly
17544         check whether evolution_function_is_affine_multivariate_p
17545         before calling gcd_of_steps_may_divide_p.
17547 2018-01-31  Julia Koval  <julia.koval@intel.com>
17549         PR target/83618
17550         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
17551         * config/i386/i386.md (rdpid_rex64) New.
17552         (rdpid): Make 32bit only.
17554 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
17556         PR lto/84105
17557         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
17558         an IDENTIFIER_NODE for FUNCTION_TYPE's.
17560 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17562         Revert
17563         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
17565         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
17567 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
17569         PR rtl-optimization/84071
17570         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
17571         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
17573 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17575         * config/arc/arc.c (arc_handle_aux_attribute): New function.
17576         (arc_attribute_table): Add 'aux' attribute.
17577         (arc_in_small_data_p): Consider aux like variables.
17578         (arc_is_aux_reg_p): New function.
17579         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
17580         (arc_get_aux_arg): New function.
17581         (prepare_move_operands): Handle aux-register access.
17582         (arc_handle_aux_attribute): New function.
17583         * doc/extend.texi (ARC Variable attributes): Add subsection.
17585 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
17587         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
17588         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
17589         (arc_attribute_table): Add 'uncached' attribute.
17590         (arc_print_operand): Print '.di' flag for uncached memory
17591         accesses.
17592         (arc_in_small_data_p): Do not consider for small data the uncached
17593         types.
17594         (arc_is_uncached_mem_p): New function.
17595         * config/arc/predicates.md (compact_store_memory_operand): Check
17596         for uncached memory accesses.
17597         (nonvol_nonimm_operand): Likewise.
17598         * doc/extend.texi (ARC Type Attribute): New subsection.
17600 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
17602         PR c/84100
17603         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
17604         falign-loops=): Add Optimization flag.
17606 2018-01-30  Jeff Law  <law@redhat.com>
17608         PR target/84064
17609         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
17610         INT_REGISTERS_SAVED.  Check it prior to calling
17611         get_scratch_register_on_entry.
17612         (ix86_adjust_stack_and_probe): Similarly.
17613         (ix86_emit_probe_stack_range): Similarly.
17614         (ix86_expand_prologue): Corresponding changes.
17616 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17618         PR target/40411
17619         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
17620         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
17622 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
17624         PR target/84112
17625         * lra-constraints.c (curr_insn_transform): Process AND in the
17626         address.
17628 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
17630         PR rtl-optimization/83986
17631         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
17632         dependence against last_pending_memory_flush in addition to
17633         pending_jump_insns.
17635 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
17637         PR tree-optimization/81611
17638         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
17639         copies.
17641 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17643         PR target/83758
17644         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
17645         a reg rtx.
17647 2018-01-30  Richard Biener  <rguenther@suse.de>
17648             Jakub Jelinek  <jakub@redhat.com>
17650         PR tree-optimization/84111
17651         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
17652         inner loops added during recursion, as they don't have up-to-date
17653         SSA form.
17655 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17657         PR ipa/81360
17658         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
17659         (can_inline_edge_by_limits_p): ... here.
17660         (can_early_inline_edge_p, check_callers,
17661         update_caller_keys, update_callee_keys, recursive_inlining,
17662         add_new_edges_to_heap, speculation_useful_p,
17663         inline_small_functions,
17664         inline_small_functions, flatten_function,
17665         inline_to_all_callers_1): Update.
17667 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
17669         * profile-count.c (profile_count::combine_with_ipa_count): Handle
17670         zeros correctly.
17672 2018-01-30  Richard Biener  <rguenther@suse.de>
17674         PR tree-optimization/83008
17675         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
17676         invariant and constant vector uses in stmts when they need
17677         more than one stmt.
17679 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17681         PR bootstrap/84017
17682         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
17683         * configure: Regenerate.
17685 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17687         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
17688         pattern.
17689         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
17690         Use gen_rtx_REG rather than gen_lowpart.
17692 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17694         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
17695         rather than 0 when creating partial subregs.
17697 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
17699         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
17700         of usage.
17702 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
17704         PR target/81550
17705         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
17706         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
17707         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
17708         flags.  This restores the settings used before the 2017-07-24.
17709         Turning off pre increment/decrement/modify allows IVOPTS to
17710         optimize DF/SF loops where the index is an int.
17712 2018-01-29  Richard Biener  <rguenther@suse.de>
17713             Kelvin Nilsen  <kelvin@gcc.gnu.org>
17715         PR bootstrap/80867
17716         * tree-vect-stmts.c (vectorizable_call): Don't call
17717         targetm.vectorize_builtin_md_vectorized_function if callee is
17718         NULL.
17720 2018-01-22  Carl Love  <cel@us.ibm.com>
17722         * doc/extend.tex: Fix typo in second arg in
17723         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
17725 2018-01-29  Richard Biener  <rguenther@suse.de>
17727         PR tree-optimization/84086
17728         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
17729         (flush_ssaname_freelist): When SSA names were released reset
17730         the SCEV hash table.
17732 2018-01-29  Richard Biener  <rguenther@suse.de>
17734         PR tree-optimization/84057
17735         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
17736         removed paths when removing edges.
17738 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
17740         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
17741         -mfunction-return=@var{choice}.
17743 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17745         PR diagnostic/84034
17746         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
17747         Handle CR like TAB.
17748         (layout::print_source_line): Likewise.
17749         (test_get_line_width_without_trailing_whitespace): Add test cases.
17751 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
17753         PR middle-end/84040
17754         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
17755         debug insns.
17757 2018-01-26  Jim Wilson  <jimw@sifive.com>
17759         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
17761         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
17762         specified.
17764 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17766         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
17767         and CMP + SUB-immediate -> SUBS.
17769 2018-01-26  Martin Sebor  <msebor@redhat.com>
17771         PR tree-optimization/83896
17772         * tree-ssa-strlen.c (get_string_len): Rename...
17773         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
17774         Avoid assuming length is constant.
17775         (handle_char_store): Use HOST_WIDE_INT for string length.
17777 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
17779         PR target/81763
17780         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
17781         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
17783 2018-01-26  Richard Biener  <rguenther@suse.de>
17785         PR rtl-optimization/84003
17786         * dse.c (record_store): Only record redundant stores when
17787         the earlier store aliases at least all accesses the later one does.
17789 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
17791         PR rtl-optimization/83985
17792         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
17793         REG_CFA_RESTORE insns.
17794         (delete_unmarked_insns): Don't ignore separate shrink wrapping
17795         REG_CFA_RESTORE insns here.
17797         PR c/83989
17798         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
17799         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
17801 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17803         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
17804         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
17805         (arc_init): Likewise.
17806         (arc_override_options): Likewise.
17807         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
17808         value.
17809         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
17810         support.
17811         * config/arc/arc.h (TARGET_DBNZ): Define.
17812         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
17813         properly set the tune attribute.
17814         (dbnz): Use TARGET_DBNZ guard.
17815         * config/arc/arc.opt (mtune): Add core3 option.
17817 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17819         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
17820         recognize new pic like addresses.
17821         (arc_delegitimize_address): Clean up.
17823 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17825         * config/arc/arc-arches.def: Option mrf16 valid for all
17826         architectures.
17827         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
17828         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
17829         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
17830         * config/arc/arc-tables.opt: Regenerate.
17831         * config/arc/arc.c (arc_conditional_register_usage): Handle
17832         reduced register file case.
17833         (arc_file_start): Set must have build attributes.
17834         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
17835         mrf16 option value.
17836         * config/arc/arc.opt (mrf16): Add new option.
17837         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
17838         * config/arc/genmultilib.awk: Handle new mrf16 option.
17839         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
17840         * config/arc/t-multilib: Regenerate.
17841         * doc/invoke.texi (ARC Options): Document mrf16 option.
17843 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17845         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
17846         * config/arc/arc.c (arc_handle_secure_attribute): New function.
17847         (arc_attribute_table): Add 'secure_call' attribute.
17848         (arc_print_operand): Print secure call operand.
17849         (arc_function_ok_for_sibcall): Don't optimize tail calls when
17850         secure.
17851         (arc_is_secure_call_p): New function.  * config/arc/arc.md
17852         (call_i): Add support for sjli instruction.
17853         (call_value_i): Likewise.
17854         * config/arc/constraints.md (Csc): New constraint.
17856 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
17857             John Eric Martin  <John.Martin@emmicro-us.com>
17859         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
17860         * config/arc/arc.c (_arc_jli_section): New struct.
17861         (arc_jli_section): New type.
17862         (rc_jli_sections): New static variable.
17863         (arc_handle_jli_attribute): New function.
17864         (arc_attribute_table): Add jli_always and jli_fixed attribute.
17865         (arc_file_end): New function.
17866         (TARGET_ASM_FILE_END): Define.
17867         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
17868         (arc_add_jli_section): New function.
17869         (jli_call_scan): Likewise.
17870         (arc_reorg): Call jli_call_scan.
17871         (arc_output_addsi): Remove 'S' from printing asm operand.
17872         (arc_is_jli_call_p): New function.
17873         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
17874         operand.
17875         (movhi_insn): Likewise.
17876         (movsi_insn): Likewise.
17877         (movsi_set_cc_insn): Likewise.
17878         (loadqi_update): Likewise.
17879         (load_zeroextendqisi_update): Likewise.
17880         (load_signextendqisi_update): Likewise.
17881         (loadhi_update): Likewise.
17882         (load_zeroextendhisi_update): Likewise.
17883         (load_signextendhisi_update): Likewise.
17884         (loadsi_update): Likewise.
17885         (loadsf_update): Likewise.
17886         (movsicc_insn): Likewise.
17887         (bset_insn): Likewise.
17888         (bxor_insn): Likewise.
17889         (bclr_insn): Likewise.
17890         (bmsk_insn): Likewise.
17891         (bicsi3_insn): Likewise.
17892         (cmpsi_cc_c_insn): Likewise.
17893         (movsi_ne): Likewise.
17894         (movsi_cond_exec): Likewise.
17895         (clrsbsi2): Likewise.
17896         (norm_f): Likewise.
17897         (normw): Likewise.
17898         (swap): Likewise.
17899         (divaw): Likewise.
17900         (flag): Likewise.
17901         (sr): Likewise.
17902         (kflag): Likewise.
17903         (ffs): Likewise.
17904         (ffs_f): Likewise.
17905         (fls): Likewise.
17906         (call_i): Remove 'S' asm letter, add jli instruction.
17907         (call_value_i): Likewise.
17908         * config/arc/arc.op (mjli-always): New option.
17909         * config/arc/constraints.md (Cji): New constraint.
17910         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
17911         operand.
17912         (subsf3_fpx): Likewise.
17913         (mulsf3_fpx): Likewise.
17914         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
17915         asm operand.
17916         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
17917         function attrbutes.
17918         * doc/invoke.texi (ARC): Document mjli-always option.
17920 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
17922         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
17923         avoid addition with 0 and use incw and decw where possible.
17925 2018-01-26  Richard Biener  <rguenther@suse.de>
17927         PR tree-optimization/81082
17928         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
17929         association if it requires casting to unsigned.
17930         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
17931         from fold_plusminus_mult_expr to catch important cases late when
17932         range info is available.
17934 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17936         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
17937         * configure.ac (hidden_linkonce): New test.
17938         * configure: Regenerate.
17939         * config.in: Regenerate.
17941 2018-01-26  Julia Koval  <julia.koval@intel.com>
17943         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
17944         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
17945         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
17946         _mm_mask_bitshuffle_epi64_mask): Fix type.
17947         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
17948         USI_FTYPE_V4DI_V4DI_USI): Remove.
17949         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
17950         __builtin_ia32_vpshufbitqmb256_mask,
17951         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
17952         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
17953         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
17955 2018-01-26  Alan Modra  <amodra@gmail.com>
17957         PR target/84033
17958         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
17959         UNSPEC_VBPERMQ.  Sort other unspecs.
17961 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
17963         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
17965 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
17967         PR middle-end/83055
17968         * predict.c (drop_profile): Do not push/pop cfun; update also
17969         node->count.
17970         (handle_missing_profiles): Fix logic looking for zero profiles.
17972 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
17974         PR middle-end/83977
17975         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
17976         on functions with #pragma omp declare simd or functions with simd
17977         attribute.
17978         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
17979         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
17980         Remove trailing \n from warning_at calls.
17982 2018-01-25  Tom de Vries  <tom@codesourcery.com>
17984         PR target/84028
17985         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
17986         for neutered workers.
17988 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
17990         PR target/68467
17991         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
17992         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
17994 2018-01-24  Jeff Law  <law@redhat.com>
17996         PR target/83994
17997         * i386.c (get_probe_interval): Move to earlier point.
17998         (ix86_compute_frame_layout): If -fstack-clash-protection and
17999         the frame is larger than the probe interval, then use pushes
18000         to save registers rather than reg->mem moves.
18001         (ix86_expand_prologue): Remove conditional for int_registers_saved
18002         assertion.
18004 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
18006         PR target/84014
18007         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
18008         min/max for never referenced object.
18010 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
18012         PR middle-end/83977
18013         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
18014         here.
18015         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
18016         attributes from DECL_ATTRIBUTES (decl) without affecting
18017         DECL_ATTRIBUTES (current_function_decl).
18018         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
18019         functions with non-NULL DECL_ABSTRACT_ORIGIN.
18021 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
18023         PR tree-optimization/83979
18024         * fold-const.c (fold_comparison): Use constant_boolean_node
18025         instead of boolean_{true,false}_node.
18027 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
18029         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
18030         with zero counts.
18032 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18034         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18035         Simplify the clause that sets the length attribute.
18036         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18037         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
18038         clause that sets the length attribute.
18039         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18041 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18043         PR target/83589
18044         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
18045         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
18046         Add strict parameter.
18047         (prevent_branch_around_nothing): Insert dummy insn between branch to
18048         label and label with no ptx insn inbetween.
18049         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
18051 2018-01-24  Tom de Vries  <tom@codesourcery.com>
18053         PR target/81352
18054         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
18055         for neutered threads in warp.
18056         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
18058 2018-01-24  Richard Biener  <rguenther@suse.de>
18060         PR tree-optimization/83176
18061         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
18062         operands.
18064 2018-01-24  Richard Biener  <rguenther@suse.de>
18066         PR tree-optimization/82819
18067         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
18068         code generating pluses that are no-ops in the target precision.
18070 2018-01-24  Richard Biener  <rguenther@suse.de>
18072         PR middle-end/84000
18073         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
18075 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18077         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
18078         to merge probabilities.
18079         * predict.c (probably_never_executed): Also mark as cold functions
18080         with global 0 profile and guessed local profile.
18081         * profile-count.c (profile_probability::combine_with_count): New
18082         member function.
18083         * profile-count.h (profile_probability::operator*,
18084         profile_probability::operator*=, profile_probability::operator/,
18085         profile_probability::operator/=): Reduce precision to adjusted
18086         and set value to guessed on contradictory divisions.
18087         (profile_probability::combine_with_freq): Remove.
18088         (profile_probability::combine_wiht_count): Declare.
18089         (profile_count::force_nonzero):: Set to adjusted.
18090         (profile_count::probability_in):: Set quality to adjusted.
18091         * tree-ssa-tail-merge.c (replace_block_by): Use
18092         combine_with_count.
18094 2018-01-23  Andrew Waterman  <andrew@sifive.com>
18095             Jim Wilson  <jimw@sifive.com>
18097         * config/riscv/riscv.c (riscv_stack_boundary): New.
18098         (riscv_option_override): Set riscv_stack_boundary.  Handle
18099         riscv_preferred_stack_boundary_arg.
18100         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
18101         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
18102         (STACK_BOUNDARY): Set to riscv_stack_boundary.
18103         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
18104         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
18105         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
18107 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
18109         PR target/83905
18110         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
18111         of struct ix86_frame.
18112         (ix86_expand_epilogue): Likewise.  Add a local variable for
18113         the reg_save_offset field in struct ix86_frame.
18115 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
18117         PR tree-optimization/82604
18118         * tree-loop-distribution.c (enum partition_kind): New enum item
18119         PKIND_PARTIAL_MEMSET.
18120         (partition_builtin_p): Support above new enum item.
18121         (generate_code_for_partition): Ditto.
18122         (compute_access_range): Differentiate cases that equality can be
18123         proven at all loops, the innermost loops or no loops.
18124         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
18125         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
18126         (finalize_partitions, distribute_loop): Don't fuse partition of
18127         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
18128         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
18129         parloop is enabled.
18131 2018-01-23  Martin Liska  <mliska@suse.cz>
18133         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
18134         order to ignore the predictor.
18135         (PRED_POLYMORPHIC_CALL): Likewise.
18136         (PRED_RECURSIVE_CALL): Likewise.
18138 2018-01-23  Martin Liska  <mliska@suse.cz>
18140         * tree-profile.c (tree_profiling): Print function header to
18141         aware reader which function we are working on.
18142         * value-prof.c (gimple_find_values_to_profile): Do not print
18143         not interesting value histograms.
18145 2018-01-23  Martin Liska  <mliska@suse.cz>
18147         * profile-count.h (enum profile_quality): Add
18148         profile_uninitialized as the first value. Do not number values
18149         as they are zero based.
18150         (profile_count::verify): Update sanity check.
18151         (profile_probability::verify): Likewise.
18153 2018-01-23  Nathan Sidwell  <nathan@acm.org>
18155         * doc/invoke.texi (ffor-scope): Deprecate.
18157 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18159         PR tree-optimization/83510
18160         * domwalk.c (set_all_edges_as_executable): New function.
18161         (dom_walker::dom_walker): Convert bool param
18162         "skip_unreachable_blocks" to enum reachability.  Move setup of
18163         edge flags to set_all_edges_as_executable and only do it when
18164         reachability is REACHABLE_BLOCKS.
18165         * domwalk.h (enum dom_walker::reachability): New enum.
18166         (dom_walker::dom_walker): Convert bool param
18167         "skip_unreachable_blocks" to enum reachability.
18168         (set_all_edges_as_executable): New decl.
18169         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
18170         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
18171         "reachability".
18172         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
18173         but converting true to REACHABLE_BLOCKS.
18174         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
18175         * tree-vrp.c
18176         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
18177         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
18178         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
18179         REACHABLE_BLOCKS.
18180         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
18181         if check_all_array_refs will be called.
18183 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18185         * tree.c (selftest::test_location_wrappers): Add more test
18186         coverage.
18188 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
18190         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
18191         (selftest::test_bit_in_range): Likewise.
18193 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18195         PR testsuite/83888
18196         * doc/sourcebuild.texi (vect_float): Say that the selector
18197         only describes the situation when -funsafe-math-optimizations is on.
18198         (vect_float_strict): Document.
18200 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
18202         PR tree-optimization/83965
18203         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
18204         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
18205         instead of checking only for a reduction.
18206         (vect_recog_widen_sum_pattern): Likewise.
18208 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18210         * predict.c (probably_never_executed): Only use precise profile info.
18211         (compute_function_frequency): Skip after inlining hack since we now
18212         have quality checking.
18214 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
18216         * profile-count.h (profile_probability::very_unlikely,
18217         profile_probability::unlikely, profile_probability::even): Set
18218         precision to guessed.
18220 2018-01-23  Richard Biener  <rguenther@suse.de>
18222         PR tree-optimization/83963
18223         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
18224         Properly terminate dominator walk when crossing the exit edge not
18225         when visiting its source block.
18227 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
18229         PR c++/83918
18230         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
18231         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
18233 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
18235         PR tree-optimization/83957
18236         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
18237         semicolon after for body surrounded by braces.
18239         PR tree-optimization/83081
18240         * profile-count.h (profile_probability::split): New method.
18241         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
18242         Use profile_probability::split.
18243         (do_compare_rtx_and_jump): Fix adjustment of probabilities
18244         when splitting a single conditional jump into 2.
18246 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
18248         PR tree-optimization/69452
18249         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
18250         decl.
18252 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18254         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
18255         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
18256         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
18258 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18260         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
18261         declaration.
18262         * config/rl78/rl78.md (movdi): New define_expand.
18263         * config/rl78/rl78.c (rl78_split_movdi): New function.
18265 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18267         PR target/83862
18268         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
18269         no longer used.
18270         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
18271         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
18272         128-bit to produce an UNSPEC move to get the double word with the
18273         signbit and then a shift directly to do signbit.
18274         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
18275         implementation with a new version that just does either a direct
18276         move or a regular move.  Move memory interface to separate insns.
18277         Move insns so they are next to the expander.
18278         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
18279         with signbit move.  Split big and little endian case.
18280         (signbit<mode>2_dm_mem_le): Likewise.
18281         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
18282         (signbit<mode>2_dm2): Likewise.
18284 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18286         * config/rl78/rl78.md (anddi3): New define_expand.
18288 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18290         * config/rl78/rl78.md (umindi3): New define_expand.
18292 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18294         * config/rl78/rl78.md (smindi3): New define_expand.
18296 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18298         * config/rl78/rl78.md (smaxdi3): New define_expand.
18300 2018-01-22  Carl Love  <cel@us.ibm.com>
18302         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
18303         LVX_V1TI): Add macro expansion.
18304         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
18305         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
18306         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
18307         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
18308         Change check to determine if the instruction is a byte reversing
18309         entry.  Fix typo in comment.
18310         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
18311         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
18312         Add def_builtin calls for new builtins.
18313         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
18314         Add define_insn expansion.
18316 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18318         * config/rl78/rl78.md (umaxdi3): New define_expand.
18320 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
18322         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
18323         for non-QImode registers.
18325 2018-01-22  Richard Biener  <rguenther@suse.de>
18327         PR tree-optimization/83963
18328         * graphite-scop-detection.c (scop_detection::get_sese): Delay
18329         including the loop exit block.
18330         (scop_detection::merge_sese): Likewise.
18331         (scop_detection::add_scop): Do it here instead.
18333 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18335         * doc/sourcebuild.texi (arm_softfloat): Document.
18337 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
18339         PR gcc/77734
18340         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
18341         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
18342         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
18344 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18345             David Edelsohn  <dje.gcc@gmail.com>
18347         PR target/83946
18348         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18349         Change "crset eq" to "crset 2".
18350         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18351         (*call_indirect_aix<mode>_nospec): Likewise.
18352         (*call_value_indirect_aix<mode>_nospec): Likewise.
18353         (*call_indirect_elfv2<mode>_nospec): Likewise.
18354         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
18355         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
18356         change assembly output from . to $.
18357         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18358         (indirect_jump<mode>_nospec): Change assembly output from . to $.
18359         (*tablejump<mode>_internal1_nospec): Likewise.
18361 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
18363         PR target/80870
18364         * config/sh/sh_optimize_sett_clrt.cc:
18365         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
18367 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
18369         PR tree-optimization/83940
18370         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
18371         offset_dt to vect_constant_def rather than vect_unknown_def_type.
18372         (vect_check_load_store_mask): Add a mask_dt_out parameter and
18373         use it to pass back the definition type.
18374         (vect_check_store_rhs): Likewise rhs_dt_out.
18375         (vect_build_gather_load_calls): Add a mask_dt argument and use
18376         it instead of a call to vect_is_simple_use.
18377         (vectorizable_store): Update calls to vect_check_load_store_mask
18378         and vect_check_store_rhs.  Use the dt returned by the latter instead
18379         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
18380         instead of calls to vect_is_simple_use.  Pass the scalar rather
18381         than the vector operand to vect_is_simple_use when handling
18382         second and subsequent copies of an rhs value.
18383         (vectorizable_load): Update calls to vect_check_load_store_mask
18384         and vect_build_gather_load_calls.  Use the cached mask_dt and
18385         gs_info.offset_dt instead of calls to vect_is_simple_use.
18387 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
18389         PR middle-end/83945
18390         * tree-emutls.c: Include gimplify.h.
18391         (lower_emutls_2): New function.
18392         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
18393         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
18394         it before further processing.
18396         PR target/83930
18397         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
18398         UINTVAL (trueop1) instead of INTVAL (op1).
18400 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
18402         PR debug/81570
18403         PR debug/83728
18404         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
18405         INCOMING_FRAME_SP_OFFSET if not defined.
18406         (scan_trace): Add ENTRY argument.  If true and
18407         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
18408         emit a note to adjust the CFA offset.
18409         (create_cfi_notes): Adjust scan_trace callers.
18410         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
18411         INCOMING_FRAME_SP_OFFSET in the CIE.
18412         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
18413         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
18414         Likewise.
18415         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
18416         * doc/tm.texi: Regenerated.
18418 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18420         PR rtl-optimization/83147
18421         * lra-constraints.c (remove_inheritance_pseudos): Use
18422         lra_substitute_pseudo_within_insn.
18424 2018-01-19  Tom de Vries  <tom@codesourcery.com>
18425             Cesar Philippidis  <cesar@codesourcery.com>
18427         PR target/83920
18428         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
18430 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
18432         PR target/83790
18433         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
18434         spaces for function labels.
18436 2018-01-19  Martin Liska  <mliska@suse.cz>
18438         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
18439         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
18440         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
18441         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
18442         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
18443         (PRED_CONST_RETURN): Change from 69 to 65.
18444         (PRED_NULL_RETURN): Change from 91 to 71.
18445         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
18446         (PRED_LOOP_GUARD): Change from 66 to 73.
18448 2018-01-19  Martin Liska  <mliska@suse.cz>
18450         * predict.c (predict_insn_def): Add new assert.
18451         (struct branch_predictor): Change type to signed integer.
18452         (test_prediction_value_range): Amend test to cover
18453         PROB_UNINITIALIZED.
18454         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
18455         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
18456         (PRED_LOOP_ITERATIONS_MAX): Likewise.
18457         (PRED_LOOP_IV_COMPARE): Likewise.
18458         * predict.h (PROB_UNINITIALIZED): Define new constant.
18460 2018-01-19  Martin Liska  <mliska@suse.cz>
18462         * predict.c (dump_prediction): Add new format for
18463         analyze_brprob.py script which is enabled with -details
18464         suboption.
18465         * profile-count.h (precise_p): New function.
18467 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18469         PR tree-optimization/83922
18470         * tree-vect-loop.c (vect_verify_full_masking): Return false if
18471         there are no statements that need masking.
18472         (vect_active_double_reduction_p): New function.
18473         (vect_analyze_loop_operations): Use it when handling phis that
18474         are not in the loop header.
18476 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
18478         PR tree-optimization/83914
18479         * tree-vect-loop.c (vectorizable_induction): Don't convert
18480         init_expr or apply the peeling adjustment for inductions
18481         that are nested within the vectorized loop.
18483 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18485         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
18486         instead of NEG.
18488 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18490         PR sanitizer/81715
18491         PR testsuite/83882
18492         * function.h (gimplify_parameters): Add gimple_seq * argument.
18493         * function.c: Include gimple.h and options.h.
18494         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
18495         for the added local temporaries if needed.
18496         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
18497         if there are any parameter cleanups, wrap whole body into a
18498         try/finally with the cleanups.
18500 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
18502         PR target/82964
18503         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
18504         Use GET_MODE_CLASS for scalar floating point.
18506 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18508         PR ipa/82256
18509         patch by PaX Team
18510         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
18511         Fix call of call_cgraph_insertion_hooks.
18513 2018-01-18  Martin Sebor  <msebor@redhat.com>
18515         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
18517 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
18519         PR ipa/83619
18520         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
18521         frequencies.
18523 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
18525         PR other/70268
18526         * common.opt: (-ffile-prefix-map): New option.
18527         * opts.c (common_handle_option): Defer it.
18528         * opts-global.c (handle_common_deferred_options): Handle it.
18529         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
18530         * file-prefix-map.h: New file.
18531         (remap_debug_filename, add_debug_prefix_map): ...here.
18532         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
18533         * final.c (debug_prefix_map, add_debug_prefix_map
18534         remap_debug_filename): Move to...
18535         * file-prefix-map.c: New file.
18536         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
18537         generalize, get rid of alloca(), use strrchr() instead of strchr().
18538         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
18539         Implement in terms of add_prefix_map().
18540         (remap_macro_filename, remap_debug_filename): Implement in term of
18541         remap_filename().
18542         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
18543         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
18544         * dbxout.c: Include file-prefix-map.h.
18545         * varasm.c: Likewise.
18546         * vmsdbgout.c: Likewise.
18547         * xcoffout.c: Likewise.
18548         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
18549         * doc/cppopts.texi (-fmacro-prefix-map): Document.
18550         * doc/invoke.texi (-ffile-prefix-map): Document.
18551         (-fdebug-prefix-map): Update description.
18553 2018-01-18  Martin Liska  <mliska@suse.cz>
18555         * config/i386/i386.c (indirect_thunk_name): Document that also
18556         lfence is emitted.
18557         (output_indirect_thunk): Document why both instructions
18558         (pause and lfence) are generated.
18560 2018-01-18  Richard Biener  <rguenther@suse.de>
18562         PR tree-optimization/83887
18563         * graphite-scop-detection.c
18564         (scop_detection::get_nearest_dom_with_single_entry): Remove.
18565         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
18566         (scop_detection::merge_sese): Re-implement with a flood-fill
18567         algorithm that properly finds a SESE region if it exists.
18569 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
18571         PR c/61240
18572         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
18573         pointer_diff optimizations use view_convert instead of convert.
18575 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18577         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
18578         Generate different code for -mno-speculate-indirect-jumps.
18579         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
18580         (*call_indirect_aix<mode>): Disable for
18581         -mno-speculate-indirect-jumps.
18582         (*call_indirect_aix<mode>_nospec): New define_insn.
18583         (*call_value_indirect_aix<mode>): Disable for
18584         -mno-speculate-indirect-jumps.
18585         (*call_value_indirect_aix<mode>_nospec): New define_insn.
18586         (*sibcall_nonlocal_sysv<mode>): Generate different code for
18587         -mno-speculate-indirect-jumps.
18588         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
18590 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
18592         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
18593         long double type, set the flags for noting the default long double
18594         type, even if we don't pass or return a long double type.
18596 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
18598         PR ipa/83051
18599         * ipa-inline.c (flatten_function): Do not overwrite final inlining
18600         failure.
18602 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
18604         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
18605         support for merge[hl].
18606         (fold_mergehl_helper): New helper function.
18607         (tree-vector-builder.h): New #include for tree_vector_builder usage.
18608         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
18609         (altivec_vmrglw_direct): Add xxmrglw insn.
18611 2018-01-17  Andrew Waterman  <andrew@sifive.com>
18613         * config/riscv/riscv.c (riscv_conditional_register_usage): If
18614         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
18616 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
18618         PR lto/83121
18619         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
18620         call the lto_location_cache before reading the
18621         DECL_SOURCE_LOCATION of the types.
18623 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
18624             Richard Sandiford  <richard.sandiford@linaro.org>
18626         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
18627         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
18628         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
18629         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
18630         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
18631         Add declaration.
18632         * config/aarch64/constraints.md (aarch64_movti_operand):
18633         Limit immediates.
18634         * config/aarch64/predicates.md (Uti): Add new constraint.
18636 2018-01-17  Carl Love  <cel@us.ibm.com>
18638         * config/rs6000/vsx.md (define_expand xl_len_r,
18639         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
18640         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
18641         lxvll.
18642         (define_expand, define_insn): Move the shift left from  the
18643         define_insn to the define_expand for lxvl and stxvl instructions.
18644         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
18645         and XL_LEN_R definitions to PURE.
18647 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
18649         * config/i386/i386.c (indirect_thunk_name): Declare regno
18650         as unsigned int.  Compare regno with INVALID_REGNUM.
18651         (output_indirect_thunk): Ditto.
18652         (output_indirect_thunk_function): Ditto.
18653         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
18654         in the call to output_indirect_thunk_function.
18656 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
18658         PR middle-end/83884
18659         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
18660         rather than the size of inner_type to determine the stack slot size
18661         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
18663 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
18665         PR target/83546
18666         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
18667         to PTA_SILVERMONT.
18669 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
18671         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
18672         endian Linux systems to optionally enable multilibs for selecting
18673         the long double type if the user configured an explicit type.
18674         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
18675         have no long double multilibs if not defined.
18676         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
18677         warn if the user used -mabi={ieee,ibm}longdouble and we built
18678         multilibs for long double.
18679         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
18680         appropriate multilib option.
18681         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
18682         multilib options.
18683         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
18684         for building long double multilibs.
18685         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
18687 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
18689         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
18690         copies.
18692         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
18693         64 bits.
18694         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
18695         128 bits.
18697         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
18698         variables.
18700         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
18701         return value.
18703 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18705         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
18706         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
18708 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18710         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
18711         different rtl trees depending on TARGET_64BIT.
18712         (rs6000_gen_lvx): Likewise.
18714 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
18716         * config/visium/visium.md (nop): Tweak comment.
18717         (hazard_nop): Likewise.
18719 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18721         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
18722         -mspeculate-indirect-jumps.
18723         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
18724         for -mno-speculate-indirect-jumps.
18725         (*call_indirect_elfv2<mode>_nospec): New define_insn.
18726         (*call_value_indirect_elfv2<mode>): Disable for
18727         -mno-speculate-indirect-jumps.
18728         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
18729         (indirect_jump): Emit different RTL for
18730         -mno-speculate-indirect-jumps.
18731         (*indirect_jump<mode>): Disable for
18732         -mno-speculate-indirect-jumps.
18733         (*indirect_jump<mode>_nospec): New define_insn.
18734         (tablejump): Emit different RTL for
18735         -mno-speculate-indirect-jumps.
18736         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
18737         (tablejumpsi_nospec): New define_expand.
18738         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
18739         (tablejumpdi_nospec): New define_expand.
18740         (*tablejump<mode>_internal1): Disable for
18741         -mno-speculate-indirect-jumps.
18742         (*tablejump<mode>_internal1_nospec): New define_insn.
18743         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
18744         option.
18746 2018-01-16  Artyom Skrobov tyomitch@gmail.com
18748         * caller-save.c (insert_save): Drop unnecessary parameter.  All
18749         callers updated.
18751 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18752             Richard Biener  <rguenth@suse.de>
18754         PR libgomp/83590
18755         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
18756         return early, inline manually is_gimple_sizepos.  Make sure if we
18757         call gimplify_expr we don't end up with a gimple constant.
18758         * tree.c (variably_modified_type_p): Don't return true for
18759         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
18760         * gimplify.h (is_gimple_sizepos): Remove.
18762 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18764         PR tree-optimization/83857
18765         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
18766         vectorizable_live_operation for pure SLP statements.
18767         (vectorizable_live_operation): Handle PHIs.
18769 2018-01-16  Richard Biener  <rguenther@suse.de>
18771         PR tree-optimization/83867
18772         * tree-vect-stmts.c (vect_transform_stmt): Precompute
18773         nested_in_vect_loop_p since the scalar stmt may get invalidated.
18775 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18777         PR c/83844
18778         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
18779         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
18780         If off is not INTEGER_CST, issue a may not be aligned warning
18781         rather than isn't aligned.  Use isn%'t rather than isn't.
18782         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
18783         into MULT_EXPR.
18784         <case MULT_EXPR>: Improve the case when bottom and one of the
18785         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
18786         operand, in that case check if the other operand is multiple of
18787         bottom divided by the INTEGER_CST operand.
18789 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18791         PR target/83858
18792         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
18793         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
18794         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
18795         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
18796         * config/pa/pa.c (pa_function_arg_advance): Likewise.
18797         (pa_function_arg, pa_arg_partial_bytes): Likewise.
18798         (pa_function_arg_size): New function.
18800 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18802         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
18803         in a separate statement.
18805 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
18807         PR tree-optimization/83847
18808         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
18809         group gathers and scatters.
18811 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
18813         PR rtl-optimization/86620
18814         * params.def (max-sched-ready-insns): Bump minimum value to 1.
18816         PR rtl-optimization/83213
18817         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
18818         to last if both are JUMP_INSNs.
18820         PR tree-optimization/83843
18821         * gimple-ssa-store-merging.c
18822         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
18823         store_immediate_info for bswap/nop orig_stores.
18825 2018-01-15  Andrew Waterman  <andrew@sifive.com>
18827         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
18828         !TARGET_MUL.
18829         <UDIV>: Increase cost if !TARGET_DIV.
18831 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
18833         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
18834         (define_attr "cr_logical_3op"): New.
18835         (cceq_ior_compare): Adjust.
18836         (cceq_ior_compare_complement): Adjust.
18837         (*cceq_rev_compare): Adjust.
18838         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
18839         (is_cracked_insn): Adjust.
18840         (insn_must_be_first_in_group): Adjust.
18841         * config/rs6000/40x.md: Adjust.
18842         * config/rs6000/440.md: Adjust.
18843         * config/rs6000/476.md: Adjust.
18844         * config/rs6000/601.md: Adjust.
18845         * config/rs6000/603.md: Adjust.
18846         * config/rs6000/6xx.md: Adjust.
18847         * config/rs6000/7450.md: Adjust.
18848         * config/rs6000/7xx.md: Adjust.
18849         * config/rs6000/8540.md: Adjust.
18850         * config/rs6000/cell.md: Adjust.
18851         * config/rs6000/e300c2c3.md: Adjust.
18852         * config/rs6000/e500mc.md: Adjust.
18853         * config/rs6000/e500mc64.md: Adjust.
18854         * config/rs6000/e5500.md: Adjust.
18855         * config/rs6000/e6500.md: Adjust.
18856         * config/rs6000/mpc.md: Adjust.
18857         * config/rs6000/power4.md: Adjust.
18858         * config/rs6000/power5.md: Adjust.
18859         * config/rs6000/power6.md: Adjust.
18860         * config/rs6000/power7.md: Adjust.
18861         * config/rs6000/power8.md: Adjust.
18862         * config/rs6000/power9.md: Adjust.
18863         * config/rs6000/rs64.md: Adjust.
18864         * config/rs6000/titan.md: Adjust.
18866 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18868         * config/i386/predicates.md (indirect_branch_operand): Rewrite
18869         ix86_indirect_branch_register logic.
18871 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18873         * config/i386/constraints.md (Bs): Update
18874         ix86_indirect_branch_register check.  Don't check
18875         ix86_indirect_branch_register with GOT_memory_operand.
18876         (Bw): Likewise.
18877         * config/i386/predicates.md (GOT_memory_operand): Don't check
18878         ix86_indirect_branch_register here.
18879         (GOT32_symbol_operand): Likewise.
18881 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18883         * config/i386/predicates.md (constant_call_address_operand):
18884         Rewrite ix86_indirect_branch_register logic.
18885         (sibcall_insn_operand): Likewise.
18887 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18889         * config/i386/constraints.md (Bs): Replace
18890         ix86_indirect_branch_thunk_register with
18891         ix86_indirect_branch_register.
18892         (Bw): Likewise.
18893         * config/i386/i386.md (indirect_jump): Likewise.
18894         (tablejump): Likewise.
18895         (*sibcall_memory): Likewise.
18896         (*sibcall_value_memory): Likewise.
18897         Peepholes of indirect call and jump via memory: Likewise.
18898         * config/i386/i386.opt: Likewise.
18899         * config/i386/predicates.md (indirect_branch_operand): Likewise.
18900         (GOT_memory_operand): Likewise.
18901         (call_insn_operand): Likewise.
18902         (sibcall_insn_operand): Likewise.
18903         (GOT32_symbol_operand): Likewise.
18905 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18907         PR middle-end/83837
18908         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
18909         type rather than type addr's type points to.
18910         (expand_omp_atomic_mutex): Likewise.
18911         (expand_omp_atomic): Likewise.
18913 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
18915         PR target/83839
18916         * config/i386/i386.c (output_indirect_thunk_function): Use
18917         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
18918         for  __x86_return_thunk.
18920 2018-01-15  Richard Biener  <rguenther@suse.de>
18922         PR middle-end/83850
18923         * expmed.c (extract_bit_field_1): Fix typo.
18925 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18927         PR target/83687
18928         * config/arm/iterators.md (VF): New mode iterator.
18929         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
18930         Remove integer-related logic from pattern.
18931         (neon_vabd<mode>_3): Likewise.
18933 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
18935         PR middle-end/82694
18936         * common.opt (fstrict-overflow): No longer an alias.
18937         (fwrapv-pointer): New option.
18938         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
18939         also for pointer types based on flag_wrapv_pointer.
18940         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
18941         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
18942         opts->x_flag_wrapv got set.
18943         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
18944         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
18945         POINTER_TYPE_OVERFLOW_UNDEFINED.
18946         * match.pd: Likewise in address comparison pattern.
18947         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
18949 2018-01-15  Richard Biener  <rguenther@suse.de>
18951         PR lto/83804
18952         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
18953         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
18954         Reset type names to their identifier if their TYPE_DECL doesn't
18955         have linkage (and thus is used for ODR and devirt).
18956         (save_debug_info_for_decl): Remove.
18957         (save_debug_info_for_type): Likewise.
18958         (add_tree_to_fld_list): Adjust.
18959         * tree-pretty-print.c (dump_generic_node): Make dumping of
18960         type names more robust.
18962 2018-01-15  Richard Biener  <rguenther@suse.de>
18964         * BASE-VER: Bump to 8.0.1.
18966 2018-01-14  Martin Sebor  <msebor@redhat.com>
18968         PR other/83508
18969         * builtins.c (check_access): Avoid warning when the no-warning bit
18970         is set.
18972 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
18974         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
18975         * ira-color (allocno_hard_regs_compare): Likewise.
18977 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
18979         PR target/83013
18980         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
18981         Use .pushsection/.popsection.
18983 2018-01-14  Martin Sebor  <msebor@redhat.com>
18985         PR c++/81327
18986         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
18988 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
18990         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
18991         entry from extra_headers.
18992         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
18993         extra_headers, make the list bitwise identical to the i?86-*-* one.
18995 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
18997         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
18998         -mcmodel=large with -mindirect-branch=thunk,
18999         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
19000         -mfunction-return=thunk-extern.
19001         * doc/invoke.texi: Document -mcmodel=large is incompatible with
19002         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
19003         -mfunction-return=thunk and -mfunction-return=thunk-extern.
19005 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19007         * config/i386/i386.c (print_reg): Print the name of the full
19008         integer register without '%'.
19009         (ix86_print_operand): Handle 'V'.
19010         * doc/extend.texi: Document 'V' modifier.
19012 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19014         * config/i386/constraints.md (Bs): Disallow memory operand for
19015         -mindirect-branch-register.
19016         (Bw): Likewise.
19017         * config/i386/predicates.md (indirect_branch_operand): Likewise.
19018         (GOT_memory_operand): Likewise.
19019         (call_insn_operand): Likewise.
19020         (sibcall_insn_operand): Likewise.
19021         (GOT32_symbol_operand): Likewise.
19022         * config/i386/i386.md (indirect_jump): Call convert_memory_address
19023         for -mindirect-branch-register.
19024         (tablejump): Likewise.
19025         (*sibcall_memory): Likewise.
19026         (*sibcall_value_memory): Likewise.
19027         Disallow peepholes of indirect call and jump via memory for
19028         -mindirect-branch-register.
19029         (*call_pop): Replace m with Bw.
19030         (*call_value_pop): Likewise.
19031         (*sibcall_pop_memory): Replace m with Bs.
19032         * config/i386/i386.opt (mindirect-branch-register): New option.
19033         * doc/invoke.texi: Document -mindirect-branch-register option.
19035 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19037         * config/i386/i386-protos.h (ix86_output_function_return): New.
19038         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
19039         set function_return_type.
19040         (indirect_thunk_name): Add ret_p to indicate thunk for function
19041         return.
19042         (output_indirect_thunk_function): Pass false to
19043         indirect_thunk_name.
19044         (ix86_output_indirect_branch_via_reg): Likewise.
19045         (ix86_output_indirect_branch_via_push): Likewise.
19046         (output_indirect_thunk_function): Create alias for function
19047         return thunk if regno < 0.
19048         (ix86_output_function_return): New function.
19049         (ix86_handle_fndecl_attribute): Handle function_return.
19050         (ix86_attribute_table): Add function_return.
19051         * config/i386/i386.h (machine_function): Add
19052         function_return_type.
19053         * config/i386/i386.md (simple_return_internal): Use
19054         ix86_output_function_return.
19055         (simple_return_internal_long): Likewise.
19056         * config/i386/i386.opt (mfunction-return=): New option.
19057         (indirect_branch): Mention -mfunction-return=.
19058         * doc/extend.texi: Document function_return function attribute.
19059         * doc/invoke.texi: Document -mfunction-return= option.
19061 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
19063         * config/i386/i386-opts.h (indirect_branch): New.
19064         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
19065         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
19066         with local indirect jump when converting indirect call and jump.
19067         (ix86_set_indirect_branch_type): New.
19068         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
19069         (indirectlabelno): New.
19070         (indirect_thunk_needed): Likewise.
19071         (indirect_thunk_bnd_needed): Likewise.
19072         (indirect_thunks_used): Likewise.
19073         (indirect_thunks_bnd_used): Likewise.
19074         (INDIRECT_LABEL): Likewise.
19075         (indirect_thunk_name): Likewise.
19076         (output_indirect_thunk): Likewise.
19077         (output_indirect_thunk_function): Likewise.
19078         (ix86_output_indirect_branch_via_reg): Likewise.
19079         (ix86_output_indirect_branch_via_push): Likewise.
19080         (ix86_output_indirect_branch): Likewise.
19081         (ix86_output_indirect_jmp): Likewise.
19082         (ix86_code_end): Call output_indirect_thunk_function if needed.
19083         (ix86_output_call_insn): Call ix86_output_indirect_branch if
19084         needed.
19085         (ix86_handle_fndecl_attribute): Handle indirect_branch.
19086         (ix86_attribute_table): Add indirect_branch.
19087         * config/i386/i386.h (machine_function): Add indirect_branch_type
19088         and has_local_indirect_jump.
19089         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
19090         to true.
19091         (tablejump): Likewise.
19092         (*indirect_jump): Use ix86_output_indirect_jmp.
19093         (*tablejump_1): Likewise.
19094         (simple_return_indirect_internal): Likewise.
19095         * config/i386/i386.opt (mindirect-branch=): New option.
19096         (indirect_branch): New.
19097         (keep): Likewise.
19098         (thunk): Likewise.
19099         (thunk-inline): Likewise.
19100         (thunk-extern): Likewise.
19101         * doc/extend.texi: Document indirect_branch function attribute.
19102         * doc/invoke.texi: Document -mindirect-branch= option.
19104 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
19106         PR ipa/83051
19107         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
19109 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
19111         * ipa-inline.c (want_inline_small_function_p): Return false if
19112         inlining has already failed with CIF_FINAL_ERROR.
19113         (update_caller_keys): Call want_inline_small_function_p before
19114         can_inline_edge_p.
19115         (update_callee_keys): Likewise.
19117 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19119         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
19120         New function.
19121         (rs6000_quadword_masked_address_p): Likewise.
19122         (quad_aligned_load_p): Likewise.
19123         (quad_aligned_store_p): Likewise.
19124         (const_load_sequence_p): Add comment to describe the outer-most loop.
19125         (mimic_memory_attributes_and_flags): New function.
19126         (rs6000_gen_stvx): Likewise.
19127         (replace_swapped_aligned_store): Likewise.
19128         (rs6000_gen_lvx): Likewise.
19129         (replace_swapped_aligned_load): Likewise.
19130         (replace_swapped_load_constant): Capitalize argument name in
19131         comment describing this function.
19132         (rs6000_analyze_swaps): Add a third pass to search for vector loads
19133         and stores that access quad-word aligned addresses and replace
19134         with stvx or lvx instructions when appropriate.
19135         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
19136         New function prototype.
19137         (rs6000_quadword_masked_address_p): Likewise.
19138         (rs6000_gen_lvx): Likewise.
19139         (rs6000_gen_stvx): Likewise.
19140         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
19141         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
19142         when memory address is aligned.
19143         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
19144         this split to select lvx instruction when memory address is aligned.
19145         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
19146         instruction when memory address is aligned.
19147         (*vsx_le_perm_load_v16qi): Likewise.
19148         (four unnamed splitters): Modify to select the stvx instruction
19149         when memory is aligned.
19151 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
19153         * predict.c (determine_unlikely_bbs): Handle correctly BBs
19154         which appears in the queue multiple times.
19156 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19157             Alan Hayward  <alan.hayward@arm.com>
19158             David Sherwood  <david.sherwood@arm.com>
19160         * tree-vectorizer.h (vec_lower_bound): New structure.
19161         (_loop_vec_info): Add check_nonzero and lower_bounds.
19162         (LOOP_VINFO_CHECK_NONZERO): New macro.
19163         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
19164         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
19165         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
19166         fields.  Make seg_len the distance travelled, not including the
19167         access size.
19168         (dr_direction_indicator): Declare.
19169         (dr_zero_step_indicator): Likewise.
19170         (dr_known_forward_stride_p): Likewise.
19171         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
19172         tree-ssanames.h.
19173         (runtime_alias_check_p): Allow runtime alias checks with
19174         variable strides.
19175         (operator ==): Compare access_size and align.
19176         (prune_runtime_alias_test_list): Rework for new distinction between
19177         the access_size and seg_len.
19178         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
19179         segment lengths.
19180         (get_segment_min_max): New function.
19181         (create_intersect_range_checks): Use it.
19182         (dr_step_indicator): New function.
19183         (dr_direction_indicator): Likewise.
19184         (dr_zero_step_indicator): Likewise.
19185         (dr_known_forward_stride_p): Likewise.
19186         * tree-loop-distribution.c (data_ref_segment_size): Return
19187         DR_STEP * (niters - 1).
19188         (compute_alias_check_pairs): Update call to the dr_with_seg_len
19189         constructor.
19190         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
19191         (vect_preserves_scalar_order_p): New function, split out from...
19192         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
19193         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
19194         (vect_vfa_access_size): New function.
19195         (vect_vfa_align): Likewise.
19196         (vect_compile_time_alias): Take access_size_a and access_b arguments.
19197         (dump_lower_bound): New function.
19198         (vect_check_lower_bound): Likewise.
19199         (vect_small_gap_p): Likewise.
19200         (vectorizable_with_step_bound_p): Likewise.
19201         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
19202         depencies if the vectorization factor is 1.  Convert the checks
19203         for nonzero steps into checks on the bounds of DR_STEP.  Try using
19204         a bunds check for variable steps if the minimum required step is
19205         relatively small. Update calls to the dr_with_seg_len
19206         constructor and to vect_compile_time_alias.
19207         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
19208         function.
19209         (vect_loop_versioning): Call it.
19210         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
19211         when retrying.
19212         (vect_estimate_min_profitable_iters): Account for any bounds checks.
19214 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19215             Alan Hayward  <alan.hayward@arm.com>
19216             David Sherwood  <david.sherwood@arm.com>
19218         * doc/sourcebuild.texi (vect_scatter_store): Document.
19219         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
19220         optabs.
19221         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
19222         Document.
19223         * genopinit.c (main): Add supports_vec_scatter_store and
19224         supports_vec_scatter_store_cached to target_optabs.
19225         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
19226         IFN_MASK_SCATTER_STORE.
19227         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
19228         functions.
19229         * internal-fn.h (internal_store_fn_p): Declare.
19230         (internal_fn_stored_value_index): Likewise.
19231         * internal-fn.c (scatter_store_direct): New macro.
19232         (expand_scatter_store_optab_fn): New function.
19233         (direct_scatter_store_optab_supported_p): New macro.
19234         (internal_store_fn_p): New function.
19235         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
19236         IFN_MASK_SCATTER_STORE.
19237         (internal_fn_mask_index): Likewise.
19238         (internal_fn_stored_value_index): New function.
19239         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
19240         for scatter stores.
19241         * optabs-query.h (supports_vec_scatter_store_p): Declare.
19242         * optabs-query.c (supports_vec_scatter_store_p): New function.
19243         * tree-vectorizer.h (vect_get_store_rhs): Declare.
19244         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
19245         true for scatter stores.
19246         (vect_gather_scatter_fn_p): Handle scatter stores too.
19247         (vect_check_gather_scatter): Consider using scatter stores if
19248         supports_vec_scatter_store_p.
19249         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
19250         scatter stores too.
19251         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19252         internal_fn_stored_value_index.
19253         (check_load_store_masking): Handle scatter stores too.
19254         (vect_get_store_rhs): Make public.
19255         (vectorizable_call): Use internal_store_fn_p.
19256         (vectorizable_store): Handle scatter store internal functions.
19257         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
19258         when deciding whether the end of the group has been reached.
19259         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
19260         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
19261         (mask_scatter_store<mode>): New insns.
19263 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19264             Alan Hayward  <alan.hayward@arm.com>
19265             David Sherwood  <david.sherwood@arm.com>
19267         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
19268         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
19269         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
19270         function.
19271         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
19272         Use vect_truncate_gather_scatter_offset if we can't treat the
19273         operation as a normal gather load or scatter store.
19274         (get_group_load_store_type): Take the gather_scatter_info
19275         as argument.  Try using a gather load or scatter store for
19276         single-element groups.
19277         (get_load_store_type): Update calls to get_group_load_store_type
19278         and vect_use_strided_gather_scatters_p.
19280 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19281             Alan Hayward  <alan.hayward@arm.com>
19282             David Sherwood  <david.sherwood@arm.com>
19284         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
19285         optional tree argument.
19286         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
19287         null target hooks.
19288         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
19289         but continue to use the current value as a fallback.
19290         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
19291         to compare the updates.
19292         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
19293         (get_load_store_type): Use it when handling a strided access.
19294         (vect_get_strided_load_store_ops): New function.
19295         (vect_get_data_ptr_increment): Likewise.
19296         (vectorizable_load): Handle strided gather loads.  Always pass
19297         a step to vect_create_data_ref_ptr and bump_vector_ptr.
19299 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19300             Alan Hayward  <alan.hayward@arm.com>
19301             David Sherwood  <david.sherwood@arm.com>
19303         * doc/md.texi (gather_load@var{m}): Document.
19304         (mask_gather_load@var{m}): Likewise.
19305         * genopinit.c (main): Add supports_vec_gather_load and
19306         supports_vec_gather_load_cached to target_optabs.
19307         * optabs-tree.c (init_tree_optimization_optabs): Use
19308         ggc_cleared_alloc to allocate target_optabs.
19309         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
19310         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
19311         functions.
19312         * internal-fn.h (internal_load_fn_p): Declare.
19313         (internal_gather_scatter_fn_p): Likewise.
19314         (internal_fn_mask_index): Likewise.
19315         (internal_gather_scatter_fn_supported_p): Likewise.
19316         * internal-fn.c (gather_load_direct): New macro.
19317         (expand_gather_load_optab_fn): New function.
19318         (direct_gather_load_optab_supported_p): New macro.
19319         (direct_internal_fn_optab): New function.
19320         (internal_load_fn_p): Likewise.
19321         (internal_gather_scatter_fn_p): Likewise.
19322         (internal_fn_mask_index): Likewise.
19323         (internal_gather_scatter_fn_supported_p): Likewise.
19324         * optabs-query.c (supports_at_least_one_mode_p): New function.
19325         (supports_vec_gather_load_p): Likewise.
19326         * optabs-query.h (supports_vec_gather_load_p): Declare.
19327         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
19328         and memory_type field.
19329         (NUM_PATTERNS): Bump to 15.
19330         * tree-vect-data-refs.c: Include internal-fn.h.
19331         (vect_gather_scatter_fn_p): New function.
19332         (vect_describe_gather_scatter_call): Likewise.
19333         (vect_check_gather_scatter): Try using internal functions for
19334         gather loads.  Recognize existing calls to a gather load function.
19335         (vect_analyze_data_refs): Consider using gather loads if
19336         supports_vec_gather_load_p.
19337         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
19338         (vect_get_gather_scatter_offset_type): Likewise.
19339         (vect_convert_mask_for_vectype): Likewise.
19340         (vect_add_conversion_to_patterm): Likewise.
19341         (vect_try_gather_scatter_pattern): Likewise.
19342         (vect_recog_gather_scatter_pattern): New pattern recognizer.
19343         (vect_vect_recog_func_ptrs): Add it.
19344         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
19345         internal_fn_mask_index and internal_gather_scatter_fn_p.
19346         (check_load_store_masking): Take the gather_scatter_info as an
19347         argument and handle gather loads.
19348         (vect_get_gather_scatter_ops): New function.
19349         (vectorizable_call): Check internal_load_fn_p.
19350         (vectorizable_load): Likewise.  Handle gather load internal
19351         functions.
19352         (vectorizable_store): Update call to check_load_store_masking.
19353         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
19354         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
19355         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
19356         (aarch64_gather_scale_operand_d): New predicates.
19357         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
19358         (mask_gather_load<mode>): New insns.
19360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19361             Alan Hayward  <alan.hayward@arm.com>
19362             David Sherwood  <david.sherwood@arm.com>
19364         * optabs.def (fold_left_plus_optab): New optab.
19365         * doc/md.texi (fold_left_plus_@var{m}): Document.
19366         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
19367         * internal-fn.c (fold_left_direct): Define.
19368         (expand_fold_left_optab_fn): Likewise.
19369         (direct_fold_left_optab_supported_p): Likewise.
19370         * fold-const-call.c (fold_const_fold_left): New function.
19371         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
19372         * tree-parloops.c (valid_reduction_p): New function.
19373         (gather_scalar_reductions): Use it.
19374         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
19375         (vect_finish_replace_stmt): Declare.
19376         * tree-vect-loop.c (fold_left_reduction_fn): New function.
19377         (needs_fold_left_reduction_p): New function, split out from...
19378         (vect_is_simple_reduction): ...here.  Accept reductions that
19379         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
19380         (vect_force_simple_reduction): Also store the reduction type in
19381         the assignment's STMT_VINFO_REDUC_TYPE.
19382         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
19383         (merge_with_identity): New function.
19384         (vect_expand_fold_left): Likewise.
19385         (vectorize_fold_left_reduction): Likewise.
19386         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
19387         scalar phi in place for it.  Check for target support and reject
19388         cases that would reassociate the operation.  Defer the transform
19389         phase to vectorize_fold_left_reduction.
19390         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
19391         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
19392         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
19394 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19396         * tree-if-conv.c (predicate_mem_writes): Remove redundant
19397         call to ifc_temp_var.
19399 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19400             Alan Hayward  <alan.hayward@arm.com>
19401             David Sherwood  <david.sherwood@arm.com>
19403         * target.def (legitimize_address_displacement): Take the original
19404         offset as a poly_int.
19405         * targhooks.h (default_legitimize_address_displacement): Update
19406         accordingly.
19407         * targhooks.c (default_legitimize_address_displacement): Likewise.
19408         * doc/tm.texi: Regenerate.
19409         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
19410         as an argument, moving assert of ad->disp == ad->disp_term to...
19411         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
19412         Try calling targetm.legitimize_address_displacement before expanding
19413         the address rather than afterwards, and adjust for the new interface.
19414         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
19415         Match the new hook interface.  Handle SVE addresses.
19416         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
19417         new hook interface.
19419 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19421         * Makefile.in (OBJS): Add early-remat.o.
19422         * target.def (select_early_remat_modes): New hook.
19423         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
19424         * doc/tm.texi: Regenerate.
19425         * targhooks.h (default_select_early_remat_modes): Declare.
19426         * targhooks.c (default_select_early_remat_modes): New function.
19427         * timevar.def (TV_EARLY_REMAT): New timevar.
19428         * passes.def (pass_early_remat): New pass.
19429         * tree-pass.h (make_pass_early_remat): Declare.
19430         * early-remat.c: New file.
19431         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
19432         function.
19433         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
19435 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19436             Alan Hayward  <alan.hayward@arm.com>
19437             David Sherwood  <david.sherwood@arm.com>
19439         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
19440         vfm1 with a bound_epilog parameter.
19441         (vect_do_peeling): Update calls accordingly, and move the prologue
19442         call earlier in the function.  Treat the base bound_epilog as 0 for
19443         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
19444         this base when peeling for gaps.
19445         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
19446         with fully-masked loops.
19447         (vect_estimate_min_profitable_iters): Handle the single peeled
19448         iteration in that case.
19450 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19451             Alan Hayward  <alan.hayward@arm.com>
19452             David Sherwood  <david.sherwood@arm.com>
19454         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
19455         single-element interleaving even if the size is not a power of 2.
19456         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
19457         accesses for single-element interleaving if the group size is
19458         not a power of 2.
19460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19461             Alan Hayward  <alan.hayward@arm.com>
19462             David Sherwood  <david.sherwood@arm.com>
19464         * doc/md.texi (fold_extract_last_@var{m}): Document.
19465         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
19466         * optabs.def (fold_extract_last_optab): New optab.
19467         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
19468         * internal-fn.c (fold_extract_direct): New macro.
19469         (expand_fold_extract_optab_fn): Likewise.
19470         (direct_fold_extract_optab_supported_p): Likewise.
19471         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
19472         * tree-vect-loop.c (vect_model_reduction_cost): Handle
19473         EXTRACT_LAST_REDUCTION.
19474         (get_initial_def_for_reduction): Do not create an initial vector
19475         for EXTRACT_LAST_REDUCTION reductions.
19476         (vectorizable_reduction): Leave the scalar phi in place for
19477         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
19478         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
19479         epilogue code for EXTRACT_LAST_REDUCTION and defer the
19480         transform phase to vectorizable_condition.
19481         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
19482         split out from...
19483         (vect_finish_stmt_generation): ...here.
19484         (vect_finish_replace_stmt): New function.
19485         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
19486         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
19487         pattern.
19488         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
19490 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19491             Alan Hayward  <alan.hayward@arm.com>
19492             David Sherwood  <david.sherwood@arm.com>
19494         * doc/md.texi (extract_last_@var{m}): Document.
19495         * optabs.def (extract_last_optab): New optab.
19496         * internal-fn.def (EXTRACT_LAST): New internal function.
19497         * internal-fn.c (cond_unary_direct): New macro.
19498         (expand_cond_unary_optab_fn): Likewise.
19499         (direct_cond_unary_optab_supported_p): Likewise.
19500         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
19501         loops using EXTRACT_LAST.
19502         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
19503         (extract_last_<mode>): ...this optab.
19504         (vec_extract<mode><Vel>): Update accordingly.
19506 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19507             Alan Hayward  <alan.hayward@arm.com>
19508             David Sherwood  <david.sherwood@arm.com>
19510         * target.def (empty_mask_is_expensive): New hook.
19511         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
19512         * doc/tm.texi: Regenerate.
19513         * targhooks.h (default_empty_mask_is_expensive): Declare.
19514         * targhooks.c (default_empty_mask_is_expensive): New function.
19515         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
19516         if the target says that empty masks are expensive.
19517         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
19518         New function.
19519         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
19521 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19522             Alan Hayward  <alan.hayward@arm.com>
19523             David Sherwood  <david.sherwood@arm.com>
19525         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
19526         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
19527         (vect_use_loop_mask_for_alignment_p): New function.
19528         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
19529         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
19530         niters_skip argument.  Make sure that the first niters_skip elements
19531         of the first iteration are inactive.
19532         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
19533         Update call to vect_set_loop_masks_directly.
19534         (get_misalign_in_elems): New function, split out from...
19535         (vect_gen_prolog_loop_niters): ...here.
19536         (vect_update_init_of_dr): Take a code argument that specifies whether
19537         the adjustment should be added or subtracted.
19538         (vect_update_init_of_drs): Likewise.
19539         (vect_prepare_for_masked_peels): New function.
19540         (vect_do_peeling): Skip prologue peeling if we're using a mask
19541         instead.  Update call to vect_update_inits_of_drs.
19542         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19543         mask_skip_niters.
19544         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
19545         alignment.  Do not include the number of peeled iterations in
19546         the minimum threshold in that case.
19547         (vectorizable_induction): Adjust the start value down by
19548         LOOP_VINFO_MASK_SKIP_NITERS iterations.
19549         (vect_transform_loop): Call vect_prepare_for_masked_peels.
19550         Take the number of skipped iterations into account when calculating
19551         the loop bounds.
19552         * tree-vect-stmts.c (vect_gen_while_not): New function.
19554 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19555             Alan Hayward  <alan.hayward@arm.com>
19556             David Sherwood  <david.sherwood@arm.com>
19558         * doc/sourcebuild.texi (vect_fully_masked): Document.
19559         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
19560         default value to 0.
19561         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
19562         split out from...
19563         (vect_analyze_loop_2): ...here. Don't check the vectorization
19564         factor against the number of loop iterations if the loop is
19565         fully-masked.
19567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19568             Alan Hayward  <alan.hayward@arm.com>
19569             David Sherwood  <david.sherwood@arm.com>
19571         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
19572         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
19573         (dump_groups): Update accordingly.
19574         (iv_use::mem_type): New member variable.
19575         (address_p): New function.
19576         (record_use): Add a mem_type argument and initialize the new
19577         mem_type field.
19578         (record_group_use): Add a mem_type argument.  Use address_p.
19579         Remove obsolete null checks of base_object.  Update call to record_use.
19580         (find_interesting_uses_op): Update call to record_group_use.
19581         (find_interesting_uses_cond): Likewise.
19582         (find_interesting_uses_address): Likewise.
19583         (get_mem_type_for_internal_fn): New function.
19584         (find_address_like_use): Likewise.
19585         (find_interesting_uses_stmt): Try find_address_like_use before
19586         calling find_interesting_uses_op.
19587         (addr_offset_valid_p): Use the iv mem_type field as the type
19588         of the addressed memory.
19589         (add_autoinc_candidates): Likewise.
19590         (get_address_cost): Likewise.
19591         (split_small_address_groups_p): Use address_p.
19592         (split_address_groups): Likewise.
19593         (add_iv_candidate_for_use): Likewise.
19594         (autoinc_possible_for_pair): Likewise.
19595         (rewrite_groups): Likewise.
19596         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
19597         (determine_group_iv_cost): Update after split of USE_ADDRESS.
19598         (get_alias_ptr_type_for_ptr_address): New function.
19599         (rewrite_use_address): Rewrite address uses in calls that were
19600         identified by find_address_like_use.
19602 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19603             Alan Hayward  <alan.hayward@arm.com>
19604             David Sherwood  <david.sherwood@arm.com>
19606         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
19607         TARGET_MEM_REFs.
19608         * gimple-expr.h (is_gimple_addressable: Likewise.
19609         * gimple-expr.c (is_gimple_address): Likewise.
19610         * internal-fn.c (expand_call_mem_ref): New function.
19611         (expand_mask_load_optab_fn): Use it.
19612         (expand_mask_store_optab_fn): Likewise.
19614 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19615             Alan Hayward  <alan.hayward@arm.com>
19616             David Sherwood  <david.sherwood@arm.com>
19618         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
19619         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
19620         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
19621         (cond_umax@var{mode}): Document.
19622         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
19623         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
19624         (cond_umin_optab, cond_umax_optab): New optabs.
19625         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
19626         (COND_IOR, COND_XOR): New internal functions.
19627         * internal-fn.h (get_conditional_internal_fn): Declare.
19628         * internal-fn.c (cond_binary_direct): New macro.
19629         (expand_cond_binary_optab_fn): Likewise.
19630         (direct_cond_binary_optab_supported_p): Likewise.
19631         (get_conditional_internal_fn): New function.
19632         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
19633         Cope with reduction statements that are vectorized as calls rather
19634         than assignments.
19635         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
19636         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
19637         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
19638         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19639         (UNSPEC_COND_EOR): New unspecs.
19640         (optab): Add mappings for them.
19641         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
19642         (sve_int_op, sve_fp_op): New int attributes.
19644 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19645             Alan Hayward  <alan.hayward@arm.com>
19646             David Sherwood  <david.sherwood@arm.com>
19648         * optabs.def (while_ult_optab): New optab.
19649         * doc/md.texi (while_ult@var{m}@var{n}): Document.
19650         * internal-fn.def (WHILE_ULT): New internal function.
19651         * internal-fn.h (direct_internal_fn_supported_p): New override
19652         that takes two types as argument.
19653         * internal-fn.c (while_direct): New macro.
19654         (expand_while_optab_fn): New function.
19655         (convert_optab_supported_p): Likewise.
19656         (direct_while_optab_supported_p): New macro.
19657         * wide-int.h (wi::udiv_ceil): New function.
19658         * tree-vectorizer.h (rgroup_masks): New structure.
19659         (vec_loop_masks): New typedef.
19660         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
19661         and fully_masked_p.
19662         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
19663         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
19664         (vect_max_vf): New function.
19665         (slpeel_make_loop_iterate_ntimes): Delete.
19666         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
19667         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
19668         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
19669         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
19670         internal-fn.h, stor-layout.h and optabs-query.h.
19671         (vect_set_loop_mask): New function.
19672         (add_preheader_seq): Likewise.
19673         (add_header_seq): Likewise.
19674         (interleave_supported_p): Likewise.
19675         (vect_maybe_permute_loop_masks): Likewise.
19676         (vect_set_loop_masks_directly): Likewise.
19677         (vect_set_loop_condition_masked): Likewise.
19678         (vect_set_loop_condition_unmasked): New function, split out from
19679         slpeel_make_loop_iterate_ntimes.
19680         (slpeel_make_loop_iterate_ntimes): Rename to..
19681         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
19682         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
19683         (vect_do_peeling): Update call accordingly.
19684         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
19685         loops.
19686         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19687         mask_compare_type, can_fully_mask_p and fully_masked_p.
19688         (release_vec_loop_masks): New function.
19689         (_loop_vec_info): Use it to free the loop masks.
19690         (can_produce_all_loop_masks_p): New function.
19691         (vect_get_max_nscalars_per_iter): Likewise.
19692         (vect_verify_full_masking): Likewise.
19693         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
19694         retries, and free the mask rgroups before retrying.  Check loop-wide
19695         reasons for disallowing fully-masked loops.  Make the final decision
19696         about whether use a fully-masked loop or not.
19697         (vect_estimate_min_profitable_iters): Do not assume that peeling
19698         for the number of iterations will be needed for fully-masked loops.
19699         (vectorizable_reduction): Disable fully-masked loops.
19700         (vectorizable_live_operation): Likewise.
19701         (vect_halve_mask_nunits): New function.
19702         (vect_double_mask_nunits): Likewise.
19703         (vect_record_loop_mask): Likewise.
19704         (vect_get_loop_mask): Likewise.
19705         (vect_transform_loop): Handle the case in which the final loop
19706         iteration might handle a partial vector.  Call vect_set_loop_condition
19707         instead of slpeel_make_loop_iterate_ntimes.
19708         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
19709         (check_load_store_masking): New function.
19710         (prepare_load_store_mask): Likewise.
19711         (vectorizable_store): Handle fully-masked loops.
19712         (vectorizable_load): Likewise.
19713         (supportable_widening_operation): Use vect_halve_mask_nunits for
19714         booleans.
19715         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
19716         (vect_gen_while): New function.
19717         * config/aarch64/aarch64.md (umax<mode>3): New expander.
19718         (aarch64_uqdec<mode>): New insn.
19720 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19721             Alan Hayward  <alan.hayward@arm.com>
19722             David Sherwood  <david.sherwood@arm.com>
19724         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
19725         (reduc_xor_scal_optab): New optabs.
19726         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
19727         (reduc_xor_scal_@var{m}): Document.
19728         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
19729         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
19730         internal functions.
19731         * fold-const-call.c (fold_const_call): Handle them.
19732         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
19733         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
19734         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
19735         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
19736         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
19737         (UNSPEC_XORV): New unspecs.
19738         (optab): Add entries for them.
19739         (BITWISEV): New int iterator.
19740         (bit_reduc_op): New int attributes.
19742 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19743             Alan Hayward  <alan.hayward@arm.com>
19744             David Sherwood  <david.sherwood@arm.com>
19746         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
19747         * internal-fn.def (VEC_SHL_INSERT): New internal function.
19748         * optabs.def (vec_shl_insert_optab): New optab.
19749         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
19750         (duplicate_and_interleave): Likewise.
19751         * tree-vect-loop.c: Include internal-fn.h.
19752         (neutral_op_for_slp_reduction): New function, split out from
19753         get_initial_defs_for_reduction.
19754         (get_initial_def_for_reduction): Handle option 2 for variable-length
19755         vectors by loading the neutral value into a vector and then shifting
19756         the initial value into element 0.
19757         (get_initial_defs_for_reduction): Replace the code argument with
19758         the neutral value calculated by neutral_op_for_slp_reduction.
19759         Use gimple_build_vector for constant-length vectors.
19760         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
19761         but the first group_size elements have a neutral value.
19762         Use duplicate_and_interleave otherwise.
19763         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
19764         Update call to get_initial_defs_for_reduction.  Handle SLP
19765         reductions for variable-length vectors by creating one vector
19766         result for each scalar result, with the elements associated
19767         with other scalar results stubbed out with the neutral value.
19768         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
19769         Require IFN_VEC_SHL_INSERT for double reductions on
19770         variable-length vectors, or SLP reductions that have
19771         a neutral value.  Require can_duplicate_and_interleave_p
19772         support for variable-length unchained SLP reductions if there
19773         is no neutral value, such as for MIN/MAX reductions.  Also require
19774         the number of vector elements to be a multiple of the number of
19775         SLP statements when doing variable-length unchained SLP reductions.
19776         Update call to vect_create_epilog_for_reduction.
19777         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
19778         and remove initial values.
19779         (duplicate_and_interleave): Make public.
19780         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
19781         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
19783 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19784             Alan Hayward  <alan.hayward@arm.com>
19785             David Sherwood  <david.sherwood@arm.com>
19787         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
19788         (can_duplicate_and_interleave_p): New function.
19789         (vect_get_and_check_slp_defs): Take the vector of statements
19790         rather than just the current one.  Remove excess parentheses.
19791         Restriction rejectinon of vect_constant_def and vect_external_def
19792         for variable-length vectors to boolean types, or types for which
19793         can_duplicate_and_interleave_p is false.
19794         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
19795         (duplicate_and_interleave): New function.
19796         (vect_get_constant_vectors): Use gimple_build_vector for
19797         constant-length vectors and suitable variable-length constant
19798         vectors.  Use duplicate_and_interleave for other variable-length
19799         vectors.  Don't defer the update when inserting new statements.
19801 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19802             Alan Hayward  <alan.hayward@arm.com>
19803             David Sherwood  <david.sherwood@arm.com>
19805         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
19806         min_profitable_iters doesn't go negative.
19808 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19809             Alan Hayward  <alan.hayward@arm.com>
19810             David Sherwood  <david.sherwood@arm.com>
19812         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
19813         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
19814         * optabs.def (vec_mask_load_lanes_optab): New optab.
19815         (vec_mask_store_lanes_optab): Likewise.
19816         * internal-fn.def (MASK_LOAD_LANES): New internal function.
19817         (MASK_STORE_LANES): Likewise.
19818         * internal-fn.c (mask_load_lanes_direct): New macro.
19819         (mask_store_lanes_direct): Likewise.
19820         (expand_mask_load_optab_fn): Handle masked operations.
19821         (expand_mask_load_lanes_optab_fn): New macro.
19822         (expand_mask_store_optab_fn): Handle masked operations.
19823         (expand_mask_store_lanes_optab_fn): New macro.
19824         (direct_mask_load_lanes_optab_supported_p): Likewise.
19825         (direct_mask_store_lanes_optab_supported_p): Likewise.
19826         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
19827         parameter.
19828         (vect_load_lanes_supported): Likewise.
19829         * tree-vect-data-refs.c (strip_conversion): New function.
19830         (can_group_stmts_p): Likewise.
19831         (vect_analyze_data_ref_accesses): Use it instead of checking
19832         for a pair of assignments.
19833         (vect_store_lanes_supported): Take a masked_p parameter.
19834         (vect_load_lanes_supported): Likewise.
19835         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
19836         vect_store_lanes_supported and vect_load_lanes_supported.
19837         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
19838         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
19839         parameter.  Don't allow gaps for masked accesses.
19840         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
19841         and vect_load_lanes_supported.
19842         (get_load_store_type): Take a masked_p parameter and update
19843         call to get_group_load_store_type.
19844         (vectorizable_store): Update call to get_load_store_type.
19845         Handle IFN_MASK_STORE_LANES.
19846         (vectorizable_load): Update call to get_load_store_type.
19847         Handle IFN_MASK_LOAD_LANES.
19849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19850             Alan Hayward  <alan.hayward@arm.com>
19851             David Sherwood  <david.sherwood@arm.com>
19853         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
19854         modes for SVE.
19855         * config/aarch64/aarch64-protos.h
19856         (aarch64_sve_struct_memory_operand_p): Declare.
19857         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
19858         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
19859         (VPRED, vpred): Handle SVE structure modes.
19860         * config/aarch64/constraints.md (Utx): New constraint.
19861         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
19862         (aarch64_sve_struct_nonimmediate_operand): New predicates.
19863         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
19864         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
19865         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
19866         structure modes.  Split into pieces after RA.
19867         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
19868         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
19869         New patterns.
19870         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
19871         SVE structure modes.
19872         (aarch64_classify_address): Likewise.
19873         (sizetochar): Move earlier in file.
19874         (aarch64_print_operand): Handle SVE register lists.
19875         (aarch64_array_mode): New function.
19876         (aarch64_sve_struct_memory_operand_p): Likewise.
19877         (TARGET_ARRAY_MODE): Redefine.
19879 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19880             Alan Hayward  <alan.hayward@arm.com>
19881             David Sherwood  <david.sherwood@arm.com>
19883         * target.def (array_mode): New target hook.
19884         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
19885         * doc/tm.texi: Regenerate.
19886         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
19887         * hooks.c (hook_optmode_mode_uhwi_none): New function.
19888         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
19889         targetm.array_mode.
19890         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
19891         type sizes.
19893 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19894             Alan Hayward  <alan.hayward@arm.com>
19895             David Sherwood  <david.sherwood@arm.com>
19897         * fold-const.c (fold_binary_loc): Check the argument types
19898         rather than the result type when testing for a vector operation.
19900 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19902         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
19903         * doc/tm.texi: Regenerate.
19905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
19906             Alan Hayward  <alan.hayward@arm.com>
19907             David Sherwood  <david.sherwood@arm.com>
19909         * doc/invoke.texi (-msve-vector-bits=): Document new option.
19910         (sve): Document new AArch64 extension.
19911         * doc/md.texi (w): Extend the description of the AArch64
19912         constraint to include SVE vectors.
19913         (Upl, Upa): Document new AArch64 predicate constraints.
19914         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
19915         enum.
19916         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
19917         (msve-vector-bits=): New option.
19918         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
19919         SVE when these are disabled.
19920         (sve): New extension.
19921         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
19922         modes.  Adjust their number of units based on aarch64_sve_vg.
19923         (MAX_BITSIZE_MODE_ANY_MODE): Define.
19924         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
19925         aarch64_addr_query_type.
19926         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
19927         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
19928         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
19929         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
19930         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
19931         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
19932         (aarch64_simd_imm_zero_p): Delete.
19933         (aarch64_check_zero_based_sve_index_immediate): Declare.
19934         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
19935         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
19936         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
19937         (aarch64_sve_float_mul_immediate_p): Likewise.
19938         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
19939         rather than an rtx.
19940         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
19941         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
19942         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
19943         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
19944         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
19945         (aarch64_regmode_natural_size): Likewise.
19946         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
19947         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
19948         left one place.
19949         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
19950         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
19951         for VG and the SVE predicate registers.
19952         (V_ALIASES): Add a "z"-prefixed alias.
19953         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
19954         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
19955         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
19956         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
19957         (REG_CLASS_NAMES): Add entries for them.
19958         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
19959         and the predicate registers.
19960         (aarch64_sve_vg): Declare.
19961         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
19962         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
19963         (REGMODE_NATURAL_SIZE): Define.
19964         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
19965         SVE macros.
19966         * config/aarch64/aarch64.c: Include cfgrtl.h.
19967         (simd_immediate_info): Add a constructor for series vectors,
19968         and an associated step field.
19969         (aarch64_sve_vg): New variable.
19970         (aarch64_dbx_register_number): Handle VG and the predicate registers.
19971         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
19972         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
19973         (VEC_ANY_DATA, VEC_STRUCT): New constants.
19974         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
19975         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
19976         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
19977         (aarch64_get_mask_mode): New functions.
19978         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
19979         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
19980         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
19981         predicate modes and predicate registers.  Explicitly restrict
19982         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
19983         to store a vector mode if it is recognized by
19984         aarch64_classify_vector_mode.
19985         (aarch64_regmode_natural_size): New function.
19986         (aarch64_hard_regno_caller_save_mode): Return the original mode
19987         for predicates.
19988         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
19989         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
19990         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
19991         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
19992         functions.
19993         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
19994         does not overlap dest if the function is frame-related.  Handle
19995         SVE constants.
19996         (aarch64_split_add_offset): New function.
19997         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
19998         them aarch64_add_offset.
19999         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
20000         and update call to aarch64_sub_sp.
20001         (aarch64_add_cfa_expression): New function.
20002         (aarch64_expand_prologue): Pass extra temporary registers to the
20003         functions above.  Handle the case in which we need to emit new
20004         DW_CFA_expressions for registers that were originally saved
20005         relative to the stack pointer, but now have to be expressed
20006         relative to the frame pointer.
20007         (aarch64_output_mi_thunk): Pass extra temporary registers to the
20008         functions above.
20009         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
20010         IP0 and IP1 values for SVE frames.
20011         (aarch64_expand_vec_series): New function.
20012         (aarch64_expand_sve_widened_duplicate): Likewise.
20013         (aarch64_expand_sve_const_vector): Likewise.
20014         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
20015         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
20016         into the register, rather than emitting a SET directly.
20017         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
20018         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
20019         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
20020         (offset_9bit_signed_scaled_p): New functions.
20021         (aarch64_replicate_bitmask_imm): New function.
20022         (aarch64_bitmask_imm): Use it.
20023         (aarch64_cannot_force_const_mem): Reject expressions involving
20024         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
20025         (aarch64_classify_index): Handle SVE indices, by requiring
20026         a plain register index with a scale that matches the element size.
20027         (aarch64_classify_address): Handle SVE addresses.  Assert that
20028         the mode of the address is VOIDmode or an integer mode.
20029         Update call to aarch64_classify_symbol.
20030         (aarch64_classify_symbolic_expression): Update call to
20031         aarch64_classify_symbol.
20032         (aarch64_const_vec_all_in_range_p): New function.
20033         (aarch64_print_vector_float_operand): Likewise.
20034         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
20035         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
20036         and the FP immediates 1.0 and 0.5.
20037         (aarch64_print_address_internal): Handle SVE addresses.
20038         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
20039         (aarch64_regno_regclass): Handle predicate registers.
20040         (aarch64_secondary_reload): Handle big-endian reloads of SVE
20041         data modes.
20042         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
20043         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
20044         (aarch64_convert_sve_vector_bits): New function.
20045         (aarch64_override_options): Use it to handle -msve-vector-bits=.
20046         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
20047         rather than an rtx.
20048         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
20049         Handle SVE vector and predicate modes.  Accept VL-based constants
20050         that need only one temporary register, and VL offsets that require
20051         no temporary registers.
20052         (aarch64_conditional_register_usage): Mark the predicate registers
20053         as fixed if SVE isn't available.
20054         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
20055         Return true for SVE vector and predicate modes.
20056         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
20057         rather than an unsigned int.  Handle SVE modes.
20058         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
20059         SVE modes.
20060         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
20061         if SVE is enabled.
20062         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
20063         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
20064         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
20065         (aarch64_sve_float_mul_immediate_p): New functions.
20066         (aarch64_sve_valid_immediate): New function.
20067         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
20068         Explicitly reject structure modes.  Check for INDEX constants.
20069         Handle PTRUE and PFALSE constants.
20070         (aarch64_check_zero_based_sve_index_immediate): New function.
20071         (aarch64_simd_imm_zero_p): Delete.
20072         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
20073         vector modes.  Accept constants in the range of CNT[BHWD].
20074         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
20075         ask for an Advanced SIMD mode.
20076         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
20077         (aarch64_simd_vector_alignment): Handle SVE predicates.
20078         (aarch64_vectorize_preferred_vector_alignment): New function.
20079         (aarch64_simd_vector_alignment_reachable): Use it instead of
20080         the vector size.
20081         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
20082         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
20083         functions.
20084         (MAX_VECT_LEN): Delete.
20085         (expand_vec_perm_d): Add a vec_flags field.
20086         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
20087         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
20088         (aarch64_evpc_ext): Don't apply a big-endian lane correction
20089         for SVE modes.
20090         (aarch64_evpc_rev): Rename to...
20091         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
20092         (aarch64_evpc_rev_global): New function.
20093         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
20094         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
20095         MAX_VECT_LEN.
20096         (aarch64_evpc_sve_tbl): New function.
20097         (aarch64_expand_vec_perm_const_1): Update after rename of
20098         aarch64_evpc_rev.  Handle SVE permutes too, trying
20099         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
20100         than aarch64_evpc_tbl.
20101         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
20102         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
20103         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
20104         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
20105         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
20106         (aarch64_expand_sve_vcond): New functions.
20107         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
20108         of aarch64_vector_mode_p.
20109         (aarch64_dwarf_poly_indeterminate_value): New function.
20110         (aarch64_compute_pressure_classes): Likewise.
20111         (aarch64_can_change_mode_class): Likewise.
20112         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
20113         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
20114         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
20115         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
20116         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
20117         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
20118         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
20119         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
20120         constraints.
20121         (Dn, Dl, Dr): Accept const as well as const_vector.
20122         (Dz): Likewise.  Compare against CONST0_RTX.
20123         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
20124         of "vector" where appropriate.
20125         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
20126         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
20127         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
20128         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
20129         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
20130         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
20131         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
20132         (v_int_equiv): Extend to SVE modes.
20133         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
20134         mode attributes.
20135         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
20136         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
20137         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
20138         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
20139         (SVE_COND_FP_CMP): New int iterators.
20140         (perm_hilo): Handle the new unpack unspecs.
20141         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
20142         attributes.
20143         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
20144         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
20145         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
20146         (aarch64_equality_operator, aarch64_constant_vector_operand)
20147         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
20148         (aarch64_sve_nonimmediate_operand): Likewise.
20149         (aarch64_sve_general_operand): Likewise.
20150         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
20151         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
20152         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
20153         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
20154         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
20155         (aarch64_sve_float_arith_immediate): Likewise.
20156         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
20157         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
20158         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
20159         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
20160         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
20161         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
20162         (aarch64_sve_float_arith_operand): Likewise.
20163         (aarch64_sve_float_arith_with_sub_operand): Likewise.
20164         (aarch64_sve_float_mul_operand): Likewise.
20165         (aarch64_sve_vec_perm_operand): Likewise.
20166         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
20167         (aarch64_mov_operand): Accept const_poly_int and const_vector.
20168         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
20169         as well as const_vector.
20170         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
20171         in file.  Use CONST0_RTX and CONSTM1_RTX.
20172         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
20173         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
20174         Use aarch64_simd_imm_zero.
20175         * config/aarch64/aarch64-sve.md: New file.
20176         * config/aarch64/aarch64.md: Include it.
20177         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
20178         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
20179         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
20180         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
20181         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
20182         (sve): New attribute.
20183         (enabled): Disable instructions with the sve attribute unless
20184         TARGET_SVE.
20185         (movqi, movhi): Pass CONST_POLY_INT operaneds through
20186         aarch64_expand_mov_immediate.
20187         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
20188         CNT[BHSD] immediates.
20189         (movti): Split CONST_POLY_INT moves into two halves.
20190         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
20191         Split additions that need a temporary here if the destination
20192         is the stack pointer.
20193         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
20194         (*add<mode>3_poly_1): New instruction.
20195         (set_clobber_cc): New expander.
20197 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20199         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
20200         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
20201         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
20202         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
20203         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
20204         Change innermode from fixed_mode_size to machine_mode.
20205         (simplify_subreg): Update call accordingly.  Handle a constant-sized
20206         subreg of a variable-length CONST_VECTOR.
20208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
20209             Alan Hayward  <alan.hayward@arm.com>
20210             David Sherwood  <david.sherwood@arm.com>
20212         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
20213         (add_offset_to_base): New function, split out from...
20214         (create_mem_ref): ...here.  When handling a scale other than 1,
20215         check first whether the address is valid without the offset.
20216         Add it into the base if so, leaving the index and scale as-is.
20218 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20220         PR c++/83778
20221         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
20222         fold_for_warn before checking if arg2 is INTEGER_CST.
20224 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
20226         * config/rs6000/predicates.md (load_multiple_operation): Delete.
20227         (store_multiple_operation): Delete.
20228         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
20229         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
20230         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
20231         guarded by TARGET_STRING.
20232         (rs6000_output_load_multiple): Delete.
20233         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20234         OPTION_MASK_STRING / TARGET_STRING handling.
20235         (print_operand) <'N', 'O'>: Add comment that these are unused now.
20236         (const rs6000_opt_masks) <"string">: Change mask to 0.
20237         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
20238         (MASK_STRING): Delete.
20239         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
20240         parts.  Simplify.
20241         (load_multiple): Delete.
20242         (*ldmsi8): Delete.
20243         (*ldmsi7): Delete.
20244         (*ldmsi6): Delete.
20245         (*ldmsi5): Delete.
20246         (*ldmsi4): Delete.
20247         (*ldmsi3): Delete.
20248         (store_multiple): Delete.
20249         (*stmsi8): Delete.
20250         (*stmsi7): Delete.
20251         (*stmsi6): Delete.
20252         (*stmsi5): Delete.
20253         (*stmsi4): Delete.
20254         (*stmsi3): Delete.
20255         (movmemsi_8reg): Delete.
20256         (corresponding unnamed define_insn): Delete.
20257         (movmemsi_6reg): Delete.
20258         (corresponding unnamed define_insn): Delete.
20259         (movmemsi_4reg): Delete.
20260         (corresponding unnamed define_insn): Delete.
20261         (movmemsi_2reg): Delete.
20262         (corresponding unnamed define_insn): Delete.
20263         (movmemsi_1reg): Delete.
20264         (corresponding unnamed define_insn): Delete.
20265         * config/rs6000/rs6000.opt (mno-string): New.
20266         (mstring): Replace by deprecation warning stub.
20267         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
20269 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
20271         * regrename.c (regrename_do_replace): If replacing the same
20272         reg multiple times, try to reuse last created gen_raw_REG.
20274         PR debug/81155
20275         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
20276         main to workaround a bug in GDB.
20278 2018-01-12  Tom de Vries  <tom@codesourcery.com>
20280         PR target/83737
20281         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
20283 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
20285         PR rtl-optimization/80481
20286         * ira-color.c (get_cap_member): New function.
20287         (allocnos_conflict_by_live_ranges_p): Use it.
20288         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
20289         (setup_slot_coalesced_allocno_live_ranges): Ditto.
20291 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
20293         PR target/83628
20294         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
20295         (*saddl_se_1): Ditto.
20296         (*ssubsi_1): Ditto.
20297         (*ssubl_se_1): Ditto.
20299 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20301         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
20302         rather than wi::to_widest for DR_INITs.
20303         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
20304         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
20305         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
20306         INTEGER_CSTs.
20307         (vect_analyze_group_access_1): Note that here.
20309 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20311         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
20312         polynomial type sizes.
20314 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
20316         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
20317         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
20318         (gimple_add_tmp_var): Likewise.
20320 2018-01-12  Martin Liska  <mliska@suse.cz>
20322         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
20323         (gimple_alloc_sizes): Likewise.
20324         (dump_gimple_statistics): Use PRIu64 in printf format.
20325         * gimple.h: Change uint64_t to int.
20327 2018-01-12  Martin Liska  <mliska@suse.cz>
20329         * tree-core.h: Use uint64_t instead of int.
20330         * tree.c (tree_node_counts): Likewise.
20331         (tree_node_sizes): Likewise.
20332         (dump_tree_statistics): Use PRIu64 in printf format.
20334 2018-01-12  Martin Liska  <mliska@suse.cz>
20336         * Makefile.in: As qsort_chk is implemented in vec.c, add
20337         vec.o to linkage of gencfn-macros.
20338         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
20339         passing the info to record_node_allocation_statistics.
20340         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
20341         and pass the info.
20342         * ggc-common.c (struct ggc_usage): Add operator== and use
20343         it in operator< and compare function.
20344         * mem-stats.h (struct mem_usage): Likewise.
20345         * vec.c (struct vec_usage): Remove operator< and compare
20346         function. Can be simply inherited.
20348 2018-01-12  Martin Jambor  <mjambor@suse.cz>
20350         PR target/81616
20351         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
20352         * tree-ssa-math-opts.c: Include domwalk.h.
20353         (convert_mult_to_fma_1): New function.
20354         (fma_transformation_info): New type.
20355         (fma_deferring_state): Likewise.
20356         (cancel_fma_deferring): New function.
20357         (result_of_phi): Likewise.
20358         (last_fma_candidate_feeds_initial_phi): Likewise.
20359         (convert_mult_to_fma): Added deferring logic, split actual
20360         transformation to convert_mult_to_fma_1.
20361         (math_opts_dom_walker): New type.
20362         (math_opts_dom_walker::after_dom_children): New method, body moved
20363         here from pass_optimize_widening_mul::execute, added deferring logic
20364         bits.
20365         (pass_optimize_widening_mul::execute): Moved most of code to
20366         math_opts_dom_walker::after_dom_children.
20367         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
20368         * config/i386/i386.c (ix86_option_override_internal): Added
20369         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
20371 2018-01-12  Richard Biener  <rguenther@suse.de>
20373         PR debug/83157
20374         * dwarf2out.c (gen_variable_die): Do not reset old_die for
20375         inline instance vars.
20377 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
20379         PR target/81819
20380         * config/rx/rx.c (rx_is_restricted_memory_address):
20381         Handle SUBREG case.
20383 2018-01-12  Richard Biener  <rguenther@suse.de>
20385         PR tree-optimization/80846
20386         * target.def (split_reduction): New target hook.
20387         * targhooks.c (default_split_reduction): New function.
20388         * targhooks.h (default_split_reduction): Declare.
20389         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
20390         target requests first reduce vectors by combining low and high
20391         parts.
20392         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
20393         (get_vectype_for_scalar_type_and_size): Export.
20394         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
20395         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
20396         * doc/tm.texi: Regenerate.
20397         * config/i386/i386.c (ix86_split_reduction): Implement
20398         TARGET_VECTORIZE_SPLIT_REDUCTION.
20400 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20402         PR target/83368
20403         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
20404         in PIC mode except for TARGET_VXWORKS_RTP.
20405         * config/sparc/sparc.c: Include cfgrtl.h.
20406         (TARGET_INIT_PIC_REG): Define.
20407         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
20408         (sparc_pic_register_p): New predicate.
20409         (sparc_legitimate_address_p): Use it.
20410         (sparc_legitimize_pic_address): Likewise.
20411         (sparc_delegitimize_address): Likewise.
20412         (sparc_mode_dependent_address_p): Likewise.
20413         (gen_load_pcrel_sym): Remove 4th parameter.
20414         (load_got_register): Adjust call to above.  Remove obsolete stuff.
20415         (sparc_expand_prologue): Do not call load_got_register here.
20416         (sparc_flat_expand_prologue): Likewise.
20417         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
20418         (sparc_use_pseudo_pic_reg): New function.
20419         (sparc_init_pic_reg): Likewise.
20420         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
20421         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
20423 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
20425         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
20426         Add item for branch_cost.
20428 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
20430         PR rtl-optimization/83565
20431         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
20432         not extend the result to a larger mode for rotate operations.
20433         (num_sign_bit_copies1): Likewise.
20435 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20437         PR target/40411
20438         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
20439         -symbolic.
20440         Use values-Xc.o for -pedantic.
20441         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
20443 2018-01-12  Martin Liska  <mliska@suse.cz>
20445         PR ipa/83054
20446         * ipa-devirt.c (final_warning_record::grow_type_warnings):
20447         New function.
20448         (possible_polymorphic_call_targets): Use it.
20449         (ipa_devirt): Likewise.
20451 2018-01-12  Martin Liska  <mliska@suse.cz>
20453         * profile-count.h (enum profile_quality): Use 0 as invalid
20454         enum value of profile_quality.
20456 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
20458         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
20459         -mext-string options.
20461 2018-01-12  Richard Biener  <rguenther@suse.de>
20463         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
20464         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
20465         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20466         Likewise.
20467         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20469 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20471         * configure.ac (--with-long-double-format): Add support for the
20472         configuration option to change the default long double format on
20473         PowerPC systems.
20474         * config.gcc (powerpc*-linux*-*): Likewise.
20475         * configure: Regenerate.
20476         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
20477         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
20478         used without modification.
20480 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20482         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
20483         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
20484         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
20485         MISC_BUILTIN_SPEC_BARRIER.
20486         (rs6000_init_builtins): Likewise.
20487         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
20488         enum value.
20489         (speculation_barrier): New define_insn.
20490         * doc/extend.texi: Document __builtin_speculation_barrier.
20492 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20494         PR target/83203
20495         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
20496         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
20497         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
20498         iterators.
20499         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
20500         integral modes instead of "ss" and "sd".
20501         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
20502         vectors with 32-bit and 64-bit elements.
20503         (vecdupssescalarmodesuffix): New mode attribute.
20504         (vec_dup<mode>): Use it.
20506 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
20508         PR target/83330
20509         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
20510         frame if argument is passed on stack.
20512 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
20514         PR target/82682
20515         * ree.c (combine_reaching_defs): Optimize also
20516         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
20517         reg2=any_extend(exp); reg1=reg2;, formatting fix.
20519 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20521         PR middle-end/83189
20522         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
20524 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
20526         PR middle-end/83718
20527         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
20528         after they are computed.
20530 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
20532         PR tree-optimization/83695
20533         * gimple-loop-linterchange.cc
20534         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
20535         reset cached scev information after interchange.
20536         (pass_linterchange::execute): Remove call to scev_reset_htab.
20538 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20540         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
20541         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
20542         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
20543         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
20544         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
20545         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
20546         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
20547         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
20548         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
20549         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
20550         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
20551         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
20552         (V_lane_reg): Likewise.
20553         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
20554         New define_expand.
20555         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
20556         (vfmal_lane_low<mode>_intrinsic,
20557         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
20558         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
20559         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
20560         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
20561         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
20562         vfmsl_lane_high<mode>_intrinsic): New define_insns.
20564 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20566         * config/arm/arm-cpus.in (fp16fml): New feature.
20567         (ALL_SIMD): Add fp16fml.
20568         (armv8.2-a): Add fp16fml as an option.
20569         (armv8.3-a): Likewise.
20570         (armv8.4-a): Add fp16fml as part of fp16.
20571         * config/arm/arm.h (TARGET_FP16FML): Define.
20572         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
20573         when appropriate.
20574         * config/arm/arm-modes.def (V2HF): Define.
20575         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
20576         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
20577         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
20578         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
20579         vfmsl_low, vfmsl_high): New set of builtins.
20580         * config/arm/iterators.md (PLUSMINUS): New code iterator.
20581         (vfml_op): New code attribute.
20582         (VFMLHALVES): New int iterator.
20583         (VFML, VFMLSEL): New mode attributes.
20584         (V_reg): Define mapping for V2HF.
20585         (V_hi, V_lo): New mode attributes.
20586         (VF_constraint): Likewise.
20587         (vfml_half, vfml_half_selector): New int attributes.
20588         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
20589         define_expand.
20590         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
20591         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
20592         New define_insn.
20593         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
20594         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
20595         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
20596         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
20597         documentation.
20598         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
20599         Document new effective target and option set.
20601 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20603         * config/arm/arm-cpus.in (armv8_4): New feature.
20604         (ARMv8_4a): New fgroup.
20605         (armv8.4-a): New arch.
20606         * config/arm/arm-tables.opt: Regenerate.
20607         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
20608         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
20609         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
20610         Add matching rules for -march=armv8.4-a and extensions.
20611         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
20613 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
20615         PR target/81821
20616         * config/rx/rx.md (BW): New mode attribute.
20617         (sync_lock_test_and_setsi): Add mode suffix to insn output.
20619 2018-01-11  Richard Biener  <rguenther@suse.de>
20621         PR tree-optimization/83435
20622         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
20623         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
20624         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
20626 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20627             Alan Hayward  <alan.hayward@arm.com>
20628             David Sherwood  <david.sherwood@arm.com>
20630         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
20631         field.
20632         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
20633         (aarch64_print_address_internal): Use it to check for a zero offset.
20635 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20636             Alan Hayward  <alan.hayward@arm.com>
20637             David Sherwood  <david.sherwood@arm.com>
20639         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
20640         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
20641         Return a poly_int64 rather than a HOST_WIDE_INT.
20642         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
20643         rather than a HOST_WIDE_INT.
20644         * config/aarch64/aarch64.h (aarch64_frame): Protect with
20645         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
20646         hard_fp_offset, frame_size, initial_adjust, callee_offset and
20647         final_offset from HOST_WIDE_INT to poly_int64.
20648         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
20649         to_constant when getting the number of units in an Advanced SIMD
20650         mode.
20651         (aarch64_builtin_vectorized_function): Check for a constant number
20652         of units.
20653         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
20654         GET_MODE_SIZE.
20655         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
20656         attribute instead of GET_MODE_NUNITS.
20657         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
20658         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
20659         GET_MODE_SIZE for fixed-size registers.
20660         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
20661         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
20662         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
20663         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
20664         (aarch64_print_operand, aarch64_print_address_internal)
20665         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
20666         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
20667         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
20668         Handle polynomial GET_MODE_SIZE.
20669         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
20670         wider than SImode without modification.
20671         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
20672         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
20673         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
20674         passing and returning SVE modes.
20675         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
20676         rather than GEN_INT.
20677         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
20678         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
20679         (aarch64_allocate_and_probe_stack_space): Likewise.
20680         (aarch64_layout_frame): Cope with polynomial offsets.
20681         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
20682         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
20683         polynomial offsets.
20684         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
20685         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
20686         poly_int64 rather than a HOST_WIDE_INT.
20687         (aarch64_get_separate_components, aarch64_process_components)
20688         (aarch64_expand_prologue, aarch64_expand_epilogue)
20689         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
20690         (aarch64_anchor_offset): New function, split out from...
20691         (aarch64_legitimize_address): ...here.
20692         (aarch64_builtin_vectorization_cost): Handle polynomial
20693         TYPE_VECTOR_SUBPARTS.
20694         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
20695         GET_MODE_NUNITS.
20696         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
20697         number of elements from the PARALLEL rather than the mode.
20698         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
20699         rather than GET_MODE_BITSIZE.
20700         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
20701         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
20702         (aarch64_expand_vec_perm_const_1): Handle polynomial
20703         d->perm.length () and d->perm elements.
20704         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
20705         Apply to_constant to d->perm elements.
20706         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
20707         polynomial CONST_VECTOR_NUNITS.
20708         (aarch64_move_pointer): Take amount as a poly_int64 rather
20709         than an int.
20710         (aarch64_progress_pointer): Avoid temporary variable.
20711         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
20712         the mode attribute instead of GET_MODE.
20714 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20715             Alan Hayward  <alan.hayward@arm.com>
20716             David Sherwood  <david.sherwood@arm.com>
20718         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
20719         x exists before using it.
20720         (aarch64_add_constant_internal): Rename to...
20721         (aarch64_add_offset_1): ...this.  Replace regnum with separate
20722         src and dest rtxes.  Handle the case in which they're different,
20723         including when the offset is zero.  Replace scratchreg with an rtx.
20724         Use 2 additions if there is no spare register into which we can
20725         move a 16-bit constant.
20726         (aarch64_add_constant): Delete.
20727         (aarch64_add_offset): Replace reg with separate src and dest
20728         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
20729         Use aarch64_add_offset_1.
20730         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
20731         an rtx rather than an int.  Take the delta as a poly_int64
20732         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
20733         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
20734         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
20735         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
20736         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
20737         and aarch64_add_sp.
20738         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
20739         aarch64_add_constant.
20741 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20743         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
20744         Use scalar_float_mode.
20746 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20748         * config/aarch64/aarch64-simd.md
20749         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
20750         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
20751         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
20752         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
20753         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
20754         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
20755         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
20756         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
20757         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
20758         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
20760 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20762         PR target/83514
20763         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
20764         targ_options->x_arm_arch_string is non NULL.
20766 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
20768         * config/aarch64/aarch64.h
20769         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
20771 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
20773         PR target/82096
20774         * expmed.c (emit_store_flag_force): Swap if const op0
20775         and change VOIDmode to mode of op0.
20777 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
20779         PR rtl-optimization/83761
20780         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
20781         than bytes to mode_for_size.
20783 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20785         PR middle-end/83189
20786         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
20787         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
20788         profile.
20790 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
20792         PR middle-end/83575
20793         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
20794         when in layout mode.
20795         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
20796         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
20797         partition fixup.
20799 2018-01-10  Michael Collison  <michael.collison@arm.com>
20801         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
20802         * config/aarch64/aarch64-option-extension.def: Add
20803         AARCH64_OPT_EXTENSION of 'fp16fml'.
20804         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20805         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
20806         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
20807         * config/aarch64/constraints.md (Ui7): New constraint.
20808         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
20809         (VFMLA_SEL_W): Ditto.
20810         (f16quad): Ditto.
20811         (f16mac1): Ditto.
20812         (VFMLA16_LOW): New int iterator.
20813         (VFMLA16_HIGH): Ditto.
20814         (UNSPEC_FMLAL): New unspec.
20815         (UNSPEC_FMLSL): Ditto.
20816         (UNSPEC_FMLAL2): Ditto.
20817         (UNSPEC_FMLSL2): Ditto.
20818         (f16mac): New code attribute.
20819         * config/aarch64/aarch64-simd-builtins.def
20820         (aarch64_fmlal_lowv2sf): Ditto.
20821         (aarch64_fmlsl_lowv2sf): Ditto.
20822         (aarch64_fmlalq_lowv4sf): Ditto.
20823         (aarch64_fmlslq_lowv4sf): Ditto.
20824         (aarch64_fmlal_highv2sf): Ditto.
20825         (aarch64_fmlsl_highv2sf): Ditto.
20826         (aarch64_fmlalq_highv4sf): Ditto.
20827         (aarch64_fmlslq_highv4sf): Ditto.
20828         (aarch64_fmlal_lane_lowv2sf): Ditto.
20829         (aarch64_fmlsl_lane_lowv2sf): Ditto.
20830         (aarch64_fmlal_laneq_lowv2sf): Ditto.
20831         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
20832         (aarch64_fmlalq_lane_lowv4sf): Ditto.
20833         (aarch64_fmlsl_lane_lowv4sf): Ditto.
20834         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
20835         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
20836         (aarch64_fmlal_lane_highv2sf): Ditto.
20837         (aarch64_fmlsl_lane_highv2sf): Ditto.
20838         (aarch64_fmlal_laneq_highv2sf): Ditto.
20839         (aarch64_fmlsl_laneq_highv2sf): Ditto.
20840         (aarch64_fmlalq_lane_highv4sf): Ditto.
20841         (aarch64_fmlsl_lane_highv4sf): Ditto.
20842         (aarch64_fmlalq_laneq_highv4sf): Ditto.
20843         (aarch64_fmlsl_laneq_highv4sf): Ditto.
20844         * config/aarch64/aarch64-simd.md:
20845         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
20846         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20847         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
20848         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
20849         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
20850         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
20851         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
20852         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
20853         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
20854         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
20855         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
20856         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
20857         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
20858         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
20859         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
20860         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
20861         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
20862         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
20863         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
20864         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
20865         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
20866         (vfmlsl_low_u32): Ditto.
20867         (vfmlalq_low_u32): Ditto.
20868         (vfmlslq_low_u32): Ditto.
20869         (vfmlal_high_u32): Ditto.
20870         (vfmlsl_high_u32): Ditto.
20871         (vfmlalq_high_u32): Ditto.
20872         (vfmlslq_high_u32): Ditto.
20873         (vfmlal_lane_low_u32): Ditto.
20874         (vfmlsl_lane_low_u32): Ditto.
20875         (vfmlal_laneq_low_u32): Ditto.
20876         (vfmlsl_laneq_low_u32): Ditto.
20877         (vfmlalq_lane_low_u32): Ditto.
20878         (vfmlslq_lane_low_u32): Ditto.
20879         (vfmlalq_laneq_low_u32): Ditto.
20880         (vfmlslq_laneq_low_u32): Ditto.
20881         (vfmlal_lane_high_u32): Ditto.
20882         (vfmlsl_lane_high_u32): Ditto.
20883         (vfmlal_laneq_high_u32): Ditto.
20884         (vfmlsl_laneq_high_u32): Ditto.
20885         (vfmlalq_lane_high_u32): Ditto.
20886         (vfmlslq_lane_high_u32): Ditto.
20887         (vfmlalq_laneq_high_u32): Ditto.
20888         (vfmlslq_laneq_high_u32): Ditto.
20889         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
20890         (AARCH64_FL_FOR_ARCH8_4): New.
20891         (AARCH64_ISA_F16FML): New ISA flag.
20892         (TARGET_F16FML): New feature flag for fp16fml.
20893         (doc/invoke.texi): Document new fp16fml option.
20895 2018-01-10  Michael Collison  <michael.collison@arm.com>
20897         * config/aarch64/aarch64-builtins.c:
20898         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
20899         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20900         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
20901         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
20902         (AARCH64_ISA_SHA3): New ISA flag.
20903         (TARGET_SHA3): New feature flag for sha3.
20904         * config/aarch64/iterators.md (sha512_op): New int attribute.
20905         (CRYPTO_SHA512): New int iterator.
20906         (UNSPEC_SHA512H): New unspec.
20907         (UNSPEC_SHA512H2): Ditto.
20908         (UNSPEC_SHA512SU0): Ditto.
20909         (UNSPEC_SHA512SU1): Ditto.
20910         * config/aarch64/aarch64-simd-builtins.def
20911         (aarch64_crypto_sha512hqv2di): New builtin.
20912         (aarch64_crypto_sha512h2qv2di): Ditto.
20913         (aarch64_crypto_sha512su0qv2di): Ditto.
20914         (aarch64_crypto_sha512su1qv2di): Ditto.
20915         (aarch64_eor3qv8hi): Ditto.
20916         (aarch64_rax1qv2di): Ditto.
20917         (aarch64_xarqv2di): Ditto.
20918         (aarch64_bcaxqv8hi): Ditto.
20919         * config/aarch64/aarch64-simd.md:
20920         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
20921         (aarch64_crypto_sha512su0qv2di): Ditto.
20922         (aarch64_crypto_sha512su1qv2di): Ditto.
20923         (aarch64_eor3qv8hi): Ditto.
20924         (aarch64_rax1qv2di): Ditto.
20925         (aarch64_xarqv2di): Ditto.
20926         (aarch64_bcaxqv8hi): Ditto.
20927         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
20928         (vsha512h2q_u64): Ditto.
20929         (vsha512su0q_u64): Ditto.
20930         (vsha512su1q_u64): Ditto.
20931         (veor3q_u16): Ditto.
20932         (vrax1q_u64): Ditto.
20933         (vxarq_u64): Ditto.
20934         (vbcaxq_u16): Ditto.
20935         * config/arm/types.md (crypto_sha512): New type attribute.
20936         (crypto_sha3): Ditto.
20937         (doc/invoke.texi): Document new sha3 option.
20939 2018-01-10  Michael Collison  <michael.collison@arm.com>
20941         * config/aarch64/aarch64-builtins.c:
20942         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
20943         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
20944         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
20945         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
20946         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
20947         (AARCH64_ISA_SM4): New ISA flag.
20948         (TARGET_SM4): New feature flag for sm4.
20949         * config/aarch64/aarch64-simd-builtins.def
20950         (aarch64_sm3ss1qv4si): Ditto.
20951         (aarch64_sm3tt1aq4si): Ditto.
20952         (aarch64_sm3tt1bq4si): Ditto.
20953         (aarch64_sm3tt2aq4si): Ditto.
20954         (aarch64_sm3tt2bq4si): Ditto.
20955         (aarch64_sm3partw1qv4si): Ditto.
20956         (aarch64_sm3partw2qv4si): Ditto.
20957         (aarch64_sm4eqv4si): Ditto.
20958         (aarch64_sm4ekeyqv4si): Ditto.
20959         * config/aarch64/aarch64-simd.md:
20960         (aarch64_sm3ss1qv4si): Ditto.
20961         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
20962         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
20963         (aarch64_sm4eqv4si): Ditto.
20964         (aarch64_sm4ekeyqv4si): Ditto.
20965         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
20966         (sm3part_op): Ditto.
20967         (CRYPTO_SM3TT): Ditto.
20968         (CRYPTO_SM3PART): Ditto.
20969         (UNSPEC_SM3SS1): New unspec.
20970         (UNSPEC_SM3TT1A): Ditto.
20971         (UNSPEC_SM3TT1B): Ditto.
20972         (UNSPEC_SM3TT2A): Ditto.
20973         (UNSPEC_SM3TT2B): Ditto.
20974         (UNSPEC_SM3PARTW1): Ditto.
20975         (UNSPEC_SM3PARTW2): Ditto.
20976         (UNSPEC_SM4E): Ditto.
20977         (UNSPEC_SM4EKEY): Ditto.
20978         * config/aarch64/constraints.md (Ui2): New constraint.
20979         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
20980         * config/arm/types.md (crypto_sm3): New type attribute.
20981         (crypto_sm4): Ditto.
20982         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
20983         (vsm3tt1aq_u32): Ditto.
20984         (vsm3tt1bq_u32): Ditto.
20985         (vsm3tt2aq_u32): Ditto.
20986         (vsm3tt2bq_u32): Ditto.
20987         (vsm3partw1q_u32): Ditto.
20988         (vsm3partw2q_u32): Ditto.
20989         (vsm4eq_u32): Ditto.
20990         (vsm4ekeyq_u32): Ditto.
20991         (doc/invoke.texi): Document new sm4 option.
20993 2018-01-10  Michael Collison  <michael.collison@arm.com>
20995         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
20996         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
20997         (AARCH64_FL_FOR_ARCH8_4): New.
20998         (AARCH64_FL_V8_4): New flag.
20999         (doc/invoke.texi): Document new armv8.4-a option.
21001 2018-01-10  Michael Collison  <michael.collison@arm.com>
21003         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
21004         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
21005         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
21006         * config/aarch64/aarch64-option-extension.def: Add
21007         AARCH64_OPT_EXTENSION of 'sha2'.
21008         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
21009         (crypto): Disable sha2 and aes if crypto disabled.
21010         (crypto): Enable aes and sha2 if enabled.
21011         (simd): Disable sha2 and aes if simd disabled.
21012         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
21013         New flags.
21014         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
21015         (TARGET_SHA2): New feature flag for sha2.
21016         (TARGET_AES): New feature flag for aes.
21017         * config/aarch64/aarch64-simd.md:
21018         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
21019         conditional on TARGET_AES.
21020         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
21021         (aarch64_crypto_sha1hsi): Make pattern conditional
21022         on TARGET_SHA2.
21023         (aarch64_crypto_sha1hv4si): Ditto.
21024         (aarch64_be_crypto_sha1hv4si): Ditto.
21025         (aarch64_crypto_sha1su1v4si): Ditto.
21026         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
21027         (aarch64_crypto_sha1su0v4si): Ditto.
21028         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
21029         (aarch64_crypto_sha256su0v4si): Ditto.
21030         (aarch64_crypto_sha256su1v4si): Ditto.
21031         (doc/invoke.texi): Document new aes and sha2 options.
21033 2018-01-10  Martin Sebor  <msebor@redhat.com>
21035         PR tree-optimization/83781
21036         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
21037         as string arrays.
21039 2018-01-11  Martin Sebor  <msebor@gmail.com>
21040             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21042         PR tree-optimization/83501
21043         PR tree-optimization/81703
21045         * tree-ssa-strlen.c (get_string_cst): Rename...
21046         (get_string_len): ...to this.  Handle global constants.
21047         (handle_char_store): Adjust.
21049 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
21050             Jim Wilson  <jimw@sifive.com>
21052         * config/riscv/riscv-protos.h (riscv_output_return): New.
21053         * config/riscv/riscv.c (struct machine_function): New naked_p field.
21054         (riscv_attribute_table, riscv_output_return),
21055         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
21056         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
21057         (riscv_compute_frame_info): Only compute frame->mask if not a naked
21058         function.
21059         (riscv_expand_prologue): Add early return for naked function.
21060         (riscv_expand_epilogue): Likewise.
21061         (riscv_function_ok_for_sibcall): Return false for naked function.
21062         (riscv_set_current_function): New.
21063         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
21064         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
21065         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
21066         * doc/extend.texi (RISC-V Function Attributes): New.
21068 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21070         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
21071         check for 128-bit long double before checking TCmode.
21072         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
21073         128-bit long doubles before checking TFmode or TCmode.
21074         (FLOAT128_IBM_P): Likewise.
21076 2018-01-10  Martin Sebor  <msebor@redhat.com>
21078         PR tree-optimization/83671
21079         * builtins.c (c_strlen): Unconditionally return zero for the empty
21080         string.
21081         Use -Warray-bounds for warnings.
21082         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
21083         for non-constant array indices with COMPONENT_REF, arrays of
21084         arrays, and pointers to arrays.
21085         (gimple_fold_builtin_strlen): Determine and set length range for
21086         non-constant character arrays.
21088 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
21090         PR middle-end/81897
21091         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
21092         empty blocks.
21094 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
21096         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
21098 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21100         PR target/83399
21101         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
21102         VECTOR_MEM_ALTIVEC_OR_VSX_P.
21103         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
21104         indexed_or_indirect_operand predicate.
21105         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
21106         (*vsx_le_perm_load_v8hi): Likewise.
21107         (*vsx_le_perm_load_v16qi): Likewise.
21108         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
21109         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
21110         (*vsx_le_perm_store_v8hi): Likewise.
21111         (*vsx_le_perm_store_v16qi): Likewise.
21112         (eight unnamed splitters): Likewise.
21114 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
21116         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
21117         * config/rs6000/emmintrin.h: Likewise.
21118         * config/rs6000/mmintrin.h: Likewise.
21119         * config/rs6000/xmmintrin.h: Likewise.
21121 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
21123         PR c++/43486
21124         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
21125         "public_flag".
21126         * tree.c (tree_nop_conversion): Return true for location wrapper
21127         nodes.
21128         (maybe_wrap_with_location): New function.
21129         (selftest::check_strip_nops): New function.
21130         (selftest::test_location_wrappers): New function.
21131         (selftest::tree_c_tests): Call it.
21132         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
21133         (maybe_wrap_with_location): New decl.
21134         (EXPR_LOCATION_WRAPPER_P): New macro.
21135         (location_wrapper_p): New inline function.
21136         (tree_strip_any_location_wrapper): New inline function.
21138 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
21140         PR target/83735
21141         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
21142         stack_realign_offset for the largest alignment of stack slot
21143         actually used.
21144         (ix86_find_max_used_stack_alignment): New function.
21145         (ix86_finalize_stack_frame_flags): Use it.  Set
21146         max_used_stack_alignment if we don't realign stack.
21147         * config/i386/i386.h (machine_function): Add
21148         max_used_stack_alignment.
21150 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
21152         * config/arm/arm.opt (-mbranch-cost): New option.
21153         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
21154         account.
21156 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
21158         PR target/83629
21159         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
21160         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
21162 2018-01-10  Richard Biener  <rguenther@suse.de>
21164         PR debug/83765
21165         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
21166         early out so it also covers the case where we have a non-NULL
21167         origin.
21169 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21171         PR tree-optimization/83753
21172         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
21173         for non-strided grouped accesses if the number of elements is 1.
21175 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
21177         PR target/81616
21178         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
21179         * i386.h (TARGET_USE_GATHER): Define.
21180         * x86-tune.def (X86_TUNE_USE_GATHER): New.
21182 2018-01-10  Martin Liska  <mliska@suse.cz>
21184         PR bootstrap/82831
21185         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
21186         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
21187         partitioning.
21188         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
21189         CLEANUP_NO_PARTITIONING is not set.
21191 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
21193         * doc/rtl.texi: Remove documentation of (const ...) wrappers
21194         for vectors, as a partial revert of r254296.
21195         * rtl.h (const_vec_p): Delete.
21196         (const_vec_duplicate_p): Don't test for vector CONSTs.
21197         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
21198         * expmed.c (make_tree): Likewise.
21200         Revert:
21201         * common.md (E, F): Use CONSTANT_P instead of checking for
21202         CONST_VECTOR.
21203         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
21204         checking for CONST_VECTOR.
21206 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21208         PR middle-end/83575
21209         * predict.c (force_edge_cold): Handle in more sane way edges
21210         with no prediction.
21212 2018-01-09  Carl Love  <cel@us.ibm.com>
21214         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
21215         V4SI, V4SF types.
21216         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
21217         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
21218         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
21219         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
21220         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
21221         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
21222         * config/rs6000/rs6000-protos.h: Add extern defition for
21223         rs6000_generate_float2_double_code.
21224         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
21225         function.
21226         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
21227         (float2_v2df): Add define_expand.
21229 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
21231         PR target/83628
21232         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
21233         op_mode in the force_to_mode call.
21235 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21237         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
21238         instead of checking each element individually.
21239         (aarch64_evpc_uzp): Likewise.
21240         (aarch64_evpc_zip): Likewise.
21241         (aarch64_evpc_ext): Likewise.
21242         (aarch64_evpc_rev): Likewise.
21243         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
21244         instead of checking each element individually.  Return true without
21245         generating rtl if
21246         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
21247         whether all selected elements come from the same input, instead of
21248         checking each element individually.  Remove calls to gen_rtx_REG,
21249         start_sequence and end_sequence and instead assert that no rtl is
21250         generated.
21252 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21254         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
21255         order of HIGH and CONST checks.
21257 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
21259         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
21260         if the destination isn't an SSA_NAME.
21262 2018-01-09  Richard Biener  <rguenther@suse.de>
21264         PR tree-optimization/83668
21265         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
21266         move prologue...
21267         (canonicalize_loop_form): ... here, renamed from ...
21268         (canonicalize_loop_closed_ssa_form): ... this and amended to
21269         swap successor edges for loop exit blocks to make us use
21270         the RPO order we need for initial schedule generation.
21272 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
21274         PR tree-optimization/64811
21275         * match.pd: When optimizing comparisons with Inf, avoid
21276         introducing or losing exceptions from comparisons with NaN.
21278 2018-01-09  Martin Liska  <mliska@suse.cz>
21280         PR sanitizer/82517
21281         * asan.c (shadow_mem_size): Add gcc_assert.
21283 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
21285         Don't save registers in main().
21287         PR target/83738
21288         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
21289         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
21290         * config/avr/avr.c (avr_set_current_function): Don't error if
21291         naked, OS_task or OS_main are specified at the same time.
21292         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
21293         OS_main.
21294         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
21295         attribute.
21296         * common/config/avr/avr-common.c (avr_option_optimization_table):
21297         Switch on -mmain-is-OS_task for optimizing compilations.
21299 2018-01-09  Richard Biener  <rguenther@suse.de>
21301         PR tree-optimization/83572
21302         * graphite.c: Include cfganal.h.
21303         (graphite_transform_loops): Connect infinite loops to exit
21304         and remove fake edges at the end.
21306 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21308         * ipa-inline.c (edge_badness): Revert accidental checkin.
21310 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
21312         PR ipa/80763
21313         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
21314         symbols; not inline clones.
21316 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
21318         PR target/83507
21319         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
21320         hard registers.  Formatting fixes.
21322         PR preprocessor/83722
21323         * gcc.c (try_generate_repro): Pass
21324         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
21325         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
21326         do_report_bug.
21328 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
21329             Kito Cheng  <kito.cheng@gmail.com>
21331         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
21332         (riscv_leaf_function_p): Delete.
21333         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
21335 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21337         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
21338         function.
21339         (do_ifelse): New function.
21340         (do_isel): New function.
21341         (do_sub3): New function.
21342         (do_add3): New function.
21343         (do_load_mask_compare): New function.
21344         (do_overlap_load_compare): New function.
21345         (expand_compare_loop): New function.
21346         (expand_block_compare): Call expand_compare_loop() when appropriate.
21347         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
21348         option description.
21349         (-mblock-compare-inline-loop-limit): New option.
21351 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21353         PR target/83677
21354         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
21355         Reverse order of second and third operands in first alternative.
21356         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
21357         of first and second elements in UNSPEC_VPERMR vector.
21358         (altivec_expand_vec_perm_le): Likewise.
21360 2018-01-08  Jeff Law  <law@redhat.com>
21362         PR rtl-optimizatin/81308
21363         * tree-switch-conversion.c (cfg_altered): New file scoped static.
21364         (process_switch): If group_case_labels makes a change, then set
21365         cfg_altered.
21366         (pass_convert_switch::execute): If a switch is converted, then
21367         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
21369         PR rtl-optimization/81308
21370         * recog.c (split_all_insns): Conditionally cleanup the CFG after
21371         splitting insns.
21373 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
21375         PR target/83663 - Revert r255946
21376         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
21377         generation for cases where splatting a value is not useful.
21378         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
21379         across a vec_duplicate and a paradoxical subreg forming a vector
21380         mode to a vec_concat.
21382 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21384         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
21385         -march=armv8.3-a variants.
21386         * config/arm/t-multilib: Likewise.
21387         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
21389 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21391         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
21392         to generate rtl.
21393         (cceq_ior_compare_complement): Give it a name so I can use it, and
21394         change boolean_or_operator predicate to boolean_operator so it can
21395         be used to generate a crand.
21396         (eqne): New code iterator.
21397         (bd/bd_neg): New code_attrs.
21398         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
21399         a single define_insn.
21400         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
21401         decrement (bdnzt/bdnzf/bdzt/bdzf).
21402         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
21403         with the new names of the branch decrement patterns, and added the
21404         names of the branch decrement conditional patterns.
21406 2018-01-08  Richard Biener  <rguenther@suse.de>
21408         PR tree-optimization/83563
21409         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
21410         cache.
21412 2018-01-08  Richard Biener  <rguenther@suse.de>
21414         PR middle-end/83713
21415         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
21417 2018-01-08  Richard Biener  <rguenther@suse.de>
21419         PR tree-optimization/83685
21420         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
21421         references to abnormals.
21423 2018-01-08  Richard Biener  <rguenther@suse.de>
21425         PR lto/83719
21426         * dwarf2out.c (output_indirect_strings): Handle empty
21427         skeleton_debug_str_hash.
21428         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
21430 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21432         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
21433         (emit_store_direct): Likewise.
21434         (arc_trampoline_adjust_address): Likewise.
21435         (arc_asm_trampoline_template): New function.
21436         (arc_initialize_trampoline): Use asm_trampoline_template.
21437         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
21438         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
21439         * config/arc/arc.md (flush_icache): Delete pattern.
21441 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
21443         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
21444         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
21445         munaligned-access.
21447 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21449         PR target/83681
21450         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
21451         by not USED_FOR_TARGET.
21452         (make_pass_resolve_sw_modes): Likewise.
21454 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21456         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
21457         USED_FOR_TARGET.
21459 2018-01-08  Richard Biener  <rguenther@suse.de>
21461         PR middle-end/83580
21462         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
21464 2018-01-08  Richard Biener  <rguenther@suse.de>
21466         PR middle-end/83517
21467         * match.pd ((t * 2) / 2) -> t): Add missing :c.
21469 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
21471         PR middle-end/81897
21472         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
21473         basic blocks with a small number of successors.
21474         (convert_control_dep_chain_into_preds): Improve handling of
21475         forwarder blocks.
21476         (dump_predicates): Split apart into...
21477         (dump_pred_chain): ...here...
21478         (dump_pred_info): ...and here.
21479         (can_one_predicate_be_invalidated_p): Add debugging printfs.
21480         (can_chain_union_be_invalidated_p): Improve check for invalidation
21481         of paths.
21482         (uninit_uses_cannot_happen): Avoid unnecessary if
21483         convert_control_dep_chain_into_preds yielded nothing.
21485 2018-01-06  Martin Sebor  <msebor@redhat.com>
21487         PR tree-optimization/83640
21488         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
21489         subtracting negative offset from size.
21490         (builtin_access::overlap): Adjust offset bounds of the access to fall
21491         within the size of the object if possible.
21493 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
21495         PR rtl-optimization/83699
21496         * expmed.c (extract_bit_field_1): Restrict the vector usage of
21497         extract_bit_field_as_subreg to cases in which the extracted
21498         value is also a vector.
21500         * lra-constraints.c (process_alt_operands): Test for the equivalence
21501         substitutions when detecting a possible reload cycle.
21503 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
21505         PR debug/83480
21506         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
21507         by default if flag_selective_schedling{,2}.  Formatting fixes.
21509         PR rtl-optimization/83682
21510         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
21511         if it has non-VECTOR_MODE element mode.
21512         (vec_duplicate_p): Likewise.
21514         PR middle-end/83694
21515         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
21516         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
21518 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21520         PR target/83604
21521         * config/i386/i386-builtin.def
21522         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
21523         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
21524         Require also OPTION_MASK_ISA_AVX512F in addition to
21525         OPTION_MASK_ISA_GFNI.
21526         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
21527         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
21528         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
21529         to OPTION_MASK_ISA_GFNI.
21530         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
21531         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
21532         OPTION_MASK_ISA_AVX512BW.
21533         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
21534         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
21535         addition to OPTION_MASK_ISA_GFNI.
21536         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
21537         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
21538         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
21539         to OPTION_MASK_ISA_GFNI.
21540         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
21541         a requirement for all ISAs rather than any of them with a few
21542         exceptions.
21543         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
21544         processing.
21545         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
21546         bitmasks to be enabled with 3 exceptions, instead of requiring any
21547         enabled ISA with lots of exceptions.
21548         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
21549         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
21550         Change avx512bw in isa attribute to avx512f.
21551         * config/i386/sgxintrin.h: Add license boilerplate.
21552         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
21553         to __AVX512F__ and __AVX512VL to __AVX512VL__.
21554         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
21555         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
21556         defined.
21557         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
21558         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
21559         temporarily sse2 rather than sse if not enabled already.
21561         PR target/83604
21562         * config/i386/sse.md (VI248_VLBW): Rename to ...
21563         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
21564         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
21565         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
21566         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
21567         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
21568         mode iterator instead of VI248_VLBW.
21570 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
21572         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
21573         (record_modified): Skip clobbers; add debug output.
21574         (param_change_prob): Use sreal frequencies.
21576 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21578         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
21579         punt for user-aligned variables.
21581 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
21583         * tree-chrec.c (chrec_contains_symbols): Return true for
21584         POLY_INT_CST.
21586 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
21588         PR target/82439
21589         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
21590         of (x|y) == x for BICS pattern.
21592 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
21594         PR tree-optimization/83605
21595         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
21596         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
21597         can throw.
21599 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21601         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
21602         * config/epiphany/rtems.h: New file.
21604 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21605             Uros Bizjak  <ubizjak@gmail.com>
21607         PR target/83554
21608         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
21609         QIreg_operand instead of register_operand predicate.
21610         * config/i386/i386.c (ix86_rop_should_change_byte_p,
21611         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
21612         comments instead of -fmitigate[-_]rop.
21614 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21616         PR bootstrap/81926
21617         * cgraphunit.c (symbol_table::compile): Switch to text_section
21618         before calling assembly_start debug hook.
21619         * run-rtl-passes.c (run_rtl_passes): Likewise.
21620         Include output.h.
21622 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21624         * tree-vrp.c (extract_range_from_binary_expr_1): Check
21625         range_int_cst_p rather than !symbolic_range_p before calling
21626         extract_range_from_multiplicative_op_1.
21628 2018-01-04  Jeff Law  <law@redhat.com>
21630         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
21631         redundant test in assertion.
21633 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21635         * doc/rtl.texi: Document machine_mode wrapper classes.
21637 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21639         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
21640         using tree_to_uhwi.
21642 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21644         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
21645         the VEC_PERM_EXPR fold to fail.
21647 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21649         PR debug/83585
21650         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
21651         to switched_sections.
21653 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21655         PR target/83680
21656         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
21657         test for d.testing.
21659 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
21661         PR target/83387
21662         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
21663         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
21665 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21667         PR debug/83666
21668         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
21669         is BLKmode and bitpos not zero or mode change is needed.
21671 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
21673         PR target/83675
21674         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
21675         TARGET_VIS2.
21677 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
21679         PR target/83628
21680         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
21681         instead of MULT rtx.  Update all corresponding splitters.
21682         (*saddl_se): Ditto.
21683         (*ssub<modesuffix>): Ditto.
21684         (*ssubl_se): Ditto.
21685         (*cmp_sadd_di): Update split patterns.
21686         (*cmp_sadd_si): Ditto.
21687         (*cmp_sadd_sidi): Ditto.
21688         (*cmp_ssub_di): Ditto.
21689         (*cmp_ssub_si): Ditto.
21690         (*cmp_ssub_sidi): Ditto.
21691         * config/alpha/predicates.md (const23_operand): New predicate.
21692         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
21693         Look for ASHIFT, not MULT inner operand.
21694         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
21696 2018-01-04  Martin Liska  <mliska@suse.cz>
21698         PR gcov-profile/83669
21699         * gcov.c (output_intermediate_file): Add version to intermediate
21700         gcov file.
21701         * doc/gcov.texi: Document new field 'version' in intermediate
21702         file format. Fix location of '-k' option of gcov command.
21704 2018-01-04  Martin Liska  <mliska@suse.cz>
21706         PR ipa/82352
21707         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
21709 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
21711         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
21713 2018-01-03  Martin Sebor  <msebor@redhat.com>
21715         PR tree-optimization/83655
21716         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
21717         checking calls with invalid arguments.
21719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21721         * tree-vect-stmts.c (vect_get_store_rhs): New function.
21722         (vectorizable_mask_load_store): Delete.
21723         (vectorizable_call): Return false for masked loads and stores.
21724         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
21725         instead of gimple_assign_rhs1.
21726         (vectorizable_load): Handle IFN_MASK_LOAD.
21727         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
21729 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21731         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
21732         split out from..,
21733         (vectorizable_mask_load_store): ...here.
21734         (vectorizable_load): ...and here.
21736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21738         * tree-vect-stmts.c (vect_build_all_ones_mask)
21739         (vect_build_zero_merge_argument): New functions, split out from...
21740         (vectorizable_load): ...here.
21742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21744         * tree-vect-stmts.c (vect_check_store_rhs): New function,
21745         split out from...
21746         (vectorizable_mask_load_store): ...here.
21747         (vectorizable_store): ...and here.
21749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21751         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
21752         split out from...
21753         (vectorizable_mask_load_store): ...here.
21755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21757         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
21758         (vect_model_store_cost): Take a vec_load_store_type instead of a
21759         vect_def_type.
21760         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
21761         (vect_model_store_cost): Take a vec_load_store_type instead of a
21762         vect_def_type.
21763         (vectorizable_mask_load_store): Update accordingly.
21764         (vectorizable_store): Likewise.
21765         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
21767 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21769         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
21770         IFN_MASK_LOAD calls here rather than...
21771         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
21773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21774             Alan Hayward  <alan.hayward@arm.com>
21775             David Sherwood  <david.sherwood@arm.com>
21777         * expmed.c (extract_bit_field_1): For vector extracts,
21778         fall back to extract_bit_field_as_subreg if vec_extract
21779         isn't available.
21781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21782             Alan Hayward  <alan.hayward@arm.com>
21783             David Sherwood  <david.sherwood@arm.com>
21785         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
21786         they are variable or constant sized.
21787         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
21788         slots for constant-sized data.
21790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21791             Alan Hayward  <alan.hayward@arm.com>
21792             David Sherwood  <david.sherwood@arm.com>
21794         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
21795         handling COND_EXPRs with boolean comparisons, try to find a better
21796         basis for the mask type than the boolean itself.
21798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21800         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
21801         is calculated and how it can be overridden.
21802         * genmodes.c (max_bitsize_mode_any_mode): New variable.
21803         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
21804         if defined.
21805         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
21806         if nonzero.
21808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21809             Alan Hayward  <alan.hayward@arm.com>
21810             David Sherwood  <david.sherwood@arm.com>
21812         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
21813         Remove the mode argument.
21814         (aarch64_simd_valid_immediate): Remove the mode and inverse
21815         arguments.
21816         * config/aarch64/iterators.md (bitsize): New iterator.
21817         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
21818         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
21819         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
21820         aarch64_simd_valid_immediate.
21821         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
21822         (aarch64_reg_or_bic_imm): Likewise.
21823         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
21824         with an insn_type enum and msl with a modifier_type enum.
21825         Replace element_width with a scalar_mode.  Change the shift
21826         to unsigned int.  Add constructors for scalar_float_mode and
21827         scalar_int_mode elements.
21828         (aarch64_vect_float_const_representable_p): Delete.
21829         (aarch64_can_const_movi_rtx_p)
21830         (aarch64_simd_scalar_immediate_valid_for_move)
21831         (aarch64_simd_make_constant): Update call to
21832         aarch64_simd_valid_immediate.
21833         (aarch64_advsimd_valid_immediate_hs): New function.
21834         (aarch64_advsimd_valid_immediate): Likewise.
21835         (aarch64_simd_valid_immediate): Remove mode and inverse
21836         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
21837         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
21838         and aarch64_float_const_representable_p on the result.
21839         (aarch64_output_simd_mov_immediate): Remove mode argument.
21840         Update call to aarch64_simd_valid_immediate and use of
21841         simd_immediate_info.
21842         (aarch64_output_scalar_simd_mov_immediate): Update call
21843         accordingly.
21845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21846             Alan Hayward  <alan.hayward@arm.com>
21847             David Sherwood  <david.sherwood@arm.com>
21849         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
21850         (mode_nunits): Likewise CONST_MODE_NUNITS.
21851         * machmode.def (ADJUST_NUNITS): Document.
21852         * genmodes.c (mode_data::need_nunits_adj): New field.
21853         (blank_mode): Update accordingly.
21854         (adj_nunits): New variable.
21855         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
21856         parameter.
21857         (emit_mode_size_inline): Set need_bytesize_adj for all modes
21858         listed in adj_nunits.
21859         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
21860         listed in adj_nunits.  Don't emit case statements for such modes.
21861         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
21862         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
21863         nothing if adj_nunits is nonnull.
21864         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
21865         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
21866         (emit_mode_fbit): Update use of print_maybe_const_decl.
21867         (emit_move_size): Likewise.  Treat the array as non-const
21868         if adj_nunits.
21869         (emit_mode_adjustments): Handle adj_nunits.
21871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21873         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
21874         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
21875         (VECTOR_MODES): Use it.
21876         (make_vector_modes): Take the prefix as an argument.
21878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21879             Alan Hayward  <alan.hayward@arm.com>
21880             David Sherwood  <david.sherwood@arm.com>
21882         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
21883         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
21884         for MODE_VECTOR_BOOL.
21885         * machmode.def (VECTOR_BOOL_MODE): Document.
21886         * genmodes.c (VECTOR_BOOL_MODE): New macro.
21887         (make_vector_bool_mode): New function.
21888         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
21889         MODE_VECTOR_BOOL.
21890         * lto-streamer-in.c (lto_input_mode_table): Likewise.
21891         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
21892         Likewise.
21893         * stor-layout.c (int_mode_for_mode): Likewise.
21894         * tree.c (build_vector_type_for_mode): Likewise.
21895         * varasm.c (output_constant_pool_2): Likewise.
21896         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
21897         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
21898         for MODE_VECTOR_BOOL.
21899         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
21900         of mode class checks.
21901         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
21902         instead of a list of mode class checks.
21903         (expand_vector_scalar_condition): Likewise.
21904         (type_for_widest_vector_mode): Handle BImode as an inner mode.
21906 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
21907             Alan Hayward  <alan.hayward@arm.com>
21908             David Sherwood  <david.sherwood@arm.com>
21910         * machmode.h (mode_size): Change from unsigned short to
21911         poly_uint16_pod.
21912         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
21913         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
21914         or if measurement_type is not polynomial.
21915         (fixed_size_mode::includes_p): Check for constant-sized modes.
21916         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
21917         return a poly_uint16 rather than an unsigned short.
21918         (emit_mode_size): Change the type of mode_size from unsigned short
21919         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
21920         (emit_mode_adjustments): Cope with polynomial vector sizes.
21921         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
21922         for GET_MODE_SIZE.
21923         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
21924         for GET_MODE_SIZE.
21925         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
21926         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
21927         * caller-save.c (setup_save_areas): Likewise.
21928         (replace_reg_with_saved_mem): Likewise.
21929         * calls.c (emit_library_call_value_1): Likewise.
21930         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
21931         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
21932         (gen_lowpart_for_combine): Likewise.
21933         * convert.c (convert_to_integer_1): Likewise.
21934         * cse.c (equiv_constant, cse_insn): Likewise.
21935         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
21936         (cselib_subst_to_values): Likewise.
21937         * dce.c (word_dce_process_block): Likewise.
21938         * df-problems.c (df_word_lr_mark_ref): Likewise.
21939         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
21940         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
21941         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
21942         (rtl_for_decl_location): Likewise.
21943         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
21944         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
21945         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
21946         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
21947         (expand_expr_real_1): Likewise.
21948         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
21949         (pad_below): Likewise.
21950         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
21951         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
21952         * ira.c (get_subreg_tracking_sizes): Likewise.
21953         * ira-build.c (ira_create_allocno_objects): Likewise.
21954         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
21955         (ira_sort_regnos_for_alter_reg): Likewise.
21956         * ira-costs.c (record_operand_costs): Likewise.
21957         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
21958         (resolve_simple_move): Likewise.
21959         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
21960         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
21961         (lra_constraints): Likewise.
21962         (CONST_POOL_OK_P): Reject variable-sized modes.
21963         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
21964         (add_pseudo_to_slot, lra_spill): Likewise.
21965         * omp-low.c (omp_clause_aligned_alignment): Likewise.
21966         * optabs-query.c (get_best_extraction_insn): Likewise.
21967         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
21968         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
21969         (expand_mult_highpart, valid_multiword_target_p): Likewise.
21970         * recog.c (offsettable_address_addr_space_p): Likewise.
21971         * regcprop.c (maybe_mode_change): Likewise.
21972         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
21973         * regrename.c (build_def_use): Likewise.
21974         * regstat.c (dump_reg_info): Likewise.
21975         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
21976         (find_reloads, find_reloads_subreg_address): Likewise.
21977         * reload1.c (eliminate_regs_1): Likewise.
21978         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
21979         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
21980         (simplify_binary_operation_1, simplify_subreg): Likewise.
21981         * targhooks.c (default_function_arg_padding): Likewise.
21982         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
21983         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
21984         (verify_gimple_assign_ternary): Likewise.
21985         * tree-inline.c (estimate_move_cost): Likewise.
21986         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
21987         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
21988         (get_address_cost_ainc): Likewise.
21989         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
21990         (vect_supportable_dr_alignment): Likewise.
21991         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
21992         (vectorizable_reduction): Likewise.
21993         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
21994         (vectorizable_operation, vectorizable_load): Likewise.
21995         * tree.c (build_same_sized_truth_vector_type): Likewise.
21996         * valtrack.c (cleanup_auto_inc_dec): Likewise.
21997         * var-tracking.c (emit_note_insn_var_location): Likewise.
21998         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
21999         (ADDR_VEC_ALIGN): Likewise.
22001 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22002             Alan Hayward  <alan.hayward@arm.com>
22003             David Sherwood  <david.sherwood@arm.com>
22005         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
22006         unsigned short.
22007         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
22008         or if measurement_type is polynomial.
22009         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
22010         * combine.c (make_extraction): Likewise.
22011         * dse.c (find_shift_sequence): Likewise.
22012         * dwarf2out.c (mem_loc_descriptor): Likewise.
22013         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
22014         (extract_bit_field, extract_low_bits): Likewise.
22015         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
22016         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
22017         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
22018         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
22019         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
22020         * reload.c (find_reloads): Likewise.
22021         * reload1.c (alter_reg): Likewise.
22022         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
22023         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
22024         * tree-if-conv.c (predicate_mem_writes): Likewise.
22025         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
22026         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
22027         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22028         * valtrack.c (dead_debug_insert_temp): Likewise.
22029         * varasm.c (mergeable_constant_section): Likewise.
22030         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
22032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22033             Alan Hayward  <alan.hayward@arm.com>
22034             David Sherwood  <david.sherwood@arm.com>
22036         * expr.c (expand_assignment): Cope with polynomial mode sizes
22037         when assigning to a CONCAT.
22039 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22040             Alan Hayward  <alan.hayward@arm.com>
22041             David Sherwood  <david.sherwood@arm.com>
22043         * machmode.h (mode_precision): Change from unsigned short to
22044         poly_uint16_pod.
22045         (mode_to_precision): Return a poly_uint16 rather than an unsigned
22046         short.
22047         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
22048         or if measurement_type is not polynomial.
22049         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
22050         in which the mode is already known to be a scalar_int_mode.
22051         * genmodes.c (emit_mode_precision): Change the type of mode_precision
22052         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
22053         initializer.
22054         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22055         for GET_MODE_PRECISION.
22056         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22057         for GET_MODE_PRECISION.
22058         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
22059         as polynomial.
22060         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
22061         (expand_field_assignment, make_extraction): Likewise.
22062         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
22063         (get_last_value): Likewise.
22064         * convert.c (convert_to_integer_1): Likewise.
22065         * cse.c (cse_insn): Likewise.
22066         * expr.c (expand_expr_real_1): Likewise.
22067         * lra-constraints.c (simplify_operand_subreg): Likewise.
22068         * optabs-query.c (can_atomic_load_p): Likewise.
22069         * optabs.c (expand_atomic_load): Likewise.
22070         (expand_atomic_store): Likewise.
22071         * ree.c (combine_reaching_defs): Likewise.
22072         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
22073         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
22074         * tree.h (type_has_mode_precision_p): Likewise.
22075         * ubsan.c (instrument_si_overflow): Likewise.
22077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22078             Alan Hayward  <alan.hayward@arm.com>
22079             David Sherwood  <david.sherwood@arm.com>
22081         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
22082         polynomial numbers of units.
22083         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
22084         (valid_vector_subparts_p): New function.
22085         (build_vector_type): Remove temporary shim and take the number
22086         of units as a poly_uint64 rather than an int.
22087         (build_opaque_vector_type): Take the number of units as a
22088         poly_uint64 rather than an int.
22089         * tree.c (build_vector_from_ctor): Handle polynomial
22090         TYPE_VECTOR_SUBPARTS.
22091         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
22092         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
22093         (build_vector_from_val): If the number of units is variable,
22094         use build_vec_duplicate_cst for constant operands and
22095         VEC_DUPLICATE_EXPR otherwise.
22096         (make_vector_type): Remove temporary is_constant ().
22097         (build_vector_type, build_opaque_vector_type): Take the number of
22098         units as a poly_uint64 rather than an int.
22099         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
22100         VECTOR_CST_NELTS.
22101         * cfgexpand.c (expand_debug_expr): Likewise.
22102         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
22103         (store_constructor, expand_expr_real_1): Likewise.
22104         (const_scalar_mask_from_tree): Likewise.
22105         * fold-const-call.c (fold_const_reduction): Likewise.
22106         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
22107         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
22108         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
22109         (fold_relational_const): Likewise.
22110         (native_interpret_vector): Likewise.  Change the size from an
22111         int to an unsigned int.
22112         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
22113         TYPE_VECTOR_SUBPARTS.
22114         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
22115         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
22116         duplicating a non-constant operand into a variable-length vector.
22117         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
22118         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
22119         * ipa-icf.c (sem_variable::equals): Likewise.
22120         * match.pd: Likewise.
22121         * omp-simd-clone.c (simd_clone_subparts): Likewise.
22122         * print-tree.c (print_node): Likewise.
22123         * stor-layout.c (layout_type): Likewise.
22124         * targhooks.c (default_builtin_vectorization_cost): Likewise.
22125         * tree-cfg.c (verify_gimple_comparison): Likewise.
22126         (verify_gimple_assign_binary): Likewise.
22127         (verify_gimple_assign_ternary): Likewise.
22128         (verify_gimple_assign_single): Likewise.
22129         * tree-pretty-print.c (dump_generic_node): Likewise.
22130         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
22131         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
22132         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
22133         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
22134         (vect_shift_permute_load_chain): Likewise.
22135         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
22136         (expand_vector_condition, optimize_vector_constructor): Likewise.
22137         (lower_vec_perm, get_compute_type): Likewise.
22138         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
22139         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
22140         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
22141         (vect_recog_mask_conversion_pattern): Likewise.
22142         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
22143         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
22144         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
22145         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
22146         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
22147         (vectorizable_shift, vectorizable_operation, vectorizable_store)
22148         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
22149         (supportable_widening_operation): Likewise.
22150         (supportable_narrowing_operation): Likewise.
22151         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
22152         Likewise.
22153         * varasm.c (output_constant): Likewise.
22155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22156             Alan Hayward  <alan.hayward@arm.com>
22157             David Sherwood  <david.sherwood@arm.com>
22159         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
22160         so that both the length == 3 and length != 3 cases set up their
22161         own permute vectors.  Add comments explaining why we know the
22162         number of elements is constant.
22163         (vect_permute_load_chain): Likewise.
22165 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22166             Alan Hayward  <alan.hayward@arm.com>
22167             David Sherwood  <david.sherwood@arm.com>
22169         * machmode.h (mode_nunits): Change from unsigned char to
22170         poly_uint16_pod.
22171         (ONLY_FIXED_SIZE_MODES): New macro.
22172         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
22173         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
22174         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
22175         New typedefs.
22176         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
22177         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
22178         or if measurement_type is not polynomial.
22179         * genmodes.c (ZERO_COEFFS): New macro.
22180         (emit_mode_nunits_inline): Make mode_nunits_inline return a
22181         poly_uint16.
22182         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
22183         Use ZERO_COEFFS when emitting initializers.
22184         * data-streamer.h (bp_pack_poly_value): New function.
22185         (bp_unpack_poly_value): Likewise.
22186         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
22187         for GET_MODE_NUNITS.
22188         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
22189         for GET_MODE_NUNITS.
22190         * tree.c (make_vector_type): Remove temporary shim and make
22191         the real function take the number of units as a poly_uint64
22192         rather than an int.
22193         (build_vector_type_for_mode): Handle polynomial nunits.
22194         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
22195         * emit-rtl.c (const_vec_series_p_1): Likewise.
22196         (gen_rtx_CONST_VECTOR): Likewise.
22197         * fold-const.c (test_vec_duplicate_folding): Likewise.
22198         * genrecog.c (validate_pattern): Likewise.
22199         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
22200         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
22201         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
22202         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
22203         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
22204         * rtlanal.c (subreg_get_info): Likewise.
22205         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
22206         (vect_grouped_load_supported): Likewise.
22207         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
22208         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
22209         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
22210         (simplify_const_unary_operation, simplify_binary_operation_1)
22211         (simplify_const_binary_operation, simplify_ternary_operation)
22212         (test_vector_ops_duplicate, test_vector_ops): Likewise.
22213         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
22214         instead of CONST_VECTOR_NUNITS.
22215         * varasm.c (output_constant_pool_2): Likewise.
22216         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
22217         explicit-encoded elements in the XVEC for variable-length vectors.
22219 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22221         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
22223 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22224             Alan Hayward  <alan.hayward@arm.com>
22225             David Sherwood  <david.sherwood@arm.com>
22227         * coretypes.h (fixed_size_mode): Declare.
22228         (fixed_size_mode_pod): New typedef.
22229         * builtins.h (target_builtins::x_apply_args_mode)
22230         (target_builtins::x_apply_result_mode): Change type to
22231         fixed_size_mode_pod.
22232         * builtins.c (apply_args_size, apply_result_size, result_vector)
22233         (expand_builtin_apply_args_1, expand_builtin_apply)
22234         (expand_builtin_return): Update accordingly.
22236 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22238         * cse.c (hash_rtx_cb): Hash only the encoded elements.
22239         * cselib.c (cselib_hash_rtx): Likewise.
22240         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
22241         CONST_VECTOR encoding.
22243 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22244             Jeff Law  <law@redhat.com>
22246         PR target/83641
22247         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
22248         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
22249         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
22250         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
22252         PR target/83641
22253         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
22254         explicitly probe *sp in a noreturn function if there were any callee
22255         register saves or frame pointer is needed.
22257 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22259         PR debug/83621
22260         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
22261         BLKmode for ternary, binary or unary expressions.
22263         PR debug/83645
22264         * var-tracking.c (delete_vta_debug_insn): New inline function.
22265         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
22266         insns from get_insns () to NULL instead of each bb separately.
22267         Use delete_vta_debug_insn.  No longer static.
22268         (vt_debug_insns_local, variable_tracking_main_1): Adjust
22269         delete_vta_debug_insns callers.
22270         * rtl.h (delete_vta_debug_insns): Declare.
22271         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
22272         instead of variable_tracking_main.
22274 2018-01-03  Martin Sebor  <msebor@redhat.com>
22276         PR tree-optimization/83603
22277         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
22278         arguments past the endof the argument list in functions declared
22279         without a prototype.
22280         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
22281         Avoid checking when arguments are null.
22283 2018-01-03  Martin Sebor  <msebor@redhat.com>
22285         PR c/83559
22286         * doc/extend.texi (attribute const): Fix a typo.
22287         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
22288         issuing -Wsuggest-attribute for void functions.
22290 2018-01-03  Martin Sebor  <msebor@redhat.com>
22292         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
22293         offset_int::from instead of wide_int::to_shwi.
22294         (maybe_diag_overlap): Remove assertion.
22295         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
22296         * gimple-ssa-sprintf.c (format_directive): Same.
22297         (parse_directive): Same.
22298         (sprintf_dom_walker::compute_format_length): Same.
22299         (try_substitute_return_value): Same.
22301 2018-01-03  Jeff Law  <law@redhat.com>
22303         PR middle-end/83654
22304         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
22305         non-constant residual for zero at runtime and avoid probing in
22306         that case.  Reorganize code for trailing problem to mirror handling
22307         of the residual.
22309 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22311         PR tree-optimization/83501
22312         * tree-ssa-strlen.c (get_string_cst): New.
22313         (handle_char_store): Call get_string_cst.
22315 2018-01-03  Martin Liska  <mliska@suse.cz>
22317         PR tree-optimization/83593
22318         * tree-ssa-strlen.c: Include tree-cfg.h.
22319         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
22320         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
22321         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
22322         to false.
22323         (strlen_dom_walker::before_dom_children): Call
22324         gimple_purge_dead_eh_edges. Dump tranformation with details
22325         dump flags.
22326         (strlen_dom_walker::before_dom_children): Update call by adding
22327         new argument cleanup_eh.
22328         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
22330 2018-01-03  Martin Liska  <mliska@suse.cz>
22332         PR ipa/83549
22333         * cif-code.def (VARIADIC_THUNK): New enum value.
22334         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
22335         thunks.
22337 2018-01-03  Jan Beulich  <jbeulich@suse.com>
22339         * sse.md (mov<mode>_internal): Tighten condition for when to use
22340         vmovdqu<ssescalarsize> for TI and OI modes.
22342 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22344         Update copyright years.
22346 2018-01-03  Martin Liska  <mliska@suse.cz>
22348         PR ipa/83594
22349         * ipa-visibility.c (function_and_variable_visibility): Skip
22350         functions with noipa attribure.
22352 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
22354         * gcc.c (process_command): Update copyright notice dates.
22355         * gcov-dump.c (print_version): Ditto.
22356         * gcov.c (print_version): Ditto.
22357         * gcov-tool.c (print_version): Ditto.
22358         * gengtype.c (create_file): Ditto.
22359         * doc/cpp.texi: Bump @copying's copyright year.
22360         * doc/cppinternals.texi: Ditto.
22361         * doc/gcc.texi: Ditto.
22362         * doc/gccint.texi: Ditto.
22363         * doc/gcov.texi: Ditto.
22364         * doc/install.texi: Ditto.
22365         * doc/invoke.texi: Ditto.
22367 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22369         * vector-builder.h (vector_builder::m_full_nelts): Change from
22370         unsigned int to poly_uint64.
22371         (vector_builder::full_nelts): Update prototype accordingly.
22372         (vector_builder::new_vector): Likewise.
22373         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
22374         (vector_builder::operator ==): Likewise.
22375         (vector_builder::finalize): Likewise.
22376         * int-vector-builder.h (int_vector_builder::int_vector_builder):
22377         Take the number of elements as a poly_uint64 rather than an
22378         unsigned int.
22379         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
22380         from unsigned int to poly_uint64.
22381         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
22382         (vec_perm_indices::new_vector): Likewise.
22383         (vec_perm_indices::length): Likewise.
22384         (vec_perm_indices::nelts_per_input): Likewise.
22385         (vec_perm_indices::input_nelts): Likewise.
22386         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
22387         number of elements per input as a poly_uint64 rather than an
22388         unsigned int.  Use the original encoding for variable-length
22389         vectors, rather than clamping each individual element.
22390         For the second and subsequent elements in each pattern,
22391         clamp the step and base before clamping their sum.
22392         (vec_perm_indices::series_p): Handle polynomial element counts.
22393         (vec_perm_indices::all_in_range_p): Likewise.
22394         (vec_perm_indices_to_tree): Likewise.
22395         (vec_perm_indices_to_rtx): Likewise.
22396         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
22397         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
22398         (tree_vector_builder::new_binary_operation): Handle polynomial
22399         element counts.  Return false if we need to know the number
22400         of elements at compile time.
22401         * fold-const.c (fold_vec_perm): Punt if the number of elements
22402         isn't known at compile time.
22404 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22406         * vec-perm-indices.h (vec_perm_builder): Change element type
22407         from HOST_WIDE_INT to poly_int64.
22408         (vec_perm_indices::element_type): Update accordingly.
22409         (vec_perm_indices::clamp): Handle polynomial element_types.
22410         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
22411         (vec_perm_indices::all_in_range_p): Likewise.
22412         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
22413         than shwi trees.
22414         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
22415         polynomial vec_perm_indices element types.
22416         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
22417         * fold-const.c (fold_vec_perm): Likewise.
22418         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
22419         * tree-vect-generic.c (lower_vec_perm): Likewise.
22420         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
22421         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
22422         element type to HOST_WIDE_INT.
22424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22425             Alan Hayward  <alan.hayward@arm.com>
22426             David Sherwood  <david.sherwood@arm.com>
22428         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
22429         rather than an int.  Use plus_constant.
22430         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
22431         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
22433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22434             Alan Hayward  <alan.hayward@arm.com>
22435             David Sherwood  <david.sherwood@arm.com>
22437         * calls.c (emit_call_1, expand_call): Change struct_value_size from
22438         a HOST_WIDE_INT to a poly_int64.
22440 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22441             Alan Hayward  <alan.hayward@arm.com>
22442             David Sherwood  <david.sherwood@arm.com>
22444         * calls.c (load_register_parameters): Cope with polynomial
22445         mode sizes.  Require a constant size for BLKmode parameters
22446         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
22447         forces a parameter to be padded at the lsb end in order to
22448         fill a complete number of words, require the parameter size
22449         to be ordered wrt UNITS_PER_WORD.
22451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22452             Alan Hayward  <alan.hayward@arm.com>
22453             David Sherwood  <david.sherwood@arm.com>
22455         * reload1.c (spill_stack_slot_width): Change element type
22456         from unsigned int to poly_uint64_pod.
22457         (alter_reg): Treat mode sizes as polynomial.
22459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22460             Alan Hayward  <alan.hayward@arm.com>
22461             David Sherwood  <david.sherwood@arm.com>
22463         * reload.c (complex_word_subreg_p): New function.
22464         (reload_inner_reg_of_subreg, push_reload): Use it.
22466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22467             Alan Hayward  <alan.hayward@arm.com>
22468             David Sherwood  <david.sherwood@arm.com>
22470         * lra-constraints.c (process_alt_operands): Reject matched
22471         operands whose sizes aren't ordered.
22472         (match_reload): Refer to this check here.
22474 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22475             Alan Hayward  <alan.hayward@arm.com>
22476             David Sherwood  <david.sherwood@arm.com>
22478         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
22479         that the mode size is in the set {1, 2, 4, 8, 16}.
22481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22482             Alan Hayward  <alan.hayward@arm.com>
22483             David Sherwood  <david.sherwood@arm.com>
22485         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
22486         Use plus_constant instead of gen_rtx_PLUS.
22488 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22489             Alan Hayward  <alan.hayward@arm.com>
22490             David Sherwood  <david.sherwood@arm.com>
22492         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
22493         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
22494         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
22495         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
22496         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
22497         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
22498         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
22499         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
22500         * config/i386/i386.c (ix86_push_rounding): ...this new function.
22501         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
22502         a poly_int64.
22503         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
22504         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
22505         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
22506         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
22507         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
22508         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
22509         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
22510         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
22511         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
22512         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
22513         function.
22514         * expr.c (emit_move_resolve_push): Treat the input and result
22515         of PUSH_ROUNDING as a poly_int64.
22516         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
22517         (emit_push_insn): Likewise.
22518         * lra-eliminations.c (mark_not_eliminable): Likewise.
22519         * recog.c (push_operand): Likewise.
22520         * reload1.c (elimination_effects): Likewise.
22521         * rtlanal.c (nonzero_bits1): Likewise.
22522         * calls.c (store_one_arg): Likewise.  Require the padding to be
22523         known at compile time.
22525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22526             Alan Hayward  <alan.hayward@arm.com>
22527             David Sherwood  <david.sherwood@arm.com>
22529         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
22530         Use plus_constant instead of gen_rtx_PLUS.
22532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22533             Alan Hayward  <alan.hayward@arm.com>
22534             David Sherwood  <david.sherwood@arm.com>
22536         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
22537         rather than an int.
22539 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22540             Alan Hayward  <alan.hayward@arm.com>
22541             David Sherwood  <david.sherwood@arm.com>
22543         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
22544         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
22545         via stack temporaries.  Treat the mode size as polynomial too.
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         * expr.c (expand_expr_real_2): When handling conversions involving
22552         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
22553         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
22554         as a poly_uint64 too.
22556 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22557             Alan Hayward  <alan.hayward@arm.com>
22558             David Sherwood  <david.sherwood@arm.com>
22560         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
22562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22563             Alan Hayward  <alan.hayward@arm.com>
22564             David Sherwood  <david.sherwood@arm.com>
22566         * combine.c (can_change_dest_mode): Handle polynomial
22567         REGMODE_NATURAL_SIZE.
22568         * expmed.c (store_bit_field_1): Likewise.
22569         * expr.c (store_constructor): Likewise.
22570         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
22571         and polynomial REGMODE_NATURAL_SIZE.
22572         (gen_lowpart_common): Likewise.
22573         * reginfo.c (record_subregs_of_mode): Likewise.
22574         * rtlanal.c (read_modify_subreg_p): Likewise.
22576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22577             Alan Hayward  <alan.hayward@arm.com>
22578             David Sherwood  <david.sherwood@arm.com>
22580         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
22581         numbers of elements.
22583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22584             Alan Hayward  <alan.hayward@arm.com>
22585             David Sherwood  <david.sherwood@arm.com>
22587         * match.pd: Cope with polynomial numbers of vector elements.
22589 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22590             Alan Hayward  <alan.hayward@arm.com>
22591             David Sherwood  <david.sherwood@arm.com>
22593         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
22594         in a POINTER_PLUS_EXPR.
22596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22597             Alan Hayward  <alan.hayward@arm.com>
22598             David Sherwood  <david.sherwood@arm.com>
22600         * omp-simd-clone.c (simd_clone_subparts): New function.
22601         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
22602         (ipa_simd_modify_function_body): Likewise.
22604 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22605             Alan Hayward  <alan.hayward@arm.com>
22606             David Sherwood  <david.sherwood@arm.com>
22608         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
22609         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
22610         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
22611         (expand_vector_condition, vector_element): Likewise.
22612         (subparts_gt): New function.
22613         (get_compute_type): Use subparts_gt.
22614         (count_type_subparts): Delete.
22615         (expand_vector_operations_1): Use subparts_gt instead of
22616         count_type_subparts.
22618 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22619             Alan Hayward  <alan.hayward@arm.com>
22620             David Sherwood  <david.sherwood@arm.com>
22622         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
22623         (vect_compile_time_alias): ...this new function.  Do the calculation
22624         on poly_ints rather than trees.
22625         (vect_prune_runtime_alias_test_list): Update call accordingly.
22627 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22628             Alan Hayward  <alan.hayward@arm.com>
22629             David Sherwood  <david.sherwood@arm.com>
22631         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
22632         numbers of units.
22633         (vect_schedule_slp_instance): Likewise.
22635 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22636             Alan Hayward  <alan.hayward@arm.com>
22637             David Sherwood  <david.sherwood@arm.com>
22639         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
22640         constant and extern definitions for variable-length vectors.
22641         (vect_get_constant_vectors): Note that the number of units
22642         is known to be constant.
22644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22645             Alan Hayward  <alan.hayward@arm.com>
22646             David Sherwood  <david.sherwood@arm.com>
22648         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
22649         of units as polynomial.  Choose between WIDE and NARROW based
22650         on multiple_p.
22652 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22653             Alan Hayward  <alan.hayward@arm.com>
22654             David Sherwood  <david.sherwood@arm.com>
22656         * tree-vect-stmts.c (simd_clone_subparts): New function.
22657         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
22659 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22660             Alan Hayward  <alan.hayward@arm.com>
22661             David Sherwood  <david.sherwood@arm.com>
22663         * tree-vect-stmts.c (vectorizable_call): Treat the number of
22664         vectors as polynomial.  Use build_index_vector for
22665         IFN_GOMP_SIMD_LANE.
22667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22668             Alan Hayward  <alan.hayward@arm.com>
22669             David Sherwood  <david.sherwood@arm.com>
22671         * tree-vect-stmts.c (get_load_store_type): Treat the number of
22672         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
22673         for variable-length vectors.
22674         (vectorizable_mask_load_store): Treat the number of units as
22675         polynomial, asserting that it is constant if the condition has
22676         already been enforced.
22677         (vectorizable_store, vectorizable_load): Likewise.
22679 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22680             Alan Hayward  <alan.hayward@arm.com>
22681             David Sherwood  <david.sherwood@arm.com>
22683         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
22684         of units as polynomial.  Punt if we can't tell at compile time
22685         which vector contains the final result.
22687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22688             Alan Hayward  <alan.hayward@arm.com>
22689             David Sherwood  <david.sherwood@arm.com>
22691         * tree-vect-loop.c (vectorizable_induction): Treat the number
22692         of units as polynomial.  Punt on SLP inductions.  Use an integer
22693         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
22694         cast of such a series for variable-length floating-point
22695         reductions.
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         * tree.h (build_index_vector): Declare.
22702         * tree.c (build_index_vector): New function.
22703         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
22704         of units as polynomial, forcibly converting it to a constant if
22705         vectorizable_reduction has already enforced the condition.
22706         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
22707         to create a {1,2,3,...} vector.
22708         (vectorizable_reduction): Treat the number of units as polynomial.
22709         Choose vectype_in based on the largest scalar element size rather
22710         than the smallest number of units.  Enforce the restrictions
22711         relied on above.
22713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22714             Alan Hayward  <alan.hayward@arm.com>
22715             David Sherwood  <david.sherwood@arm.com>
22717         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
22718         number of units as polynomial.
22720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22721             Alan Hayward  <alan.hayward@arm.com>
22722             David Sherwood  <david.sherwood@arm.com>
22724         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
22725         * target.def (autovectorize_vector_sizes): Return the vector sizes
22726         by pointer, using vector_sizes rather than a bitmask.
22727         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
22728         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
22729         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
22730         Likewise.
22731         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
22732         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
22733         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
22734         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
22735         * omp-general.c (omp_max_vf): Likewise.
22736         * omp-low.c (omp_clause_aligned_alignment): Likewise.
22737         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
22738         * tree-vect-loop.c (vect_analyze_loop): Likewise.
22739         * tree-vect-slp.c (vect_slp_bb): Likewise.
22740         * doc/tm.texi: Regenerate.
22741         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
22742         to a poly_uint64.
22743         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
22744         the vector size as a poly_uint64 rather than an unsigned int.
22745         (current_vector_size): Change from an unsigned int to a poly_uint64.
22746         (get_vectype_for_scalar_type): Update accordingly.
22747         * tree.h (build_truth_vector_type): Take the size and number of
22748         units as a poly_uint64 rather than an unsigned int.
22749         (build_vector_type): Add a temporary overload that takes
22750         the number of units as a poly_uint64 rather than an unsigned int.
22751         * tree.c (make_vector_type): Likewise.
22752         (build_truth_vector_type): Take the number of units as a poly_uint64
22753         rather than an unsigned int.
22755 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22756             Alan Hayward  <alan.hayward@arm.com>
22757             David Sherwood  <david.sherwood@arm.com>
22759         * target.def (get_mask_mode): Take the number of units and length
22760         as poly_uint64s rather than unsigned ints.
22761         * targhooks.h (default_get_mask_mode): Update accordingly.
22762         * targhooks.c (default_get_mask_mode): Likewise.
22763         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
22764         * doc/tm.texi: Regenerate.
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         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
22771         * omp-general.c (omp_max_vf): Likewise.
22772         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
22773         (expand_omp_simd): Handle polynomial safelen.
22774         * omp-low.c (omplow_simd_context): Add a default constructor.
22775         (omplow_simd_context::max_vf): Change from int to poly_uint64.
22776         (lower_rec_simd_input_clauses): Update accordingly.
22777         (lower_rec_input_clauses): Likewise.
22779 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22780             Alan Hayward  <alan.hayward@arm.com>
22781             David Sherwood  <david.sherwood@arm.com>
22783         * tree-vectorizer.h (vect_nunits_for_cost): New function.
22784         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
22785         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
22786         (vect_analyze_slp_cost): Likewise.
22787         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
22788         (vect_model_load_cost): Likewise.
22790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22791             Alan Hayward  <alan.hayward@arm.com>
22792             David Sherwood  <david.sherwood@arm.com>
22794         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
22795         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
22796         from an unsigned int * to a poly_uint64_pod *.
22797         (calculate_unrolling_factor): New function.
22798         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
22800 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22801             Alan Hayward  <alan.hayward@arm.com>
22802             David Sherwood  <david.sherwood@arm.com>
22804         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
22805         from an unsigned int to a poly_uint64.
22806         (_loop_vec_info::slp_unrolling_factor): Likewise.
22807         (_loop_vec_info::vectorization_factor): Change from an int
22808         to a poly_uint64.
22809         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
22810         (vect_get_num_vectors): New function.
22811         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
22812         (vect_get_num_copies): Use vect_get_num_vectors.
22813         (vect_analyze_data_ref_dependences): Change max_vf from an int *
22814         to an unsigned int *.
22815         (vect_analyze_data_refs): Change min_vf from an int * to a
22816         poly_uint64 *.
22817         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22818         than an unsigned HOST_WIDE_INT.
22819         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
22820         (vect_analyze_data_ref_dependence): Change max_vf from an int *
22821         to an unsigned int *.
22822         (vect_analyze_data_ref_dependences): Likewise.
22823         (vect_compute_data_ref_alignment): Handle polynomial vf.
22824         (vect_enhance_data_refs_alignment): Likewise.
22825         (vect_prune_runtime_alias_test_list): Likewise.
22826         (vect_shift_permute_load_chain): Likewise.
22827         (vect_supportable_dr_alignment): Likewise.
22828         (dependence_distance_ge_vf): Take the vectorization factor as a
22829         poly_uint64 rather than an unsigned HOST_WIDE_INT.
22830         (vect_analyze_data_refs): Change min_vf from an int * to a
22831         poly_uint64 *.
22832         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
22833         vfm1 as a poly_uint64 rather than an int.  Make the same change
22834         for the returned bound_scalar.
22835         (vect_gen_vector_loop_niters): Handle polynomial vf.
22836         (vect_do_peeling): Likewise.  Update call to
22837         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
22838         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
22839         be constant.
22840         * tree-vect-loop.c (vect_determine_vectorization_factor)
22841         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
22842         (vect_get_known_peeling_cost): Likewise.
22843         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
22844         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
22845         (vect_transform_loop): Likewise.  Use the lowest possible VF when
22846         updating the upper bounds of the loop.
22847         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
22848         rather than an int.
22849         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
22850         polynomial unroll factors.
22851         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
22852         (vect_make_slp_decision): Likewise.
22853         (vect_supported_load_permutation_p): Likewise, and polynomial
22854         vf too.
22855         (vect_analyze_slp_cost): Handle polynomial vf.
22856         (vect_slp_analyze_node_operations): Likewise.
22857         (vect_slp_analyze_bb_1): Likewise.
22858         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
22859         than an unsigned HOST_WIDE_INT.
22860         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
22861         (vectorizable_load): Handle polynomial vf.
22862         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
22863         a poly_uint64.
22864         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
22866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22867             Alan Hayward  <alan.hayward@arm.com>
22868             David Sherwood  <david.sherwood@arm.com>
22870         * match.pd: Handle bit operations involving three constants
22871         and try to fold one pair.
22873 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
22875         * tree-vect-loop-manip.c: Include gimple-fold.h.
22876         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
22877         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
22878         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
22879         Add a path that uses a step of VF instead of 1, but disable it
22880         for now.
22881         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
22882         and niters_no_overflow parameters.  Update calls to
22883         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
22884         Create a new SSA name if the latter choses to use a ste other
22885         than zero, and return it via niters_vector_mult_vf_var.
22886         * tree-vect-loop.c (vect_transform_loop): Update calls to
22887         vect_do_peeling, vect_gen_vector_loop_niters and
22888         slpeel_make_loop_iterate_ntimes.
22889         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
22890         (vect_gen_vector_loop_niters): Update declarations after above changes.
22892 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
22894         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
22895         128-bit round to integer instructions.
22896         (ceil<mode>2): Likewise.
22897         (btrunc<mode>2): Likewise.
22898         (round<mode>2): Likewise.
22900 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22902         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
22903         unaligned VSX load/store on P8/P9.
22904         (expand_block_clear): Allow the use of unaligned VSX
22905         load/store on P8/P9.
22907 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22909         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
22910         New function.
22911         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
22912         swap associated with both a load and a store.
22914 2018-01-02  Andrew Waterman  <andrew@sifive.com>
22916         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
22917         * config/riscv/riscv.md (clear_cache): Use it.
22919 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
22921         * web.c: Remove out-of-date comment.
22923 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22925         * expr.c (fixup_args_size_notes): Check that any existing
22926         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
22927         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
22928         (emit_single_push_insn): ...here.
22930 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22932         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
22933         (const_vector_encoded_nelts): New function.
22934         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
22935         (const_vector_int_elt, const_vector_elt): Declare.
22936         * emit-rtl.c (const_vector_int_elt_1): New function.
22937         (const_vector_elt): Likewise.
22938         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
22939         of CONST_VECTOR_ELT.
22941 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22943         * expr.c: Include rtx-vector-builder.h.
22944         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
22945         directly on the tree encoding.
22946         (const_vector_from_tree): Likewise.
22947         * optabs.c: Include rtx-vector-builder.h.
22948         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
22949         sequence of "u" values.
22950         * vec-perm-indices.c: Include rtx-vector-builder.h.
22951         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
22952         directly on the vec_perm_indices encoding.
22954 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22956         * doc/rtl.texi (const_vector): Describe new encoding scheme.
22957         * Makefile.in (OBJS): Add rtx-vector-builder.o.
22958         * rtx-vector-builder.h: New file.
22959         * rtx-vector-builder.c: Likewise.
22960         * rtl.h (rtx_def::u2): Add a const_vector field.
22961         (CONST_VECTOR_NPATTERNS): New macro.
22962         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
22963         (CONST_VECTOR_DUPLICATE_P): Likewise.
22964         (CONST_VECTOR_STEPPED_P): Likewise.
22965         (CONST_VECTOR_ENCODED_ELT): Likewise.
22966         (const_vec_duplicate_p): Check for a duplicated vector encoding.
22967         (unwrap_const_vec_duplicate): Likewise.
22968         (const_vec_series_p): Check for a non-duplicated vector encoding.
22969         Say that the function only returns true for integer vectors.
22970         * emit-rtl.c: Include rtx-vector-builder.h.
22971         (gen_const_vec_duplicate_1): Delete.
22972         (gen_const_vector): Call gen_const_vec_duplicate instead of
22973         gen_const_vec_duplicate_1.
22974         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
22975         (gen_const_vec_duplicate): Use rtx_vector_builder.
22976         (gen_const_vec_series): Likewise.
22977         (gen_rtx_CONST_VECTOR): Likewise.
22978         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
22979         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22980         Build a new vector rather than modifying a CONST_VECTOR in-place.
22981         (handle_special_swappables): Update call accordingly.
22982         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
22983         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
22984         Build a new vector rather than modifying a CONST_VECTOR in-place.
22985         (handle_special_swappables): Update call accordingly.
22987 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22989         * simplify-rtx.c (simplify_const_binary_operation): Use
22990         CONST_VECTOR_ELT instead of XVECEXP.
22992 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
22994         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
22995         the selector elements to be different from the data elements
22996         if the selector is a VECTOR_CST.
22997         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
22998         ssizetype for the selector.
23000 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23002         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
23003         before testing each element individually.
23004         * tree-vect-generic.c (lower_vec_perm): Likewise.
23006 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23008         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
23009         * selftest-run-tests.c (selftest::run_tests): Call it.
23010         * vector-builder.h (vector_builder::operator ==): New function.
23011         (vector_builder::operator !=): Likewise.
23012         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
23013         (vec_perm_indices::all_from_input_p): New function.
23014         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
23015         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
23016         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
23017         instead of reading the VECTOR_CST directly.  Detect whether both
23018         vector inputs are the same before constructing the vec_perm_indices,
23019         and update the number of inputs argument accordingly.  Use the
23020         utility functions added above.  Only construct sel2 if we need to.
23022 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23024         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
23025         the broadcast of the low byte.
23026         (expand_mult_highpart): Use an explicit encoding for the permutes.
23027         * optabs-query.c (can_mult_highpart_p): Likewise.
23028         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
23029         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23030         (vectorizable_bswap): Likewise.
23031         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
23032         explicit encoding for the power-of-2 permutes.
23033         (vect_permute_store_chain): Likewise.
23034         (vect_grouped_load_supported): Likewise.
23035         (vect_permute_load_chain): Likewise.
23037 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23039         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
23040         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
23041         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
23042         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
23043         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
23044         (vect_gen_perm_mask_any): Likewise.
23046 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23048         * int-vector-builder.h: New file.
23049         * vec-perm-indices.h: Include int-vector-builder.h.
23050         (vec_perm_indices): Redefine as an int_vector_builder.
23051         (auto_vec_perm_indices): Delete.
23052         (vec_perm_builder): Redefine as a stand-alone class.
23053         (vec_perm_indices::vec_perm_indices): New function.
23054         (vec_perm_indices::clamp): Likewise.
23055         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
23056         (vec_perm_indices::new_vector): New function.
23057         (vec_perm_indices::new_expanded_vector): Update for new
23058         vec_perm_indices class.
23059         (vec_perm_indices::rotate_inputs): New function.
23060         (vec_perm_indices::all_in_range_p): Operate directly on the
23061         encoded form, without computing elided elements.
23062         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
23063         encoding.  Update for new vec_perm_indices class.
23064         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
23065         the given vec_perm_builder.
23066         (expand_vec_perm_var): Update vec_perm_builder constructor.
23067         (expand_mult_highpart): Use vec_perm_builder instead of
23068         auto_vec_perm_indices.
23069         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
23070         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
23071         or double series encoding as appropriate.
23072         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
23073         vec_perm_indices instead of auto_vec_perm_indices.
23074         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23075         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23076         (vect_permute_store_chain): Likewise.
23077         (vect_grouped_load_supported): Likewise.
23078         (vect_permute_load_chain): Likewise.
23079         (vect_shift_permute_load_chain): Likewise.
23080         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23081         (vect_transform_slp_perm_load): Likewise.
23082         (vect_schedule_slp_instance): Likewise.
23083         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23084         (vectorizable_mask_load_store): Likewise.
23085         (vectorizable_bswap): Likewise.
23086         (vectorizable_store): Likewise.
23087         (vectorizable_load): Likewise.
23088         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
23089         vec_perm_indices instead of auto_vec_perm_indices.  Use
23090         tree_to_vec_perm_builder to read the vector from a tree.
23091         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
23092         vec_perm_builder instead of a vec_perm_indices.
23093         (have_whole_vector_shift): Use vec_perm_builder and
23094         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
23095         truncation to calc_vec_perm_mask_for_shift.
23096         (vect_create_epilog_for_reduction): Likewise.
23097         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
23098         from auto_vec_perm_indices to vec_perm_indices.
23099         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23100         instead of changing individual elements.
23101         (aarch64_vectorize_vec_perm_const): Use new_vector to install
23102         the vector in d.perm.
23103         * config/arm/arm.c (expand_vec_perm_d::perm): Change
23104         from auto_vec_perm_indices to vec_perm_indices.
23105         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
23106         instead of changing individual elements.
23107         (arm_vectorize_vec_perm_const): Use new_vector to install
23108         the vector in d.perm.
23109         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
23110         Update vec_perm_builder constructor.
23111         (rs6000_expand_interleave): Likewise.
23112         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
23113         (rs6000_expand_interleave): Likewise.
23115 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23117         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
23118         to qimode could truncate the indices.
23119         * optabs.c (expand_vec_perm_var): Likewise.
23121 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23123         * Makefile.in (OBJS): Add vec-perm-indices.o.
23124         * vec-perm-indices.h: New file.
23125         * vec-perm-indices.c: Likewise.
23126         * target.h (vec_perm_indices): Replace with a forward class
23127         declaration.
23128         (auto_vec_perm_indices): Move to vec-perm-indices.h.
23129         * optabs.h: Include vec-perm-indices.h.
23130         (expand_vec_perm): Delete.
23131         (selector_fits_mode_p, expand_vec_perm_var): Declare.
23132         (expand_vec_perm_const): Declare.
23133         * target.def (vec_perm_const_ok): Replace with...
23134         (vec_perm_const): ...this new hook.
23135         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
23136         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
23137         * doc/tm.texi: Regenerate.
23138         * optabs.def (vec_perm_const): Delete.
23139         * doc/md.texi (vec_perm_const): Likewise.
23140         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
23141         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
23142         expand_vec_perm for constant permutation vectors.  Assert that
23143         the mode of variable permutation vectors is the integer equivalent
23144         of the mode that is being permuted.
23145         * optabs-query.h (selector_fits_mode_p): Declare.
23146         * optabs-query.c: Include vec-perm-indices.h.
23147         (selector_fits_mode_p): New function.
23148         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
23149         is defined, instead of checking whether the vec_perm_const_optab
23150         exists.  Use targetm.vectorize.vec_perm_const instead of
23151         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
23152         fit in the vector mode before using a variable permute.
23153         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
23154         vec_perm_indices instead of an rtx.
23155         (expand_vec_perm): Replace with...
23156         (expand_vec_perm_const): ...this new function.  Take the selector
23157         as a vec_perm_indices rather than an rtx.  Also take the mode of
23158         the selector.  Update call to shift_amt_for_vec_perm_mask.
23159         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
23160         Use vec_perm_indices::new_expanded_vector to expand the original
23161         selector into bytes.  Check whether the indices fit in the vector
23162         mode before using a variable permute.
23163         (expand_vec_perm_var): Make global.
23164         (expand_mult_highpart): Use expand_vec_perm_const.
23165         * fold-const.c: Includes vec-perm-indices.h.
23166         * tree-ssa-forwprop.c: Likewise.
23167         * tree-vect-data-refs.c: Likewise.
23168         * tree-vect-generic.c: Likewise.
23169         * tree-vect-loop.c: Likewise.
23170         * tree-vect-slp.c: Likewise.
23171         * tree-vect-stmts.c: Likewise.
23172         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
23173         Delete.
23174         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
23175         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
23176         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
23177         (aarch64_vectorize_vec_perm_const): ...this new function.
23178         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23179         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23180         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
23181         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
23182         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23183         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23184         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
23185         into...
23186         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
23187         check for NEON modes.
23188         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
23189         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
23190         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
23191         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
23192         into...
23193         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
23194         the old VEC_PERM_CONST conditions.
23195         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
23196         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
23197         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
23198         (ia64_vectorize_vec_perm_const_ok): Merge into...
23199         (ia64_vectorize_vec_perm_const): ...this new function.
23200         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
23201         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
23202         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
23203         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
23204         * config/mips/mips.c (mips_expand_vec_perm_const)
23205         (mips_vectorize_vec_perm_const_ok): Merge into...
23206         (mips_vectorize_vec_perm_const): ...this new function.
23207         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
23208         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
23209         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
23210         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
23211         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
23212         (rs6000_expand_vec_perm_const): Delete.
23213         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
23214         Delete.
23215         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23216         (altivec_expand_vec_perm_const_le): Take each operand individually.
23217         Operate on constant selectors rather than rtxes.
23218         (altivec_expand_vec_perm_const): Likewise.  Update call to
23219         altivec_expand_vec_perm_const_le.
23220         (rs6000_expand_vec_perm_const): Delete.
23221         (rs6000_vectorize_vec_perm_const_ok): Delete.
23222         (rs6000_vectorize_vec_perm_const): New function.
23223         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23224         an element count and rtx array.
23225         (rs6000_expand_extract_even): Update call accordingly.
23226         (rs6000_expand_interleave): Likewise.
23227         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
23228         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
23229         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
23230         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
23231         (rs6000_expand_vec_perm_const): Delete.
23232         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
23233         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23234         (altivec_expand_vec_perm_const_le): Take each operand individually.
23235         Operate on constant selectors rather than rtxes.
23236         (altivec_expand_vec_perm_const): Likewise.  Update call to
23237         altivec_expand_vec_perm_const_le.
23238         (rs6000_expand_vec_perm_const): Delete.
23239         (rs6000_vectorize_vec_perm_const_ok): Delete.
23240         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
23241         reference to the SPE evmerge intructions.
23242         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
23243         an element count and rtx array.
23244         (rs6000_expand_extract_even): Update call accordingly.
23245         (rs6000_expand_interleave): Likewise.
23246         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
23247         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
23248         new function.
23249         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
23251 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23253         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
23254         vector mode and that that mode matches the mode of the data
23255         being permuted.
23256         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
23257         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
23258         directly using expand_vec_perm_1 when forcing selectors into
23259         registers.
23260         (expand_vec_perm_var): New function, split out from expand_vec_perm.
23262 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23264         * optabs-query.h (can_vec_perm_p): Delete.
23265         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
23266         * optabs-query.c (can_vec_perm_p): Split into...
23267         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
23268         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
23269         particular selector is valid.
23270         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
23271         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
23272         (vect_grouped_load_supported): Likewise.
23273         (vect_shift_permute_load_chain): Likewise.
23274         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
23275         (vect_transform_slp_perm_load): Likewise.
23276         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
23277         (vectorizable_bswap): Likewise.
23278         (vect_gen_perm_mask_checked): Likewise.
23279         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
23280         implementations of variable permutation vectors into account
23281         when deciding which selector to use.
23282         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
23283         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
23284         with a false third argument.
23285         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
23286         to test whether the constant selector is valid and can_vec_perm_var_p
23287         to test whether a variable selector is valid.
23289 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23291         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
23292         * optabs-query.c (can_vec_perm_p): Likewise.
23293         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
23294         instead of vec_perm_indices.
23295         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
23296         (vect_gen_perm_mask_checked): Likewise,
23297         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
23298         (vect_gen_perm_mask_checked): Likewise,
23300 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
23302         * optabs-query.h (qimode_for_vec_perm): Declare.
23303         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
23304         (qimode_for_vec_perm): ...this new function.
23305         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
23307 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23309         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
23310         does not have a conditional at the top.
23312 2018-01-02  Richard Biener  <rguenther@suse.de>
23314         * ipa-inline.c (big_speedup_p): Fix expression.
23316 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23318         PR target/81616
23319         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
23320         for generic 4->6.
23322 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
23324         PR target/81616
23325         Generic tuning.
23326         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
23327         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
23328         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
23329         cond_taken_branch_cost 3->4.
23331 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
23333         PR tree-optimization/83581
23334         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
23335         TODO_cleanup_cfg if any changes have been made.
23337         PR middle-end/83608
23338         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
23339         convert_modes if target mode has the right side, but different mode
23340         class.
23342         PR middle-end/83609
23343         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
23344         last argument when extracting from CONCAT.  If either from_real or
23345         from_imag is NULL, use expansion through memory.  If result is not
23346         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
23347         the parts directly to inner mode, if even that fails, use expansion
23348         through memory.
23350         PR middle-end/83623
23351         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
23352         check for bswap in mode rather than HImode and use that in expand_unop
23353         too.
23355 Copyright (C) 2018 Free Software Foundation, Inc.
23357 Copying and distribution of this file, with or without modification,
23358 are permitted in any medium without royalty provided the copyright
23359 notice and this notice are preserved.